DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_channel_anchor(3udi)


Anchor a channel to the current region

SYNOPSIS

#include <udi.h>

void udi_channel_anchor (

	udi_channel_anchor_call_t *callback,

	udi_cb_t *gcb,

	udi_channel_t channel, 

	udi_index_t ops_idx,

	void *channel_context );
 
typedef void udi_channel_anchor_call_t (

	udi_cb_t *gcb, 

	udi_channel_t anchored_channel );
 

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

channel is the channel handle for the loose end to be anchored. Once udi_channel_anchor is called, the driver may no longer use this handle.

ops_idx is an ops index for the ops vector that the driver wants to associate with the specified channel, as indicated by the appropriate udi_ops_init_t in udi_init_info. ops_idx must be non-zero.

channel_context is a channel context pointer to be associated with the anchored channel endpoint.

anchored_channel is the new channel handle for the now-anchored channel endpoint. This handle must subsequently be used to access the channel, rather than the original handle passed to udi_channel_anchor.

WARNINGS Control block usage must follow the rules described in the "Asynchronous Service Calls" section of "Calling Sequence and Naming Conventions".

DESCRIPTION udi_channel_anchor is used to anchor a loose channel end to the current region. Loose ends may be passed to a driver from another region, or as the result of a udi_channel_spawn request. Management channels, external bind channels between driver instances, and internal bind channels between primary and secondary regions are always pre-anchored.

Once anchored, the channel endpoint is permanently associated with the current region, and has an associated ops vector and channel context. Loose ends may be anchored, but anchored ends may not be made loose.

Loose ends may be passed between regions as parameters to channel operations. Anchored ends may not.

When the anchoring is complete, the UDI environment will invoke the callback to notify the requestor of the completion, and return ownership of the control block (gcb) to the driver.

Once both ends of the channel are anchored, the channel may be used for communication, by invoking channel operations. Drivers must ensure that both ends are anchored and ready to go before invoking any operations on the channel. This is typically done via metalanguage-specific handshaking on another channel.

REFERENCES udi_init_info, udi_cancel, udi_channel_spawn


UDI Core Specification Contents