From 1e0f60341192c79bf49e84e6b187ffb7bfded252 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Sun, 30 Nov 2025 13:51:19 -0500 Subject: Build fixes, socket_cleanup() - Make packet_cache_send() 3 steps, lock -> send -> unlock. Signed-off-by: Andrew Opalach --- tests/loop_sleep.c | 2 +- tests/timer_loop.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/loop_sleep.c b/tests/loop_sleep.c index 03deb53..3576988 100644 --- a/tests/loop_sleep.c +++ b/tests/loop_sleep.c @@ -3,7 +3,6 @@ #include static struct nn_event_loop loop; -static struct nn_timer timer; static void timer_callback2(void *userdata, struct nn_timer *timer) { @@ -34,6 +33,7 @@ s32 main(void) nn_event_loop_init(&loop); + struct nn_timer timer; nn_timer_init(&timer, &loop, timer_callback, NULL); nn_timer_set_repeat(&timer, NNWT_TS_FROM_USEC(1000000)); nn_timer_again(&timer); diff --git a/tests/timer_loop.c b/tests/timer_loop.c index a90f7c0..1df6863 100644 --- a/tests/timer_loop.c +++ b/tests/timer_loop.c @@ -5,9 +5,6 @@ #define DELAY 100000 #define REPEAT 21 -static struct nn_event_loop loop; -static struct nn_timer timer; - static f64 start; static u32 iter = 0u; @@ -27,6 +24,9 @@ s32 main(void) { if (!nn_common_init(NULL)) return EXIT_FAILURE; + struct nn_event_loop loop; + struct nn_timer timer; + nn_event_loop_init(&loop); start = nn_get_tick(); -- cgit v1.2.3-101-g0448