Problem with rtems directive

Joel Sherrill joel at
Mon May 21 15:56:22 UTC 2001

jennifer averett wrote:

> If you have disabled interrupts you should enable them prior
> to calling rtems_task_suspend.

Actually interrupts will be set to a different level as part of the 
context switch.  So
when you get to the idle task, they are reenabled.  You probably do not have
the interrupt handler installed.  As soon as the context switch restores 
the eflags
of the idle task, BAM the interrupt occurs with no handler.


> Jennifer
> Soumyadeb Mitra wrote:
>> Hello
>>         I am using RTEMS for an academic project invloving porting
>> a linux driver to rtems.
>>         I am having a problem with the following piece of code.
>>         __asm__("cli");
>>         fpga[0]=0;
>>         rtems_task_suspend(RTEMS_SELF);
>> This is the only thread running(apart from the idle thread).The assignment
>> statement fpga[0]=0 immediately triggers a hardware interrupt.But since
>> the current thread has interrupts disabled the ISR is not called.
>>         However once the current thread is suspended ,the ISR should be
>> invoked.
>>         For somme strange reason the above code generates an exception.The
>> thread id  printed by the exception handler is that of the idle-thread.
>> Has anyone faced similar problems or has a solution?
>> Thanks
>> Soumyadeb

More information about the users mailing list