函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_aa

函数原型:static int test_aa(void)

返回类型:int

参数:

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  如果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.
124  打印错误信息("%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  转到:out
130  ret等于ww_mutex_lock( & mutex, & ctx)
131  如果ret不等于负EALREADY
132  打印错误信息("%s: missed deadlock for recursing, ret=%d\n", __func__, ret)
134  如果非retww_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  转到: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  返回:ret
调用者
名称描述
test_ww_mutex_init