register void()

in src/benchmark.c [88:128]


		register void (*func)(void *))
{
	static struct __dispatch_benchmark_data_s bdata = {
		.func = _dispatch_benchmark_dummy_function,
		.count = 10000000ul, // ten million
	};
	static dispatch_once_t pred;
	uint64_t ns, start, delta;
#if DISPATCH_SIZEOF_PTR == 8 && !defined(_WIN32)
	__uint128_t conversion, big_denom;
#else
	long double conversion, big_denom;
#endif
	size_t i = 0;

	dispatch_once_f(&pred, &bdata, _dispatch_benchmark_init);

	if (unlikely(count == 0)) {
		return 0;
	}

	start = _dispatch_uptime();
	do {
		i++;
		func(ctxt);
	} while (i < count);
	delta = _dispatch_uptime() - start;

	conversion = delta;
#if HAVE_MACH_ABSOLUTE_TIME
	conversion *= bdata.tbi.numer;
	big_denom = bdata.tbi.denom;
#else
	big_denom = delta;
#endif
	big_denom *= count;
	conversion /= big_denom;
	ns = conversion > UINT64_MAX ? UINT64_MAX : (uint64_t)conversion;

	return ns - bdata.loop_cost;
}