DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_cb_alloc_dynamic(3udi)


Allocate a control block with variable inline layout

SYNOPSIS

#include <udi.h>

void udi_cb_alloc_dynamic (

	udi_cb_alloc_call_t *callback,

	udi_cb_t *gcb,

	udi_index_t cb_idx,

	udi_channel_t default_channel,

	udi_size_t inline_size,

	udi_layout_t *inline_layout );
 
typedef void udi_cb_alloc_call_t (

	udi_cb_t *gcb,

	udi_cb_t *new_cb );
 

ARGUMENTS callback, gcb are standard arguments described in the "Asynchronous Service Calls" section of "Calling Sequence and Naming Conventions".

cb_idx are the same arguments as used in udi_cb_alloc.

default_channel

new_cb

inline_size is the size of the previously unspecified inline structure for this cb_idx.

inline_layout is the layout of the previously unspecified inline structure for this cb_idx. Must be NULL if the control block layout does not include UDI_DL_INLINE_DRIVER_TYPED.

DESCRIPTION udi_cb_alloc_dynamic behaves like udi_cb_alloc, except that it allows the driver to specify the size and layout of an inline structure for the control block that was left unspecified in the driver's udi_cb_init_t structure with the given cb_idx.

The inline_size and inline_layout members of the corresponding udi_cb_init_t structure (see page 10-11) must have been set to zero and NULL, respectively, and the control block layout must include exactly one UDI_DL_INLINE_UNTYPED, UDI_DL_INLINE_TYPED, or UDI_DL_INLINE_DRIVER_TYPED layout element.

It is recommended that udi_cb_alloc be used instead of udi_cb_alloc_dynamic if possible, as it's likely to be faster, but if the layout is not known statically, udi_cb_alloc_dynamic must be used.

warnings Use of the inline_layout parameter must conform to the rules described in Section 5.2.1.1, "Using Memory Pointers with Asynchronous Service Calls".

REFERENCES udi_cb_t, udi_cb_alloc, udi_layout_t, udi_init_info, udi_cb_init_t


UDI Core Specification Contents