1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#[macro_export]
macro_rules! global_trace {
($ident:ident) => {
#[no_mangle]
fn _rtos_trace_task_new(id: u32) {
<$ident as $crate::RtosTrace>::task_new(id)
}
#[no_mangle]
fn _rtos_trace_task_send_info(id: u32, info: $crate::TaskInfo) {
<$ident as $crate::RtosTrace>::task_send_info(id, info)
}
#[no_mangle]
fn _rtos_trace_task_terminate(id: u32) {
<$ident as $crate::RtosTrace>::task_terminate(id)
}
#[no_mangle]
fn _rtos_trace_task_exec_begin(id: u32) {
<$ident as $crate::RtosTrace>::task_exec_begin(id)
}
#[no_mangle]
fn _rtos_trace_task_exec_end() {
<$ident as $crate::RtosTrace>::task_exec_end()
}
#[no_mangle]
fn _rtos_trace_task_ready_begin(id: u32) {
<$ident as $crate::RtosTrace>::task_ready_begin(id)
}
#[no_mangle]
fn _rtos_trace_task_ready_end(id: u32) {
<$ident as $crate::RtosTrace>::task_ready_end(id)
}
#[no_mangle]
fn _rtos_trace_system_idle() {
<$ident as $crate::RtosTrace>::system_idle()
}
#[no_mangle]
fn _rtos_trace_isr_enter() {
<$ident as $crate::RtosTrace>::isr_enter()
}
#[no_mangle]
fn _rtos_trace_isr_exit() {
<$ident as $crate::RtosTrace>::isr_exit()
}
#[no_mangle]
fn _rtos_trace_isr_exit_to_scheduler() {
<$ident as $crate::RtosTrace>::isr_exit_to_scheduler()
}
#[no_mangle]
fn _rtos_trace_marker(id: u32) {
<$ident as $crate::RtosTrace>::marker(id)
}
#[no_mangle]
fn _rtos_trace_marker_begin(id: u32) {
<$ident as $crate::RtosTrace>::marker_begin(id)
}
#[no_mangle]
fn _rtos_trace_marker_end(id: u32) {
<$ident as $crate::RtosTrace>::marker_end(id)
}
}
}
#[macro_export]
macro_rules! global_os_callbacks {
($ident:ident) => {
#[no_mangle]
fn _rtos_trace_task_list() {
<$ident as $crate::RtosTraceOSCallbacks>::task_list()
}
#[no_mangle]
fn _rtos_trace_time() -> u64 {
<$ident as $crate::RtosTraceOSCallbacks>::time()
}
}
}
#[macro_export]
macro_rules! global_application_callbacks {
($ident:ident) => {
#[no_mangle]
fn _rtos_trace_system_description() {
<$ident as $crate::RtosTraceApplicationCallbacks>::system_description()
}
#[no_mangle]
fn _rtos_trace_sysclock() -> u32 {
<$ident as $crate::RtosTraceApplicationCallbacks>::sysclock()
}
}
}