@@ -43,7 +43,7 @@ struct Waiter;
43
43
* threads.
44
44
*
45
45
* The thread that intends to wait on a ConditionVariable must:
46
- * - Acquire a lock on a mutex
46
+ * - Acquire a lock on a mutex.
47
47
* - Execute `wait`, `wait_for` or `wait_until`. While the thread is waiting,
48
48
* the mutex is unlocked.
49
49
* - When the condition variable has been notified, or in the case of `wait_for`
@@ -64,7 +64,7 @@ struct Waiter;
64
64
* function.
65
65
*
66
66
* ### Undefined behavior
67
- * - The thread that is unblocked on ConditionVariable::notify_one is
67
+ * - The thread that is unblocked on ` ConditionVariable::notify_one` is
68
68
* undefined if there are multiple waiters.
69
69
* - Calling wait if the mutex is not locked by the current thread is undefined
70
70
* behavior.
@@ -90,7 +90,7 @@ struct Waiter;
90
90
* Mutex mutex;
91
91
* ConditionVariable cv(mutex);
92
92
*
93
- * // These variables are protected by locking mutex
93
+ * // These variables are protected by locking mutex.
94
94
* uint32_t work_count = 0;
95
95
* bool done = false;
96
96
*
@@ -102,7 +102,7 @@ struct Waiter;
102
102
* while (done == false) {
103
103
* printf("Worker thread: Count: %lu\r\n", work_count);
104
104
*
105
- * // Wait for main thread to notify the condition variable
105
+ * // Wait for main thread to notify the condition variable.
106
106
* printf("Worker thread: Waiting\r\n");
107
107
* cv.wait();
108
108
* }
@@ -169,7 +169,7 @@ class ConditionVariable : private mbed::NonCopyable<ConditionVariable> {
169
169
* been met.
170
170
*
171
171
* @note - The current thread releases the lock while inside the wait
172
- * function and reacquire it upon exiting the function.
172
+ * function and reacquires it upon exiting the function.
173
173
*
174
174
* Example:
175
175
* @code
@@ -229,7 +229,7 @@ class ConditionVariable : private mbed::NonCopyable<ConditionVariable> {
229
229
*/
230
230
bool wait_until (uint64_t millisec);
231
231
232
- /* * Wait for a notification or timeout
232
+ /* * Wait for a notification or timeout.
233
233
*
234
234
* `Wait for` causes the current thread to block until the condition
235
235
* variable receives a notification from another thread, or the timeout
@@ -301,7 +301,7 @@ class ConditionVariable : private mbed::NonCopyable<ConditionVariable> {
301
301
*/
302
302
void notify_all ();
303
303
304
- /* * ConditionVariable destructor
304
+ /* * ConditionVariable destructor.
305
305
*
306
306
* @note You cannot call this function from ISR context.
307
307
*/
0 commit comments