home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_01 / yuen / csemq.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-10  |  406 b   |  27 lines

  1. #ifndef __CSEMQ
  2. #define __CSEMQ
  3.  
  4. enum csemq_type {CST_COUNT, CST_QUEUE};
  5. const int CSC_NO_THREAD = 31;
  6. const long CSC_IDLE = 0x80000000L;
  7.  
  8. class Csemq
  9. {
  10. private:
  11.   long sem;
  12.   int priority;
  13.   
  14.   Csemq();
  15.   Csemq(long lValue);
  16.   int Dequeue();
  17.   void Enqueue(int nThread);
  18.   void UpdateCount(long lValue);
  19.   csemq_type GetType();
  20.   long GetCount();
  21.   
  22.   friend Cschlr;
  23. };
  24.  
  25.  
  26. #endif
  27.