diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1266,13 +1266,11 @@ it = uma_zalloc(itimer_zone, M_WAITOK); it->it_flags = 0; it->it_usecount = 0; - it->it_active = 0; timespecclear(&it->it_time.it_value); timespecclear(&it->it_time.it_interval); it->it_overrun = 0; it->it_overrun_last = 0; it->it_clockid = clock_id; - it->it_timerid = -1; it->it_proc = p; ksiginfo_init(&it->it_ksi); it->it_ksi.ksi_flags |= KSI_INS | KSI_EXT; @@ -1303,7 +1301,6 @@ goto out; } } - it->it_timerid = id; p->p_itimers->its_timers[id] = it; if (evp != NULL) it->it_sigev = *evp; @@ -1785,14 +1782,8 @@ itimers_alloc(struct proc *p) { struct itimers *its; - int i; its = malloc(sizeof (struct itimers), M_SUBPROC, M_WAITOK | M_ZERO); - LIST_INIT(&its->its_virtual); - LIST_INIT(&its->its_prof); - TAILQ_INIT(&its->its_worklist); - for (i = 0; i < TIMER_MAX; i++) - its->its_timers[i] = NULL; PROC_LOCK(p); if (p->p_itimers == NULL) { p->p_itimers = its; diff --git a/sys/sys/timers.h b/sys/sys/timers.h --- a/sys/sys/timers.h +++ b/sys/sys/timers.h @@ -56,47 +56,20 @@ int it_overrun; /* Overruns currently accumulating */ int it_overrun_last; /* Overruns associated w/ a delivery */ int it_clockid; - int it_timerid; ksiginfo_t it_ksi; - union { - /* realtime */ - struct { - struct callout it_callout; - } _rt; - - /* cpu timer */ - struct { - LIST_ENTRY(itimer) it_link; - TAILQ_ENTRY(itimer) it_worklink; - int it_active; - int it_cflags; - } _cpu; - } _data; + struct callout it_callout; }; -#define it_callout _data._rt.it_callout -#define it_link _data._cpu.it_link -#define it_active _data._cpu.it_active -#define it_worklink _data._cpu.it_worklink -#define it_cflags _data._cpu.it_cflags - #define ITF_DELETING 0x01 #define ITF_WANTED 0x02 #define ITF_PSTOPPED 0x04 -#define ITCF_ONWORKLIST 0x01 - #define TIMER_MAX 32 #define ITIMER_LOCK(it) mtx_lock(&(it)->it_mtx) #define ITIMER_UNLOCK(it) mtx_unlock(&(it)->it_mtx) -LIST_HEAD(itimerlist, itimer); - struct itimers { - struct itimerlist its_virtual; - struct itimerlist its_prof; - TAILQ_HEAD(, itimer) its_worklist; struct itimer *its_timers[TIMER_MAX]; };