Lines Matching +full:min +full:- +full:len
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
33 * cc mevent_test.c mevent.c -lpthread
67 uint64_t min, max, diff, sum, tsc_freq; in timer_print() local
68 size_t len; in timer_print() local
71 min = UINT64_MAX; in timer_print()
75 len = sizeof(tsc_freq); in timer_print()
76 sysctlbyname("machdep.tsc_freq", &tsc_freq, &len, NULL, 0); in timer_print()
80 diff = (tevbuf[j] - tevbuf[j-1]) * 1000000 / tsc_freq; in timer_print()
82 if (min > diff) in timer_print()
83 min = diff; in timer_print()
88 printf("timers done: usecs, min %ld, max %ld, mean %ld\n", min, max, in timer_print()
89 sum/(TEVSZ - 1)); in timer_print()
120 pthread_mutex_lock(&sync->e_mt); in echoer_callback()
121 pthread_cond_signal(&sync->e_cond); in echoer_callback()
122 pthread_mutex_unlock(&sync->e_mt); in echoer_callback()
132 int len; in echoer() local
146 len = read(fd, buf, sizeof(buf)); in echoer()
147 if (len > 0) { in echoer()
148 write(fd, buf, len); in echoer()
149 write(0, buf, len); in echoer()
171 int len; in echoer() local
173 while ((len = read(fd, buf, sizeof(buf))) > 0) { in echoer()
174 write(1, buf, len); in echoer()