From 9e53ae20d423006e4990e0d4b50170e096d24ffd Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Tue, 27 Oct 2015 16:50:11 +0900 Subject: [PATCH] add memory barriers - rmb() - wmb() --- arch/x86/kernel/include/arch/cpu.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 arch/x86/kernel/include/arch/cpu.h diff --git a/arch/x86/kernel/include/arch/cpu.h b/arch/x86/kernel/include/arch/cpu.h new file mode 100644 index 00000000..efe16d8e --- /dev/null +++ b/arch/x86/kernel/include/arch/cpu.h @@ -0,0 +1,28 @@ +/** + * \file cpu.h + * License details are found in the file LICENSE. + * \brief + * Declare architecture-dependent types and functions to control CPU. + * \author Gou Nakamura + * Copyright (C) 2015 RIKEN AICS + */ +/* + * HISTORY + */ + +#ifndef ARCH_CPU_H +#define ARCH_CPU_H + +#include + +static inline void rmb(void) +{ + barrier(); +} + +static inline void wmb(void) +{ + barrier(); +} + +#endif /* ARCH_CPU_H */