For Students
Monday, 27 February 2012
Bounded-Buffer – Producer Process
item
nextProduced
;
while (1) {
while (((in + 1) % BUFFER_SIZE) == out)
; /* do nothing */
buffer[in] =
nextProduced
;
in = (in + 1) % BUFFER_SIZE;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment