uart_port_tx_limited(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 port
  • ch β€” variable to store a character to be written to the HW
  • count β€” a limit of characters to send
  • tx_ready β€” can HW accept more data function
  • put_char β€” function to write a character
  • tx_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 ch to the device of port.
  • tx_done: when the write loop is done, this can perform arbitrary action before potential invocation of ops->stop_tx happens. 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 πŸ¦‹


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