gnet_stats_finish_copy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gnet_stats_finish_copy(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this page is all about gnet_stats_finish_copy(9), and it's literally the cleanup era of the dumping saga. ✨


✨ NAME ✨

gnet_stats_finish_copy β€” the function that finishes the dumping procedure. no cap, it's the final boss of the dump. πŸŽ€


πŸŽ€ SYNOPSIS πŸŽ€

int gnet_stats_finish_copy (struct gnet_dump *d );

🌸 ARGUMENTS 🌸

  • d β€” the dumping handle. it's giving β€œhold my stats while I finish this.” πŸ’…

✨ DESCRIPTION ✨

okay so here's the tea: gnet_stats_finish_copy corrects the length of the top level TLV so it includes all the TLVs that were added by gnet_stats_copy_XXX calls. 🫢

It also adds the backward compatibility TLVs if gnet_stats_start_copy_compat was used, and then it releases the statistics lock. iconic behavior, honestly. πŸ”₯

Return value check, bestie: you get 0 on success. but if the room in the socket buffer was not sufficient, you get -1 with the statistic lock released. 😭 so yeah, -1 means no room and the lock is already out the door. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./net/core/gen_stats.c β€” and the whole squad:


mwah πŸ’‹ β€” source/version: ./net/core, date: October 2026, page: gnet_stats_finish_copy(9). bye bestie, go finish that dump 🫢✨

πŸ“¦ where this page comes from