Vijayraj Hada
|
Resume from InterruptWait()
|
Vijayraj Hada
05/03/2010 10:46 AM
post53425
|
Resume from InterruptWait()
void *thread(void *arg)
{
int intId;
ThreadCtl(_NTO_TCTL_IO, NULL)
SIGEV_INTR_INIT(&event);
intId = InterruptAttachEvent(IRQ_NUM, &event, 0);
while (1) {
InterruptWait(0, NULL);
// Want to resume from here
//Interrupt Processing
InterruptUnmask (IRQ_NUM, intId);
}
}
Here
* To handle interrupt I have created thread and inside the thread I called InterruptAttachEvent();
* After that I called InterruptWait() function to wait for the interrupt to occur.
* Now this thread will be blocked at InterruptWait() until thread receives SIGEV_INTR interrupt notification which is
basically hardware interrupt.
* After it receives SIGEV_INTR notification it will resume do some processing and again call InterruptWait().
* Can anybody please tell me, Is there any other way in which I can "resume" thread blocked at InterruptWait(). I don't
want to wait for the hardware interrupt to occur.
(Note: Microprocessor I am using is Freescale's MPC8323E)
|
|
|