projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
922af9e
)
Clarify condition on BUF_SIZE in monitor example.
author
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 21 Nov 2006 13:04:33 +0000
(13:04 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 21 Nov 2006 13:04:33 +0000
(13:04 +0000)
Thanks to Terje Mathiesen for pointing out this issue.
doc/reference.texi
patch
|
blob
|
history
diff --git
a/doc/reference.texi
b/doc/reference.texi
index 5e4db9e8fc482065383f73f5fe4bb7f7049b4571..3d7d9bcbd2bbb2df58152293f4b09173cb60aff4 100644
(file)
--- a/
doc/reference.texi
+++ b/
doc/reference.texi
@@
-844,6
+844,11
@@
char get (void) @{
@}
@end example
+Note that @code{BUF_SIZE} must divide evenly into @code{SIZE_MAX + 1}
+for the above code to be completely correct. Otherwise, it will fail
+the first time @code{head} wraps around to 0. In practice,
+@code{BUF_SIZE} would ordinarily be a power of 2.
+
@node Optimization Barriers
@subsection Optimization Barriers