X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu.h;h=9431da547bfcc8245d07969de426ac33c7fe3d2d;hp=673f7952c3f254b79f6f157188b8b812f569fd41;hb=f5f51ac3ef3e0db8a0940c456bce22bc9000fdbf;hpb=b257a10b0b05064dcb5dc9d4d1c5f95c0364b9dd diff --git a/urcu.h b/urcu.h index 673f795..9431da5 100644 --- a/urcu.h +++ b/urcu.h @@ -8,6 +8,12 @@ * * Copyright February 2009 - Mathieu Desnoyers * + * Credits for Paul e. McKenney + * for inspiration coming from the Linux kernel RCU and rcu-preempt. + * + * The barrier, mb, rmb, wmb, atomic_inc, smp_read_barrier_depends, ACCESS_ONCE + * and rcu_dereference primitives come from the Linux kernel. + * * Distributed under GPLv2 */ @@ -19,9 +25,6 @@ #define rmb() asm volatile("lfence":::"memory") #define wmb() asm volatile("sfence" ::: "memory") - - -/* x86 32 */ static inline void atomic_inc(int *v) { asm volatile("lock; incl %0" @@ -107,6 +110,6 @@ extern void *urcu_publish_content(void **ptr, void *new); * Reader thread registration. */ extern void urcu_register_thread(void); -extern void urcu_register_thread(void); +extern void urcu_unregister_thread(void); #endif /* _URCU_H */