home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!mips!decwrl!deccrl!news.crl.dec.com!news!nntpd.lkg.dec.com!star.enet.dec.com!critz
- From: critz@star.enet.dec.com (Richard Critz)
- Subject: Re: Tracing mailbox access
- Message-ID: <1992Jul21.183529.28463@nntpd.lkg.dec.com>
- Lines: 28
- Sender: usenet@nntpd.lkg.dec.com (USENET News System)
- Reply-To: critz@star.enet.dec.com (Richard Critz)
- Organization: Digital Equipment Corporation, Nashua, NH
- References: <9207211132.AA26821@genrad.com>
- Date: Tue, 21 Jul 1992 18:35:29 GMT
-
-
- In article <9207211132.AA26821@genrad.com>, dongray@cdclu1.genrad.com (Derek Dongray) writes:
- ||> movl 4(ap),r0 ; passed mbx_chan by value
- |> movl g^ctl$gl_ccbbase,r1 ; get channel base
- |> subl r0,r1 ; now point to required CCB
- |> movl (r1),ucbaddr ; extract UCB pointer
-
- DON'T DO THIS! Use IOC$VERIFYCHAN, instead, to get the CCB address for a
- particular channel number. If you don't (use the routine interface), you
- will regret it at some point in the future. (For those detractors of
- IOC$VERIFYCHAN who claim it is unuseful because of its "previous mode"
- access check, please note: 1) it is callable from any mode, 2) it returns
- the CCB address even if the access mode check fails).
-
- The code above then becomes:
-
- movzwl 4(ap),r0
- jsb g^ioc$verifychan
- movl ccb$l_ucb(r1),ucbaddr
-
- Note the use of the CCB symbols. Don't assume that the UCB address will
- always be the first thing in the CCB. The symbols are defined in $CCBDEF
- which is in LIB.MLB.
- --
- -----------------------------------------------------------------------------
- Richard Critz critz@star.enet.dec.com
- -- I speak only for myself; I make no commitments for Digital. --
- -----------------------------------------------------------------------------
-