| 1452 | } |
| 1453 | |
| 1454 | int |
| 1455 | kern_ktimer_getoverrun(struct thread *td, int timer_id) |
| 1456 | { |
| 1457 | struct proc *p = td->td_proc; |
| 1458 | struct itimer *it; |
| 1459 | int error ; |
| 1460 | |
| 1461 | PROC_LOCK(p); |
| 1462 | if (timer_id < 3 || |
| 1463 | (it = itimer_find(p, timer_id)) == NULL) { |
| 1464 | PROC_UNLOCK(p); |
| 1465 | error = EINVAL; |
| 1466 | } else { |
| 1467 | td->td_retval[0] = it->it_overrun_last; |
| 1468 | ITIMER_UNLOCK(it); |
| 1469 | PROC_UNLOCK(p); |
| 1470 | error = 0; |
| 1471 | } |
| 1472 | return (error); |
| 1473 | } |
| 1474 | |
| 1475 | static int |
| 1476 | realtimer_create(struct itimer *it) |
no test coverage detected