X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Furcu%2Flist.h;h=4bc88b3f22c505e0f83355d3919eff80fb3ac868;hb=HEAD;hp=8cfbd8462d97abe11b9ca5af9f80e0b15b221ab9;hpb=ce4a1f76adc73cda1ff7d4c98eb54bbd188faadf;p=urcu.git diff --git a/include/urcu/list.h b/include/urcu/list.h index 8cfbd84..f2d77bb 100644 --- a/include/urcu/list.h +++ b/include/urcu/list.h @@ -1,25 +1,12 @@ +// SPDX-FileCopyrightText: 2002 Free Software Foundation, Inc. +// SPDX-FileCopyrightText: 2009 Pierre-Marc Fournier +// SPDX-FileCopyrightText: 2010 Mathieu Desnoyers +// +// 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 , 2002. - * - * Copyright (C) 2009 Pierre-Marc Fournier - * Conversion to RCU list. - * Copyright (C) 2010 Mathieu Desnoyers - * - * 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 @@ -101,7 +88,7 @@ void cds_list_move(struct cds_list_head *elem, struct cds_list_head *head) /* 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; @@ -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 -int cds_list_empty(struct cds_list_head *head) +int cds_list_empty(const struct cds_list_head *head) { return head == head->next; }