Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!midway!news From: martin@cs.uchicago.edu Newsgroups: comp.sys.mac.programmer Subject: RAM DRVRs, resLocked, dNeedLock Message-ID: <1991Jan22.230133.19377@midway.uchicago.edu> Date: 22 Jan 91 23:01:33 GMT Sender: news@midway.uchicago.edu (News Administrator) Reply-To: martin@cs.uchicago.edu Organization: University of Chicago Lines: 31 I'm unclear about the relationship between RAM DRVRs, resLocked, and dNeedLock. Specifically: Does a resLocked DRVR effectively have dNeedLock? Does a dNeedLock DRVR effectively have resLocked? Isn't a DRVR always locked anyway between OpenDriver and CloseDriver? My hypotheses are: Yes, No (not necessarily locked before OpenDriver and after CloseDriver), and Yes. Now for some examples: The DRVR patches traps when opened and removes them when closed. Use dNeedLock? The DRVR patches traps when opened which remain when closed. Use resLocked? The DRVR does no patches. Neither resLocked nor dNeedLocked are necessary? What all this is getting at is, if the DRVR needs resLocked or dNeedLock, how should it be handled so as to cause the least fragmentation to the heap? I.e., after: drvr := Get1Resource ('DRVR', id); If the DRVR is resLocked, then its placement in the heap seems somewhat random. Would a MoveHHi before locking have been appropriate? Thanks for all advice. Charles Martin // martin@cs.uchicago.edu