(enable: bool)
| 512 | #[doc(alias = "PR_TASK_PERF_EVENTS_ENABLE")] |
| 513 | #[doc(alias = "PR_TASK_PERF_EVENTS_DISABLE")] |
| 514 | pub fn configure_performance_counters(enable: bool) -> io::Result<()> { |
| 515 | let option = if enable { |
| 516 | PR_TASK_PERF_EVENTS_ENABLE |
| 517 | } else { |
| 518 | PR_TASK_PERF_EVENTS_DISABLE |
| 519 | }; |
| 520 | |
| 521 | unsafe { prctl_1arg(option) }.map(|_r| ()) |
| 522 | } |
| 523 | |
| 524 | // |
| 525 | // PR_MCE_KILL_GET/PR_MCE_KILL |
nothing calls this directly
no test coverage detected