Page 1 of 1

OSSignalXYZ() improvement

PostPosted: Wed Jan 10, 2001 5:02 am
by luben
Hello,

I think that you can apply the idea of OSTimer() to OSSignalXYZ() - when you signal an event from interrupt you can set in the interrupt routine only some flags and in the Scheduler you can complete the whole job. This will save interrupt levels and will decrease the interrupt response time.

I mean, OSSignalXYZ could be made from 2 parts (at least when you call it from interrupt routine).

Because I suspect that calling OSSignalMsgQ form interrupt will bring big limitations for the stack depth - is it consumes 4 levels, the allowed maximum user stack level will be 3 (and if I use ICD - 2).. not good.

Regards
Luben


Re: OSSignalXYZ() improvement

PostPosted: Wed Jan 10, 2001 5:17 am
by aek
OSSignalMsgQ() consumes three (3) stack levels.

You're correct about the stack depth limitations on the user program when calling OSSignalXyz() from an interrupt -- on a PIC16 PICmicro, that consumes 1 (for ISR) + 3 (for OSSignalXyz()) = 4 stack levels, leaving at best 8-4-1=3 ((task level is 1, with OSSched() in-lined)) to work with.

We're looking at applying the same kind of architectural change to OSSignalXyz() as we did to OSTimer(). Unfortunately, it's much more difficult, due to a variety of reasons. Such changes will not be in the v2.2 release.


Re: OSSignalXYZ() improvement

PostPosted: Wed Jan 10, 2001 5:29 am
by luben
Hello,
By the way, how many interrupt levels consume OSSignalMsgQ()?

Regards
Luben