Skip to content

Commit 0b80e3a

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: cpumask: mm_cpumask for accessing the struct mm_struct's cpu_vm_mask. cpumask: tsk_cpumask for accessing the struct task_struct's cpus_allowed.
2 parents 188de5e + 45e575a commit 0b80e3a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/linux/mm_types.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,7 @@ struct mm_struct {
276276
#endif
277277
};
278278

279+
/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
280+
#define mm_cpumask(mm) (&(mm)->cpu_vm_mask)
281+
279282
#endif /* _LINUX_MM_TYPES_H */

include/linux/sched.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,9 @@ struct task_struct {
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

0 commit comments

Comments
 (0)