2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; only version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307, USA.
18 #ifndef _LTT_HASHTABLE_H
19 #define _LTT_HASHTABLE_H
22 #include "../hashtable/rculfhash.h"
24 struct cds_lfht
*hashtable_new(unsigned long size
);
25 struct cds_lfht
*hashtable_new_str(unsigned long size
);
27 struct cds_lfht_node
*hashtable_iter_get_node(struct cds_lfht_iter
*iter
);
28 struct cds_lfht_node
*hashtable_lookup(struct cds_lfht
*ht
, void *key
,
29 size_t key_len
, struct cds_lfht_iter
*iter
);
31 void hashtable_get_first(struct cds_lfht
*ht
, struct cds_lfht_iter
*iter
);
32 void hashtable_get_next(struct cds_lfht
*ht
, struct cds_lfht_iter
*iter
);
33 void hashtable_add_unique(struct cds_lfht
*ht
, struct cds_lfht_node
*node
);
34 void hashtable_node_init(struct cds_lfht_node
*node
,
35 void *key
, size_t key_len
);
37 int hashtable_del(struct cds_lfht
*ht
, struct cds_lfht_iter
*iter
);
38 unsigned long hashtable_get_count(struct cds_lfht
*ht
);
40 #endif /* _LTT_HASHTABLE_H */
This page took 0.031411 seconds and 4 git commands to generate.