Page 1 of 1

OS_Delay allowed in main loop?

PostPosted: Tue Jul 28, 2009 10:37 am
by Justin
Hello,
is allowed to call OS_Delay in the main loop where OSSched is called?
bye

Re: OS_Delay allowed in main loop?

PostPosted: Tue Jul 28, 2009 10:54 am
by aek
No.

In Salvo, context switches (i.e. all OS_Xyz() calls) are only permitted in tasks.

------------------


Re: OS_Delay allowed in main loop?

PostPosted: Wed Jul 29, 2009 9:58 am
by Justin
What happens if u do OS_Delay in the main loop where OSSched is called?

The user manual says: its not allowed to call OS_Delay outside of a tacks if u dont have a Stack.

But i defined a CStack and RStack in the IAR Embedded Workbench. So OS_Delay should work?

[This message has been edited by Justin (edited July 30, 2009).]


Re: OS_Delay allowed in main loop?

PostPosted: Thu Jul 30, 2009 12:01 am
by Justin
Ok, The reason is Salvo does not use a Stack?

Re: OS_Delay allowed in main loop?

PostPosted: Thu Jul 30, 2009 6:44 am
by aek
Yes.

More precisely, Salvo does not use task stacks.

------------------


Re: OS_Delay allowed in main loop?

PostPosted: Thu Jul 30, 2009 11:38 am
by aek
The user manual says: it's not allowed to call OS_Delay outside of a task.

------------------


Re: OS_Delay allowed in main loop?

PostPosted: Fri Jul 31, 2009 8:01 am
by aek
It will return OS_EVENT_FULL whenever the event is full ...

The event will be "not ful" depending on the frequencies and priorities of the waiting and signaling tasks.

------------------


Re: OS_Delay allowed in main loop?

PostPosted: Fri Jul 31, 2009 11:16 am
by Justin
ok fine,
if u have two tasks signaling the same message and one receiver...how often OSSignalMsg will return OS_EVENT_FULL?