diff options
author | Patrick Bernardi <bernardi@adacore.com> | 2021-11-03 17:55:50 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-11-10 08:57:41 +0000 |
commit | 301526488738f16fa1018a2f1c9ce3138ecdf2cb (patch) | |
tree | 808ac0a89503130b0299f048ba2b253d69b1c59a /gcc/ada/libgnat/system-rtems.ads | |
parent | bbe3c88351bc98a9866720e03ef76e8caf516461 (diff) | |
download | gcc-301526488738f16fa1018a2f1c9ce3138ecdf2cb.zip gcc-301526488738f16fa1018a2f1c9ce3138ecdf2cb.tar.gz gcc-301526488738f16fa1018a2f1c9ce3138ecdf2cb.tar.bz2 |
[Ada] Do not assume a priority value of zero is a valid priority
gcc/ada/
* libgnarl/s-taskin.adb (Initialize_ATCB): Initialize
T.Common.Current_Priority to Priority'First.
* libgnarl/s-taskin.ads (Unspecified_Priority): Redefined as -1.
* libgnat/system-rtems.ads: Start priority range from 1, as 0 is
reserved by the operating system.
Diffstat (limited to 'gcc/ada/libgnat/system-rtems.ads')
-rw-r--r-- | gcc/ada/libgnat/system-rtems.ads | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/ada/libgnat/system-rtems.ads b/gcc/ada/libgnat/system-rtems.ads index c083cb5..77423d3 100644 --- a/gcc/ada/libgnat/system-rtems.ads +++ b/gcc/ada/libgnat/system-rtems.ads @@ -109,15 +109,13 @@ package System is -- hardware priority levels. Protected Object ceilings can -- override these values. -- 245 is used by the Interrupt_Manager task - -- 0 is reserved for the RTEMS IDLE task and really should not - -- be accessible from Ada but GNAT initializes - -- Current_Priority to 0 so it must be valid + -- 0 is reserved for the RTEMS IDLE task Max_Priority : constant Positive := 244; Max_Interrupt_Priority : constant Positive := 254; - subtype Any_Priority is Integer range 0 .. 254; - subtype Priority is Any_Priority range 0 .. 244; + subtype Any_Priority is Integer range 1 .. 254; + subtype Priority is Any_Priority range 1 .. 244; subtype Interrupt_Priority is Any_Priority range 245 .. 254; Default_Priority : constant Priority := 122; |