uart_port_lock_irq(9)
π uart_port_lock_irq(9) β the Kernel API Manual, but make it make sense π
okay so bestie, welcome to the Kernel API Manual entry for uart_port_lock_irq(9). yes it's a mouthful. no you're not gonna fumble it. let's go π
β¨ NAME β¨
uart_port_lock_irq β lock the UART port AND disable interrupts. both. at the same time. she's an overachiever, we love her π
πΈ SYNOPSIS πΈ
void uart_port_lock_irq (struct uart_port *up );
that's it. that's the whole vibe check. one function, one argument, zero returns. void is giving "i don't owe you a result" energy and honestly? iconic π
π¦ ARGUMENTS π¦
upβ pointer to the UART port structure β¨ literally just a pointer. that's the whole thing. it points at your UART port struct and the function does its lil lock-and-disable dance on it. no cap, that's all the docs say, and we're not gonna invent extra lore π«Ά
π§ SEE ALSO π§
okay this is the part where the manpage just dumps the entire friend group at you π but they're all relevant, i promise. no skimming!!
- the kernel file
./include/linux/serial_core.h, specifically the structuart_ops(9)β that's where all this lives, go say hi π uart_port_set_cons(9)uart_port_lock(9)β the plain-jane lock, no irq dramauart_port_lock_irqsave(9)β the one who also saves your irq state, very responsible of her πuart_port_trylock(9)β the non-committal one πuart_port_trylock_irqsave(9)uart_port_unlock(9)β you WILL need this, bestie, don't forget to unlock, deadlocks are not cute πuart_port_unlock_irq(9)uart_port_unlock_irqrestore(9)- enum
uart_pm_state(9) uart_xmit_advance(9)- enum
UART_TX_FLAGS(9) uart_port_tx_limited(9)uart_port_tx_limited_flags(9)uart_port_tx(9)uart_port_tx_flags(9)
like i said. whole friend group. every single one. mwah π
friendly reminder that this page is very short and that's on purpose β don't go reading behaviour into it that isn't written down, that's how you get bugs and bugs are not the move π
and that's the page!! sign-off time π this little beauty lives over in ./include/linux, stamped October 2026, and she answers to the name uart_port_lock_irq(9) β go lock that port, disable those interrupts, and slay the day, bestie πβ¨π¦πΈπ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms