Skip Navigation Links | |
Exit Print View | |
man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 11.1 Information Library |
csx_AccessConfigurationRegister(9F)
csx_Parse_CISTPL_BYTEORDER(9F)
csx_Parse_CISTPL_CFTABLE_ENTRY(9F)
csx_Parse_CISTPL_DEVICEGEO(9F)
csx_Parse_CISTPL_DEVICEGEO_A(9F)
csx_Parse_CISTPL_DEVICE_OA(9F)
csx_Parse_CISTPL_DEVICE_OC(9F)
csx_Parse_CISTPL_LINKTARGET(9F)
csx_Parse_CISTPL_LONGLINK_A(9F)
csx_Parse_CISTPL_LONGLINK_C(9F)
csx_Parse_CISTPL_LONGLINK_MFC(9F)
ddi_get_soft_iblock_cookie(9F)
ddi_intr_get_supported_types(9F)
ddi_prop_lookup_byte_array(9F)
ddi_prop_lookup_int64_array(9F)
ddi_prop_lookup_string_array(9F)
ddi_prop_update_byte_array(9F)
ddi_prop_update_int64_array(9F)
ddi_prop_update_string_array(9F)
ldi_prop_lookup_byte_array(9F)
ldi_prop_lookup_int64_array(9F)
ldi_prop_lookup_string_array(9F)
mac_prop_info_set_default_link_flowctrl(9F)
mac_prop_info_set_default_str(9F)
mac_prop_info_set_default_uint8(9F)
mac_prop_info_set_range_uint32(9F)
net_event_notify_unregister(9F)
net_instance_notify_register(9F)
net_instance_notify_unregister(9F)
net_instance_protocol_unregister(9F)
net_protocol_notify_register(9F)
nvlist_lookup_boolean_array(9F)
nvlist_lookup_boolean_value(9F)
nvlist_lookup_nvlist_array(9F)
nvlist_lookup_string_array(9F)
nvlist_lookup_uint16_array(9F)
nvlist_lookup_uint32_array(9F)
nvlist_lookup_uint64_array(9F)
nvpair_value_boolean_array(9F)
pci_plist_lookup_int16_array(9F)
pci_plist_lookup_int32_array(9F)
pci_plist_lookup_int64_array(9F)
pci_plist_lookup_int8_array(9F)
pci_plist_lookup_string_array(9F)
pci_plist_lookup_uint16_array(9F)
pci_plist_lookup_uint32_array(9F)
pci_plist_lookup_uint64_array(9F)
pci_plist_lookup_uint8_array(9F)
scsi_get_device_type_scsi_options(9F)
scsi_get_device_type_string(9F)
scsi_sense_cmdspecific_uint64(9F)
usb_get_current_frame_number(9F)
usb_get_max_pkts_per_isoc_request(9F)
usb_pipe_get_max_bulk_transfer_size(9F)
usb_pipe_stop_intr_polling(9F)
usb_pipe_stop_isoc_polling(9F)
- allocate a message block using a caller-supplied buffer
#include <sys/stream.h> mblk_t *esballoc(uchar_t *base, size_t size, uint_t pri, frtn_t *fr_rtnp);
mblk_t *desballoc(uchar_t *base, size_t size, uint_t pri, frtn_t *fr_rtnp);
esballoc(): Architecture independent level 1 (DDI/DKI)
desballoc(): Solaris DDI specific (Solaris DDI)
Address of caller-supplied data buffer.
Number of bytes in data buffer.
Priority of the request (no longer used).
Free routine data structure.
The esballoc() and desballoc() functions operate identically to allocb(9F), except that the data buffer to associate with the message is specified by the caller. The allocated message will have both the b_wptr and b_rptr set to the supplied data buffer starting at base. Only the buffer itself can be specified by the caller. The message block and data block header are allocated as if by allocb(9F).
When freeb(9F) is called to free the message, the driver's message-freeing routine, referenced through the free_rtn(9S) structure, is called with appropriate arguments to free the data buffer.
The free_rtn(9S) structure includes the following members:
void (*free_func)(); /* caller's freeing routine */ caddr_t free_arg; /* argument to free_func() */
Instead of requiring a specific number of arguments, the free_arg field is defined of type caddr_t. This way, the driver can pass a pointer to a structure if more than one argument is needed.
If esballoc() was used, then free_func will be called asynchronously at some point after the message is no longer referenced. If desballoc() was used, then free_func will be called synchronously by the thread releasing the final reference. See freeb(9F).
The free_func routine must not sleep, and must not access any dynamically allocated data structures that could be freed before or during its execution. In addition, because messages allocated with desballoc() are freed in the context of the caller, free_func must not call another module's put procedure, or attempt to acquire a private module lock which might be held by another thread across a call to a STREAMS utility routine that could free a message block. Finally, free_func routines specified using desballoc may run in interrupt context and thus must only use synchronization primitives that include an interrupt priority returned from ddi_intr_get_pri(9F) or ddi_intr_get_softint_pri(9F). If any of these restrictions are not followed, the possibility of lock recursion or deadlock exists.
On success, a pointer to the newly allocated message block is returned. On failure, NULL is returned.
The esballoc() and desballoc() functions can be called from user, interrupt, or kernel context.
See attributes(5) for descriptions of the following attributes:
|
allocb(9F), ddi_intr_get_pri(9F), ddi_intr_get_softint_pri(9F), freeb(9F), datab(9S), free_rtn(9S)