sys/tree.h sys/queue.h are they threadsafe?

Matthew Dillon dillon at backplane.com
Sun May 29 11:40:19 PDT 2016


They are not, nor should they be, since their use cases under SMP tend to
already hold a lock for other reasons.  If you think about it, even if the
core routines were thread-safe, the caller's use cases are not going to be
thread safe unless the caller uses locks around its own use cases anyway.

-Matt

On Sun, May 29, 2016 at 3:22 AM, Christoph Harder <shadowomf at arcor.de>
wrote:

> Hello,
>
> are QUEUE(3) and TREE(3) thread safe/atomic or ahould one use a lock when
> accessing them from multiple threads?
>
> Best regards,
> Christoph
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20160529/a7bafd20/attachment-0003.htm>


More information about the Users mailing list