[PATCH]Futex doc.

From: ffrederick
Date: Fri Oct 17 2003 - 03:23:40 EST


Hi,
Someone could help me having a complete futex doc ?
Here's a first version :

Regards,
Fabian

Documentation for futexes kernel version 2.6.0-test6
(c) 2003 Fabian Frederick <ffrederick@xxxxxxxxxxxxxxxxxxxxx>

Note : Based on user man page by Bert Hubert - Comments by Jamie Lokier.

===============================================================================

This file contains documentation for Fast Userspace Mutexes.
For complete authors list and sources you can read /kernel/futex.c

===============================================================================

What's a mutex ?

Mutex stands for mutual exclusion.In other words, it helps synchronizing processes
against shared memory access for instance.

Futex is basically a counter whose value is atomically updated in userland.
Any concurrent access will be managed in kernel space.

3 futex types exist :

-shared
-private
-both

===============================================================================

Linux implementation

You can find POSIX mutex adaptation through futexes.User point of view and
documentation can be found at http://ds9a.nl/futex-manpages/

Futex interface is sys_futex syscall.Here are recognized operations:

-FUTEX_WAIT : Wait a process to up futex.
-FUTEX_WAKE : Wake up all futex waiters.
-FUTEX_FD : Associate a file descriptor to futex
-FUTEX_REQUEUE : Requeue all waiters hashed on one physical page to another
physical page.



___________________________________



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/