[PATCH] nptl: Document AS-safe functions in cancellation.c.
Zack Weinberg
zackw@panix.com
Fri Oct 4 20:45:00 GMT 2019
On Fri, Oct 4, 2019 at 4:01 PM Carlos O'Donell <carlos@redhat.com> wrote:
>
> In a recent conversation with Mathieu Desnoyer he pointed out that
> because write is AS-safe all the wrappers around write should be
> also AS-safe. We don't spell that out explicitly in the comments
> for __pthread_enable_asynccancel and __pthread_disable_asynccancel
> so I added them here.
>
>
> /* The next two functions are similar to pthread_setcanceltype() but
> more specialized for the use in the cancelable functions like write().
> - They do not need to check parameters etc. */
> + They do not need to check parameters etc. This function must be
> + AS-safe, with the exception of the actual cancellation, because they
> + are called by wrappers around AS-safe functions like write().*/
Grammar nit: Either "_These functions_ must be AS-safe, ..." or
"because _it is_ called." The former is probably better because
consistent with the first sentence in this comment...
> -
> +/* This function must be AS-safe, with the exception of the actual
> + cancellation, because they are called by wrappers around AS-safe
> + functions like write().*/
... but then maybe you _don't_ want to add this comment as well.
zw
More information about the Libc-alpha
mailing list