MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kern_ktimer_gettime

Function kern_ktimer_gettime

freebsd/kern/kern_time.c:1420–1440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1418}
1419
1420int
1421kern_ktimer_gettime(struct thread *td, int timer_id, struct itimerspec *val)
1422{
1423 struct proc *p;
1424 struct itimer *it;
1425 int error;
1426
1427 p = td->td_proc;
1428 PROC_LOCK(p);
1429 if (timer_id < 3 || (it = itimer_find(p, timer_id)) == NULL) {
1430 PROC_UNLOCK(p);
1431 error = EINVAL;
1432 } else {
1433 PROC_UNLOCK(p);
1434 itimer_enter(it);
1435 error = CLOCK_CALL(it->it_clockid, timer_gettime, (it, val));
1436 itimer_leave(it);
1437 ITIMER_UNLOCK(it);
1438 }
1439 return (error);
1440}
1441
1442#ifndef _SYS_SYSPROTO_H_
1443struct timer_getoverrun_args {

Callers 1

sys_ktimer_gettimeFunction · 0.85

Calls 3

itimer_findFunction · 0.85
itimer_enterFunction · 0.85
itimer_leaveFunction · 0.85

Tested by

no test coverage detected