DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_mei_op_template_t(3udi)


Metalanguage channel op template

SYNOPSIS

#include <udi.h>

typedef const struct {

	const char *op_name;

	udi_ubit8_t op_category;

	udi_ubit8_t op_flags;

	udi_index_t meta_cb_num;

	udi_index_t completion_ops_num;

	udi_index_t completion_vec_idx;

	udi_index_t exception_ops_num;

	udi_index_t exception_vec_idx;

	udi_mei_direct_stub_t *direct_stub;

	udi_mei_backend_stub_t *backend_stub;

	udi_layout_t *visible_layout;

	udi_layout_t *marshal_layout;

} udi_mei_op_template_t;
 
/* Values for op_category */
 
#define  UDI_MEI_OPCAT_REQ				1
 
#define  UDI_MEI_OPCAT_ACK				2
 
#define  UDI_MEI_OPCAT_NAK				3
 
#define  UDI_MEI_OPCAT_IND				4
 
#define  UDI_MEI_OPCAT_RES				5
 
#define  UDI_MEI_OPCAT_RDY				6
 
/* Values for op_flags */
 
#define UDI_MEI_OP_ABORTABLE (1U<<0) #define UDI_MEI_OP_RECOVERABLE (1U<<1) #define UDI_MEI_OP_STATE_CHANGE (1U<<2)
/* Maximum Sizes For Control Block Layouts */
 
#define UDI_MEI_MAX_VISIBLE_SIZE 2000 #define UDI_MEI_MAX_MARSHAL_SIZE 4000

MEMBERS op_name is the name of the entry point for the channel operation (exactly as documented for that operation; e.g. "udi_gio_xfer_req" for udi_gio_xfer_req), or NULL to terminate the op_template_list list to which this structure belongs (see udi_mei_ops_vec_template_t). Some environments may use this information to selectively trace channel operations. If op_name is NULL, all other members of this structure are ignored.

op_category is a number that identifies the category of the channel op described by this template, as indicated by its suffix. Channel op suffixes are described in Section 23.3, "Channel Operation Suffixes". Some environments may use this information to selectively trace channel operations.

op_flags is a bitmask of optional flags for this template, described below.

meta_cb_num is a number that identifies the control block group used with this operation, with respect to others in this metalanguage. It must be greater than zero.

completion_ops_num is a number that identifies the ops vector type that contains the completion operation, if any, that is the normal response to this operation. If zero, then there is no such response operation; otherwise, completion_ops_num must match a meta_ops_num in a udi_mei_ops_vec_template_t for this metalanguage.

completion_vec_idx is a number that identifies the index within the above ops vector that contains the function pointer for the completion operation, if any, that is the normal response to this operation, starting from zero. This is used if and only if completion_ops_num is non-zero.

exception_ops_num is a number that identifies the ops vector type that contains the exception operation, if any, that is the error response to this operation. If zero, then there is no such response operation; otherwise, completion_ops_num must match a meta_ops_num in a udi_mei_ops_vec_template_t for this metalanguage.

exception_vec_idx is a number that identifies the index within the above ops vector that contains the function pointer for the exception operation, if any, that is the error response to this operation, starting from zero. This is used if and only if exception_ops_num is non-zero.

direct_stub is a pointer to the function that implements the direct-call stub for this operation.

backend_stub is a pointer to the function that implements the back-end stub for this operation.

visible_layout is a pointer to the layout specifier for the visible part of the control block type used with this operation, excluding the generic udi_cb_t header.

marshal_layout is a pointer to the layout specifier for any marshalling space used to marshal extra parameters for this operation.

DESCRIPTION The udi_mei_ops_template_t structure contains information describing the metalanguage-specific properties of a channel operation and its associated control block type.

The visible size of any control block, as indicated by visible_layout, including the udi_cb_t header, must not exceed UDI_MEI_MAX_VISIBLE_SIZE (2000 bytes).

The size, in bytes, needed to marshal call-dependent parameters for any operation, as indicated by marshal_layout, must not exceed UDI_MEI_MAX_MARSHAL_SIZE (4000 bytes).

The environment can compute the maximum visible and marshal sizes for a control block group by aggregating across all occurrences of the meta_cb_num in the ops_vec_template_list.

If and only if op_flags includes UDI_MEI_OP_ABORTABLE, the channel operation described by this structure is abortable, and drivers may use udi_channel_op_abort to abort control blocks previously passed to this operation. The udi_channel_op_abort service call will deliver a udi_channel_event_ind operation of type UDI_CHANNEL_OP_ABORTED to the target region if the corresponding completion operation (as indicated by completion_ops_num and completion_vec_idx) or exception operation (as indicated by exception_ops_num and exception_vec_idx) has not yet been invoked.

If and only if op_flags includes UDI_MEI_OP_RECOVERABLE, the channel operation described by this structure is recoverable; if an operation of this type has been sent to a region that is abruptly terminated ("region-killed"), and the target region has not yet responded with the corresponding completion or exception operation, then the environment will automatically construct an exception operation to inform the initiating region of the failure, passing it the special status code, UDI_STAT_TERMINATED. If this flag is set, exception_ops_num must be non-zero. and the exception operation must contain exactly one UDI_DL_STATUS_T in either its visible_layout or its marshal_layout.

If and only if op_flags includes UDI_MEI_OP_STATE_CHANGE, the channel operation is considered to cause a change in the metalanguage-related state of the driver. Environments can use this to trace state changes externally to the driver.

warnings If visible_layout includes an inline pointer element (UDI_DL_INLINE_UNTYPED, UDI_DL_INLINE_TYPED, or UDI_DL_INLINE_DRIVER_TYPED), there must be exactly one op_template for this meta_cb_num of this metalanguage.

The marshal_layout specifier must include no inline pointers.

references udi_mei_ops_vec_template_t, udi_cb_t, udi_layout_t, udi_mei_direct_stub_t, udi_mei_backend_stub_t


UDI Core Specification Contents