rtos: fix coding style

pull/8711/head
Martin Kojtal 2018-11-12 10:33:38 +00:00
parent ef728d01dc
commit e1e20a64f9
4 changed files with 18 additions and 11 deletions

View File

@ -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.
*

View File

@ -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);
}

View File

@ -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.

View File

@ -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);