Home
last modified time | relevance | path

Searched refs:thunk (Results 1 – 25 of 45) sorted by relevance

12

/freebsd/lib/libc/stdio/
H A Dfopencookie.c50 struct fopencookie_thunk *thunk; in fopencookie() local
57 thunk = malloc(sizeof(*thunk)); in fopencookie()
58 if (thunk == NULL) in fopencookie()
61 thunk->foc_cookie = cookie; in fopencookie()
62 thunk->foc_io = io_funcs; in fopencookie()
71 fp = funopen(thunk, readfn, writefn, _fopencookie_seek, in fopencookie()
74 free(thunk); in fopencookie()
87 struct fopencookie_thunk *thunk; in _fopencookie_read() local
89 thunk = cookie; in _fopencookie_read()
92 if (thunk->foc_io.read == NULL) in _fopencookie_read()
[all …]
/freebsd/lib/libc/tests/stdlib/
H A Dqsort_s_test.c44 sorthelp_s(const void *a, const void *b, void *thunk) in sorthelp_s() argument
48 ATF_REQUIRE_EQ(*(int *)thunk, THUNK); in sorthelp_s()
70 int thunk = THUNK; in ATF_TC_BODY() local
73 ATF_CHECK(qsort_s(&b, -1, sizeof(int), sorthelp_s, &thunk) != 0); in ATF_TC_BODY()
80 int thunk = THUNK; in ATF_TC_BODY() local
83 ATF_CHECK(qsort_s(&b, RSIZE_MAX + 1, sizeof(int), sorthelp_s, &thunk) != 0); in ATF_TC_BODY()
90 int thunk = THUNK; in ATF_TC_BODY() local
93 ATF_CHECK(qsort_s(&b, 1, -1, sorthelp_s, &thunk) != 0); in ATF_TC_BODY()
100 int thunk = THUNK; in ATF_TC_BODY() local
103 ATF_CHECK(qsort_s(&b, 1, RSIZE_MAX + 1, sorthelp_s, &thunk) != 0); in ATF_TC_BODY()
[all …]
H A Dqsort_r_compat_test.c40 sorthelp_r(void *thunk, const void *a, const void *b) in sorthelp_r() argument
44 ATF_REQUIRE_EQ(*(int *)thunk, THUNK); in sorthelp_r()
62 int thunk = THUNK; in ATF_TC_BODY() local
70 qsort_r(testvector, j, sizeof(testvector[0]), &thunk, in ATF_TC_BODY()
H A Dqsort_r_test.c40 sorthelp_r(const void *a, const void *b, void *thunk) in sorthelp_r() argument
44 ATF_REQUIRE_EQ(*(int *)thunk, THUNK); in sorthelp_r()
62 int thunk = THUNK; in ATF_TC_BODY() local
71 &thunk); in ATF_TC_BODY()
/freebsd/sys/sys/
H A Dqueue_mergesort.h53 #define SYSQUEUE_MERGE(sqms_list1, sqms_list2, thunk, sqms_cmp, TYPE, NAME, \ argument
71 (sqms_cmp)(sqms_elm2, sqms_elm1, thunk) >= 0) { \
87 sqms_mpos, thunk, sqms_cmp, TYPE, NAME, \ argument
107 thunk) >= 0)) { \
122 #define SYSQUEUE_MERGESORT(sqms_head, thunk, sqms_cmp, TYPE, NAME, M_HEAD, \ argument
154 sqms_sortmask, sqms_elm, sqms_mpos, thunk, sqms_cmp,\
168 sqms_elm, sqms_mpos, thunk, sqms_cmp, \
185 #define SLIST_MERGESORT(head, thunk, cmp, TYPE, NAME) \ argument
186 SYSQUEUE_MERGESORT((head), (thunk), (cmp), TYPE, NAME, SLIST_HEAD, \
189 #define SLIST_MERGE(list1, list2, thunk, cmp, TYPE, NAME) \ argument
[all …]
H A Dlibkern.h247 int (*compar)(const void *, const void *, void *), void *thunk);
/freebsd/lib/libc/stdlib/
H A Dqsort.c81 med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk in med3()
87 return CMP(thunk, a, b) < 0 ? in med3()
88 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) in med3()
89 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); in med3()
104 local_qsort(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk) in local_qsort() argument
117 pl > (char *)a && CMP(thunk, pl - es, pl) > 0; in local_qsort()
129 pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); in local_qsort()
130 pm = med3(pm - d, pm, pm + d, cmp, thunk); in local_qsort()
221 __qsort_r_compat(void * a,size_t n,size_t es,void * thunk,cmp_t * cmp) __qsort_r_compat() argument
227 qsort_s(void * a,rsize_t n,rsize_t es,cmp_t * cmp,void * thunk) qsort_s() argument
[all...]
/freebsd/sys/libkern/
H A Dqsort.c94 med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk in med3()
100 return CMP(thunk, a, b) < 0 ? in med3()
101 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) in med3()
102 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); in med3()
107 (qsort_r)(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk)
109 #define thunk NULL
124 pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
136 pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
[all...]
/freebsd/crypto/heimdal/lib/roken/
H A Dqsort.c99 med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk in med3() argument
105 return CMP(thunk, a, b) < 0 ? in med3()
106 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) in med3()
107 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); in med3()
112 rk_qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp) in rk_qsort_r() argument
114 #define thunk NULL in rk_qsort_r()
129 pl > (char *)a && CMP(thunk, pl - es, pl) > 0; in rk_qsort_r()
140 pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); in rk_qsort_r()
141 pm = med3(pm - d, pm, pm + d, cmp, thunk); in rk_qsort_r()
142 pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); in rk_qsort_r()
[all …]
/freebsd/sys/dev/drm2/
H A Ddrm_linux_list_sort.c41 struct drm_list_sort_thunk *thunk; in drm_le_cmp() local
43 thunk = priv; in drm_le_cmp()
46 return ((thunk->cmp)(thunk->priv, le1, le2)); in drm_le_cmp()
56 struct drm_list_sort_thunk thunk; in drm_list_sort() local
67 thunk.cmp = cmp; in drm_list_sort()
68 thunk.priv = priv; in drm_list_sort()
69 qsort_r(ar, count, sizeof(struct list_head *), drm_le_cmp, &thunk); in drm_list_sort()
/freebsd/lib/libproc/
H A Dproc_sym.c108 struct symsort_thunk *thunk; in symvalcmp() local
115 thunk = _thunk; in symvalcmp()
117 (void)gelf_getsym(thunk->symtab->data, i1, &sym1); in symvalcmp()
118 (void)gelf_getsym(thunk->symtab->data, i2, &sym2); in symvalcmp()
133 s1 = elf_strptr(thunk->e, thunk->symtab->stridx, sym1.st_name); in symvalcmp()
134 s2 = elf_strptr(thunk->e, thunk->symtab->stridx, sym2.st_name); in symvalcmp()
159 struct symsort_thunk thunk; in load_symtab() local
190 thunk.e = e; in load_symtab()
191 thunk.symtab = symtab; in load_symtab()
192 qsort_r(symtab->index, nsyms, sizeof(u_int), symvalcmp, &thunk); in load_symtab()
/freebsd/lib/libc/gen/
H A Dscandir-compat11.c57 void *thunk);
139 freebsd11_scandir_thunk_cmp(const void *p1, const void *p2, void *thunk) in freebsd11_scandir_thunk_cmp() argument
145 const struct freebsd11_dirent **))thunk; in freebsd11_scandir_thunk_cmp()
H A Dscandir.c63 static int scandir_thunk_cmp(const void *p1, const void *p2, void *thunk);
245 scandir_thunk_cmp(const void *p1, const void *p2, void *thunk) in scandir_thunk_cmp() argument
249 dc = *(int (**)(const struct dirent **, const struct dirent **))thunk; in scandir_thunk_cmp()
/freebsd/sys/kern/
H A Dkern_thr.c110 thr_create_initthr(struct thread *td, void *thunk) in thr_create_initthr() argument
115 args = thunk; in thr_create_initthr()
151 thr_new_initthr(struct thread *td, void *thunk) in thr_new_initthr() argument
164 param = thunk; in thr_new_initthr()
207 int (*initialize_thread)(struct thread *, void *), void *thunk) in thread_create() argument
258 error = initialize_thread(newtd, thunk); in thread_create()
/freebsd/sys/net/
H A Dif.c2776 } thunk; in ifioctl() local
2806 thunk.ifc.ifc_len = ifc32->ifc_len; in ifioctl()
2807 thunk.ifc.ifc_buf = PTRIN(ifc32->ifc_buf); in ifioctl()
2808 data = (caddr_t)&thunk.ifc; in ifioctl()
2814 memcpy(thunk.ifd.ifd_name, ifd32->ifd_name, in ifioctl()
2815 sizeof(thunk.ifd.ifd_name)); in ifioctl()
2816 thunk.ifd.ifd_cmd = ifd32->ifd_cmd; in ifioctl()
2817 thunk.ifd.ifd_len = ifd32->ifd_len; in ifioctl()
2818 thunk.ifd.ifd_data = PTRIN(ifd32->ifd_data); in ifioctl()
2819 data = (caddr_t)&thunk.ifd; in ifioctl()
[all …]
/freebsd/sys/opencrypto/
H A Dcryptodev.c1134 } thunk; in crypto_ioctl() local
1146 data = (void *)&thunk.sopc; in crypto_ioctl()
1147 session_op_from_32((struct session_op32 *)data32, &thunk.sopc); in crypto_ioctl()
1153 data = (void *)&thunk.sopc; in crypto_ioctl()
1155 &thunk.sopc); in crypto_ioctl()
1161 data = (void *)&thunk.copc; in crypto_ioctl()
1162 crypt_op_from_32((struct crypt_op32 *)data32, &thunk.copc); in crypto_ioctl()
1168 data = (void *)&thunk.aeadc; in crypto_ioctl()
1169 crypt_aead_from_32((struct crypt_aead32 *)data32, &thunk.aeadc); in crypto_ioctl()
1195 session2_op_from_op((void *)data, &thunk.sopc); in crypto_ioctl()
[all …]
/freebsd/contrib/llvm-project/lld/MachO/Arch/
H A DARM64.cpp42 void populateThunk(InputSection *thunk, Symbol *funcSym) override;
165 void ARM64::populateThunk(InputSection *thunk, Symbol *funcSym) { in populateThunk() argument
166 thunk->align = 4; in populateThunk()
167 thunk->data = {reinterpret_cast<const uint8_t *>(thunkCode), in populateThunk()
169 thunk->relocs.emplace_back(/*type=*/ARM64_RELOC_PAGEOFF12, in populateThunk()
173 thunk->relocs.emplace_back(/*type=*/ARM64_RELOC_PAGE21, in populateThunk()
/freebsd/include/
H A Dstdlib.h375 void *thunk, int (*compar)(void *, const void *, const void *)) { in qsort_r() argument
376 __qsort_r_compat(base, nmemb, size, thunk, compar); in qsort_r()
/freebsd/contrib/llvm-project/lld/COFF/
H A DInputFiles.h161 uint32_t addRangeThunkSymbol(Symbol *thunk) { in addRangeThunkSymbol() argument
162 symbols.push_back(thunk); in addRangeThunkSymbol()
H A DDLL.cpp533 : thunk(c), ctx(ctx) { in DelayAddressChunk()
540 write64le(buf, thunk->getRVA() + ctx.config.imageBase); in writeTo()
546 write32le(buf, (thunk->getRVA() + ctx.config.imageBase) | bit); in writeTo()
554 Chunk *thunk; member in lld::coff::__anon0bfb8df40111::DelayAddressChunk
H A DWriter.cpp499 auto [thunk, wasNew] = getThunk(lastThunks, sym, p, rel.Type, margin); in createThunks()
501 Chunk *thunkChunk = thunk->getChunk(); in createThunks()
514 auto insertion = thunkSymtabIndices.insert({{file, thunk}, ~0U}); in createThunks()
517 thunkSymbolIndex = file->addRangeThunkSymbol(thunk); in createThunks()
1204 DefinedImportThunk *thunk = cast<DefinedImportThunk>(file->thunkSym); in appendImportThunks() local
1206 textSec->addChunk(thunk->getChunk()); in appendImportThunks()
H A DPDB.cpp1555 DefinedImportThunk *thunk = cast<DefinedImportThunk>(file->thunkSym); in addImportFilesToPDB() local
1556 Chunk *thunkChunk = thunk->getChunk(); in addImportFilesToPDB()
1569 ts.Name = thunk->getName(); in addImportFilesToPDB()
1600 createSectionContrib(ctx, thunk->getChunk(), mod->getModuleIndex()); in addImportFilesToPDB()
/freebsd/sys/compat/linuxkpi/common/src/
H A Dlinux_compat.c2584 struct list_sort_thunk *thunk; in linux_le_cmp() local
2586 thunk = priv; in linux_le_cmp()
2589 return ((thunk->cmp)(thunk->priv, le1, le2)); in linux_le_cmp()
2596 struct list_sort_thunk thunk; in list_sort() local
2607 thunk.cmp = cmp; in list_sort()
2608 thunk.priv = priv; in list_sort()
2609 qsort_r(ar, count, sizeof(struct list_head *), linux_le_cmp, &thunk); in list_sort()
/freebsd/contrib/llvm-project/lld/MachO/
H A DTarget.h86 virtual void populateThunk(InputSection *thunk, Symbol *funcSym) { in populateThunk() argument
/freebsd/bin/sh/
H A Dhistedit.c585 comparator(const void *a, const void *b, void *thunk) in comparator() argument
587 size_t curpos = (intptr_t)thunk; in comparator()

12