Mon Jun 27 16:51:25 2011

Asterisk developer's documentation


thr_lock_info Struct Reference

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


Data Fields

struct {
   thr_lock_info *   next
entry
pthread_mutex_t lock
struct {
   ast_bt *   backtrace
   const char *   file
   const char *   func
   int   line_num
   void *   lock_addr
   const char *   lock_name
   int   pending:2
   int   times_locked
   enum ast_lock_type   type
locks [AST_MAX_LOCKS]
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 473 of file utils.c.


Field Documentation

struct ast_bt* backtrace

Definition at line 490 of file utils.c.

struct { ... } entry

Referenced by dummy_start(), and lock_info_destroy().

const char* file

Definition at line 480 of file utils.c.

const char* func

Definition at line 482 of file utils.c.

int line_num

Definition at line 481 of file utils.c.

pthread_mutex_t lock

Protects the contents of the locks member Intentionally not ast_mutex_t

Definition at line 499 of file utils.c.

void* lock_addr

Definition at line 484 of file utils.c.

const char* lock_name

Definition at line 483 of file utils.c.

struct { ... } locks[AST_MAX_LOCKS]

This is the actual container of info for what locks this thread holds

struct thr_lock_info* next

Definition at line 500 of file 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 496 of file utils.c.

Referenced by ast_remove_lock_info().

int pending

This thread is waiting on this lock

Definition at line 488 of file utils.c.

pthread_t thread_id

The thread's ID

Definition at line 475 of file utils.c.

const char* thread_name

The thread name which includes where the thread was started

Definition at line 477 of file utils.c.

int times_locked

Definition at line 485 of file utils.c.

enum ast_lock_type type

Definition at line 486 of file utils.c.


The documentation for this struct was generated from the following file:
Generated on Mon Jun 27 16:51:25 2011 for Asterisk - The Open Source Telephony Project by  doxygen 1.4.7