X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Furcu%2Fstatic%2Furcu-qsbr.h;h=daa7ee2c31b6f7937f0e375d21deec556ad24593;hb=d3d3857f678627e7bbfb5a8d6f3bc15cd2a694d9;hp=a6063e2de2de78f1f7a0da84f004b790825ad118;hpb=4477a87021ffbfbfdb2a2084d05a084171343d36;p=userspace-rcu.git diff --git a/include/urcu/static/urcu-qsbr.h b/include/urcu/static/urcu-qsbr.h index a6063e2..daa7ee2 100644 --- a/include/urcu/static/urcu-qsbr.h +++ b/include/urcu/static/urcu-qsbr.h @@ -1,31 +1,17 @@ +// SPDX-FileCopyrightText: 2009 Mathieu Desnoyers +// SPDX-FileCopyrightText: 2009 Paul E. McKenney, IBM Corporation. +// +// SPDX-License-Identifier: LGPL-2.1-or-later + #ifndef _URCU_QSBR_STATIC_H #define _URCU_QSBR_STATIC_H /* - * urcu-qsbr-static.h - * * Userspace RCU QSBR header. * * TO BE INCLUDED ONLY IN CODE THAT IS TO BE RECOMPILED ON EACH LIBURCU * RELEASE. See urcu.h for linking dynamically with the userspace rcu library. * - * Copyright (c) 2009 Mathieu Desnoyers - * Copyright (c) 2009 Paul E. McKenney, IBM Corporation. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * * IBM's contributions to this file may be relicensed under LGPLv2 or later. */ @@ -35,6 +21,7 @@ #include #include +#include #include #include #include @@ -42,7 +29,6 @@ #include #include #include -#include #include #ifdef __cplusplus @@ -117,7 +103,7 @@ static inline enum urcu_state urcu_qsbr_reader_state(unsigned long *ctr) */ static inline void _urcu_qsbr_read_lock(void) { - urcu_assert(URCU_TLS(urcu_qsbr_reader).ctr); + urcu_assert_debug(URCU_TLS(urcu_qsbr_reader).ctr); } /* @@ -129,7 +115,7 @@ static inline void _urcu_qsbr_read_lock(void) */ static inline void _urcu_qsbr_read_unlock(void) { - urcu_assert(URCU_TLS(urcu_qsbr_reader).ctr); + urcu_assert_debug(URCU_TLS(urcu_qsbr_reader).ctr); } /* @@ -178,7 +164,7 @@ static inline void _urcu_qsbr_quiescent_state(void) { unsigned long gp_ctr; - urcu_assert(URCU_TLS(urcu_qsbr_reader).registered); + urcu_assert_debug(URCU_TLS(urcu_qsbr_reader).registered); if ((gp_ctr = CMM_LOAD_SHARED(urcu_qsbr_gp.ctr)) == URCU_TLS(urcu_qsbr_reader).ctr) return; _urcu_qsbr_quiescent_state_update_and_wakeup(gp_ctr); @@ -194,7 +180,7 @@ static inline void _urcu_qsbr_quiescent_state(void) */ static inline void _urcu_qsbr_thread_offline(void) { - urcu_assert(URCU_TLS(urcu_qsbr_reader).registered); + urcu_assert_debug(URCU_TLS(urcu_qsbr_reader).registered); cmm_smp_mb(); CMM_STORE_SHARED(URCU_TLS(urcu_qsbr_reader).ctr, 0); cmm_smp_mb(); /* write URCU_TLS(urcu_qsbr_reader).ctr before read futex */ @@ -212,7 +198,7 @@ static inline void _urcu_qsbr_thread_offline(void) */ static inline void _urcu_qsbr_thread_online(void) { - urcu_assert(URCU_TLS(urcu_qsbr_reader).registered); + urcu_assert_debug(URCU_TLS(urcu_qsbr_reader).registered); cmm_barrier(); /* Ensure the compiler does not reorder us with mutex */ _CMM_STORE_SHARED(URCU_TLS(urcu_qsbr_reader).ctr, CMM_LOAD_SHARED(urcu_qsbr_gp.ctr)); cmm_smp_mb();