Linked by Elad Lahav on Thu 18th Feb 2016 19:27 UTC
QNX

A mutex is a common type of lock used to serialize concurrent access by multiple threads to shared resources. While support for POSIX mutexes in the QNX Neutrino Realtime OS dates back to the early days of the system, this area of the code has seen considerable changes in the last couple of years.

Permalink for comment 625022
To read all comments associated with this story, please click here.
RE[5]: Mutex behavior
by elahav on Fri 19th Feb 2016 17:58 UTC in reply to "RE[4]: Mutex behavior"
elahav
Member since:
2009-05-28

Notice in the link I provided earlier that the pthread mutex behavior is undefined for the conditions where one would try to signal from another thread


It may be undefined in the spec, but it is certainly defined if you are using error-checking mutexes, which is the default on QNX and optional on Linux.

Even with a mutex, a low priority thread can block a high priority thread. Am I misunderstanding you?


Read the article ;-) With priority inheritance (again, default on QNX, optional on Linux), the low priority thread will be boosted to the priority of the highest waiter until it relinquishes the mutex.

Reply Parent Score: 1