uart_port_trylock_irqsave(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, if up or flags is 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