History

cpumask: tsk_cpumask for accessing the struct task_struct's cpus_allowed.

This allows us to change the representation (to a dangling bitmap or cpumask_var_t) without breaking all the callers: they can use tsk_cpumask() now and won't see a difference as the changes roll into linux-next.

Rusty Russell committed 17 years ago

Commit 76e6eee1 parent 99adcd91 file · +3 −0Browse files

Unified · Split

include/linux/sched.h+3−0
@@ -1419,6 +1419,9 @@ struct task_struct { · 1418 unmodified lines
14191419 #endif
14201420 };
14211421
1422+/* Future-safe accessor for struct task_struct's cpus_allowed. */
1423+#define tsk_cpumask(tsk) (&(tsk)->cpus_allowed)
1424+
14221425 /*
14231426 * Priority of a process goes from 0..MAX_PRIO-1, valid RT
14241427 * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t