diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-18 10:48:36 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-18 10:48:36 +0000 |
commit | 4350bdfbd09a6ce8071dd0579835561ae67483be (patch) | |
tree | be2d0e8e6399ebd9da97cde4e144b5cab6233d39 /gcc/ada/s-taprop-linux.adb | |
parent | a3b5e3a018b6a357e1a62399b891d9567a1ba99d (diff) | |
download | gcc-4350bdfbd09a6ce8071dd0579835561ae67483be.tar.gz |
2010-10-18 Jose Ruiz <ruiz@adacore.com>
* adaint.c (__gnat_pthread_setaffinity_np,
__gnat_pthread_attr_setaffinity_np): Add these wrappers which check the
availability of the underlying OS functionality before calling.
* s-osinte-linux.ads (pthread_setaffinity_np,
pthread_attr_setaffinity_np): Call a wrapper instead of the OS function
to perform a check of its availability.
* s-taprop-linux.adb (Create_Task): Remove the check to verify whether
the affinity functionality is available in the OS. Now done in a wrapper
* gcc-interface/Makefile.in: Remove vmshandler.asm, unused.
* gcc-interface/Make-lang.in: Update dependencies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165628 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taprop-linux.adb')
-rw-r--r-- | gcc/ada/s-taprop-linux.adb | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/ada/s-taprop-linux.adb b/gcc/ada/s-taprop-linux.adb index 6dcb1052844..b3554aa209f 100644 --- a/gcc/ada/s-taprop-linux.adb +++ b/gcc/ada/s-taprop-linux.adb @@ -844,21 +844,14 @@ package body System.Task_Primitives.Operations is (Attributes'Access, PTHREAD_CREATE_DETACHED); pragma Assert (Result = 0); - -- We were calling pthread_setaffinity_np (after thread creation but - -- before thread activation) to set the affinity but it was not - -- behaving as expected. Now we set the required attributes for the - -- creation of the thread, which is working correctly and it is - -- more appropriate. + -- Set the required attributes for the creation of the thread - if pthread_attr_setaffinity_np'Address = System.Null_Address then + -- Note: Previously, we called pthread_setaffinity_np (after thread + -- creation but before thread activation) to set the affinity but it was + -- not behaving as expected. Setting the required attributes for the + -- creation of the thread works correctly and it is more appropriate. - -- Nothing to do with the affinities if no underlying support - - null; - - -- Handle pragma CPU - - elsif T.Common.Base_CPU /= System.Multiprocessors.Not_A_Specific_CPU then + if T.Common.Base_CPU /= System.Multiprocessors.Not_A_Specific_CPU then declare CPU_Set : aliased cpu_set_t := (bits => (others => False)); begin |