函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kthread.c Create Date:2022-07-27 10:30:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kthreadd

函数原型:int kthreadd(void *unused)

返回类型:int

参数:

类型参数名称
void *unused
570  tsk等于当前进程
573  set_task_comm(tsk, "kthreadd")
574  ignore_signals(tsk)
575  set_cpus_allowed_ptr(tsk, cpu_all_mask)
576  set_mems_allowed(The following particular system nodemasks and operations* on them manage all possible and online nodes.[N_MEMORY])
578  flags或等于This thread should not be frozen
579  cgroup_init_kthreadd()
581  循环
582  set_current_state(睡眠态)
583  如果链表为空schedule()
585  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (就绪态)
587  加自旋锁
588  当非链表为空循环
598  加自旋锁
600  自旋锁解锁
603  返回:0