+// 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 {
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);
}