]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
fix: add timeout to UART busy-wait in hal_uart_putc()
authorTulio A M Mendes <[email protected]>
Thu, 12 Feb 2026 06:25:39 +0000 (03:25 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 02:44:55 +0000 (23:44 -0300)
commit197419ed4305607dae3a3f041246ca30c9f9b83c
tree77be489de7c22de9d659a287e52709e7ef8941af
parent8dae3cb3fa96c00452831935b8174d68a9401b21
fix: add timeout to UART busy-wait in hal_uart_putc()

The UART transmit loop now gives up after ~100k iterations instead
of spinning forever. This prevents the kernel from hanging with
the console spinlock held if the UART hardware is unresponsive,
which would otherwise deadlock all CPUs attempting kprintf (including
panic and debug output paths).
src/hal/x86/uart.c