ARGSUSED */
| 416 | #endif |
| 417 | /* ARGSUSED */ |
| 418 | int |
| 419 | sys_ffclock_setestimate(struct thread *td, struct ffclock_setestimate_args *uap) |
| 420 | { |
| 421 | struct ffclock_estimate cest; |
| 422 | int error; |
| 423 | |
| 424 | /* Reuse of PRIV_CLOCK_SETTIME. */ |
| 425 | if ((error = priv_check(td, PRIV_CLOCK_SETTIME)) != 0) |
| 426 | return (error); |
| 427 | |
| 428 | if ((error = copyin(uap->cest, &cest, sizeof(struct ffclock_estimate))) |
| 429 | != 0) |
| 430 | return (error); |
| 431 | |
| 432 | mtx_lock(&ffclock_mtx); |
| 433 | memcpy(&ffclock_estimate, &cest, sizeof(struct ffclock_estimate)); |
| 434 | ffclock_updated++; |
| 435 | mtx_unlock(&ffclock_mtx); |
| 436 | return (error); |
| 437 | } |
| 438 | |
| 439 | /* |
| 440 | * System call allowing userland applications to retrieve the clock estimates |
nothing calls this directly
no test coverage detected