License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6-block.git] / tools / virtio / linux / compiler.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
a7c49033
MT
2#ifndef LINUX_COMPILER_H
3#define LINUX_COMPILER_H
4
5#define WRITE_ONCE(var, val) \
6 (*((volatile typeof(val) *)(&(var))) = (val))
7
5da889c7 8#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))
a7c49033
MT
9
10#endif