Public headers: use SPDX identifiers
[userspace-rcu.git] / include / urcu / static / urcu-qsbr.h
index a6063e2de2de78f1f7a0da84f004b790825ad118..daa7ee2c31b6f7937f0e375d21deec556ad24593 100644 (file)
@@ -1,31 +1,17 @@
+// SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+// 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 <mathieu.desnoyers@efficios.com>
- * 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 <unistd.h>
 #include <stdint.h>
 
+#include <urcu/debug.h>
 #include <urcu/compiler.h>
 #include <urcu/arch.h>
 #include <urcu/system.h>
@@ -42,7 +29,6 @@
 #include <urcu/list.h>
 #include <urcu/futex.h>
 #include <urcu/tls-compat.h>
-#include <urcu/debug.h>
 #include <urcu/static/urcu-common.h>
 
 #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();
This page took 0.027802 seconds and 4 git commands to generate.