File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,26 @@ class Mutex : private mbed::NonCopyable<Mutex> {
53
53
54
54
/* * Wait until a Mutex becomes available.
55
55
@param millisec timeout value or 0 in case of no time-out. (default: osWaitForever)
56
- @return status code that indicates the execution status of the function.
56
+ @return status code that indicates the execution status of the function:
57
+ @a osOK the mutex has been obtained.
58
+ @a osErrorTimeout the mutex could not be obtained in the given time.
59
+ @a osErrorParameter internal error.
60
+ @a osErrorResource the mutex could not be obtained when no timeout was specified.
61
+ @a osErrorISR this function cannot be called from the interrupt service routine.
57
62
*/
58
63
osStatus lock (uint32_t millisec=osWaitForever);
59
64
60
65
/* * Try to lock the mutex, and return immediately
61
- @return true if the mutex was acquired, false otherwise.
66
+ @return true if the mutex was acquired, false otherwise.
62
67
*/
63
68
bool trylock ();
64
69
65
70
/* * Unlock the mutex that has previously been locked by the same thread
66
- @return status code that indicates the execution status of the function.
71
+ @return status code that indicates the execution status of the function:
72
+ @a osOK the mutex has been released.
73
+ @a osErrorParameter internal error.
74
+ @a osErrorResource the mutex was not locked or the current thread wasn't the owner.
75
+ @a osErrorISR this function cannot be called from the interrupt service routine.
67
76
*/
68
77
osStatus unlock ();
69
78
You can’t perform that action at this time.
0 commit comments