2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2016-01-20 21:12:58 +02:00
|
|
|
#ifndef LINUX_COMPILER_H
|
|
|
|
|
#define LINUX_COMPILER_H
|
|
|
|
|
|
2023-04-17 11:20:37 +09:00
|
|
|
#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
|