opnsense-src/sys/amd64/linux32
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
..
linux.h Revert 190445 change to this file restoring: 2009-03-27 17:00:49 +00:00
linux32_dummy.c Implement robust futexes. Most of the code is modelled after 2008-05-13 20:01:27 +00:00
linux32_genassym.c Segment registers are stored in the uc_mcontext member of the struct 2008-09-07 16:39:21 +00:00
linux32_ipc64.h
linux32_locore.s Save and restore segment registers on amd64 when entering and leaving 2009-04-01 13:09:26 +00:00
linux32_machdep.c Save and restore segment registers on amd64 when entering and leaving 2009-04-01 13:09:26 +00:00
linux32_proto.h Regenerate 2008-11-29 14:57:58 +00:00
linux32_support.s Move futex support code from <arch>/support.s into linux compat directory. 2007-05-23 08:33:06 +00:00
linux32_syscall.h Regenerate 2008-11-29 14:57:58 +00:00
linux32_sysent.c Regenerate 2008-11-29 14:57:58 +00:00
linux32_sysvec.c Reimplement futexes. 2009-05-01 15:36:02 +00:00
Makefile
syscalls.conf - Remove unused sysvec variables from various syscalls.conf. 2006-08-15 17:25:55 +00:00
syscalls.master Fix iovec32 for linux32/amd64. 2008-11-29 14:55:24 +00:00