Hello and welcome.

Join is a fairly traditional operation. It is present in most thread APIs,
and does mostly the same thing everywhere. See for example [1].

So, basically, you want the calling thread to block until the target thread
terminates. Then the calling thread cleans up the terminated thread's
resources (if applicable) and returns its exit value (if present). Note
that some/most API's provide also a detach() function, which says that no
other thread will call join on the calling one. Normally, joining a
terminated thread is required to avoid memory leaks.


[1]
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_join.html

-- Jiří Zárevúcky


On 13 July 2013 10:15, Marin Ramesa <[email protected]> wrote:

> Hello to all the readers,
>
> I'm a newcomer to HelenOS and ticket #5 cought my attention. I see it
> as a good opportunity to learn some microkernel programming and make a
> contribution. So, I assigned it to myself, I saw it didn't have an
> owner. But, I need some further explanation:
>
> I quote: "The kernel should provide userspace threads with syscalls for
> joining other threads, given their thread ID. This is essential to
> prevent leaking memory in form of userspace stacks of terminated
> threads."
>
> What I need is a more formal specification of what it means for a
> thread to "join" other threads. A more formal specification of "join"
> to base my code on. Is there some existing code that is relevant to
> "join"?
>
> Thanks.
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/listinfo/helenos-devel
>
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to