🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #367

Interrupt Handler Environment?

#367
From: Anne Wilson
Date: Wed, 09 Jan 1991 20:35
23 lines
1703 bytes
--text follows this line--
How is the environment for interrupt handlers different than that of
regular functions, under Unix?  I understand that the system, rather
than the compiler, calls the fuction, but what implications does this
have?

I'm asking this question because of the following problem.  I am writing
in C++, using g++ on a VAX. I have written an interrupt handler, called
recv_Message, which is also member of a class, Message.  The problem is
that when the handler is called, it does not have the correct value
for the other data members of the class.  The only method I have found
for giving it the correct value is to copy the value to a global variable
before the handler is called, and then the handler references the global
variable.  This is not very satisfying!!   and gets messy for muliple
instances of Message objects.

Why does the handler not have the current value of the other data members?
Is using global variables the only way to give it the proper information?

Any help or insight would be appreciated!

Anne Wilson
wilson@mimsy.cs.umd.edu
Technical Details
Message-ID: <29046@mimsy.umd.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!think.com!snorkelwacker.mit.edu!ai-lab!ai.mit.edu!gnulists

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!think.com!snorkelwacker.mit.edu!ai-lab!ai.mit.edu!gnulists
From: wilson@mimsy.umd.edu (Anne Wilson)
Newsgroups: gnu.g++.help,comp.unix.questions,comp.unix.wizards
Subject: Interrupt Handler Environment?
Keywords: interrupts
Message-ID: <29046@mimsy.umd.edu>
Date: 9 Jan 91 20:35:16 GMT
Reply-To: wilson@mimsy.umd.edu (Anne Wilson)
Followup-To: comp.unix.questions
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 23
Approved: info-gnu@prep.ai.mit.edu
To: gnu-g++-bug@uunet.uu.net