home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / vms / 12594 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.os.vms
  2. 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
  3. From: critz@star.enet.dec.com (Richard Critz)
  4. Subject: Re: Tracing mailbox access
  5. Message-ID: <1992Jul21.183529.28463@nntpd.lkg.dec.com>
  6. Lines: 28
  7. Sender: usenet@nntpd.lkg.dec.com (USENET News System)
  8. Reply-To: critz@star.enet.dec.com (Richard Critz)
  9. Organization: Digital Equipment Corporation, Nashua, NH
  10. References:  <9207211132.AA26821@genrad.com>
  11. Date: Tue, 21 Jul 1992 18:35:29 GMT
  12.  
  13.  
  14. In article <9207211132.AA26821@genrad.com>, dongray@cdclu1.genrad.com (Derek Dongray) writes:
  15. ||>    movl    4(ap),r0        ; passed mbx_chan by value
  16. |>    movl    g^ctl$gl_ccbbase,r1    ; get channel base
  17. |>    subl    r0,r1            ; now point to required CCB
  18. |>    movl    (r1),ucbaddr        ; extract UCB pointer
  19.  
  20. DON'T DO THIS!  Use IOC$VERIFYCHAN, instead, to get the CCB address for a 
  21. particular channel number.  If you don't (use the routine interface), you
  22. will regret it at some point in the future.  (For those detractors of
  23. IOC$VERIFYCHAN who claim it is unuseful because of its "previous mode"
  24. access check, please note:  1) it is callable from any mode, 2) it returns
  25. the CCB address even if the access mode check fails).
  26.  
  27. The code above then becomes:
  28.  
  29.     movzwl    4(ap),r0
  30.     jsb    g^ioc$verifychan
  31.     movl    ccb$l_ucb(r1),ucbaddr
  32.  
  33. Note the use of the CCB symbols.  Don't assume that the UCB address will
  34. always be the first thing in the CCB.  The symbols are defined in $CCBDEF
  35. which is in LIB.MLB.
  36. --
  37. -----------------------------------------------------------------------------
  38. Richard Critz                          critz@star.enet.dec.com
  39.       -- I speak only for myself; I make no commitments for Digital. --
  40. -----------------------------------------------------------------------------
  41.