From patchwork Fri Oct 23 14:57:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40829 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED334398B403; Fri, 23 Oct 2020 14:58:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED334398B403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465112; bh=I4GBOQjaVhD75Exb6QmsiQBW4MgIv6qoblY2y+r03Go=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Vj7zDUZ7srxVCzcF0yG/X+AemxiQQuHjuIhf8GKVe9XZLoQBKJCFE2grmsCyVdmTO LAHIIEi/kawkxBer5oJzNSk+DtBklUy3YHcqVxvXH3StspOf0E0XcXkZE7B1T6UnEa qubWQjRykSRxrb2bdAGp4YuwFOMrQ2zO6s9SjWGo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id 483343985425 for ; Fri, 23 Oct 2020 14:58:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 483343985425 Received: by mail-wr1-x443.google.com with SMTP id x7so2241624wrl.3 for ; Fri, 23 Oct 2020 07:58:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I4GBOQjaVhD75Exb6QmsiQBW4MgIv6qoblY2y+r03Go=; b=BkZuYNgdqI+2b+fbXkw8CYXMkfmzdGI7NtXuSswYdYGT0pQJMpRxLgiF52Y2tTdTNt xSauHQYTpUZL367HUFV0GzTdgTRV15GQnx6AcUSEH30PVXLaoQz86BQtfGASz0fMo+A4 Cnrder89yBP55CJpiNk5AZVt/+6eacl9TF43As7jVj8lifJVsqhq31k1VzH7sQv45L7X MVgHLK/dFqvNLLM6MwmqKpYj+LlRoKM36gmUrdFSvINzE2SabpZK6JGUjrnOk2YyykBZ G8XEj6A3muKRuq9d0EmJczMdflehNkm4RjO35M4N0FNKRQIDLIvE5Y/8xlnvh+0O878o sd7w== X-Gm-Message-State: AOAM531cEsD/XDChK9ndgEkO70RjiuzVkKNQGU0ofoNbIR15dYvSDi6O 9UEAlXKq2OZLUZ1Vt0sbcQE= X-Google-Smtp-Source: ABdhPJyO6rKlDqKgaRkrowAAAhqas27jcfjB5lgYFagJ7TuJJTRLbbjEku79UfWY99Ui0FivWSPDRA== X-Received: by 2002:adf:a557:: with SMTP id j23mr3195102wrb.95.1603465108205; Fri, 23 Oct 2020 07:58:28 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:27 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 01/11] circleq.3: New page that will hold the (circleq) content of queue.3 Date: Fri, 23 Oct 2020 16:57:27 +0200 Message-Id: <20201023145736.102750-2-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 man3/circleq.3 diff --git a/man3/circleq.3 b/man3/circleq.3 new file mode 100644 index 000000000..39920948a --- /dev/null +++ b/man3/circleq.3 @@ -0,0 +1,40 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" and Copyright (c) 2020 by Alejandro Colomar +.\" +.\" %%%LICENSE_START(BSD_3_CLAUSE_UCB) +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" %%%LICENSE_END +.\" +.\" +.TH CIRCLEQ 3 2020-10-21 "GNU" "Linux Programmer's Manual" +.SH NAME +.SH SYNOPSIS +.SH DESCRIPTION +.SH RETURN VALUE +.SH CONFORMING TO +.SH BUGS +.SH EXAMPLES +.SH SEE ALSO From patchwork Fri Oct 23 14:57:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40830 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8ACCF398B40A; Fri, 23 Oct 2020 14:58:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8ACCF398B40A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465113; bh=sYFzSQVDqRsskAf3tDWckAwmMx1ZucpWZy+IsUAmVbk=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Wonp/5WkqICYTaDFeqkxy9vOnd6uAfLETooHPa3/4rdv3xTvIdP1gnPb5SLnl7fNg 0r3L6uK1HzT8qR2f4ICuADl7UEILa/iRN79NTUcQy8/gVF2+TsXed/PGbJD65mA0gJ YLOU3hzlKzYHQPZgZQVu81Bc/ONW8IcS2jBGJicE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id A36153985425 for ; Fri, 23 Oct 2020 14:58:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A36153985425 Received: by mail-wm1-x336.google.com with SMTP id q5so1961444wmq.0 for ; Fri, 23 Oct 2020 07:58:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sYFzSQVDqRsskAf3tDWckAwmMx1ZucpWZy+IsUAmVbk=; b=DrWrTBC9QtBpXUPx1q07hxeRYExaLi95U2JPYxy4hMd3g9s8gFMznTim0GA9H/wuf9 UwunBxtnKbrb/ZBWcqPwjJdKraMJkX3S42Rl1A6pV/mK2Xbqu8f2o24Zj7gfigXGis6z yp0QvUTgu3XnRjw5rxxuFWcooO83O1hqsn+lUx1a9yM5GU+RsKH2mp6Lmv/GZiTcPxbl prYPODMGBUdIq1FRFeclrOb5t0yddy8J26JbPbZYWRua7eyEX11zvMs24bdVnH4ayWk4 8yHdZM6jr4NxpKDYV9QC3C8nRp/hRxB0mtEhZ3WYwnCw2OT7skn5bUeO7jTUMNo/GIGI 1lEA== X-Gm-Message-State: AOAM532Xr2l0tz3GbGbU9lgckccrx/MUjhYy7GzAEAOcfvBoQy7YRwKZ qNFVlqiyo8DK8ur6/zHdWRc= X-Google-Smtp-Source: ABdhPJysRQQsppCtPQgxVI9ULt0KFn37as3LC3ZZh8dOuw1b264dXGe6ONWD6ZTJherNOj7EBk4Aig== X-Received: by 2002:a1c:7d49:: with SMTP id y70mr2735901wmc.103.1603465109776; Fri, 23 Oct 2020 07:58:29 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:28 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 02/11] circleq.3, queue.3: NAME: Move code from queue-3 to circleq.3 Date: Fri, 23 Oct 2020 16:57:28 +0200 Message-Id: <20201023145736.102750-3-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 18 ++++++++++++++++++ man3/queue.3 | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/man3/circleq.3 b/man3/circleq.3 index 39920948a..bb024d697 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -31,6 +31,24 @@ .\" .TH CIRCLEQ 3 2020-10-21 "GNU" "Linux Programmer's Manual" .SH NAME +.Nm CIRCLEQ_EMPTY , +.Nm CIRCLEQ_ENTRY , +.Nm CIRCLEQ_FIRST , +.Nm CIRCLEQ_FOREACH , +.Nm CIRCLEQ_FOREACH_REVERSE , +.Nm CIRCLEQ_HEAD , +.Nm CIRCLEQ_HEAD_INITIALIZER , +.Nm CIRCLEQ_INIT , +.Nm CIRCLEQ_INSERT_AFTER , +.Nm CIRCLEQ_INSERT_BEFORE , +.Nm CIRCLEQ_INSERT_HEAD , +.Nm CIRCLEQ_INSERT_TAIL , +.Nm CIRCLEQ_LAST , +.Nm CIRCLEQ_LOOP_NEXT , +.Nm CIRCLEQ_LOOP_PREV , +.Nm CIRCLEQ_NEXT , +.Nm CIRCLEQ_PREV , +.Nm CIRCLEQ_REMOVE .SH SYNOPSIS .SH DESCRIPTION .SH RETURN VALUE diff --git a/man3/queue.3 b/man3/queue.3 index 36432718d..1b68275d5 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -78,24 +78,6 @@ .Nm TAILQ_PREV , .Nm TAILQ_REMOVE , .\" .Nm TAILQ_SWAP , -.Nm CIRCLEQ_EMPTY , -.Nm CIRCLEQ_ENTRY , -.Nm CIRCLEQ_FIRST , -.Nm CIRCLEQ_FOREACH , -.Nm CIRCLEQ_FOREACH_REVERSE , -.Nm CIRCLEQ_HEAD , -.Nm CIRCLEQ_HEAD_INITIALIZER , -.Nm CIRCLEQ_INIT , -.Nm CIRCLEQ_INSERT_AFTER , -.Nm CIRCLEQ_INSERT_BEFORE , -.Nm CIRCLEQ_INSERT_HEAD , -.Nm CIRCLEQ_INSERT_TAIL , -.Nm CIRCLEQ_LAST , -.Nm CIRCLEQ_LOOP_NEXT , -.Nm CIRCLEQ_LOOP_PREV , -.Nm CIRCLEQ_NEXT , -.Nm CIRCLEQ_PREV , -.Nm CIRCLEQ_REMOVE .Nd implementations of singly-linked lists, singly-linked tail queues, lists, tail queues, and circular queues .Sh SYNOPSIS From patchwork Fri Oct 23 14:57:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40831 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1BFC83985425; Fri, 23 Oct 2020 14:58:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BFC83985425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465116; bh=rtjbDgeFEOsuJcn2KdURhDkWZyHQZy7RstPAKLP2uEo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=n74hi5d4Q18eXm6gXbZiULP6Y0cg2OLvbDs8xl7QBW8Vo/MJVqJwYDai+0wKQ165a sAqe/FjWqH3JtsOXKnAtu3zrL8apmy4cMkp57aS1Fu1kfv4eOwa91qpbMvBECtF3ls 5+m42TDpaN8vpIL/GeRPRd+IgiKDYhoMJLQe5+9Q= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 104483985425 for ; Fri, 23 Oct 2020 14:58:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 104483985425 Received: by mail-wm1-x334.google.com with SMTP id 13so1833540wmf.0 for ; Fri, 23 Oct 2020 07:58:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rtjbDgeFEOsuJcn2KdURhDkWZyHQZy7RstPAKLP2uEo=; b=nLxzvg4Jy1FiZty+pyAFiOJp/g99aiytDMu4wCsv2xF8ShTYfEIQSlwID8X2liQhlq xI1Xq/SyNxnCFKqIQx4USEmhD0v+xDfZAAUiGGKrJw6S1EXm8uIr8FR5nSjUtmwSQtEo Jlh99mEWz/De8ni8Wni1WcPN7pu/iBPHof3j1e7Pi5i2cX8gST5gk6UirhjSQlgNXw1Z 9Hhg3ZSzjxmGNCpIME1eJIpk3AvTM7qA34hVa4e2+Ka/iT3tIrP5SvGDrZtFp11hxk3n qNt+tJaFkxMj2FAtdzrlbvdSTSp86rgeWaJ9i9iYgHGIs4xqPL9EdwAW8eLjCR6Ze7Nx uyYA== X-Gm-Message-State: AOAM530yTrWOHR/EA7C5JuXZkcpxH78ZcDo84qHfqTayQBa5CCWR/YXE yDYNRHD4qBaWCfm1xMcWmDc= X-Google-Smtp-Source: ABdhPJz+BexssnZuzmy19FdB2PaSk1GQW3aJ8/ms0DNuZvgVfIS0st90Ez/gDoLycE3vsYD+5yQ8gg== X-Received: by 2002:a1c:8087:: with SMTP id b129mr2726332wmd.10.1603465111218; Fri, 23 Oct 2020 07:58:31 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:30 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 03/11] circleq.3, queue.3: SYNOPSIS: Move code from queue.3 to circleq.3 Date: Fri, 23 Oct 2020 16:57:29 +0200 Message-Id: <20201023145736.102750-4-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 18 ++++++++++++++++++ man3/queue.3 | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/man3/circleq.3 b/man3/circleq.3 index bb024d697..df547fca7 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -50,6 +50,24 @@ .Nm CIRCLEQ_PREV , .Nm CIRCLEQ_REMOVE .SH SYNOPSIS +.Fn CIRCLEQ_EMPTY "CIRCLEQ_HEAD *head" +.Fn CIRCLEQ_ENTRY "TYPE" +.Fn CIRCLEQ_FIRST "CIRCLEQ_HEAD *head" +.Fn CIRCLEQ_FOREACH "TYPE *var" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_FOREACH_REVERSE "TYPE *var" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_HEAD "HEADNAME" "TYPE" +.Fn CIRCLEQ_HEAD_INITIALIZER "CIRCLEQ_HEAD head" +.Fn CIRCLEQ_INIT "CIRCLEQ_HEAD *head" +.Fn CIRCLEQ_INSERT_AFTER "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_BEFORE "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_HEAD "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_LAST "CIRCLEQ_HEAD *head" +.Fn CIRCLEQ_LOOP_NEXT "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_LOOP_PREV "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_NEXT "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_PREV "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" .SH DESCRIPTION .SH RETURN VALUE .SH CONFORMING TO diff --git a/man3/queue.3 b/man3/queue.3 index 1b68275d5..247bfb874 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -128,24 +128,6 @@ lists, tail queues, and circular queues .Fn TAILQ_PREV "TYPE *elm" "HEADNAME" "TAILQ_ENTRY NAME" .Fn TAILQ_REMOVE "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME" .\" .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME" -.Fn CIRCLEQ_EMPTY "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_ENTRY "TYPE" -.Fn CIRCLEQ_FIRST "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_FOREACH "TYPE *var" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_FOREACH_REVERSE "TYPE *var" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_HEAD "HEADNAME" "TYPE" -.Fn CIRCLEQ_HEAD_INITIALIZER "CIRCLEQ_HEAD head" -.Fn CIRCLEQ_INIT "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_INSERT_AFTER "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_INSERT_BEFORE "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_INSERT_HEAD "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_LAST "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_LOOP_NEXT "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_LOOP_PREV "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_NEXT "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_PREV "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" .\" .Sh DESCRIPTION These macros define and operate on five types of data structures: From patchwork Fri Oct 23 14:57:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40832 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A6D6F398B410; Fri, 23 Oct 2020 14:58:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6D6F398B410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465116; bh=4mcoTqiJMog/+48zoQUJEieKUcJ7iX0lzFl2WZbBeZ8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=KivLc0R83sOTMcefD+fb2yAvriWqJ7RtMRSzS+7+QJGrL0WmbXqCfdxLeZ+F4cfbx OCsjswLbsZhaFZYOwohSXkXHxtxxTyu2c2B6ZRGs88kuxhmm0EIHwLfceCN3hsy53A jskBuD24NvavXfDw/xubDfvlFtmotAtCXdWS5gHQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 6B56F3985425 for ; Fri, 23 Oct 2020 14:58:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6B56F3985425 Received: by mail-wr1-x42f.google.com with SMTP id j7so2204657wrt.9 for ; Fri, 23 Oct 2020 07:58:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4mcoTqiJMog/+48zoQUJEieKUcJ7iX0lzFl2WZbBeZ8=; b=Smso0w2UZlFVphGTeeZCYpkd6CMoedfo4vqVEsya6IRd6l9PDk7S7RgfSchZX9zRVp PRxxSlyZ3OGv9KCFw4SneFIHhcwrt8/W9A0iHomhOXlZlg4mWsC97xEEWHnJXwDWfspw fAfAXqKXTXkvp03076gkwblXeu3D2VhJtbZnaYPrnVTSt1tn4Di5un7tewifU1lxi4cV 6uhC0IVhkSVP+aWRW3xR3e9SpR+FTdeliLrZMsRq4QjzfHnDERwmOW+waVvfbkChOXw7 XrniFhXl2VnbZQS8uqCrV09llAlr4Vcytod89uPX0tlVg+RGYelBFBrL9kjBFn7+cNB1 Tp6w== X-Gm-Message-State: AOAM5334Rr1bwAf/h+GiO1LZwvqc89Su9CMswAzkB1CCcVO5Z3dtseef 1KpaheEBWwymkfWFhXx9YPA= X-Google-Smtp-Source: ABdhPJySKCrxOCEQQ4Hx15q3R7n5RTcGQftIud7nr1rN5vyWLWaM53UfbX8uhFBqlf0Llsj2FQEDzg== X-Received: by 2002:adf:f4d2:: with SMTP id h18mr2856980wrp.99.1603465112448; Fri, 23 Oct 2020 07:58:32 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:31 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 04/11] circleq.3, queue.3: DESCRIPTION: Move circleq specific code from queue.3 to circleq.3 Date: Fri, 23 Oct 2020 16:57:30 +0200 Message-Id: <20201023145736.102750-5-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 137 +++++++++++++++++++++++++++++++++++++++++++++++++ man3/queue.3 | 137 ------------------------------------------------- 2 files changed, 137 insertions(+), 137 deletions(-) diff --git a/man3/circleq.3 b/man3/circleq.3 index df547fca7..a28a82919 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -69,6 +69,143 @@ .Fn CIRCLEQ_PREV "TYPE *elm" "CIRCLEQ_ENTRY NAME" .Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" .SH DESCRIPTION +.Ss Circular queues +A circular queue is headed by a structure defined by the +.Nm CIRCLEQ_HEAD +macro. +This structure contains a pair of pointers, +one to the first element in the circular queue and the other to +the last element in the circular queue. +The elements are doubly linked so that an arbitrary element can be +removed without traversing the circular queue. +New elements can be added to the circular queue after an existing element, +before an existing element, at the head of the circular queue, +or at the end of the circular queue. +A +.Fa CIRCLEQ_HEAD +structure is declared as follows: +.Bd -literal -offset indent +CIRCLEQ_HEAD(HEADNAME, TYPE) head; +.Ed +.Pp +where +.Li HEADNAME +is the name of the structure to be defined, and +.Li TYPE +is the type of the elements to be linked into the circular queue. +A pointer to the head of the circular queue can later be declared as: +.Bd -literal -offset indent +struct HEADNAME *headp; +.Ed +.Pp +(The names +.Li head +and +.Li headp +are user selectable.) +.Pp +The macro +.Nm CIRCLEQ_HEAD_INITIALIZER +evaluates to an initializer for the circular queue +.Fa head . +.Pp +The macro +.Nm CIRCLEQ_EMPTY +evaluates to true if there are no items on the circular queue. +.Pp +The macro +.Nm CIRCLEQ_ENTRY +declares a structure that connects the elements in +the circular queue. +.Pp +The macro +.Nm CIRCLEQ_FIRST +returns the first item on the circular queue. +.Pp +The macro +.Nm CIRCLEQ_FOREACH +traverses the circular queue referenced by +.Fa head +in the forward direction, assigning each element in turn to +.Fa var . +.Fa var +is set to +.Fa &head +if the loop completes normally, or if there were no elements. +.Pp +The macro +.Nm CIRCLEQ_FOREACH_REVERSE +traverses the circular queue referenced by +.Fa head +in the reverse direction, assigning each element in turn to +.Fa var . +.Pp +The macro +.Nm CIRCLEQ_INIT +initializes the circular queue referenced by +.Fa head . +.Pp +The macro +.Nm CIRCLEQ_INSERT_HEAD +inserts the new element +.Fa elm +at the head of the circular queue. +.Pp +The macro +.Nm CIRCLEQ_INSERT_TAIL +inserts the new element +.Fa elm +at the end of the circular queue. +.Pp +The macro +.Nm CIRCLEQ_INSERT_AFTER +inserts the new element +.Fa elm +after the element +.Fa listelm . +.Pp +The macro +.Nm CIRCLEQ_INSERT_BEFORE +inserts the new element +.Fa elm +before the element +.Fa listelm . +.Pp +The macro +.Nm CIRCLEQ_LAST +returns the last item on the circular queue. +.Pp +The macro +.Nm CIRCLEQ_NEXT +returns the next item on the circular queue, or +.Fa &head +if this item is the last one. +.Pp +The macro +.Nm CIRCLEQ_PREV +returns the previous item on the circular queue, or +.Fa &head +if this item is the first one. +.Pp +The macro +.Nm CIRCLEQ_LOOP_NEXT +returns the next item on the circular queue. +If +.Fa elm +is the last element on the circular queue, the first element is returned. +.Pp +The macro +.Nm CIRCLEQ_LOOP_PREV +returns the previous item on the circular queue. +If +.Fa elm +is the first element on the circular queue, the last element is returned. +.Pp +The macro +.Nm CIRCLEQ_REMOVE +removes the element +.Fa elm +from the circular queue. .SH RETURN VALUE .SH CONFORMING TO .SH BUGS diff --git a/man3/queue.3 b/man3/queue.3 index 247bfb874..794790881 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -673,143 +673,6 @@ from the tail queue. .\" .Fa head2 . .Pp See the EXAMPLES section below for an example program using a tail queue. -.Ss Circular queues -A circular queue is headed by a structure defined by the -.Nm CIRCLEQ_HEAD -macro. -This structure contains a pair of pointers, -one to the first element in the circular queue and the other to -the last element in the circular queue. -The elements are doubly linked so that an arbitrary element can be -removed without traversing the circular queue. -New elements can be added to the circular queue after an existing element, -before an existing element, at the head of the circular queue, -or at the end of the circular queue. -A -.Fa CIRCLEQ_HEAD -structure is declared as follows: -.Bd -literal -offset indent -CIRCLEQ_HEAD(HEADNAME, TYPE) head; -.Ed -.Pp -where -.Li HEADNAME -is the name of the structure to be defined, and -.Li TYPE -is the type of the elements to be linked into the circular queue. -A pointer to the head of the circular queue can later be declared as: -.Bd -literal -offset indent -struct HEADNAME *headp; -.Ed -.Pp -(The names -.Li head -and -.Li headp -are user selectable.) -.Pp -The macro -.Nm CIRCLEQ_HEAD_INITIALIZER -evaluates to an initializer for the circular queue -.Fa head . -.Pp -The macro -.Nm CIRCLEQ_EMPTY -evaluates to true if there are no items on the circular queue. -.Pp -The macro -.Nm CIRCLEQ_ENTRY -declares a structure that connects the elements in -the circular queue. -.Pp -The macro -.Nm CIRCLEQ_FIRST -returns the first item on the circular queue. -.Pp -The macro -.Nm CIRCLEQ_FOREACH -traverses the circular queue referenced by -.Fa head -in the forward direction, assigning each element in turn to -.Fa var . -.Fa var -is set to -.Fa &head -if the loop completes normally, or if there were no elements. -.Pp -The macro -.Nm CIRCLEQ_FOREACH_REVERSE -traverses the circular queue referenced by -.Fa head -in the reverse direction, assigning each element in turn to -.Fa var . -.Pp -The macro -.Nm CIRCLEQ_INIT -initializes the circular queue referenced by -.Fa head . -.Pp -The macro -.Nm CIRCLEQ_INSERT_HEAD -inserts the new element -.Fa elm -at the head of the circular queue. -.Pp -The macro -.Nm CIRCLEQ_INSERT_TAIL -inserts the new element -.Fa elm -at the end of the circular queue. -.Pp -The macro -.Nm CIRCLEQ_INSERT_AFTER -inserts the new element -.Fa elm -after the element -.Fa listelm . -.Pp -The macro -.Nm CIRCLEQ_INSERT_BEFORE -inserts the new element -.Fa elm -before the element -.Fa listelm . -.Pp -The macro -.Nm CIRCLEQ_LAST -returns the last item on the circular queue. -.Pp -The macro -.Nm CIRCLEQ_NEXT -returns the next item on the circular queue, or -.Fa &head -if this item is the last one. -.Pp -The macro -.Nm CIRCLEQ_PREV -returns the previous item on the circular queue, or -.Fa &head -if this item is the first one. -.Pp -The macro -.Nm CIRCLEQ_LOOP_NEXT -returns the next item on the circular queue. -If -.Fa elm -is the last element on the circular queue, the first element is returned. -.Pp -The macro -.Nm CIRCLEQ_LOOP_PREV -returns the previous item on the circular queue. -If -.Fa elm -is the first element on the circular queue, the last element is returned. -.Pp -The macro -.Nm CIRCLEQ_REMOVE -removes the element -.Fa elm -from the circular queue. .Sh EXAMPLES .Ss Singly-linked tail queue example .Bd -literal From patchwork Fri Oct 23 14:57:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40833 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B7AE8398B416; Fri, 23 Oct 2020 14:58:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7AE8398B416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465117; bh=DhweyKOZbWTKMQK7UyIuDQw5rrvpPpnGIHrpht7cJ7c=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=qnJV0cEI6fPDVGRZzemb2BWy7VU9w5VCgKlFcCpK/1TaTIyaFXBEJWJgrK1LrpzsM iHWMkOMmtp7kJxT1FM3olbap0DAFbhoT+AQL8B3au73ZGh/bjpSig359iejqNMzkIp dFYrTLzlqlm7RVWoSuWnYybZ5nyk6i7CHbPTsAk8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by sourceware.org (Postfix) with ESMTPS id 5E4B8398B156 for ; Fri, 23 Oct 2020 14:58:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5E4B8398B156 Received: by mail-wm1-x344.google.com with SMTP id d3so1953797wma.4 for ; Fri, 23 Oct 2020 07:58:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DhweyKOZbWTKMQK7UyIuDQw5rrvpPpnGIHrpht7cJ7c=; b=F1Mt9gBMmZ/gOP3KFnvQwCzZN132z2aVUFBb8Xk2ZW3QuP9ME5NQjHCzSXAqchXxvF Yzs6CEE3NZxYe1LeW++PTkYw1deEPPLMEPhfRjL1nLOD61ooLf/IM6FdRMaFqGLvIekt 3LTfgtXxDSEojnwHW4RMgDchPbD18Oke1pLLDES0OETgkjxVtslncZMMWzfqLU68wk3R TNl2s09UNaxmmhZXEoERXvzHvG1t5efA2VI71lMgtLCAgXA0fxgzpz+xevImnu+RqnC/ In/YqugsZbhw2++DkuzLV9BLlLuWgtmq4N/xzjnd8lq+T0bCpAoL8Q5DSQxFlx/XQrjY 7IuQ== X-Gm-Message-State: AOAM533zGTcrQTbe18tVQl4vbQ8ZQRzyi18n1/JOL3Ia3xvCJMen7lhc QbIN3DwYvEFWZVoPO+xntqU= X-Google-Smtp-Source: ABdhPJyVwfVRNJjv22ltWiHPSScRhpW5iEIIZqbSAMntTqgismDn58vHHbNusvaIqIMQ1uoFG9vrLA== X-Received: by 2002:a1c:2581:: with SMTP id l123mr2682858wml.169.1603465113518; Fri, 23 Oct 2020 07:58:33 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:32 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 05/11] circleq.3, queue.3: EXAMPLES: Move circleq example program from queue.3 to circleq.3 Date: Fri, 23 Oct 2020 16:57:31 +0200 Message-Id: <20201023145736.102750-6-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ man3/queue.3 | 56 -------------------------------------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/man3/circleq.3 b/man3/circleq.3 index a28a82919..2d683b441 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -210,4 +210,60 @@ from the circular queue. .SH CONFORMING TO .SH BUGS .SH EXAMPLES +.Ss Circular queue example +.Bd -literal +#include +#include +#include +#include + +struct entry { + int data; + CIRCLEQ_ENTRY(entry) entries; /* Queue. */ +}; + +CIRCLEQ_HEAD(circlehead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct circlehead head; /* Queue head. */ + int i; + + CIRCLEQ_INIT(&head); /* Initialize the queue. */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ + CIRCLEQ_INSERT_HEAD(&head, n1, entries); + + n1 = malloc(sizeof(struct entry)); /* Insert at the tail. */ + CIRCLEQ_INSERT_TAIL(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after. */ + CIRCLEQ_INSERT_AFTER(&head, n1, n2, entries); + + n3 = malloc(sizeof(struct entry)); /* Insert before. */ + CIRCLEQ_INSERT_BEFORE(&head, n2, n3, entries); + + CIRCLEQ_REMOVE(&head, n2, entries); /* Deletion. */ + free(n2); + /* Forward traversal. */ + i = 0; + CIRCLEQ_FOREACH(np, &head, entries) + np->data = i++; + /* Reverse traversal. */ + CIRCLEQ_FOREACH_REVERSE(np, &head, entries) + printf("%i\en", np->data); + /* Queue deletion. */ + n1 = CIRCLEQ_FIRST(&head); + while (n1 != (void *)&head) { + n2 = CIRCLEQ_NEXT(n1, entries); + free(n1); + n1 = n2; + } + CIRCLEQ_INIT(&head); + + exit(EXIT_SUCCESS); +} +.Ed .SH SEE ALSO diff --git a/man3/queue.3 b/man3/queue.3 index 794790881..26e304b2f 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -791,62 +791,6 @@ main(void) exit(EXIT_SUCCESS); } .Ed -.Ss Circular queue example -.Bd -literal -#include -#include -#include -#include - -struct entry { - int data; - CIRCLEQ_ENTRY(entry) entries; /* Queue. */ -}; - -CIRCLEQ_HEAD(circlehead, entry); - -int -main(void) -{ - struct entry *n1, *n2, *n3, *np; - struct circlehead head; /* Queue head. */ - int i; - - CIRCLEQ_INIT(&head); /* Initialize the queue. */ - - n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ - CIRCLEQ_INSERT_HEAD(&head, n1, entries); - - n1 = malloc(sizeof(struct entry)); /* Insert at the tail. */ - CIRCLEQ_INSERT_TAIL(&head, n1, entries); - - n2 = malloc(sizeof(struct entry)); /* Insert after. */ - CIRCLEQ_INSERT_AFTER(&head, n1, n2, entries); - - n3 = malloc(sizeof(struct entry)); /* Insert before. */ - CIRCLEQ_INSERT_BEFORE(&head, n2, n3, entries); - - CIRCLEQ_REMOVE(&head, n2, entries); /* Deletion. */ - free(n2); - /* Forward traversal. */ - i = 0; - CIRCLEQ_FOREACH(np, &head, entries) - np->data = i++; - /* Reverse traversal. */ - CIRCLEQ_FOREACH_REVERSE(np, &head, entries) - printf("%i\en", np->data); - /* Queue deletion. */ - n1 = CIRCLEQ_FIRST(&head); - while (n1 != (void *)&head) { - n2 = CIRCLEQ_NEXT(n1, entries); - free(n1); - n1 = n2; - } - CIRCLEQ_INIT(&head); - - exit(EXIT_SUCCESS); -} -.Ed .Sh CONFORMING TO Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs. From patchwork Fri Oct 23 14:57:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40834 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 49BBC398B419; Fri, 23 Oct 2020 14:58:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49BBC398B419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465119; bh=kwBfRLIMtYcJfYNBrMa04rkg4sHfbGqiCDb5zf43pJM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ZDqOwxzIUxZzNUgUP9tbQdakCNKUNbVYPNMoDl7WBQObFYo/PiJPKeu23/a1A+DHO PyhocnT5hUlIN7WFol3WYyuo+uS86osgFMS76rUDklFZ/L1n36y4IW5OG9oNjLNqAf SLsXbvJLTPwq3HRmHoSgKnGbYsKFtYTq+HxvN0po= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 22688398B40D for ; Fri, 23 Oct 2020 14:58:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 22688398B40D Received: by mail-wr1-x42e.google.com with SMTP id n6so2199621wrm.13 for ; Fri, 23 Oct 2020 07:58:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kwBfRLIMtYcJfYNBrMa04rkg4sHfbGqiCDb5zf43pJM=; b=WwfIqFesm+IRbowElZ8H4pIxc9zHXHygF/CTSeaq2T3fkaih6wsR0R7zi1EQKa1SzE S28PQIzMnULObO2t3IDUWI96kEkjkfHnJ1UqrHt7DVu28PoWv3xWaGzozOQPcMIcFhCo 4ivjh9tw26VdanrYmK3A1x/nwHurSBHv3RW5DqGVUiFisz9V5uu2zPWOblEkPozBITjT /sG+7nR3FjdmfQXjkc53U0fBKEinx+TjgpGHCibvWQmFAr2l02l2VE0KEFL0v0DvGMKg 3CsJnAHAsFZxFrA6LtaNN70vM5srsH1umHfTztMSLXFiQHrncJQ82TdSc1MiYvW9gzVO mBEw== X-Gm-Message-State: AOAM5316SdeFWSBbTA15QP9/4Fv2Dj3hph50LGIMMtDEBDYCwslp70ZU Txi5TuSEKvGVmWzjUr2U1vw= X-Google-Smtp-Source: ABdhPJw8L1HkbA28/9VTvd2PjhSz4vxakHxN35sw/IUvL0KzXAlIF+lR8AAS+yRL+uYj8QaoxbA+wA== X-Received: by 2002:adf:fac3:: with SMTP id a3mr2923267wrs.240.1603465115312; Fri, 23 Oct 2020 07:58:35 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:34 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 06/11] queue.3: ffix Date: Fri, 23 Oct 2020 16:57:32 +0200 Message-Id: <20201023145736.102750-7-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/queue.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/queue.3 b/man3/queue.3 index 26e304b2f..79cdca318 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -76,8 +76,8 @@ .Nm TAILQ_LAST , .Nm TAILQ_NEXT , .Nm TAILQ_PREV , -.Nm TAILQ_REMOVE , -.\" .Nm TAILQ_SWAP , +.Nm TAILQ_REMOVE +.\" .Nm TAILQ_SWAP .Nd implementations of singly-linked lists, singly-linked tail queues, lists, tail queues, and circular queues .Sh SYNOPSIS From patchwork Fri Oct 23 14:57:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40835 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E0FCB398B41D; Fri, 23 Oct 2020 14:58:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0FCB398B41D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465120; bh=e2jGTJzns2qxsnnJgD3L2G3N9gs9XZ2JKEkJ9j/5IOo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=T/TyFGqi/dWA/JOSL1dB1uYfrbmeiByqyTBpW1a02PsHBp8dQljXVoXcvwmEIk0Fn OuRtILniIXiWd/Vh8EkU+7qXulZqSQfNvyYcl2qfsedBxbLsUe0NWB+hr1vYDe+SGa nF/iy354EDVr0PvGYr6xiYxytqO13FYc8fZpE8sQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by sourceware.org (Postfix) with ESMTPS id DFE89398B418 for ; Fri, 23 Oct 2020 14:58:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DFE89398B418 Received: by mail-wr1-x444.google.com with SMTP id n15so2244838wrq.2 for ; Fri, 23 Oct 2020 07:58:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e2jGTJzns2qxsnnJgD3L2G3N9gs9XZ2JKEkJ9j/5IOo=; b=RsYnUuL0anRVqf9hLS79/qxDPN1bChrybw6kUnzvMtDxk9nF5feSYZIW+NSQtrYoJ/ bsrTfMIqs2u9o3eAQzMNJuKRECeV6v37M1iLfjTs1zkgK0l9qNv4SCm+wYYxSMhtIoZc ULxDfvpzXZoSeyDMF37EVnhXZLIDPnxVpDoHGPiCnQuKqbzRv5z67iwUI2zfbgZ0mq6G yw6XZVyQRqkEKd7+NKS5R+/2wlKzGniDKCZ8TNMYvsc9wVidMhpj7AGyJtmmSAfnceYX kCVa+yEdwwgwzjPwaYbQot6yoULrU+D9Ba8O6NYdvAd89dr5cXkdqJiYHik8kHNfREV4 EHZg== X-Gm-Message-State: AOAM532ZA42pvgwcp3FnLNkFtJ1ADazYVNH24aQvwqNMbbBPEiOcVkvq pZQPvXEFeAYdPjIbs0LqiOXpGprAqsQ= X-Google-Smtp-Source: ABdhPJzNIvB3kflJ2cUpyTtrWw6d0S7dJM4ubmijvec+H4N7QXMafhOCPCzQGw9L9OYlljDMWMro5Q== X-Received: by 2002:a5d:448b:: with SMTP id j11mr2974299wrq.129.1603465118079; Fri, 23 Oct 2020 07:58:38 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:37 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 07/11] circleq.3: Copy and adapt code from queue.3 Date: Fri, 23 Oct 2020 16:57:33 +0200 Message-Id: <20201023145736.102750-8-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/man3/circleq.3 b/man3/circleq.3 index 2d683b441..491e1ec91 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -50,6 +50,8 @@ .Nm CIRCLEQ_PREV , .Nm CIRCLEQ_REMOVE .SH SYNOPSIS +.In sys/queue.h +.\" .Fn CIRCLEQ_EMPTY "CIRCLEQ_HEAD *head" .Fn CIRCLEQ_ENTRY "TYPE" .Fn CIRCLEQ_FIRST "CIRCLEQ_HEAD *head" @@ -69,6 +71,18 @@ .Fn CIRCLEQ_PREV "TYPE *elm" "CIRCLEQ_ENTRY NAME" .Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" .SH DESCRIPTION +In the macro definitions, +.Fa TYPE +is the name of a user-defined structure, +that must contain a field of type +.Li CIRCLEQ_ENTRY , +named +.Fa NAME . +The argument +.Fa HEADNAME +is the name of a user-defined structure that must be declared +using the macro +.Li CIRCLEQ_HEAD . .Ss Circular queues A circular queue is headed by a structure defined by the .Nm CIRCLEQ_HEAD @@ -208,6 +222,10 @@ removes the element from the circular queue. .SH RETURN VALUE .SH CONFORMING TO +Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. +Present on the BSDs +(CIRCLEQ macros first appeared in +.Bx 4.4 ). .SH BUGS .SH EXAMPLES .Ss Circular queue example @@ -227,9 +245,9 @@ CIRCLEQ_HEAD(circlehead, entry); int main(void) { - struct entry *n1, *n2, *n3, *np; + struct entry *n1, *n2, *n3, *np; struct circlehead head; /* Queue head. */ - int i; + int i; CIRCLEQ_INIT(&head); /* Initialize the queue. */ From patchwork Fri Oct 23 14:57:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40836 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E790398B415; Fri, 23 Oct 2020 14:58:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E790398B415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465123; bh=5VzGfuCRBYUPOGammsGiC1iF//89ugYSH/Et8T9RNHg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=us2mvdRvxWMh9szZEMlj0Zh7tNhS5MvPInFy0uby/XSazx36KIEbVPlcxCvRC+YvN QouNWOPFY8yhXTuDVv71VahjGbx/vfSV8Dx7qPO2wNhvn7FZHnh4MTZCAd7v1+mB5I FVcpWMXRsP6h2XgyXn93lqGD+fLkzLjwelc9BLMY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by sourceware.org (Postfix) with ESMTPS id 3A5AF398B41C for ; Fri, 23 Oct 2020 14:58:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3A5AF398B41C Received: by mail-wr1-x441.google.com with SMTP id h7so2235461wre.4 for ; Fri, 23 Oct 2020 07:58:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5VzGfuCRBYUPOGammsGiC1iF//89ugYSH/Et8T9RNHg=; b=gJYpbpRjoqpj39xgQNWdiOZ9L6YSe7Msg9HJ+AT1JAiIRzuy+fdKfFIi1zuEjo37u7 ZQKigqvgpZp4bLeRrVkISREO2vcYwvdUlTCGu8DBKFqhk1mj+I318KfEuhkthTn0Vy4c JPMCAuJ+Mc5Pi0eYMf892H/C9iFc1HDwYXWKohOM6aVWf+13h15gIfJ1dYiaSTgZLPbv WNKOe+JLkZ9o5RFMsSbwAkH3ZR21UPiH3FhSOgbsnVwvLTUA69ORMDA1N38b8Dhh5Syx YUVS7QOJFm2W1tqzFTxglM5LADiT2OcjgReSDJOudsywV9xMHB2UMYOw9e627hmDIUnx WoUQ== X-Gm-Message-State: AOAM532rG1o9NeoEU68KYgfG/m/evEHzJLw9pqq2ECxtfDmKK6ROA59y /hsjkl0ZJzoYL1bVgVGSE64= X-Google-Smtp-Source: ABdhPJzV9nwRrkHha8OjG1tcYRzsaO4g+lv8ucucgLMttOk9vmui+qGiFxzDX9+cOkF/3R30UAmTJw== X-Received: by 2002:adf:c3c6:: with SMTP id d6mr3108171wrg.206.1603465119281; Fri, 23 Oct 2020 07:58:39 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:38 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 08/11] circleq.3: ffix: Use man markup Date: Fri, 23 Oct 2020 16:57:34 +0200 Message-Id: <20201023145736.102750-9-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 257 +++++++++++++++++++++++++++---------------------- 1 file changed, 143 insertions(+), 114 deletions(-) diff --git a/man3/circleq.3 b/man3/circleq.3 index 491e1ec91..f24df2e15 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -31,61 +31,86 @@ .\" .TH CIRCLEQ 3 2020-10-21 "GNU" "Linux Programmer's Manual" .SH NAME -.Nm CIRCLEQ_EMPTY , -.Nm CIRCLEQ_ENTRY , -.Nm CIRCLEQ_FIRST , -.Nm CIRCLEQ_FOREACH , -.Nm CIRCLEQ_FOREACH_REVERSE , -.Nm CIRCLEQ_HEAD , -.Nm CIRCLEQ_HEAD_INITIALIZER , -.Nm CIRCLEQ_INIT , -.Nm CIRCLEQ_INSERT_AFTER , -.Nm CIRCLEQ_INSERT_BEFORE , -.Nm CIRCLEQ_INSERT_HEAD , -.Nm CIRCLEQ_INSERT_TAIL , -.Nm CIRCLEQ_LAST , -.Nm CIRCLEQ_LOOP_NEXT , -.Nm CIRCLEQ_LOOP_PREV , -.Nm CIRCLEQ_NEXT , -.Nm CIRCLEQ_PREV , -.Nm CIRCLEQ_REMOVE +CIRCLEQ_EMPTY, +CIRCLEQ_ENTRY, +CIRCLEQ_FIRST, +CIRCLEQ_FOREACH, +CIRCLEQ_FOREACH_REVERSE, +CIRCLEQ_HEAD, +CIRCLEQ_HEAD_INITIALIZER, +CIRCLEQ_INIT, +CIRCLEQ_INSERT_AFTER, +CIRCLEQ_INSERT_BEFORE, +CIRCLEQ_INSERT_HEAD, +CIRCLEQ_INSERT_TAIL, +CIRCLEQ_LAST, +CIRCLEQ_LOOP_NEXT, +CIRCLEQ_LOOP_PREV, +CIRCLEQ_NEXT, +CIRCLEQ_PREV, +CIRCLEQ_REMOVE .SH SYNOPSIS -.In sys/queue.h -.\" -.Fn CIRCLEQ_EMPTY "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_ENTRY "TYPE" -.Fn CIRCLEQ_FIRST "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_FOREACH "TYPE *var" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_FOREACH_REVERSE "TYPE *var" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_HEAD "HEADNAME" "TYPE" -.Fn CIRCLEQ_HEAD_INITIALIZER "CIRCLEQ_HEAD head" -.Fn CIRCLEQ_INIT "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_INSERT_AFTER "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_INSERT_BEFORE "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_INSERT_HEAD "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_LAST "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_LOOP_NEXT "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_LOOP_PREV "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_NEXT "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_PREV "TYPE *elm" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.nf +.B #include +.PP +.BI "int CIRCLEQ_EMPTY(CIRCLEQ_HEAD *" head ");" +.PP +.B CIRCLEQ_ENTRY(TYPE); +.PP +.BI "CIRCLEQ_ENTRY *CIRCLEQ_FIRST(CIRCLEQ_HEAD *" head ");" +.PP +.BI "CIRCLEQ_FOREACH(TYPE *" var ", CIRCLEQ_HEAD *" head ", CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "CIRCLEQ_FOREACH_REVERSE(TYPE *" var ", CIRCLEQ_HEAD *" head "," +.BI " CIRCLEQ_ENTRY " NAME ");" +.PP +.B CIRCLEQ_HEAD(HEADNAME, TYPE); +.PP +.BI "CIRCLEQ_HEAD CIRCLEQ_HEAD_INITIALIZER(CIRCLEQ_HEAD " head ");" +.PP +.BI "void CIRCLEQ_INIT(CIRCLEQ_HEAD *" head ");" +.PP +.BI "void CIRCLEQ_INSERT_AFTER(CIRCLEQ_HEAD *" head ", TYPE *" listelm ", TYPE *" elm "," +.BI " CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "void CIRCLEQ_INSERT_BEFORE(CIRCLEQ_HEAD *" head ", TYPE *" listelm ", TYPE *" elm "," +.BI " CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "void CIRCLEQ_INSERT_HEAD(CIRCLEQ_HEAD *" head ", TYPE *" elm "," +.BI " CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "void CIRCLEQ_INSERT_TAIL(CIRCLEQ_HEAD *" head ", TYPE *" elm "," +.BI " CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "CIRCLEQ_ENTRY *CIRCLEQ_LAST(CIRCLEQ_HEAD *" head ");" +.PP +.BI "void CIRCLEQ_LOOP_NEXT(CIRCLEQ_HEAD *" head ", TYPE *" elm "," +.BI " CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "void CIRCLEQ_LOOP_PREV(CIRCLEQ_HEAD *" head ", TYPE *" elm "," +.BI " CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "CIRCLEQ_ENTRY *CIRCLEQ_NEXT(TYPE *" elm ", CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "CIRCLEQ_ENTRY *CIRCLEQ_PREV(TYPE *" elm ", CIRCLEQ_ENTRY " NAME ");" +.PP +.BI "void CIRCLEQ_REMOVE(CIRCLEQ_HEAD *" head ", TYPE *" elm ", CIRCLEQ_ENTRY " NAME ");" .SH DESCRIPTION In the macro definitions, -.Fa TYPE +.I TYPE is the name of a user-defined structure, that must contain a field of type -.Li CIRCLEQ_ENTRY , +.IR CIRCLEQ_ENTRY , named -.Fa NAME . +.IR NAME . The argument -.Fa HEADNAME +.I HEADNAME is the name of a user-defined structure that must be declared using the macro -.Li CIRCLEQ_HEAD . -.Ss Circular queues +.BR CIRCLEQ_HEAD (). +.PP A circular queue is headed by a structure defined by the -.Nm CIRCLEQ_HEAD +.BR CIRCLEQ_HEAD () macro. This structure contains a pair of pointers, one to the first element in the circular queue and the other to @@ -96,140 +121,144 @@ New elements can be added to the circular queue after an existing element, before an existing element, at the head of the circular queue, or at the end of the circular queue. A -.Fa CIRCLEQ_HEAD +.I CIRCLEQ_HEAD structure is declared as follows: -.Bd -literal -offset indent +.PP +.in +4 +.EX CIRCLEQ_HEAD(HEADNAME, TYPE) head; -.Ed -.Pp +.EE +.in +.PP where -.Li HEADNAME +.I HEADNAME is the name of the structure to be defined, and -.Li TYPE +.I TYPE is the type of the elements to be linked into the circular queue. A pointer to the head of the circular queue can later be declared as: -.Bd -literal -offset indent +.PP +.in +4 +.EX struct HEADNAME *headp; -.Ed -.Pp +.EE +.in +.PP (The names -.Li head +.I head and -.Li headp +.I headp are user selectable.) -.Pp +.PP The macro -.Nm CIRCLEQ_HEAD_INITIALIZER +.BR CIRCLEQ_HEAD_INITIALIZER () evaluates to an initializer for the circular queue -.Fa head . -.Pp +.IR head . +.PP The macro -.Nm CIRCLEQ_EMPTY +.BR CIRCLEQ_EMPTY () evaluates to true if there are no items on the circular queue. -.Pp +.PP The macro -.Nm CIRCLEQ_ENTRY +.BR CIRCLEQ_ENTRY () declares a structure that connects the elements in the circular queue. -.Pp +.PP The macro -.Nm CIRCLEQ_FIRST +.BR CIRCLEQ_FIRST () returns the first item on the circular queue. -.Pp +.PP The macro -.Nm CIRCLEQ_FOREACH +.BR CIRCLEQ_FOREACH () traverses the circular queue referenced by -.Fa head +.I head in the forward direction, assigning each element in turn to -.Fa var . -.Fa var +.IR var . +.I var is set to -.Fa &head +.I &head if the loop completes normally, or if there were no elements. -.Pp +.PP The macro -.Nm CIRCLEQ_FOREACH_REVERSE +.BR CIRCLEQ_FOREACH_REVERSE () traverses the circular queue referenced by -.Fa head +.I head in the reverse direction, assigning each element in turn to -.Fa var . -.Pp +.IR var . +.PP The macro -.Nm CIRCLEQ_INIT +.BR CIRCLEQ_INIT () initializes the circular queue referenced by -.Fa head . -.Pp +.IR head . +.PP The macro -.Nm CIRCLEQ_INSERT_HEAD +.BR CIRCLEQ_INSERT_HEAD () inserts the new element -.Fa elm +.I elm at the head of the circular queue. -.Pp +.PP The macro -.Nm CIRCLEQ_INSERT_TAIL +.BR CIRCLEQ_INSERT_TAIL () inserts the new element -.Fa elm +.I elm at the end of the circular queue. -.Pp +.PP The macro -.Nm CIRCLEQ_INSERT_AFTER +.BR CIRCLEQ_INSERT_AFTER () inserts the new element -.Fa elm +.I elm after the element -.Fa listelm . -.Pp +.IR listelm . +.PP The macro -.Nm CIRCLEQ_INSERT_BEFORE +.BR CIRCLEQ_INSERT_BEFORE () inserts the new element -.Fa elm +.I elm before the element -.Fa listelm . -.Pp +.IR listelm . +.PP The macro -.Nm CIRCLEQ_LAST +.BR CIRCLEQ_LAST () returns the last item on the circular queue. -.Pp +.PP The macro -.Nm CIRCLEQ_NEXT +.BR CIRCLEQ_NEXT () returns the next item on the circular queue, or -.Fa &head +.I &head if this item is the last one. -.Pp +.PP The macro -.Nm CIRCLEQ_PREV +.BR CIRCLEQ_PREV () returns the previous item on the circular queue, or -.Fa &head +.I &head if this item is the first one. -.Pp +.PP The macro -.Nm CIRCLEQ_LOOP_NEXT +.BR CIRCLEQ_LOOP_NEXT () returns the next item on the circular queue. If -.Fa elm +.I elm is the last element on the circular queue, the first element is returned. -.Pp +.PP The macro -.Nm CIRCLEQ_LOOP_PREV +.BR CIRCLEQ_LOOP_PREV () returns the previous item on the circular queue. If -.Fa elm +.I elm is the first element on the circular queue, the last element is returned. -.Pp +.PP The macro -.Nm CIRCLEQ_REMOVE +.BR CIRCLEQ_REMOVE () removes the element -.Fa elm +.I elm from the circular queue. .SH RETURN VALUE .SH CONFORMING TO Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs -(CIRCLEQ macros first appeared in -.Bx 4.4 ). +(CIRCLEQ macros first appeared in 4.4BSD). .SH BUGS .SH EXAMPLES -.Ss Circular queue example -.Bd -literal +.EX #include #include #include @@ -283,5 +312,5 @@ main(void) exit(EXIT_SUCCESS); } -.Ed +.EE .SH SEE ALSO From patchwork Fri Oct 23 14:57:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40837 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 72ACE398B40C; Fri, 23 Oct 2020 14:58:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72ACE398B40C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465125; bh=RA2cgou76aLG1+Nr31OGCvvzP33YbHf4EzF7HYRVS1M=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Q0F97q6nKTHosJ+4F6UDLWTVV7SZcUbw0JlouYaUE3DJkx7ofQlKA9ECsW49MWKKU vrilaSi8Hd0oVUqWmbhFWOeTHZQKvf7OAN6ceAmx3J1gqyyPgKM9HeWYVgglB+Nwwe 4rQRuAE82+juzTZkli08gO27EtwBp4rZ2IHBBeMo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by sourceware.org (Postfix) with ESMTPS id 71213398B420 for ; Fri, 23 Oct 2020 14:58:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 71213398B420 Received: by mail-wr1-x441.google.com with SMTP id b8so2242136wrn.0 for ; Fri, 23 Oct 2020 07:58:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RA2cgou76aLG1+Nr31OGCvvzP33YbHf4EzF7HYRVS1M=; b=SxkyjFg8ZpNDnf+v5UJLZsrGfWzm7g+k6C/kW+/OxUPu8QmYNXsmCJ2oEiqiidQYVV gHYyy8n83ZOmSkQPlQg0O84sKg0eXT0UsJDqdfTJhcuk9SDNldpu1ahxhnmKU1wn0yTY gaBiELcIuDhB5K9koMfAkcw4u58II+UxRlezA/cL1xLweMTea4wLsWOtBOFK3jbwVk0B XAvPLrzghkptb+EWcJQ3bx6aLCPAUhPpRwbhWGSn2oeGComkWRUqPyfcvy5NyDKZBBaS oezZ7V1VH3UhNYPmQTXdaFjrVZzq40HifnsBlGHreYl4Ey//0/b7lXHUgpVqknOXdCar CviQ== X-Gm-Message-State: AOAM530K3AxIjnEQsq0W4sV0d5p7H6VgapdOEqJTrJLgoj/RLPqMsZ50 Ub3erkS5P+Fd1OdBr1yHAYXAXdWg9tI= X-Google-Smtp-Source: ABdhPJyN1N9xM0+WfNRkVLWKc8UepcDi7fBRVomcJFwu+aXwKxOKOVCtlP3TuZdBS7MwA9Py3b5RUg== X-Received: by 2002:adf:a557:: with SMTP id j23mr3195960wrb.95.1603465120592; Fri, 23 Oct 2020 07:58:40 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:39 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 09/11] circleq.3: Add remaining details to complete the page Date: Fri, 23 Oct 2020 16:57:35 +0200 Message-Id: <20201023145736.102750-10-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/circleq.3 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/man3/circleq.3 b/man3/circleq.3 index f24df2e15..33215be77 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -49,6 +49,7 @@ CIRCLEQ_LOOP_PREV, CIRCLEQ_NEXT, CIRCLEQ_PREV, CIRCLEQ_REMOVE +\- implementation of a double-linked circular queue .SH SYNOPSIS .nf .B #include @@ -96,6 +97,8 @@ CIRCLEQ_REMOVE .PP .BI "void CIRCLEQ_REMOVE(CIRCLEQ_HEAD *" head ", TYPE *" elm ", CIRCLEQ_ENTRY " NAME ");" .SH DESCRIPTION +These macros define and operate on doubly-linked circular queues. +.PP In the macro definitions, .I TYPE is the name of a user-defined structure, @@ -252,11 +255,44 @@ removes the element .I elm from the circular queue. .SH RETURN VALUE +.BR CIRCLEQ_EMPTY () +returns nonzero if the queue is empty, +and zero if the queue contains at least one entry. +.PP +.BR CIRCLEQ_FIRST (), +.BR CIRCLEQ_LAST (), +.BR CIRCLEQ_NEXT (), +and +.BR CIRCLEQ_PREV () +return a pointer to the first, last, next or previous +.I CIRCLEQ_ENTRY +structure, respectively. +.PP +.BR CIRCLEQ_HEAD_INITIALIZER () +returns an initializer that can be assigned to the queue +.IR head . .SH CONFORMING TO Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs (CIRCLEQ macros first appeared in 4.4BSD). .SH BUGS +The macros +.BR CIRCLEQ_FOREACH () +and +.BR CIRCLEQ_FOREACH_REVERSE () +don't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +The macros +.BR CIRCLEQ_FOREACH_SAFE () +and +.BR CIRCLEQ_FOREACH_REVERSE_SAFE (), +which are present on the BSDs but are not present in glibc, +fix this limitation by allowing +.I var +to safely be removed from the list and freed from within the loop +without interfering with the traversal. .SH EXAMPLES .EX #include @@ -314,3 +350,5 @@ main(void) } .EE .SH SEE ALSO +.BR insque (3), +.BR queue (3) From patchwork Fri Oct 23 14:57:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40838 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F06DA398B428; Fri, 23 Oct 2020 14:58:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F06DA398B428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465126; bh=GvNtEr0hfGPwqcb5DRG10TmQezrqwtDlnASbKXbSUZ4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=IpXCTAewQA/evZQUO0D3j/kJ9Kbu8FcGe/CHNlcnsSzJDbnp/ykr6SOxGfUNgWbbC A9lG6QLRl2lw/QkvIN+DxHav8rlKizPbhrYUIRhiT065eCnueR0kvwGCvxJyywSsX9 nCP+2ceBdA5NqKRhH9C3yAVMD+S7DtehaftIcQ5g= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id BCECD398B40C for ; Fri, 23 Oct 2020 14:58:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BCECD398B40C Received: by mail-wr1-x436.google.com with SMTP id g12so2211444wrp.10 for ; Fri, 23 Oct 2020 07:58:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GvNtEr0hfGPwqcb5DRG10TmQezrqwtDlnASbKXbSUZ4=; b=B57LmU2AJ8eILRpcQlA6qkPuF4iACcYZ+MZ225mGmBryvF8qF+Rz/55VIo0DmayIsX cT+nsraA3m0MqWrqgoGAbWaZKdJhiHgDQgxW9mMY7C/lEUNalVPFoTeCjESH/y5jC11S sJkVxfXER/Od95n8HmGNMGCvdjVI+eeNL+D60G3EcHAQiDQo1sLQ7yXq2YoP3jpWu2Fk Di4DrK29LFVHajdsJphcSyLJ/WRdg97igRg9Dvam/e6wC+5MY43mH+BeedTRXiatY7gV zrDO5HWqalG/iH210wBzwtvwW4ySBo3QwS1iHlKN398gS+MqnKeTVlsj5TRdw/FLSpRC kUfw== X-Gm-Message-State: AOAM530+QNOiXs5mgL2iqsY/CEs6DKp7CYCcSobEf3vDv7d2g7QctbzP kCjDGIi3Ltxj2epul/FZlIY= X-Google-Smtp-Source: ABdhPJwnKpIheRdFoa2NWX1MQrU4n6jsN9tdUnmaf6XWQpqum8CWpRSC4Lspe74fxXPALn0y9LuMyQ== X-Received: by 2002:adf:e942:: with SMTP id m2mr2978914wrn.123.1603465121920; Fri, 23 Oct 2020 07:58:41 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:41 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 10/11] CIRCLEQ_ENTRY.3, CIRCLEQ_HEAD.3, CIRCLEQ_INIT.3, CIRCLEQ_INSERT_AFTER.3, CIRCLEQ_INSERT_BEFORE.3, CIRCLEQ_INSERT_HEAD.3, CIRCLEQ_INSERT_TAIL.3, CIRCLEQ_REMOVE.3: Link to the new circleq(3) page instead of queue(3) Date: Fri, 23 Oct 2020 16:57:36 +0200 Message-Id: <20201023145736.102750-11-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/CIRCLEQ_ENTRY.3 | 2 +- man3/CIRCLEQ_HEAD.3 | 2 +- man3/CIRCLEQ_INIT.3 | 2 +- man3/CIRCLEQ_INSERT_AFTER.3 | 2 +- man3/CIRCLEQ_INSERT_BEFORE.3 | 2 +- man3/CIRCLEQ_INSERT_HEAD.3 | 2 +- man3/CIRCLEQ_INSERT_TAIL.3 | 2 +- man3/CIRCLEQ_REMOVE.3 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/man3/CIRCLEQ_ENTRY.3 b/man3/CIRCLEQ_ENTRY.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_ENTRY.3 +++ b/man3/CIRCLEQ_ENTRY.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 diff --git a/man3/CIRCLEQ_HEAD.3 b/man3/CIRCLEQ_HEAD.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_HEAD.3 +++ b/man3/CIRCLEQ_HEAD.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 diff --git a/man3/CIRCLEQ_INIT.3 b/man3/CIRCLEQ_INIT.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_INIT.3 +++ b/man3/CIRCLEQ_INIT.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 diff --git a/man3/CIRCLEQ_INSERT_AFTER.3 b/man3/CIRCLEQ_INSERT_AFTER.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_INSERT_AFTER.3 +++ b/man3/CIRCLEQ_INSERT_AFTER.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 diff --git a/man3/CIRCLEQ_INSERT_BEFORE.3 b/man3/CIRCLEQ_INSERT_BEFORE.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_INSERT_BEFORE.3 +++ b/man3/CIRCLEQ_INSERT_BEFORE.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 diff --git a/man3/CIRCLEQ_INSERT_HEAD.3 b/man3/CIRCLEQ_INSERT_HEAD.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_INSERT_HEAD.3 +++ b/man3/CIRCLEQ_INSERT_HEAD.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 diff --git a/man3/CIRCLEQ_INSERT_TAIL.3 b/man3/CIRCLEQ_INSERT_TAIL.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_INSERT_TAIL.3 +++ b/man3/CIRCLEQ_INSERT_TAIL.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 diff --git a/man3/CIRCLEQ_REMOVE.3 b/man3/CIRCLEQ_REMOVE.3 index c2956c9fc..ed0fc9a3b 100644 --- a/man3/CIRCLEQ_REMOVE.3 +++ b/man3/CIRCLEQ_REMOVE.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/circleq.3 From patchwork Fri Oct 23 14:57:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40839 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 95C87398B421; Fri, 23 Oct 2020 14:58:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95C87398B421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603465128; bh=+noYP55vNXPy60yLQtlot+rN6iVyBtr5iK6P20cg/0E=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=YUjoHlD9qzzPabOqr+CnAzVS+xx/sKPl+8+mZ/+6NRotdpV74O8Cqvg9hrmKkWbrA 95hRKZJJDg104piIvvzyqxwnjXi/vDyyCuYjEwIq0OtxOpO7bMrSF/coJZKcAqLUGP FpSf9VYdI0W5LxdcUGsRzt+Dn+SSRGTVcgUwXzM4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by sourceware.org (Postfix) with ESMTPS id 146B8398B40C for ; Fri, 23 Oct 2020 14:58:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 146B8398B40C Received: by mail-wr1-x444.google.com with SMTP id y12so2221460wrp.6 for ; Fri, 23 Oct 2020 07:58:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+noYP55vNXPy60yLQtlot+rN6iVyBtr5iK6P20cg/0E=; b=Qi+PvVdS6QdlWlMhZc0p4FNngCi2sxRmzO92p7XRogMZi9VtRo4DlGhpWskyiOKx6X +FHbUy09WYhHk7QbHVIOaZbZtxqQ+AUMt3IB999Jn7tQtcL2Gclod8FI8B9Q+H6lFvsb inHI6VkwSvXTUurxa6jGTA6hflLS0KpoVYXN0Tu+xpWxMK2gs3+lK+PRSIMTOaXQ9nyk BBTSbXGy4Hq9koFMa97rHAIqooEzjMan1YdALDI8L19kt+nP7k/YWObaOs94+pb0ZAgA a2ApOl1KLLvkYA5sAy2Z/KtfJvTMM2aok9OWgpp0dSTlUDcrcCjoSWgD0YAUFltCNg1O cAuw== X-Gm-Message-State: AOAM532s34nR/lZwJ1AlSEQyylLIPDpfSDtIuj+R1CB5kUC+UvdqakZB e6X0SuvzYeCmFO92ENI9P4o1uv9wzl8= X-Google-Smtp-Source: ABdhPJxlzHltiDSWVSEI+Hrcp8RqG7TdoHwRx3iSpqO8fS4gcz2Z4+f4GPiNG8Pd9QXRia+Gfh4FyA== X-Received: by 2002:adf:fac3:: with SMTP id a3mr2923752wrs.240.1603465123209; Fri, 23 Oct 2020 07:58:43 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m8sm3755268wrw.17.2020.10.23.07.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:58:42 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 11/11] queue.3: SEE ALSO: Add circleq(3) Date: Fri, 23 Oct 2020 16:57:37 +0200 Message-Id: <20201023145736.102750-12-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com> References: <20201023145736.102750-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/queue.3 | 1 + 1 file changed, 1 insertion(+) diff --git a/man3/queue.3 b/man3/queue.3 index 79cdca318..0c57f8ef6 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -798,6 +798,7 @@ Present on the BSDs. functions first appeared in .Bx 4.4 . .Sh SEE ALSO +.Xr circleq 3 .Xr insque 3 .Xr list 3 .Xr slist 3