freezer.c (907bc6c7fc7071b00083fc11e510e47dd93df45d) freezer.c (8cfe400ca54fd1ed96f962bea5f7e20b09b6d69f)
1/*
2 * kernel/freezer.c - Function to freeze a process
3 *
4 * Originally from kernel/power/process.c
5 */
6
7#include <linux/interrupt.h>
8#include <linux/suspend.h>

--- 90 unchanged lines hidden (view full) ---

99
100 if (!sig_only || should_send_signal(p))
101 set_freeze_flag(p);
102 else
103 return false;
104 }
105
106 if (should_send_signal(p)) {
1/*
2 * kernel/freezer.c - Function to freeze a process
3 *
4 * Originally from kernel/power/process.c
5 */
6
7#include <linux/interrupt.h>
8#include <linux/suspend.h>

--- 90 unchanged lines hidden (view full) ---

99
100 if (!sig_only || should_send_signal(p))
101 set_freeze_flag(p);
102 else
103 return false;
104 }
105
106 if (should_send_signal(p)) {
107 if (!signal_pending(p))
108 fake_signal_wake_up(p);
107 fake_signal_wake_up(p);
108 /*
109 * fake_signal_wake_up() goes through p's scheduler
110 * lock and guarantees that TASK_STOPPED/TRACED ->
111 * TASK_RUNNING transition can't race with task state
112 * testing in try_to_freeze_tasks().
113 */
109 } else if (sig_only) {
110 return false;
111 } else {
112 wake_up_state(p, TASK_INTERRUPTIBLE);
113 }
114
115 return true;
116}

--- 45 unchanged lines hidden ---
114 } else if (sig_only) {
115 return false;
116 } else {
117 wake_up_state(p, TASK_INTERRUPTIBLE);
118 }
119
120 return true;
121}

--- 45 unchanged lines hidden ---