From 4d86542f70e1aa138d41d448aa0250e0f58d3f2d Mon Sep 17 00:00:00 2001 From: Tulio A M Mendes Date: Fri, 13 Feb 2026 16:29:19 -0300 Subject: [PATCH] fix: rx_thread uses ksem_wait_timeout on e1000_rx_sem instead of blind process_sleep polling --- src/net/e1000_netif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/net/e1000_netif.c b/src/net/e1000_netif.c index a071f31b..30c32a7e 100644 --- a/src/net/e1000_netif.c +++ b/src/net/e1000_netif.c @@ -107,9 +107,9 @@ static uint8_t rx_tmp[2048]; static void e1000_rx_thread(void) { for (;;) { - /* Poll every tick (~20ms at 50Hz). The E1000 IRQ sets - * e1000_rx_sem, but for robustness we also poll. */ - process_sleep(1); + /* Wait for the E1000 IRQ to signal a packet, with a 20ms + * timeout for robustness (catches missed interrupts). */ + ksem_wait_timeout(&e1000_rx_sem, 20); for (;;) { int len = e1000_recv(rx_tmp, sizeof(rx_tmp)); -- 2.43.0