X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-qsbr-static.h;h=041361799b89694b8f9e8c9f7af0d142d040a44e;hp=8822e050bac8aaa00a8c210dfb122193f2e90280;hb=eaf2c3f4b9041d2a6a85d7f9e56f6014603367d4;hpb=18c3778a6e548f0926cada96db00f8da7cc81454 diff --git a/urcu-qsbr-static.h b/urcu-qsbr-static.h index 8822e05..0413617 100644 --- a/urcu-qsbr-static.h +++ b/urcu-qsbr-static.h @@ -9,7 +9,7 @@ * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu-qsbr.h for linking * dynamically with the userspace rcu QSBR 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 @@ -155,23 +155,13 @@ static inline void wake_up_gp(void) } } -#if (BITS_PER_LONG < 64) static inline int rcu_gp_ongoing(unsigned long *ctr) { unsigned long v; v = LOAD_SHARED(*ctr); - return v && ((v ^ rcu_gp_ctr) & RCU_GP_CTR); + return v && (v != rcu_gp_ctr); } -#else /* !(BITS_PER_LONG < 64) */ -static inline int rcu_gp_ongoing(unsigned long *ctr) -{ - unsigned long v; - - v = LOAD_SHARED(*ctr); - return v && (v - rcu_gp_ctr > ULONG_MAX / 2); -} -#endif /* !(BITS_PER_LONG < 64) */ static inline void _rcu_read_lock(void) {