From patchwork Mon Feb 15 16:12:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1440646 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=2620:52:3:1:0:246e:9693:128c; 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=hpHnkM3o; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4DfTgh5C2pz9sCD for ; Tue, 16 Feb 2021 03:14:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A2538396DC37; Mon, 15 Feb 2021 16:14:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2538396DC37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613405641; bh=Kd+N+cVHfVw8PJ7av0V7Nrmf17x0tT2J8HuJyX7lmjc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=hpHnkM3oemfx/RIojuq/LBdHjgHEsQ+ThIWojPBWipXolHLXQQw381+c6p7dYfYEQ YQ5whe+VEy3XR2C3jOr9Dwz2FughBcqt5CBq17Yz93KCMG6ToYL9kXWx7kUwn7XStc SInjLP8hYt9S5Wv8H2U+r9ikfdBmqosOKrtBkos0= 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 409B3396DC37 for ; Mon, 15 Feb 2021 16:13:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 409B3396DC37 Received: by mail-wr1-x42f.google.com with SMTP id 7so9634518wrz.0 for ; Mon, 15 Feb 2021 08:13:58 -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:mime-version :content-transfer-encoding; bh=Kd+N+cVHfVw8PJ7av0V7Nrmf17x0tT2J8HuJyX7lmjc=; b=KdBeNm42xWFFR8G305ooGaM5RdGCb3YqS9yCYNwvb+tvbiV7Z1F1IQ7h3l8iHUHvEb wtLVp5vw/vMmgbN4YNZa8cPE9+lyDWbGkfrN00nPB6QS9UvJIiR+ga5Qu0L6rekGIY3r 4at92LEDh+TaT84oq6Lqil2yTZQ8wLYiabWjcrEyFNJ0OUY66z/61liBUvSnpWgIvH3d GNpYPXqrO3CFHflDTZ7rq89AbqtVM+kYMHXlA9YHNXq5Ew0YaVUuEb8A8hpSmH3pgu3Y dgQ2TFceeA+ReR0d/PORWq42imwTIgdE0K39q4aS14HGm1vNk0qK5ERKNLTpzR1ZTb0x wn1A== X-Gm-Message-State: AOAM530pNsmVi3LjsNsytUO7wvAGrb2x19d3u7kKMHYufFRMTfzj9gca Ib8T7wHSmItzAtH7wsINYTk= X-Google-Smtp-Source: ABdhPJzEGVVLC4fp6ScMdFm7paDqomACWT/g1iZeTlmt5ho/+NSzmJ5mTFvE7eaAfgnsRJZwWb099g== X-Received: by 2002:a5d:628c:: with SMTP id k12mr19136224wru.316.1613405637358; Mon, 15 Feb 2021 08:13:57 -0800 (PST) Received: from debian.vlc ([170.253.51.130]) by smtp.gmail.com with ESMTPSA id v11sm24904873wrr.3.2021.02.15.08.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 08:13:56 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH] stailq.3, queue.7, SIMPLEQ_*.3: Document SIMPLEQ_*() as aliases to STAILQ_*() macros Date: Mon, 15 Feb 2021 17:12:44 +0100 Message-Id: <20210215161243.517608-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.0 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 --- 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/stailq.3 | 31 +++++++++++++++++++++++++++++++ man7/queue.7 | 9 +++++++++ 15 files changed, 53 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 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/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),