[PATCH][BZ 19944] nptl/pthread_mutex*lock: don't ignore unknown error codes

Torvald Riegel triegel@redhat.com
Thu Apr 14 14:36:00 GMT 2016


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.



More information about the Libc-alpha mailing list