lock.h File Reference

TM :: Locking functions. More...

#include "../../dprint.h"
#include "../../locking.h"
#include "h_table.h"
#include "timer.h"
#include "timer.h"

Include dependency graph for lock.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ser_lock_t

Defines

#define IPC_PERMISSIONS   0666
#define lock(_s)   _lock( (_s) )
#define unlock(_s)   _unlock( (_s) )

Enumerations

enum  timer_groups {
  TG_FR, TG_WT, TG_DEL, TG_RT,
  TG_NR
}

Functions

static void _lock (ser_lock_t *s)
static void _unlock (ser_lock_t *s)
int init_cell_lock (struct cell *cell)
int init_entry_lock (struct s_table *ht, struct entry *entry)
int init_timerlist_lock (enum lists timerlist_id)
void lock_cleanup (void)
 remove the semaphore set from system
int lock_initialize (void)
 Initialize the locks.


Detailed Description

TM :: Locking functions.

Definition in file lock.h.


Define Documentation

#define IPC_PERMISSIONS   0666

Uni*x permissions for IPC

Definition at line 72 of file lock.h.

#define lock ( _s   )     _lock( (_s) )

Definition at line 82 of file lock.h.

#define unlock ( _s   )     _unlock( (_s) )

Definition at line 83 of file lock.h.


Enumeration Type Documentation

Enumerator:
TG_FR 
TG_WT 
TG_DEL 
TG_RT 
TG_NR 

Definition at line 58 of file lock.h.


Function Documentation

static void _lock ( ser_lock_t s  )  [inline, static]

Definition at line 96 of file lock.h.

References LM_DBG, ser_lock_t::semaphore_index, and ser_lock_t::semaphore_set.

static void _unlock ( ser_lock_t s  )  [inline, static]

Definition at line 115 of file lock.h.

References LM_DBG, ser_lock_t::semaphore_index, and ser_lock_t::semaphore_set.

int init_cell_lock ( struct cell cell  ) 

int init_entry_lock ( struct s_table ht,
struct entry entry 
)

int init_timerlist_lock ( enum lists  timerlist_id  ) 

Definition at line 261 of file lock.c.

References get_timertable(), timer::mutex, timer_group, and timer_table::timers.

Referenced by init_timer_list().

void lock_cleanup ( void   ) 

remove the semaphore set from system

Definition at line 204 of file lock.c.

References entry_semaphore, reply_semaphore, shm_free, and timer_semaphore.

Referenced by lock_initialize(), and tm_shutdown().

int lock_initialize ( void   ) 

Initialize the locks.

Returns:
0 on success, -1 otherwise

Definition at line 84 of file lock.c.

References entry_semaphore, LM_CRIT, LM_DBG, LM_INFO, lock_cleanup(), reply_semaphore, SEM_MAX, SEM_MIN, sem_nr, ser_lock_t::semaphore_index, ser_lock_t::semaphore_set, shm_malloc(), TG_NR, timer_group, and timer_semaphore.

Referenced by init_hash_table().


Generated on Wed May 23 18:00:41 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6