Home
last modified time | relevance | path

Searched refs:hsearch (Results 1 – 11 of 11) sorted by relevance

/bionic/libc/upstream-freebsd/lib/libc/stdlib/
Dhcreate_r.c37 struct __hsearch *hsearch; in hcreate_r() local
45 hsearch = malloc(sizeof(*hsearch)); in hcreate_r()
46 if (hsearch == NULL) in hcreate_r()
48 hsearch->entries = calloc(16, sizeof(ENTRY)); in hcreate_r()
49 if (hsearch->entries == NULL) { in hcreate_r()
50 free(hsearch); in hcreate_r()
58 arc4random_buf(&hsearch->offset_basis, sizeof(hsearch->offset_basis)); in hcreate_r()
59 hsearch->index_mask = 0xf; in hcreate_r()
60 hsearch->entries_used = 0; in hcreate_r()
61 htab->__hsearch = hsearch; in hcreate_r()
Dhsearch_r.c44 hsearch_lookup_free(struct __hsearch *hsearch, size_t hash) in hsearch_lookup_free() argument
49 ENTRY *entry = &hsearch->entries[index & hsearch->index_mask]; in hsearch_lookup_free()
78 struct __hsearch *hsearch; in hsearch_r() local
82 hsearch = htab->__hsearch; in hsearch_r()
83 hash = hsearch_hash(hsearch->offset_basis, item.key); in hsearch_r()
90 entry = &hsearch->entries[index & hsearch->index_mask]; in hsearch_r()
105 if (hsearch->entries_used * 2 >= hsearch->index_mask) { in hsearch_r()
107 old_count = hsearch->index_mask + 1; in hsearch_r()
108 old_entries = hsearch->entries; in hsearch_r()
116 new_count = (hsearch->index_mask + 1) * 2; in hsearch_r()
[all …]
Dhdestroy_r.c37 struct __hsearch *hsearch; in hdestroy_r() local
40 hsearch = htab->__hsearch; in hdestroy_r()
41 free(hsearch->entries); in hdestroy_r()
42 free(hsearch); in hdestroy_r()
Dhcreate.c62 hsearch(ENTRY item, ACTION action) in hsearch() function
/bionic/tests/
Dsearch_test.cpp228 e = hsearch(ENTRY{.key = const_cast<char*>("a"), .data = const_cast<char*>("A")}, ENTER); in TEST()
230 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = const_cast<char*>("B")}, ENTER); in TEST()
232 e = hsearch(ENTRY{.key = const_cast<char*>("aaa"), .data = const_cast<char*>("C")}, ENTER); in TEST()
236 e = hsearch(ENTRY{.key = const_cast<char*>("aaaa"), .data = nullptr}, FIND); in TEST()
240 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = nullptr}, FIND); in TEST()
244 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = const_cast<char*>("X")}, ENTER); in TEST()
249 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = nullptr}, FIND); in TEST()
252 e = hsearch(ENTRY{.key = const_cast<char*>("a"), .data = nullptr}, FIND); in TEST()
254 e = hsearch(ENTRY{.key = const_cast<char*>("aaa"), .data = nullptr}, FIND); in TEST()
304 ASSERT_TRUE(hsearch(e, ENTER) != nullptr); in TEST()
[all …]
/bionic/tests/headers/posix/
Dsearch_h.c53 FUNCTION(hsearch, ENTRY* (*f)(ENTRY, ACTION)); in search_h()
/bionic/libc/include/
Dsearch.h115 ENTRY* hsearch(ENTRY __entry, ACTION __action) __INTRODUCED_IN(28);
/bionic/libc/tools/
Dposix-2013.txt392 hsearch
/bionic/docs/
Dstatus.md93 * `hcreate`/`hcreate_r`/`hdestroy`/`hdestroy_r`/`hsearch`/`hsearch_r` (completing <search.h>)
/bionic/tools/versioner/platforms/
Dlibc.map.txt1379 hsearch;
/bionic/libc/
Dlibc.map.txt1379 hsearch;