提交 992d7ced 编写于 作者: M Ming Lei 提交者: Ingo Molnar

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: NMing Lei <tom.leiming@gmail.com>
LKML-Reference: <1240585806-5744-1-git-send-email-tom.leiming@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 b48ccb09
...@@ -54,9 +54,9 @@ locking error messages, inside curlies. A contrived example: ...@@ -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 The bit position indicates STATE, STATE-read, for each of the states listed
above, and the character displayed in each indicates: above, and the character displayed in each indicates:
'.' acquired while irqs disabled '.' acquired while irqs disabled and not in irq context
'+' acquired in irq context '-' acquired in irq context
'-' acquired with irqs enabled '+' acquired with irqs enabled
'?' acquired in irq context with irqs enabled. '?' acquired in irq context with irqs enabled.
Unused mutexes cannot be part of the cause of an error. Unused mutexes cannot be part of the cause of an error.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册