1 Dummy pthread_setaffinity_np() when not available
3 On uClibc configurations that do not use the NPTL thread
4 implementation, pthread_setaffinity_np() is not available. This patch
5 defines a dummy (empty) implementation of this function for such
8 The only few architectures that do not provide the NPTL thread
9 implementation are very likely to be non-SMP architectures, and
10 therefore, setting the affinity of the thread is not doing anything
11 useful, so having an empty stub for pthread_setaffinity_np() is not a
14 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 Index: b/src/current/iozone.c
17 ===================================================================
18 --- a/src/current/iozone.c
19 +++ b/src/current/iozone.c
24 +#if defined (__linux__)
25 +#include <features.h>
26 +#if defined (__UCLIBC__) && !defined (__UCLIBC_HAS_THREADS_NATIVE__)
27 +static int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
28 + const cpu_set_t *cpuset)
35 #if ((defined(solaris) && defined(__LP64__)) || defined(__s390x__))
36 /* If we are building for 64-bit Solaris, all functions that return pointers
37 * must be declared before they are used; otherwise the compiler will assume