Robust Futex patches available

From: David Singleton
Date: Tue Nov 22 2005 - 15:38:26 EST



There are two new patches for Robust Futex support available at

http://source.mvista.com/~dsingleton

patch-2.6.14-rt13-rf3 fixes two locking bugs which caused hangs and deadlocks.

patch-2.6.14-rt13-rf4 adds support for pthread_mutexes 'malloc'ed on the heap.

I'd also like some advice on the direction POSIX is heading with respect to
robust pthread_mutexes and priority inheritance.

It appears there are some not used openposix tests that use different flags for
defining robustness. Here is a snip from the openposix robust test's README:

Robust Mutex Tests
------------------------
The tests are under <rtnptl-tests>/robust_test directory.

rt-nptl supports 'robust' behavior, there will be two robust modes,
one is PTHREAD_MUTEX_ROBUST_NP mode, the other is
PTHREAD_MUTEX_ROBUST_SUN_NP mode. When the owner of a mutex dies in
the first mode, the waiter will set the mutex to ENOTRECOVERABLE
state, while in the second mode, the waiter needs to call
pthread_mutex_setconsistency_np to change the state manually.

Currently the PTHREAD_MUTEX_ROBUST_NP is providing
the fucntionality described by the PTHREAD_MUTEX_ROBUST_SUN_NP.

Any advice on which way we should go? I feel we should follow
POSIX and provide both methods and the new pthread_mutex_setconsistency_np
function which provides the mutex recovery mechanism.

David

-
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/