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:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:test_aa

Proto:static int test_aa(void)

Type:int

Parameter:Nothing

118  ww_mutex_init - initialize the w/w mutex*@lock: the mutex to be initialized*@ww_class: the w/w class the mutex should belong to* Initialize the w/w mutex to unlocked state and associate it with the given* class.
119  ww_acquire_init - initialize a w/w acquire context*@ctx: w/w acquire context to initialize*@ww_class: w/w class of the context* Initializes an context to acquire multiple mutexes of the given w/w class
121  ww_mutex_lock( & mutex, & ctx)
123  If 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. Then
124  pr_err("%s: trylocked itself!\n", __func__)
125  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
126  ret = -EINVAL
127  Go to out
130  ret = ww_mutex_lock( & mutex, & ctx)
131  If ret != -EALREADY Then
132  pr_err("%s: missed deadlock for recursing, ret=%d\n", __func__, ret)
134  If Not ret Then 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
136  ret = -EINVAL
137  Go to out
140  ret = 0
141  out :
142  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
143  ww_acquire_fini - releases a w/w acquire context*@ctx: the acquire context to free* Releases a w/w acquire context. This must be called _after_ all acquired w/w* mutexes have been released with ww_mutex_unlock.
144  Return ret
Caller
NameDescribe
test_ww_mutex_init