🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5063

Re: Software Interupts

#5063
From: Valentin Pepelea
Date: Tue, 28 Aug 1990 23:15
34 lines
2145 bytes
In article <4689@jato.Jpl.Nasa.Gov> jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson)
writes:
>
>	I was curious if a software interupt posted as a result of a
> message arriving at a message port would take precedence over Wait(),
> WaitPort(), Execute(), and Lock() ?

A message port can be set to have one of four actions performed when a message
arrives. The standard one, on which Wait() and WaitPort() depend, is that a
task gets signaled (PA_SIGNAL). In the struct MsgPort definition:

UBYTE mp_Flags			what action to take (PA_SIGNAL)
UBYTE mp_SigBit			specified the signal bit to be set
struct Task *mp_SigTask		points to the task to be signalled

You may choose to have a software interrupt generated instead (PA_INTERRUPT).
In that case *mp_SigTask points to an Interrupt structure, while the mp_SigBit
field is ignored. Task switching times are much faster for software inteerupts
than tasks, so you might prefer to set up a software interrupt than have a
task signalled to perform an action. Read Carl Sassenrath's "Guru's Guide #1 -
Interrupt" for more information.

You may also choose to have a specific subroutine executed. The *mp_SigTask
field points to the subroutine in that case, which is executed under the
context of the task (or interrupt) that called PutMsg().

And the last option is to have absolutely nothing done. (PA_IGNORE)

Valentin
-- 
The Goddess of democracy? "The tyrants     Name:    Valentin Pepelea
may distroy a statue,  but they cannot     Phone:   (215) 431-9327
kill a god."                               UseNet:  cbmvax!valentin@uunet.uu.net
             - Ancient Chinese Proverb     Claimer: I not Commodore spokesman be
Technical Details
Message-ID: <14031@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!valentin
References: <4689@jato.Jpl.Nasa.Gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!valentin
From: valentin@cbmvax.commodore.com (Valentin Pepelea)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Software Interupts
Message-ID: <14031@cbmvax.commodore.com>
Date: 28 Aug 90 23:15:28 GMT
References: <4689@jato.Jpl.Nasa.Gov>
Reply-To: valentin@cbmvax (Valentin Pepelea)
Distribution: comp.sys.amiga.tech
Organization: Commodore, West Chester, PA
Lines: 34