USRLOC - Hash table collision slot related functions.
More...
#include "../../locking.h"
#include "udomain.h"
#include "urecord.h"
Go to the source code of this file.
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.
Detailed Description
Definition in file modules_k/p_usrloc/hslot.h.
Function Documentation
| void deinit_slot |
( |
hslot_t * |
_s |
) |
|
| void init_slot |
( |
struct udomain * |
_d, |
|
|
hslot_t * |
_s, |
|
|
int |
n | |
|
) |
| | |
Initialize slot structure.
- Parameters:
-
| _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 modules_k/p_usrloc/hslot.c.
| void slot_add |
( |
hslot_t * |
_s, |
|
|
struct urecord * |
_r | |
|
) |
| | |
| void slot_rem |
( |
hslot_t * |
_s, |
|
|
struct urecord * |
_r | |
|
) |
| | |
| int ul_init_locks |
( |
void |
|
) |
|
| void ul_lock_idx |
( |
int |
idx |
) |
|
| void ul_release_idx |
( |
int |
idx |
) |
|