ASTRST

Restore the contents of work areas used as the result of an AST

 

 

VSupported on OpenVMS

 

xcall ASTRST

Discussion

The ASTRST subroutine restores the contents of work areas used by a Synergy DBL subroutine executed as the result of an AST (asynchronous system trap).

The ASTRST subroutine is called only during the execution of an AST subroutine, and it must be the last statement executed in the subroutine before the RETURN statement.

The counterpart to the ASTRST subroutine is the ASTSAV subroutine, which must be executed at the beginning of the AST subroutine.

AST support in Synergy DBL

Synergy DBL fully supports AST routines written in any of the re-entrant OpenVMS languages. These AST routines must comply with the limitations of the language in which they are written and with the limitations of OpenVMS in regard to asynchronous processing.

A number of obstacles prevent unhindered use of Synergy DBL at the AST level. Although the Synergy DBL implementation allows for external asynchronous processing at the language statement level, the non-re-entrancy of some statement processors prevent it from being allowed at the system level. What this means is that the Synergy developer is allowed to do an implied XCALL or function reference “underneath” a Synergy program between Synergy DBL statements, but not during some of those statements. Since OpenVMS generates ASTs asynchronously at the system level, some Synergy DBL statements cannot be supported at the AST level.

The reason for this is that the Synergy runtime makes extensive use (from the C standpoint) of “static” data. A Synergy DBL routine running at the AST level could corrupt the static data areas used by the currently active Synergy DBL statement that’s being processed at the non-AST level.

Another problem is that the Synergy runtime is implemented in C, and certain C runtime functions are not re-entrant for similar reasons.

The following operations should not be performed in Synergy DBL AST routines:

By noting the above limitations and using the ASTSAV and ASTRST subroutines, AST service subroutines can be implemented in Synergy DBL.

See also

ASTSAV routine