freebsd-skq/sys/amd64
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
..
acpica Reduce code duplcations from r190620. While I am here, tweak a comment. 2009-04-02 01:46:57 +00:00
amd64 - Fix divide-by-zero panic when SMP kernel is used on UP system[1]. 2009-04-30 22:10:04 +00:00
compile
conf - Import infrastructure for caching flows as a means of accelerating L3 and L2 lookups 2009-04-19 00:16:04 +00:00
ia32 Save and restore segment registers on amd64 when entering and leaving 2009-04-01 13:09:26 +00:00
include - Add support for cpuid leaf 0xb. This allows us to determine the 2009-04-29 06:54:40 +00:00
isa Now that all platforms use genclock, shuffle things around slightly 2008-04-22 19:38:30 +00:00
linux32 Reimplement futexes. 2009-05-01 15:36:02 +00:00
pci Fall back to using configuration type 1 accesses for PCI config requests if 2009-03-24 18:10:22 +00:00
Makefile Adjustments to make a tags file a bit more suitable to amd64. 2008-12-01 14:15:10 +00:00