Specifications

Operating System Routines
COM$SETATTNAST
Description
A driver FDT routine calls COM$SETATTNAST to service a $QIO request that
specifies a set-attention-AST function.
If the p1 argument of the request contains a zero, COM$SETATTNAST transfers
control to COM$FLUSHATTNS, which disables all ASTs indicated by the PID
and I/O channel number (IRP$W_CHAN). COM$FLUSHATTNS searches through
the AST control block (ACB) list, extracts each identified ACB, deallocates, and
returns to the caller of COM$SETATTNAST.
If the p1 argument of the request contains the address of an AST routine,
COM$SETATTNAST decrements PCB$W_ASTCNT and allocates an expanded
AST control block (ACB) that contains the following information:
Spinlock index SPL$C_QUEUEAST
Address of the AST routine (as specified in p1)
AST parameter (as specified in p2)
Access mode (as specified in p3 and maximized against the current process’s
access mode and bit ACB$V_QUOTA set to indicate a process-requested AST)
Number of the assigned I/O channel
PID of the requesting process
COM$SETATTNAST links the ACB to the start of the specified linked list
of ACBs located in a UCB extension area. (See Section 1.19 for information
on defining an extension to a UCB.) COM$DELATTNAST can later use the
expanded ACB to fork to IPL$_QUEUEAST, at which IPL it reformats the block
into a standard ACB.
If the process exceeds buffered I/O or AST quotas, or if there is no memory
available to allocate the expanded ACB, COM$SETATTNAST restores PCB$W_
ASTCNT to its original value and transfers control to EXE$ABORTIO with error
status.
3–9