aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/freezer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/freezer.h')
-rw-r--r--include/linux/freezer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index e4238ceaa4d6..043a5cf8b5ba 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -3,6 +3,7 @@
3#ifndef FREEZER_H_INCLUDED 3#ifndef FREEZER_H_INCLUDED
4#define FREEZER_H_INCLUDED 4#define FREEZER_H_INCLUDED
5 5
6#include <linux/debug_locks.h>
6#include <linux/sched.h> 7#include <linux/sched.h>
7#include <linux/wait.h> 8#include <linux/wait.h>
8#include <linux/atomic.h> 9#include <linux/atomic.h>
@@ -13,6 +14,11 @@ extern bool pm_freezing; /* PM freezing in effect */
13extern bool pm_nosig_freezing; /* PM nosig freezing in effect */ 14extern bool pm_nosig_freezing; /* PM nosig freezing in effect */
14 15
15/* 16/*
17 * Timeout for stopping processes
18 */
19extern unsigned int freeze_timeout_msecs;
20
21/*
16 * Check if a process has been frozen 22 * Check if a process has been frozen
17 */ 23 */
18static inline bool frozen(struct task_struct *p) 24static inline bool frozen(struct task_struct *p)
@@ -43,6 +49,8 @@ extern void thaw_kernel_threads(void);
43 49
44static inline bool try_to_freeze(void) 50static inline bool try_to_freeze(void)
45{ 51{
52 if (!(current->flags & PF_NOFREEZE))
53 debug_check_no_locks_held();
46 might_sleep(); 54 might_sleep();
47 if (likely(!freezing(current))) 55 if (likely(!freezing(current)))
48 return false; 56 return false;