public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Trivial Patches <trivial@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linuxtronix.de>
Subject: [PATCH] Documentation: Fix inconsistent description of futex list_op_pending
Date: Mon, 1 Jun 2009 14:43:46 -0700	[thread overview]
Message-ID: <20090601214346.GN9285@us.ibm.com> (raw)

    Documentation: Fix inconsistent description of futex list_op_pending

    Strictly speaking list_op_pending points to the 'lock entry', not the
    'lock word' (which is actually at 'offset' from 'lock entry'). We can
    infer this based on reading the code in kernel/futex.c:

	    struct robust_list __user *entry, *next_entry, *pending;
		...
            if (fetch_robust_entry(&pending, &head->list_op_pending, &pip))
                    return;
            ...
            if (pending)
                    handle_futex_death((void __user *)pending + futex_offset,
                                       curr, pip);

    Which is also consistent with the rest of the docs on robust futex
    lists.

    Signed-off-by: Matt Helsley <matthltc@us.ibm.com>

diff --git a/Documentation/robust-futex-ABI.txt b/Documentation/robust-futex-ABI.txt
index 535f69f..fd1cd8a 100644
--- a/Documentation/robust-futex-ABI.txt
+++ b/Documentation/robust-futex-ABI.txt
@@ -135,7 +135,7 @@ manipulating this list), the user code must observe the following
 protocol on 'lock entry' insertion and removal:
 
 On insertion:
- 1) set the 'list_op_pending' word to the address of the 'lock word'
+ 1) set the 'list_op_pending' word to the address of the 'lock entry'
     to be inserted,
  2) acquire the futex lock,
  3) add the lock entry, with its thread id (TID) in the bottom 29 bits
@@ -143,7 +143,7 @@ On insertion:
  4) clear the 'list_op_pending' word.
 
 On removal:
- 1) set the 'list_op_pending' word to the address of the 'lock word'
+ 1) set the 'list_op_pending' word to the address of the 'lock entry'
     to be removed,
  2) remove the lock entry for this lock from the 'head' list,
  2) release the futex lock, and

                 reply	other threads:[~2009-06-01 21:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090601214346.GN9285@us.ibm.com \
    --to=matthltc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linuxtronix.de \
    --cc=trivial@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