@@ -54,13 +54,13 @@ typedef mbed::ScopedLock<Mutex> ScopedMutexLock;
54
54
*/
55
55
56
56
/* * The Mutex class is used to synchronize the execution of threads.
57
- This is for example used to protect access to a shared resource.
57
+ This is, for example, used to protect access to a shared resource.
58
58
59
59
@note You cannot use member functions of this class in ISR context. If you require Mutex functionality within
60
60
ISR handler, consider using @a Semaphore.
61
61
62
62
@note
63
- Memory considerations: The mutex control structures will be created on current thread's stack, both for the Mbed OS
63
+ Memory considerations: The mutex control structures are created on the current thread's stack, both for the Mbed OS
64
64
and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
65
65
*/
66
66
class Mutex : private mbed ::NonCopyable<Mutex> {
@@ -85,24 +85,24 @@ class Mutex : private mbed::NonCopyable<Mutex> {
85
85
@a osOK the mutex has been obtained.
86
86
87
87
@note You cannot call this function from ISR context.
88
- @note This function treats RTOS errors as fatal system errors, so can only return osOK.
88
+ @note This function treats RTOS errors as fatal system errors, so it can only return osOK.
89
89
Use of the return value is deprecated, as the return is expected to become void in the future.
90
90
*/
91
91
osStatus lock (void );
92
92
93
93
/* *
94
- For backwards compatibility.
94
+ Wait until a Mutex becomes available.
95
+
95
96
@deprecated Do not use this function. This function has been replaced with lock(), trylock() and trylock_for() functions.
96
97
97
- Wait until a Mutex becomes available.
98
98
@param millisec timeout value or 0 in case of no time-out.
99
99
@return status code that indicates the execution status of the function:
100
100
@a osOK the mutex has been obtained.
101
101
@a osErrorTimeout the mutex could not be obtained in the given time.
102
102
@a osErrorResource the mutex could not be obtained when no timeout was specified.
103
103
104
104
@note You cannot call this function from ISR context.
105
- @note This function treats RTOS errors as fatal system errors, so can only return osOK or
105
+ @note This function treats RTOS errors as fatal system errors, so it can only return osOK or
106
106
osErrorResource in case when millisec is 0 or osErrorTimeout if millisec is not osWaitForever.
107
107
*/
108
108
MBED_DEPRECATED_SINCE (" mbed-os-5.10.0" , " Replaced with lock(), trylock() and trylock_for() functions" )
@@ -147,7 +147,7 @@ class Mutex : private mbed::NonCopyable<Mutex> {
147
147
@a osOK the mutex has been released.
148
148
149
149
@note You cannot call this function from ISR context.
150
- @note This function treats RTOS errors as fatal system errors, so can only return osOK.
150
+ @note This function treats RTOS errors as fatal system errors, so it can only return osOK.
151
151
Use of the return value is deprecated, as the return is expected to become void in the future.
152
152
*/
153
153
osStatus unlock ();
0 commit comments