From patchwork Mon Feb 15 16:32:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1440661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=j5SxNBc1; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DfV673J2Xz9rx6 for ; Tue, 16 Feb 2021 03:33:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E17D396AC2F; Mon, 15 Feb 2021 16:33:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E17D396AC2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613406813; bh=t1dcunMA2+i2F3YruyNKetLYeLbTCCb3QQiHOswLlBg=; 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=j5SxNBc1bBowMerseRjkiltuCodzKPBhnEWL/+tJUQAC4cKuwFv7lqTkAoIIWAthX CSH+Ljb91lvvVhjhcXMYKkljAIUfEEFDH6fWdmKZEW9TnOgIGmnrlIs+Gn3xJsdqZZ JTkp3qAxVdfmdNn6KjWthTFJzhfNQKWA2KdN74Jk= 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 6AFD4396AC03 for ; Mon, 15 Feb 2021 16:33:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6AFD4396AC03 Received: by mail-wr1-x429.google.com with SMTP id v15so9653062wrx.4 for ; Mon, 15 Feb 2021 08:33:31 -0800 (PST) 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=t1dcunMA2+i2F3YruyNKetLYeLbTCCb3QQiHOswLlBg=; b=WJ0KqGBmEJYQw91gPeMToPNUSQQ3v6cdZE4P2dOPbnFkOhM3FxnJcIy0P632NKU8p4 Y0dN2IG5egrutWA8ndHs1yXTwDr7cwe4NAUrXkHh++tB7nyaF2pkCTzpttVbP4k5xdQv 8RqA6nS04LapA0JIPporBpMZaMb9V/VFoQ3n0MuCQJY7My0Wj+o1FfoE32gYMps0unzd afHrlV3b/IgrdeLAVFpMdsgAmmjm5yapEggjXE5QRK2XTJCTK9fyVSOmiz1xzNu3OwGI FXwiOqtw+0iMtSXchOybg1WhEFpkUsneZuHciMF3RluJJuQ14gBwdjOgVVomSe726Bsn SfzQ== X-Gm-Message-State: AOAM530S89SDxOzBHmzQtv/8uaKdfiX7aWACl9GNwyTYbmYrNE6DX5aL iHh6AiFF/plu9DvheMr8o/POFR5RtQY= X-Google-Smtp-Source: ABdhPJzxLH34YJQHO8j44iRNBCfk3xPyt5zNJZC7sAgIgCaStz9Llr1YESdzFdoLJvSn4vgWCyntvg== X-Received: by 2002:a5d:4ecf:: with SMTP id s15mr19408643wrv.132.1613406810569; Mon, 15 Feb 2021 08:33:30 -0800 (PST) Received: from debian.vlc ([170.253.51.130]) by smtp.gmail.com with ESMTPSA id o13sm9768218wro.15.2021.02.15.08.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 08:33:30 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH v3] simpleq.3, stailq.3, queue.7, SIMPLEQ_*.3: Document SIMPLEQ_*() as an alias to STAILQ_*() macros Date: Mon, 15 Feb 2021 17:32:37 +0100 Message-Id: <20210215163236.518482-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210215161243.517608-1-alx.manpages@gmail.com> References: <20210215161243.517608-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 --- v2: Add link: simpleq.3 -> stailq.3 (for symmetry) v3: Resend (typo in email) --- man3/SIMPLEQ_EMPTY.3 | 1 + man3/SIMPLEQ_ENTRY.3 | 1 + man3/SIMPLEQ_FIRST.3 | 1 + man3/SIMPLEQ_FOREACH.3 | 1 + man3/SIMPLEQ_HEAD.3 | 1 + man3/SIMPLEQ_HEAD_INITIALIZER.3 | 1 + man3/SIMPLEQ_INIT.3 | 1 + man3/SIMPLEQ_INSERT_AFTER.3 | 1 + man3/SIMPLEQ_INSERT_HEAD.3 | 1 + man3/SIMPLEQ_INSERT_TAIL.3 | 1 + man3/SIMPLEQ_NEXT.3 | 1 + man3/SIMPLEQ_REMOVE.3 | 1 + man3/SIMPLEQ_REMOVE_HEAD.3 | 1 + man3/simpleq.3 | 1 + man3/stailq.3 | 31 +++++++++++++++++++++++++++++++ man7/queue.7 | 9 +++++++++ 16 files changed, 54 insertions(+) create mode 100644 man3/SIMPLEQ_EMPTY.3 create mode 100644 man3/SIMPLEQ_ENTRY.3 create mode 100644 man3/SIMPLEQ_FIRST.3 create mode 100644 man3/SIMPLEQ_FOREACH.3 create mode 100644 man3/SIMPLEQ_HEAD.3 create mode 100644 man3/SIMPLEQ_HEAD_INITIALIZER.3 create mode 100644 man3/SIMPLEQ_INIT.3 create mode 100644 man3/SIMPLEQ_INSERT_AFTER.3 create mode 100644 man3/SIMPLEQ_INSERT_HEAD.3 create mode 100644 man3/SIMPLEQ_INSERT_TAIL.3 create mode 100644 man3/SIMPLEQ_NEXT.3 create mode 100644 man3/SIMPLEQ_REMOVE.3 create mode 100644 man3/SIMPLEQ_REMOVE_HEAD.3 create mode 100644 man3/simpleq.3 diff --git a/man3/SIMPLEQ_EMPTY.3 b/man3/SIMPLEQ_EMPTY.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_EMPTY.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_ENTRY.3 b/man3/SIMPLEQ_ENTRY.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_ENTRY.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_FIRST.3 b/man3/SIMPLEQ_FIRST.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_FIRST.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_FOREACH.3 b/man3/SIMPLEQ_FOREACH.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_FOREACH.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_HEAD.3 b/man3/SIMPLEQ_HEAD.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_HEAD.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_HEAD_INITIALIZER.3 b/man3/SIMPLEQ_HEAD_INITIALIZER.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_HEAD_INITIALIZER.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_INIT.3 b/man3/SIMPLEQ_INIT.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_INIT.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_INSERT_AFTER.3 b/man3/SIMPLEQ_INSERT_AFTER.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_INSERT_AFTER.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_INSERT_HEAD.3 b/man3/SIMPLEQ_INSERT_HEAD.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_INSERT_HEAD.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_INSERT_TAIL.3 b/man3/SIMPLEQ_INSERT_TAIL.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_INSERT_TAIL.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_NEXT.3 b/man3/SIMPLEQ_NEXT.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_NEXT.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_REMOVE.3 b/man3/SIMPLEQ_REMOVE.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_REMOVE.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/SIMPLEQ_REMOVE_HEAD.3 b/man3/SIMPLEQ_REMOVE_HEAD.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/SIMPLEQ_REMOVE_HEAD.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/simpleq.3 b/man3/simpleq.3 new file mode 100644 index 000000000..fbb71f02c --- /dev/null +++ b/man3/simpleq.3 @@ -0,0 +1 @@ +.so man3/stailq.3 diff --git a/man3/stailq.3 b/man3/stailq.3 index b43f9c60b..22582eeae 100644 --- a/man3/stailq.3 +++ b/man3/stailq.3 @@ -31,6 +31,26 @@ .\" .TH STAILQ 3 2020-10-21 "GNU" "Linux Programmer's Manual" .SH NAME +.\"SIMPLEQ_CONCAT, +SIMPLEQ_EMPTY, +SIMPLEQ_ENTRY, +SIMPLEQ_FIRST, +SIMPLEQ_FOREACH, +.\"SIMPLEQ_FOREACH_FROM, +.\"SIMPLEQ_FOREACH_FROM_SAFE, +.\"SIMPLEQ_FOREACH_SAFE, +SIMPLEQ_HEAD, +SIMPLEQ_HEAD_INITIALIZER, +SIMPLEQ_INIT, +SIMPLEQ_INSERT_AFTER, +SIMPLEQ_INSERT_HEAD, +SIMPLEQ_INSERT_TAIL, +.\"SIMPLEQ_LAST, +SIMPLEQ_NEXT, +SIMPLEQ_REMOVE, +.\"SIMPLEQ_REMOVE_AFTER, +SIMPLEQ_REMOVE_HEAD, +.\"SIMPLEQ_SWAP, STAILQ_CONCAT, STAILQ_EMPTY, STAILQ_ENTRY, @@ -96,6 +116,8 @@ STAILQ_REMOVE_HEAD, .\" .BI "void STAILQ_SWAP(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 , .\" .BI " STAILQ_ENTRY " NAME ); .fi +.IR Note : +Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES. .SH DESCRIPTION These macros define and operate on singly linked tail queues. .PP @@ -299,6 +321,15 @@ 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 NOTES +Some BSDs provide SIMPLEQ instead of STAILQ. +They are identical, but for historical reasons +they were named differently on different BSDs. +STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. +For compatibility reasons, some systems provide both sets of macros. +Glibc provides both STAILQ and SIMPLEQ, +which are identical except for a missing SIMPLEQ equivalent to +.BR STAILQ_CONCAT (). .SH EXAMPLES .EX #include diff --git a/man7/queue.7 b/man7/queue.7 index f92887a36..c3facafd0 100644 --- a/man7/queue.7 +++ b/man7/queue.7 @@ -138,6 +138,15 @@ Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs. .I macros first appeared in 4.4BSD. +.SH NOTES +Some BSDs provide SIMPLEQ instead of STAILQ. +They are identical, but for historical reasons +they were named differently on different BSDs. +STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. +For compatibility reasons, some systems provide both sets of macros. +Glibc provides both STAILQ and SIMPLEQ, +which are identical except for a missing SIMPLEQ equivalent to +.BR STAILQ_CONCAT (). .SH SEE ALSO .BR circleq (3), .BR insque (3),