arch.h   arch.h 
skipping to change at line 28 skipping to change at line 28
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* 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
*/ */
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/config.h> #include <urcu/config.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CONFIG_HAVE_MEM_COHERENCY #define CONFIG_HAVE_MEM_COHERENCY
#define CACHE_LINE_SIZE 128 #define CACHE_LINE_SIZE 128
#ifdef CONFIG_URCU_HAVE_FENCE #ifdef CONFIG_URCU_HAVE_FENCE
#define mb() asm volatile("mfence":::"memory") #define mb() asm volatile("mfence":::"memory")
#define rmb() asm volatile("lfence":::"memory") #define rmb() asm volatile("lfence":::"memory")
#define wmb() asm volatile("sfence"::: "memory") #define wmb() asm volatile("sfence"::: "memory")
#else #else
/* /*
skipping to change at line 128 skipping to change at line 132
typedef unsigned long long cycles_t; typedef unsigned long long cycles_t;
static inline cycles_t get_cycles(void) static inline cycles_t get_cycles(void)
{ {
cycles_t ret = 0; cycles_t ret = 0;
rdtscll(ret); rdtscll(ret);
return ret; return ret;
} }
#ifdef __cplusplus
}
#endif
#endif /* _URCU_ARCH_X86_H */ #endif /* _URCU_ARCH_X86_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 uatomic_arch.h   uatomic_arch.h 
skipping to change at line 26 skipping to change at line 26
* provided the above notices are retained, and a notice that the code was * provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice. * modified is included with the above copyright notice.
* *
* Code inspired from libuatomic_ops-1.2, inherited in part from the * Code inspired from libuatomic_ops-1.2, inherited in part from the
* Boehm-Demers-Weiser conservative garbage collector. * Boehm-Demers-Weiser conservative garbage collector.
*/ */
#include <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/system.h> #include <urcu/system.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __SIZEOF_LONG__ #ifndef __SIZEOF_LONG__
#if defined(__x86_64__) || defined(__amd64__) #if defined(__x86_64__) || defined(__amd64__)
#define __SIZEOF_LONG__ 8 #define __SIZEOF_LONG__ 8
#else #else
#define __SIZEOF_LONG__ 4 #define __SIZEOF_LONG__ 4
#endif #endif
#endif #endif
#ifndef BITS_PER_LONG #ifndef BITS_PER_LONG
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) #define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
skipping to change at line 479 skipping to change at line 483
UATOMIC_COMPAT(xchg(addr, v)) UATOMIC_COMPAT(xchg(addr, v))
#define uatomic_add_return(addr, v) \ #define uatomic_add_return(addr, v) \
UATOMIC_COMPAT(add_return(addr, v)) UATOMIC_COMPAT(add_return(addr, v))
#define uatomic_sub_return(addr, v) \ #define uatomic_sub_return(addr, v) \
UATOMIC_COMPAT(sub_return(addr, v)) UATOMIC_COMPAT(sub_return(addr, v))
#define uatomic_add(addr, v) UATOMIC_COMPAT(add(addr, v)) #define uatomic_add(addr, v) UATOMIC_COMPAT(add(addr, v))
#define uatomic_sub(addr, v) UATOMIC_COMPAT(sub(addr, v)) #define uatomic_sub(addr, v) UATOMIC_COMPAT(sub(addr, v))
#define uatomic_inc(addr) UATOMIC_COMPAT(inc(addr)) #define uatomic_inc(addr) UATOMIC_COMPAT(inc(addr))
#define uatomic_dec(addr) UATOMIC_COMPAT(dec(addr)) #define uatomic_dec(addr) UATOMIC_COMPAT(dec(addr))
#ifdef __cplusplus
}
#endif
#endif /* _URCU_ARCH_UATOMIC_X86_H */ #endif /* _URCU_ARCH_UATOMIC_X86_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-bp-static.h   urcu-bp-static.h 
skipping to change at line 51 skipping to change at line 51
#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.
*/ */
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* Active attempts to check for reader Q.S. before calling sleep(). * Active attempts to check for reader Q.S. before calling sleep().
*/ */
#define RCU_QS_ACTIVE_ATTEMPTS 100 #define RCU_QS_ACTIVE_ATTEMPTS 100
#ifdef DEBUG_RCU #ifdef DEBUG_RCU
#define rcu_assert(args...) assert(args) #define rcu_assert(args...) assert(args)
#else #else
#define rcu_assert(args...) #define rcu_assert(args...)
#endif #endif
skipping to change at line 197 skipping to change at line 201
static inline void _rcu_read_unlock(void) static inline void _rcu_read_unlock(void)
{ {
/* /*
* Finish using rcu before decrementing the pointer. * Finish using rcu before decrementing the pointer.
*/ */
smp_mb(); smp_mb();
_STORE_SHARED(urcu_reader->ctr, urcu_reader->ctr - RCU_GP_COUNT); _STORE_SHARED(urcu_reader->ctr, urcu_reader->ctr - RCU_GP_COUNT);
} }
#ifdef __cplusplus
}
#endif
#endif /* _URCU_BP_STATIC_H */ #endif /* _URCU_BP_STATIC_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-bp.h   urcu-bp.h 
skipping to change at line 45 skipping to change at line 45
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
/* /*
* See urcu-pointer.h and urcu-pointer-static.h for pointer publication hea ders. * See urcu-pointer.h and urcu-pointer-static.h for pointer publication hea ders.
*/ */
#include <urcu-pointer.h> #include <urcu-pointer.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* Important ! * Important !
* *
* Each thread containing read-side critical sections must be registered * Each thread containing read-side critical sections must be registered
* with rcu_register_thread() before calling rcu_read_lock(). * with rcu_register_thread() before calling rcu_read_lock().
* rcu_unregister_thread() should be called before the thread exits. * rcu_unregister_thread() should be called before the thread exits.
*/ */
#ifdef _LGPL_SOURCE #ifdef _LGPL_SOURCE
skipping to change at line 100 skipping to change at line 104
} }
static inline void rcu_unregister_thread(void) static inline void rcu_unregister_thread(void)
{ {
} }
static inline void urcu_init(void) static inline void urcu_init(void)
{ {
} }
#ifdef __cplusplus
}
#endif
#endif /* _URCU_BP_H */ #endif /* _URCU_BP_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-defer-static.h   urcu-defer-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 <urcu/compiler.h> #include <urcu/compiler.h>
#include <urcu/arch.h> #include <urcu/arch.h>
#include <urcu/uatomic_arch.h> #include <urcu/uatomic_arch.h>
#include <urcu/list.h> #include <urcu/list.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* 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.
* Use lowest bit to indicate that the current callback is changing. * Use lowest bit to indicate that the current callback is changing.
* Assumes that (void *)-2L is not used often. Used to encode non-aligned * Assumes that (void *)-2L is not used often. Used to encode non-aligned
skipping to change at line 129 skipping to change at line 133
unsigned long head; /* add element at head */ unsigned long head; /* add element at head */
void *last_fct_in; /* last fct pointer encoded */ void *last_fct_in; /* last fct pointer encoded */
unsigned long tail; /* next element to remove at tail */ unsigned long tail; /* next element to remove at tail */
void *last_fct_out; /* last fct pointer encoded */ void *last_fct_out; /* last fct pointer encoded */
void **q; void **q;
/* registry information */ /* registry information */
unsigned long last_head; unsigned long last_head;
struct list_head list; /* list of thread queues */ struct list_head list; /* list of thread queues */
}; };
#ifdef __cplusplus
}
#endif
#endif /* _URCU_DEFER_STATIC_H */ #endif /* _URCU_DEFER_STATIC_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-defer.h   urcu-defer.h 
skipping to change at line 35 skipping to change at line 35
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* 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
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* Note: the defer_rcu() API is currently EXPERIMENTAL. It may change in th e * Note: the defer_rcu() API is currently EXPERIMENTAL. It may change in th e
* future. * future.
* *
* Important ! * Important !
* *
* Each thread queuing memory reclamation must be registered with * Each thread queuing memory reclamation must be registered with
* rcu_defer_register_thread(). rcu_defer_unregister_thread() should be * rcu_defer_register_thread(). rcu_defer_unregister_thread() should be
* called before the thread exits. * called before the thread exits.
* *
skipping to change at line 67 skipping to change at line 71
#define call_rcu __error_call_rcu_not_implemented_please_use_defer_rc u #define call_rcu __error_call_rcu_not_implemented_please_use_defer_rc u
/* /*
* Thread registration for reclamation. * Thread registration for reclamation.
*/ */
extern void rcu_defer_register_thread(void); extern void rcu_defer_register_thread(void);
extern void rcu_defer_unregister_thread(void); extern void rcu_defer_unregister_thread(void);
extern void rcu_defer_barrier(void); extern void rcu_defer_barrier(void);
extern void rcu_defer_barrier_thread(void); extern void rcu_defer_barrier_thread(void);
#ifdef __cplusplus
}
#endif
#endif /* _URCU_BATCH_H */ #endif /* _URCU_BATCH_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-futex.h   urcu-futex.h 
skipping to change at line 26 skipping to change at line 26
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* 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
*/ */
#include <urcu/config.h> #include <urcu/config.h>
#ifdef __cplusplus
extern "C" {
#endif
#define FUTEX_WAIT 0 #define FUTEX_WAIT 0
#define FUTEX_WAKE 1 #define FUTEX_WAKE 1
/* /*
* sys_futex compatibility header. * sys_futex compatibility header.
* Use *only* *either of* futex_noasync OR futex_async on a given address. * Use *only* *either of* futex_noasync OR futex_async on a given address.
* *
* futex_noasync cannot be executed in signal handlers, but ensures that * futex_noasync cannot be executed in signal handlers, but ensures that
* it will be put in a wait queue even in compatibility mode. * it will be put in a wait queue even in compatibility mode.
* *
skipping to change at line 58 skipping to change at line 62
extern int compat_futex_noasync(int *uaddr, int op, int val, extern int compat_futex_noasync(int *uaddr, int op, int val,
const struct timespec *timeout, int *uaddr2, int val3); const struct timespec *timeout, int *uaddr2, int val3);
#define futex_noasync(uaddr, op, val, timeout, uaddr2, val3) \ #define futex_noasync(uaddr, op, val, timeout, uaddr2, val3) \
compat_futex_noasync(uaddr, op, val, timeout, uaddr2, val3) compat_futex_noasync(uaddr, op, val, timeout, uaddr2, val3)
extern int compat_futex_async(int *uaddr, int op, int val, extern int compat_futex_async(int *uaddr, int op, int val,
const struct timespec *timeout, int *uaddr2, int val3); const struct timespec *timeout, int *uaddr2, int val3);
#define futex_async(uaddr, op, val, timeout, uaddr2, val3) \ #define futex_async(uaddr, op, val, timeout, uaddr2, val3) \
compat_futex_async(uaddr, op, val, timeout, uaddr2, val3) compat_futex_async(uaddr, op, val, timeout, uaddr2, val3)
#endif #endif
#ifdef __cplusplus
}
#endif
#endif /* _URCU_FUTEX_H */ #endif /* _URCU_FUTEX_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-pointer-static.h   urcu-pointer-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 <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/uatomic_arch.h> #include <urcu/uatomic_arch.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* _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
* Alpha) and documents which pointers are protected by RCU. * Alpha) and documents which pointers are protected by RCU.
skipping to change at line 123 skipping to change at line 127
* Documents which pointers will be dereferenced by RCU read-side critical * Documents which pointers will be dereferenced by RCU read-side critical
* sections and adds the required memory barriers on architectures requirin g * sections and adds the required memory barriers on architectures requirin g
* them. It also makes sure the compiler does not reorder code initializing the * them. It also makes sure the compiler does not reorder code initializing the
* data structure before its publication. * data structure before its publication.
* *
* Should match rcu_dereference_pointer(). * Should match rcu_dereference_pointer().
*/ */
#define _rcu_assign_pointer(p, v) _rcu_set_pointer(&(p), v) #define _rcu_assign_pointer(p, v) _rcu_set_pointer(&(p), v)
#ifdef __cplusplus
}
#endif
#endif /* _URCU_POINTER_STATIC_H */ #endif /* _URCU_POINTER_STATIC_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-pointer.h   urcu-pointer.h 
skipping to change at line 33 skipping to change at line 33
* 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/uatomic_arch.h> #include <urcu/uatomic_arch.h>
#ifdef __cplusplus
extern "C" {
#endif
#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.
*/ */
skipping to change at line 110 skipping to change at line 114
/* /*
* rcu_assign_pointer(type *ptr, type *new) * rcu_assign_pointer(type *ptr, type *new)
* *
* Same as rcu_set_pointer, but takes the pointer to assign to rather than its * Same as rcu_set_pointer, but takes the pointer to assign to rather than its
* address as first parameter. Provided for compatibility with the Linux ke rnel * address as first parameter. Provided for compatibility with the Linux ke rnel
* RCU semantic. * RCU semantic.
*/ */
#define rcu_assign_pointer(p, v) rcu_set_pointer((&p), (v)) #define rcu_assign_pointer(p, v) rcu_set_pointer((&p), (v))
#ifdef __cplusplus
}
#endif
#endif /* _URCU_POINTER_H */ #endif /* _URCU_POINTER_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-qsbr-static.h   urcu-qsbr-static.h 
skipping to change at line 46 skipping to change at line 46
#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/uatomic_arch.h> #include <urcu/uatomic_arch.h>
#include <urcu/list.h> #include <urcu/list.h>
#include <urcu/urcu-futex.h> #include <urcu/urcu-futex.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* 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.
*/ */
/* /*
* If a reader is really non-cooperative and refuses to commit its * If a reader is really non-cooperative and refuses to commit its
skipping to change at line 213 skipping to change at line 217
smp_mb(); /* write urcu_reader.ctr before read futex */ smp_mb(); /* write urcu_reader.ctr before read futex */
wake_up_gp(); wake_up_gp();
} }
static inline void _rcu_thread_online(void) static inline void _rcu_thread_online(void)
{ {
_STORE_SHARED(urcu_reader.ctr, LOAD_SHARED(urcu_gp_ctr)); _STORE_SHARED(urcu_reader.ctr, LOAD_SHARED(urcu_gp_ctr));
smp_mb(); smp_mb();
} }
#ifdef __cplusplus
}
#endif
#endif /* _URCU_QSBR_STATIC_H */ #endif /* _URCU_QSBR_STATIC_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-qsbr.h   urcu-qsbr.h 
skipping to change at line 39 skipping to change at line 39
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
/* /*
* See urcu-pointer.h and urcu-pointer-static.h for pointer publication hea ders. * See urcu-pointer.h and urcu-pointer-static.h for pointer publication hea ders.
*/ */
#include <urcu-pointer.h> #include <urcu-pointer.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* Important ! * Important !
* *
* Each thread containing read-side critical sections must be registered * Each thread containing read-side critical sections must be registered
* with rcu_register_thread() before calling rcu_read_lock(). * with rcu_register_thread() before calling rcu_read_lock().
* rcu_unregister_thread() should be called before the thread exits. * rcu_unregister_thread() should be called before the thread exits.
*/ */
#ifdef _LGPL_SOURCE #ifdef _LGPL_SOURCE
skipping to change at line 117 skipping to change at line 121
#endif /* !_LGPL_SOURCE */ #endif /* !_LGPL_SOURCE */
extern void synchronize_rcu(void); extern void synchronize_rcu(void);
/* /*
* Reader thread registration. * Reader thread registration.
*/ */
extern void rcu_register_thread(void); extern void rcu_register_thread(void);
extern void rcu_unregister_thread(void); extern void rcu_unregister_thread(void);
#ifdef __cplusplus
}
#endif
#endif /* _URCU_QSBR_H */ #endif /* _URCU_QSBR_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu-static.h   urcu-static.h 
skipping to change at line 44 skipping to change at line 44
#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/uatomic_arch.h> #include <urcu/uatomic_arch.h>
#include <urcu/list.h> #include <urcu/list.h>
#include <urcu/urcu-futex.h> #include <urcu/urcu-futex.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* 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.
*/ */
/* /*
* The signal number used by the RCU library can be overridden with * The signal number used by the RCU library can be overridden with
skipping to change at line 240 skipping to change at line 244
reader_barrier(); reader_barrier();
_STORE_SHARED(urcu_reader.ctr, urcu_reader.ctr - RCU_GP_COUN T); _STORE_SHARED(urcu_reader.ctr, urcu_reader.ctr - RCU_GP_COUN T);
/* write urcu_reader.ctr before read futex */ /* write urcu_reader.ctr before read futex */
reader_barrier(); reader_barrier();
wake_up_gp(); wake_up_gp();
} else { } else {
_STORE_SHARED(urcu_reader.ctr, urcu_reader.ctr - RCU_GP_COUN T); _STORE_SHARED(urcu_reader.ctr, urcu_reader.ctr - RCU_GP_COUN T);
} }
} }
#ifdef __cplusplus
}
#endif
#endif /* _URCU_STATIC_H */ #endif /* _URCU_STATIC_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 urcu.h   urcu.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>
/* /*
* See urcu-pointer.h and urcu-pointer-static.h for pointer publication hea ders. * See urcu-pointer.h and urcu-pointer-static.h for pointer publication hea ders.
*/ */
#include <urcu-pointer.h> #include <urcu-pointer.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* Important ! * Important !
* *
* Each thread containing read-side critical sections must be registered * Each thread containing read-side critical sections must be registered
* with rcu_register_thread() before calling rcu_read_lock(). * with rcu_register_thread() before calling rcu_read_lock().
* rcu_unregister_thread() should be called before the thread exits. * rcu_unregister_thread() should be called before the thread exits.
*/ */
#ifdef _LGPL_SOURCE #ifdef _LGPL_SOURCE
skipping to change at line 95 skipping to change at line 99
* Reader thread registration. * Reader thread registration.
*/ */
extern void rcu_register_thread(void); extern void rcu_register_thread(void);
extern void rcu_unregister_thread(void); extern void rcu_unregister_thread(void);
/* /*
* Explicit urcu initialization, for "early" use within library constructor s. * Explicit urcu initialization, for "early" use within library constructor s.
*/ */
extern void urcu_init(void); extern void urcu_init(void);
#ifdef __cplusplus
}
#endif
#endif /* _URCU_H */ #endif /* _URCU_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 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/