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

Function kern_ktimer_settime

freebsd/kern/kern_time.c:1378–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1376}
1377
1378int
1379kern_ktimer_settime(struct thread *td, int timer_id, int flags,
1380 struct itimerspec *val, struct itimerspec *oval)
1381{
1382 struct proc *p;
1383 struct itimer *it;
1384 int error;
1385
1386 p = td->td_proc;
1387 PROC_LOCK(p);
1388 if (timer_id < 3 || (it = itimer_find(p, timer_id)) == NULL) {
1389 PROC_UNLOCK(p);
1390 error = EINVAL;
1391 } else {
1392 PROC_UNLOCK(p);
1393 itimer_enter(it);
1394 error = CLOCK_CALL(it->it_clockid, timer_settime, (it,
1395 flags, val, oval));
1396 itimer_leave(it);
1397 ITIMER_UNLOCK(it);
1398 }
1399 return (error);
1400}
1401
1402#ifndef _SYS_SYSPROTO_H_
1403struct ktimer_gettime_args {

Callers 1

sys_ktimer_settimeFunction · 0.85

Calls 3

itimer_findFunction · 0.85
itimer_enterFunction · 0.85
itimer_leaveFunction · 0.85

Tested by

no test coverage detected