mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-19 14:56:21 +00:00
e9c4962c5d
Fix the build dependency for virtio_test. The virtio_ring that is used from the test requires container_of_const(). Change to use container_of.h kernel header directly and adapt related codes. Signed-off-by: Shunsuke Mie <mie@igel.co.jp> Message-Id: <20230417022037.917668-2-mie@igel.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 lines
341 B
C
14 lines
341 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef LINUX_COMPILER_H
|
|
#define LINUX_COMPILER_H
|
|
|
|
#include "../../../include/linux/compiler_types.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
|