🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49649

Writing interrupt handlers in GCC

#49649
From: Carlos M. Puchol
Date: Wed, 12 Jan 1994 07:27
21 lines
1028 bytes
How do I have a function return with a "Return from Interrupt"
instead of a "Return from Subroutine"?

I have ended up doing:

volatile void intr_handler(void)
{

	/* Do stuff */

	asm("RTI"); /* RTI is my assembler's return from interrupt */
}

(Of course, I am still getting: warning: `volatile' function does return).

Is there something like an "interrupt" attribute or
a pragma or something for a function to do this?

Thanks in advance,

++ Carlos
Technical Details
Message-ID: <2h08oq$4o6@trurl.cs.utexas.edu>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,857fa3f19def8bf3,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-01-12 00:37:13 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!not-for-mail
From: cpg@cs.utexas.edu (Carlos M. Puchol)
Newsgroups: gnu.gcc.help
Subject: Writing interrupt handlers in GCC
Date: 12 Jan 1994 01:27:22 -0600
Organization: Department of Computer Sciences, UT Austin
Lines: 21
Message-ID: <2h08oq$4o6@trurl.cs.utexas.edu>
NNTP-Posting-Host: trurl.cs.utexas.edu