[PATCH] i386: Move futex functions from lowlevellock.h to lowlevellock-futex.h.

Torvald Riegel triegel@redhat.com
Thu Dec 18 00:05:00 GMT 2014


This patch splits out the futex operations from i386 lowlevellock.h into
a i386-specific lowlevellock-futex.h.  We cannot currently use the
generic lowlevellock-futex.h because of lack of support for six-argument
syscalls on i386.  The new i386 lowlevellock-futex.h has fewer features
than the generic one, but this works currently because of other i386
assembly code covering other cases.

This patch is useful for further steps of the refactoring of the
internal futex API.  For example, the futex interface with error
checking that I posted can now just include lowlevellock-futex.h and
define the futex operations, that could then in turn be used in the
generic lowlevellock.h implementation, giving us a low-level lock with
futex error checking.

We should be able to remove the i386 lowlevellock-futex.h once somebody
has implemented the 6-argument syscall wrappers.

Tested and no regressions on i386.  Looked at nptl/pthread_once.o and
didn't see anything weird.

OK?


2014-12-17  Torvald Riegel  <triegel@redhat.com>

	* sysdeps/unix/sysv/linux/i386/lowlevellock-futex.h: New file.
	Contains futex constants and functions moved over from ...
	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: ... here.  Include
	<lowlevellock-futex.h>.
	(lll_wait_tid): Use lll_futex_wait instead of assembly code.
	(lll_timedwait_tid): Add comments and parentheses around macro
	arguments.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: lll-i386.patch
Type: text/x-patch
Size: 11208 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20141218/6adc27ba/attachment.bin>


More information about the Libc-alpha mailing list