diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-05-31 23:46:42 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-05-31 23:46:42 -0700 |
commit | 8ea237293664aed37ab77d53604b01e01bb7ec6f (patch) | |
tree | 45d1cccc9697f6edd6b1a0ec0cc37483c4009562 /sysdeps | |
parent | 74414708355a922a514d5c76183eca6931c4488a (diff) | |
download | glibc-8ea237293664aed37ab77d53604b01e01bb7ec6f.tar glibc-8ea237293664aed37ab77d53604b01e01bb7ec6f.tar.gz glibc-8ea237293664aed37ab77d53604b01e01bb7ec6f.tar.bz2 glibc-8ea237293664aed37ab77d53604b01e01bb7ec6f.zip |
Fix up sched_cpucount in x86-64.
Now that static executables can handle IFUNC functions don't exclude
optimization for sched_cpucount for !SHARED.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/x86_64/multiarch/sched_cpucount.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/sysdeps/x86_64/multiarch/sched_cpucount.c b/sysdeps/x86_64/multiarch/sched_cpucount.c index e7f9daed05..b6f425e948 100644 --- a/sysdeps/x86_64/multiarch/sched_cpucount.c +++ b/sysdeps/x86_64/multiarch/sched_cpucount.c @@ -18,24 +18,20 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifdef SHARED -# include <sched.h> -# include "init-arch.h" +#include <sched.h> +#include "init-arch.h" -# define __sched_cpucount static generic_cpucount -# include <posix/sched_cpucount.c> -# undef __sched_cpucount +#define __sched_cpucount static generic_cpucount +#include <posix/sched_cpucount.c> +#undef __sched_cpucount -# define POPCNT(l) \ +#define POPCNT(l) \ ({ __cpu_mask r; \ asm ("popcntq %1, %0" : "=r" (r) : "0" (l));\ r; }) -# define __sched_cpucount static popcount_cpucount -# include <posix/sched_cpucount.c> -# undef __sched_cpucount +#define __sched_cpucount static popcount_cpucount +#include <posix/sched_cpucount.c> +#undef __sched_cpucount libc_ifunc (__sched_cpucount, HAS_POPCOUNT ? popcount_cpucount : generic_cpucount); -#else -# include_next <sched_cpucount.c> -#endif |