xref: /haiku/headers/private/kernel/arch/arm/arch_atomic.h (revision 21258e2674226d6aa732321b6f8494841895af5f)
1 /*
2  * Copyright 2014, Paweł Dziepak, pdziepak@quarnos.org.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Alexander von Gluck IV <kallisti5@unixzen.com>
7  */
8 #ifndef _KERNEL_ARCH_ARM_ATOMIC_H
9 #define _KERNEL_ARCH_ARM_ATOMIC_H
10 
11 
12 #include <arch_cpu.h>
13 
14 
15 static inline void
16 memory_read_barrier_inline(void)
17 {
18 	dmb();
19 }
20 
21 
22 static inline void
23 memory_write_barrier_inline(void)
24 {
25 	dmb();
26 }
27 
28 
29 static inline void
30 memory_full_barrier_inline(void)
31 {
32 	dmb();
33 }
34 
35 
36 #define memory_read_barrier memory_read_barrier_inline
37 #define memory_write_barrier memory_write_barrier_inline
38 #define memory_full_barrier memory_full_barrier_inline
39 
40 
41 #endif	// _KERNEL_ARCH_ARM_ATOMIC_H
42