delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/17/23:15:19

From: Vic <tudor AT cam DOT org>
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: <Pine DOT A41 DOT 3 DOT 96a DOT 971210184935 DOT 49018A-100000 AT dante15 DOT u DOT washington DOT edu> <19971216195400 DOT OAA22689 AT ladder02 DOT news DOT aol DOT com>
NNTP-Posting-Host: dialup-24.usrx2.cam.org
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> >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 <--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019