X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fworkqueue.c;h=72170012eafc2fb925f885b9a666be610901ec3f;hb=2388c075d46055bd33ee824c399d72c219b98d90;hp=14957a0d3910aa83740d4e22b5420aa48658cf84;hpb=5bbe95bb510534d0a5bab8d7d205b32d6e4a57b2;p=urcu.git diff --git a/src/workqueue.c b/src/workqueue.c index 14957a0..7217001 100644 --- a/src/workqueue.c +++ b/src/workqueue.c @@ -36,12 +36,12 @@ #include #include "compat-getcpu.h" -#include "urcu/wfcqueue.h" -#include "urcu-pointer.h" -#include "urcu/list.h" -#include "urcu/futex.h" -#include "urcu/tls-compat.h" -#include "urcu/ref.h" +#include +#include +#include +#include +#include +#include #include "urcu-die.h" #include "workqueue.h" @@ -92,7 +92,7 @@ struct urcu_workqueue_completion_work { * Losing affinity can be caused by CPU hotunplug/hotplug, or by * cpuset(7). */ -#if HAVE_SCHED_SETAFFINITY +#ifdef HAVE_SCHED_SETAFFINITY static int set_thread_cpu_affinity(struct urcu_workqueue *workqueue) { cpu_set_t mask; @@ -107,11 +107,8 @@ static int set_thread_cpu_affinity(struct urcu_workqueue *workqueue) CPU_ZERO(&mask); CPU_SET(workqueue->cpu_affinity, &mask); -#if SCHED_SETAFFINITY_ARGS == 2 - ret = sched_setaffinity(0, &mask); -#else ret = sched_setaffinity(0, sizeof(mask), &mask); -#endif + /* * EINVAL is fine: can be caused by hotunplugged CPUs, or by * cpuset(7). This is why we should always retry if we detect