1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00
freebsd/sys/i386/linux
Dmitry Chagin 79262bf1f0 Reimplement futexes.
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.

New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.

Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.

Approved by:	kib (mentor)
MFC after:	1 month
2009-05-01 15:36:02 +00:00
..
imgact_linux.c VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
linux_dummy.c Implement robust futexes. Most of the code is modelled after 2008-05-13 20:01:27 +00:00
linux_genassym.c Segment registers are stored in the uc_mcontext member of the struct 2008-09-07 16:39:21 +00:00
linux_ipc64.h
linux_locore.s Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions 2009-01-31 11:37:21 +00:00
linux_machdep.c Adapt linux emulation to use cv for vfork wait. 2009-02-18 16:11:39 +00:00
linux_proto.h Regenerate system call tables for r184789. 2008-11-09 10:48:06 +00:00
linux_ptrace.c - Move all of the PS_ flags into either p_flag or td_flags. 2007-09-17 05:31:39 +00:00
linux_support.s Move futex support code from <arch>/support.s into linux compat directory. 2007-05-23 08:33:06 +00:00
linux_syscall.h Regenerate system call tables for r184789. 2008-11-09 10:48:06 +00:00
linux_sysent.c Regenerate system call tables for r184789. 2008-11-09 10:48:06 +00:00
linux_sysvec.c Reimplement futexes. 2009-05-01 15:36:02 +00:00
linux.h Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries which 2009-03-04 12:14:33 +00:00
Makefile
syscalls.conf
syscalls.master Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4. 2008-11-09 10:45:13 +00:00