svn commit: r191533 - head/sys/netipx
Ed Schouten
ed at FreeBSD.org
Sun Apr 26 21:03:28 UTC 2009
Author: ed
Date: Sun Apr 26 21:03:27 2009
New Revision: 191533
URL: http://svn.freebsd.org/changeset/base/191533
Log:
Make the SPX code use its own copies of insque()/remque().
Instead of using the antique insque()/remque() functions from
sys/queue.h, make this code use its own versions. Eventually the code
should just use the regular TAILQ/LIST macros.
Modified:
head/sys/netipx/spx_usrreq.c
Modified: head/sys/netipx/spx_usrreq.c
==============================================================================
--- head/sys/netipx/spx_usrreq.c Sun Apr 26 20:55:31 2009 (r191532)
+++ head/sys/netipx/spx_usrreq.c Sun Apr 26 21:03:27 2009 (r191533)
@@ -180,6 +180,25 @@ struct pr_usrreqs spx_usrreq_sps = {
.pru_close = spx_usr_close,
};
+static __inline void
+spx_insque(struct spx_q *element, struct spx_q *head)
+{
+
+ element->si_next = head->si_next;
+ element->si_prev = head;
+ head->si_next = element;
+ element->si_next->si_prev = element;
+}
+
+static __inline void
+spx_remque(struct spx_q *element)
+{
+
+ element->si_next->si_prev = element->si_prev;
+ element->si_prev->si_next = element->si_next;
+ element->si_prev = NULL;
+}
+
void
spx_init(void)
{
@@ -649,7 +668,7 @@ update_window:
break;
}
}
- insque(si, q->si_prev);
+ spx_insque((struct spx_q *)si, q->si_prev);
/*
* If this packet is urgent, inform process
@@ -680,7 +699,7 @@ present:
so->so_rcv.sb_state |= SBS_RCVATMARK;
}
q = q->si_prev;
- remque(q->si_next);
+ spx_remque(q->si_next);
wakeup = 1;
spxstat.spxs_rcvpack++;
#ifdef SF_NEWCALL
@@ -1458,7 +1477,7 @@ spx_pcbdetach(struct ipxpcb *ipxp)
s = cb->s_q.si_next;
while (s != &(cb->s_q)) {
s = s->si_next;
- remque(s);
+ spx_remque(s);
m = dtom(s);
m_freem(m);
}
More information about the svn-src-all
mailing list