X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Furcu%2Fstatic%2Flfstack.h;h=75db75ea3652adc37dea3835a89c1a03d1cfdb6b;hb=d3d3857f678627e7bbfb5a8d6f3bc15cd2a694d9;hp=6c82b42c0ef9922b2c3c5ee9cdc1cca3feb69b14;hpb=014775106c60f02818ca755b331f887030bd440f;p=userspace-rcu.git diff --git a/include/urcu/static/lfstack.h b/include/urcu/static/lfstack.h index 6c82b42..75db75e 100644 --- a/include/urcu/static/lfstack.h +++ b/include/urcu/static/lfstack.h @@ -1,29 +1,15 @@ +// SPDX-FileCopyrightText: 2010-2012 Mathieu Desnoyers +// +// SPDX-License-Identifier: LGPL-2.1-or-later + #ifndef _URCU_STATIC_LFSTACK_H #define _URCU_STATIC_LFSTACK_H /* - * urcu/static/lfstack.h - * * Userspace RCU library - Lock-Free Stack * - * Copyright 2010-2012 - Mathieu Desnoyers - * * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu/lfstack.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 @@ -289,9 +275,11 @@ struct cds_lfs_node * _cds_lfs_pop_blocking(struct cds_lfs_stack *s) { struct cds_lfs_node *retnode; + cds_lfs_stack_ptr_t stack; _cds_lfs_pop_lock(s); - retnode = ___cds_lfs_pop(s); + stack.s = s; + retnode = ___cds_lfs_pop(stack); _cds_lfs_pop_unlock(s); return retnode; } @@ -304,9 +292,11 @@ struct cds_lfs_head * _cds_lfs_pop_all_blocking(struct cds_lfs_stack *s) { struct cds_lfs_head *rethead; + cds_lfs_stack_ptr_t stack; _cds_lfs_pop_lock(s); - rethead = ___cds_lfs_pop_all(s); + stack.s = s; + rethead = ___cds_lfs_pop_all(stack); _cds_lfs_pop_unlock(s); return rethead; }