tcp_write_queue_empty(9)
π 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
- 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