| 1376 | } |
| 1377 | |
| 1378 | int |
| 1379 | kern_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_ |
| 1403 | struct ktimer_gettime_args { |
no test coverage detected