函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:to_kthread

函数原型:static inline struct kthread *to_kthread(struct task_struct *k)

返回类型:struct kthread

参数:

类型参数名称
struct task_struct *k
75  WARN_ON(!(任务标志 & I am a kernel thread ))
76  返回:设置子进程tid
调用者
名称描述
free_kthread_struct
kthread_should_stopkthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().
__kthread_should_park
kthread_datakthread_data - return data value specified on kthread creation*@task: kthread task in question* Return the data value specified when kthread @task was created.* The caller is responsible for ensuring the validity of @task when* calling this function.
kthread_probe_datakthread_probe_data - speculative version of kthread_data()*@task: possible kthread task in question*@task could be a kthread task. Return the data value specified when it* was created if accessible. If @task isn't a kthread task or its data is
kthread_parkme
kthread_create_on_cpukthread_create_on_cpu - Create a cpu bound kthread*@threadfn: the function to run until signal_pending(current).*@data: data ptr for @threadfn.*@cpu: The cpu on which the thread should be bound,*@namefmt: printf-style name for the thread
kthread_unparkkthread_unpark - unpark a thread created by kthread_create().*@k: thread created by kthread_create().* Sets kthread_should_park() for @k to return false, wakes it, and* waits for it to return. If the thread is marked percpu then its
kthread_parkkthread_park - park a thread created by kthread_create()
kthread_stop结束线程的运行
kthread_associate_blkcgkthread_associate_blkcg - associate blkcg to current kthread*@css: the cgroup info* Current thread must be a kthread. The thread is running jobs on behalf of* other threads. In some cases, we expect the jobs attach cgroup info of
kthread_blkcgkthread_blkcg - get associated blkcg css of current kthread* Current thread must be a kthread.