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/docs/POSIX_ROADMAP.md?a=commitdiff_plain;h=9807471ef0db84682c5e92023f396b0d97840539;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 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));