Skip to content

Commit 8786bfb

Browse files
committed
improve mutex doc
1 parent 3568c54 commit 8786bfb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rtos/Mutex.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ 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.
@@ -82,7 +82,7 @@ class Mutex : private mbed::NonCopyable<Mutex> {
8282
Wait until a Mutex becomes available.
8383
8484
@return status code that indicates the execution status of the function:
85-
@a osOK the mutex has been obtained.
85+
@a Status code like osOK indicates that the mutex has been obtained.
8686
8787
@note You cannot call this function from ISR context.
8888
@note This function treats RTOS errors as fatal system errors, so can only return osOK.
@@ -91,10 +91,10 @@ class Mutex : private mbed::NonCopyable<Mutex> {
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.
@@ -144,7 +144,7 @@ class Mutex : private mbed::NonCopyable<Mutex> {
144144
Unlock the mutex that has previously been locked by the same thread
145145
146146
@return status code that indicates the execution status of the function:
147-
@a osOK the mutex has been released.
147+
@a Status code like osOK indicates that the mutex has been released.
148148
149149
@note You cannot call this function from ISR context.
150150
@note This function treats RTOS errors as fatal system errors, so can only return osOK.

0 commit comments

Comments
 (0)