diff options
Diffstat (limited to 'include/linux/cpuset.h')
| -rw-r--r-- | include/linux/cpuset.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 3bc606927116..9354722a9217 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * cpuset interface | 4 | * cpuset interface |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2003 BULL SA | 6 | * Copyright (C) 2003 BULL SA |
| 7 | * Copyright (C) 2004 Silicon Graphics, Inc. | 7 | * Copyright (C) 2004-2006 Silicon Graphics, Inc. |
| 8 | * | 8 | * |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| @@ -51,6 +51,18 @@ extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | |||
| 51 | extern void cpuset_lock(void); | 51 | extern void cpuset_lock(void); |
| 52 | extern void cpuset_unlock(void); | 52 | extern void cpuset_unlock(void); |
| 53 | 53 | ||
| 54 | extern int cpuset_mem_spread_node(void); | ||
| 55 | |||
| 56 | static inline int cpuset_do_page_mem_spread(void) | ||
| 57 | { | ||
| 58 | return current->flags & PF_SPREAD_PAGE; | ||
| 59 | } | ||
| 60 | |||
| 61 | static inline int cpuset_do_slab_mem_spread(void) | ||
| 62 | { | ||
| 63 | return current->flags & PF_SPREAD_SLAB; | ||
| 64 | } | ||
| 65 | |||
| 54 | #else /* !CONFIG_CPUSETS */ | 66 | #else /* !CONFIG_CPUSETS */ |
| 55 | 67 | ||
| 56 | static inline int cpuset_init_early(void) { return 0; } | 68 | static inline int cpuset_init_early(void) { return 0; } |
| @@ -99,6 +111,21 @@ static inline char *cpuset_task_status_allowed(struct task_struct *task, | |||
| 99 | static inline void cpuset_lock(void) {} | 111 | static inline void cpuset_lock(void) {} |
| 100 | static inline void cpuset_unlock(void) {} | 112 | static inline void cpuset_unlock(void) {} |
| 101 | 113 | ||
| 114 | static inline int cpuset_mem_spread_node(void) | ||
| 115 | { | ||
| 116 | return 0; | ||
| 117 | } | ||
| 118 | |||
| 119 | static inline int cpuset_do_page_mem_spread(void) | ||
| 120 | { | ||
| 121 | return 0; | ||
| 122 | } | ||
| 123 | |||
| 124 | static inline int cpuset_do_slab_mem_spread(void) | ||
| 125 | { | ||
| 126 | return 0; | ||
| 127 | } | ||
| 128 | |||
| 102 | #endif /* !CONFIG_CPUSETS */ | 129 | #endif /* !CONFIG_CPUSETS */ |
| 103 | 130 | ||
| 104 | #endif /* _LINUX_CPUSET_H */ | 131 | #endif /* _LINUX_CPUSET_H */ |
