This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] nptl: Fix join/tryjoin comments.


* Carlos O'Donell:

> This commit fixes several inaccurate comments in the implementation of
> __pthread_timedjoin_ex(), pthread_tryjoin_np, and lll_wait_tid, all of
> which are used to implement POSIX thread joining.

GNU style is not to use () after function names.

> Firstly, in pthread_tryjoin_np() we only attempt the join if a read of
> pd->tid == 0, because that means the thread has already been reaped by
> the kernel and we can safely join it without blocking.
>
> Secondly, all join implementations call the common
> __pthread_timedjoin_ex and only if abstime is NULL (block) do we
> actually need to use cancellation (to cancel the potentially infinite
> wait).

I think the change regarding abstime == NULL is wrong.  This is about
pthread_join/pthread_timedjoin_np (blocking) on the one hand and
pthread_tryjoin_np on the other (not blocking).

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]