Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\test-ww_mutex.c Create Date:2022-07-28 09:54:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:test_mutex_work

Proto:static void test_mutex_work(struct work_struct *work)

Type:void

Parameter:

TypeParameterName
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  If flags & TEST_MTX_TRY Then
39  When Not 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. cycle
40  cond_resched()
41  Else
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