mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Urs Thuermann <urs@isnogud.escape.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] RCU Documentation
Date: 04 Jul 2006 17:22:22 +0200	[thread overview]
Message-ID: <m2sllh8kep.fsf@janus.isnogud.escape.de> (raw)

Updater should use _rcu variant of list_del().


urs



Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>

--- linux-2.6.17/Documentation/RCU/whatisRCU.txt.orig
+++ linux-2.6.17/Documentation/RCU/whatisRCU.txt
@@ -677,8 +677,9 @@
 	+	spin_lock(&listmutex);
 		list_for_each_entry(p, head, lp) {
 			if (p->key == key) {
-				list_del(&p->list);
+	-			list_del(&p->list);
 	-			write_unlock(&listmutex);
+	+			list_del_rcu(&p->list);
 	+			spin_unlock(&listmutex);
 	+			synchronize_rcu();
 				kfree(p);
@@ -726,7 +727,7 @@
  5   write_lock(&listmutex);            5   spin_lock(&listmutex);
  6   list_for_each_entry(p, head, lp) { 6   list_for_each_entry(p, head, lp) {
  7     if (p->key == key) {             7     if (p->key == key) {
- 8       list_del(&p->list);            8       list_del(&p->list);
+ 8       list_del(&p->list);            8       list_del_rcu(&p->list);
  9       write_unlock(&listmutex);      9       spin_unlock(&listmutex);
                                        10       synchronize_rcu();
 10       kfree(p);                     11       kfree(p);

             reply	other threads:[~2006-07-04 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 15:22 Urs Thuermann [this message]
2006-07-05  6:12 ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2sllh8kep.fsf@janus.isnogud.escape.de \
    --to=urs@isnogud.escape.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®