* [Linux-kernel-mentees] [PATCH] rculist.h: Add list_tail_rcu()
@ 2019-12-09 7:50 madhuparnabhowmik04
2019-12-09 18:33 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: madhuparnabhowmik04 @ 2019-12-09 7:50 UTC (permalink / raw)
To: paulmck, joel; +Cc: rcu, linux-kernel-mentees, linux-kernel
From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
This patch adds the macro list_tail_rcu() and document it.
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] rculist.h: Add list_tail_rcu()
2019-12-09 7:50 [Linux-kernel-mentees] [PATCH] rculist.h: Add list_tail_rcu() madhuparnabhowmik04
@ 2019-12-09 18:33 ` Paul E. McKenney
2019-12-09 19:30 ` Madhuparna Bhowmik
0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2019-12-09 18:33 UTC (permalink / raw)
To: madhuparnabhowmik04; +Cc: joel, rcu, linux-kernel-mentees, linux-kernel
On Mon, Dec 09, 2019 at 01:20:43PM +0530, madhuparnabhowmik04@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
>
> This patch adds the macro list_tail_rcu() and document it.
>
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] rculist.h: Add list_tail_rcu()
2019-12-09 18:33 ` Paul E. McKenney
@ 2019-12-09 19:30 ` Madhuparna Bhowmik
0 siblings, 0 replies; 3+ messages in thread
From: Madhuparna Bhowmik @ 2019-12-09 19:30 UTC (permalink / raw)
To: paulmck; +Cc: Joel Fernandes, rcu, linux-kernel-mentees, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1535 bytes --]
On Tue, Dec 10, 2019 at 12:03 AM Paul E. McKenney <paulmck@kernel.org>
wrote:
> On Mon, Dec 09, 2019 at 01:20:43PM +0530, madhuparnabhowmik04@gmail.com
> wrote:
> > From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> >
> > This patch adds the macro list_tail_rcu() and document it.
> >
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
>
> Queued with slight edits, thank you very much!
>
> Thank you!
Regards,
Madhuparna
> 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
> >
>
ᐧ
[-- Attachment #1.2: Type: text/html, Size: 2761 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-09 19:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 7:50 [Linux-kernel-mentees] [PATCH] rculist.h: Add list_tail_rcu() madhuparnabhowmik04
2019-12-09 18:33 ` Paul E. McKenney
2019-12-09 19:30 ` Madhuparna Bhowmik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).