Lines 172-178
ipf_timer_func(void *arg)
Link Here
|
172 |
SPL_INT(s); |
172 |
SPL_INT(s); |
173 |
|
173 |
|
174 |
SPL_NET(s); |
174 |
SPL_NET(s); |
175 |
READ_ENTER(&softc->ipf_global); |
|
|
176 |
|
175 |
|
177 |
if (softc->ipf_running > 0) |
176 |
if (softc->ipf_running > 0) |
178 |
ipf_slowtimer(softc); |
177 |
ipf_slowtimer(softc); |
Lines 181-192
ipf_timer_func(void *arg)
Link Here
|
181 |
#if 0 |
180 |
#if 0 |
182 |
softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); |
181 |
softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); |
183 |
#endif |
182 |
#endif |
184 |
callout_init(&softc->ipf_slow_ch, 1); |
183 |
callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, 0); |
185 |
callout_reset(&softc->ipf_slow_ch, |
184 |
callout_reset(&softc->ipf_slow_ch, |
186 |
(hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, |
185 |
(hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, |
187 |
ipf_timer_func, softc); |
186 |
ipf_timer_func, softc); |
188 |
} |
187 |
} |
189 |
RWLOCK_EXIT(&softc->ipf_global); |
|
|
190 |
SPL_X(s); |
188 |
SPL_X(s); |
191 |
} |
189 |
} |
192 |
|
190 |
|
Lines 221-227
ipfattach(ipf_main_softc_t *softc)
Link Here
|
221 |
softc->ipf_slow_ch = timeout(ipf_timer_func, softc, |
219 |
softc->ipf_slow_ch = timeout(ipf_timer_func, softc, |
222 |
(hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); |
220 |
(hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); |
223 |
#endif |
221 |
#endif |
224 |
callout_init(&softc->ipf_slow_ch, 1); |
222 |
callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, 0); |
225 |
callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, |
223 |
callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, |
226 |
ipf_timer_func, softc); |
224 |
ipf_timer_func, softc); |
227 |
return (0); |
225 |
return (0); |
Lines 249-255
ipfdetach(ipf_main_softc_t *softc)
Link Here
|
249 |
untimeout(ipf_timer_func, softc, softc->ipf_slow_ch); |
247 |
untimeout(ipf_timer_func, softc, softc->ipf_slow_ch); |
250 |
bzero(&softc->ipf_slow, sizeof(softc->ipf_slow)); |
248 |
bzero(&softc->ipf_slow, sizeof(softc->ipf_slow)); |
251 |
#endif |
249 |
#endif |
252 |
callout_drain(&softc->ipf_slow_ch); |
250 |
callout_stop(&softc->ipf_slow_ch); |
253 |
|
251 |
|
254 |
ipf_fini_all(softc); |
252 |
ipf_fini_all(softc); |
255 |
|
253 |
|
256 |
- |
|
|