Functions | Variables

modules_k/usrloc/hslot.c File Reference

USRLOC - Hash table collision slot related functions

More...

#include "hslot.h"
Include dependency graph for modules_k/usrloc/hslot.c:

Go to the source code of this file.

Functions

Variables


Detailed Description

Definition in file modules_k/usrloc/hslot.c.


Function Documentation

void deinit_slot ( hslot_t *  _s  ) 
Parameters:
_s hash slot

Definition at line 148 of file modules_k/usrloc/hslot.c.

References free_urecord(), and urecord::next.

Here is the call graph for this function:

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/usrloc/hslot.c.

References ul_locks, and ul_locks_no.

void slot_add ( hslot_t *  _s,
struct urecord _r 
)

Add an element to slot linked list.

Parameters:
_s hash slot
_r added record

Definition at line 170 of file modules_k/usrloc/hslot.c.

References urecord::next, urecord::prev, and urecord::slot.

void slot_rem ( hslot_t *  _s,
struct urecord _r 
)
Parameters:
_s hash slot
_r removed record

Definition at line 189 of file modules_k/usrloc/hslot.c.

References urecord::next, urecord::prev, and urecord::slot.

int ul_init_locks ( void   ) 
Returns:
0 on success, -1 on failure

Definition at line 44 of file modules_k/usrloc/hslot.c.

References ul_locks, and ul_locks_no.

void ul_lock_idx ( int  idx  ) 
Parameters:
idx lock index

Definition at line 107 of file modules_k/usrloc/hslot.c.

References ul_locks.

void ul_release_idx ( int  idx  ) 
Parameters:
idx lock index

Definition at line 117 of file modules_k/usrloc/hslot.c.

References ul_locks.

void ul_unlock_locks ( void   ) 

Destroy all locks on the list.

Definition at line 74 of file modules_k/usrloc/hslot.c.

References ul_locks, ul_locks_no, and ul_release_idx().

Here is the call graph for this function: