-
Bug
-
Resolution: Fixed
-
Medium
-
PDK
-
PDK-6793
-
PDK_J7_06.02.00
-
PROCESSOR_SDK_08.00.00
-
PDK uses of Semaphore as mutex. This can create deadlock as Semaphore is not a mutex as it has no concept of thread ownership
For example:
Task 1
FxnA
Mutex_acquire(a)
Call FxnB
FxnB
Mutex_acquire(a)
This example will work correctly as expected if Mutex is implemented using a OS primitive like GateMutex provided by sysbios.
Instead we use Semaphore and this will cause FxnB to block.
Sysbios provides a mutex primitives under ti.sysbios.gates.
GateAll can be used if we want Hwi/Swi and Task protected critical section.