uart_port_tx_limited(9)
hi bestie! welcome to the uart_port_tx_limited(9) page from the Kernel API Manual β it's giving iconic kernel helper energy and we're gonna get through it together πβ¨
πΈ NAME πΈ
uart_port_tx_limited - - transmit helper for uart_port with count limiting π
β¨ SYNOPSIS β¨
uart_port_tx_limited (port , ch , count , tx_ready , put_char , tx_done );
π ARGUMENTS π
portβ uart portchβ variable to store a character to be written to the HWcountβ a limit of characters to sendtx_readyβ can HW accept more data functionput_charβ function to write a charactertx_doneβ function to call after the loop is done
π DESCRIPTION π
okay so bestie, this helper literally transmits characters from the xmit buffer to the hardware using put_char. It does so until count characters are sent and while tx_ready evaluates to true. no cap.
The expression in macro parameters shall be designed as follows:
- tx_ready: should evaluate to true if the HW can accept more data to be sent. This parameter can be
true, which means the HW is always ready. - put_char: shall write
chto the device ofport. - tx_done: when the write loop is done, this can perform arbitrary action before potential invocation of
ops->stop_txhappens. If the driver does not need to do anything, use e.g.({}).
For all of them, port->lock is held, interrupts are locally disabled and the expressions must not sleep. (like, seriously, do not sleep, bestie π΄π«)
π RETURN π
the number of characters in the xmit buffer when done. periodt. π
π¦ SEE ALSO π¦
- Kernel file
./include/linux/serial_core.hstructuart_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_trylock_irqsave(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_flags(9)uart_port_tx(9)uart_port_tx_flags(9)
catch u later bestie! this page is from ./include/linux, dated October 2026, and it's uart_port_tx_limited(9) out. π
β¨π«Ά
π¦ 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