Skip to content

Commit 740f50e

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Merge branch 'aashishc1988-mutex_doc_changes' into rollup-aus_writathon
2 parents ae45082 + 096a7f6 commit 740f50e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rtos/Mutex.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ typedef mbed::ScopedLock<Mutex> ScopedMutexLock;
5454
*/
5555

5656
/** 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.
5858
5959
@note You cannot use member functions of this class in ISR context. If you require Mutex functionality within
6060
ISR handler, consider using @a Semaphore.
6161
6262
@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
6464
and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
6565
*/
6666
class Mutex : private mbed::NonCopyable<Mutex> {
@@ -85,24 +85,24 @@ class Mutex : private mbed::NonCopyable<Mutex> {
8585
@a osOK the mutex has been obtained.
8686
8787
@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.
8989
Use of the return value is deprecated, as the return is expected to become void in the future.
9090
*/
9191
osStatus lock(void);
9292

9393
/**
94-
For backwards compatibility.
94+
Wait until a Mutex becomes available.
95+
9596
@deprecated Do not use this function. This function has been replaced with lock(), trylock() and trylock_for() functions.
9697
97-
Wait until a Mutex becomes available.
9898
@param millisec timeout value or 0 in case of no time-out.
9999
@return status code that indicates the execution status of the function:
100100
@a osOK the mutex has been obtained.
101101
@a osErrorTimeout the mutex could not be obtained in the given time.
102102
@a osErrorResource the mutex could not be obtained when no timeout was specified.
103103
104104
@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
106106
osErrorResource in case when millisec is 0 or osErrorTimeout if millisec is not osWaitForever.
107107
*/
108108
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> {
147147
@a osOK the mutex has been released.
148148
149149
@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.
151151
Use of the return value is deprecated, as the return is expected to become void in the future.
152152
*/
153153
osStatus unlock();

0 commit comments

Comments
 (0)