home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!munnari.oz.au!sol.deakin.OZ.AU!news.cs.uow.edu.au!cssc-syd.tansu.com.au!boar!brianm
- From: brianm@boar.tansu.com.au (Brian Martin)
- Subject: Re: $QIO: What happens within?
- Message-ID: <1992Dec18.023236.11252@cssc-syd.tansu.com.au>
- Sender: news@cssc-syd.tansu.com.au
- Nntp-Posting-Host: boar.cssc-syd.tansu.com.au
- Reply-To: brianm@boar.tansu.com.au
- Organization: AOTC - CSSC
- References: <9212151432.AB02522@uu3.psi.com>
- Date: Fri, 18 Dec 1992 02:32:36 GMT
- Lines: 30
-
- re: $QIO: What happens within?
-
- I am unsure who posted the original question, I've seen only Jerry Leichter's
- reply, which I generally agree with.
- Without wishing to contradict, I hope the following is useful ...
-
- QIO's can be done in many ways, depending on the IO driver. In the case of mailboxes
- (MBX) especially, you should read both SYS$QIO() in System Services manl,
- and also Mailbox Driver support in I/O Users Manual.
- Note that physical/logical/virtual i/o are treated the same by VMS MBX driver.
- Note the special optimisation in the driver, which is that when you QIO write to
- a MBX, if a pending read is already outstanding, then the data is copied directly
- to the pending reads buffer (normally in another tasks address space) without
- ever going through the (system allocated) buffers which store the MBX proper.
- How literally this is true I do not know, but it seems borne out in practice,
- and is explained (very badly) in the I/O users manual, and again in incredible detail
- in the "VMS Internals" book (author ?).
- If there is no pending read, then the data is actually copied into the MBX buffer,
- and at a later time copied from there into the readers specified buffer.
-
- When using QIO (not QIOW) the only safe way is to use either globals or malloc'd
- space, for the read/write buffers, the lengths, and the IOSB blocks if used.
- Finally check the status of the original QIO, the status of the IOSB on completion,
- & the length actually read/written in the IOSB against what you requested.
-
- Hope that helps.
- Brian Martin
- brianm@cssc-syd.tansu.com.au
-
-
-