diff options
| author | 2025-11-30 13:51:19 -0500 | |
|---|---|---|
| committer | 2025-11-30 13:55:55 -0500 | |
| commit | 1e0f60341192c79bf49e84e6b187ffb7bfded252 (patch) | |
| tree | 35e02f466e553e01f0421c391c16af918efd6098 /tests | |
| parent | 5edcdda9efadd7c6ff5a47bef2897c0eb995057f (diff) | |
| download | libnaunet-1e0f60341192c79bf49e84e6b187ffb7bfded252.tar.gz libnaunet-1e0f60341192c79bf49e84e6b187ffb7bfded252.tar.bz2 libnaunet-1e0f60341192c79bf49e84e6b187ffb7bfded252.zip | |
Build fixes, socket_cleanup()
- Make packet_cache_send() 3 steps, lock -> send -> unlock.
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/loop_sleep.c | 2 | ||||
| -rw-r--r-- | tests/timer_loop.c | 6 |
2 files changed, 4 insertions, 4 deletions
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 <nnwt/timer.h> 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(); |