forked from Imagelibrary/rtems
2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* shmsupp/lock.c: Disable CPU interrupts when we have the shared memory locked. This is necessary to prevent deadlock.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* shmsupp/lock.c: Disable CPU interrupts when we have the shared memory
|
||||||
|
locked. This is necessary to prevent deadlock.
|
||||||
|
|
||||||
2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* Makefile.am, preinstall.am, shmsupp/getcfg.c, shmsupp/lock.c,
|
* Makefile.am, preinstall.am, shmsupp/getcfg.c, shmsupp/lock.c,
|
||||||
|
|||||||
@@ -41,10 +41,13 @@ void Shm_Initialize_lock(
|
|||||||
* a deadlock condition.
|
* a deadlock condition.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static rtems_interrupt_level level;
|
||||||
|
|
||||||
void Shm_Lock(
|
void Shm_Lock(
|
||||||
Shm_Locked_queue_Control *lq_cb
|
Shm_Locked_queue_Control *lq_cb
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
rtems_interrupt_disable( level );
|
||||||
(void) PSIM.Semaphore.lock;
|
(void) PSIM.Semaphore.lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,4 +62,5 @@ void Shm_Unlock(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
(void) PSIM.Semaphore.unlock;
|
(void) PSIM.Semaphore.unlock;
|
||||||
|
rtems_interrupt_enable( level );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user