public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <derodat@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Patrick Bernardi <bernardi@adacore.com>
Subject: [Ada] RTEMS: use hardware interrupts instead of signals for interrupt handling
Date: Mon, 11 Oct 2021 13:39:33 +0000	[thread overview]
Message-ID: <20211011133933.GA1518942@adacore.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-10-11 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 13:39 Pierre-Marie de Rodat [this message]
2021-11-26 13:59 ` Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211011133933.GA1518942@adacore.com \
    --to=derodat@adacore.com \
    --cc=bernardi@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).