OpenRTM
1.0.0
メインページ
ネームスペース
クラス
ファイル
ファイル一覧
ファイルメンバ
tmp
buildd
ros-hydro-openrtm-aist-1.1.0-13quantal-20150213-1351
src
lib
coil
include
coil
Mutex.h
説明を見る。
1
// -*- C++ -*-
20
#ifndef COIL_MUTEX_H
21
#define COIL_MUTEX_H
22
23
#include <pthread.h>
24
25
namespace
coil
26
{
40
class
Mutex
41
{
42
public
:
62
Mutex
(
const
char
*
const
name = 0)
63
{
64
::pthread_mutex_init(&
mutex_
, 0);
65
}
66
82
~Mutex
()
83
{
84
::pthread_mutex_destroy(&
mutex_
);
85
}
86
102
inline
void
lock
()
103
{
104
::pthread_mutex_lock(&
mutex_
);
105
}
106
122
inline
bool
trylock
()
123
{
124
return ::pthread_mutex_trylock(&
mutex_
);
125
}
126
142
inline
void
unlock
()
143
{
144
::pthread_mutex_unlock(&
mutex_
);
145
}
146
158
pthread_mutex_t
mutex_
;
159
160
private
:
161
Mutex
(
const
Mutex
&);
162
Mutex
& operator=(
const
Mutex
&);
163
};
164
};
165
#endif // COIL_MUTEX_H
OpenRTMに対してFri Feb 13 2015 13:58:06に生成されました。
1.8.1.2