Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
11df86c5
Commit
11df86c5
authored
Oct 22, 2012
by
Mukund Sivaraman
Browse files
[2198] Check pthread_mutex_trylock()'s return value
parent
699a941c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/util/threads/sync.cc
View file @
11df86c5
...
...
@@ -132,8 +132,10 @@ bool
Mutex
::
tryLock
()
{
assert
(
impl_
!=
NULL
);
const
int
result
=
pthread_mutex_trylock
(
&
impl_
->
mutex
);
if
(
result
!
=
0
)
{
if
(
result
=
=
EBUSY
)
{
return
(
false
);
}
else
if
(
result
!=
0
)
{
isc_throw
(
isc
::
InvalidOperation
,
std
::
strerror
(
result
));
}
postLockAction
();
// Only in debug mode
return
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment