* 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 call_rcu_data *crdp)
{
* 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;
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
errno = ret;
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
static void run_on(int cpu)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
CPU_ZERO(&mask);