kernel: add volatile var read/write macros
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
#ifndef SOCKS_COMPILER_H_
|
#ifndef SOCKS_COMPILER_H_
|
||||||
#define SOCKS_COMPILER_H_
|
#define SOCKS_COMPILER_H_
|
||||||
|
|
||||||
|
#define READ_ONCE(p) (*((const volatile typeof(p) *)&(p)))
|
||||||
|
#define WRITE_ONCE(p, v) *(volatile typeof(p) *)&(p) = (v)
|
||||||
|
|
||||||
#undef __used
|
#undef __used
|
||||||
#define __used __attribute__((used))
|
#define __used __attribute__((used))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user