static int filt_solisten(struct knote *kn, long hint);
static struct filterops solisten_filtops =
- { FILTEROP_ISFD, NULL, filt_sordetach, filt_solisten };
+ { FILTEROP_ISFD|FILTEROP_MPSAFE, NULL, filt_sordetach, filt_solisten };
static struct filterops soread_filtops =
- { FILTEROP_ISFD, NULL, filt_sordetach, filt_soread };
+ { FILTEROP_ISFD|FILTEROP_MPSAFE, NULL, filt_sordetach, filt_soread };
static struct filterops sowrite_filtops =
- { FILTEROP_ISFD, NULL, filt_sowdetach, filt_sowrite };
+ { FILTEROP_ISFD|FILTEROP_MPSAFE, NULL, filt_sowdetach, filt_sowrite };
static struct filterops soexcept_filtops =
- { FILTEROP_ISFD, NULL, filt_sordetach, filt_soread };
+ { FILTEROP_ISFD|FILTEROP_MPSAFE, NULL, filt_sordetach, filt_soread };
MALLOC_DEFINE(M_SOCKET, "socket", "socket struct");
MALLOC_DEFINE(M_SONAME, "soname", "socket name");
static void mld6_sendpkt (struct in6_multi *, int, const struct in6_addr *);
+static struct lwkt_token mld6_token = LWKT_TOKEN_INITIALIZER(mp_token);
+
+
void
mld6_init(void)
{
void
mld6_start_listening(struct in6_multi *in6m)
{
- crit_enter();
/*
* RFC2710 page 10:
* The node never sends a Report or Done for the link-scope all-nodes
* MLD messages are never sent for multicast addresses whose scope is 0
* (reserved) or 1 (node-local).
*/
+ lwkt_gettoken(&mld6_token);
mld6_all_nodes_linklocal.s6_addr16[1] =
htons(in6m->in6m_ifp->if_index); /* XXX */
if (IN6_ARE_ADDR_EQUAL(&in6m->in6m_addr, &mld6_all_nodes_linklocal) ||
in6m->in6m_state = MLD6_IREPORTEDLAST;
mld6_timers_are_running = 1;
}
- crit_exit();
+ lwkt_reltoken(&mld6_token);
}
void
}
#endif
+ lwkt_gettoken(&mld6_token);
/* source address validation */
ip6 = mtod(m, struct ip6_hdr *);/* in case mpullup */
if (!IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src)) {
* XXX: do we have to allow :: as source?
*/
m_freem(m);
+ lwkt_reltoken(&mld6_token);
return;
}
}
m_freem(m);
+ lwkt_reltoken(&mld6_token);
}
void
* Quick check to see if any work needs to be done, in order
* to minimize the overhead of fasttimo processing.
*/
- if (!mld6_timers_are_running)
+ lwkt_gettoken(&mld6_token);
+ if (!mld6_timers_are_running) {
+ lwkt_reltoken(&mld6_token);
return;
+ }
- crit_enter();
mld6_timers_are_running = 0;
IN6_FIRST_MULTI(step, in6m);
while (in6m != NULL) {
}
IN6_NEXT_MULTI(step, in6m);
}
- crit_exit();
+ lwkt_reltoken(&mld6_token);
}
static void