* [PATCH] Documentation:lockdep-design: fix note of state bits
@ 2009-04-24 15:10 tom.leiming
2009-04-26 16:42 ` [tip:core/urgent] locking: Documentation: lockdep-design.txt, " tip-bot for Ming Lei
0 siblings, 1 reply; 2+ messages in thread
From: tom.leiming @ 2009-04-24 15:10 UTC (permalink / raw)
To: mingo, akpm; +Cc: linux-kernel, Ming Lei
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* [tip:core/urgent] locking: Documentation: lockdep-design.txt, fix note of state bits
2009-04-24 15:10 [PATCH] Documentation:lockdep-design: fix note of state bits tom.leiming
@ 2009-04-26 16:42 ` tip-bot for Ming Lei
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Ming Lei @ 2009-04-26 16:42 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, tom.leiming, mingo
Commit-ID: 992d7ced75322307035a0e94074eb7188612a680
Gitweb: http://git.kernel.org/tip/992d7ced75322307035a0e94074eb7188612a680
Author: Ming Lei <tom.leiming@gmail.com>
AuthorDate: Fri, 24 Apr 2009 23:10:06 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 26 Apr 2009 18:21:24 +0200
locking: Documentation: lockdep-design.txt, fix note of state bits
>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>
LKML-Reference: <1240585806-5744-1-git-send-email-tom.leiming@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-26 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-24 15:10 [PATCH] Documentation:lockdep-design: fix note of state bits tom.leiming
2009-04-26 16:42 ` [tip:core/urgent] locking: Documentation: lockdep-design.txt, " tip-bot for Ming Lei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox