Pumpkin, Inc.

Pumpkin User Forums

OSCreateMsg

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

Re: OSCreateMsg

Postby Gerald » Mon Mar 31, 2008 3:16 am

what are eFlags? and what is OSWaitEFlag doing?

whats the difference between eFlags and WaitForMultipleObjects?

how could i share a var between two tasks? should the var be atomic?

bye

Gerald
 
Posts: 24
Joined: Tue Mar 11, 2008 11:00 pm

Re: OSCreateMsg

Postby aek » Mon Mar 31, 2008 8:51 am

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

Re: OSCreateMsg

Postby Gerald » Tue Apr 01, 2008 11:20 am

void Task1()
{
for(;
{
if(start_process == true)
{
// do some work
start_process = false;
OSSignalMsg
}
else
{
// do some other work like receive on a LIN Bus
}

OS_Delay(50);
}
}

void Task2()
{
for(;
{
OS_WaitMsg

// start a process...
// process done...

start_process = true;

OS_Delay(50);
}
}

which synchronisation object do you prefer here for the global var start_process? it must not block task1!

Gerald
 
Posts: 24
Joined: Tue Mar 11, 2008 11:00 pm

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron