libutil++  1.9.3
 All Classes Functions Variables
AutoReadLock.h
1 /*
2 ** libutil++
3 ** $Id: AutoReadLock.h 1653 2016-02-28 19:54:59Z sella $
4 ** Copyright (c) 2011-2016 Digital Genesis, LLC. All Rights Reserved.
5 ** Released under the LGPL Version 2.1 License.
6 ** http://www.digitalgenesis.com
7 */
8 
9 #ifndef __libutilxx__sella__util__AutoReadLock_H__
10 #define __libutilxx__sella__util__AutoReadLock_H__
11 
12 #include "../../common.h"
13 
14 #include <pthread.h>
15 
16 namespace sella {
17  namespace util {
18  class AutoReadLock;
19  }
20 }
21 
23  friend class AutoWriteLock;
24 
25  public:
26  AutoReadLock(pthread_rwlock_t & lock) throw ();
27  ~AutoReadLock() throw ();
28 
29  private:
30  pthread_rwlock_t & lock;
31 };
32 
33 #endif
34 
35 /*
36 ** vim: noet ts=3 sw=3
37 */