Replace references to NET_CALLOUT_MPSAFE with CALLOUT_MPSAFE, and remove

definition of NET_CALLOUT_MPSAFE, which is no longer required now that
debug.mpsafenet has been removed.

The once over:	bz
Approved by:	re (kensmith)
This commit is contained in:
Robert Watson 2007-07-28 07:31:30 +00:00
parent 511957167b
commit c6b2899785
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171637
9 changed files with 16 additions and 21 deletions

View File

@ -282,12 +282,12 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
ifp->if_hdrlen = PFSYNC_HDRLEN;
pfsync_setmtu(pfsyncif, ETHERMTU);
#ifdef __FreeBSD__
callout_init(&pfsyncif->sc_tmo, NET_CALLOUT_MPSAFE);
callout_init(&pfsyncif->sc_tmo, CALLOUT_MPSAFE);
#ifdef PFSYNC_TDB
callout_init(&pfsyncif->sc_tdb_tmo, NET_CALLOUT_MPSAFE);
callout_init(&pfsyncif->sc_tdb_tmo, CALLOUT_MPSAFE);
#endif
callout_init(&pfsyncif->sc_bulk_tmo, NET_CALLOUT_MPSAFE);
callout_init(&pfsyncif->sc_bulkfail_tmo, NET_CALLOUT_MPSAFE);
callout_init(&pfsyncif->sc_bulk_tmo, CALLOUT_MPSAFE);
callout_init(&pfsyncif->sc_bulkfail_tmo, CALLOUT_MPSAFE);
#else
timeout_set(&pfsyncif->sc_tmo, pfsync_timeout, pfsyncif);
timeout_set(&pfsyncif->sc_tdb_tmo, pfsync_tdb_timeout, pfsyncif);

View File

@ -405,7 +405,7 @@ bpfopen(struct cdev *dev, int flags, int fmt, struct thread *td)
mac_create_bpfdesc(td->td_ucred, d);
#endif
mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF);
callout_init(&d->bd_callout, NET_CALLOUT_MPSAFE);
callout_init(&d->bd_callout, CALLOUT_MPSAFE);
knlist_init(&d->bd_sel.si_note, &d->bd_mtx, NULL, NULL, NULL);
return (0);

View File

@ -1097,7 +1097,7 @@ int ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn,
int ng_uncallout(struct callout *c, node_p node);
int ng_callout(struct callout *c, node_p node, hook_p hook, int ticks,
ng_item_fn *fn, void * arg1, int arg2);
#define ng_callout_init(c) callout_init(c, NET_CALLOUT_MPSAFE)
#define ng_callout_init(c) callout_init(c, CALLOUT_MPSAFE)
/* Flags for netgraph functions. */
#define NG_NOFLAGS 0x00000000 /* no special options */

View File

@ -384,9 +384,9 @@ carp_clone_create(struct if_clone *ifc, int unit, caddr_t params)
sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS;
sc->sc_imo.imo_multicast_vif = -1;
callout_init(&sc->sc_ad_tmo, NET_CALLOUT_MPSAFE);
callout_init(&sc->sc_md_tmo, NET_CALLOUT_MPSAFE);
callout_init(&sc->sc_md6_tmo, NET_CALLOUT_MPSAFE);
callout_init(&sc->sc_ad_tmo, CALLOUT_MPSAFE);
callout_init(&sc->sc_md_tmo, CALLOUT_MPSAFE);
callout_init(&sc->sc_md6_tmo, CALLOUT_MPSAFE);
ifp->if_softc = sc;
if_initname(ifp, CARP_IFNAME, unit);

View File

@ -2141,7 +2141,7 @@ ip_dn_init(void)
taskqueue_thread_enqueue, &dn_tq);
taskqueue_start_threads(&dn_tq, 1, PI_NET, "dummynet");
callout_init(&dn_timeout, NET_CALLOUT_MPSAFE);
callout_init(&dn_timeout, CALLOUT_MPSAFE);
callout_reset(&dn_timeout, 1, dummynet, NULL);
/* Initialize curr_time adjustment mechanics. */

View File

@ -4937,7 +4937,7 @@ ipfw_init(void)
sizeof(ipfw_dyn_rule), NULL, NULL, NULL, NULL,
UMA_ALIGN_PTR, 0);
IPFW_DYN_LOCK_INIT();
callout_init(&ipfw_timeout, NET_CALLOUT_MPSAFE);
callout_init(&ipfw_timeout, CALLOUT_MPSAFE);
bzero(&default_rule, sizeof default_rule);

View File

@ -639,12 +639,12 @@ ip_mrouter_reset(void)
pim_assert = 0;
mrt_api_config = 0;
callout_init(&expire_upcalls_ch, NET_CALLOUT_MPSAFE);
callout_init(&expire_upcalls_ch, CALLOUT_MPSAFE);
bw_upcalls_n = 0;
bzero((caddr_t)bw_meter_timers, sizeof(bw_meter_timers));
callout_init(&bw_upcalls_ch, NET_CALLOUT_MPSAFE);
callout_init(&bw_meter_ch, NET_CALLOUT_MPSAFE);
callout_init(&bw_upcalls_ch, CALLOUT_MPSAFE);
callout_init(&bw_meter_ch, CALLOUT_MPSAFE);
}
static void

View File

@ -592,12 +592,8 @@ tcp_newtcpcb(struct inpcb *inp)
tcp_mssdflt;
/* Set up our timeouts. */
if (NET_CALLOUT_MPSAFE)
callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
CALLOUT_RETURNUNLOCKED);
else
callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
(CALLOUT_RETURNUNLOCKED|CALLOUT_NETGIANT));
callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
CALLOUT_RETURNUNLOCKED);
if (tcp_do_rfc1323)
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);

View File

@ -408,7 +408,6 @@ do { \
} while (0)
#define NET_ASSERT_GIANT() do { \
} while (0)
#define NET_CALLOUT_MPSAFE CALLOUT_MPSAFE
struct mtx_args {
struct mtx *ma_mtx;