diff --git a/rtos/ConditionVariable.h b/rtos/ConditionVariable.h index 8581b78327..543efc7eb3 100644 --- a/rtos/ConditionVariable.h +++ b/rtos/ConditionVariable.h @@ -57,9 +57,9 @@ struct Waiter; * `ConditionVariable::notify_all` is called. * At least one thread waiting on the condition variable wakes * when `ConditionVariable::notify_one` is called. - * + * * While a thread is waiting for notification of a - * ConditionVariable, it releases the lock held on the mutex. + * ConditionVariable, it releases the lock held on the mutex. * The ConditionVariable reacquires the mutex lock before exiting the wait * function. * diff --git a/rtos/Mail.h b/rtos/Mail.h index 6899d41f4c..5c3a9a7277 100644 --- a/rtos/Mail.h +++ b/rtos/Mail.h @@ -42,7 +42,7 @@ namespace rtos { * \defgroup rtos_Mail Mail class * @{ */ - + /** The Mail class allows you to control, send, receive or wait for mail. * A mail is a memory block that is sent to a thread or interrupt service routine (ISR). * @tparam T Data type of a single mail message element. @@ -96,7 +96,8 @@ public: * * @note You may call this function from ISR context. */ - T* alloc(uint32_t millisec=0) { + T *alloc(uint32_t millisec = 0) + { return _pool.alloc(); } @@ -108,7 +109,8 @@ public: * * @note You may call this function from ISR context. */ - T* calloc(uint32_t millisec=0) { + T *calloc(uint32_t millisec = 0) + { return _pool.calloc(); } @@ -120,7 +122,8 @@ public: * * @note You may call this function from ISR context. */ - osStatus put(T *mptr) { + osStatus put(T *mptr) + { return _queue.put(mptr); } @@ -136,7 +139,8 @@ public: * * @note You may call this function from ISR context if the millisec parameter is set to 0. */ - osEvent get(uint32_t millisec=osWaitForever) { + osEvent get(uint32_t millisec = osWaitForever) + { osEvent evt = _queue.get(millisec); if (evt.status == osEventMessage) { evt.status = osEventMail; @@ -152,7 +156,8 @@ public: * * @note You may call this function from ISR context. */ - osStatus free(T *mptr) { + osStatus free(T *mptr) + { return _pool.free(mptr); } diff --git a/rtos/Mutex.h b/rtos/Mutex.h index 21688bbab5..a364b1c8dc 100644 --- a/rtos/Mutex.h +++ b/rtos/Mutex.h @@ -92,7 +92,7 @@ public: /** Wait until a Mutex becomes available. - + @deprecated Do not use this function. This function has been replaced with lock(), trylock() and trylock_for() functions. @param millisec timeout value or 0 in case of no time-out. diff --git a/rtos/Queue.h b/rtos/Queue.h index 5785c9fcd7..d204a75696 100644 --- a/rtos/Queue.h +++ b/rtos/Queue.h @@ -143,7 +143,8 @@ public: * parameter is set to 0. * */ - osStatus put(T* data, uint32_t millisec=0, uint8_t prio=0) { + osStatus put(T *data, uint32_t millisec = 0, uint8_t prio = 0) + { return osMessageQueuePut(_id, &data, prio, millisec); } @@ -182,7 +183,8 @@ public: * @note You may call this function from ISR context if the millisec * parameter is set to 0. */ - osEvent get(uint32_t millisec=osWaitForever) { + osEvent get(uint32_t millisec = osWaitForever) + { osEvent event; T *data = NULL; osStatus_t res = osMessageQueueGet(_id, &data, NULL, millisec);