Add `urcu_posix_assert()` as `assert()` replacement
[urcu.git] / include / urcu / ref.h
index e546da567120e086e5773950ac135d510900b4fc..e7ab5310aa5d4a2a4deff4f988cdc4bf5063d56c 100644 (file)
  * published by the Free  Software Foundation.
  */
 
  * published by the Free  Software Foundation.
  */
 
-#include <assert.h>
 #include <stdbool.h>
 #include <limits.h>
 #include <stdlib.h>
 #include <stdbool.h>
 #include <limits.h>
 #include <stdlib.h>
+#include <urcu/assert.h>
 #include <urcu/uatomic.h>
 
 struct urcu_ref {
 #include <urcu/uatomic.h>
 
 struct urcu_ref {
@@ -63,7 +63,7 @@ static inline void urcu_ref_put(struct urcu_ref *ref,
                                void (*release)(struct urcu_ref *))
 {
        long res = uatomic_sub_return(&ref->refcount, 1);
                                void (*release)(struct urcu_ref *))
 {
        long res = uatomic_sub_return(&ref->refcount, 1);
-       assert (res >= 0);
+       urcu_posix_assert(res >= 0);
        if (res == 0)
                release(ref);
 }
        if (res == 0)
                release(ref);
 }
This page took 0.02292 seconds and 4 git commands to generate.