Pumpkin, Inc.

Pumpkin User Forums

OS_Delay allowed in main loop?

If you have a general question or comment regarding Salvo, post it here.

OS_Delay allowed in main loop?

Postby Justin » Tue Jul 28, 2009 10:37 am

Hello,
is allowed to call OS_Delay in the main loop where OSSched is called?
bye
Justin
 
Posts: 5
Joined: Wed Jul 16, 2008 11:00 pm

Re: OS_Delay allowed in main loop?

Postby aek » Tue Jul 28, 2009 10:54 am

No.

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

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OS_Delay allowed in main loop?

Postby Justin » Wed Jul 29, 2009 9:58 am

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).]

Justin
 
Posts: 5
Joined: Wed Jul 16, 2008 11:00 pm

Re: OS_Delay allowed in main loop?

Postby Justin » Thu Jul 30, 2009 12:01 am

Ok, The reason is Salvo does not use a Stack?
Justin
 
Posts: 5
Joined: Wed Jul 16, 2008 11:00 pm

Re: OS_Delay allowed in main loop?

Postby aek » Thu Jul 30, 2009 6:44 am

Yes.

More precisely, Salvo does not use task stacks.

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OS_Delay allowed in main loop?

Postby aek » Thu Jul 30, 2009 11:38 am

The user manual says: it's not allowed to call OS_Delay outside of a task.

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OS_Delay allowed in main loop?

Postby aek » Fri Jul 31, 2009 8:01 am

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.

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OS_Delay allowed in main loop?

Postby Justin » Fri Jul 31, 2009 11:16 am

ok fine,
if u have two tasks signaling the same message and one receiver...how often OSSignalMsg will return OS_EVENT_FULL?
Justin
 
Posts: 5
Joined: Wed Jul 16, 2008 11:00 pm


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron