Add support for constant pointer constructs to READ_ONCE() in the
LinuxKPI. When the type of the argument is constant the temporary variable cannot be assigned after the barrier. Instead assign the temporary variable by initialization. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
5e33dc7a27
commit
7c32df5d03
@ -86,9 +86,10 @@
|
||||
} while (0)
|
||||
|
||||
#define READ_ONCE(x) ({ \
|
||||
__typeof(x) __var; \
|
||||
barrier(); \
|
||||
__var = ACCESS_ONCE(x); \
|
||||
__typeof(x) __var = ({ \
|
||||
barrier(); \
|
||||
ACCESS_ONCE(x); \
|
||||
}); \
|
||||
barrier(); \
|
||||
__var; \
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user