delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/11/13:03:41

Xref: news2.mv.net comp.os.msdos.djgpp:4842
From: Shawn Hargreaves <slh100 AT york DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Static variables in an Interrupt service routine
Date: Tue, 11 Jun 1996 11:03:00 +0100
Organization: The University of York, UK
Lines: 20
Message-ID: <Pine.SGI.3.91.960611105300.939D-100000@tower.york.ac.uk>
NNTP-Posting-Host: tower.york.ac.uk
Mime-Version: 1.0
In-Reply-To: <4pgnh5$ub@newsfeed.cs.auc.dk>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 10 Jun 1996, Frank Frederiksen wrote:

> I am doing some processing on some hardware interrupts, and during
> the programming, I came to wonder if a static variable, declared
> inside the function, gets locked along with the code locking
> (with _go32_dpmi_lock_code(x,l);) or is it has to be declared and
> locked as all the other global variables?

It almost certainly won't get locked. Have a look at the asm output when 
you compile your file with -S, and you will see that the static data isn't
literally placed 'inside' your function. In order to lock it you will 
have to make it global...


/*
 *	Shawn Hargreaves.        Why is 'phonetic' spelt with a ph?
 *	Check out Allegro and FED on http://www.york.ac.uk/~slh100/
 */


- Raw text -


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