Public headers: use SPDX identifiers
[userspace-rcu.git] / include / urcu / static / rculfqueue.h
index af73c6f2ef7565dc69e16f62d539ded7ed66d583..c0daffea78b5f1d2f2b65fb7baab205ae8da58dd 100644 (file)
@@ -1,35 +1,21 @@
+// SPDX-FileCopyrightText: 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
 #ifndef _URCU_RCULFQUEUE_STATIC_H
 #define _URCU_RCULFQUEUE_STATIC_H
 
 /*
- * rculfqueue-static.h
- *
  * Userspace RCU library - Lock-Free RCU Queue
  *
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See rculfqueue.h for linking
  * dynamically with the userspace rcu library.
- *
- * 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 <urcu-call-rcu.h>
+#include <urcu/assert.h>
 #include <urcu/uatomic.h>
 #include <urcu-pointer.h>
-#include <assert.h>
 #include <errno.h>
 
 #ifdef __cplusplus
@@ -66,8 +52,9 @@ struct cds_lfq_node_rcu *make_dummy(struct cds_lfq_queue_rcu *q,
 {
        struct cds_lfq_node_rcu_dummy *dummy;
 
-       dummy = malloc(sizeof(struct cds_lfq_node_rcu_dummy));
-       assert(dummy);
+       dummy = (struct cds_lfq_node_rcu_dummy *)
+               malloc(sizeof(struct cds_lfq_node_rcu_dummy));
+       urcu_posix_assert(dummy);
        dummy->parent.next = next;
        dummy->parent.dummy = 1;
        dummy->q = q;
@@ -87,7 +74,7 @@ void rcu_free_dummy(struct cds_lfq_node_rcu *node)
 {
        struct cds_lfq_node_rcu_dummy *dummy;
 
-       assert(node->dummy);
+       urcu_posix_assert(node->dummy);
        dummy = caa_container_of(node, struct cds_lfq_node_rcu_dummy, parent);
        dummy->q->queue_call_rcu(&dummy->head, free_dummy_cb);
 }
@@ -97,7 +84,7 @@ void free_dummy(struct cds_lfq_node_rcu *node)
 {
        struct cds_lfq_node_rcu_dummy *dummy;
 
-       assert(node->dummy);
+       urcu_posix_assert(node->dummy);
        dummy = caa_container_of(node, struct cds_lfq_node_rcu_dummy, parent);
        free(dummy);
 }
This page took 0.02486 seconds and 4 git commands to generate.