0de7dd2e489f864e887552911f565500e6c9de0c
9 * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
12 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
14 * Permission is hereby granted to use or copy this program
15 * for any purpose, provided the above notices are retained on all copies.
16 * Permission to modify the code and to distribute modified code is granted,
17 * provided the above notices are retained, and a notice that the code was
18 * modified is included with the above copyright notice.
21 #include <urcu/compiler.h>
22 #include <urcu/arch.h>
25 * Identify a shared load. A smp_rmc() or smp_mc() should come before the load.
27 #define _LOAD_SHARED(p) ACCESS_ONCE(p)
30 * Load a data from shared memory, doing a cache flush if required.
32 #define LOAD_SHARED(p) \
39 * Identify a shared store. A smp_wmc() or smp_mc() should follow the store.
41 #define _STORE_SHARED(x, v) ({ ACCESS_ONCE(x) = (v); })
44 * Store v into x, where x is located in shared memory. Performs the required
45 * cache flush after writing. Returns v.
47 #define STORE_SHARED(x, v) \
49 typeof(x) _v = _STORE_SHARED(x, v); \
54 #endif /* _URCU_SYSTEM_H */
This page took 0.029989 seconds and 4 git commands to generate.