Project

General

Profile

Actions

Bug #13730

open

esballoc(9f) could document esballoca/desballoca

Added by Gordon Ross 20 days ago. Updated 13 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

In addition to esballoc/desballoc that are documented in esballoc(9f) the system provides variants of those functions with an 'a' suffix (esballoca/desballoca) which add a ref to the returned mblk, causing that mblk to be treated as read-only in the streams stack. Note that esballoca is used (eg.) in the NFS code for loaned buffers.
It would be nice if esballoc(9f) documented all four related functions.

Perhaps also add a comment before gesballoc() in io/stream.c like:

/*
 * Generic esballoc used to implement the four flavors: [d]esballoc[a].
 * The variants with a 'd' prefix (desballoc, desballoca)
 *    directly free the mblk when it loses its last ref,
 *    where the other variants free asynchronously.
 * The variants with an 'a' suffix (esballoca, desballoca)
 *    add an extra ref, effectively letting the streams subsystem
 *    know that the message data should not be modified.    
 */

See:
usr/src/man/man9f/esballoc.9f
usr/src/uts/common/io/stream.c

Actions #1

Updated by Gordon Ross 20 days ago

  • Description updated (diff)
Actions #2

Updated by Gordon Ross 20 days ago

  • Description updated (diff)
Actions #3

Updated by Gordon Ross 20 days ago

  • Difficulty changed from Medium to Bite-size
Actions #4

Updated by Electric Monk 13 days ago

  • Gerrit CR set to 1439
Actions

Also available in: Atom PDF