int sys___clock_getres50(struct lwp *l, const struct sys___clock_getres50_args *uap, register_t *retval) { /* { syscallarg(clockid_t) clock_id; syscallarg(struct timespec *) tp; } */ struct timespec ts; int error; if ((error = clock_getres1(SCARG(uap, clock_id), &ts)) != 0) return error; if (SCARG(uap, tp)) error = copyout(&ts, SCARG(uap, tp), sizeof(ts)); return error; }
int netbsd32___clock_getres50(struct lwp *l, const struct netbsd32___clock_getres50_args *uap, register_t *retval) { /* { syscallarg(netbsd32_clockid_t) clock_id; syscallarg(netbsd32_timespecp_t) tp; } */ struct netbsd32_timespec ts32; struct timespec ts; int error = 0; error = clock_getres1(SCARG(uap, clock_id), &ts); if (error != 0) return error; if (SCARG_P32(uap, tp)) { netbsd32_from_timespec(&ts, &ts32); error = copyout(&ts32, SCARG_P32(uap, tp), sizeof(ts32)); } return error; }