from the manpage:
.Sh SINGLY-LINKED TAIL QUEUES
A singly-linked tail queue is headed by a structure defined by the
.Nm STAILQ_HEAD
macro.
This structure contains a pair of pointers,
one to the first element in the tail queue and the other to
the last element in the tail queue.
The elements are singly linked for minimum space and pointer
manipulation overhead at the expense of O(n) removal for arbitrary
elements.
New elements can be added to the tail queue after an existing element,
at the head of the tail queue, or at the end of the tail queue.
matt
--
matt debergalis <deb...@mit.edu> KB1CTH
http://www.mit.edu/~deberg/ for PGP key
> .Sh SINGLY-LINKED TAIL QUEUES
> A singly-linked tail queue is headed by a structure defined by the
> .Nm STAILQ_HEAD
In NetBSD, these are called SIMPLEQ.
--
-- Jason R. Thorpe <tho...@zembu.com>
specifically, freebsd has *_FOREACH(var,head,field) defined for all of
its queue abstractions, and also {TAILQ,CIRCLEQ}_FOREACH_REVERSE().
the netsmb code for samba support uses a few of these.
Jason> In NetBSD, these are called SIMPLEQ.
it also uses STAILQ a lot, is it better to special case every call based
on __NetBSD__ and __FreeBSD__, or to hack a rename of the STAILQ to
SIMPLEQ for those files, or provide the STAILQ interface names as
another way to use our SIMPLEQ structure?
in places where different bsd's have different api's in name only, or in
minor things like parameter order or structure name, they should converge.
BSD 4.4 had something called a System Interface. perhaps Kirk could be
convinced to publish an updated version of it that both freebsd and netbsd
could conform to, whenever some API difference is a matter of style rather
than vision/scope?
Seconded.
> BSD 4.4 had something called a System Interface. perhaps Kirk could be
> convinced to publish an updated version of it that both freebsd and netbsd
> could conform to, whenever some API difference is a matter of style rather
> than vision/scope?
That would be really nice.
Jaromir
--
Jaromir Dolecek <jdol...@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@
> matt> is there any opposition to bringing in some FreeBSD additions
> matt> to sys/queue.h that implement singly linked tailq's, along w/
> matt> a few other random methods that we don't have?
>
> specifically, freebsd has *_FOREACH(var,head,field) defined for all of
> its queue abstractions, and also {TAILQ,CIRCLEQ}_FOREACH_REVERSE().
>
> the netsmb code for samba support uses a few of these.
Those sound useful. :-)
Take care,
Bill