[ECOS] catch errors in eCos's kernel

james chen james_ch1@sina.com
Fri Sep 7 18:48:00 GMT 2001


> > 2.
> > The function will generate a assert "Unnecessary call to unlock_inner()"
> > if we call it when timeout has already fired.It occurs because if the
> > timeout
> > is in the past, the thread will be woken up immediately and will not
sleep.
> > so we needn't use Cyg_Scheduler::unlock_reschedule() in line 749 to
> > reschedule.
> > The lines begin with "+" is my suggestion to add.
>
> I'm afraid I don't see why that assertion would fire because the thread
> state should be Cyg_Thread::SLEEPing (as set by the self->sleep() below),
> not Cyg_Thread::RUNNING. Or am I missing something?
>

I can catch it 100% when use the following test code:

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         struct timeval tout;
         tout.tv_sec = 0;
         tout.tv_usec = 1;

         select(0, NULL, NULL, NULL, &tout);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PS: my RTC interrupt generate each 5 milliseconds





More information about the Ecos-discuss mailing list