This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nptl: Rewrite cancellation macros
- From: Rich Felker <dalias at libc dot org>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 4 Jun 2015 16:07:20 -0400
- Subject: Re: [PATCH] nptl: Rewrite cancellation macros
- Authentication-results: sourceware.org; auth=none
- References: <555C95DD dot 1050705 at linaro dot org>
On Wed, May 20, 2015 at 11:10:37AM -0300, Adhemerval Zanella wrote:
> Hi
>
> This patch is another of the required adjustments for the fix for bz12683
> (Race conditions in pthread cancellation) and the idea is to remove
> LIBC_CANCEL_ASYNC/LIBC_CANCEL_RESET explicit usage.
>
> This patch changes the way cancellation entrypoints are defined to
> instead call the macro SYSCALL_CANCEL. An usual cancellation definition
> is defined as:
>
> if (SINGLE_THREAD_P)
> return INLINE_SYSCALL (syscall, NARGS, args...)
>
> int oldtype = LIBC_CANCEL_ASYNC ();
>
> return INLINE_SYSCALL (syscall, NARGS, args...)
>
> LIBC_CANCEL_RESET (oldtype);
>
> And it is rewrited as just:
>
> SYSCALL_CANCEL (syscall, args...)
I haven't reviewed the patch in detail but it looks exactly right in
concept. Happy to see this moving forward!
Rich