函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:stress_one_work

函数原型:static void stress_one_work(struct work_struct *work)

返回类型:void

参数:

类型参数名称
struct work_struct *work
499  stress等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(work, typeof( * stress), work)
500  nlocks等于nlocks
501  lock等于locksget_random_int()取模nlocks
504  循环
505  err等于ww_mutex_lock(lock, NULL)
506  如果非err
509  否则
510  pr_err_once("stress (%s) failed with %d\n", __func__, err)
512  退出
514  当非These inlines deal with timer wrapping correctly. You are * strongly encouraged to use them* 1. Because people otherwise forget* 2. Because if the timer wrap changes in future you won't have to* alter your driver code.(jiffies, timeout)循环
516  释放内存