backport ACCESS_ONCE() before 2.6.26

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7126 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2017-04-14 01:19:06 +00:00
parent c98eb43f55
commit 57ee5e39ab

View File

@@ -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
/* <linux/cpumask.h> */