Files
kernel/tools/virtio/linux/compiler.h
T

14 lines
341 B
C
Raw Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
2016-01-20 21:12:58 +02:00
#ifndef LINUX_COMPILER_H
#define LINUX_COMPILER_H
#include "../../../include/linux/compiler_types.h"
2016-01-20 21:12:58 +02:00
#define WRITE_ONCE(var, val) \
(*((volatile typeof(val) *)(&(var))) = (val))
2016-11-24 10:25:12 +00:00
#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))
2016-01-20 21:12:58 +02:00
2020-04-06 12:17:55 -04:00
#define __aligned(x) __attribute((__aligned__(x)))
2016-01-20 21:12:58 +02:00
#endif