#include "../../locking.h"
#include "udomain.h"
#include "urecord.h"


Go to the source code of this file.
Data Structures | |
| struct | hslot |
Typedefs | |
| typedef struct hslot | hslot_t |
Functions | |
| void | deinit_slot (hslot_t *_s) |
| Deinitialize given slot structure. | |
| void | init_slot (struct udomain *_d, hslot_t *_s, int n) |
| Initialize slot structure. | |
| void | slot_add (hslot_t *_s, struct urecord *_r) |
| Add an element to slot linked list. | |
| void | slot_rem (hslot_t *_s, struct urecord *_r) |
| Remove an element from slot linked list. | |
| void | ul_destroy_locks (void) |
| Destroy all locks on the list. | |
| int | ul_init_locks (void) |
| Initialize locks for the hash table. | |
| void | ul_lock_idx (int idx) |
| Lock a lock with a certain index. | |
| void | ul_release_idx (int idx) |
| Release a lock with a certain index. | |
| void | ul_unlock_locks (void) |
| Destroy all locks on the list. | |
Definition in file hslot.h.
| void deinit_slot | ( | hslot_t * | _s | ) |
Deinitialize given slot structure.
| _s | hash slot |
Definition at line 148 of file hslot.c.
References hslot::d, hslot::first, free_urecord(), hslot::last, hslot::n, and urecord::next.
Referenced by free_udomain().
Initialize slot structure.
Initialize slot structure.
| _d | domain for the hash slot | |
| _s | hash slot | |
| n | used to get the slot number (modulo number or locks) |
Definition at line 129 of file hslot.c.
References hslot::d, hslot::first, hslot::last, hslot::lockidx, hslot::n, ul_locks, and ul_locks_no.
Referenced by new_udomain().
Add an element to slot linked list.
Add an element to slot linked list.
| _s | hash slot | |
| _r | added record |
Definition at line 170 of file hslot.c.
References hslot::first, hslot::last, hslot::n, urecord::next, urecord::prev, and urecord::slot.
Referenced by mem_insert_urecord().
Remove an element from slot linked list.
| _s | hash slot | |
| _r | removed record |
Definition at line 189 of file hslot.c.
References hslot::first, hslot::last, hslot::n, urecord::next, urecord::prev, and urecord::slot.
Referenced by mem_delete_urecord().
| void ul_destroy_locks | ( | void | ) |
| int ul_init_locks | ( | void | ) |
Initialize locks for the hash table.
Definition at line 44 of file hslot.c.
References LM_ERR, LM_INFO, ul_locks, and ul_locks_no.
Referenced by mod_init().
| void ul_lock_idx | ( | int | idx | ) |
Lock a lock with a certain index.
| idx | lock index |
Definition at line 107 of file hslot.c.
References ul_locks.
Referenced by lock_udomain(), and lock_ulslot().
| void ul_release_idx | ( | int | idx | ) |
Release a lock with a certain index.
| idx | lock index |
Definition at line 117 of file hslot.c.
References ul_locks.
Referenced by ul_unlock_locks(), unlock_udomain(), and unlock_ulslot().
| void ul_unlock_locks | ( | void | ) |
Destroy all locks on the list.
Definition at line 74 of file hslot.c.
References ul_locks, ul_locks_no, and ul_release_idx().
1.5.6