mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-31 19:35:30 +00:00
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>
This commit is contained in:
parent
d88e4cb671
commit
948246f70a
2 changed files with 3 additions and 8 deletions
|
@ -15,7 +15,7 @@ extern bool pm_nosig_freezing; /* PM nosig freezing in effect */
|
||||||
/*
|
/*
|
||||||
* Check if a process has been frozen
|
* Check if a process has been frozen
|
||||||
*/
|
*/
|
||||||
static inline int frozen(struct task_struct *p)
|
static inline bool frozen(struct task_struct *p)
|
||||||
{
|
{
|
||||||
return p->flags & PF_FROZEN;
|
return p->flags & PF_FROZEN;
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,6 @@ static inline bool freezing(struct task_struct *p)
|
||||||
return freezing_slow_path(p);
|
return freezing_slow_path(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool should_send_signal(struct task_struct *p)
|
|
||||||
{
|
|
||||||
return !(p->flags & PF_FREEZER_NOSIG);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Takes and releases task alloc lock using task_lock() */
|
/* Takes and releases task alloc lock using task_lock() */
|
||||||
extern void __thaw_task(struct task_struct *t);
|
extern void __thaw_task(struct task_struct *t);
|
||||||
|
|
||||||
|
@ -166,7 +161,7 @@ static inline void set_freezable_with_signal(void)
|
||||||
__retval; \
|
__retval; \
|
||||||
})
|
})
|
||||||
#else /* !CONFIG_FREEZER */
|
#else /* !CONFIG_FREEZER */
|
||||||
static inline int frozen(struct task_struct *p) { return 0; }
|
static inline bool frozen(struct task_struct *p) { return false; }
|
||||||
static inline bool freezing(struct task_struct *p) { return false; }
|
static inline bool freezing(struct task_struct *p) { return false; }
|
||||||
|
|
||||||
static inline bool __refrigerator(bool check_kthr_stop) { return false; }
|
static inline bool __refrigerator(bool check_kthr_stop) { return false; }
|
||||||
|
|
|
@ -132,7 +132,7 @@ bool freeze_task(struct task_struct *p, bool sig_only)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (should_send_signal(p)) {
|
if (!(p->flags & PF_FREEZER_NOSIG)) {
|
||||||
fake_signal_wake_up(p);
|
fake_signal_wake_up(p);
|
||||||
/*
|
/*
|
||||||
* fake_signal_wake_up() goes through p's scheduler
|
* fake_signal_wake_up() goes through p's scheduler
|
||||||
|
|
Loading…
Add table
Reference in a new issue