freebsd-dev/sys/compat/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
..
linux_emul.c Remove support for FUTEX_REQUEUE operation. 2009-04-19 13:48:42 +00:00
linux_emul.h Remove support for FUTEX_REQUEUE operation. 2009-04-19 13:48:42 +00:00
linux_file.c Add stuff to support upcoming BMC/IPMI flashing of newer Dell machine 2009-03-26 17:14:22 +00:00
linux_file.h Implement the linux syscalls 2008-04-08 09:45:49 +00:00
linux_futex.c Reimplement futexes. 2009-05-01 15:36:02 +00:00
linux_futex.h Ignore FUTEX_FD op, as it is done by linux. 2009-03-15 19:38:34 +00:00
linux_getcwd.c Use shared vnode locks when invoking VOP_READDIR(). 2009-02-13 18:18:14 +00:00
linux_ioctl.c For all files including net/vnet.h directly include opt_route.h and 2009-02-27 14:12:05 +00:00
linux_ioctl.h Add TIOCPKT and TIOCSPTLCK to the Linuxolator. 2008-07-23 17:47:44 +00:00
linux_ipc.c Document that all the other commands are either 2008-11-26 16:38:43 +00:00
linux_ipc.h MFP4 (110956): 2006-12-21 13:11:06 +00:00
linux_mib.c Switch to emulating Linux 2.6 on default. 2008-06-03 17:50:13 +00:00
linux_mib.h MFp4 (111746+): 2006-12-31 12:39:10 +00:00
linux_misc.c Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries which 2009-03-04 12:14:33 +00:00
linux_misc.h A better fix for handling different FPU initial control words for different 2009-03-05 19:42:11 +00:00
linux_signal.c Correctly fill siginfo for the signals delivered by linux tkill/tgkill. 2008-10-19 10:02:26 +00:00
linux_signal.h Correctly fill siginfo for the signals delivered by linux tkill/tgkill. 2008-10-19 10:02:26 +00:00
linux_socket.c In preparation for turning on options VIMAGE in next commits, 2009-04-26 22:06:42 +00:00
linux_socket.h Make linux_sendmsg() and linux_recvmsg() work on linux32/amd64. 2008-11-29 17:14:06 +00:00
linux_stats.c Don't make Linux stat() open character devices to resolve its name. 2009-02-20 13:05:29 +00:00
linux_sysctl.c Unbreak COMPAT_LINUX32 option support on amd64. 2006-03-19 11:10:33 +00:00
linux_sysproto.h Handle unimplemented syscall by instantly returning ENOSYS instead of sending 2005-03-07 00:18:06 +00:00
linux_time.c MFP4: 109655 2006-12-20 20:17:35 +00:00
linux_uid16.c Add the support for the AT_FDCWD and fd-relative name lookups to the 2008-03-31 12:01:21 +00:00
linux_util.c Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
linux_util.h Implement the linux syscalls 2008-04-08 09:45:49 +00:00