X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-call-rcu-impl.h;h=65f63ee51670ae73b9c8ead9869554e4f8f35a82;hp=d33c731ad1e9eae6437ae95595ecf0c825f3e6e8;hb=a47dd11cc003c264dccfa9541e7974690e724037;hpb=074c3a1bde68f3d2607c5c4711ec456dbdb05bce diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index d33c731..65f63ee 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -36,6 +36,7 @@ #include #include "config.h" +#include "compat-getcpu.h" #include "urcu/wfcqueue.h" #include "urcu-call-rcu.h" #include "urcu-pointer.h" @@ -106,23 +107,7 @@ static struct call_rcu_data *default_call_rcu_data; * CPUs rather than only to specific threads. */ -#ifdef HAVE_SCHED_GETCPU - -static int urcu_sched_getcpu(void) -{ - return sched_getcpu(); -} - -#else /* #ifdef HAVE_SCHED_GETCPU */ - -static int urcu_sched_getcpu(void) -{ - return -1; -} - -#endif /* #else #ifdef HAVE_SCHED_GETCPU */ - -#if defined(HAVE_SYSCONF) && defined(HAVE_SCHED_GETCPU) +#if defined(HAVE_SYSCONF) && (defined(HAVE_SCHED_GETCPU) || defined(HAVE_GETCPUID)) /* * Pointer to array of pointers to per-CPU call_rcu_data structures