GDSX (Extended General Device Support) Manual
Service Routines
Extended General Device Support (GDSX) Manual—529931-001
8-79
^SIGNALTIMEOUT
Considerations
•
Because the working stack images of tasks are swapped to and from an extended
data segment during I/O operations, I/O must be performed to and from global
buffers.
•
The tag parameter of ^SIGNALTIMEOUT holds the address of the IOCB allocated
when ^SIGNALTIMEOUT or ^SIGNALINTERRUPT was called. It is an INT(32)
variable.
•
^SIGNALTIMEOUT sets CCL if an IOCB cannot be allocated.
•
The entry point ^SIGNALINTERRUPT within ^SIGNALTIMEOUT may be used to
modify the handling of the resultant system message. See the preceding
description of the ^SIGNALINTERRUPT on page 8-77.
Examples
1. This example uses ^AWAITIO[X] to handle a timeout:
CALL ^READUPDATE ( 0 );
IF <> THEN CALL DEBUG; ! DO ERROR HANDLING
CALL ^SIGNALTIMEOUT ( 100D, , , IOCBADDR );
IF < THEN
BEGIN
! NO IOCB AVAILABLE
END
ELSE IF > THEN
BEGIN
! CODING BUG: TIMEOUT PARAMETER ILLEGAL
END;
! WAIT FOR A COMPLETION ON ANY FILE
F := -1;
CALL ^AWAITIO ( F, @WAIT^BUFFER, CNT );
IF <> THEN
CALL ^FILEINFO ( F, ERR )
ELSE
ERR := 0;
IF NOT F THEN
BEGIN
! handle pseudo-$RECEIVE message
IF WAIT^BUFFER[0] = -22 THEN
BEGIN ! HANDLE SIGNALTIMEOUT
! BUFFER ALLOCATED BY TSCODE NEED NOT BE RELEASED
CALL REPLYX( , , , , , IOCBADDR );
! DO OTHER PROCESSING AS DESIRED
END ! HANDLE SIGNALTIMEOUT
ELSE ! A DIFFERENT $RECEIVE MESSAGE?
.
END
ELSE
! handle I/O completion on other open file
.