This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add futex wrappers with error checking v2
- From: Torvald Riegel <triegel at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Fri, 09 Jan 2015 19:46:56 +0100
- Subject: Re: [PATCH] Add futex wrappers with error checking v2
- Authentication-results: sourceware.org; auth=none
- References: <1420801519 dot 29798 dot 80 dot camel at triegel dot csb>
On Fri, 2015-01-09 at 12:05 +0100, Torvald Riegel wrote:
> Compared to the previous patch, this splits futex_timed_wait into two
> variants with relative and absolute timeouts, respectively. This allows
> for removing a few cases of code duplication in pthreads code, which
> uses absolute timeouts; also, it allows us to put platform-specific code
> to go from an absolute to a relative timeout into the platform-specific
> futex abstractions.
> The latter is done by adding lll_futex_abstimed_wait. I expect that we
> will refactor this later on, depending on how we do the lll_ parts.
This is missing a fixup I hadn't merged. The code works as-is for the
current uses, but the docs for futed_*timed_wait claim that NULL can be
passed as timeout arg, which is not the case with this patch. I'll fix
this with a follow-up.
> Tested on x86_64 gnu linux. Not tested on i386 gnu linux because I get
> a build failure that doesn't seem to be related to my patch (multiple
> definitions of `_dl_addr_inside_object' and `_itoa'). I'll investigate
> the latter, and report if I see regressions due to my patch.
This seems to be due to the changes in nptl/cancellation.c. I don't yet
know why, but will continue looking. If anyone has a suggestion, please
let me know.