diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-01 15:29:39 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-01 15:29:39 +0200 |
commit | 6b81741c0717e0322b61591a655dc83265f84ea8 (patch) | |
tree | 19bd4ae775641dbfbeb38572123fbb8a6e99ec38 /gcc/ada/adaint.c | |
parent | 8256c1bfeb880b42c2ce9744fa1905b4d225d792 (diff) | |
download | gcc-6b81741c0717e0322b61591a655dc83265f84ea8.zip gcc-6b81741c0717e0322b61591a655dc83265f84ea8.tar.gz gcc-6b81741c0717e0322b61591a655dc83265f84ea8.tar.bz2 |
[multiple changes]
2011-09-01 Jose Ruiz <ruiz@adacore.com>
* s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
directly the bit array.
* s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
the linux macros with the same name.
* adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
wrappers around the CPU_ZERO and CPU_SET linux macros.
2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Find_Insertion_List): Removed.
(Process_Transient_Objects): Insert the declarations of the hook
access type and the hook object before the associated transient object.
2011-09-01 Jose Ruiz <ruiz@adacore.com>
* sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
package System.Aux_Dec when using restricted run-time libraries which
do not have this package.
2011-09-01 Tristan Gingold <gingold@adacore.com>
* s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2011-09-01 Bob Duff <duff@adacore.com>
* sem_attr.adb (Analyze_Access_Attribute): Do not call
Kill_Current_Values for P'Unrestricted_Access, where P is library level
2011-09-01 Thomas Quinot <quinot@adacore.com>
* exp_ch5.adb: Minor reformatting
* gnat_ugn.texi: Fix minor typos.
* gcc-interface/Make-lang.in: Update dependencies.
From-SVN: r178414
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 556101d..26c6289 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -3770,6 +3770,20 @@ void *__gnat_lwp_self (void) { return (void *) syscall (__NR_gettid); } + +#include <sched.h> + +void __gnat_cpu_zero (cpu_set_t *set) +{ + CPU_ZERO (set); +} + +void __gnat_cpu_set (int cpu, cpu_set_t *set) +{ + /* Ada handles CPU numbers starting from 1, while C identifies the first + CPU by a 0, so we need to adjust. */ + CPU_SET (cpu - 1, set); +} #endif #ifdef __cplusplus |