X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=wrapper%2Frcu.h;h=c2f2115eddfc7ecedeeb50e0b84d5f4ea688abd7;hb=b2e8ba42a765741d1365fe39e3ad6c26690137b9;hp=d96d42d1de038e0ec9ae644332abb1d1e7627d2e;hpb=7a09dcb7df9caab5c867f39f53009e860b98accb;p=lttng-modules.git diff --git a/wrapper/rcu.h b/wrapper/rcu.h index d96d42d1..c2f2115e 100644 --- a/wrapper/rcu.h +++ b/wrapper/rcu.h @@ -1,32 +1,19 @@ -#ifndef _LTTNG_WRAPPER_RCU_H -#define _LTTNG_WRAPPER_RCU_H - -/* +/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) + * * wrapper/rcu.h * * wrapper around linux/rcupdate.h and linux/rculist.h. * * Copyright (C) 2014 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; only - * version 2.1 of the License. - * - * 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 _LTTNG_WRAPPER_RCU_H +#define _LTTNG_WRAPPER_RCU_H + #include #include #include -#include "list.h" +#include #ifndef rcu_dereference_raw_notrace #define rcu_dereference_raw_notrace(p) rcu_dereference_raw(p) @@ -81,10 +68,10 @@ * not do any RCU debugging or tracing. */ #define lttng_hlist_for_each_entry_rcu(pos, head, member) \ - for (pos = lttng_hlist_entry_safe (lttng_rcu_dereference(hlist_first_rcu(head)), \ + for (pos = lttng_hlist_entry_safe (lttng_rcu_dereference(lttng_hlist_first_rcu(head)), \ typeof(*(pos)), member); \ pos; \ - pos = lttng_hlist_entry_safe(lttng_rcu_dereference(hlist_next_rcu( \ + pos = lttng_hlist_entry_safe(lttng_rcu_dereference(lttng_hlist_next_rcu( \ &(pos)->member)), typeof(*(pos)), member)) #endif /* _LTTNG_WRAPPER_RCU_H */