Monday 27 February 2012

Bounded-Buffer – Consumer Process


  item nextConsumed;
  while (1) {
  while (in == out)
  ; /* do nothing */
  nextConsumed = buffer[out];
  out = (out + 1) % BUFFER_SIZE;
  }

No comments:

Post a Comment