tegrakernel/kernel/kernel-4.9/tools/virtio/linux/compiler.h

10 lines
199 B
C

#ifndef LINUX_COMPILER_H
#define LINUX_COMPILER_H
#define WRITE_ONCE(var, val) \
(*((volatile typeof(val) *)(&(var))) = (val))
#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))
#endif