From: tom.leiming@gmail.com
To: mingo@elte.hu, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, Ming Lei <tom.leiming@gmail.com>
Subject: [PATCH] Documentation:lockdep-design: fix note of state bits
Date: Fri, 24 Apr 2009 23:10:06 +0800 [thread overview]
Message-ID: <1240585806-5744-1-git-send-email-tom.leiming@gmail.com> (raw)
From: Ming Lei <tom.leiming@gmail.com>
>From source code of get_usage_char(), the previous note is not correct,
so fix it.
static char get_usage_char(struct lock_class *class, enum lock_usage_bit bit)
{
char c = '.';
if (class->usage_mask & lock_flag(bit + 2))/*LOCK_ENABLED_##STATE*/
c = '+';
if (class->usage_mask & lock_flag(bit)) {/*LOCK_USED_IN_##STATE*/
c = '-';
if (class->usage_mask & lock_flag(bit + 2))
c = '?';
}
return c;
}
note:
1),The 'bit' parameter always is passed as LOCK_USED_IN_##STATE
or LOCK_USED_IN_##STATE_READ , from get_usage_chars().
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
Documentation/lockdep-design.txt | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/lockdep-design.txt b/Documentation/lockdep-design.txt
index 938ea22..e20d913 100644
--- a/Documentation/lockdep-design.txt
+++ b/Documentation/lockdep-design.txt
@@ -54,9 +54,9 @@ locking error messages, inside curlies. A contrived example:
The bit position indicates STATE, STATE-read, for each of the states listed
above, and the character displayed in each indicates:
- '.' acquired while irqs disabled
- '+' acquired in irq context
- '-' acquired with irqs enabled
+ '.' acquired while irqs disabled and not in irq context
+ '-' acquired in irq context
+ '+' acquired with irqs enabled
'?' acquired in irq context with irqs enabled.
Unused mutexes cannot be part of the cause of an error.
--
1.6.0.GIT
next reply other threads:[~2009-04-24 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-24 15:10 tom.leiming [this message]
2009-04-26 16:42 ` [tip:core/urgent] locking: Documentation: lockdep-design.txt, fix note of state bits tip-bot for Ming Lei
-- strict thread matches above, loose matches on Subject: below --
2009-04-24 15:08 [PATCH] Documentation:lockdep-design: " tom.leiming
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=1240585806-5744-1-git-send-email-tom.leiming@gmail.com \
--to=tom.leiming@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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