函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:try_one_request

函数原型:static int try_one_request(struct kmod_test_device *test_dev, unsigned int idx)

返回类型:int

参数:

类型参数名称
struct kmod_test_device *test_dev
unsigned intidx
321  info等于info[idx]
322  fail_ret等于负ENOMEM
324  mutex_lock( & thread_mutex)
326  thread_idx等于idx
327  test_dev等于test_dev
328  task_sync等于kthread_run - create and wake a thread.*@threadfn: the function to run until signal_pending(current).*@data: data ptr for @threadfn.*@namefmt: printf-style name for the thread.* Description: Convenient wrapper for kthread_create() followed by(run_request, info, "%s-%u", KBUILD_MODNAME, idx)
331  如果非task_sync是错误
332  test_is_oom = true
333  dev_err(dev, "Setting up thread %u failed\n", idx)
334  task_sync = NULL
335  转到:err_out
336  否则dev_dbg(dev, "Kicked off thread %u\n", idx)
339  mutex_unlock( & thread_mutex)
341  返回:0
343  err_out :
344  ret_sync等于fail_ret
345  mutex_unlock( & thread_mutex)
347  返回:fail_ret
调用者
名称描述
try_requestsOnly wait *iff* we did not run into any errors during all of our thread* set up. If run into any issues we stop threads and just bail out with* an error to the trigger. This also means we don't need any tally work* for any threads which fail.