函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:We use a kthread as otherwise the kernel serializes all our sync requests* and we would not be able to mimic batched requests on a sync call. Batched* requests on a sync call can for instance happen on a device driver when

函数原型:static ssize_t trigger_batched_requests_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)

返回类型:ssize_t

参数:

类型参数名称
struct device *dev
struct device_attribute *attr
const char *buf
size_tcount
665  mutex_lock( & test_fw_mutex)
667  These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.等于vzalloc(array3_size() - Calculate size of 3-dimensional array.*@a: dimension one*@b: dimension two*@c: dimension three* Calculates size of 3-dimensional array: @a *@b *@c.* Returns: number of bytes needed to represent the array or SIZE_MAX on* overflow.)
670  如果非These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.
671  rc等于负ENOMEM
672  转到:out_unlock
675  打印信息("batched sync firmware loading '%s' %u times\n", name, num_requests)
678 i小于num_requests循环
679  req等于These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.[i]
680  fw = NULL
681  idx等于i
682  name等于name
683  dev等于dev
684  init_completion( & completion)
685  task等于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(test_fw_run_batch_request, req, "%s-%u", KBUILD_MODNAME, idx)
687  如果非task是错误
688  打印错误信息("Setting up thread %u failed\n", idx)
689  task = NULL
690  rc等于负ENOMEM
691  转到:out_bail
695  rc等于count
705  out_bail :
706 i小于num_requests循环
707  req等于These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.[i]
708  如果tasksentwait_for_completion( & completion)
713  如果rc小于0则test_result等于rc
716  out_unlock :
717  mutex_unlock( & test_fw_mutex)
719  返回:rc