https://github.com/torvalds/linux
Raw File
Tip revision: 2585cf9dfaaddf00b069673f27bb3f8530e2039c authored by Linus Torvalds on 12 December 2021, 22:53:01 UTC
Linux 5.16-rc5
Tip revision: 2585cf9
compiler.h
/* SPDX-License-Identifier: GPL-2.0 */
#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))))

#define __aligned(x) __attribute((__aligned__(x)))
#endif
back to top