Explorar o código

cpumask: mm_cpumask for accessing the struct mm_struct's cpu_vm_mask.

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

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell %!s(int64=17) %!d(string=hai) anos
pai
achega
45e575ab9b
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      include/linux/mm_types.h

+ 3 - 0
include/linux/mm_types.h

@@ -276,4 +276,7 @@ struct mm_struct {
 #endif
 };
 
+/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
+#define mm_cpumask(mm) (&(mm)->cpu_vm_mask)
+
 #endif /* _LINUX_MM_TYPES_H */