程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> kthreadd_task

kthreadd_task

編輯:C++入門知識

[cpp]
364 static noinline void __init_refok rest_init(void) 
365 {   
366         int pid; 
367     
368         rcu_scheduler_starting(); 
369         /*
370          * We need to spawn init first so that it obtains pid 1, however
371          * the init task will end up wanting to create kthreads, which, if
372          * we schedule it before we create kthreadd, will OOPS.
373          */ 
374         kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); 
375         numa_default_policy(); 
376         pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); 
377         rcu_read_lock(); 
378         kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); 
379         rcu_read_unlock(); 
380         complete(&kthreadd_done); 
381     
382         /*
383          * The boot idle thread must execute schedule()
384          * at least once to get things moving:
385          */ 
386         init_idle_bootup_task(current); 
387         schedule_preempt_disabled(); 
388         /* Call into cpu_idle with preempt disabled */ 
389         cpu_startup_entry(CPUHP_ONLINE); 
390 }   

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved