rculfhash: make cds_lfht_iter_get_node argument const
[urcu.git] / include / urcu / list.h
index f3b867839030fb3ceeda4192f2c0f4c20b856971..f2d77bb067d0c0ff69342b2aea374cf62706c981 100644 (file)
@@ -1,25 +1,12 @@
+// SPDX-FileCopyrightText: 2002 Free Software Foundation, Inc.
+// SPDX-FileCopyrightText: 2009 Pierre-Marc Fournier
+// SPDX-FileCopyrightText: 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
 /*
 /*
- * Copyright (C) 2002 Free Software Foundation, Inc.
  * (originally part of the GNU C Library)
  * Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
  * (originally part of the GNU C Library)
  * Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
- *
- * Copyright (C) 2009 Pierre-Marc Fournier
- * Conversion to RCU list.
- * Copyright (C) 2010 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
  */
 
 #ifndef _CDS_LIST_H
  */
 
 #ifndef _CDS_LIST_H
@@ -46,7 +33,7 @@ struct cds_list_head {
 #define CDS_INIT_LIST_HEAD(ptr) \
        (ptr)->next = (ptr)->prev = (ptr)
 
 #define CDS_INIT_LIST_HEAD(ptr) \
        (ptr)->next = (ptr)->prev = (ptr)
 
-#define CDS_LIST_HEAD_INIT(name) { .prev = &(name), .next = &(name) }
+#define CDS_LIST_HEAD_INIT(name) { .next = &(name), .prev = &(name) }
 
 /* Add new element at the head of the list. */
 static inline
 
 /* Add new element at the head of the list. */
 static inline
@@ -101,7 +88,7 @@ void cds_list_move(struct cds_list_head *elem, struct cds_list_head *head)
 
 /* Replace an old entry. */
 static inline
 
 /* Replace an old entry. */
 static inline
-void cds_list_replace(struct cds_list_head *old, struct cds_list_head *_new)
+void cds_list_replace(const struct cds_list_head *old, struct cds_list_head *_new)
 {
        _new->next = old->next;
        _new->prev = old->prev;
 {
        _new->next = old->next;
        _new->prev = old->prev;
@@ -182,7 +169,7 @@ void cds_list_splice(struct cds_list_head *add, struct cds_list_head *head)
                 pos = (p), p = cds_list_entry((pos)->member.next, __typeof__(*(pos)), member))
 
 static inline
                 pos = (p), p = cds_list_entry((pos)->member.next, __typeof__(*(pos)), member))
 
 static inline
-int cds_list_empty(struct cds_list_head *head)
+int cds_list_empty(const struct cds_list_head *head)
 {
        return head == head->next;
 }
 {
        return head == head->next;
 }
This page took 0.024027 seconds and 4 git commands to generate.