This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 21/21] nptl: riscv: Fix Race conditions in pthread cancellation (BZ#12683)
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: DJ Delorie <dj at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 27 Feb 2018 10:03:07 -0300
- Subject: Re: [PATCH v2 21/21] nptl: riscv: Fix Race conditions in pthread cancellation (BZ#12683)
- Authentication-results: sourceware.org; auth=none
- References: <xninajteos.fsf@greed.delorie.com>
On 26/02/2018 22:16, DJ Delorie wrote:
> Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
>> +static inline uintptr_t
>> +ucontext_get_pc (const ucontext_t *uc)
>> +{
>> + return uc->uc_mcontext.__gregs[REG_PC];
>> +}
>
> That file already has a GET_PC() macro; why not use it?
> (I mean, in the definition of this function)
>
I used just to avoid the extra cast (long int -> void -> uintptr_t).
I do not have a strong preference here in fact.