aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-28 16:00:19 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-28 16:00:19 -0300
commit271ec55d0ae795f03d92e3aa61bff69a31a19e3a (patch)
tree5fff25b9948b6adade4ce100751d10deef723aed
parent2c44452b6180bffd694575f9fc1c01e671e498b5 (diff)
downloadglibc-271ec55d0ae795f03d92e3aa61bff69a31a19e3a.zip
glibc-271ec55d0ae795f03d92e3aa61bff69a31a19e3a.tar.gz
glibc-271ec55d0ae795f03d92e3aa61bff69a31a19e3a.tar.bz2
support: Do not build xpthread_attr_setaffinity_np for hurd
It does not provide pthread_attr_setaffinity_np extension.
-rw-r--r--support/xpthread_attr_setaffinity_np.c2
-rw-r--r--support/xthread.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/support/xpthread_attr_setaffinity_np.c b/support/xpthread_attr_setaffinity_np.c
index 5bb5b41..21a768c 100644
--- a/support/xpthread_attr_setaffinity_np.c
+++ b/support/xpthread_attr_setaffinity_np.c
@@ -18,6 +18,7 @@
#include <support/xthread.h>
+#ifdef __linux__
void
xpthread_attr_setaffinity_np (pthread_attr_t *attr,
size_t cpusetsize, const cpu_set_t *cpuset)
@@ -26,3 +27,4 @@ xpthread_attr_setaffinity_np (pthread_attr_t *attr,
pthread_attr_setaffinity_np (attr, cpusetsize,
cpuset));
}
+#endif
diff --git a/support/xthread.h b/support/xthread.h
index c0dbb60..a4a4ec5 100644
--- a/support/xthread.h
+++ b/support/xthread.h
@@ -66,9 +66,11 @@ void *xpthread_join (pthread_t thr);
void xpthread_once (pthread_once_t *guard, void (*func) (void));
void xpthread_attr_destroy (pthread_attr_t *attr);
void xpthread_attr_init (pthread_attr_t *attr);
+#ifdef __linux__
void xpthread_attr_setaffinity_np (pthread_attr_t *attr,
size_t cpusetsize,
const cpu_set_t *cpuset);
+#endif
void xpthread_attr_setdetachstate (pthread_attr_t *attr,
int detachstate);
void xpthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,