]> 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)
commit1e63ba62292dd82777cdb8fcd83cc13ab3f81043
tree7436ebeaffcdc3d40287085d5520a9a5d02e03ce
parent34051167e9426fa995d936fee2bb4e8b46a7c8df
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