-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc_pktbuf_start_write API docs unclear #10261
Copy link
Copy link
Closed
Labels
Area: docArea: DocumentationArea: DocumentationArea: networkArea: NetworkingArea: NetworkingType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Description
gnrc_pktbuf_start_write documentation currently states:
gnrc_pktsnip_t* gnrc_pktbuf_start_write(gnrc_pktsnip_t *pkt)Must be called once before there is a write operation in a thread.
This function duplicates a packet in the packet buffer if gnrc_pktsnip_t::users of pkt > 1.
Note
Do not call this function in a thread twice on the same packet.
The docs use the word "packet" to refer to a single snip of a complete network packet. Especially the warning about not calling twice on the same packet is confusing since this function is called in a loop in gnrc_pktbuf_reverse_snips()
Originally posted by @gebart in #10226 (comment)
Reactions are currently unavailable
Metadata
Metadata
Labels
Area: docArea: DocumentationArea: DocumentationArea: networkArea: NetworkingArea: NetworkingType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation