Skip to content

Commit 8d70032

Browse files
fixes #155 @1h
1 parent 87b24fa commit 8d70032

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/mutex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ namespace pthread {
3838
} else {
3939
throw mutex_exception("pthread_mutex_trylock failed, already locked.", rc);
4040
}
41+
42+
return status ;
4143
}
4244

4345
void mutex::unlock() {

tests/exceptions_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ TEST(exceptions, timeout_exception) {
5959
try {
6060
throw pthread::timeout_exception("Timeout exception test.");
6161
} catch (pthread::pthread_exception &ex) {
62-
EXPECT_EQ(60, ex.pthread_errno());
62+
EXPECT_EQ(ETIMEDOUT, ex.pthread_errno());
6363
EXPECT_STREQ("Timeout exception test.", ex.what());
6464
}
6565
}

0 commit comments

Comments
 (0)