Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00030 #ifndef HSLOT_H
00031 #define HSLOT_H
00032
00033 #include "../../locking.h"
00034
00035 #include "udomain.h"
00036 #include "urecord.h"
00037
00038
00039 struct udomain;
00040 struct urecord;
00041
00042
00043 typedef struct hslot {
00044 int n;
00045 struct urecord* first;
00046 struct urecord* last;
00047 struct udomain* d;
00048 #ifdef GEN_LOCK_T_PREFERED
00049 gen_lock_t *lock;
00050 #else
00051 int lockidx;
00052 #endif
00053 } hslot_t;
00054
00058 void init_slot(struct udomain* _d, hslot_t* _s, int n);
00059
00060
00064 void deinit_slot(hslot_t* _s);
00065
00066
00070 void slot_add(hslot_t* _s, struct urecord* _r);
00071
00072
00076 void slot_rem(hslot_t* _s, struct urecord* _r);
00077
00078
00083 int ul_init_locks(void);
00084
00085
00089 void ul_unlock_locks(void);
00090 void ul_destroy_locks(void);
00091
00092 #ifndef GEN_LOCK_T_PREFERED
00093 void ul_lock_idx(int idx);
00094 void ul_release_idx(int idx);
00095 #endif
00096
00097 #endif