Add return code in try_lock function 23/279923/2
authorTaeminYeom <taemin.yeom@samsung.com>
Fri, 19 Aug 2022 05:50:24 +0000 (14:50 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Fri, 19 Aug 2022 06:17:58 +0000 (06:17 +0000)
Change-Id: Id11ea21acf089b37914449e99604e20306adcc96
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
src/shared/lock.cpp

index 9e6836f..499e7a1 100644 (file)
@@ -51,7 +51,7 @@ void cmutex::unlock(void)
 
 int cmutex::try_lock(void)
 {
-       pthread_mutex_trylock(&m_mutex);
+       return pthread_mutex_trylock(&m_mutex);
 }
 
 Autolock::Autolock(cmutex &m)