static</span> <span class="keywordtype">int</span> produced;
  
  <a class="code" href="a00014.html#g2ffbb9e554e08a343ae2f9de4bedfdfc">PT_BEGIN</a>(pt);
  
  <span class="keywordflow">for</span>(produced = 0; produced &lt; NUM_ITEMS; ++produced) {
  
    <a class="code" href="a00016.html#g386ff87a52a840512906f2940e229e2e">PT_SEM_WAIT</a>(pt, &amp;full);
    
    add_to_buffer(produce_item());
    
    <a class="code" href="a00016.html#g1eaaf4d9d75e24582acc6440d7085f19">PT_SEM_SIGNAL</a>(pt, &amp;e