[PATCH] mask ADT: clarify kernel/sched.c set_cpus_allowed cpumask [21/22]

From: Paul Jackson
Date: Mon Mar 29 2004 - 08:41:08 EST


Patch_21_of_22 - Cpumask code clarification in kernel/sched.c
Clarify and slightly optimize set_cpus_allowed() cpumask check

diffstat Patch_21_of_22:
sched.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1727 -> 1.1728
# kernel/sched.c 1.248 -> 1.249
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/03/29 pj@xxxxxxx 1.1728
# Clarify and slightly optimize set_cpus_allowed() cpumask check.
# --------------------------------------------
#
diff -Nru a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c Mon Mar 29 01:04:08 2004
+++ b/kernel/sched.c Mon Mar 29 01:04:08 2004
@@ -2708,7 +2708,7 @@
runqueue_t *rq;

rq = task_rq_lock(p, &flags);
- if (any_online_cpu(new_mask) == NR_CPUS) {
+ if (!cpus_intersects(new_mask, cpu_online_map)) {
ret = -EINVAL;
goto out;
}


--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/