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:
Joel Sherrill
2008-09-05 21:33:41 +00:00
parent 538583f5b1
commit 252dea2fa1
2 changed files with 11 additions and 2 deletions

View File

@@ -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,

View File

@@ -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 );
}