Skip to content

Commit 4ef1163

Browse files
dcpleungcfriedt
authored andcommitted
samples: tracing: fix missing k_event funcs for UART test
With the UART transport test (sample.tracing.transport.uart), it would fail on qemu_x86_64 complaining about missing k_event tracing functions. So add them to fix the compilation error. Fixes #96818 Signed-off-by: Daniel Leung <[email protected]>
1 parent ea499ca commit 4ef1163

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

subsys/tracing/test/tracing_string_format_test.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,3 +553,35 @@ void sys_trace_k_thread_foreach_unlocked_exit(k_thread_user_cb_t user_cb, void *
553553
{
554554
TRACING_STRING("%s: %p (%p) exit\n", __func__, user_cb, data);
555555
}
556+
557+
void sys_trace_k_event_init(struct k_event *event)
558+
{
559+
TRACING_STRING("%s: %p init\n", __func__, event);
560+
}
561+
562+
void sys_trace_k_event_post_enter(struct k_event *event, uint32_t events, uint32_t events_mask)
563+
{
564+
TRACING_STRING("%s: %p post enter\n", __func__, event);
565+
}
566+
567+
void sys_trace_k_event_post_exit(struct k_event *event, uint32_t events, uint32_t events_mask)
568+
{
569+
TRACING_STRING("%s: %p post exit\n", __func__, event);
570+
}
571+
572+
void sys_trace_k_event_wait_enter(struct k_event *event, uint32_t events, unsigned int options,
573+
k_timeout_t timeout)
574+
{
575+
TRACING_STRING("%s: %p wait enter\n", __func__, event);
576+
}
577+
578+
void sys_trace_k_event_wait_blocking(struct k_event *event, uint32_t events, unsigned int options,
579+
k_timeout_t timeout)
580+
{
581+
TRACING_STRING("%s: %p wait blocking\n", __func__, event);
582+
}
583+
584+
void sys_trace_k_event_wait_exit(struct k_event *event, uint32_t events, uint32_t ret)
585+
{
586+
TRACING_STRING("%s: %p wait exit\n", __func__, event);
587+
}

subsys/tracing/test/tracing_test.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,13 @@ void sys_trace_k_timer_status_sync_blocking(struct k_timer *timer);
745745
void sys_trace_k_timer_status_sync_exit(struct k_timer *timer, uint32_t result);
746746

747747
void sys_trace_k_event_init(struct k_event *event);
748+
void sys_trace_k_event_post_enter(struct k_event *event, uint32_t events, uint32_t events_mask);
749+
void sys_trace_k_event_post_exit(struct k_event *event, uint32_t events, uint32_t events_mask);
750+
void sys_trace_k_event_wait_enter(struct k_event *event, uint32_t events, unsigned int options,
751+
k_timeout_t timeout);
752+
void sys_trace_k_event_wait_blocking(struct k_event *event, uint32_t events, unsigned int options,
753+
k_timeout_t timeout);
754+
void sys_trace_k_event_wait_exit(struct k_event *event, uint32_t events, uint32_t ret);
748755

749756
#define sys_port_trace_socket_init(sock, family, type, proto)
750757
#define sys_port_trace_socket_close_enter(sock)

0 commit comments

Comments
 (0)