Date: Tue, 1 Nov 2005 22:52:02 +0100 From: Max Laier <max@love2party.net> To: freebsd-hackers@freebsd.org Cc: Otto Moerbeek <otto@drijf.net> Subject: queue/list macros Message-ID: <200511012252.15467.max@love2party.net>
next in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511012252.15467.max>