Skip to contentSkip to conversation

Robust mutexes (-rt)

DISCUSSION David Singleton 2 participants 2 messages Feb 3, 2006 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Thomas,
here is a patch that fixes the -EINTR problem and a fix for Dinakar's
simple futex deadlock test program. When Esben's new deadlock detection is ready I plan to use it for robust futex deadlock detection, both simple and circular deadlock detection.

     http://source.mvista.com:~dsingleton/patch-2.6.15-rt16-rf1
 include/linux/futex.h |    3 +++
 kernel/futex.c          |    3 +++
 kernel/rt.c               |   19 ++++++++++++++++++-
 3 files changed, 24 insertions(+), 1 deletion(-)

David

Quoted 14 lines

Just another problem:

pthread_mutex_lock() of a robust mutex returns -EINTR, which is wrong by the specification. We encountered this in an application. Not sure what to do about that. It needs either a fix in glibc or the kernel could handle it via a restart function. That happens when a signal is delivered to the thread while the thread is blocked on the mutex.

tglx

#5 lore raw
Quoted 7 lines · David Singleton

Thomas,
here is a patch that fixes the -EINTR problem and a fix for Dinakar's
simple futex deadlock test program. When Esben's new deadlock detection is ready I plan to use it for robust futex deadlock detection, both simple and circular deadlock detection.

Quoted 6 lines
     http://source.mvista.com:~dsingleton/patch-2.6.15-rt16-rf1
 include/linux/futex.h |    3 +++
 kernel/futex.c          |    3 +++
 kernel/rt.c               |   19 ++++++++++++++++++-
 3 files changed, 24 insertions(+), 1 deletion(-)

The stats are nice. I'd prefer a patch associated with them :)

tglx