Symbol: thunk
lib/libc/stdio/fopencookie.c
104
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
106
thunk = cookie;
lib/libc/stdio/fopencookie.c
109
if (thunk->foc_io.write == NULL)
lib/libc/stdio/fopencookie.c
112
return ((int)thunk->foc_io.write(thunk->foc_cookie, buf,
lib/libc/stdio/fopencookie.c
119
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
134
thunk = cookie;
lib/libc/stdio/fopencookie.c
140
if (thunk->foc_io.seek == NULL) {
lib/libc/stdio/fopencookie.c
146
res = thunk->foc_io.seek(thunk->foc_cookie, &off64, whence);
lib/libc/stdio/fopencookie.c
156
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
160
thunk = cookie;
lib/libc/stdio/fopencookie.c
161
if (thunk->foc_io.close != NULL)
lib/libc/stdio/fopencookie.c
162
ret = thunk->foc_io.close(thunk->foc_cookie);
lib/libc/stdio/fopencookie.c
165
free(thunk);
lib/libc/stdio/fopencookie.c
53
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
60
thunk = malloc(sizeof(*thunk));
lib/libc/stdio/fopencookie.c
61
if (thunk == NULL)
lib/libc/stdio/fopencookie.c
64
thunk->foc_cookie = cookie;
lib/libc/stdio/fopencookie.c
65
thunk->foc_io = io_funcs;
lib/libc/stdio/fopencookie.c
74
fp = funopen(thunk, readfn, writefn, _fopencookie_seek,
lib/libc/stdio/fopencookie.c
77
free(thunk);
lib/libc/stdio/fopencookie.c
90
struct fopencookie_thunk *thunk;
lib/libc/stdio/fopencookie.c
92
thunk = cookie;
lib/libc/stdio/fopencookie.c
95
if (thunk->foc_io.read == NULL)
lib/libc/stdio/fopencookie.c
98
return ((int)thunk->foc_io.read(thunk->foc_cookie, buf, (size_t)size));
lib/libc/stdlib/qsort.c
102
qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
lib/libc/stdlib/qsort.c
119
pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
lib/libc/stdlib/qsort.c
130
pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
lib/libc/stdlib/qsort.c
131
pm = med3(pm - d, pm, pm + d, cmp, thunk);
lib/libc/stdlib/qsort.c
132
pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
lib/libc/stdlib/qsort.c
134
pm = med3(pl, pm, pn, cmp, thunk);
lib/libc/stdlib/qsort.c
141
while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
lib/libc/stdlib/qsort.c
149
while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
lib/libc/stdlib/qsort.c
167
pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
lib/libc/stdlib/qsort.c
180
qsort_r(a, r / es, es, thunk, cmp);
lib/libc/stdlib/qsort.c
89
med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
lib/libc/stdlib/qsort.c
95
return CMP(thunk, a, b) < 0 ?
lib/libc/stdlib/qsort.c
96
(CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
lib/libc/stdlib/qsort.c
97
:(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
sys/libkern/qsort.c
101
kqsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
sys/libkern/qsort.c
115
for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
sys/libkern/qsort.c
126
pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
sys/libkern/qsort.c
127
pm = med3(pm - d, pm, pm + d, cmp, thunk);
sys/libkern/qsort.c
128
pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
sys/libkern/qsort.c
130
pm = med3(pl, pm, pn, cmp, thunk);
sys/libkern/qsort.c
137
while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) {
sys/libkern/qsort.c
145
while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) {
sys/libkern/qsort.c
162
for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
sys/libkern/qsort.c
175
kqsort_r(a, r / es, es, thunk, cmp);
sys/libkern/qsort.c
88
med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
sys/libkern/qsort.c
94
return CMP(thunk, a, b) < 0 ?
sys/libkern/qsort.c
95
(CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
sys/libkern/qsort.c
96
:(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
sys/sys/libkern.h
119
void kqsort_r(void *base, size_t nmemb, size_t size, void *thunk,