diff options
author | Jan Altenberg <tb10alj@tglx.de> | 2006-10-01 02:28:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:24 -0400 |
commit | 9ba0bdfd040b2893bcddfec7165b545d22fc2dc7 (patch) | |
tree | c83c7eec1fede751cb53dceb5ea44a1d5609d782 /Documentation/rt-mutex-design.txt | |
parent | 710b8b5f4341e72a5f5f6fa58d1f73a0db64bf93 (diff) |
[PATCH] typo fixes for rt-mutex-design.txt
Address some simple typos in rt-mutex-design.txt It also changes the
indentation of the cmpxchg example (the cmpxchg example was indented by
spaces, while all other code snippets were indented by tabs).
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jan Altenberg <tb10alj@tglx.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/rt-mutex-design.txt')
-rw-r--r-- | Documentation/rt-mutex-design.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt index c472ffacc2f6..4b736d24da7a 100644 --- a/Documentation/rt-mutex-design.txt +++ b/Documentation/rt-mutex-design.txt | |||
@@ -333,11 +333,11 @@ cmpxchg is basically the following function performed atomically: | |||
333 | 333 | ||
334 | unsigned long _cmpxchg(unsigned long *A, unsigned long *B, unsigned long *C) | 334 | unsigned long _cmpxchg(unsigned long *A, unsigned long *B, unsigned long *C) |
335 | { | 335 | { |
336 | unsigned long T = *A; | 336 | unsigned long T = *A; |
337 | if (*A == *B) { | 337 | if (*A == *B) { |
338 | *A = *C; | 338 | *A = *C; |
339 | } | 339 | } |
340 | return T; | 340 | return T; |
341 | } | 341 | } |
342 | #define cmpxchg(a,b,c) _cmpxchg(&a,&b,&c) | 342 | #define cmpxchg(a,b,c) _cmpxchg(&a,&b,&c) |
343 | 343 | ||
@@ -582,7 +582,7 @@ contention). | |||
582 | try_to_take_rt_mutex is used every time the task tries to grab a mutex in the | 582 | try_to_take_rt_mutex is used every time the task tries to grab a mutex in the |
583 | slow path. The first thing that is done here is an atomic setting of | 583 | slow path. The first thing that is done here is an atomic setting of |
584 | the "Has Waiters" flag of the mutex's owner field. Yes, this could really | 584 | the "Has Waiters" flag of the mutex's owner field. Yes, this could really |
585 | be false, because if the the mutex has no owner, there are no waiters and | 585 | be false, because if the mutex has no owner, there are no waiters and |
586 | the current task also won't have any waiters. But we don't have the lock | 586 | the current task also won't have any waiters. But we don't have the lock |
587 | yet, so we assume we are going to be a waiter. The reason for this is to | 587 | yet, so we assume we are going to be a waiter. The reason for this is to |
588 | play nice for those architectures that do have CMPXCHG. By setting this flag | 588 | play nice for those architectures that do have CMPXCHG. By setting this flag |
@@ -735,7 +735,7 @@ do have CMPXCHG, that check is done in the fast path, but it is still needed | |||
735 | in the slow path too. If a waiter of a mutex woke up because of a signal | 735 | in the slow path too. If a waiter of a mutex woke up because of a signal |
736 | or timeout between the time the owner failed the fast path CMPXCHG check and | 736 | or timeout between the time the owner failed the fast path CMPXCHG check and |
737 | the grabbing of the wait_lock, the mutex may not have any waiters, thus the | 737 | the grabbing of the wait_lock, the mutex may not have any waiters, thus the |
738 | owner still needs to make this check. If there are no waiters than the mutex | 738 | owner still needs to make this check. If there are no waiters then the mutex |
739 | owner field is set to NULL, the wait_lock is released and nothing more is | 739 | owner field is set to NULL, the wait_lock is released and nothing more is |
740 | needed. | 740 | needed. |
741 | 741 | ||