MCPcopy Create free account
hub / github.com/F-Stack/f-stack / itimers_event_exit_exec

Function itimers_event_exit_exec

freebsd/kern/kern_time.c:1710–1730  ·  view source on GitHub ↗

Clean up timers when some process events are being triggered. */

Source from the content-addressed store, hash-verified

1708
1709/* Clean up timers when some process events are being triggered. */
1710static void
1711itimers_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
1732void
1733itimers_exec(struct proc *p)

Callers 2

itimers_execFunction · 0.85
itimers_exitFunction · 0.85

Calls 2

kern_ktimer_deleteFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected