From patchwork Thu Oct 22 12:38:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40813 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 639A63971C20; Thu, 22 Oct 2020 12:38:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 639A63971C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370335; bh=4RD0Ms86p14aql5dD7Y/pXQk5G6LCzhe3j13b77RVtw=; 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=KKOSJqHhVElLNu9/XwJRRoehh4kMjyO6COZGqQvAYBHq1Ji0qBNdGWYew1j3xoF1F AXerFmeMCM2IlwXHkQDZ98elf9/w3ie19vhplwMKZon07Y9TThlkCihxU6cBQuS+sx K7YkpLIsP2aj/k/A3XkpgzffbaV8npM+6UvZUlgo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by sourceware.org (Postfix) with ESMTPS id 897C93861857 for ; Thu, 22 Oct 2020 12:38:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 897C93861857 Received: by mail-wm1-x342.google.com with SMTP id c77so1894962wmd.4 for ; Thu, 22 Oct 2020 05:38:52 -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=4RD0Ms86p14aql5dD7Y/pXQk5G6LCzhe3j13b77RVtw=; b=gtq/1donm0kum0s9MDXnYIB3FxnVipKZLlDPO6ehNW5b9+rB6jYUAFLlBKwJYDH4Uw lIKkbnsUsElq7jtKhtLFTIrhbho4nP1m8Zfu95Y/qXxzEWMP63BrZKZBfX4ybsR3akac nIuTX3u2ty9883+TEfk97IsfmpAF2vQnn6g5bFQIHv1yCqEWCBtLQXaQJa94jR+jE2WG J0SKrKGhgA40QJOawMcQmmwRsvpNECZMFLlTEmQrCiN+pAiq6yBqYGjI1KgbJ+VNtre+ jVGarBYObMj06tyuUC3hMhcPkK0Ixh4rPw0VMx4Y0GKEzxeWWmrLUy3BiJh2wvxBBKU8 D2nw== X-Gm-Message-State: AOAM530Dyjj6z5CVrOs02PU1c+5a2QZX+WGSuZLjMJrXO+P+ARtd1Pvl nQD+/nFub1lArA9vdSvHRvk= X-Google-Smtp-Source: ABdhPJwIAhsaAsvvGGTLCMaig0aLolKjI/0Ojj8hM6RDilea0LJ/z+RF6JmEWn+JKBk+c06DHWgeiA== X-Received: by 2002:a1c:7708:: with SMTP id t8mr2341181wmi.6.1603370331718; Thu, 22 Oct 2020 05:38:51 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:51 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 01/10] slist.3: New page that will hold the (slist) contents of queue.3 Date: Thu, 22 Oct 2020 14:38:13 +0200 Message-Id: <20201022123821.22602-2-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.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 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/slist.3 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 man3/slist.3 diff --git a/man3/slist.3 b/man3/slist.3 new file mode 100644 index 000000000..20058a9c6 --- /dev/null +++ b/man3/slist.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 SLIST 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 Thu Oct 22 12:38:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40814 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 E6DF83840C27; Thu, 22 Oct 2020 12:38:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6DF83840C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370336; bh=zho/+hW9/797Qkyu3gN2/D8HZ9CGagzjLzojN3oXPJM=; 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=HDGLsDbKW4wK45ZV9lvI6kuD8JEBkwx7Tq5ND6upgiWJUNhFJk8kKF+htslP5E8YZ cAvleuM2TXw5uQZWxLfT/7hWR1WsnkIuuXJ+eGLu1k5UAZTVSxY1LgjLTV75p4g6lQ 6Bg6PPzzGx9OfFcOgxVB7/53RbduMpcvjL58m5rI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 7952E386F42D for ; Thu, 22 Oct 2020 12:38:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7952E386F42D Received: by mail-wr1-x435.google.com with SMTP id e17so2174209wru.12 for ; Thu, 22 Oct 2020 05:38:53 -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=zho/+hW9/797Qkyu3gN2/D8HZ9CGagzjLzojN3oXPJM=; b=EraqmRBHv0LVf1wRW3QP4tqTE3hGZUKJ64tWQJaMJHRHog4XOhIgKRWkMJGHj1ac5Q M+WEN3vE3U8KsavBMEidZ/oVen+D98s7euUeWorRVTQjBWZr388kDUDWyl0AFFh+OHBG 7A6+pN8K3rYZxJl0/XFQyjmtqGnXw1eAfH7ngk+ZWdjKeWMhRCaTC7bjcapvxMm3iphk lafABJqK9P4F4mohxUEJesXRT+1yVxnoJXkjGNX8/HUs97KtiCI3ZPJVKzqCvjIp3lqQ EYnGFEIJqpwBOjYKL2J+DGsdDwp/X0pRGTGh5RlcwqeEOaJ7j8gZ4J8ahdk8DmW5hu4d hcPw== X-Gm-Message-State: AOAM530tq/J70RC6S1nzY7ZcChTEIrS1NATebJBc9OcpFZYoC5tyg3qp uoJf2cFczp8HtcLR0b2BJ7w= X-Google-Smtp-Source: ABdhPJzOSCu0Ze49vRb8PrwxyESe75zQM5eDLt0zhzy1emvLFj7xDkQVIDU6oO/UgQoGqS04sMEaEQ== X-Received: by 2002:adf:8bd4:: with SMTP id w20mr2475672wra.391.1603370332640; Thu, 22 Oct 2020 05:38:52 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:52 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 02/10] queue.3, slist.3: NAME: Move code from queue.3 to slist.3 Date: Thu, 22 Oct 2020 14:38:14 +0200 Message-Id: <20201022123821.22602-3-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 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/queue.3 | 17 ----------------- man3/slist.3 | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/man3/queue.3 b/man3/queue.3 index 90fd3db0e..8fc10892a 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -34,23 +34,6 @@ .Dt QUEUE 3 .Os .Sh NAME -.Nm SLIST_EMPTY , -.Nm SLIST_ENTRY , -.Nm SLIST_FIRST , -.Nm SLIST_FOREACH , -.\" .Nm SLIST_FOREACH_FROM , -.\" .Nm SLIST_FOREACH_SAFE , -.\" .Nm SLIST_FOREACH_FROM_SAFE , -.Nm SLIST_HEAD , -.Nm SLIST_HEAD_INITIALIZER , -.Nm SLIST_INIT , -.Nm SLIST_INSERT_AFTER , -.Nm SLIST_INSERT_HEAD , -.Nm SLIST_NEXT , -.\" .Nm SLIST_REMOVE_AFTER , -.Nm SLIST_REMOVE_HEAD , -.Nm SLIST_REMOVE , -.\" .Nm SLIST_SWAP , .Nm STAILQ_CONCAT , .Nm STAILQ_EMPTY , .Nm STAILQ_ENTRY , diff --git a/man3/slist.3 b/man3/slist.3 index 20058a9c6..d2f1fac66 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -31,6 +31,23 @@ .\" .TH SLIST 3 2020-10-21 "GNU" "Linux Programmer's Manual" .SH NAME +.Nm SLIST_EMPTY , +.Nm SLIST_ENTRY , +.Nm SLIST_FIRST , +.Nm SLIST_FOREACH , +.\" .Nm SLIST_FOREACH_FROM , +.\" .Nm SLIST_FOREACH_SAFE , +.\" .Nm SLIST_FOREACH_FROM_SAFE , +.Nm SLIST_HEAD , +.Nm SLIST_HEAD_INITIALIZER , +.Nm SLIST_INIT , +.Nm SLIST_INSERT_AFTER , +.Nm SLIST_INSERT_HEAD , +.Nm SLIST_NEXT , +.\" .Nm SLIST_REMOVE_AFTER , +.Nm SLIST_REMOVE_HEAD , +.Nm SLIST_REMOVE , +.\" .Nm SLIST_SWAP , .SH SYNOPSIS .SH DESCRIPTION .SH RETURN VALUE From patchwork Thu Oct 22 12:38:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40815 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 7F4EC398403F; Thu, 22 Oct 2020 12:38:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F4EC398403F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370337; bh=cJH66i8JbJ5zqp7/bgVDCo9vmeEg1eg288jzzpJqt1s=; 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=yRyd6t3hOD7GAaztCIREE1xsDitX4VLYr1+pZP8i1ptQ3JzH9UVqzt73i4OZEURjb tj3DBVMQmkhys7C7ZcQlQ7yjtQ5RWtQPXp3VYryc9t+nAFWNgapAZouGgLIMp9vevZ YHeOOiKmhYzz8ULB74TEELsWlfplt751rJwSWFro= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 75A943840C27 for ; Thu, 22 Oct 2020 12:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 75A943840C27 Received: by mail-wr1-x429.google.com with SMTP id x7so2199478wrl.3 for ; Thu, 22 Oct 2020 05:38:54 -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=cJH66i8JbJ5zqp7/bgVDCo9vmeEg1eg288jzzpJqt1s=; b=JW6uIURzt7EGXOxlDx/+ocriWM/d9/l7NyGwfZ/OvEAuhUByOOQoHafG69GnO8kIWX P+zzTupBvhVsyAYh1IrPYHzjC/DAtNZ3zH5r4FSmI6IkhNEjdKoZTvpzjJc5a4hv4OKc yx7iPfsoV8vQBZ0i5JCZFhx6H3gIzePXbJRSv6NG+D2fOK3ufoj49DYxN+VSkNwqZZwc fZ4JNHTrxZywsLP3ijCqx5Cc4KvFKjXEjitQNZAdMiTIUJk+wYKMMSvcpJjGUS5PpLth lc6jizBqBRrRA+C+Hdqhj5IgjISwgV6/YmNibI+a1gHNZ+e//2Xi3lv/wvdViV6byIWE NL9w== X-Gm-Message-State: AOAM533mZ0u7bKEoPS7pZ99H7G9tJ2RdwY96sjznIrROaPsAQY3a113x Fathyc8u/Obpaq9nlVMnJ3c= X-Google-Smtp-Source: ABdhPJzeCT2Gy8jbHqHKTK6jEssPiCaJM/EiXt2vmQChzOYFd6Jqx0xgsbobYxz9/tzL/VGoOifauw== X-Received: by 2002:adf:97da:: with SMTP id t26mr2459960wrb.321.1603370333616; Thu, 22 Oct 2020 05:38:53 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:53 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 03/10] queue.3, slist.3: SYNOPSIS: Move code from queue.3 to list.3 Date: Thu, 22 Oct 2020 14:38:15 +0200 Message-Id: <20201022123821.22602-4-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 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/queue.3 | 18 ------------------ man3/slist.3 | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/man3/queue.3 b/man3/queue.3 index 8fc10892a..3f8ca65f2 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -101,24 +101,6 @@ lists, tail queues, and circular queues .Sh SYNOPSIS .In sys/queue.h .\" -.Fn SLIST_EMPTY "SLIST_HEAD *head" -.Fn SLIST_ENTRY "TYPE" -.Fn SLIST_FIRST "SLIST_HEAD *head" -.Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.\" .Fn SLIST_FOREACH_FROM "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.\" .Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" -.\" .Fn SLIST_FOREACH_FROM_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" -.Fn SLIST_HEAD "HEADNAME" "TYPE" -.Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" -.Fn SLIST_INIT "SLIST_HEAD *head" -.Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" -.Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" -.Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" -.\" .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" -.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" -.\" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" -.\" .Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" .Fn STAILQ_EMPTY "STAILQ_HEAD *head" .Fn STAILQ_ENTRY "TYPE" diff --git a/man3/slist.3 b/man3/slist.3 index d2f1fac66..48bce3dc4 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -49,6 +49,24 @@ .Nm SLIST_REMOVE , .\" .Nm SLIST_SWAP , .SH SYNOPSIS +.Fn SLIST_EMPTY "SLIST_HEAD *head" +.Fn SLIST_ENTRY "TYPE" +.Fn SLIST_FIRST "SLIST_HEAD *head" +.Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" +.\" .Fn SLIST_FOREACH_FROM "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" +.\" .Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" +.\" .Fn SLIST_FOREACH_FROM_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" +.Fn SLIST_HEAD "HEADNAME" "TYPE" +.Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" +.Fn SLIST_INIT "SLIST_HEAD *head" +.Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" +.\" .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" +.\" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" +.\" .SH DESCRIPTION .SH RETURN VALUE .SH CONFORMING TO From patchwork Thu Oct 22 12:38:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40816 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 103A3398542A; Thu, 22 Oct 2020 12:39:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 103A3398542A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370340; bh=n7JvlAnmqsn7H8yRgMkXvD5VluqbB71IA2UGj8fUiRI=; 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=UFSO0ADEtSEiDgDZLlwg9FLPeAt1r6OspK3+Mp0kTYe26YSoYCUcm/KUS/tf3qP4m Q7U/HrDOgCEH3M3KdMpFeGMe8zwvH2Qk516PfGUp34z6guFJjyHXWjSCcuS4Jqu8ZL L/wf/omCr2krAc2htsPKO+0Psx17969p8myYci5U= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id C3AD939730C4 for ; Thu, 22 Oct 2020 12:38:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C3AD939730C4 Received: by mail-wr1-x442.google.com with SMTP id n6so2164868wrm.13 for ; Thu, 22 Oct 2020 05:38:55 -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=n7JvlAnmqsn7H8yRgMkXvD5VluqbB71IA2UGj8fUiRI=; b=kNr4e8H00Zkg46jgTclacg03Cbk/bLhHYi8jCxZZl5FIFWuVfXK5QePGe9YtWflOtW ioGrbOVcsNyeQj67Kwdc3Kb3vDcTeor4TkcZ0vlpfpqkpDak0+SaiLQKsiACGpnXuhwX zQiExjdYunVaGARczrnBOL7GRdEhLj4LWB+oh+TWuhGsacaeCdVOs2ALOL+PI0iO3xYo bJSi6GgKKaGkmcH83hOfx5m562cTlEuUZPUo4FHQs56szdY1iu5GN5UdXWUxy1lWh1KF avkGmxkrqsUyUU4Gi/fpG5oFozl0aLLSQOCtY31Y4b+PKktozILjn6ibCOuGDMGES2Pd 0y5A== X-Gm-Message-State: AOAM531tNRZJ/7hT3GF7iaB7AtWKuAa6wcLyNJr5oeByw9s4DaAaol14 6HSF/GD+GAvwG29ubwDzhPQ= X-Google-Smtp-Source: ABdhPJxiHJhlnjwebwv7l820Wb4B5+cnz2r/1TrJx0vBZhyVNu339K8gk7hXzEprRmfMLRM0l1eQUg== X-Received: by 2002:adf:9027:: with SMTP id h36mr2456330wrh.163.1603370334624; Thu, 22 Oct 2020 05:38:54 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:54 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 04/10] queue.3, slist.3: DESCRIPTION: Move slist specific code from queue.3 to slist.3 Date: Thu, 22 Oct 2020 14:38:16 +0200 Message-Id: <20201022123821.22602-5-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 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/queue.3 | 155 --------------------------------------------------- man3/slist.3 | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 155 deletions(-) diff --git a/man3/queue.3 b/man3/queue.3 index 3f8ca65f2..cf5ab60b2 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -322,161 +322,6 @@ or .Li CIRCLEQ_HEAD . See the examples below for further explanation of how these macros are used. -.Ss Singly-linked lists -A singly-linked list is headed by a structure defined by the -.Nm SLIST_HEAD -macro. -This structure contains a single pointer to the first element -on the list. -The elements are singly linked for minimum space and pointer manipulation -overhead at the expense of O(n) removal for arbitrary elements. -New elements can be added to the list after an existing element or -at the head of the list. -An -.Fa SLIST_HEAD -structure is declared as follows: -.Bd -literal -offset indent -SLIST_HEAD(HEADNAME, TYPE) head; -.Ed -.Pp -where -.Fa HEADNAME -is the name of the structure to be defined, and -.Fa TYPE -is the type of the elements to be linked into the list. -A pointer to the head of the list 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 SLIST_HEAD_INITIALIZER -evaluates to an initializer for the list -.Fa head . -.Pp -The macro -.Nm SLIST_EMPTY -evaluates to true if there are no elements in the list. -.Pp -The macro -.Nm SLIST_ENTRY -declares a structure that connects the elements in -the list. -.Pp -The macro -.Nm SLIST_FIRST -returns the first element in the list or NULL if the list is empty. -.Pp -The macro -.Nm SLIST_FOREACH -traverses the list referenced by -.Fa head -in the forward direction, assigning each element in -turn to -.Fa var . -.\" .Pp -.\" The macro -.\" .Nm SLIST_FOREACH_FROM -.\" behaves identically to -.\" .Nm SLIST_FOREACH -.\" when -.\" .Fa var -.\" is NULL, else it treats -.\" .Fa var -.\" as a previously found SLIST element and begins the loop at -.\" .Fa var -.\" instead of the first element in the SLIST referenced by -.\" .Fa head . -.\" .Pp -.\" The macro -.\" .Nm SLIST_FOREACH_SAFE -.\" traverses the list referenced by -.\" .Fa head -.\" in the forward direction, assigning each element in -.\" turn to -.\" .Fa var . -.\" However, unlike -.\" .Fn SLIST_FOREACH -.\" here it is permitted to both remove -.\" .Fa var -.\" as well as free it from within the loop safely without interfering with the -.\" traversal. -.\" .Pp -.\" The macro -.\" .Nm SLIST_FOREACH_FROM_SAFE -.\" behaves identically to -.\" .Nm SLIST_FOREACH_SAFE -.\" when -.\" .Fa var -.\" is NULL, else it treats -.\" .Fa var -.\" as a previously found SLIST element and begins the loop at -.\" .Fa var -.\" instead of the first element in the SLIST referenced by -.\" .Fa head . -.Pp -The macro -.Nm SLIST_INIT -initializes the list referenced by -.Fa head . -.Pp -The macro -.Nm SLIST_INSERT_HEAD -inserts the new element -.Fa elm -at the head of the list. -.Pp -The macro -.Nm SLIST_INSERT_AFTER -inserts the new element -.Fa elm -after the element -.Fa listelm . -.Pp -The macro -.Nm SLIST_NEXT -returns the next element in the list. -.\" .Pp -.\" The macro -.\" .Nm SLIST_REMOVE_AFTER -.\" removes the element after -.\" .Fa elm -.\" from the list. -.\" Unlike -.\" .Fa SLIST_REMOVE , -.\" this macro does not traverse the entire list. -.Pp -The macro -.Nm SLIST_REMOVE_HEAD -removes the element -.Fa elm -from the head of the list. -For optimum efficiency, -elements being removed from the head of the list should explicitly use -this macro instead of the generic -.Fa SLIST_REMOVE -macro. -.Pp -The macro -.Nm SLIST_REMOVE -removes the element -.Fa elm -from the list. -.\" .Pp -.\" The macro -.\" .Nm SLIST_SWAP -.\" swaps the contents of -.\" .Fa head1 -.\" and -.\" .Fa head2 . -.Pp -See the EXAMPLES section below for an example program using a singly-linked list. .Ss Singly-linked tail queues A singly-linked tail queue is headed by a structure defined by the .Nm STAILQ_HEAD diff --git a/man3/slist.3 b/man3/slist.3 index 48bce3dc4..e29953a1d 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -68,6 +68,161 @@ .\" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" .\" .SH DESCRIPTION +.Ss Singly-linked lists +A singly-linked list is headed by a structure defined by the +.Nm SLIST_HEAD +macro. +This structure contains a single pointer to the first element +on the list. +The elements are singly linked for minimum space and pointer manipulation +overhead at the expense of O(n) removal for arbitrary elements. +New elements can be added to the list after an existing element or +at the head of the list. +An +.Fa SLIST_HEAD +structure is declared as follows: +.Bd -literal -offset indent +SLIST_HEAD(HEADNAME, TYPE) head; +.Ed +.Pp +where +.Fa HEADNAME +is the name of the structure to be defined, and +.Fa TYPE +is the type of the elements to be linked into the list. +A pointer to the head of the list 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 SLIST_HEAD_INITIALIZER +evaluates to an initializer for the list +.Fa head . +.Pp +The macro +.Nm SLIST_EMPTY +evaluates to true if there are no elements in the list. +.Pp +The macro +.Nm SLIST_ENTRY +declares a structure that connects the elements in +the list. +.Pp +The macro +.Nm SLIST_FIRST +returns the first element in the list or NULL if the list is empty. +.Pp +The macro +.Nm SLIST_FOREACH +traverses the list referenced by +.Fa head +in the forward direction, assigning each element in +turn to +.Fa var . +.\" .Pp +.\" The macro +.\" .Nm SLIST_FOREACH_FROM +.\" behaves identically to +.\" .Nm SLIST_FOREACH +.\" when +.\" .Fa var +.\" is NULL, else it treats +.\" .Fa var +.\" as a previously found SLIST element and begins the loop at +.\" .Fa var +.\" instead of the first element in the SLIST referenced by +.\" .Fa head . +.\" .Pp +.\" The macro +.\" .Nm SLIST_FOREACH_SAFE +.\" traverses the list referenced by +.\" .Fa head +.\" in the forward direction, assigning each element in +.\" turn to +.\" .Fa var . +.\" However, unlike +.\" .Fn SLIST_FOREACH +.\" here it is permitted to both remove +.\" .Fa var +.\" as well as free it from within the loop safely without interfering with the +.\" traversal. +.\" .Pp +.\" The macro +.\" .Nm SLIST_FOREACH_FROM_SAFE +.\" behaves identically to +.\" .Nm SLIST_FOREACH_SAFE +.\" when +.\" .Fa var +.\" is NULL, else it treats +.\" .Fa var +.\" as a previously found SLIST element and begins the loop at +.\" .Fa var +.\" instead of the first element in the SLIST referenced by +.\" .Fa head . +.Pp +The macro +.Nm SLIST_INIT +initializes the list referenced by +.Fa head . +.Pp +The macro +.Nm SLIST_INSERT_HEAD +inserts the new element +.Fa elm +at the head of the list. +.Pp +The macro +.Nm SLIST_INSERT_AFTER +inserts the new element +.Fa elm +after the element +.Fa listelm . +.Pp +The macro +.Nm SLIST_NEXT +returns the next element in the list. +.\" .Pp +.\" The macro +.\" .Nm SLIST_REMOVE_AFTER +.\" removes the element after +.\" .Fa elm +.\" from the list. +.\" Unlike +.\" .Fa SLIST_REMOVE , +.\" this macro does not traverse the entire list. +.Pp +The macro +.Nm SLIST_REMOVE_HEAD +removes the element +.Fa elm +from the head of the list. +For optimum efficiency, +elements being removed from the head of the list should explicitly use +this macro instead of the generic +.Fa SLIST_REMOVE +macro. +.Pp +The macro +.Nm SLIST_REMOVE +removes the element +.Fa elm +from the list. +.\" .Pp +.\" The macro +.\" .Nm SLIST_SWAP +.\" swaps the contents of +.\" .Fa head1 +.\" and +.\" .Fa head2 . +.Pp +See the EXAMPLES section below for an example program using a singly-linked list. .SH RETURN VALUE .SH CONFORMING TO .SH BUGS From patchwork Thu Oct 22 12:38:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40817 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 902C93985448; Thu, 22 Oct 2020 12:39:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 902C93985448 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370340; bh=ddGWzuHkDSKUhi6Epxfke/finPszjX3ZPwD4o070Q6k=; 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=n4SyBjkuKJfKcB7hEZV0OSGi13Hd1hGNP16rsk9/Pbrw7Hrd8/MmqYZ+Y6x/NtRL7 G8f5TgxLtjJkWCL8iGv7qqUV9QIQUoqq0PL/kppFcJFFFi++0+JNovHSBnMSlqc/ZO Y8K/UVJyuN9EHAjuSfe/HNMDZa+YBm9tjdH6pDWU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id C09CE398400B for ; Thu, 22 Oct 2020 12:38:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C09CE398400B Received: by mail-wr1-x434.google.com with SMTP id n6so2164928wrm.13 for ; Thu, 22 Oct 2020 05:38:56 -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=ddGWzuHkDSKUhi6Epxfke/finPszjX3ZPwD4o070Q6k=; b=iavMZAQZDOHDcxQC0LdTS7Vr7wq4qTa1w0RXVNTRiYbWX9l1if7kKaBpX1iw3YDuz5 q210mnhinN/H7WTAJEmZl+lgMhGVHg0SxwsjdNV60iO94etAlvYHvVMbNUdE2zNuoFiY lzLxJrhwYpHEWRjsie5ABgQ6+O6PX3sXwl87PYz075uGDNeUiwf1AsElu/yzdR4ndXDE phADHqkL+BX65nxr73rRItGVzV6+GuPAv37FhKzAUZs0EOt7uh4E0PDnT9WsdAnNq7HT mE3hsgiSXqCSf2mjsgK2yuRzXzI133BssBY2vVxnzlhDznYWrZGYK0GB1jpf6N3gvb/2 kCzQ== X-Gm-Message-State: AOAM531l5oKkDil6Zmoa/5q7phmRfpY2LTIAcAN1muCbpTndzpygf30l whTyauXODZCfD+w/uyth/uyOa63Rt80= X-Google-Smtp-Source: ABdhPJzuJJfkePorPKIc90dHZBXPg77lgK6ueomIcxGaQGO9PHBp8WF421Nf5M0WPRUM5u68vFbaMA== X-Received: by 2002:a5d:424e:: with SMTP id s14mr2769752wrr.149.1603370335771; Thu, 22 Oct 2020 05:38:55 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:55 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 05/10] queue.3, slist.3: EXAMPLES: Move example program from queue.3 to slist.3 Date: Thu, 22 Oct 2020 14:38:17 +0200 Message-Id: <20201022123821.22602-6-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 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/queue.3 | 57 ---------------------------------------------------- man3/slist.3 | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/man3/queue.3 b/man3/queue.3 index cf5ab60b2..6cf13beb7 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -847,63 +847,6 @@ removes the element .Fa elm from the circular queue. .Sh EXAMPLES -.Ss Singly-linked list example -.Bd -literal - -#include -#include -#include -#include - -struct entry { - int data; - SLIST_ENTRY(entry) entries; /* Singly-linked List. */ -}; - -SLIST_HEAD(slisthead, entry); - -int -main(void) -{ - struct entry *n1, *n2, *n3, *np; - struct slisthead head; /* Singly-linked List - head. */ - - SLIST_INIT(&head); /* Initialize the queue. */ - - n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ - SLIST_INSERT_HEAD(&head, n1, entries); - - n2 = malloc(sizeof(struct entry)); /* Insert after. */ - SLIST_INSERT_AFTER(n1, n2, entries); - - SLIST_REMOVE(&head, n2, entry, entries);/* Deletion. */ - free(n2); - - n3 = SLIST_FIRST(&head); - SLIST_REMOVE_HEAD(&head, entries); /* Deletion from the head. */ - free(n3); - - for (int i = 0; i < 5; i++) { - n1 = malloc(sizeof(struct entry)); - SLIST_INSERT_HEAD(&head, n1, entries); - n1->data = i; - } - - /* Forward traversal. */ - SLIST_FOREACH(np, &head, entries) - printf("%i\en", np->data); - - while (!SLIST_EMPTY(&head)) { /* List Deletion. */ - n1 = SLIST_FIRST(&head); - SLIST_REMOVE_HEAD(&head, entries); - free(n1); - } - SLIST_INIT(&head); - - exit(EXIT_SUCCESS); -} -.Ed .Ss Singly-linked tail queue example .Bd -literal #include diff --git a/man3/slist.3 b/man3/slist.3 index e29953a1d..291c8753b 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -227,4 +227,61 @@ See the EXAMPLES section below for an example program using a singly-linked list .SH CONFORMING TO .SH BUGS .SH EXAMPLES +.Ss Singly-linked list example +.Bd -literal + +#include +#include +#include +#include + +struct entry { + int data; + SLIST_ENTRY(entry) entries; /* Singly-linked List. */ +}; + +SLIST_HEAD(slisthead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct slisthead head; /* Singly-linked List + head. */ + + SLIST_INIT(&head); /* Initialize the queue. */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ + SLIST_INSERT_HEAD(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after. */ + SLIST_INSERT_AFTER(n1, n2, entries); + + SLIST_REMOVE(&head, n2, entry, entries);/* Deletion. */ + free(n2); + + n3 = SLIST_FIRST(&head); + SLIST_REMOVE_HEAD(&head, entries); /* Deletion from the head. */ + free(n3); + + for (int i = 0; i < 5; i++) { + n1 = malloc(sizeof(struct entry)); + SLIST_INSERT_HEAD(&head, n1, entries); + n1->data = i; + } + + /* Forward traversal. */ + SLIST_FOREACH(np, &head, entries) + printf("%i\en", np->data); + + while (!SLIST_EMPTY(&head)) { /* List Deletion. */ + n1 = SLIST_FIRST(&head); + SLIST_REMOVE_HEAD(&head, entries); + free(n1); + } + SLIST_INIT(&head); + + exit(EXIT_SUCCESS); +} +.Ed .SH SEE ALSO From patchwork Thu Oct 22 12:38:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40818 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 20254398401C; Thu, 22 Oct 2020 12:39:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20254398401C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370341; bh=nBy8ZMQa+Ck6w2dw7HG7HQ9BsYxuio913IYeaWV9YY4=; 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=GPSZ8wsr3qqOraH9vT/wLREL2auOfA/3tVosdkDYEEdmtIV8kfGXg7mxN1vTNzfnv VSiO6jzinqzvM5u5u6Dzhf6UIMP8Iko+HBA4yEDxTX8Ah0PyXoc4rWrL2slo/4b/T0 gIwAktRON5klEpEdNVavSjD69PBm93nX2sL6hDrY= 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 E0E3F3985405 for ; Thu, 22 Oct 2020 12:38:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E0E3F3985405 Received: by mail-wr1-x443.google.com with SMTP id s9so2184513wro.8 for ; Thu, 22 Oct 2020 05:38:57 -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=nBy8ZMQa+Ck6w2dw7HG7HQ9BsYxuio913IYeaWV9YY4=; b=SdBp59pNHSRwoPPND3ODd2fzY1QANsNRijKaGFWA9qwrLQ+94b0UX267M6kJyWM1Jx cD2Ddd0dUdeuj21uVagGSRylWJmbdGZOMTvCK2Gvkm59Tc3U+qrHgx3tRoi+00b0XIXL n3gel64S8ATPfXxz2QwbgwxZO0DK1wT67UetoGZwB1aq2PNctE1D6bJRj6p6eC8n8L9S B/WJHR09gi9NbojPe+uz7AnxDKXx+JmjUiMx5irTryTJ5XIcq/gtJdOYrhilaGvOLz6+ uoTU2IKYongJgLPQJ7q2lHIwz4jclyQKrsFj8jaEzZhdinlz9VEvuwy7D9mNfqkdMhgC Xejw== X-Gm-Message-State: AOAM531xYTVvh52J+oaPYnuqMcAAnN61kh4+bXlErMPNOAvyrpVxHdMx 8n8yQ6szS6Ubk6B7Yf8a+U8= X-Google-Smtp-Source: ABdhPJyR10dj/cyF00122sILlkaSpa6ST4gBLyBEQZTcpwzFVqgW2cqqhIvyO8ItUy++sn7MJF/dZA== X-Received: by 2002:a5d:480b:: with SMTP id l11mr2545460wrq.225.1603370337034; Thu, 22 Oct 2020 05:38:57 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:56 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 06/10] slist.3: Copy and adapt code from queue.3 Date: Thu, 22 Oct 2020 14:38:18 +0200 Message-Id: <20201022123821.22602-7-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 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" A few fixes to note: - Sorted alphabetically some macros - ffix: remove alignment spaces in example (as in list.3) Signed-off-by: Alejandro Colomar --- man3/slist.3 | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/man3/slist.3 b/man3/slist.3 index 291c8753b..0dab80cee 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -36,38 +36,52 @@ .Nm SLIST_FIRST , .Nm SLIST_FOREACH , .\" .Nm SLIST_FOREACH_FROM , -.\" .Nm SLIST_FOREACH_SAFE , .\" .Nm SLIST_FOREACH_FROM_SAFE , +.\" .Nm SLIST_FOREACH_SAFE , .Nm SLIST_HEAD , .Nm SLIST_HEAD_INITIALIZER , .Nm SLIST_INIT , .Nm SLIST_INSERT_AFTER , .Nm SLIST_INSERT_HEAD , .Nm SLIST_NEXT , +.Nm SLIST_REMOVE , .\" .Nm SLIST_REMOVE_AFTER , .Nm SLIST_REMOVE_HEAD , -.Nm SLIST_REMOVE , .\" .Nm SLIST_SWAP , .SH SYNOPSIS +.In sys/queue.h +.\" .Fn SLIST_EMPTY "SLIST_HEAD *head" .Fn SLIST_ENTRY "TYPE" .Fn SLIST_FIRST "SLIST_HEAD *head" .Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" .\" .Fn SLIST_FOREACH_FROM "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.\" .Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" .\" .Fn SLIST_FOREACH_FROM_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" +.\" .Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" .Fn SLIST_HEAD "HEADNAME" "TYPE" .Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" .Fn SLIST_INIT "SLIST_HEAD *head" .Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" .\" .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" .\" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_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 SLIST_ENTRY , +named +.Fa NAME . +The argument +.Fa HEADNAME +is the name of a user defined structure that must be declared +using the macro +.Li SLIST_HEAD . .Ss Singly-linked lists A singly-linked list is headed by a structure defined by the .Nm SLIST_HEAD @@ -221,10 +235,12 @@ from the list. .\" .Fa head1 .\" and .\" .Fa head2 . -.Pp -See the EXAMPLES section below for an example program using a singly-linked list. .SH RETURN VALUE .SH CONFORMING TO +Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. +Present on the BSDs +(SLIST macros first appeared in +.Bx 4.4 ). .SH BUGS .SH EXAMPLES .Ss Singly-linked list example @@ -245,7 +261,7 @@ SLIST_HEAD(slisthead, entry); int main(void) { - struct entry *n1, *n2, *n3, *np; + struct entry *n1, *n2, *n3, *np; struct slisthead head; /* Singly-linked List head. */ From patchwork Thu Oct 22 12:38:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40819 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 1F3123985467; Thu, 22 Oct 2020 12:39:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F3123985467 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370342; bh=z7DcKQj8jwUawLT2cwqp0IYBY0Cpolmw6d7FFGtyY0w=; 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=g33x4xxn5G0cu8W+8pAdMnL6cQnBIpUToLTFLseoUuRZqo3JZSiuKG78SEgPn8zoH r/uP4BkpabL5kJVo2k30UQ/hNc7W/fEv5s3hEAtlRmf3G3AoCAMSTS7uGE4K+trRvQ WAh+TNXr3OLGaQDqUIS1qfcmWPeq0U29pjyrduFI= 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 07F173857005 for ; Thu, 22 Oct 2020 12:38:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 07F173857005 Received: by mail-wm1-x344.google.com with SMTP id q5so2040200wmq.0 for ; Thu, 22 Oct 2020 05:38:58 -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=z7DcKQj8jwUawLT2cwqp0IYBY0Cpolmw6d7FFGtyY0w=; b=YRKRCZcvW2nkehxqupc4wkBjHapnbia5xVORK/prHbDRn23+j7bVpXkyKNUmYmPKZJ lkI1wN8fm8PqQp46sTZvHdceOKmeS1jbh0fU15GgI/tS7LtLiyns3/6ayOzX6QbVKOIu UZ/EVPq50bnWhfdqhNXCVT90wFbZffK0qQVRyqJNCX05RFSOSQpNM8w3TdxjSgOeWqrm /kYb7WFEeEZ46Gzg/BMXwKcb5qyCwd7GjEPXDVQ4KaYDUMfELl/2iX39lgtpVrDck5od FuTgoFuRuB4AxA/EKwADL9Jrp9lDOq/aCWhbZFIjyp/G/NiLP1b2PG92DWa3cssZG+kv 83/A== X-Gm-Message-State: AOAM532yFZWHu3yGcisok57jhLf9bGyyWsIyMspiRiHaZCa4DU8ht5Pd BveYiSeKEGlsKlRjOoSteyAn+mhcdUs= X-Google-Smtp-Source: ABdhPJwpE0QG3nrjxNpmVitDR3L+xv/qRg1li7y8yoWFoiCxHRBi4KvlFaTCppkkdRiknnzU+TdjFg== X-Received: by 2002:a1c:59c3:: with SMTP id n186mr2370558wmb.32.1603370338089; Thu, 22 Oct 2020 05:38:58 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:57 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 07/10] slist.3: ffix: Use man markup Date: Thu, 22 Oct 2020 14:38:19 +0200 Message-Id: <20201022123821.22602-8-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 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/slist.3 | 260 +++++++++++++++++++++++++++------------------------ 1 file changed, 140 insertions(+), 120 deletions(-) diff --git a/man3/slist.3 b/man3/slist.3 index 0dab80cee..d97b745a0 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -31,60 +31,77 @@ .\" .TH SLIST 3 2020-10-21 "GNU" "Linux Programmer's Manual" .SH NAME -.Nm SLIST_EMPTY , -.Nm SLIST_ENTRY , -.Nm SLIST_FIRST , -.Nm SLIST_FOREACH , -.\" .Nm SLIST_FOREACH_FROM , -.\" .Nm SLIST_FOREACH_FROM_SAFE , -.\" .Nm SLIST_FOREACH_SAFE , -.Nm SLIST_HEAD , -.Nm SLIST_HEAD_INITIALIZER , -.Nm SLIST_INIT , -.Nm SLIST_INSERT_AFTER , -.Nm SLIST_INSERT_HEAD , -.Nm SLIST_NEXT , -.Nm SLIST_REMOVE , -.\" .Nm SLIST_REMOVE_AFTER , -.Nm SLIST_REMOVE_HEAD , -.\" .Nm SLIST_SWAP , +SLIST_EMPTY, +SLIST_ENTRY, +SLIST_FIRST, +SLIST_FOREACH, +.\"SLIST_FOREACH_FROM, +.\"SLIST_FOREACH_FROM_SAFE, +.\"SLIST_FOREACH_SAFE, +SLIST_HEAD, +SLIST_HEAD_INITIALIZER, +SLIST_INIT, +SLIST_INSERT_AFTER, +SLIST_INSERT_HEAD, +SLIST_NEXT, +SLIST_REMOVE, +.\"SLIST_REMOVE_AFTER, +SLIST_REMOVE_HEAD +.\"SLIST_SWAP .SH SYNOPSIS -.In sys/queue.h -.\" -.Fn SLIST_EMPTY "SLIST_HEAD *head" -.Fn SLIST_ENTRY "TYPE" -.Fn SLIST_FIRST "SLIST_HEAD *head" -.Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.\" .Fn SLIST_FOREACH_FROM "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.\" .Fn SLIST_FOREACH_FROM_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" -.\" .Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" -.Fn SLIST_HEAD "HEADNAME" "TYPE" -.Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" -.Fn SLIST_INIT "SLIST_HEAD *head" -.Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" -.Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" -.Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" -.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" -.\" .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" -.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.\" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" -.\" +.nf +.B #include +.PP +.BI "int SLIST_EMPTY(SLIST_HEAD *" head ");" +.PP +.B SLIST_ENTRY(TYPE); +.PP +.BI "SLIST_ENTRY *SLIST_FIRST(SLIST_HEAD *" head ");" +.PP +.BI "SLIST_FOREACH(TYPE *" var ", SLIST_HEAD *" head ", SLIST_ENTRY " NAME ");" +.\".PP +.\".BI "SLIST_FOREACH_FROM(TYPE *" var ", SLIST_HEAD *" head ", SLIST_ENTRY " NAME ");" +.\".PP +.\".BI "SLIST_FOREACH_FROM_SAFE(TYPE *" var ", SLIST_HEAD *" head ", SLIST_ENTRY " NAME ", TYPE *" temp_var ");" +.\".PP +.\".BI "SLIST_FOREACH_SAFE(TYPE *" var ", SLIST_HEAD *" head ", SLIST_ENTRY " NAME ", TYPE *" temp_var ");" +.PP +.B SLIST_HEAD(HEADNAME, TYPE); +.PP +.BI "SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD " head ");" +.PP +.BI "void SLIST_INIT(SLIST_HEAD *" head ");" +.PP +.BI "void SLIST_INSERT_AFTER(TYPE *" listelm ", TYPE *" elm ", SLIST_ENTRY " NAME ");" +.PP +.BI "void SLIST_INSERT_HEAD(SLIST_HEAD *" head ", TYPE *" elm ", SLIST_ENTRY " NAME ");" +.PP +.BI "SLIST_ENTRY *SLIST_NEXT(TYPE *" elm ", SLIST_ENTRY " NAME ");" +.PP +.BI "void SLIST_REMOVE(SLIST_HEAD *" head ", TYPE *" elm ", SLIST_ENTRY " NAME ");" +.\".PP +.\".BI "void SLIST_REMOVE_AFTER(TYPE *" elm ", SLIST_ENTRY " NAME ");" +.PP +.BI "void SLIST_REMOVE_HEAD(SLIST_HEAD *" head ", SLIST_ENTRY " NAME ");" +.\".PP +.\".BI "void SLIST_SWAP(SLIST_HEAD *" head1 ", SLIST_HEAD *" head2 ", SLIST_ENTRY " NAME ");" +.fi .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 SLIST_ENTRY , +.IR SLIST_ENTRY , named -.Fa NAME . +.IR NAME . The argument -.Fa HEADNAME +.IR HEADNAME is the name of a user defined structure that must be declared using the macro -.Li SLIST_HEAD . -.Ss Singly-linked lists +.BR SLIST_HEAD (). +.PP A singly-linked list is headed by a structure defined by the -.Nm SLIST_HEAD +.BR SLIST_HEAD () macro. This structure contains a single pointer to the first element on the list. @@ -93,159 +110,162 @@ overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An -.Fa SLIST_HEAD +.I SLIST_HEAD structure is declared as follows: -.Bd -literal -offset indent +.PP +.in +4 +.EX SLIST_HEAD(HEADNAME, TYPE) head; -.Ed -.Pp +.EE +.in +.PP where -.Fa HEADNAME +.I HEADNAME is the name of the structure to be defined, and -.Fa TYPE +.I TYPE is the type of the elements to be linked into the list. A pointer to the head of the list 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 SLIST_HEAD_INITIALIZER +.BR SLIST_HEAD_INITIALIZER () evaluates to an initializer for the list -.Fa head . -.Pp +.IR head . +.PP The macro -.Nm SLIST_EMPTY +.BR SLIST_EMPTY () evaluates to true if there are no elements in the list. -.Pp +.PP The macro -.Nm SLIST_ENTRY +.BR SLIST_ENTRY () declares a structure that connects the elements in the list. -.Pp +.PP The macro -.Nm SLIST_FIRST +.BR SLIST_FIRST () returns the first element in the list or NULL if the list is empty. -.Pp +.PP The macro -.Nm SLIST_FOREACH +.BR SLIST_FOREACH () traverses the list referenced by -.Fa head +.I head in the forward direction, assigning each element in turn to -.Fa var . -.\" .Pp +.IR var . +.\" .PP .\" The macro -.\" .Nm SLIST_FOREACH_FROM +.\" .BR SLIST_FOREACH_FROM () .\" behaves identically to -.\" .Nm SLIST_FOREACH +.\" .BR SLIST_FOREACH () .\" when -.\" .Fa var +.\" .I var .\" is NULL, else it treats -.\" .Fa var +.\" .I var .\" as a previously found SLIST element and begins the loop at -.\" .Fa var +.\" .I var .\" instead of the first element in the SLIST referenced by -.\" .Fa head . +.\" .IR head . .\" .Pp .\" The macro -.\" .Nm SLIST_FOREACH_SAFE +.\" .BR SLIST_FOREACH_SAFE () .\" traverses the list referenced by -.\" .Fa head +.\" .I head .\" in the forward direction, assigning each element in .\" turn to -.\" .Fa var . +.\" .IR var . .\" However, unlike -.\" .Fn SLIST_FOREACH +.\" .BR SLIST_FOREACH () .\" here it is permitted to both remove -.\" .Fa var +.\" .I var .\" as well as free it from within the loop safely without interfering with the .\" traversal. -.\" .Pp +.\" .PP .\" The macro -.\" .Nm SLIST_FOREACH_FROM_SAFE +.\" .BR SLIST_FOREACH_FROM_SAFE () .\" behaves identically to -.\" .Nm SLIST_FOREACH_SAFE +.\" .BR SLIST_FOREACH_SAFE () .\" when -.\" .Fa var +.\" .I var .\" is NULL, else it treats -.\" .Fa var +.\" .I var .\" as a previously found SLIST element and begins the loop at -.\" .Fa var +.\" .I var .\" instead of the first element in the SLIST referenced by -.\" .Fa head . -.Pp +.\" .IR head . +.PP The macro -.Nm SLIST_INIT +.BR SLIST_INIT () initializes the list referenced by -.Fa head . -.Pp +.IR head . +.PP The macro -.Nm SLIST_INSERT_HEAD +.BR SLIST_INSERT_HEAD () inserts the new element -.Fa elm +.I elm at the head of the list. -.Pp +.PP The macro -.Nm SLIST_INSERT_AFTER +.BR SLIST_INSERT_AFTER () inserts the new element -.Fa elm +.I elm after the element -.Fa listelm . -.Pp +.IR listelm . +.PP The macro -.Nm SLIST_NEXT +.BR SLIST_NEXT () returns the next element in the list. -.\" .Pp +.\" .PP .\" The macro -.\" .Nm SLIST_REMOVE_AFTER +.\" .BR SLIST_REMOVE_AFTER () .\" removes the element after -.\" .Fa elm +.\" .I elm .\" from the list. .\" Unlike -.\" .Fa SLIST_REMOVE , +.\" .IR SLIST_REMOVE , .\" this macro does not traverse the entire list. -.Pp +.PP The macro -.Nm SLIST_REMOVE_HEAD +.BR SLIST_REMOVE_HEAD () removes the element -.Fa elm +.I elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic -.Fa SLIST_REMOVE +.I SLIST_REMOVE macro. -.Pp +.PP The macro -.Nm SLIST_REMOVE +.BR SLIST_REMOVE () removes the element -.Fa elm +.I elm from the list. -.\" .Pp +.\" .PP .\" The macro -.\" .Nm SLIST_SWAP +.\" .BR SLIST_SWAP () .\" swaps the contents of -.\" .Fa head1 +.\" .I head1 .\" and -.\" .Fa head2 . +.\" .IR head2 . .SH RETURN VALUE .SH CONFORMING TO Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs -(SLIST macros first appeared in -.Bx 4.4 ). +(SLIST macros first appeared in 4.4BSD). .SH BUGS .SH EXAMPLES -.Ss Singly-linked list example -.Bd -literal - +.EX #include #include #include @@ -299,5 +319,5 @@ main(void) exit(EXIT_SUCCESS); } -.Ed +.EE .SH SEE ALSO From patchwork Thu Oct 22 12:38:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40820 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 A04F3398546C; Thu, 22 Oct 2020 12:39:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A04F3398546C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370342; bh=Ru3xBcM4NaKLMYRiAjZSKh4300mwmz8cNOCl7pbeDn0=; 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=uqLNFMEk6l/Ns+rdz2ubNHCa75H+n6fsm4zd2S7TNRMi0rgfUzJ7WMjgJQIXLINLi +ctq4yhqarUpqrNi0KmLrerSayyNXP5UEIS9qm+j0jRr7P2YiY9hkcsJgNlHd6MUEQ YdgqZ4cCCk34NT+1YpJ/Y758By8ROmBbvxQlmKyU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by sourceware.org (Postfix) with ESMTPS id 13744398542C for ; Thu, 22 Oct 2020 12:39:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13744398542C Received: by mail-wm1-x343.google.com with SMTP id k18so2025784wmj.5 for ; Thu, 22 Oct 2020 05:39:00 -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=Ru3xBcM4NaKLMYRiAjZSKh4300mwmz8cNOCl7pbeDn0=; b=ksCSq44P+cDPCbWSDL10OYYMTtFArHG+OvBx2WnXGQ1SyDr+V7p+Wk4/ZiHts6VHd3 HntLIzuCv908yO3JWGPZZqmEKQ0Qf7AuGC5/9uyN7npM6BBKgnp9YuxDJzvOGWqeBEtD YLNIK66HB5rqbYqyNlt8DR0rGB1Wm6L9sJFjRJabmsHFWBROtr4pT1VLsW3/XwPBShm3 DTgorVBzQjaOQdjIesfgyJDB89YRjPjEMDwpmNM1MTnVHRj2rgu/JDJh6Sbg3f1JgMjH OfrtPEftEPeeBpPgrknAequDmmbiN2MSpYx7K4QnUHElI+8HmsgqyWG57foLLDGxQgSK HvTw== X-Gm-Message-State: AOAM532S3amgmfN3jalzEURk0OGO7dBCTHX8ygZA5GbGXeqTz1Ey3E1W I7LaaR49XdclFbK++a+WEb4= X-Google-Smtp-Source: ABdhPJz7zx6c0OWt0OBaDcFG1jZpnmw0s2xi8o5hGxlPVHMHC77yFtycQXjiJOv5mPhZ100JNVcwqg== X-Received: by 2002:a1c:bbd4:: with SMTP id l203mr2374716wmf.153.1603370339053; Thu, 22 Oct 2020 05:38:59 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:58 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 08/10] slist.3: Add details Date: Thu, 22 Oct 2020 14:38:20 +0200 Message-Id: <20201022123821.22602-9-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 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" Add remaining details to complete the page. Signed-off-by: Alejandro Colomar --- man3/slist.3 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/man3/slist.3 b/man3/slist.3 index d97b745a0..7a8078de0 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -48,6 +48,7 @@ SLIST_REMOVE, .\"SLIST_REMOVE_AFTER, SLIST_REMOVE_HEAD .\"SLIST_SWAP +\- implementation of a singly-linked list .SH SYNOPSIS .nf .B #include @@ -87,6 +88,8 @@ SLIST_REMOVE_HEAD .\".BI "void SLIST_SWAP(SLIST_HEAD *" head1 ", SLIST_HEAD *" head2 ", SLIST_ENTRY " NAME ");" .fi .SH DESCRIPTION +These macros define and operate on doubly-linked lists. +.PP In the macro definitions, .I TYPE is the name of a user-defined structure, @@ -259,11 +262,38 @@ from the list. .\" and .\" .IR head2 . .SH RETURN VALUE +.BR SLIST_EMPTY () +returns non-zero if the list is empty, +and zero if the list contains at least one entry. +.PP +.BR SLIST_FIRST (), +and +.BR SLIST_NEXT () +return a pointer to the first or next +.I SLIST_ENTRY +structure, respectively. +.PP +.BR SLIST_HEAD_INITIALIZER () +returns an initializer that can be assigned to the list +.IR head . .SH CONFORMING TO Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs (SLIST macros first appeared in 4.4BSD). .SH BUGS +The macro +.BR SLIST_FOREACH () +doesn't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +The macro +.BR SLIST_FOREACH_SAFE (), +which is present on the BSDs but is not present in glibc, +fixes 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 @@ -321,3 +351,5 @@ main(void) } .EE .SH SEE ALSO +.BR insque (3), +.BR queue (3) From patchwork Thu Oct 22 12:38:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40821 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 988AD3985473; Thu, 22 Oct 2020 12:39:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 988AD3985473 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370344; bh=F5bJx+SEZkvQ1oW88ZCrdSTI6mENaykHoICvKMIS9K8=; 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=NeI7OXo9aSqEr0/WjFSBztXAUcaDpRjJbba77Me+AFVUpSrvKj+2XvSzQimOkrEi0 mUweF6v9XBbhF8GjZmYzOKBfwIJ71WcY/2CjiRYmitiQEunEoCZp1pcqM77If9TsUI wD/o+U0h7D/nQswtUJ2FOcPIa6ftFIW3Op7VznAo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 02B37398400B for ; Thu, 22 Oct 2020 12:39:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 02B37398400B Received: by mail-wr1-x430.google.com with SMTP id h7so2199957wre.4 for ; Thu, 22 Oct 2020 05:39:00 -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=F5bJx+SEZkvQ1oW88ZCrdSTI6mENaykHoICvKMIS9K8=; b=s2qKpDFj5NhFPmZ7EvcEXiFEJE1y2ZrZq4t5pbtv5uFYSgXzfHtPtIn9Z4AWjBlx3j r7BGlbVcBWz2T0yf20qBAheUUqAO7OLvkwR3nONiqRd8OqrAQhqNBZxdcLPOmquQiY4f Ea5htrV2S2gThGNZpf6uO/nMaU0cvMXbJrrfK0bhX8wF5Qo4Kf716EhxkMJZr/cRs5dr OVMWJoG+M2BPK6kG9Obci6A0B6DNpQECmTslo2N0szs+zsFmb/Qz54giSDCCpbqmmhB5 K/XDc3wDGIiPua68fhUBahZJya1XsfUfej1jD3RKb+blEQN8WgUerYHQzbkavh+OPKY3 rZCw== X-Gm-Message-State: AOAM530tlrac7JKo7OSUMphyH0wBbl/zODYgByiirm35H/C4DpAxjuEb /qLMB8zuQ6OQYXOWSombigc16z4dw4U= X-Google-Smtp-Source: ABdhPJw9MTnXhQm9f3rQJ9V9FWjeWGbiu9umdlTI++xxX3DEEPVJCRRbYJcJlMZvdRvrMXm+RitQ8w== X-Received: by 2002:a5d:684d:: with SMTP id o13mr2697834wrw.302.1603370340115; Thu, 22 Oct 2020 05:39:00 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:38:59 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 09/10] SLIST_EMPTY.3, SLIST_ENTRY.3, SLIST_FIRST.3, SLIST_FOREACH.3, SLIST_HEAD.3, SLIST_HEAD_INITIALIZER.3, SLIST_INIT.3, SLIST_INSERT_AFTER.3, SLIST_INSERT_HEAD.3, SLIST_NEXT.3, SLIST_REMOVE.3, SLIST_REMOVE_HEAD.3: Link to the new slist(3) page instead of queue(3) Date: Thu, 22 Oct 2020 14:38:21 +0200 Message-Id: <20201022123821.22602-10-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 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/SLIST_EMPTY.3 | 2 +- man3/SLIST_ENTRY.3 | 2 +- man3/SLIST_FIRST.3 | 2 +- man3/SLIST_FOREACH.3 | 2 +- man3/SLIST_HEAD.3 | 2 +- man3/SLIST_HEAD_INITIALIZER.3 | 2 +- man3/SLIST_INIT.3 | 2 +- man3/SLIST_INSERT_AFTER.3 | 2 +- man3/SLIST_INSERT_HEAD.3 | 2 +- man3/SLIST_NEXT.3 | 2 +- man3/SLIST_REMOVE.3 | 2 +- man3/SLIST_REMOVE_HEAD.3 | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/man3/SLIST_EMPTY.3 b/man3/SLIST_EMPTY.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_EMPTY.3 +++ b/man3/SLIST_EMPTY.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_ENTRY.3 b/man3/SLIST_ENTRY.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_ENTRY.3 +++ b/man3/SLIST_ENTRY.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_FIRST.3 b/man3/SLIST_FIRST.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_FIRST.3 +++ b/man3/SLIST_FIRST.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_FOREACH.3 b/man3/SLIST_FOREACH.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_FOREACH.3 +++ b/man3/SLIST_FOREACH.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_HEAD.3 b/man3/SLIST_HEAD.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_HEAD.3 +++ b/man3/SLIST_HEAD.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_HEAD_INITIALIZER.3 b/man3/SLIST_HEAD_INITIALIZER.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_HEAD_INITIALIZER.3 +++ b/man3/SLIST_HEAD_INITIALIZER.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_INIT.3 b/man3/SLIST_INIT.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_INIT.3 +++ b/man3/SLIST_INIT.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_INSERT_AFTER.3 b/man3/SLIST_INSERT_AFTER.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_INSERT_AFTER.3 +++ b/man3/SLIST_INSERT_AFTER.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_INSERT_HEAD.3 b/man3/SLIST_INSERT_HEAD.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_INSERT_HEAD.3 +++ b/man3/SLIST_INSERT_HEAD.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_NEXT.3 b/man3/SLIST_NEXT.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_NEXT.3 +++ b/man3/SLIST_NEXT.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_REMOVE.3 b/man3/SLIST_REMOVE.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_REMOVE.3 +++ b/man3/SLIST_REMOVE.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 diff --git a/man3/SLIST_REMOVE_HEAD.3 b/man3/SLIST_REMOVE_HEAD.3 index c2956c9fc..260541bcb 100644 --- a/man3/SLIST_REMOVE_HEAD.3 +++ b/man3/SLIST_REMOVE_HEAD.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/slist.3 From patchwork Thu Oct 22 12:38:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40822 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 230A53985479; Thu, 22 Oct 2020 12:39:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 230A53985479 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370345; bh=FSeF2HZcBO8G2ygnvz0yN+C6B3DwI5A9ITVuFiBuknU=; 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=PSSPFruiGxVWC1vcZcOPhkeTW3IWgVCyN5CeydPlSJW7BZPZG7rQPVF2qAgxE2cvi 54HCx58jmdw7zhSZe9LvOWsk7uMLdcEqc9HK+06biB+yY7J+ZAbVPBHSpYgXJ4ROTY yMB4JZHe8UsIDsjNCHsuRxMd0I96AYI8SMD0eb9s= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 0E1CA3985464 for ; Thu, 22 Oct 2020 12:39:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0E1CA3985464 Received: by mail-wr1-x432.google.com with SMTP id j7so2177776wrt.9 for ; Thu, 22 Oct 2020 05:39:02 -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=FSeF2HZcBO8G2ygnvz0yN+C6B3DwI5A9ITVuFiBuknU=; b=rBISZXty5RAXCGkSpIpWHoOnkgC60VZsTPhaIP+FqRYdogIcV2u4cWgQ0yARzGnEa/ /0DnlloHiBkMdyg7RmWP7uru+030+9tSHMWkeosEl+WnCPnkRMh2Wxh66gBsDXshdKVQ CDJSFu2TbHeWLpkFa7ljownxJXGWakvztkmTIHhXwk2rZaefvSUUM+nNPC6vnc0+ypDf KpRnaX6oozkQzdx90lFLsVtKG/9zwaYQewQk1cY0WiPrVs5EDgqvGpjRs/M7p0WWQLNB DPVU11jUpxzoEwwjVtU/l3Co+GctuLGwo8mRV+D15SoOpGjU3OedWNIbJCih7A7HW+kR ZwdQ== X-Gm-Message-State: AOAM532CCdQ42P6h3uT56w3+scOEtwZ2sWinLxsCiH3o3McorJQPo8Me af7zAMibnD5eBb4qU798ON7CPZHXseM= X-Google-Smtp-Source: ABdhPJxBd2UrN3Q9FgXwhwCZw/mDyOcfqaYh4CRXafnci9l5bVNdYt3Xb+eK/ymU2hhVivEMJ+7bfA== X-Received: by 2002:a05:6000:12c9:: with SMTP id l9mr2440467wrx.309.1603370341167; Thu, 22 Oct 2020 05:39:01 -0700 (PDT) Received: from debian-VLC.home ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id m1sm3573883wme.48.2020.10.22.05.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:39:00 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 10/10] queue.3: SEE ALSO: Add slist(3) Date: Thu, 22 Oct 2020 14:38:22 +0200 Message-Id: <20201022123821.22602-11-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022123821.22602-1-colomar.6.4.3@gmail.com> References: <20201022123821.22602-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 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 6cf13beb7..bcf5ce00a 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -1029,4 +1029,5 @@ functions first appeared in .Sh SEE ALSO .Xr insque 3 .Xr list 3 +.Xr slist 3 .\" .Xr tree 3