summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-26 09:41:28 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-26 09:41:28 +0000
commitb0b0352e278b7953a042241689332d42c79304b8 (patch)
tree277de876c9b266e6b07fb26db75eb971d3fd7cb1
parentba6aa50bc3757347cb40fcbbe8210d5d946c8c79 (diff)
downloadgcc-b0b0352e278b7953a042241689332d42c79304b8.tar.gz
2008-05-26 Jose Ruiz <ruiz@adacore.com>
* s-osinte-aix.adb: (To_Target_Priority): Setting the time slice value to 0 or greater sets the scheduling policy to FIFO within priorities or round-robin respectively. Hence, the priority must be set in this case to the one selected by the user. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135907 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/s-osinte-aix.adb15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/s-osinte-aix.adb b/gcc/ada/s-osinte-aix.adb
index 469ce3bfbb4..cdaff52b20d 100644
--- a/gcc/ada/s-osinte-aix.adb
+++ b/gcc/ada/s-osinte-aix.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1997-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1997-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -65,13 +65,18 @@ package body System.OS_Interface is
Dispatching_Policy : Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
+ Time_Slice_Val : Integer;
+ pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
+
begin
-- For the case SCHED_OTHER the only valid priority across all supported
- -- versions of AIX is 1. Otherwise, for SCHED_RR and SCHED_FIFO, the
- -- system defines priorities in the range 1 .. 127. This means that we
- -- must map System.Any_Priority in the range 0 .. 126 to 1 .. 127.
+ -- versions of AIX is 1 (note that the scheduling policy can be set
+ -- with the pragma Task_Dispatching_Policy or setting the time slice
+ -- value). Otherwise, for SCHED_RR and SCHED_FIFO, the system defines
+ -- priorities in the range 1 .. 127. This means that we must map
+ -- System.Any_Priority in the range 0 .. 126 to 1 .. 127.
- if Dispatching_Policy = ' ' then
+ if Dispatching_Policy = ' ' and then Time_Slice_Val < 0 then
return 1;
else
return Interfaces.C.int (Prio) + 1;