Public headers: use SPDX identifiers
[userspace-rcu.git] / include / urcu / static / wfstack.h
index bd7ba688e31c4964d854c9f612b4b0f70377081b..8c5648ea3ede060ddc4c2d4ddfe244faf6ece5bc 100644 (file)
@@ -1,29 +1,15 @@
+// SPDX-FileCopyrightText: 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
 #ifndef _URCU_STATIC_WFSTACK_H
 #define _URCU_STATIC_WFSTACK_H
 
 /*
- * urcu/static/wfstack.h
- *
  * Userspace RCU library - Stack with with wait-free push, blocking traversal.
  *
  * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu/wfstack.h for
  * linking dynamically with the userspace rcu library.
- *
- * Copyright 2010-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.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>
@@ -37,7 +23,7 @@
 extern "C" {
 #endif
 
-#define CDS_WFS_END                    ((void *) 0x1UL)
+#define CDS_WFS_END                    ((struct cds_wfs_head *) 0x1UL)
 #define CDS_WFS_ADAPT_ATTEMPTS         10      /* Retry if being set */
 #define CDS_WFS_WAIT                   10      /* Wait 10 ms if being set */
 
@@ -345,9 +331,11 @@ struct cds_wfs_node *
 _cds_wfs_pop_with_state_blocking(struct cds_wfs_stack *s, int *state)
 {
        struct cds_wfs_node *retnode;
+       cds_wfs_stack_ptr_t stack;
 
        _cds_wfs_pop_lock(s);
-       retnode = ___cds_wfs_pop_with_state_blocking(s, state);
+       stack.s = s;
+       retnode = ___cds_wfs_pop_with_state_blocking(stack, state);
        _cds_wfs_pop_unlock(s);
        return retnode;
 }
@@ -370,9 +358,11 @@ struct cds_wfs_head *
 _cds_wfs_pop_all_blocking(struct cds_wfs_stack *s)
 {
        struct cds_wfs_head *rethead;
+       cds_wfs_stack_ptr_t stack;
 
        _cds_wfs_pop_lock(s);
-       rethead = ___cds_wfs_pop_all(s);
+       stack.s = s;
+       rethead = ___cds_wfs_pop_all(stack);
        _cds_wfs_pop_unlock(s);
        return rethead;
 }
This page took 0.023395 seconds and 4 git commands to generate.