From 57ee5e39ab501965994e097922bd4de5364eb5c9 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 14 Apr 2017 01:19:06 +0000 Subject: [PATCH] backport ACCESS_ONCE() before 2.6.26 Signed-off-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7126 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index ea40cea6d..d3f041307 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -76,6 +76,11 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) * 230fa253df6352af12ad0a16128760b5cb3f92df). */ #define READ_ONCE(x) (*(volatile typeof(x) *)&(x)) + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) +#define ACCESS_ONCE(x) READ_ONCE(x) +#endif + #endif /* */