X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Furcu%2Fref.h;h=e7ab5310aa5d4a2a4deff4f988cdc4bf5063d56c;hb=HEAD;hp=e546da567120e086e5773950ac135d510900b4fc;hpb=6893800a4d1cc14dff0395ddcd660a5138db183d;p=urcu.git diff --git a/include/urcu/ref.h b/include/urcu/ref.h index e546da5..408cfe2 100644 --- a/include/urcu/ref.h +++ b/include/urcu/ref.h @@ -1,23 +1,21 @@ +// SPDX-FileCopyrightText: 2009 Novell Inc. +// SPDX-FileCopyrightText: 2010 Mathieu Desnoyers +// +// 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 - * * Author: Jan Blunck - * - * 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 #include #include #include +#include #include 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); }