Skip to content

Commit b626e18

Browse files
committed
osStatus lock(uint32_t millisec=osWaitForever) - remove default value
Since `void lock(void)` member function has been added we need to remove default value from deprecated `lock(uint32_t millisec=osWaitForever)` member function since otherwise calling `lock()` would be ambiguous.
1 parent 3decd51 commit b626e18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rtos/Mutex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Mutex : private mbed::NonCopyable<Mutex> {
9090
@deprecated Do not use this function. This function has been replaced with trylock_for and lock(void) functions.
9191
9292
Wait until a Mutex becomes available.
93-
@param millisec timeout value or 0 in case of no time-out. (default: osWaitForever)
93+
@param millisec timeout value or 0 in case of no time-out.
9494
@return status code that indicates the execution status of the function:
9595
@a osOK the mutex has been obtained.
9696
@a osErrorTimeout the mutex could not be obtained in the given time.
@@ -101,7 +101,7 @@ class Mutex : private mbed::NonCopyable<Mutex> {
101101
@note You cannot call this function from ISR context.
102102
*/
103103
MBED_DEPRECATED_SINCE("mbed-os-5.10.0", "Replaced with trylock_for and lock(void) functions")
104-
osStatus lock(uint32_t millisec=osWaitForever);
104+
osStatus lock(uint32_t millisec);
105105

106106
/** Try to lock the mutex, and return immediately
107107
@return true if the mutex was acquired, false otherwise.

0 commit comments

Comments
 (0)