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 cmm_smp_rmc() or cmm_smp_mc() should come before the load.
27 #define _CMM_LOAD_SHARED(p) CMM_ACCESS_ONCE(p)
30 * Load a data from shared memory, doing a cache flush if required.
32 #define CMM_LOAD_SHARED(p) \
35 _CMM_LOAD_SHARED(p); \
39 * Identify a shared store. A cmm_smp_wmc() or cmm_smp_mc() should follow the store.
41 #define _CMM_STORE_SHARED(x, v) ({ CMM_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 CMM_STORE_SHARED(x, v) \
49 typeof(x) _v = _CMM_STORE_SHARED(x, v); \
54 #endif /* _URCU_SYSTEM_H */
This page took 0.030268 seconds and 4 git commands to generate.