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: Rewrite cancellation macros


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...)

Looks fine to me.

Siddhesh

Attachment: pgpjQqKWf2WRB.pgp
Description: PGP signature


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