X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-defer-static.h;h=3e5df3e75b11c31efcd19ec380202d070f824620;hp=8575195a50b4d6530f4c56e7975d49567d4decca;hb=2260a36cd53dc882bf83e39180bae4413d64da8f;hpb=36bc70a84250927ba68d5096a0a9740aec157f9b diff --git a/urcu-defer-static.h b/urcu-defer-static.h index 8575195..3e5df3e 100644 --- a/urcu-defer-static.h +++ b/urcu-defer-static.h @@ -9,7 +9,7 @@ * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu-defer.h for linking * dynamically with the userspace rcu reclamation library. * - * Copyright (c) 2009 Mathieu Desnoyers + * Copyright (c) 2009 Mathieu Desnoyers * Copyright (c) 2009 Paul E. McKenney, IBM Corporation. * * This library is free software; you can redistribute it and/or @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -64,36 +65,6 @@ extern "C" { (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 @@ -127,7 +98,7 @@ struct defer_queue { void **q; /* registry information */ unsigned long last_head; - struct list_head list; /* list of thread queues */ + struct cds_list_head list; /* list of thread queues */ }; #ifdef __cplusplus