public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] RTEMS: use hardware interrupts instead of signals for interrupt handling
@ 2021-10-11 13:39 Pierre-Marie de Rodat
  2021-11-26 13:59 ` Sebastian Huber
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Marie de Rodat @ 2021-10-11 13:39 UTC (permalink / raw)
  To: gcc-patches; +Cc: Patrick Bernardi

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

RTEMS supports attaching interrupt handlers to hardware interrupt
vectors, which is superior to the current approach of attaching handlers
to signals.  Direct attachment of handlers removes the execution
overhead of converting hardware interrupts to signals and their
subsequent propagation to the interrupt manager. It also removes the
limitation of the number of hardware interrupts that can be supported
under the signals model, as RTEMS is limited to 32 signals.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* Makefile.rtl (VxWorks): Rename s-inmaop__vxworks.adb to
	s-inmaop__hwint.adb.
	(RTEMS): Use s-inmaop__hwint.adb, s-intman__rtems.adb/s,
	s-taprop__rtems.adb.
	* libgnarl/a-intnam__rtems.ads: Remove signals definitions and
	replace with Hardware_Interrupts.
	* libgnarl/s-inmaop__vxworks.adb: Rename as...
	* libgnarl/s-inmaop__hwint.adb: ... this.
	* libgnarl/s-interr__hwint.adb: Remove unnecessary comments.
	* libgnarl/s-intman__rtems.ads, libgnarl/s-intman__rtems.adb:
	New files.
	* libgnarl/s-osinte__rtems.adb: Add RTEMS API bindings.
	(Binary_Semaphore_Create, Binary_Semaphore_Delete,
	Binary_Semaphore_Obtain, Binary_Semaphore_Release,
	Binary_Semaphore_Flush, Interrupt_Connect,
	Interrupt_Number_To_Vector): New functions.
	* libgnarl/s-osinte__rtems.ads (Num_HW_Interrupts, Signal):
	Removed.
	(NSIG, Interrupt_Range): New.
	(Binary_Semaphore_Create, Binary_Semaphore_Delete,
	Binary_Semaphore_Obtain, Binary_Semaphore_Release,
	Binary_Semaphore_Flush, Interrupt_Connect,
	Interrupt_Number_To_Vector): Remove Import pragma.
	* libgnarl/s-taprop__rtems.adb: New file.

[-- Attachment #2: patch.diff.gz --]
[-- Type: application/gzip, Size: 14626 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-26 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 13:39 [Ada] RTEMS: use hardware interrupts instead of signals for interrupt handling Pierre-Marie de Rodat
2021-11-26 13:59 ` Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).