| 489 | } |
| 490 | |
| 491 | static int |
| 492 | enable_lock_prof(SYSCTL_HANDLER_ARGS) |
| 493 | { |
| 494 | int error, v; |
| 495 | |
| 496 | v = lock_prof_enable; |
| 497 | error = sysctl_handle_int(oidp, &v, v, req); |
| 498 | if (error) |
| 499 | return (error); |
| 500 | if (req->newptr == NULL) |
| 501 | return (error); |
| 502 | if (v == lock_prof_enable) |
| 503 | return (0); |
| 504 | if (v == 1) |
| 505 | lock_prof_reset(); |
| 506 | lock_prof_enable = !!v; |
| 507 | |
| 508 | return (0); |
| 509 | } |
| 510 | |
| 511 | static int |
| 512 | reset_lock_prof_stats(SYSCTL_HANDLER_ARGS) |
nothing calls this directly
no test coverage detected