Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:torture_ww_mutex_lock

Proto:static int torture_ww_mutex_lock(void)__acquires(torture_ww_mutex_0) __acquires(torture_ww_mutex_1) __acquires(torture_ww_mutex_2)

Type:int

Parameter:Nothing

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  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
377  lock = torture_ww_mutex_1
378  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
380  lock = torture_ww_mutex_2
381  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
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  If Not err Then Continue
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  If err != -EDEADLK Then Return 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  list_move - delete from one list and add as another's head*@list: the entry to move*@head: the head that will precede our entry
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  Return 0