File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 22
22
#include "mbed_interface.h"
23
23
#include "RTX_Config.h"
24
24
#include "rtos/rtos_handlers.h"
25
+ #include "rtos/rtos_idle.h"
25
26
26
27
#ifdef RTE_Compiler_EventRecorder
27
28
#include "EventRecorder.h" // Keil::Compiler:Event Recorder
30
31
#define EvtRtxThreadTerminate EventID(EventLevelAPI, 0xF2U, 0x1AU)
31
32
#endif
32
33
33
- extern void rtos_idle_loop (void );
34
-
35
34
static void (* terminate_hook )(osThreadId_t id );
36
35
37
36
static void thread_terminate_hook (osThreadId_t id )
@@ -48,9 +47,7 @@ void rtos_attach_thread_terminate_hook(void (*fptr)(osThreadId_t id))
48
47
49
48
__NO_RETURN void osRtxIdleThread (void * argument )
50
49
{
51
- for (;;) {
52
- rtos_idle_loop ();
53
- }
50
+ rtos_idle_loop ();
54
51
}
55
52
56
53
__NO_RETURN uint32_t osRtxErrorNotify (uint32_t code , void * object_id )
Original file line number Diff line number Diff line change 28
28
#include " mbed_assert.h"
29
29
#include < new>
30
30
#include " rtx_os.h"
31
+
32
+ /* Everything in rtx_lib.h, and provided by this file, has C linkage */
31
33
extern " C" {
32
34
#include " rtx_lib.h"
33
- }
34
35
35
36
using namespace mbed ;
36
37
@@ -136,10 +137,12 @@ void rtos_attach_idle_hook(void (*fptr)(void))
136
137
}
137
138
}
138
139
139
- extern " C " void rtos_idle_loop (void )
140
+ MBED_NORETURN void rtos_idle_loop (void )
140
141
{
141
142
// Continuously call the idle hook function pointer
142
143
while (1 ) {
143
144
idle_hook_fptr ();
144
145
}
145
146
}
147
+
148
+ } // extern "C"
Original file line number Diff line number Diff line change 25
25
#ifndef RTOS_IDLE_H
26
26
#define RTOS_IDLE_H
27
27
28
+ #include "mbed_toolchain.h"
28
29
#include <stddef.h>
29
30
30
31
#ifdef __cplusplus
@@ -41,6 +42,10 @@ extern "C" {
41
42
@param fptr Hook function pointer.
42
43
*/
43
44
void rtos_attach_idle_hook (void (* fptr )(void ));
45
+
46
+ /** @private */
47
+ MBED_NORETURN void rtos_idle_loop (void );
48
+
44
49
/** @}*/
45
50
46
51
#ifdef __cplusplus
You can’t perform that action at this time.
0 commit comments