X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=wrapper%2Frcu.h;h=b1877a49ea1429ba2d0ffe40241fa19e3cf964df;hb=477df04015836adb19017e31ee99c01a9b369ced;hp=2fc60b137814e66dd08455a92cc06673bbaca1f3;hpb=5a2f5e92e422d87a28581ba97e6b1789ff743bc6;p=lttng-modules.git diff --git a/wrapper/rcu.h b/wrapper/rcu.h index 2fc60b13..b1877a49 100644 --- a/wrapper/rcu.h +++ b/wrapper/rcu.h @@ -1,32 +1,18 @@ -#ifndef _LTTNG_WRAPPER_RCU_H -#define _LTTNG_WRAPPER_RCU_H - -/* +/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) + * * 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 #ifndef rcu_dereference_raw_notrace #define rcu_dereference_raw_notrace(p) rcu_dereference_raw(p) @@ -67,24 +53,4 @@ &pos->member != (head); \ pos = lttng_list_entry_rcu(pos->member.next, typeof(*pos), member)) -/** - * lttng_hlist_for_each_entry_rcu - iterate over rcu list of given type (for tracing) - * @pos: the type * to use as a loop cursor. - * @head: the head for your list. - * @member: the name of the hlist_node within the struct. - * - * This list-traversal primitive may safely run concurrently with - * the _rcu list-mutation primitives such as hlist_add_head_rcu() - * as long as the traversal is guarded by rcu_read_lock(). - * - * This is the same as hlist_for_each_entry_rcu() except that it does - * 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(lttng_hlist_first_rcu(head)), \ - typeof(*(pos)), member); \ - pos; \ - pos = lttng_hlist_entry_safe(lttng_rcu_dereference(lttng_hlist_next_rcu( \ - &(pos)->member)), typeof(*(pos)), member)) - #endif /* _LTTNG_WRAPPER_RCU_H */