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

Christoph Harder shadowomf at arcor.de
Sun May 29 11:51:40 PDT 2016


Thats what I guessed, thank you for the fast response.

Best regards,
Christoph


Am 29.05.2016 um 20:40 schrieb Matthew Dillon:
> 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
>>
>



More information about the Users mailing list