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

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 625029
To read all comments associated with this story, please click here.
RE[7]: Mutex behavior
by dpJudas on Fri 19th Feb 2016 19:56 UTC in reply to "RE[6]: Mutex behavior"
Member since:

Now we're forced to "reinvent the wheel" just to work around the cases for which a mutex is not properly defined. Alas, it is what it is.

It is not "properly defined" to increase the chance more optimal implementations are possible without having to support weird usages such as "lock mutex in one thread and unlock in another".

Exactly why you had to lock it in one thread and release it in another is still not clear (to me), but I'm guessing there is a good chance that some of the other pthread primitives available would have been a better fit for the problem at hand.

Reply Parent Score: 2