Creating a counting semaphore

To create a counting semaphore:

      long count = value;                 // value must be >= 0
      // local counting semaphore
      TLocalCountingSemaphore* localCountingSem = new TLocalCountingSemaphore(count);
      // global counting semaphore
      TGlobalCountingSemaphoreHandle* globalCountingSem = 
          new TGlobalCountingSemaphoreHandle(count);

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker