From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 21:52:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65C8016A41F for ; Tue, 1 Nov 2005 21:52:19 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id B96D743D48 for ; Tue, 1 Nov 2005 21:52:18 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3D566.dip.t-dialin.net [84.163.213.102] (helo=donor.laier.local) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1EX43F05cB-00089f; Tue, 01 Nov 2005 22:52:17 +0100 From: Max Laier To: freebsd-hackers@freebsd.org Date: Tue, 1 Nov 2005 22:52:02 +0100 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2849291.Y4a9W3dPT1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511012252.15467.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Otto Moerbeek Subject: queue/list macros X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 21:52:19 -0000 --nextPart2849291.Y4a9W3dPT1 Content-Type: multipart/mixed; boundary="Boundary-01=_IO+ZDt6nJGWPrRJ" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_IO+ZDt6nJGWPrRJ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All, inspired by:=20 http://marc.theaimsgroup.com/?l=3Dopenbsd-tech&m=3D112966325607754&w=3D2 I rolled this diff and would like to commit it. TRASHIT() is defined only= =20 under QUEUE_MACRO_DEBUG so this should be save for all and only affect peop= le=20 prepared to do debbuging. Any objections? =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_IO+ZDt6nJGWPrRJ Content-Type: text/x-diff; charset="us-ascii"; name="queue_trashit.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="queue_trashit.diff" Index: queue.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/store/mlaier/fcvs/src/sys/sys/queue.h,v retrieving revision 1.61 diff -u -p -r1.61 queue.h =2D-- queue.h 8 Aug 2005 05:43:57 -0000 1.61 +++ queue.h 1 Nov 2005 21:46:14 -0000 @@ -199,6 +199,7 @@ struct { \ SLIST_NEXT(curelm, field) =3D \ SLIST_NEXT(SLIST_NEXT(curelm, field), field); \ } \ + TRASHIT((elm)->field.sle_next); \ } while (0) =20 #define SLIST_REMOVE_HEAD(head, field) do { \ @@ -291,6 +292,7 @@ struct { \ STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) =3D=3D NULL)\ (head)->stqh_last =3D &STAILQ_NEXT((curelm), field);\ } \ + TRASHIT((elm)->field.stqe_next); \ } while (0) =20 #define STAILQ_REMOVE_HEAD(head, field) do { \ @@ -372,6 +374,8 @@ struct { \ LIST_NEXT((elm), field)->field.le_prev =3D \ (elm)->field.le_prev; \ *(elm)->field.le_prev =3D LIST_NEXT((elm), field); \ + TRASHIT((elm)->field.le_next); \ + TRASHIT((elm)->field.le_prev); \ } while (0) =20 /* --Boundary-01=_IO+ZDt6nJGWPrRJ-- --nextPart2849291.Y4a9W3dPT1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDZ+OPXyyEoT62BG0RAu9DAJ9H7yVB8+4t6ZrpA5owk/BfuNRHzwCfYi7v nKSujCD2ko7/vz6KTzxlxUg= =mY5g -----END PGP SIGNATURE----- --nextPart2849291.Y4a9W3dPT1--