|
Asterisk - The Open Source Telephony Project
18.5.0
|
Keep track of which locks a thread holds. More...

Data Fields | |
| struct { | |
| struct thr_lock_info * next | |
| } | entry |
| pthread_mutex_t | lock |
| struct { | |
| struct ast_bt * backtrace | |
| const char * file | |
| const char * func | |
| int line_num | |
| void * lock_addr | |
| const char * lock_name | |
| int pending:2 | |
| int suspended:1 | |
| int times_locked | |
| enum ast_lock_type type | |
| } | locks [AST_MAX_LOCKS] |
| int | lwp |
| unsigned int | num_locks |
| pthread_t | thread_id |
| const char * | thread_name |
Keep track of which locks a thread holds.
There is an instance of this struct for every active thread
Definition at line 816 of file main/utils.c.
| struct ast_bt* backtrace |
Definition at line 835 of file main/utils.c.
Referenced by append_lock_information(), ast_remove_lock_info(), and ast_store_lock_info().
| struct { ... } entry |
| const char* file |
Definition at line 823 of file main/utils.c.
Referenced by append_lock_information(), ast_find_lock_info(), ast_store_lock_info(), and lock_info_destroy().
| const char* func |
Definition at line 824 of file main/utils.c.
Referenced by append_lock_information(), ast_find_lock_info(), ast_store_lock_info(), and lock_info_destroy().
| int line_num |
Definition at line 828 of file main/utils.c.
Referenced by append_lock_information(), ast_find_lock_info(), ast_store_lock_info(), and lock_info_destroy().
| pthread_mutex_t lock |
Protects the contents of the locks member Intentionally not ast_mutex_t
Definition at line 846 of file main/utils.c.
Referenced by append_lock_information(), ast_dump_locks(), ast_find_lock_info(), ast_log_show_lock(), ast_mark_lock_acquired(), ast_mark_lock_failed(), ast_remove_lock_info(), ast_restore_lock_info(), ast_store_lock_info(), ast_suspend_lock_info(), dummy_start(), and lock_info_destroy().
| void* lock_addr |
Definition at line 826 of file main/utils.c.
Referenced by append_lock_information(), ast_find_lock_info(), ast_log_show_lock(), ast_mark_lock_acquired(), ast_mark_lock_failed(), ast_remove_lock_info(), ast_restore_lock_info(), ast_store_lock_info(), ast_suspend_lock_info(), and lock_info_destroy().
| const char* lock_name |
Definition at line 825 of file main/utils.c.
Referenced by append_lock_information(), ast_find_lock_info(), ast_store_lock_info(), and lock_info_destroy().
| struct { ... } locks[AST_MAX_LOCKS] |
This is the actual container of info for what locks this thread holds
Referenced by append_lock_information(), ast_dump_locks(), ast_find_lock_info(), ast_log_show_lock(), ast_mark_lock_acquired(), ast_mark_lock_failed(), ast_remove_lock_info(), ast_restore_lock_info(), ast_store_lock_info(), ast_suspend_lock_info(), and lock_info_destroy().
| int lwp |
The LWP id (which GDB prints)
Definition at line 843 of file main/utils.c.
Referenced by ast_dump_locks(), and dummy_start().
| struct thr_lock_info* next |
Definition at line 847 of file main/utils.c.
| unsigned int num_locks |
This is the number of locks currently held by this thread. The index (num_locks - 1) has the info on the last one in the locks member
Definition at line 841 of file main/utils.c.
Referenced by ast_dump_locks(), ast_find_lock_info(), ast_log_show_lock(), ast_mark_lock_acquired(), ast_mark_lock_failed(), ast_remove_lock_info(), ast_restore_lock_info(), ast_store_lock_info(), ast_suspend_lock_info(), and lock_info_destroy().
| int pending |
This thread is waiting on this lock
Definition at line 831 of file main/utils.c.
Referenced by append_lock_information(), ast_mark_lock_acquired(), ast_mark_lock_failed(), ast_store_lock_info(), and lock_info_destroy().
| int suspended |
A condition has suspended this lock
Definition at line 833 of file main/utils.c.
Referenced by append_lock_information(), ast_dump_locks(), ast_restore_lock_info(), and ast_suspend_lock_info().
| pthread_t thread_id |
The thread's ID
Definition at line 818 of file main/utils.c.
Referenced by ast_dump_locks(), and dummy_start().
| const char* thread_name |
The thread name which includes where the thread was started
Definition at line 820 of file main/utils.c.
Referenced by ast_dump_locks(), dummy_start(), and lock_info_destroy().
| int times_locked |
Definition at line 827 of file main/utils.c.
Referenced by append_lock_information(), ast_mark_lock_failed(), ast_remove_lock_info(), and ast_store_lock_info().
| enum ast_lock_type type |
Definition at line 829 of file main/utils.c.
Referenced by __ast_fd_set_flags(), append_lock_information(), ast_store_lock_info(), and Property::load().
1.8.13