From: qball1723 AT aol DOT com (QBall1723) Newsgroups: comp.os.msdos.djgpp Subject: Re: Why should lock function Date: 16 Dec 1997 19:54:07 GMT Lines: 36 Message-ID: <19971216195400.OAA22689@ladder02.news.aol.com> NNTP-Posting-Host: ladder02.news.aol.com Organization: AOL http://www.aol.com References: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk >Hi, > i am a novice user of DJGPP and writing codes in PMode. When I >read other's source code of a mouse handler, I find that he locks some of >his functions. Just like: > >static viod function() >{ >....... >} > >END_FUNCTION(function); > >void lock() >{ >LOCK_FUNCTION(function); >} > >Can someone tell me the rule of locking a function and what kind of >functions should be locked. Thanx. > > >KIM. > > When memory starts "paging"... (i.e.: you're using virtual memory.. swapping pages from/to your hard drive)... you have to lock some code and data... otherwise you may crash... A programming bud with more experience than I uses locking for code & data on his: TimerInterruptHandler, KeyboardInterruptHandler,... stuff like that... Jim the loiterer (wannabe PC game/graphics developer) http://members.aol.com/qball1723/index.htm [please don't hate me because I pay too much for poor internet service!!]