#include <errno.h>
#include "lock.h"
#include "timer.h"
#include "../../dprint.h"

Go to the source code of this file.
Defines | |
| #define | SEM_MAX 4096 |
| #define | SEM_MIN 16 |
Functions | |
| 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 () |
| remove the semaphore set from system | |
| int | lock_initialize (void) |
| Initialize the locks. | |
Variables | |
| gen_lock_set_t * | entry_semaphore = 0 |
| gen_lock_set_t * | reply_semaphore = 0 |
| static int | sem_nr |
| static ser_lock_t * | timer_group_lock = 0 |
| gen_lock_set_t * | timer_semaphore = 0 |
Definition in file lock.c.
| #define SEM_MAX 4096 |
| #define SEM_MIN 16 |
| int init_cell_lock | ( | struct cell * | cell | ) |
Definition at line 232 of file lock.c.
References cell::hash_index, cell::reply_mutex, reply_semaphore, sem_nr, ser_lock_t::semaphore_index, and ser_lock_t::semaphore_set.
Referenced by build_cell().
Definition at line 244 of file lock.c.
References entry_semaphore, s_table::entrys, entry::mutex, sem_nr, ser_lock_t::semaphore_index, and ser_lock_t::semaphore_set.
Referenced by init_hash_table().
| 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.
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().
| gen_lock_set_t* entry_semaphore = 0 |
Definition at line 71 of file lock.c.
Referenced by init_entry_lock(), lock_cleanup(), and lock_initialize().
| gen_lock_set_t* reply_semaphore = 0 |
Definition at line 72 of file lock.c.
Referenced by init_cell_lock(), lock_cleanup(), and lock_initialize().
int sem_nr [static] |
and the maximum number of semaphores in the entry_semaphore set
Definition at line 69 of file lock.c.
Referenced by init_cell_lock(), init_entry_lock(), and lock_initialize().
ser_lock_t* timer_group_lock = 0 [static] |
| gen_lock_set_t* timer_semaphore = 0 |
1.5.6