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>
|
||||
|
||||
* Makefile.am, preinstall.am, shmsupp/getcfg.c, shmsupp/lock.c,
|
||||
|
||||
@@ -41,11 +41,14 @@ void Shm_Initialize_lock(
|
||||
* a deadlock condition.
|
||||
*/
|
||||
|
||||
static rtems_interrupt_level level;
|
||||
|
||||
void Shm_Lock(
|
||||
Shm_Locked_queue_Control *lq_cb
|
||||
)
|
||||
{
|
||||
(void) PSIM.Semaphore.lock;
|
||||
rtems_interrupt_disable( level );
|
||||
(void) PSIM.Semaphore.lock;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -58,5 +61,6 @@ void Shm_Unlock(
|
||||
Shm_Locked_queue_Control *lq_cb
|
||||
)
|
||||
{
|
||||
(void) PSIM.Semaphore.unlock;
|
||||
(void) PSIM.Semaphore.unlock;
|
||||
rtems_interrupt_enable( level );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user