Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
freezer.c File Reference
#include <linux/interrupt.h>
#include <linux/suspend.h>
#include <linux/export.h>
#include <linux/syscalls.h>
#include <linux/freezer.h>
#include <linux/kthread.h>

Go to the source code of this file.


 EXPORT_SYMBOL (system_freezing_cnt)
bool freezing_slow_path (struct task_struct *p)
 EXPORT_SYMBOL (freezing_slow_path)
bool __refrigerator (bool check_kthr_stop)
 EXPORT_SYMBOL (__refrigerator)
bool freeze_task (struct task_struct *p)
void __thaw_task (struct task_struct *p)
bool set_freezable (void)
 EXPORT_SYMBOL (set_freezable)


atomic_t system_freezing_cnt = ATOMIC_INIT(0)
bool pm_freezing
bool pm_nosig_freezing

Function Documentation

bool __refrigerator ( bool  check_kthr_stop)

Definition at line 50 of file freezer.c.

void __thaw_task ( struct task_struct p)

Definition at line 135 of file freezer.c.

EXPORT_SYMBOL ( system_freezing_cnt  )
EXPORT_SYMBOL ( freezing_slow_path  )
EXPORT_SYMBOL ( __refrigerator  )
EXPORT_SYMBOL ( set_freezable  )
bool freeze_task ( struct task_struct p)

freeze_task - send a freeze request to given task : task to send the request to

If is freezing, the freeze request is sent either by sending a fake signal (if it's not a kernel thread) or waking it up (if it's a kernel thread).

RETURNS: false, if is not freezing or already frozen; true, otherwise

Definition at line 109 of file freezer.c.

bool freezing_slow_path ( struct task_struct p)

freezing_slow_path - slow path for testing whether a task needs to be frozen : task to be tested

This function is called by freezing() if system_freezing_cnt isn't zero and tests whether needs to enter and stay in frozen state. Can be called under any context. The freezers are responsible for ensuring the target tasks see the updated state.

Definition at line 34 of file freezer.c.

bool set_freezable ( void  )

set_freezable - make current freezable

Mark current freezable and enter refrigerator if necessary.

Definition at line 156 of file freezer.c.

Variable Documentation

bool pm_freezing

Definition at line 19 of file freezer.c.

bool pm_nosig_freezing

Definition at line 20 of file freezer.c.

atomic_t system_freezing_cnt = ATOMIC_INIT(0)

Definition at line 15 of file freezer.c.