User`s manual

External Routines
C-4 Single Board Computers SCSI Software UserÕs Manual
C
ret_stat
NAME
ret_stat ÑNotify User of Command Completion
SYNOPSIS
void ret_stat(cmd)
struct siop_struc *cmd; /* completed command structure */
DESCRIPTION
The ret_stat routine is user-supplied code which executes when a command
request to the Firmware is completed. A pointer to this routine must be
installed in the status_ptr field of each siop_struc used by the Firmware. This
routine should check the status field of the returned siop_struc to determine if
any errors occurred.
The firmware calls this routine as a "C" function and passes the address of the
finished command structure to it. For example:
void (* ret_stat)(); /* define ret_stat */
ret_stat = siop_struc->ret_stat; /* init ret_stat */
ret_stat(&siop_struc); /* call routine */
RETURN VALUE
none
ERROR CONDITIONS
none
NOTES
The user cannot lower the interrupt mask while in this routine.
The Firmware has not completed command clean up when this routine is
invoked; therefore, the user is required to exit this routine as a normal function
call to return the processor to the Firmware.
Since the Firmware calls this routine by address reference, this routine can be
any name. A different ret_stat routine may be used for each command
request.
The user may call siop_cmd() while in this routine.