From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 17 21:17:12 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CB8B106566B; Thu, 17 Dec 2009 21:17:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD668FC08; Thu, 17 Dec 2009 21:17:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBHLHCqq050830; Thu, 17 Dec 2009 21:17:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBHLHCbk050827; Thu, 17 Dec 2009 21:17:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200912172117.nBHLHCbk050827@svn.freebsd.org> From: John Baldwin Date: Thu, 17 Dec 2009 21:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200651 - stable/7/share/man/man3 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2009 21:17:12 -0000 Author: jhb Date: Thu Dec 17 21:17:12 2009 New Revision: 200651 URL: http://svn.freebsd.org/changeset/base/200651 Log: Partial merge of 179210 and 192926 to ease compilation of 8.x code on 7: Introduce REMOVE_AFTER() macro's for SLIST and STAILQ. I forgot to merge the manpage update previously. Pointed out by: pluknet Modified: stable/7/share/man/man3/Makefile stable/7/share/man/man3/queue.3 Directory Properties: stable/7/share/man/man3/ (props changed) Modified: stable/7/share/man/man3/Makefile ============================================================================== --- stable/7/share/man/man3/Makefile Thu Dec 17 20:41:59 2009 (r200650) +++ stable/7/share/man/man3/Makefile Thu Dec 17 21:17:12 2009 (r200651) @@ -62,6 +62,7 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 SLIST_INSERT_HEAD.3 \ queue.3 SLIST_NEXT.3 \ queue.3 SLIST_REMOVE.3 \ + queue.3 SLIST_REMOVE_AFTER.3 \ queue.3 SLIST_REMOVE_HEAD.3 \ queue.3 STAILQ_CONCAT.3 \ queue.3 STAILQ_EMPTY.3 \ @@ -78,6 +79,7 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 STAILQ_LAST.3 \ queue.3 STAILQ_NEXT.3 \ queue.3 STAILQ_REMOVE.3 \ + queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ queue.3 TAILQ_CONCAT.3 \ queue.3 TAILQ_EMPTY.3 \ Modified: stable/7/share/man/man3/queue.3 ============================================================================== --- stable/7/share/man/man3/queue.3 Thu Dec 17 20:41:59 2009 (r200650) +++ stable/7/share/man/man3/queue.3 Thu Dec 17 21:17:12 2009 (r200651) @@ -47,6 +47,7 @@ .Nm SLIST_INSERT_AFTER , .Nm SLIST_INSERT_HEAD , .Nm SLIST_NEXT , +.Nm SLIST_REMOVE_AFTER , .Nm SLIST_REMOVE_HEAD , .Nm SLIST_REMOVE , .Nm STAILQ_CONCAT , @@ -63,6 +64,7 @@ .Nm STAILQ_INSERT_TAIL , .Nm STAILQ_LAST , .Nm STAILQ_NEXT , +.Nm STAILQ_REMOVE_AFTER , .Nm STAILQ_REMOVE_HEAD , .Nm STAILQ_REMOVE , .Nm LIST_EMPTY , @@ -113,6 +115,7 @@ lists and tail queues .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" .\" @@ -130,6 +133,7 @@ lists and tail queues .Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" +.Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .\" @@ -376,6 +380,14 @@ The macro 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 @@ -552,6 +564,14 @@ The macro returns the next item on the tail queue, or NULL this item is the last. .Pp The macro +.Nm STAILQ_REMOVE_AFTER +removes the element after +.Fa elm +from the tail queue. Unlike +.Fa STAILQ_REMOVE , +this macro does not traverse the entire tail queue. +.Pp +The macro .Nm STAILQ_REMOVE_HEAD removes the element at the head of the tail queue. For optimum efficiency,