diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-01 12:55:09 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-01 12:55:09 -0800 |
commit | 4f97f8f5f0664bdcfffe74e7d2a841f55a0e88e2 (patch) | |
tree | 49165c5065d121130e0436e647b9a650f0da41cb /tools/virtio/linux/compiler.h | |
parent | 0e781c2258ffb2a42bf44f62dea8662f38cbfd34 (diff) | |
parent | 36f90b0a2ddd60823fe193a85e60ff1906c2a9b3 (diff) |
Merge 4.5-rc2 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/virtio/linux/compiler.h')
-rw-r--r-- | tools/virtio/linux/compiler.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h new file mode 100644 index 000000000000..845960e1cbf2 --- /dev/null +++ b/tools/virtio/linux/compiler.h @@ -0,0 +1,9 @@ +#ifndef LINUX_COMPILER_H +#define LINUX_COMPILER_H + +#define WRITE_ONCE(var, val) \ + (*((volatile typeof(val) *)(&(var))) = (val)) + +#define READ_ONCE(var) (*((volatile typeof(val) *)(&(var)))) + +#endif |