diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/freezer.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 4631086f5060..2d38b1a74662 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -1,5 +1,8 @@ | |||
1 | /* Freezer declarations */ | 1 | /* Freezer declarations */ |
2 | 2 | ||
3 | #ifndef FREEZER_H_INCLUDED | ||
4 | #define FREEZER_H_INCLUDED | ||
5 | |||
3 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
4 | 7 | ||
5 | #ifdef CONFIG_PM | 8 | #ifdef CONFIG_PM |
@@ -115,6 +118,14 @@ static inline int freezer_should_skip(struct task_struct *p) | |||
115 | return !!(p->flags & PF_FREEZER_SKIP); | 118 | return !!(p->flags & PF_FREEZER_SKIP); |
116 | } | 119 | } |
117 | 120 | ||
121 | /* | ||
122 | * Tell the freezer that the current task should be frozen by it | ||
123 | */ | ||
124 | static inline void set_freezable(void) | ||
125 | { | ||
126 | current->flags &= ~PF_NOFREEZE; | ||
127 | } | ||
128 | |||
118 | #else | 129 | #else |
119 | static inline int frozen(struct task_struct *p) { return 0; } | 130 | static inline int frozen(struct task_struct *p) { return 0; } |
120 | static inline int freezing(struct task_struct *p) { return 0; } | 131 | static inline int freezing(struct task_struct *p) { return 0; } |
@@ -130,4 +141,7 @@ static inline int try_to_freeze(void) { return 0; } | |||
130 | static inline void freezer_do_not_count(void) {} | 141 | static inline void freezer_do_not_count(void) {} |
131 | static inline void freezer_count(void) {} | 142 | static inline void freezer_count(void) {} |
132 | static inline int freezer_should_skip(struct task_struct *p) { return 0; } | 143 | static inline int freezer_should_skip(struct task_struct *p) { return 0; } |
144 | static inline void set_freezable(void) {} | ||
133 | #endif | 145 | #endif |
146 | |||
147 | #endif /* FREEZER_H_INCLUDED */ | ||