From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F5E4C00454 for ; Mon, 9 Dec 2019 18:33:17 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D27062077B for ; Mon, 9 Dec 2019 18:33:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ysYVaXkQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D27062077B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E7C36860C8; Mon, 9 Dec 2019 18:33:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F553RiQXQK3W; Mon, 9 Dec 2019 18:33:15 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6305A85DC1; Mon, 9 Dec 2019 18:33:15 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4AD0DC1796; Mon, 9 Dec 2019 18:33:15 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 98F78C0881 for ; Mon, 9 Dec 2019 18:33:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 927F58771C for ; Mon, 9 Dec 2019 18:33:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9UUV-fQfYrGb for ; Mon, 9 Dec 2019 18:33:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by whitealder.osuosl.org (Postfix) with ESMTPS id 117918770C for ; Mon, 9 Dec 2019 18:33:14 +0000 (UTC) Received: from paulmck-ThinkPad-P72.home (unknown [199.201.64.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DB4742077B; Mon, 9 Dec 2019 18:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575916393; bh=PzahWwtA6K6WkU342K07lvpv8VhPjHQjg5sJaUv03vk=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=ysYVaXkQCshut8JuLNzNQJ9tT7W/P39aAhGL2xDQd8zB5xnMDtfNmSWWJK1ber59S qaseNdO03e+O5jyuijIF3Vvj9xFcgXFbrao+2sjlOBXfkfRNlqlvmz1aQtt5fJepal IZcv9jE+9Wsn+N4+1m3Qfp9/+TZPAch3LGqZQ6hI= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 62AD43522769; Mon, 9 Dec 2019 10:33:13 -0800 (PST) Date: Mon, 9 Dec 2019 10:33:13 -0800 From: "Paul E. McKenney" To: madhuparnabhowmik04@gmail.com Message-ID: <20191209183313.GL2889@paulmck-ThinkPad-P72> References: <20191209075043.17947-1-madhuparnabhowmik04@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191209075043.17947-1-madhuparnabhowmik04@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Cc: joel@joelfernandes.org, rcu@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH] rculist.h: Add list_tail_rcu() X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: paulmck@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On Mon, Dec 09, 2019 at 01:20:43PM +0530, madhuparnabhowmik04@gmail.com wrote: > From: Madhuparna Bhowmik > > This patch adds the macro list_tail_rcu() and document it. > > Signed-off-by: Madhuparna Bhowmik Queued with slight edits, thank you very much! Thanx, Paul > --- > include/linux/rculist.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/linux/rculist.h b/include/linux/rculist.h > index 4b7ae1bf50b3..9f21efa525ab 100644 > --- a/include/linux/rculist.h > +++ b/include/linux/rculist.h > @@ -40,6 +40,16 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list) > */ > #define list_next_rcu(list) (*((struct list_head __rcu **)(&(list)->next))) > > +/** > + * list_tail_rcu - returns the prev pointer of the head of the list > + * @head: the head of the list > + * > + * Note: This should only be used with the list header, > + * but only if list_del() and similar primitives are not > + * also used on the list header. > + */ > +#define list_tail_rcu(head) (*((struct list_head __rcu **)(&(head)->prev))) > + > /* > * Check during list traversal that we are within an RCU reader > */ > -- > 2.17.1 > _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees