This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nptl: Document AS-safe functions in cancellation.c.
- From: Zack Weinberg <zackw at panix dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Fri, 4 Oct 2019 16:45:30 -0400
- Subject: Re: [PATCH] nptl: Document AS-safe functions in cancellation.c.
- References: <4f3ca170-c8d2-f684-4922-a799413dddda@redhat.com>
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