X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-defer-static.h;h=082298a5267fefced9f7259ff3f193f232a5a5c9;hp=dd875ca66b75cdac02f21a9a6eba5a4ce9693796;hb=f0708810fe66d7fdcf52903c607ed65c9fa664c7;hpb=ec4e58a3aba2084440012f8ccac3a31eb6101183 diff --git a/urcu-defer-static.h b/urcu-defer-static.h index dd875ca..082298a 100644 --- a/urcu-defer-static.h +++ b/urcu-defer-static.h @@ -34,7 +34,13 @@ #include #include +#include +#include +#include +#ifdef __cplusplus +extern "C" { +#endif /* * Number of entries in the per-thread defer queue. Must be power of 2. @@ -59,36 +65,6 @@ (x = (void *)((unsigned long)(x) & ~DQ_FCT_BIT)) #define DQ_FCT_MARK ((void *)(~DQ_FCT_BIT)) -/* - * Identify a shared load. A smp_rmc() or smp_mc() should come before the load. - */ -#define _LOAD_SHARED(p) ACCESS_ONCE(p) - -/* - * Load a data from shared memory, doing a cache flush if required. - */ -#define LOAD_SHARED(p) \ - ({ \ - smp_rmc(); \ - _LOAD_SHARED(p); \ - }) - -/* - * Identify a shared store. A smp_wmc() or smp_mc() should follow the store. - */ -#define _STORE_SHARED(x, v) ({ ACCESS_ONCE(x) = (v); }) - -/* - * Store v into x, where x is located in shared memory. Performs the required - * cache flush after writing. Returns v. - */ -#define STORE_SHARED(x, v) \ - ({ \ - _STORE_SHARED(x, v); \ - smp_wmc(); \ - (v); \ - }) - /* * This code section can only be included in LGPL 2.1 compatible source code. * See below for the function call wrappers which can be used in code meant to @@ -120,6 +96,13 @@ struct defer_queue { unsigned long tail; /* next element to remove at tail */ void *last_fct_out; /* last fct pointer encoded */ void **q; + /* registry information */ + unsigned long last_head; + struct list_head list; /* list of thread queues */ }; +#ifdef __cplusplus +} +#endif + #endif /* _URCU_DEFER_STATIC_H */