compiler.h 341 B

12345678910111213
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef LINUX_COMPILER_H
  3. #define LINUX_COMPILER_H
  4. #include "../../../include/linux/compiler_types.h"
  5. #define WRITE_ONCE(var, val) \
  6. (*((volatile typeof(val) *)(&(var))) = (val))
  7. #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))
  8. #define __aligned(x) __attribute((__aligned__(x)))
  9. #endif