GIO_submit
Application Program Interface
2-133
C Interface
Syntax
status = GIO_submit(gioChan, cmd, bufp, *pSize, *appCallback);
Parameters
GIO_Handle gioChan; /* handle to an instance of the device */
Uns
cmd
/* specified mini-driver command */
Ptr
bufp
/* pointer to data structure for buffer data */
size_t
*pSize
/* pointer to size of bufp structure */
GIO_AppCallback *appCallback /* pointer to callback structure */
Return Value
Int
status;
/* returns IOM_COMPLETED if successful */
Description
GIO_submit is not typically called by applications. Instead, it is used
internally and for user-defined extensions to the GIO module.
GIO_read and GIO_write are macros that call GIO_submit with
appCallback set to NULL. This causes GIO to complete the I/O request
synchronously using its internal synchronization object (by default, a
semaphore). If appCallback is non-NULL, the specified callback is called
without blocking. This API is provided to extend GIO functionality for use
with SWI threads without changing the GIO implementation.
The gioChan parameter is the handle returned by GIO_create or
GIO_new.
The cmd parameter is one of the command code constants listed in
“Constants, Types, and Structures” on page 2-118. A mini-driver may
add command codes for additional functionality.
The bufp parameter points to a device-defined data structure for passing
buffer data between the device and the application. This structure may
be generic across a domain or specific to a single mini-driver. In some
cases, this parameter may point directly to a buffer that holds the data. In
other cases, this parameter may point to a structure that packages buffer
information, size, offset to be read from, and other device-dependent
data.
The pSize parameter points to the size of the buffer or data structure
pointed to by the bufp parameter. When the function returns, this
parameter points to the number of MADUs transferred to or from the
device. This parameter is relevant only if the bufp parameter points to a
raw data buffer. In cases where it points to a device-defined structure it
is redundant—the size of the structure is known to the mini-driver and the
application. At most, it can be used for error checking.
GIO_submit
Submit a GIO packet to the mini-driver