Hello folks,

I'm using Xenomai 2.0.1 with Linux 2.6.14 and ipipe. I've a strange problem using mutex-locks. Repeted calls to rt_mutex_lock with TM_NONBLOCK on the same mutex return always 0, which means lock successfully aquired, if I understand the API-documentation right. I've attached a small programm to test that behavior and the log-messages it produces on my machine. Perhaps anyone has a hint, what I'm doing wrong...

Greetings Kai Moritz

Attachment: mutex.tgz
Description: GNU Unix tar archive

Nov 29 19:35:47 localhost kernel: mutex: module initialization... mutex: 
creating mutex... done!
Nov 29 19:35:47 localhost kernel: mutex: initializing test thread... done.
Nov 29 19:35:47 localhost kernel: mutex: starting rt timer (one shot mode)... 
done.
Nov 29 19:35:47 localhost kernel: mutex: starting test thread... 
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  0th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  1th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  2th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  3th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  4th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  5th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  6th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  7th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  8th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the  9th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 10th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 11th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 12th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 13th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 14th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 15th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 16th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 17th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 18th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: locking mutex the 19th time...done: 0!
Nov 29 19:35:47 localhost kernel: mutex: all tests done!
Nov 29 19:35:47 localhost kernel: mutex: test thread successfully started.
Nov 29 19:35:47 localhost kernel: mutex: module initialization done.
Nov 29 19:35:47 localhost kernel: mutex: deleting mutex... done!
Nov 29 19:35:47 localhost kernel: mutex: module cleanup done.

Reply via email to