Skip to content

Commit e1e20a6

Browse files
committed
rtos: fix coding style
1 parent ef728d0 commit e1e20a6

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

rtos/ConditionVariable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ struct Waiter;
5757
* `ConditionVariable::notify_all` is called.
5858
* At least one thread waiting on the condition variable wakes
5959
* when `ConditionVariable::notify_one` is called.
60-
*
60+
*
6161
* While a thread is waiting for notification of a
62-
* ConditionVariable, it releases the lock held on the mutex.
62+
* ConditionVariable, it releases the lock held on the mutex.
6363
* The ConditionVariable reacquires the mutex lock before exiting the wait
6464
* function.
6565
*

rtos/Mail.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace rtos {
4242
* \defgroup rtos_Mail Mail class
4343
* @{
4444
*/
45-
45+
4646
/** The Mail class allows you to control, send, receive or wait for mail.
4747
* A mail is a memory block that is sent to a thread or interrupt service routine (ISR).
4848
* @tparam T Data type of a single mail message element.
@@ -96,7 +96,8 @@ class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
9696
*
9797
* @note You may call this function from ISR context.
9898
*/
99-
T* alloc(uint32_t millisec=0) {
99+
T *alloc(uint32_t millisec = 0)
100+
{
100101
return _pool.alloc();
101102
}
102103

@@ -108,7 +109,8 @@ class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
108109
*
109110
* @note You may call this function from ISR context.
110111
*/
111-
T* calloc(uint32_t millisec=0) {
112+
T *calloc(uint32_t millisec = 0)
113+
{
112114
return _pool.calloc();
113115
}
114116

@@ -120,7 +122,8 @@ class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
120122
*
121123
* @note You may call this function from ISR context.
122124
*/
123-
osStatus put(T *mptr) {
125+
osStatus put(T *mptr)
126+
{
124127
return _queue.put(mptr);
125128
}
126129

@@ -136,7 +139,8 @@ class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
136139
*
137140
* @note You may call this function from ISR context if the millisec parameter is set to 0.
138141
*/
139-
osEvent get(uint32_t millisec=osWaitForever) {
142+
osEvent get(uint32_t millisec = osWaitForever)
143+
{
140144
osEvent evt = _queue.get(millisec);
141145
if (evt.status == osEventMessage) {
142146
evt.status = osEventMail;
@@ -152,7 +156,8 @@ class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
152156
*
153157
* @note You may call this function from ISR context.
154158
*/
155-
osStatus free(T *mptr) {
159+
osStatus free(T *mptr)
160+
{
156161
return _pool.free(mptr);
157162
}
158163

rtos/Mutex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Mutex : private mbed::NonCopyable<Mutex> {
9292

9393
/**
9494
Wait until a Mutex becomes available.
95-
95+
9696
@deprecated Do not use this function. This function has been replaced with lock(), trylock() and trylock_for() functions.
9797
9898
@param millisec timeout value or 0 in case of no time-out.

rtos/Queue.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
143143
* parameter is set to 0.
144144
*
145145
*/
146-
osStatus put(T* data, uint32_t millisec=0, uint8_t prio=0) {
146+
osStatus put(T *data, uint32_t millisec = 0, uint8_t prio = 0)
147+
{
147148
return osMessageQueuePut(_id, &data, prio, millisec);
148149
}
149150

@@ -182,7 +183,8 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
182183
* @note You may call this function from ISR context if the millisec
183184
* parameter is set to 0.
184185
*/
185-
osEvent get(uint32_t millisec=osWaitForever) {
186+
osEvent get(uint32_t millisec = osWaitForever)
187+
{
186188
osEvent event;
187189
T *data = NULL;
188190
osStatus_t res = osMessageQueueGet(_id, &data, NULL, millisec);

0 commit comments

Comments
 (0)