[riot-devel] How to wait for a thread to end?

Martine Lenders mail at martine-lenders.eu
Wed Jul 24 19:18:42 CEST 2019


Hi,

not 100% sure if this can be done generally (apart from the state checks it
should AFAICS), but have a look how the pthread implementation how it
implements `pthread_join()` [1] which is essentially what you are trying to
do (see pthread_join(3)).

Cheers,
Martine

[1]
https://github.com/RIOT-OS/RIOT/blob/7eb579bf4f921d5246d4dccc80b48c8f2f307d06/sys/posix/pthread/pthread.c#L223-L255

Am Mi., 24. Juli 2019 um 19:06 Uhr schrieb Julian Holzwarth <
julian.holzwarth at fu-berlin.de>:

> Dear riot developers,
>
> while writing tests I want to wait for a thread I created to end. I tried
> something with changing my own priority but it did not work.
>
> How can I wait for a thread to end?
>
> Thank you in advance.
>
> Cheers,
> Julian
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20190724/7af0f249/attachment.htm>


More information about the devel mailing list