fix: handle EINTR correctly in get_cpu_mask_from_sysfs
[urcu.git] / include / urcu / ref.h
index e546da567120e086e5773950ac135d510900b4fc..408cfe2cfd409bada17a79364631fd72535b315f 100644 (file)
@@ -1,23 +1,21 @@
+// SPDX-FileCopyrightText: 2009 Novell Inc.
+// SPDX-FileCopyrightText: 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-only
+
 #ifndef _URCU_REF_H
 #define _URCU_REF_H
 
 /*
  * Userspace RCU - Reference counting
  *
- * Copyright (C) 2009 Novell Inc.
- * Copyright (C) 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * Author: Jan Blunck <jblunck@suse.de>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free  Software Foundation.
  */
 
-#include <assert.h>
 #include <stdbool.h>
 #include <limits.h>
 #include <stdlib.h>
+#include <urcu/assert.h>
 #include <urcu/uatomic.h>
 
 struct urcu_ref {
@@ -63,7 +61,7 @@ static inline void urcu_ref_put(struct urcu_ref *ref,
                                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);
 }
This page took 0.022656 seconds and 4 git commands to generate.