Asterisk - The Open Source Telephony Project  18.5.0
Data Fields
thr_lock_info Struct Reference

Keep track of which locks a thread holds. More...

Collaboration diagram for thr_lock_info:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Field Documentation

◆ backtrace

struct ast_bt* backtrace

◆ entry

struct { ... } entry

◆ file

const char* file

◆ func

const char* func

◆ line_num

int line_num

◆ lock

◆ lock_addr

void* lock_addr

◆ lock_name

const char* lock_name

◆ locks

struct { ... } locks[AST_MAX_LOCKS]

◆ lwp

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().

◆ next

struct thr_lock_info* next

Definition at line 847 of file main/utils.c.

◆ num_locks

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().

◆ pending

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().

◆ suspended

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().

◆ thread_id

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().

◆ thread_name

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().

◆ times_locked

int times_locked

◆ type

enum ast_lock_type type

The documentation for this struct was generated from the following file: