OSMMsgRegister(D3i2o)
OSMMsgRegister --
register an OSM with the message layer
Synopsis
#include <sys/types.h>
#include <i2o/i2omsg.h>
#include <i2o/common.h>
unsigned long OSMMsgRegister(uint_t
count, OSMCbCookie_t *
base_cookie, OSMCbCookie_t *
cookies, void (**
CbFuncArray)(int, I2O_MESSAGE_FRAME *))
Description
OSMMsgRegister registers an OSM with the message layer.
Arguments
count-
The number of callback routines.
base_cookie-
A pointer to an address where the message layer will write
the base cookie. This is used to deregister the OSM.
cookies-
An array where the message layer will write count cookies.
These should be placed in the
Initiator_context
field of a
message that will generate a reply.
CbFuncArray-
An array containing the callback functions to be registered.
Each cookie in the cookie array corresponds to one callback function.
Return values
SUCCESS-
The function succeeded.
ENOMEM-
Unable to get memory for internal structures, or too many OSMs
trying to register.
EINVAL-
Bad IOP number.
Usage
When an OSM registers with the message layer, it calls
OSMMsgRegister to register all its callback functions.
These are the routines that are to be run when a message reply is received.
If the OSM wishes to handle the dispatch of callbacks itself,
it should register the correct number of callback routines,
but place the address of the common callback handler in each
entry in the CbFuncArray.
The InitiatorContext
field of the reply message
will contain the cookie placed in the request message.
Context
All contexts
Synchronization constraints
Does not block.
Driver-defined basic locks, read/write locks, and sleep locks may be held
across calls to this function.
Hardware applicability
All
Version applicability
i2omsg: in HDK Technical Reference
2
Differences between versions
None
References
Intro(D3i2o),
OSMMsgDeRegister(D3i2o)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005