cpp-pthread
(v1.7.3)
Simple C++ wrapper to pthread functions.
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Modules
Pages
include
pthread
read_write_lock.hpp
1
//
2
// read_write_lock.hpp
3
// read_write_lock
4
//
5
// Created by herbert koelman on 18/03/2016.
6
//
7
//
8
9
#ifndef pthread_read_write_lock_hpp
10
#define pthread_read_write_lock_hpp
11
12
// must be include as first hearder file of each source code file (see IBM's
13
// recommandation for more info p.285 ยง8.3.1).
14
#include <pthread.h>
15
16
#include "pthread/config.h"
17
#include "pthread/exceptions.hpp"
18
19
20
namespace
pthread
{
21
36
class
read_lock
{
37
public
:
38
44
void
lock
();
45
51
void
try_lock
();
52
56
void
unlock
();
57
58
62
virtual
~read_lock
();
63
64
protected
:
65
74
read_lock
();
75
77
pthread_rwlock_t
_rwlock
;
78
};
79
85
class
write_lock
:
public
read_lock
{
86
public
:
92
void
lock
();
93
99
void
try_lock
();
100
109
write_lock
();
110
114
virtual
~write_lock
();
115
116
};
117
139
typedef
write_lock
read_write_lock
;
140
142
}
// namespace pthread
143
144
#endif
/* pthread_read_write_lock_H */
pthread::write_lock::write_lock
write_lock()
Definition:
read_write_lock.cpp:21
pthread::write_lock::~write_lock
virtual ~write_lock()
Definition:
read_write_lock.cpp:26
pthread::read_lock::lock
void lock()
Definition:
read_write_lock.cpp:32
pthread::read_lock::try_lock
void try_lock()
Definition:
read_write_lock.cpp:39
pthread::write_lock
Definition:
read_write_lock.hpp:85
pthread::read_lock
Definition:
read_write_lock.hpp:36
pthread::read_lock::unlock
void unlock()
Definition:
read_write_lock.cpp:46
pthread::read_lock::~read_lock
virtual ~read_lock()
Definition:
read_write_lock.cpp:60
pthread::read_lock::read_lock
read_lock()
Definition:
read_write_lock.cpp:53
pthread::read_write_lock
write_lock read_write_lock
Definition:
read_write_lock.hpp:139
pthread::read_lock::_rwlock
pthread_rwlock_t _rwlock
Definition:
read_write_lock.hpp:77
pthread::write_lock::lock
void lock()
Definition:
read_write_lock.cpp:7
pthread
Definition:
condition_variable.hpp:22
pthread::write_lock::try_lock
void try_lock()
Definition:
read_write_lock.cpp:14
Generated by
1.8.8