Consultor Eletrônico



Kbase 12796: Asynchronous System Traps AST with VAX/VMS and HLI/HLC 6.2N
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Asynchronous System Traps AST with VAX/VMS and HLI/HLC 6.2N

Last Updated: January 13, 1993
SUBJECT: ASYNCHRONOUS SYSTEM TRAPS (AST) WITH 6.2N VAX/VMS


Progress Software does NOT support PROGRESS function calls
from Asynchronous System Trap (AST) level. This is because
PROGRESS depends on the delivery of user-mode AST's to
receive notification of the completion of asynchronous
events. If a user-program makes a PROGRESS function call
from the AST level and the PROGRESS function relies on AST
delivery, the PROGRESS function will never complete, since
AST delivery is disabled while the process is at AST level.

Instead of directly calling PROGRESS functions from AST
level, user-programs should set flags or use an event-queue
at AST level to indicate which action to perform and
sys$wake the mainline code which is waiting in a sys$hiber.
When the mainline code wakes, it examines the flags or the
queue and performs the indicated action. The following
pseudo-code illustrates this technique:


BEGIN AST A
put "A" into queue.
sys$wake.
return.
END AST A.

BEGIN AST B.
put "B" into queue.
sys$wake.
return.
END AST B.

MAINLINE
initilize queue.
call startup.
done = false.
while not done:
sys$hiber.
while not done and something in queue:
remove item from queue.
if item is "A"
call A.
else if item is "B"
done = true.
end if.
end while.
end while.

return.
END MAINLINE.


Depending on the application other VMS facilities (for example, locks,
event-flags, mailboxes) can be used instead of ASTs.

Progress Software Technical Support Note # 12796