This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix build warning in pthread_rwlock_*
- From: Will Newton <will dot newton at linaro dot org>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Tue, 24 Jun 2014 10:13:47 +0100
- Subject: Re: [PATCH] Fix build warning in pthread_rwlock_*
- Authentication-results: sourceware.org; auth=none
- References: <20140619165137 dot GR7238 at spoyarek dot pnq dot redhat dot com>
On 19 June 2014 17:51, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> Hi,
>
> The first argument of elision_adapt and that of ELISION_*LOCK have
> different signs since __elision_rwcount is singned char and the
> argument of elision_adapt is uint8_t. Modified elision_adapt to
> accept int8_t instead of uint8_t.
>
> Siddhesh
>
> * sysdeps/x86/nptl/elide.h (elision_adapt): Make first
> argument type int8_t.
This looks ok to me, although I don't have the hardware to test.
> diff --git a/sysdeps/x86/nptl/elide.h b/sysdeps/x86/nptl/elide.h
> index 19f27e5..3979146 100644
> --- a/sysdeps/x86/nptl/elide.h
> +++ b/sysdeps/x86/nptl/elide.h
> @@ -26,7 +26,7 @@
> /* Adapt elision with ADAPT_COUNT and STATUS and decide retries. */
>
> static inline bool
> -elision_adapt(uint8_t *adapt_count, unsigned int status)
> +elision_adapt(int8_t *adapt_count, unsigned int status)
> {
> if (status & _XABORT_RETRY)
> return false;
--
Will Newton
Toolchain Working Group, Linaro