Public headers: use SPDX identifiers
[userspace-rcu.git] / include / urcu / static / wfcqueue.h
index eae074323479bfc729ad8e06983a38b3407ec316..8c4729c532150f65c79da8f9d39d39933a450ff6 100644 (file)
@@ -1,36 +1,22 @@
+// SPDX-FileCopyrightText: 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+// SPDX-FileCopyrightText: 2011-2012 Lai Jiangshan <laijs@cn.fujitsu.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
 #ifndef _URCU_WFCQUEUE_STATIC_H
 #define _URCU_WFCQUEUE_STATIC_H
 
 /*
- * urcu/static/wfcqueue.h
- *
  * Userspace RCU library - Concurrent Queue with Wait-Free Enqueue/Blocking Dequeue
  *
  * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu/wfcqueue.h for
  * linking dynamically with the userspace rcu library.
- *
- * Copyright 2010-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * Copyright 2011-2012 - Lai Jiangshan <laijs@cn.fujitsu.com>
- *
- * 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
  */
 
 #include <pthread.h>
-#include <assert.h>
 #include <poll.h>
 #include <stdbool.h>
+#include <urcu/assert.h>
 #include <urcu/compiler.h>
 #include <urcu/uatomic.h>
 
@@ -104,7 +90,7 @@ static inline void _cds_wfcq_init(struct cds_wfcq_head *head,
        _cds_wfcq_node_init(&head->node);
        tail->p = &head->node;
        ret = pthread_mutex_init(&head->lock, NULL);
-       assert(!ret);
+       urcu_posix_assert(!ret);
 }
 
 /*
@@ -112,10 +98,10 @@ static inline void _cds_wfcq_init(struct cds_wfcq_head *head,
  * cds_wfcq_init().
  */
 static inline void _cds_wfcq_destroy(struct cds_wfcq_head *head,
-               struct cds_wfcq_tail *tail)
+               struct cds_wfcq_tail *tail __attribute__((unused)))
 {
        int ret = pthread_mutex_destroy(&head->lock);
-       assert(!ret);
+       urcu_posix_assert(!ret);
 }
 
 /*
@@ -158,21 +144,21 @@ static inline bool _cds_wfcq_empty(cds_wfcq_head_ptr_t u_head,
 }
 
 static inline void _cds_wfcq_dequeue_lock(struct cds_wfcq_head *head,
-               struct cds_wfcq_tail *tail)
+               struct cds_wfcq_tail *tail __attribute__((unused)))
 {
        int ret;
 
        ret = pthread_mutex_lock(&head->lock);
-       assert(!ret);
+       urcu_posix_assert(!ret);
 }
 
 static inline void _cds_wfcq_dequeue_unlock(struct cds_wfcq_head *head,
-               struct cds_wfcq_tail *tail)
+               struct cds_wfcq_tail *tail __attribute__((unused)))
 {
        int ret;
 
        ret = pthread_mutex_unlock(&head->lock);
-       assert(!ret);
+       urcu_posix_assert(!ret);
 }
 
 static inline bool ___cds_wfcq_append(cds_wfcq_head_ptr_t u_head,
@@ -331,7 +317,7 @@ ___cds_wfcq_first_nonblocking(cds_wfcq_head_ptr_t head,
 }
 
 static inline struct cds_wfcq_node *
-___cds_wfcq_next(cds_wfcq_head_ptr_t head,
+___cds_wfcq_next(cds_wfcq_head_ptr_t head __attribute__((unused)),
                struct cds_wfcq_tail *tail,
                struct cds_wfcq_node *node,
                int blocking)
This page took 0.024414 seconds and 4 git commands to generate.