notrace int __vdso_clock_getres()

in kernel/vdso/gettimeofday.c [206:228]


notrace int __vdso_clock_getres(clockid_t clk_id, struct __kernel_old_timespec *res)
{
	struct vdso_data *vdata = __get_datapage();

	if (res == NULL)
		return 0;
	switch (clk_id) {
	case CLOCK_REALTIME:
	case CLOCK_MONOTONIC:
	case CLOCK_MONOTONIC_RAW:
		res->tv_sec = 0;
		res->tv_nsec = vdata->hrtimer_res;
		break;
	case CLOCK_REALTIME_COARSE:
	case CLOCK_MONOTONIC_COARSE:
		res->tv_sec = 0;
		res->tv_nsec = CLOCK_COARSE_RES;
		break;
	default:
		return clock_getres_fallback(clk_id, res);
	}
	return 0;
}