From owner-svn-src-all@FreeBSD.ORG Sun Apr 26 21:03:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACA361065672; Sun, 26 Apr 2009 21:03:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C17B8FC18; Sun, 26 Apr 2009 21:03:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3QL3RXD094507; Sun, 26 Apr 2009 21:03:27 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3QL3RRm094506; Sun, 26 Apr 2009 21:03:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200904262103.n3QL3RRm094506@svn.freebsd.org> From: Ed Schouten Date: Sun, 26 Apr 2009 21:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191533 - head/sys/netipx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2009 21:03:28 -0000 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); }