From: Tulio A M Mendes Date: Fri, 13 Feb 2026 19:29:19 +0000 (-0300) Subject: fix: rx_thread uses ksem_wait_timeout on e1000_rx_sem instead of blind process_sleep... X-Git-Url: https://projects.tadryanom.me/?a=commitdiff_plain;h=4d86542f70e1aa138d41d448aa0250e0f58d3f2d;p=AdrOS.git fix: rx_thread uses ksem_wait_timeout on e1000_rx_sem instead of blind process_sleep polling --- 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));