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

10 lines
199 B
C
Raw Normal View History

2022-02-16 09:13:02 -06:00
#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