#define CFS_NR_CPUS 1
#endif
-#ifdef HAVE_SET_CPUS_ALLOWED
-#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed(t, mask)
-#else
-#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed_ptr(t, &(mask))
-#endif
-
/*
* cache
*/
if (cpu_isset(i, *cpumask))
continue;
-#ifdef HAVE_SET_CPUS_ALLOWED
- rc = set_cpus_allowed(cfs_current(), *cpumask);
-#else
rc = set_cpus_allowed_ptr(cfs_current(), cpumask);
-#endif
set_mems_allowed(*nodemask);
if (rc == 0)
cfs_schedule(); /* switch to allowed CPU */
EXTRA_KCFLAGS=$tmp_flags
])
-# 2.6.32 set_cpus_allowed is no more defined if CONFIG_CPUMASK_OFFSTACK=yes
-AC_DEFUN([LC_SET_CPUS_ALLOWED],
- [AC_MSG_CHECKING([if kernel defines set_cpus_allowed])
- LB_LINUX_TRY_COMPILE(
- [#include <linux/sched.h>],
- [struct task_struct *p = NULL;
- cpumask_t mask = { { 0 } };
- (void) set_cpus_allowed(p, mask);],
- [AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_SET_CPUS_ALLOWED, 1,
- [set_cpus_allowed is exported by the kernel])],
- [AC_MSG_RESULT([no])] )])
-
#
# 2.6.36 fs_struct.lock use spinlock instead of rwlock.
#
# 2.6.32
LC_BLK_QUEUE_MAX_SEGMENTS
- LC_SET_CPUS_ALLOWED
# 2.6.34
LC_HAVE_DQUOT_FS_DISK_QUOTA
if (++index >= cfs_num_possible_cpus())
index = 0;
}
- cfs_set_cpus_allowed(cfs_current(),
- *cpumask_of_node(cpu_to_node(index)));
+ set_cpus_allowed_ptr(cfs_current(),
+ cpumask_of_node(cpu_to_node(index)));
}
}
#endif