aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/process.c')
-rw-r--r--kernel/power/process.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 5cc588c1abab..7f0d4343af1b 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -46,13 +46,13 @@ static int try_to_freeze_tasks(bool user_only)
46 while (true) { 46 while (true) {
47 todo = 0; 47 todo = 0;
48 read_lock(&tasklist_lock); 48 read_lock(&tasklist_lock);
49 do_each_thread(g, p) { 49 for_each_process_thread(g, p) {
50 if (p == current || !freeze_task(p)) 50 if (p == current || !freeze_task(p))
51 continue; 51 continue;
52 52
53 if (!freezer_should_skip(p)) 53 if (!freezer_should_skip(p))
54 todo++; 54 todo++;
55 } while_each_thread(g, p); 55 }
56 read_unlock(&tasklist_lock); 56 read_unlock(&tasklist_lock);
57 57
58 if (!user_only) { 58 if (!user_only) {
@@ -93,11 +93,11 @@ static int try_to_freeze_tasks(bool user_only)
93 93
94 if (!wakeup) { 94 if (!wakeup) {
95 read_lock(&tasklist_lock); 95 read_lock(&tasklist_lock);
96 do_each_thread(g, p) { 96 for_each_process_thread(g, p) {
97 if (p != current && !freezer_should_skip(p) 97 if (p != current && !freezer_should_skip(p)
98 && freezing(p) && !frozen(p)) 98 && freezing(p) && !frozen(p))
99 sched_show_task(p); 99 sched_show_task(p);
100 } while_each_thread(g, p); 100 }
101 read_unlock(&tasklist_lock); 101 read_unlock(&tasklist_lock);
102 } 102 }
103 } else { 103 } else {
@@ -229,11 +229,11 @@ void thaw_processes(void)
229 thaw_workqueues(); 229 thaw_workqueues();
230 230
231 read_lock(&tasklist_lock); 231 read_lock(&tasklist_lock);
232 do_each_thread(g, p) { 232 for_each_process_thread(g, p) {
233 /* No other threads should have PF_SUSPEND_TASK set */ 233 /* No other threads should have PF_SUSPEND_TASK set */
234 WARN_ON((p != curr) && (p->flags & PF_SUSPEND_TASK)); 234 WARN_ON((p != curr) && (p->flags & PF_SUSPEND_TASK));
235 __thaw_task(p); 235 __thaw_task(p);
236 } while_each_thread(g, p); 236 }
237 read_unlock(&tasklist_lock); 237 read_unlock(&tasklist_lock);
238 238
239 WARN_ON(!(curr->flags & PF_SUSPEND_TASK)); 239 WARN_ON(!(curr->flags & PF_SUSPEND_TASK));
@@ -256,10 +256,10 @@ void thaw_kernel_threads(void)
256 thaw_workqueues(); 256 thaw_workqueues();
257 257
258 read_lock(&tasklist_lock); 258 read_lock(&tasklist_lock);
259 do_each_thread(g, p) { 259 for_each_process_thread(g, p) {
260 if (p->flags & (PF_KTHREAD | PF_WQ_WORKER)) 260 if (p->flags & (PF_KTHREAD | PF_WQ_WORKER))
261 __thaw_task(p); 261 __thaw_task(p);
262 } while_each_thread(g, p); 262 }
263 read_unlock(&tasklist_lock); 263 read_unlock(&tasklist_lock);
264 264
265 schedule(); 265 schedule();