Thu Dec 17 23:52:10 2009

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 {
   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 466 of file utils.c.


Field Documentation

struct { ... } entry

Referenced by dummy_start(), and lock_info_destroy().

const char* file

Definition at line 473 of file utils.c.

Referenced by handle_show_locks(), and lock_info_destroy().

const char* func

Definition at line 475 of file utils.c.

Referenced by handle_show_locks(), and lock_info_destroy().

int line_num

Definition at line 474 of file utils.c.

Referenced by handle_show_locks(), and lock_info_destroy().

pthread_mutex_t lock

Protects the contents of the locks member Intentionally not ast_mutex_t

Definition at line 489 of file utils.c.

Referenced by handle_show_locks().

void* lock_addr

Definition at line 477 of file utils.c.

Referenced by handle_show_locks(), and lock_info_destroy().

const char* lock_name

Definition at line 476 of file utils.c.

Referenced by handle_show_locks(), and lock_info_destroy().

struct { ... } locks[AST_MAX_LOCKS]

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

Referenced by handle_show_locks(), and lock_info_destroy().

struct thr_lock_info* next

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

Referenced by ast_remove_lock_info(), handle_show_locks(), and lock_info_destroy().

int pending

This thread is waiting on this lock

Definition at line 481 of file utils.c.

Referenced by handle_show_locks(), and lock_info_destroy().

pthread_t thread_id

The thread's ID

Definition at line 468 of file utils.c.

Referenced by handle_show_locks().

const char* thread_name

The thread name which includes where the thread was started

Definition at line 470 of file utils.c.

Referenced by handle_show_locks(), and lock_info_destroy().

int times_locked

Definition at line 478 of file utils.c.

Referenced by handle_show_locks().

enum ast_lock_type type

Definition at line 479 of file utils.c.

Referenced by handle_show_locks().


The documentation for this struct was generated from the following file:
Generated on Thu Dec 17 23:52:10 2009 for Asterisk - the Open Source PBX by  doxygen 1.4.7