Skip to content

Commit 7a0911f

Browse files
committed
Revert "RTOS: Add required header file and namespace element instead add all"
This reverts commit ba02b48. Going to 5.11
1 parent bf80245 commit 7a0911f

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

rtos/Kernel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
* SOFTWARE.
2121
*/
2222

23-
#include "cmsis_os2.h"
2423
#include "rtos/Kernel.h"
24+
25+
#include "mbed.h"
2526
#include "rtos/rtos_idle.h"
2627
#include "rtos/rtos_handlers.h"
27-
#include "platform/mbed_critical.h"
2828

2929
namespace rtos {
3030

rtos/RtosTimer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
* SOFTWARE.
2121
*/
2222
#include "rtos/RtosTimer.h"
23-
#include "platform/Callback.h"
24-
#include "platform/mbed_error.h"
25-
#include "platform/mbed_assert.h"
2623

2724
#include <string.h>
2825

26+
#include "mbed.h"
27+
#include "platform/mbed_error.h"
28+
2929
namespace rtos {
3030

3131
void RtosTimer::constructor(mbed::Callback<void()> func, os_timer_type type) {
@@ -34,7 +34,7 @@ void RtosTimer::constructor(mbed::Callback<void()> func, os_timer_type type) {
3434
osTimerAttr_t attr = { 0 };
3535
attr.cb_mem = &_obj_mem;
3636
attr.cb_size = sizeof(_obj_mem);
37-
_id = osTimerNew((void (*)(void *))mbed::Callback<void()>::thunk, type, &_function, &attr);
37+
_id = osTimerNew((void (*)(void *))Callback<void()>::thunk, type, &_function, &attr);
3838
MBED_ASSERT(_id);
3939
}
4040

rtos/ThisThread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#define __STDC_LIMIT_MACROS
2424
#include "rtos/ThisThread.h"
2525

26-
#include "rtos/Kernel.h"
26+
#include "mbed.h"
2727
#include "rtos/rtos_idle.h"
28-
#include "platform/mbed_assert.h"
28+
#include "mbed_assert.h"
2929

3030
namespace rtos {
3131

rtos/Thread.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
*/
2222
#include "rtos/Thread.h"
2323
#include "rtos/ThisThread.h"
24+
25+
#include "mbed.h"
2426
#include "rtos/rtos_idle.h"
2527
#include "rtos/rtos_handlers.h"
26-
#include "platform/mbed_assert.h"
27-
#include "platform/mbed_error.h"
28+
#include "mbed_assert.h"
2829

2930
#define ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos))
3031
MBED_STATIC_ASSERT(ALIGN_UP(0, 8) == 0, "ALIGN_UP macro error");
@@ -67,7 +68,7 @@ void Thread::constructor(osPriority priority,
6768
constructor(MBED_TZ_DEFAULT_ACCESS, priority, stack_size, stack_mem, name);
6869
}
6970

70-
void Thread::constructor(mbed::Callback<void()> task,
71+
void Thread::constructor(Callback<void()> task,
7172
osPriority priority, uint32_t stack_size, unsigned char *stack_mem, const char *name)
7273
{
7374
constructor(MBED_TZ_DEFAULT_ACCESS, priority, stack_size, stack_mem, name);
@@ -86,7 +87,7 @@ void Thread::constructor(mbed::Callback<void()> task,
8687
}
8788
}
8889

89-
osStatus Thread::start(mbed::Callback<void()> task)
90+
osStatus Thread::start(Callback<void()> task)
9091
{
9192
_mutex.lock();
9293

0 commit comments

Comments
 (0)