函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_mutex_work

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

返回类型:void

参数:

类型参数名称
struct work_struct *work
33  mtx等于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( * mtx), work)
35  mplete: - signals a single thread waiting on this completion*@x: holds the state of this particular completion* This will wake up a single thread waiting on this completion. Threads will be* awakened in the same order in which they were queued.
36  wait_for_completion: - waits for completion of a task*@x: holds the state of this particular completion* This waits to be signaled for completion of a specific task. It is NOT* interruptible and there is no timeout.* See also similar routines (i
38  如果flags按位与TEST_MTX_TRY
39  当非ww_mutex_trylock - tries to acquire the w/w mutex without acquire context*@lock: mutex to lock* Trylocks a mutex without acquire context, so no deadlock detection is* possible. Returns 1 if the mutex has been acquired successfully, 0 otherwise.循环
40  cond_resched()
41  否则
42  ww_mutex_lock( & mutex, NULL)
44  mplete: - signals a single thread waiting on this completion*@x: holds the state of this particular completion* This will wake up a single thread waiting on this completion. Threads will be* awakened in the same order in which they were queued.
45  ww_mutex_unlock - release the w/w mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously with any of the* ww_mutex_lock* functions (with or without an acquire context). It is