Module: xenomai-3 Branch: next Commit: 54161943141f38048a4fe741eeb6d62a533e8c1b URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=54161943141f38048a4fe741eeb6d62a533e8c1b
Author: Philippe Gerum <r...@xenomai.org> Date: Mon Oct 5 15:18:45 2015 +0200 boilerplate/libc: add placeholder for pthread_setaffinity_np() --- configure.ac | 1 + include/boilerplate/libc.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index b613515..8027b7d 100644 --- a/configure.ac +++ b/configure.ac @@ -509,6 +509,7 @@ AC_CHECK_FUNCS([pthread_mutexattr_setprotocol \ pthread_condattr_setclock \ pthread_spin_lock fork \ pthread_attr_setaffinity_np \ + pthread_setaffinity_np \ pthread_getattr_np \ pthread_atfork \ pthread_setname_np \ diff --git a/include/boilerplate/libc.h b/include/boilerplate/libc.h index d65ce3f..f544ef4 100644 --- a/include/boilerplate/libc.h +++ b/include/boilerplate/libc.h @@ -118,6 +118,16 @@ int pthread_attr_setaffinity_np(pthread_attr_t *attr, return 0; return ENOSYS; } + +static inline +int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, + const cpu_set_t *cpuset) +{ + if (CPU_ISSET(0, cpuset) && CPU_COUNT(cpuset) == 1) + return 0; + return ENOSYS; +} + #endif /* !HAVE_PTHREAD_ATTR_SETAFFINITY_NP */ #if !defined(HAVE_CLOCK_NANOSLEEP) && defined(CONFIG_XENO_MERCURY) _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git