aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/freezer.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-11-21 15:32:25 -0500
committerTejun Heo <tj@kernel.org>2011-11-21 15:32:25 -0500
commit948246f70a811c872b9d93bb4a8ab5823c4c79e0 (patch)
tree385fee0509ba5e05f1f651c8b86b7b56a0518163 /include/linux/freezer.h
parentd88e4cb67197d007fb778d62fe17360e970d5bfa (diff)
freezer: remove should_send_signal() and update frozen()
should_send_signal() is only used in freezer.c. Exporting them only increases chance of abuse. Open code the two users and remove it. Update frozen() to return bool. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/freezer.h')
-rw-r--r--include/linux/freezer.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 8e29f2b7ce11..3d50913d39d0 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -15,7 +15,7 @@ extern bool pm_nosig_freezing; /* PM nosig freezing in effect */
15/* 15/*
16 * Check if a process has been frozen 16 * Check if a process has been frozen
17 */ 17 */
18static inline int frozen(struct task_struct *p) 18static inline bool frozen(struct task_struct *p)
19{ 19{
20 return p->flags & PF_FROZEN; 20 return p->flags & PF_FROZEN;
21} 21}
@@ -32,11 +32,6 @@ static inline bool freezing(struct task_struct *p)
32 return freezing_slow_path(p); 32 return freezing_slow_path(p);
33} 33}
34 34
35static inline bool should_send_signal(struct task_struct *p)
36{
37 return !(p->flags & PF_FREEZER_NOSIG);
38}
39
40/* Takes and releases task alloc lock using task_lock() */ 35/* Takes and releases task alloc lock using task_lock() */
41extern void __thaw_task(struct task_struct *t); 36extern void __thaw_task(struct task_struct *t);
42 37
@@ -166,7 +161,7 @@ static inline void set_freezable_with_signal(void)
166 __retval; \ 161 __retval; \
167}) 162})
168#else /* !CONFIG_FREEZER */ 163#else /* !CONFIG_FREEZER */
169static inline int frozen(struct task_struct *p) { return 0; } 164static inline bool frozen(struct task_struct *p) { return false; }
170static inline bool freezing(struct task_struct *p) { return false; } 165static inline bool freezing(struct task_struct *p) { return false; }
171 166
172static inline bool __refrigerator(bool check_kthr_stop) { return false; } 167static inline bool __refrigerator(bool check_kthr_stop) { return false; }