This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ 19944] nptl/pthread_mutex*lock: don't ignore unknown error codes
- From: Torvald Riegel <triegel at redhat dot com>
- To: Sebastian Andrzej Siewior <sebastian at breakpoint dot cc>
- Cc: Roland McGrath <roland at hack dot frob dot com>, Sebastian Andrzej Siewior <bigeasy at linutronix dot de>, libc-alpha at sourceware dot org, carlos at redhat dot com
- Date: Thu, 14 Apr 2016 16:36:10 +0200
- Subject: Re: [PATCH][BZ 19944] nptl/pthread_mutex*lock: don't ignore unknown error codes
- Authentication-results: sourceware.org; auth=none
- References: <1460576781-12017-1-git-send-email-bigeasy at linutronix dot de> <20160413201514 dot B86212C3A9B at topped-with-meat dot com> <20160413205202 dot GA12533 at breakpoint dot cc>
On Wed, 2016-04-13 at 22:52 +0200, Sebastian Andrzej Siewior wrote:
> On 2016-04-13 13:15:14 [-0700], Roland McGrath wrote:
> > I won't bother with the several style problems in your patch. Please see
> > previous discussions about the futex error cases. Torvald was leading the
> > charge on converting things to use the new internal layers that handle
> > futex error checking. The only changes we want are in that direction.
>
> Are we talking about this thread:
> https://sourceware.org/ml/libc-alpha/2014-09/msg00381.html
>
> Subject: Futex error handling
> Date: Tue, 16 Sep 2014 17:36:25 +0200
That is the start of it. The result is that we have a new
glibc-internal futex interface that does error checking, see
sysdeps/unix/sysv/linux/futex-internal.h and
sysdeps/nptl/futex-internal.h for details.
The way we handle futex errors should be consistent with what we do in
there; if you spot missing errors we do not test for explicitly (ie,
which are listed in the updated futex manpage but not part of the glibc
code), please fix this in the wrappers.
Regarding the mutex changes, what we should do there eventually is use
the new futex interface. We cannot just forward errors to the callers
of POSIX functions because POSIX might not specify the same error codes
as futexes do.