From: Vic Newsgroups: comp.os.msdos.djgpp Subject: Re: Why should lock function Date: Tue, 16 Dec 1997 16:10:05 -0500 Organization: Communications Accessibles Montreal, Quebec Canada Lines: 10 Message-ID: <3496EE2D.3C51@cam.org> References: <19971216195400 DOT OAA22689 AT ladder02 DOT news DOT aol DOT com> NNTP-Posting-Host: dialup-24.usrx2.cam.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > >Can someone tell me the rule of locking a function and what kind of > >functions should be locked. Thanx. Well, you are working under a 32 bit environment. Things can be swapped to disk. BUT if you are writing an interrupt handler, that function MUSN'T be swapped, otherwise the handler will call an invalid adress (since your function is not in memory anymore) and your proggie will crash. Locking the function means it will never be swapped to disk. The same goes for all the data you use in that interrupt handler. -- --> http://www.cam.org/~tudor <--