X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-qsbr-static.h;h=147eb18b94357ee885216d3db65f252d54143944;hp=041361799b89694b8f9e8c9f7af0d142d040a44e;hb=42a3f1f99827c1bd73270966d4fffd6157809a7c;hpb=04e3eaa936284a9dbaa220295771b75aba54926e diff --git a/urcu-qsbr-static.h b/urcu-qsbr-static.h index 0413617..147eb18 100644 --- a/urcu-qsbr-static.h +++ b/urcu-qsbr-static.h @@ -187,10 +187,12 @@ static inline void _rcu_thread_offline(void) STORE_SHARED(rcu_reader.ctr, 0); smp_mb(); /* write rcu_reader.ctr before read futex */ wake_up_gp(); + barrier(); /* Ensure the compiler does not reorder us with mutex */ } static inline void _rcu_thread_online(void) { + barrier(); /* Ensure the compiler does not reorder us with mutex */ _STORE_SHARED(rcu_reader.ctr, LOAD_SHARED(rcu_gp_ctr)); smp_mb(); }