1 /*
2  * Copyright (c) 2020 Lexmark International, Inc.
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 #include <tracing_user.h>
9 #include <zephyr/kernel.h>
10 
sys_trace_thread_create_user(struct k_thread * thread)11 void __weak sys_trace_thread_create_user(struct k_thread *thread) {}
sys_trace_thread_abort_user(struct k_thread * thread)12 void __weak sys_trace_thread_abort_user(struct k_thread *thread) {}
sys_trace_thread_suspend_user(struct k_thread * thread)13 void __weak sys_trace_thread_suspend_user(struct k_thread *thread) {}
sys_trace_thread_resume_user(struct k_thread * thread)14 void __weak sys_trace_thread_resume_user(struct k_thread *thread) {}
sys_trace_thread_name_set_user(struct k_thread * thread)15 void __weak sys_trace_thread_name_set_user(struct k_thread *thread) {}
sys_trace_thread_switched_in_user(void)16 void __weak sys_trace_thread_switched_in_user(void) {}
sys_trace_thread_switched_out_user(void)17 void __weak sys_trace_thread_switched_out_user(void) {}
sys_trace_thread_info_user(struct k_thread * thread)18 void __weak sys_trace_thread_info_user(struct k_thread *thread) {}
sys_trace_thread_sched_ready_user(struct k_thread * thread)19 void __weak sys_trace_thread_sched_ready_user(struct k_thread *thread) {}
sys_trace_thread_pend_user(struct k_thread * thread)20 void __weak sys_trace_thread_pend_user(struct k_thread *thread) {}
sys_trace_thread_priority_set_user(struct k_thread * thread,int prio)21 void __weak sys_trace_thread_priority_set_user(struct k_thread *thread, int prio) {}
sys_trace_isr_enter_user(void)22 void __weak sys_trace_isr_enter_user(void) {}
sys_trace_isr_exit_user(void)23 void __weak sys_trace_isr_exit_user(void) {}
sys_trace_idle_user(void)24 void __weak sys_trace_idle_user(void) {}
25 
sys_trace_thread_create(struct k_thread * thread)26 void sys_trace_thread_create(struct k_thread *thread)
27 {
28 	sys_trace_thread_create_user(thread);
29 }
30 
sys_trace_thread_abort(struct k_thread * thread)31 void sys_trace_thread_abort(struct k_thread *thread)
32 {
33 	sys_trace_thread_abort_user(thread);
34 }
35 
sys_trace_thread_suspend(struct k_thread * thread)36 void sys_trace_thread_suspend(struct k_thread *thread)
37 {
38 	sys_trace_thread_suspend_user(thread);
39 }
40 
sys_trace_thread_resume(struct k_thread * thread)41 void sys_trace_thread_resume(struct k_thread *thread)
42 {
43 	sys_trace_thread_resume_user(thread);
44 }
45 
sys_trace_thread_name_set(struct k_thread * thread)46 void sys_trace_thread_name_set(struct k_thread *thread)
47 {
48 	sys_trace_thread_name_set_user(thread);
49 }
50 
sys_trace_k_thread_switched_in(void)51 void sys_trace_k_thread_switched_in(void)
52 {
53 	sys_trace_thread_switched_in_user();
54 }
55 
sys_trace_k_thread_switched_out(void)56 void sys_trace_k_thread_switched_out(void)
57 {
58 	sys_trace_thread_switched_out_user();
59 }
60 
sys_trace_thread_info(struct k_thread * thread)61 void sys_trace_thread_info(struct k_thread *thread)
62 {
63 	sys_trace_thread_info_user(thread);
64 }
65 
sys_trace_thread_sched_priority_set(struct k_thread * thread,int prio)66 void sys_trace_thread_sched_priority_set(struct k_thread *thread, int prio)
67 {
68 	sys_trace_thread_priority_set_user(thread, prio);
69 }
70 
sys_trace_thread_sched_ready(struct k_thread * thread)71 void sys_trace_thread_sched_ready(struct k_thread *thread)
72 {
73 	sys_trace_thread_sched_ready_user(thread);
74 }
75 
sys_trace_thread_pend(struct k_thread * thread)76 void sys_trace_thread_pend(struct k_thread *thread)
77 {
78 	sys_trace_thread_pend_user(thread);
79 }
80 
sys_trace_isr_enter(void)81 void sys_trace_isr_enter(void)
82 {
83 	sys_trace_isr_enter_user();
84 }
85 
sys_trace_isr_exit(void)86 void sys_trace_isr_exit(void)
87 {
88 	sys_trace_isr_exit_user();
89 }
90 
sys_trace_idle(void)91 void sys_trace_idle(void)
92 {
93 	sys_trace_idle_user();
94 }
95