projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5d3c07d
)
Clarification.
author
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 31 Dec 2004 07:06:14 +0000
(07:06 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 31 Dec 2004 07:06:14 +0000
(07:06 +0000)
doc/tour.texi
patch
|
blob
|
history
diff --git
a/doc/tour.texi
b/doc/tour.texi
index ed1f92be1bad527cdc7574371dc917a16f7b603b..845a1c8b6f68904eb3289ed532e93b065832d853 100644
(file)
--- a/
doc/tour.texi
+++ b/
doc/tour.texi
@@
-553,8
+553,10
@@
A semaphore initialized to 0 can be useful for waiting for an event
that will happen exactly once. For example, suppose thread @var{A}
starts another thread @var{B} and wants to wait for @var{B} to signal
that some activity is complete. @var{A} can create a semaphore
that will happen exactly once. For example, suppose thread @var{A}
starts another thread @var{B} and wants to wait for @var{B} to signal
that some activity is complete. @var{A} can create a semaphore
-initialized to 0, pass it to @var{B}, and then ``down'' the semaphore.
-When @var{B} finishes its activity, it ``ups'' the semaphore.
+initialized to 0, pass it to @var{B} as it starts it, and then
+``down'' the semaphore. When @var{B} finishes its activity, it
+``ups'' the semaphore. This works regardless of whether @var{A}
+``downs'' the semaphore or @var{B} ``ups'' it first.
Pintos declared its semaphore type and operations on them in
@file{threads/synch.h}.
Pintos declared its semaphore type and operations on them in
@file{threads/synch.h}.