4#ifndef FREEZER_H_INCLUDED
5#define FREEZER_H_INCLUDED
25extern bool pm_freezing;
26extern bool pm_nosig_freezing;
31extern unsigned int freeze_timeout_msecs;
40extern bool freezing_slow_path(
struct task_struct *p);
50 return freezing_slow_path(p);
58extern bool __refrigerator(
bool check_kthr_stop);
59extern int freeze_processes(
void);
60extern int freeze_kernel_threads(
void);
61extern void thaw_processes(
void);
62extern void thaw_kernel_threads(
void);
65static inline bool try_to_freeze(
void)
70 if (!(
current->flags & PF_NOFREEZE))
71 debug_check_no_locks_held();
72 return __refrigerator(
false);
76extern bool set_freezable(
void);
78#ifdef CONFIG_CGROUP_FREEZER
79extern bool cgroup1_freezing(
struct task_struct *task);
81static inline bool cgroup1_freezing(
struct task_struct *task)
88static inline bool frozen(
struct task_struct *p) {
return false; }
89static inline bool freezing(
struct task_struct *p) {
return false; }
92static inline bool __refrigerator(
bool check_kthr_stop) {
return false; }
93static inline int freeze_processes(
void) {
return -
ENOSYS; }
94static inline int freeze_kernel_threads(
void) {
return -
ENOSYS; }
95static inline void thaw_processes(
void) {}
96static inline void thaw_kernel_threads(
void) {}
97static inline void thaw_process(
struct task_struct *p) {}
99static inline bool try_to_freeze(
void) {
return false; }
101static inline void set_freezable(
void) {}
XETime t
Definition main.cpp:53
#define likely(x)
Definition compiler.h:29
#define static_branch_unlikely(x)
Definition jump_label.h:501
#define DECLARE_STATIC_KEY_FALSE(name)
Definition jump_label.h:377
#define ENOSYS
Definition kernel.h:310
#define might_sleep()
Definition kernel.h:223
#define current
Definition mm.h:90