From: utzoo!decvax!ucbvax!info-vax Newsgroups: fa.info-vax Title: Re: AST queueing from VMS device drivers Article-I.D.: ucbvax.317 Posted: Fri Dec 10 02:55:51 1982 Received: Sun Dec 12 13:42:39 1982 >From rice!wert@lbl-unix Fri Dec 10 02:50:06 1982 Mail-From: ARPANET host LBL-UNIX rcvd at 9-Dec-82 1324-PST To: rice!lbl-unix!lars@ACC Cc: rice!lbl-unix!info-vax@sri-csl In-Reply-To: lars's message of 7 Dec 1982 at 0830-PST Remailed-Date: 9 Dec 1982 2209-PST Remailed-From: the tty of Geoffrey S. Goodfellow Remailed-To: Info-VAX@SRI-CSL: ; If all you want to do is issue an AST to the process, you can do this from one of two modes: 1) The first mode operates as follows: The process issues a qio call which causes the creation of an attention AST. When the device driver decides that an attention condition exists, the list of attention ASTs is delivered to all processes with requests. This list is flushed; that is, each process has to reenable the attention AST to obtain futher notifications. This is the mode in which the control C attentions are handled. There are several VMS supplied routines to handle this mode (see the routines COM$SETATTNAST, COM$DELATTNAST, COM$FLUSHATTNS). 2) The second mode works as follows (this is harder): The process enables (once) an AST to be delivered during device attention conditions. This enable will last for the entire life of the channel. When a device attention condition arises, an ACB is constructed and delivered to the process. This method is harder because an ACB cannot be allocated from non-paged pool while at device IPL. But, it could be done by dropping to device driver IPL (the software levels) by one of various schemes. The preferred method is (1). It is easier, and it gets around recursion in device attention handlers. I have a driver for a pseudo device which we use to deliver "signals" to processes which wish to receive them. It uses a variant of (1), except that it does the work by hand. We use it in our unix emulation that we are developing here. I could send it to you, if you wish an example. Most of this information comes from the "VAX/VMS Internals and Data Structures" manual, from DEC, and, of course, the Guide to Writing a Device Driver. But most of the mechanisms involved did not become clear until we read the internals manual.