9 * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
22 #include <urcu/compiler.h>
23 #include <urcu/arch.h>
26 * Identify a shared load. A cmm_smp_rmc() or cmm_smp_mc() should come
29 #define _CMM_LOAD_SHARED(p) CMM_ACCESS_ONCE(p)
32 * Load a data from shared memory, doing a cache flush if required.
34 #define CMM_LOAD_SHARED(p) \
37 _CMM_LOAD_SHARED(p); \
41 * Identify a shared store. A cmm_smp_wmc() or cmm_smp_mc() should
44 #define _CMM_STORE_SHARED(x, v) ({ CMM_ACCESS_ONCE(x) = (v); })
47 * Store v into x, where x is located in shared memory. Performs the
48 * required cache flush after writing. Returns v.
50 #define CMM_STORE_SHARED(x, v) \
52 __typeof__(x) _v = _CMM_STORE_SHARED(x, v); \
57 #endif /* _URCU_SYSTEM_H */
This page took 0.03635 seconds and 4 git commands to generate.