Article 4703 of vmsnet.internals: In article <31C20B53.670@airmail.net>, Chris Scheers writes: > Neill Clift wrote: >> >> In article <31C12243.5EE4@airmail.net>, Chris Scheers writes: >> > What is the correct, i.e., safe, way to translate system logical names >> > from within a device driver? That is, at fork IPL. >> > >> >> I think the answer is that this is going to be very difficult (I should say >> impossible but nothing is really). The structures are paged so can't be >> accessed by code running at above IPL 2. The structures are protected by a >> mutex that is grabbed using the normal mutex locking code and so requires >> process context if there is contention. You wont necessarily have process >> context in the driver. You could use the system context mutex locking code but >> you have to do the retry yourself. Forget it its too hard. > > > I can handle the MUTEX problem with SCH$LOCKREXEC and retry when > necessary. > > Are the structures really paged? For some reason, I thought the LNMB and > LNMTH structures were in non-paged memory. Is this incorrect? Is > LNM$SEARCHLOG safe to use? > I just got the books out. Internals and data structures for the Alpha version 1.5 page 1313 says: A process-private LNMB is allocated from the process allocation region. an LNMB for a sharable logical name must be accessible by multiple processes and is allocated from paged pool. Page 738 tells us that the process allocation region: Contains variable length data structures that are used only by a single process and are not required to be permanently memory-resident. Process allocation pages are pageable. It says exacly the same thing in the VAX version. Now checking the listings we find an LNMB is allocated via a call to exe$alopaged and exe$alop1proc. Now just in case your still not convinced get a very idle system: $ sh mem/out=a.b $ ass a c/sys $ sh mem/out=a.b $ diff a.b ************ File $DISK1:[NEILL]A.B;17 1 System Memory Resources on 15-JUN-1996 04:31:14.09 2 Physical Memory Usage (pages): Total Free In Use Mo 3 Main Memory (32.00Mb) 65536 19147 44198 4 Virtual I/O Cache Usage (pages): Total Free In Use M ****** File $DISK1:[NEILL]A.B;16 1 System Memory Resources on 15-JUN-1996 04:31:07.70 2 Physical Memory Usage (pages): Total Free In Use Mo 3 Main Memory (32.00Mb) 65536 19147 44201 4 Virtual I/O Cache Usage (pages): Total Free In Use M ************ ************ File $DISK1:[NEILL]A.B;17 11 Paged Dynamic Memory 930304 514944 415360 51 12 Paging File Usage (pages): Free Reservable ****** File $DISK1:[NEILL]A.B;16 11 Paged Dynamic Memory 930304 514976 415328 51 12 Paging File Usage (pages): Free Reservable ************ ************ File $DISK1:[NEILL]A.B;17 15 DISK$MACRO_VMS:[SYS0.SYSEXE]PAGEFILE.SYS 93597 53440 10 16 MACRO$DKA500:[SYSEXE]PAGEFILE.SYS;1 91138 51478 10 ****** File $DISK1:[NEILL]A.B;16 15 DISK$MACRO_VMS:[SYS0.SYSEXE]PAGEFILE.SYS 93597 53417 10 16 MACRO$DKA500:[SYSEXE]PAGEFILE.SYS;1 91138 51478 10 ************ Number of difference sections found: 3 Number of difference records found: 5 Forget it its too hard. Neill. -- Neill Clift neill@macro.demon.co.uk