delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/11/03:01:17

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Why should lock function
Date: 11 Dec 1997 06:04:51 GMT
Organization: The National Capital FreeNet
Lines: 18
Message-ID: <66nvq3$bl4@freenet-news.carleton.ca>
References: <Pine DOT A41 DOT 3 DOT 96a DOT 971210184935 DOT 49018A-100000 AT dante15 DOT u DOT washington DOT edu>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
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.

Signal handlers, interrupt handlers, any functions called from the above
(directly or indirectly), all need to be locked or the machine will hang.
Variables touched (read from OR written to) in same contexts, likewise but
with LOCK_VARIABLE. Functions mentioned mustn't call libc functions that
might call DOS functions or machine will hang.

These locking functions are from Allegro BTW, so Allegro is needed to use
them. (They are just wrappers for _dpmi_xxxx functions in libc though.)

--
    .*.  Friendship, companionship, love, and having fun are the reasons for
 -()  <  life. All else; sex, money, fame, etc.; are just to get/express these.
    `*'  Send any and all mail with attachments to the hotmail address please.
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca pgd73 AT hotmail DOT com

- Raw text -


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