tcp_write_queue_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tcp_write_queue_empty(9) πŸ’…

okay so bestie, this page is straight from the Kernel API Manual, and it's all about one tiny bool check that is lowkey doing important work. let's get into it ✨

🌸 NAME 🌸

tcp_write_queue_empty β€” test if any payload (or FIN) is available in write queue

✨ SYNOPSIS ✨

bool tcp_write_queue_empty (const struct sock *sk );

πŸŽ€ ARGUMENTS πŸŽ€

  • sk β€” socket

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk: the write queue can have a temporary empty skb in it 😭 that's the whole reason we must not use this:

return skb_queue_empty(sk->sk_write_queue)

like, do not do that. not the vibe. the temporary empty skb is exactly why this helper exists, periodt πŸ’…

πŸ’– SEE ALSO πŸ’–

  • Kernel file ./include/net/tcp.h

made with πŸ’– from the ./include/net corner of the kernel, October 2026 β€” mwah πŸ«ΆπŸ’‹

πŸ“¦ where this page comes from