urcu-bp-static.h   urcu-bp-static.h 
skipping to change at line 40 skipping to change at line 40
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
#include <syscall.h> #include <syscall.h>
#include <unistd.h> #include <unistd.h>
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/arch.h> #include <urcu/arch.h>
#include <urcu/system.h> #include <urcu/system.h>
#include <urcu/arch_uatomic.h> #include <urcu/uatomic_arch.h>
#include <urcu/list.h> #include <urcu/list.h>
/* /*
* This code section can only be included in LGPL 2.1 compatible source cod e. * This code section can only be included in LGPL 2.1 compatible source cod e.
* See below for the function call wrappers which can be used in code meant to * See below for the function call wrappers which can be used in code meant to
* be only linked with the Userspace RCU library. This comes with a small * be only linked with the Userspace RCU library. This comes with a small
* performance degradation on the read-side due to the added function calls . * performance degradation on the read-side due to the added function calls .
* This is required to permit relinking with newer versions of the library. * This is required to permit relinking with newer versions of the library.
*/ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 urcu-defer-static.h   urcu-defer-static.h 
skipping to change at line 37 skipping to change at line 37
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* IBM's contributions to this file may be relicensed under LGPLv2 or later . * IBM's contributions to this file may be relicensed under LGPLv2 or later .
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/arch.h> #include <urcu/arch.h>
#include <urcu/arch_uatomic.h> #include <urcu/uatomic_arch.h>
#include <urcu/list.h> #include <urcu/list.h>
/* /*
* Number of entries in the per-thread defer queue. Must be power of 2. * Number of entries in the per-thread defer queue. Must be power of 2.
*/ */
#define DEFER_QUEUE_SIZE (1 << 12) #define DEFER_QUEUE_SIZE (1 << 12)
#define DEFER_QUEUE_MASK (DEFER_QUEUE_SIZE - 1) #define DEFER_QUEUE_MASK (DEFER_QUEUE_SIZE - 1)
/* /*
* Typically, data is aligned at least on the architecture size. * Typically, data is aligned at least on the architecture size.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 urcu-pointer-static.h   urcu-pointer-static.h 
skipping to change at line 35 skipping to change at line 35
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* IBM's contributions to this file may be relicensed under LGPLv2 or later . * IBM's contributions to this file may be relicensed under LGPLv2 or later .
*/ */
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/arch.h> #include <urcu/arch.h>
#include <urcu/system.h> #include <urcu/system.h>
#include <urcu/arch_uatomic.h> #include <urcu/uatomic_arch.h>
/** /**
* _rcu_dereference - reads (copy) a RCU-protected pointer to a local varia ble * _rcu_dereference - reads (copy) a RCU-protected pointer to a local varia ble
* into a RCU read-side critical section. The pointer can later be safely * into a RCU read-side critical section. The pointer can later be safely
* dereferenced within the critical section. * dereferenced within the critical section.
* *
* This ensures that the pointer copy is invariant thorough the whole criti cal * This ensures that the pointer copy is invariant thorough the whole criti cal
* section. * section.
* *
* Inserts memory barriers on architectures that require them (currently on ly * Inserts memory barriers on architectures that require them (currently on ly
skipping to change at line 81 skipping to change at line 81
* should not be freed !). * should not be freed !).
*/ */
#define _rcu_cmpxchg_pointer(p, old, _new) \ #define _rcu_cmpxchg_pointer(p, old, _new) \
({ \ ({ \
typeof(*p) _________pold = (old); \ typeof(*p) _________pold = (old); \
typeof(*p) _________pnew = (_new); \ typeof(*p) _________pnew = (_new); \
if (!__builtin_constant_p(_new) || \ if (!__builtin_constant_p(_new) || \
((_new) != NULL)) \ ((_new) != NULL)) \
wmb(); \ wmb(); \
uatomic_cmpxchg(p, _________pold, _________pnew); \ (likely(URCU_CAS_AVAIL()) ? \
(uatomic_cmpxchg(p, _________pold, _________pnew)) :
\
(compat_uatomic_cmpxchg(p, _________pold, \
_________pnew))) \
}) })
/** /**
* _rcu_xchg_pointer - same as rcu_assign_pointer, but returns the previous * _rcu_xchg_pointer - same as rcu_assign_pointer, but returns the previous
* pointer to the data structure, which can be safely freed after waiting f or a * pointer to the data structure, which can be safely freed after waiting f or a
* quiescent state using synchronize_rcu(). * quiescent state using synchronize_rcu().
*/ */
#define _rcu_xchg_pointer(p, v) \ #define _rcu_xchg_pointer(p, v) \
({ \ ({ \
 End of changes. 2 change blocks. 
2 lines changed or deleted 6 lines changed or added


 urcu-pointer.h   urcu-pointer.h 
skipping to change at line 31 skipping to change at line 31
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* IBM's contributions to this file may be relicensed under LGPLv2 or later . * IBM's contributions to this file may be relicensed under LGPLv2 or later .
*/ */
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/arch.h> #include <urcu/arch.h>
#include <urcu/arch_uatomic.h> #include <urcu/uatomic_arch.h>
#ifdef _LGPL_SOURCE #ifdef _LGPL_SOURCE
#include <urcu-pointer-static.h> #include <urcu-pointer-static.h>
/* /*
* rcu_dereference(ptr) * rcu_dereference(ptr)
* *
* Fetch a RCU-protected pointer. Typically used to copy the variable ptr t o a * Fetch a RCU-protected pointer. Typically used to copy the variable ptr t o a
* local variable. * local variable.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 urcu-qsbr-static.h   urcu-qsbr-static.h 
skipping to change at line 42 skipping to change at line 42
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
#include <assert.h> #include <assert.h>
#include <limits.h> #include <limits.h>
#include <syscall.h> #include <syscall.h>
#include <unistd.h> #include <unistd.h>
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/arch.h> #include <urcu/arch.h>
#include <urcu/system.h> #include <urcu/system.h>
#include <urcu/arch_uatomic.h> #include <urcu/uatomic_arch.h>
#include <urcu/list.h> #include <urcu/list.h>
#include <urcu/urcu-futex.h>
#define futex(...) syscall(__NR_futex, __VA_ARGS__)
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
/* /*
* This code section can only be included in LGPL 2.1 compatible source cod e. * This code section can only be included in LGPL 2.1 compatible source cod e.
* See below for the function call wrappers which can be used in code meant to * See below for the function call wrappers which can be used in code meant to
* be only linked with the Userspace RCU library. This comes with a small * be only linked with the Userspace RCU library. This comes with a small
* performance degradation on the read-side due to the added function calls . * performance degradation on the read-side due to the added function calls .
* This is required to permit relinking with newer versions of the library. * This is required to permit relinking with newer versions of the library.
*/ */
/* /*
skipping to change at line 157 skipping to change at line 154
extern int gp_futex; extern int gp_futex;
/* /*
* Wake-up waiting synchronize_rcu(). Called from many concurrent threads. * Wake-up waiting synchronize_rcu(). Called from many concurrent threads.
*/ */
static inline void wake_up_gp(void) static inline void wake_up_gp(void)
{ {
if (unlikely(uatomic_read(&gp_futex) == -1)) { if (unlikely(uatomic_read(&gp_futex) == -1)) {
uatomic_set(&gp_futex, 0); uatomic_set(&gp_futex, 0);
futex(&gp_futex, FUTEX_WAKE, 1, futex_noasync(&gp_futex, FUTEX_WAKE, 1,
NULL, NULL, 0); NULL, NULL, 0);
} }
} }
#if (BITS_PER_LONG < 64) #if (BITS_PER_LONG < 64)
static inline int rcu_gp_ongoing(unsigned long *value) static inline int rcu_gp_ongoing(unsigned long *value)
{ {
unsigned long reader_gp; unsigned long reader_gp;
if (value == NULL) if (value == NULL)
 End of changes. 3 change blocks. 
6 lines changed or deleted 3 lines changed or added


 urcu-static.h   urcu-static.h 
skipping to change at line 40 skipping to change at line 40
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
#include <syscall.h> #include <syscall.h>
#include <unistd.h> #include <unistd.h>
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/arch.h> #include <urcu/arch.h>
#include <urcu/system.h> #include <urcu/system.h>
#include <urcu/arch_uatomic.h> #include <urcu/uatomic_arch.h>
#include <urcu/list.h> #include <urcu/list.h>
#include <urcu/urcu-futex.h>
#define futex(...) syscall(__NR_futex, __VA_ARGS__)
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
/* /*
* This code section can only be included in LGPL 2.1 compatible source cod e. * This code section can only be included in LGPL 2.1 compatible source cod e.
* See below for the function call wrappers which can be used in code meant to * See below for the function call wrappers which can be used in code meant to
* be only linked with the Userspace RCU library. This comes with a small * be only linked with the Userspace RCU library. This comes with a small
* performance degradation on the read-side due to the added function calls . * performance degradation on the read-side due to the added function calls .
* This is required to permit relinking with newer versions of the library. * This is required to permit relinking with newer versions of the library.
*/ */
/* /*
skipping to change at line 185 skipping to change at line 182
extern int gp_futex; extern int gp_futex;
/* /*
* Wake-up waiting synchronize_rcu(). Called from many concurrent threads. * Wake-up waiting synchronize_rcu(). Called from many concurrent threads.
*/ */
static inline void wake_up_gp(void) static inline void wake_up_gp(void)
{ {
if (unlikely(uatomic_read(&gp_futex) == -1)) { if (unlikely(uatomic_read(&gp_futex) == -1)) {
uatomic_set(&gp_futex, 0); uatomic_set(&gp_futex, 0);
futex(&gp_futex, FUTEX_WAKE, 1, futex_async(&gp_futex, FUTEX_WAKE, 1,
NULL, NULL, 0); NULL, NULL, 0);
} }
} }
static inline int rcu_old_gp_ongoing(long *value) static inline int rcu_old_gp_ongoing(long *value)
{ {
long v; long v;
if (value == NULL) if (value == NULL)
return 0; return 0;
 End of changes. 3 change blocks. 
6 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/