SIO_reclaimx
2-406
C Interface
Syntax
nmadus = SIO_reclaimx(stream, *pbufp, *parg, *pfstatus);
Parameters
SIO_Handle stream;
/* stream handle */
Ptr
*pbufp;
/* pointer to the buffer */
Arg
*parg;
/* pointer to a user argument */
Int
*pfstatus; /* pointer to frame status */
Return Value
Int
nmadus; /* number of MADUs or error if negative */
Description
SIO_reclaimx is identical to SIO_reclaim, except that is also returns a
frame-specific status in the Int pointed to by the pfstatus parameter.
The device driver can use the frame-specific status to pass frame-
specific status information to the application. This allows the device driver
to fill in the status for each frame, and gives the application access to that
status.
The returned frame status is valid only if SIO_reclaimx() returns
successfully. If the nmadus value returned is negative, the frame status
should not be considered accurate.
Constraints and
Calling Context
❏
The stream must be created with attrs.model set to
SIO_ISSUERECLAIM.
❏
There must be at least one outstanding SIO_issue when an
SIO_reclaimx call is made.
❏
SIO_reclaimx returns an error if it is called from a SWI when no buffer
is available. SIO_reclaimx does not block if called from a SWI.
❏
All frames issued to a stream must be reclaimed before closing the
stream.
❏
SIO_reclaimx cannot be called from a HWI.
❏
This API is callable from the program’s main() function only if the
stream's configured timeout attribute is 0, or if it is certain that there
is a buffer available to be returned.
See Also
SIO_reclaimx
Request a buffer back from a stream, including frame status