From 0ae44446c2b6cd370e212fd94fcb8c261f3ef231 Mon Sep 17 00:00:00 2001 From: Jose Ruiz Date: Mon, 18 Oct 2010 13:54:23 +0000 Subject: adaint.c (__gnat_pthread_setaffinity_np, [...]): Remove wrappers, no longer needed. 2010-10-18 Jose Ruiz * adaint.c (__gnat_pthread_setaffinity_np, __gnat_pthread_attr_setaffinity_np): Remove wrappers, no longer needed. * s-osinte-linux.ads (pthread_setaffinity_np, pthread_attr_setaffinity_np): Remove use of wrappers. * s-taprop-linux.adb (Create_Task, Initialize): Restore check to verify whether the affinity functionality is available in the OS. * gcc-interface/utils.c: Set TREE_STATIC on functions only when there are defined. From-SVN: r165635 --- gcc/ada/adaint.c | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'gcc/ada/adaint.c') diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 11f6da0..3f4654f 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -3671,50 +3671,4 @@ void *__gnat_lwp_self (void) { return (void *) syscall (__NR_gettid); } - -/* For the affinity functions, there are systems which do not provide - the required support, so we create a wrapper to check its availability - before calling. */ - -extern int pthread_setaffinity_np (pthread_t th, - size_t cpusetsize, - const void *cpuset) - __attribute__((weak)); - -extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, - size_t cpusetsize, - const void *cpuset) - __attribute__((weak)); - -int __gnat_pthread_setaffinity_np (pthread_t th, - size_t cpusetsize, - const void *cpuset); - -int __gnat_pthread_attr_setaffinity_np (pthread_attr_t *__attr, - size_t cpusetsize, - const void *cpuset); - -int -__gnat_pthread_setaffinity_np (pthread_t th, - size_t cpusetsize, - const void *cpuset) -{ - /* Call the underlying OS operation if available */ - if (pthread_setaffinity_np) - return pthread_setaffinity_np (th, cpusetsize, cpuset); - else - return 0; -} - -int -__gnat_pthread_attr_setaffinity_np (pthread_attr_t *__attr, - size_t cpusetsize, - const void *cpuset) -{ - /* Call the underlying OS operation if available */ - if (pthread_attr_setaffinity_np) - return pthread_attr_setaffinity_np (__attr, cpusetsize, cpuset); - else - return 0; -} #endif -- cgit v1.1