[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Core Mutex Strict Order Release Support
- Date: Mon, 20 Jun 2011 20:35:36 -0400
- From: kab.conundrums at verizon.net (Kim Barrett)
- Subject: Core Mutex Strict Order Release Support
On Jun 20, 2011, at 6:09 PM, Joel Sherrill wrote:
> It is a test for the code which enforces releasing
> priority ceiling and inheritance mutexes in order.
> You would get an error for the following code
> How does the community feel about this getting
> turned on by default?
I'm only a lurker, and not an actual rtems users, but why would you
want to make this change? I've even written real code that did this
sort of thing. Something like the following (from memory, I didn't
track down actual code)
linked list of objects protected by mutex.
each object has an associated mutex that protects certain operations,
including removal from the linked list and associated deletion.
obtain(mutex for linked list)
search linked list for objectA
obtain(mutex for objectA)
release(mutex for linked list)
... do stuff with objectA, allowing other threads to scan list and
operate on other objects
release(mutex for objectA)