libzypp  11.13.5
Mutex.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
11 #ifndef ZYPP_THREAD_MUTEX_H
12 #define ZYPP_THREAD_MUTEX_H
13 
14 #include "zypp/base/NonCopyable.h"
16 #include <pthread.h>
17 
19 namespace zypp
20 {
21 
22  namespace thread
23  {
24 
25 
26  typedef pthread_mutex_t RecursiveMutex_t;
27 
28 
30  //
31  // CLASS NAME : Mutex
32  //
36  {
37  public:
41  Mutex();
42 
45  ~Mutex();
46 
58  void lock();
59 
68  void unlock();
69 
79  bool trylock();
80 
81  private:
83  };
84 
85 
87  } // namespace thread
90 } // namespace zypp
92 
93 #endif // ZYPP_THREAD_MUTEX_H
94 /*
95 ** vim: set ts=2 sts=2 sw=2 ai et:
96 */