This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] pthread_once: Use futex wrappers with error checking.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Tue, 9 Dec 2014 16:02:52 -0800 (PST)
- Subject: Re: [PATCH 2/2] pthread_once: Use futex wrappers with error checking.
- Authentication-results: sourceware.org; auth=none
- References: <1417726487 dot 22797 dot 48 dot camel at triegel dot csb> <1417726635 dot 22797 dot 50 dot camel at triegel dot csb> <20141205003647 dot 854CA2C3A73 at topped-with-meat dot com> <1417804623 dot 22797 dot 106 dot camel at triegel dot csb>
> - lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
> + futex_wake ((unsigned int *)once_control, INT_MAX, FUTEX_PRIVATE);
Always put a space after a cast.
> + ignore_value (futex_wait ((unsigned int *)once_control,
> + (unsigned)newval, FUTEX_PRIVATE));
Ditto, and always 'unsigned int', never 'unsigned'.
> - lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
> + futex_wake ((unsigned int *)once_control, INT_MAX, FUTEX_PRIVATE);
Space here too.