From owner-freebsd-doc@FreeBSD.ORG Wed Jul 30 05:07:39 2014 Return-Path: Delivered-To: freebsd-doc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1458E537 for ; Wed, 30 Jul 2014 05:07:39 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6F3A27FA for ; Wed, 30 Jul 2014 05:07:38 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6U57cRO055612 for ; Wed, 30 Jul 2014 05:07:38 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-doc@FreeBSD.org Subject: [Bug 192267] New: queue(3) doesn't note that HEADNAME argument in *_HEAD macro is optional/creates anonymous structs Date: Wed, 30 Jul 2014 05:07:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Documentation X-Bugzilla-Component: Documentation X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-doc@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2014 05:07:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192267 Bug ID: 192267 Summary: queue(3) doesn't note that HEADNAME argument in *_HEAD macro is optional/creates anonymous structs Product: Documentation Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: Documentation Assignee: freebsd-doc@FreeBSD.org Reporter: yaneurabeya@gmail.com Some of the code in the tree uses the data structures in a one-off manner, such that specifying the HEADNAME value for the *_HEAD macro isn't required. What omitting HEADNAME does is creates an anonymous structure for describing the data structure/pointers, whereas specifying HEADNAME creates a named structure for describing the data structure/pointers, i.e. 149 #define SLIST_HEAD(name, type) \ 150 struct name { \ 151 struct type *slh_first; /* first element */ \ 152 } ... 242 #define STAILQ_HEAD(name, type) \ 243 struct name { \ 244 struct type *stqh_first;/* first element */ \ 245 struct type **stqh_last;/* addr of last next element */ \ 246 } ... 363 #define LIST_HEAD(name, type) \ 364 struct name { \ 365 struct type *lh_first; /* first element */ \ 366 } ... 491 #define TAILQ_HEAD(name, type) \ 492 struct name { \ 493 struct type *tqh_first; /* first element */ \ 494 struct type **tqh_last; /* addr of last next element */ \ 495 TRACEBUF \ 496 } -- You are receiving this mail because: You are the assignee for the bug.