2302
2303out_activate:
2304#endif
2305 schedstat_inc(p, se.nr_wakeups);
2306 if (sync)
2307 schedstat_inc(p, se.nr_wakeups_sync);
2308 if (orig_cpu != cpu)
2309 schedstat_inc(p, se.nr_wakeups_migrate);
2310 if (cpu == this_cpu)
2311 schedstat_inc(p, se.nr_wakeups_local);
2312 else
2313 schedstat_inc(p, se.nr_wakeups_remote);
2314 update_rq_clock(rq);
2315 activate_task(rq, p, 1);
2316 success = 1;
2317
2318out_running:
2319 trace_sched_wakeup(rq, p);
2320 check_preempt_curr(rq, p, sync);
2321
2322 p->state = TASK_RUNNING;
2323#ifdef CONFIG_SMP
2324 if (p->sched_class->task_wake_up)
2325 p->sched_class->task_wake_up(rq, p);
2326#endif
2327out:
2328 current->se.last_wakeup = current->se.sum_exec_runtime;
2329
2330 task_rq_unlock(rq, &flags);
2331
2332 return success;
2333}
2334
2335int wake_up_process(struct task_struct *p)
2336{
2337 return try_to_wake_up(p, TASK_ALL, 0);
2338}
2339EXPORT_SYMBOL(wake_up_process);
2340
2341int wake_up_state(struct task_struct *p, unsigned int state)
2342{