Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_kmod.c Create Date:2022-07-28 06:34:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:try_one_request

Proto:static int try_one_request(struct kmod_test_device *test_dev, unsigned int idx)

Type:int

Parameter:

TypeParameterName
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  If Not task_sync || IS_ERR(task_sync) Then
332  test_is_oom = true
333  dev_err(dev, "Setting up thread %u failed\n", idx)
334  task_sync = NULL
335  Go to err_out
336  Else dev_dbg(dev, "Kicked off thread %u\n", idx)
339  mutex_unlock( & thread_mutex)
341  Return 0
343  err_out :
344  ret_sync = fail_ret
345  mutex_unlock( & thread_mutex)
347  Return fail_ret
Caller
NameDescribe
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.