"Fossies" - the Fresh Open Source Software Archive

Member "bonnie++-2.00a/sync.h" (11 Jan 2001, 327 Bytes) of package /linux/privat/bonnie++-2.00a.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "sync.h" see the Fossies "Dox" file reference documentation.

    1 #include "semaphore.h"
    2 
    3 typedef enum
    4 {
    5   eSem, ePrompt, eNone
    6 } SYNC_TYPE;
    7 
    8 class Sync : public Semaphore
    9 {
   10 public:
   11   Sync(SYNC_TYPE type, int semKey = 0, int num_tests = 0);
   12 
   13   int decrement_and_wait(int nr_sem);
   14 
   15   // get the handle to a semaphore set previously created
   16   int get_semid();
   17 
   18 private:
   19   SYNC_TYPE m_type;
   20 
   21 };
   22