From nobody Wed Dec 29 08:17:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7C59C1911104; Wed, 29 Dec 2021 08:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JP45V1P4Nz4ZgJ; Wed, 29 Dec 2021 08:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FA0821739; Wed, 29 Dec 2021 08:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BT8HXXr000303; Wed, 29 Dec 2021 08:17:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BT8HXPq000302; Wed, 29 Dec 2021 08:17:33 GMT (envelope-from git) Date: Wed, 29 Dec 2021 08:17:33 GMT Message-Id: <202112290817.1BT8HXPq000302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: aacff95603ed - stable/13 - sys/queue.h: move trashing from SLIST_REMOVE to REMOVE_AFTER, REMOVE_HEAD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aacff95603ed1faa5618fff17a315c6fda53a7f1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640765854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7RdJw/pHbfVv9FfgXnEmJCuKsjF0yU2uouNtQQG2nUY=; b=CcEhSweuPsBC6d7T4kBQF+2IWTOk5bBtnI6UVeH9ZN2J0j4a0DVzFnSjA42v7Ng2o+7xMp ju7KcajESbCjKtvEkYNjVERw4cI3eCuk6SKGdMnHLZF4YOtv4XQJpiID8nLkFtND2nPvIT yCgDp8wxhwKncp2WkgdyL2mGXDy0G/VcmSL8SCt2F9jq8lAquZr86CKOLNE02qim4tZF6/ UtmWGrRyL78x99dPSozN3JrzDXz1DXhG3oUGQrz+WaOTadWfOlz+Q+tBHthSWMdZsBY0vC E99BX+wUNEXoQLZBtXqXcIH/qloOdf/5NZ3MIZd7+vSB+0xdbhh6iHB4ymQO8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640765854; a=rsa-sha256; cv=none; b=Pz/jn0rmWmCx9rk4oB9+rKTkwHW/4Zeo53sDDjoTor14t0ZUbvIL6ihyk4EVbdLtPTZCHO jCRhEPjfbl7L9P6Dgsotk4QjyqAhvVyAyzhGYI01/ov/y5ChOA5c0K0XbOb9P4MRFU7s6l gGoHyDoYvyGf2HaT0ffaryw1uNRfj1uvm25fodu8M+y8sgzW7hggHEGXmLpRfvfrDz3Ela rTOfvClNcs/Kd4+yXkJr52zS4WB2ReP1ZUL0xplri55WO1bmkNP0lTf0PoKUAP/1MvPT5q 7zzoX4VMQcYdydaklEm0BQxVmgINutVz0BMOQ/otJ3VPRS3RTbEa8kUab1tLVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=aacff95603ed1faa5618fff17a315c6fda53a7f1 commit aacff95603ed1faa5618fff17a315c6fda53a7f1 Author: Andriy Gapon AuthorDate: 2021-12-15 11:27:49 +0000 Commit: Andriy Gapon CommitDate: 2021-12-29 08:14:08 +0000 sys/queue.h: move trashing from SLIST_REMOVE to REMOVE_AFTER, REMOVE_HEAD SLIST_REMOVE calls either REMOVE_AFTER or REMOVE_HEAD to do the job. But those two macros can be used independently as well. (cherry picked from commit 5dab06a003189ebb017810bdbf3b3c2f074afd3e) --- sys/sys/queue.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 25091ec815f1..6c7c37308b4d 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -272,7 +272,6 @@ struct { \ #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #define SLIST_REMOVE(head, elm, type, field) do { \ - QMD_SAVELINK(oldnext, (elm)->field.sle_next); \ if (SLIST_FIRST((head)) == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ @@ -282,16 +281,19 @@ struct { \ curelm = SLIST_NEXT(curelm, field); \ SLIST_REMOVE_AFTER(curelm, field); \ } \ - TRASHIT(*oldnext); \ } while (0) #define SLIST_REMOVE_AFTER(elm, field) do { \ + QMD_SAVELINK(oldnext, SLIST_NEXT(elm, field)->field.sle_next); \ SLIST_NEXT(elm, field) = \ SLIST_NEXT(SLIST_NEXT(elm, field), field); \ + TRASHIT(*oldnext); \ } while (0) #define SLIST_REMOVE_HEAD(head, field) do { \ + QMD_SAVELINK(oldnext, SLIST_FIRST(head)->field.sle_next); \ SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ + TRASHIT(*oldnext); \ } while (0) #define SLIST_REMOVE_PREVPTR(prevp, elm, field) do { \