bin/sh/histedit.c
585
comparator(const void *a, const void *b, void *thunk)
bin/sh/histedit.c
587
size_t curpos = (intptr_t)thunk;
crypto/heimdal/lib/roken/qsort.c
105
return CMP(thunk, a, b) < 0 ?
crypto/heimdal/lib/roken/qsort.c
106
(CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
crypto/heimdal/lib/roken/qsort.c
107
:(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
crypto/heimdal/lib/roken/qsort.c
112
rk_qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
crypto/heimdal/lib/roken/qsort.c
129
pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
crypto/heimdal/lib/roken/qsort.c
140
pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
crypto/heimdal/lib/roken/qsort.c
141
pm = med3(pm - d, pm, pm + d, cmp, thunk);
crypto/heimdal/lib/roken/qsort.c
142
pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
crypto/heimdal/lib/roken/qsort.c
144
pm = med3(pl, pm, pn, cmp, thunk);
crypto/heimdal/lib/roken/qsort.c
151
while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
crypto/heimdal/lib/roken/qsort.c
159
while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
crypto/heimdal/lib/roken/qsort.c
177
pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
crypto/heimdal/lib/roken/qsort.c
190
rk_qsort_r(a, r / es, es, thunk, cmp);
crypto/heimdal/lib/roken/qsort.c
99
med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
include/stdlib.h
375
void *thunk, int (*compar)(void *, const void *, const void *)) {
include/stdlib.h
376
__qsort_r_compat(base, nmemb, size, thunk, compar);
lib/libc/gen/scandir-compat11.c
139
freebsd11_scandir_thunk_cmp(const void *p1, const void *p2, void *thunk)
lib/libc/gen/scandir-compat11.c
145
const struct freebsd11_dirent **))thunk;
lib/libc/gen/scandir-compat11.c
57
void *thunk);
lib/libc/gen/scandir.c
245
scandir_thunk_cmp(const void *p1, const void *p2, void *thunk)
lib/libc/gen/scandir.c
249
dc = *(int (**)(const struct dirent **, const struct dirent **))thunk;
lib/libc/gen/scandir.c
63
static int scandir_thunk_cmp(const void *p1, const void *p2, void *thunk);
lib/libc/stdio/fopencookie.c
101
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
103
thunk = cookie;
lib/libc/stdio/fopencookie.c
106
if (thunk->foc_io.write == NULL)
lib/libc/stdio/fopencookie.c
109
return ((int)thunk->foc_io.write(thunk->foc_cookie, buf,
lib/libc/stdio/fopencookie.c
116
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
131
thunk = cookie;
lib/libc/stdio/fopencookie.c
137
if (thunk->foc_io.seek == NULL) {
lib/libc/stdio/fopencookie.c
143
res = thunk->foc_io.seek(thunk->foc_cookie, &off64, whence);
lib/libc/stdio/fopencookie.c
153
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
157
thunk = cookie;
lib/libc/stdio/fopencookie.c
158
if (thunk->foc_io.close != NULL)
lib/libc/stdio/fopencookie.c
159
ret = thunk->foc_io.close(thunk->foc_cookie);
lib/libc/stdio/fopencookie.c
162
free(thunk);
lib/libc/stdio/fopencookie.c
50
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
57
thunk = malloc(sizeof(*thunk));
lib/libc/stdio/fopencookie.c
58
if (thunk == NULL)
lib/libc/stdio/fopencookie.c
61
thunk->foc_cookie = cookie;
lib/libc/stdio/fopencookie.c
62
thunk->foc_io = io_funcs;
lib/libc/stdio/fopencookie.c
71
fp = funopen(thunk, readfn, writefn, _fopencookie_seek,
lib/libc/stdio/fopencookie.c
74
free(thunk);
lib/libc/stdio/fopencookie.c
87
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
89
thunk = cookie;
lib/libc/stdio/fopencookie.c
92
if (thunk->foc_io.read == NULL)
lib/libc/stdio/fopencookie.c
95
return ((int)thunk->foc_io.read(thunk->foc_cookie, buf, (size_t)size));
lib/libc/stdlib/qsort.c
104
local_qsort(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk)
lib/libc/stdlib/qsort.c
117
pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
lib/libc/stdlib/qsort.c
129
pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
lib/libc/stdlib/qsort.c
130
pm = med3(pm - d, pm, pm + d, cmp, thunk);
lib/libc/stdlib/qsort.c
131
pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
lib/libc/stdlib/qsort.c
133
pm = med3(pl, pm, pn, cmp, thunk);
lib/libc/stdlib/qsort.c
140
while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
lib/libc/stdlib/qsort.c
147
while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
lib/libc/stdlib/qsort.c
177
local_qsort(a, d1 / es, es, cmp, thunk);
lib/libc/stdlib/qsort.c
189
local_qsort(pn - d2, d2 / es, es, cmp, thunk);
lib/libc/stdlib/qsort.c
202
(qsort_r)(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk)
lib/libc/stdlib/qsort.c
204
local_qsort_r(a, n, es, cmp, thunk);
lib/libc/stdlib/qsort.c
208
__qsort_r_compat(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
lib/libc/stdlib/qsort.c
210
local_qsort_r_compat(a, n, es, cmp, thunk);
lib/libc/stdlib/qsort.c
214
qsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *thunk)
lib/libc/stdlib/qsort.c
239
local_qsort_s(a, n, es, cmp, thunk);
lib/libc/stdlib/qsort.c
81
med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
lib/libc/stdlib/qsort.c
87
return CMP(thunk, a, b) < 0 ?
lib/libc/stdlib/qsort.c
88
(CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
lib/libc/stdlib/qsort.c
89
:(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
lib/libc/tests/stdlib/qsort_r_compat_test.c
40
sorthelp_r(void *thunk, const void *a, const void *b)
lib/libc/tests/stdlib/qsort_r_compat_test.c
44
ATF_REQUIRE_EQ(*(int *)thunk, THUNK);
lib/libc/tests/stdlib/qsort_r_compat_test.c
62
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_r_compat_test.c
70
qsort_r(testvector, j, sizeof(testvector[0]), &thunk,
lib/libc/tests/stdlib/qsort_r_test.c
40
sorthelp_r(const void *a, const void *b, void *thunk)
lib/libc/tests/stdlib/qsort_r_test.c
44
ATF_REQUIRE_EQ(*(int *)thunk, THUNK);
lib/libc/tests/stdlib/qsort_r_test.c
62
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_r_test.c
71
&thunk);
lib/libc/tests/stdlib/qsort_s_test.c
100
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
103
ATF_CHECK(qsort_s(&b, 1, RSIZE_MAX + 1, sorthelp_s, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
110
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
113
ATF_CHECK(qsort_s(&b, 1, sizeof(int), NULL, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
120
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
125
ATF_CHECK(qsort_s(&b, -1, sizeof(int), sorthelp_s, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
136
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
141
ATF_CHECK(qsort_s(&b, RSIZE_MAX + 1, sizeof(int), sorthelp_s, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
152
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
157
ATF_CHECK(qsort_s(&b, nitems(b), -1, sorthelp_s, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
168
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
173
ATF_CHECK(qsort_s(&b, nitems(b), RSIZE_MAX + 1, sorthelp_s, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
184
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
189
ATF_CHECK(qsort_s(&b, nitems(b), sizeof(int), NULL, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
199
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
204
ATF_CHECK(qsort_s(&b, nitems(b), sizeof(int), sorthelp_s, &thunk) == 0);
lib/libc/tests/stdlib/qsort_s_test.c
217
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
226
sorthelp_s, &thunk);
lib/libc/tests/stdlib/qsort_s_test.c
44
sorthelp_s(const void *a, const void *b, void *thunk)
lib/libc/tests/stdlib/qsort_s_test.c
48
ATF_REQUIRE_EQ(*(int *)thunk, THUNK);
lib/libc/tests/stdlib/qsort_s_test.c
70
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
73
ATF_CHECK(qsort_s(&b, -1, sizeof(int), sorthelp_s, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
80
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
83
ATF_CHECK(qsort_s(&b, RSIZE_MAX + 1, sizeof(int), sorthelp_s, &thunk) != 0);
lib/libc/tests/stdlib/qsort_s_test.c
90
int thunk = THUNK;
lib/libc/tests/stdlib/qsort_s_test.c
93
ATF_CHECK(qsort_s(&b, 1, -1, sorthelp_s, &thunk) != 0);
lib/libproc/proc_sym.c
108
struct symsort_thunk *thunk;
lib/libproc/proc_sym.c
115
thunk = _thunk;
lib/libproc/proc_sym.c
117
(void)gelf_getsym(thunk->symtab->data, i1, &sym1);
lib/libproc/proc_sym.c
118
(void)gelf_getsym(thunk->symtab->data, i2, &sym2);
lib/libproc/proc_sym.c
133
s1 = elf_strptr(thunk->e, thunk->symtab->stridx, sym1.st_name);
lib/libproc/proc_sym.c
134
s2 = elf_strptr(thunk->e, thunk->symtab->stridx, sym2.st_name);
lib/libproc/proc_sym.c
159
struct symsort_thunk thunk;
lib/libproc/proc_sym.c
190
thunk.e = e;
lib/libproc/proc_sym.c
191
thunk.symtab = symtab;
lib/libproc/proc_sym.c
192
qsort_r(symtab->index, nsyms, sizeof(u_int), symvalcmp, &thunk);
sys/compat/linuxkpi/common/src/linux_compat.c
2584
struct list_sort_thunk *thunk;
sys/compat/linuxkpi/common/src/linux_compat.c
2586
thunk = priv;
sys/compat/linuxkpi/common/src/linux_compat.c
2589
return ((thunk->cmp)(thunk->priv, le1, le2));
sys/compat/linuxkpi/common/src/linux_compat.c
2596
struct list_sort_thunk thunk;
sys/compat/linuxkpi/common/src/linux_compat.c
2607
thunk.cmp = cmp;
sys/compat/linuxkpi/common/src/linux_compat.c
2608
thunk.priv = priv;
sys/compat/linuxkpi/common/src/linux_compat.c
2609
qsort_r(ar, count, sizeof(struct list_head *), linux_le_cmp, &thunk);
sys/dev/drm2/drm_linux_list_sort.c
41
struct drm_list_sort_thunk *thunk;
sys/dev/drm2/drm_linux_list_sort.c
43
thunk = priv;
sys/dev/drm2/drm_linux_list_sort.c
46
return ((thunk->cmp)(thunk->priv, le1, le2));
sys/dev/drm2/drm_linux_list_sort.c
56
struct drm_list_sort_thunk thunk;
sys/dev/drm2/drm_linux_list_sort.c
67
thunk.cmp = cmp;
sys/dev/drm2/drm_linux_list_sort.c
68
thunk.priv = priv;
sys/dev/drm2/drm_linux_list_sort.c
69
qsort_r(ar, count, sizeof(struct list_head *), drm_le_cmp, &thunk);
sys/kern/init_main.c
176
sysinit_compar(struct sysinit *a, struct sysinit *b, void *thunk __unused)
sys/kern/kern_thr.c
110
thr_create_initthr(struct thread *td, void *thunk)
sys/kern/kern_thr.c
115
args = thunk;
sys/kern/kern_thr.c
151
thr_new_initthr(struct thread *td, void *thunk)
sys/kern/kern_thr.c
164
param = thunk;
sys/kern/kern_thr.c
207
int (*initialize_thread)(struct thread *, void *), void *thunk)
sys/kern/kern_thr.c
258
error = initialize_thread(newtd, thunk);
sys/libkern/qsort.c
100
return CMP(thunk, a, b) < 0 ?
sys/libkern/qsort.c
101
(CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
sys/libkern/qsort.c
102
:(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
sys/libkern/qsort.c
107
(qsort_r)(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk)
sys/libkern/qsort.c
124
pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
sys/libkern/qsort.c
136
pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
sys/libkern/qsort.c
137
pm = med3(pm - d, pm, pm + d, cmp, thunk);
sys/libkern/qsort.c
138
pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
sys/libkern/qsort.c
140
pm = med3(pl, pm, pn, cmp, thunk);
sys/libkern/qsort.c
147
while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
sys/libkern/qsort.c
154
while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
sys/libkern/qsort.c
180
qsort_r(a, d1 / es, es, cmp, thunk);
sys/libkern/qsort.c
196
qsort_r(pn - d2, d2 / es, es, cmp, thunk);
sys/libkern/qsort.c
94
med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
sys/net/if.c
2785
} thunk;
sys/net/if.c
2815
thunk.ifc.ifc_len = ifc32->ifc_len;
sys/net/if.c
2816
thunk.ifc.ifc_buf = PTRIN(ifc32->ifc_buf);
sys/net/if.c
2817
data = (caddr_t)&thunk.ifc;
sys/net/if.c
2823
memcpy(thunk.ifd.ifd_name, ifd32->ifd_name,
sys/net/if.c
2824
sizeof(thunk.ifd.ifd_name));
sys/net/if.c
2825
thunk.ifd.ifd_cmd = ifd32->ifd_cmd;
sys/net/if.c
2826
thunk.ifd.ifd_len = ifd32->ifd_len;
sys/net/if.c
2827
thunk.ifd.ifd_data = PTRIN(ifd32->ifd_data);
sys/net/if.c
2828
data = (caddr_t)&thunk.ifd;
sys/net/if.c
2836
memcpy(thunk.ifgr.ifgr_name, ifgr32->ifgr_name,
sys/net/if.c
2837
sizeof(thunk.ifgr.ifgr_name));
sys/net/if.c
2838
thunk.ifgr.ifgr_len = ifgr32->ifgr_len;
sys/net/if.c
2842
memcpy(thunk.ifgr.ifgr_group, ifgr32->ifgr_group,
sys/net/if.c
2843
sizeof(thunk.ifgr.ifgr_group));
sys/net/if.c
2847
thunk.ifgr.ifgr_groups = PTRIN(ifgr32->ifgr_groups);
sys/net/if.c
2850
data = (caddr_t)&thunk.ifgr;
sys/net/if.c
2856
memcpy(thunk.ifmr.ifm_name, ifmr32->ifm_name,
sys/net/if.c
2857
sizeof(thunk.ifmr.ifm_name));
sys/net/if.c
2858
thunk.ifmr.ifm_current = ifmr32->ifm_current;
sys/net/if.c
2859
thunk.ifmr.ifm_mask = ifmr32->ifm_mask;
sys/net/if.c
2860
thunk.ifmr.ifm_status = ifmr32->ifm_status;
sys/net/if.c
2861
thunk.ifmr.ifm_active = ifmr32->ifm_active;
sys/net/if.c
2862
thunk.ifmr.ifm_count = ifmr32->ifm_count;
sys/net/if.c
2863
thunk.ifmr.ifm_ulist = PTRIN(ifmr32->ifm_ulist);
sys/net/if.c
2864
data = (caddr_t)&thunk.ifmr;
sys/net/if.c
2964
ifc32->ifc_len = thunk.ifc.ifc_len;
sys/net/if.c
2973
KASSERT(thunk.ifd.ifd_len == ifd32->ifd_len,
sys/net/if.c
2975
thunk.ifd.ifd_len));
sys/net/if.c
2979
ifgr32->ifgr_len = thunk.ifgr.ifgr_len;
sys/net/if.c
2983
ifmr32->ifm_current = thunk.ifmr.ifm_current;
sys/net/if.c
2984
ifmr32->ifm_mask = thunk.ifmr.ifm_mask;
sys/net/if.c
2985
ifmr32->ifm_status = thunk.ifmr.ifm_status;
sys/net/if.c
2986
ifmr32->ifm_active = thunk.ifmr.ifm_active;
sys/net/if.c
2987
ifmr32->ifm_count = thunk.ifmr.ifm_count;
sys/opencrypto/cryptodev.c
1134
} thunk;
sys/opencrypto/cryptodev.c
1146
data = (void *)&thunk.sopc;
sys/opencrypto/cryptodev.c
1147
session_op_from_32((struct session_op32 *)data32, &thunk.sopc);
sys/opencrypto/cryptodev.c
1153
data = (void *)&thunk.sopc;
sys/opencrypto/cryptodev.c
1155
&thunk.sopc);
sys/opencrypto/cryptodev.c
1161
data = (void *)&thunk.copc;
sys/opencrypto/cryptodev.c
1162
crypt_op_from_32((struct crypt_op32 *)data32, &thunk.copc);
sys/opencrypto/cryptodev.c
1168
data = (void *)&thunk.aeadc;
sys/opencrypto/cryptodev.c
1169
crypt_aead_from_32((struct crypt_aead32 *)data32, &thunk.aeadc);
sys/opencrypto/cryptodev.c
1195
session2_op_from_op((void *)data, &thunk.sopc);
sys/opencrypto/cryptodev.c
1196
sop = &thunk.sopc;
sys/sys/libkern.h
247
int (*compar)(const void *, const void *, void *), void *thunk);
sys/sys/proc.h
1257
int (*initialize_thread)(struct thread *, void *), void *thunk);
sys/sys/queue_mergesort.h
107
thunk) >= 0)) { \
sys/sys/queue_mergesort.h
122
#define SYSQUEUE_MERGESORT(sqms_head, thunk, sqms_cmp, TYPE, NAME, M_HEAD, \
sys/sys/queue_mergesort.h
154
sqms_sortmask, sqms_elm, sqms_mpos, thunk, sqms_cmp,\
sys/sys/queue_mergesort.h
168
sqms_elm, sqms_mpos, thunk, sqms_cmp, \
sys/sys/queue_mergesort.h
185
#define SLIST_MERGESORT(head, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
186
SYSQUEUE_MERGESORT((head), (thunk), (cmp), TYPE, NAME, SLIST_HEAD, \
sys/sys/queue_mergesort.h
189
#define SLIST_MERGE(list1, list2, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
190
SYSQUEUE_MERGE((list1), (list2), (thunk), (cmp), TYPE, NAME, SLIST_FIRST, \
sys/sys/queue_mergesort.h
193
#define LIST_MERGESORT(head, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
194
SYSQUEUE_MERGESORT((head), (thunk), (cmp), TYPE, NAME, LIST_HEAD, \
sys/sys/queue_mergesort.h
197
#define LIST_MERGE(list1, list2, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
198
SYSQUEUE_MERGE((list1), (list2), (thunk), (cmp), TYPE, NAME, LIST_FIRST, \
sys/sys/queue_mergesort.h
201
#define STAILQ_MERGESORT(head, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
202
SYSQUEUE_MERGESORT((head), (thunk), (cmp), TYPE, NAME, STAILQ_HEAD, \
sys/sys/queue_mergesort.h
205
#define STAILQ_MERGE(list1, list2, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
206
SYSQUEUE_MERGE((list1), (list2), (thunk), (cmp), TYPE, NAME, STAILQ_FIRST, \
sys/sys/queue_mergesort.h
209
#define TAILQ_MERGESORT(head, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
210
SYSQUEUE_MERGESORT((head), (thunk), (cmp), TYPE, NAME, TAILQ_HEAD, \
sys/sys/queue_mergesort.h
213
#define TAILQ_MERGE(list1, list2, thunk, cmp, TYPE, NAME) \
sys/sys/queue_mergesort.h
214
SYSQUEUE_MERGE((list1), (list2), (thunk), (cmp), TYPE, NAME, TAILQ_FIRST, \
sys/sys/queue_mergesort.h
53
#define SYSQUEUE_MERGE(sqms_list1, sqms_list2, thunk, sqms_cmp, TYPE, NAME, \
sys/sys/queue_mergesort.h
71
(sqms_cmp)(sqms_elm2, sqms_elm1, thunk) >= 0) { \
sys/sys/queue_mergesort.h
87
sqms_mpos, thunk, sqms_cmp, TYPE, NAME, \
usr.sbin/bluetooth/rtlbtfw/rtlbt_fw.c
395
void *thunk __unused)