top
|
up
|
prev
|
next
LockGuard Class
Definition at line
36
of
Mutex.hpp
Constructors
LockGuard
(
Mutex
& mtx_,
MutexOwner
& owner_)
Member Functions
void
Lock
()
void
Unlock
()
Member Variables
bool
locked
Mutex
&
mtx
MutexOwner
&
owner
Constructor Details
LockGuard Constructor
soulng::util::LockGuard::LockGuard(
Mutex
& mtx_,
MutexOwner
& owner_)
Definition at line
34
of
Mutex.cpp
:
34
:
mtx
(
mtx_
)
,
owner
(
owner_
)
,
locked
(
false
)
35
{
36
Lock
(
)
;
37
}
Declaration at line
39
of
Mutex.hpp
Member Function Details
Lock Member Function
void
soulng::util::LockGuard::Lock()
Definition at line
47
of
Mutex.cpp
:
48
{
49
owner
.
Push
(
mtx
.
Id
(
)
)
;
50
mtx
.
Lock
(
)
;
51
locked
=
true
;
52
}
Declaration at line
41
of
Mutex.hpp
Calls:
soulng::util::Mutex::Id
,
soulng::util::Mutex::Lock
,
soulng::util::MutexOwner::Push
Unlock Member Function
void
soulng::util::LockGuard::Unlock()
Definition at line
54
of
Mutex.cpp
:
55
{
56
mtx
.
Unlock
(
)
;
57
owner
.
Pop
(
)
;
58
locked
=
false
;
59
}
Declaration at line
42
of
Mutex.hpp
Calls:
soulng::util::Mutex::Unlock
,
soulng::util::MutexOwner::Pop
Called by:
soulng::util::LockGuard::destructor
top
|
up
|
prev
|
next