函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:torture_ww_mutex_lock

函数原型:static int torture_ww_mutex_lock(void)__acquires(torture_ww_mutex_0) __acquires(torture_ww_mutex_1) __acquires(torture_ww_mutex_2)

返回类型:int

参数:

367  LIST_HEAD(list)
368  struct reorder_lock{struct list_head link;struct ww_mutex * lock;}locks[3], * ll, * ln
374  lock等于torture_ww_mutex_0
375  添加链表项
377  lock等于torture_ww_mutex_1
378  添加链表项
380  lock等于torture_ww_mutex_2
381  添加链表项
383  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
388  err等于ww_mutex_lock(lock, & ctx)
389  如果非err则继续下一循环
392  ln等于ll
393  list_for_each_entry_continue_reverse - iterate backwards from the given point*@pos: the type * to use as a loop cursor(ln, & list, link)
394  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
396  如果err不等于负EDEADLK则返回:err
399  ww_mutex_lock_slow - slowpath acquiring of the w/w mutex*@lock: the mutex to be acquired*@ctx: w/w acquire context* Acquires a w/w mutex with the given context after a die case
400  链表项移动到头部
403  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.
404  返回:0