From 9807471ef0db84682c5e92023f396b0d97840539 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 2bec758..8631cd4 100644 --- a/src/net/e1000_netif.c +++ b/src/net/e1000_netif.c @@ -98,9 +98,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