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: yaneurab...@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.
_______________________________________________
freebsd-doc@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-doc
To unsubscribe, send any mail to "freebsd-doc-unsubscr...@freebsd.org"

Reply via email to