uart_port_trylock_irqsave(9)
π uart_port_trylock_irqsave(9) β a Kernel API Manual moment
okay so bestie, welcome to the Kernel API Manual β¨ this one's all about uart_port_trylock_irqsave, and honestly? she's that girl who tries something risky and doesn't even stress about it π
πΈ NAME πΈ
uart_port_trylock_irqsave β try to lock the UART port, and save and disable interrupts, all in one lil move π
β¨ SYNOPSIS β¨
bool uart_port_trylock_irqsave (struct uart_port *up , unsigned long *flags );
π¦ ARGUMENTS π¦
upβ pointer to the UART port structure, aka the main character of this whole operation πflagsβ pointer to the storage where the interrupt flags get saved, so likeβ¦ remember where we left them π«Ά
π RETURN π
true if the lock was actually acquired β slay, you got it π₯
false otherwise β no lock for you, but like, no drama either, that's literally the whole point of a *try*lock π
π SEE ALSO π
the whole friend group, fr fr π:
Kernel file ./include/linux/serial_core.h struct uart_ops(9), uart_port_set_cons(9), uart_port_lock(9), uart_port_lock_irq(9), uart_port_lock_irqsave(9), uart_port_trylock(9), uart_port_unlock(9), 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)
ngl bestie, ifuporflagsis wrong, that's on you β this page isn't out here making promises it can't keep π
okay that's the whole page, mwah π β it lives in ./include/linux, dated October 2026, and it's literally titled uart_port_trylock_irqsave(9) if you ever need to find her again π
β¨πΈ
π¦ 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