diff options
Diffstat (limited to 'include/linux/sched/mm.h')
-rw-r--r-- | include/linux/sched/mm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h index ae53e413fb13..ab9bf7b73954 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h | |||
@@ -211,4 +211,20 @@ static inline void memalloc_noreclaim_restore(unsigned int flags) | |||
211 | current->flags = (current->flags & ~PF_MEMALLOC) | flags; | 211 | current->flags = (current->flags & ~PF_MEMALLOC) | flags; |
212 | } | 212 | } |
213 | 213 | ||
214 | #ifdef CONFIG_MEMBARRIER | ||
215 | enum { | ||
216 | MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY = (1U << 0), | ||
217 | MEMBARRIER_STATE_SWITCH_MM = (1U << 1), | ||
218 | }; | ||
219 | |||
220 | static inline void membarrier_execve(struct task_struct *t) | ||
221 | { | ||
222 | atomic_set(&t->mm->membarrier_state, 0); | ||
223 | } | ||
224 | #else | ||
225 | static inline void membarrier_execve(struct task_struct *t) | ||
226 | { | ||
227 | } | ||
228 | #endif | ||
229 | |||
214 | #endif /* _LINUX_SCHED_MM_H */ | 230 | #endif /* _LINUX_SCHED_MM_H */ |