Skip to contentSkip to conversation

Fix CPU bitmask truncation (2 of 2)

PATCH New Bjorn Helgaas 1 participant 1 message Jan 2, 2003 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix CPU bitmask truncation (2 of 2)

This does not make a functional difference, so ignore it if you like. Two reasons you might want it:

1) It's in 2.5.x, so you might want it for consistency.
2) Comments in sched.h refer to cpus_runnable being ~0 if the process is not running on any CPU.

include/linux/sched.h +2 -2
diff -Nru a/include/linux/sched.h b/include/linux/sched.h
@@ -482,8 +482,8 @@
     policy:		SCHED_OTHER,					\
     mm:			NULL,						\
     active_mm:		&init_mm,					\
-    cpus_runnable:	-1,						\
-    cpus_allowed:	-1,						\
+    cpus_runnable:	~0UL,						\
+    cpus_allowed:	~0UL,						\
     run_list:		LIST_HEAD_INIT(tsk.run_list),			\
     next_task:		&tsk,						\
     prev_task:		&tsk,						\