"Fossies" - the Fresh Open Source Software Archive

Member "postal-0.76/mutex.h" (21 Feb 2000, 301 Bytes) of package /linux/privat/postal-0.76.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 "mutex.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef MUTEX_H
    2 #define MUTEX_H
    3 
    4 #include <pthread.h>
    5 
    6 class Mutex
    7 {
    8 public:
    9 
   10   Mutex(bool fastMutex);
   11   ~Mutex();
   12 
   13   int get_mutex(bool block = true);
   14   int put_mutex();
   15 
   16 private:
   17   pthread_mutex_t m_mut;
   18 };
   19 
   20 class Lock
   21 {
   22 public:
   23   Lock(Mutex &mut);
   24 
   25   ~Lock();
   26 
   27 private:
   28   Mutex &m_mut;
   29 };
   30 
   31 #endif
   32