Grafico dei commit

4 Commit

Autore SHA1 Messaggio Data
Bill(Shuzhou) Liu 160c99d12d SWDEV-400644: Reset the mutex only if errors
To prevent reset the mutex while using it, only reset the mutex
if it cannot acquire it.

Change-Id: I95e0ed1bf543f285ce81b4df9c51e16a88081d38
2023-05-22 11:20:44 -04:00
Bill(Shuzhou) Liu 76b5528feb Remove the shared mutex if no process is using it
If the code is crashed and the mutex may be in bad status. The user
has to mannually remove it. The fix will remove the shared mutex
if no process is using it.

Change-Id: I18bf562f2e0a7de8b3f0cccf72d60950b0d9bb2d
2022-11-22 10:30:58 -05:00
Chris Freehill f4938b0ac9 Fix process killed while holding mutex
Previously, when a process holding a shared mutex was killed,
the next time an RSMI application was started, it would not be
able to obtain the mutex--the application would have to exit.
This fix uses pthread_mutexattr_setrobust() to detect this
situation and act accordingingly.

Also, add some missing, needed mutexes and move mutexes
closer to where the protect resource is used.

Change-Id: Icfdc3a246f4cfa3fd008e3f13472199abd76fd35
2020-12-04 12:59:55 -05:00
Chris Freehill 6594f8f58b Refactor rsmi to support oam
Change-Id: Idc524e01ba06eb5c8d1682becaf5bf8ced5bffcf
2020-06-22 18:51:46 -05:00