Clean up timers when some process events are being triggered. */
| 1708 | |
| 1709 | /* Clean up timers when some process events are being triggered. */ |
| 1710 | static void |
| 1711 | itimers_event_exit_exec(int start_idx, struct proc *p) |
| 1712 | { |
| 1713 | struct itimers *its; |
| 1714 | struct itimer *it; |
| 1715 | int i; |
| 1716 | |
| 1717 | its = p->p_itimers; |
| 1718 | if (its == NULL) |
| 1719 | return; |
| 1720 | |
| 1721 | for (i = start_idx; i < TIMER_MAX; ++i) { |
| 1722 | if ((it = its->its_timers[i]) != NULL) |
| 1723 | kern_ktimer_delete(curthread, i); |
| 1724 | } |
| 1725 | if (its->its_timers[0] == NULL && its->its_timers[1] == NULL && |
| 1726 | its->its_timers[2] == NULL) { |
| 1727 | free(its, M_SUBPROC); |
| 1728 | p->p_itimers = NULL; |
| 1729 | } |
| 1730 | } |
| 1731 | |
| 1732 | void |
| 1733 | itimers_exec(struct proc *p) |
no test coverage detected