You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/pthread/mutex.hpp
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -46,14 +46,15 @@ namespace pthread {
46
46
voidlock();
47
47
48
48
/**
49
-
The function pthread_mutex_trylock is identical to pthread_mutex_lock except tha
50
-
if the mutex object referenced by mutex is currently locked (by any thread,
51
-
including the current thread), the call returns immediately.
52
-
53
-
@throw mutex_exception if error conditions preventing this method to succeed.
54
-
@see lock
49
+
* The function pthread_mutex_trylock is identical to pthread_mutex_lock except that
50
+
* if the mutex object referenced by mutex is currently locked (by any thread,
51
+
* including the current thread), the call returns immediately.
52
+
*
53
+
* @return
54
+
* @throw mutex_exception if error conditions preventing this method to succeed.
55
+
* @see lock
55
56
*/
56
-
voidtry_lock();
57
+
booltry_lock();
57
58
58
59
/**
59
60
The pthread_mutex_unlock function releases the mutex object referenced by mutex. The manner in which a mutex is released is dependent upon the mutex's type attribute. If there are threads blocked on the mutex object referenced by mutex when unlock is called, resulting in the mutex becoming available, the scheduling policy is used to determine which thread shall acquire the mutex.
0 commit comments