[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nproc: small fix
From: |
Bruno Haible |
Subject: |
nproc: small fix |
Date: |
Sat, 20 Nov 2010 13:42:05 +0100 |
User-agent: |
KMail/1.9.9 |
This is a no-op fix: There's no function pthread_affinitity_np, only
pthread_getaffinity_np.
2010-11-20 Bruno Haible <address@hidden>
nproc: Fix condition.
* lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not
HAVE_PTHREAD_AFFINITY_NP.
--- lib/nproc.c.orig Sat Nov 20 13:33:16 2010
+++ lib/nproc.c Sat Nov 20 13:32:35 2010
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <unistd.h>
-#if HAVE_PTHREAD_AFFINITY_NP && 0
+#if HAVE_PTHREAD_GETAFFINITY_NP && 0
# include <pthread.h>
# include <sched.h>
#endif
@@ -71,7 +71,7 @@
Therefore this code is not enabled.
glibc >= 2.3.4 has sched_getaffinity whereas NetBSD 5 has
sched_getaffinity_np. */
-#if HAVE_PTHREAD_AFFINITY_NP && defined __GLIBC__ && 0
+#if HAVE_PTHREAD_GETAFFINITY_NP && defined __GLIBC__ && 0
{
cpu_set_t set;
@@ -94,7 +94,7 @@
return count;
}
}
-#elif HAVE_PTHREAD_AFFINITY_NP && defined __NetBSD__ && 0
+#elif HAVE_PTHREAD_GETAFFINITY_NP && defined __NetBSD__ && 0
{
cpuset_t *set;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- nproc: small fix,
Bruno Haible <=