X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-defer-static.h;h=a00ced033b6cc44fcf9b9e02d66cfbc54081e705;hp=7d0ed52cf88b624d5a236a5a35c3d1f8920ef661;hb=13ba7e6d703b58b0c9d9d872e12930385af087a8;hpb=804b437535f97b519db3e8715807950f5818cf27 diff --git a/urcu-defer-static.h b/urcu-defer-static.h index 7d0ed52..a00ced0 100644 --- a/urcu-defer-static.h +++ b/urcu-defer-static.h @@ -150,9 +150,7 @@ static inline void _rcu_defer_queue(void (*fct)(void *p), void *p) assert(head - LOAD_SHARED(defer_queue.tail) == 0); } - smp_wmb(); /* Publish new pointer before write q[] */ if (unlikely(defer_queue.last_fct_in != fct)) { - //printf("fct diff %p %p\n", defer_queue.last_fct, fct); defer_queue.last_fct_in = fct; if (unlikely(DQ_IS_FCT_BIT(fct) || fct == DQ_FCT_MARK)) { /* @@ -170,7 +168,6 @@ static inline void _rcu_defer_queue(void (*fct)(void *p), void *p) fct); } } else { - //printf("fct same %p\n", fct); if (unlikely(DQ_IS_FCT_BIT(p) || p == DQ_FCT_MARK)) { /* * If the data to encode is not aligned or the marker, @@ -183,7 +180,8 @@ static inline void _rcu_defer_queue(void (*fct)(void *p), void *p) } } _STORE_SHARED(defer_queue.q[head++ & DEFER_QUEUE_MASK], p); - smp_wmb(); /* Write q[] before head. */ + smp_wmb(); /* Publish new pointer before head */ + /* Write q[] before head. */ STORE_SHARED(defer_queue.head, head); }