Pumpkin, Inc.

Pumpkin User Forums

OS_WaitXYZ() and while() strange behaviour

If you can't make Salvo do what you want it to do, post it here.

OS_WaitXYZ() and while() strange behaviour

Postby luben » Tue Feb 06, 2001 10:06 am

Hello,

In your service bulletin you menshened about strange behaviour if else is immediately after OS_WaitXYZ.

Here I can report other strange behaviour - if while () is immediately after OS_WaitXYZ.

I found that the <while> is not executed correctly if it's immediately after OS_WaitXYZ. After I put a dummy command -
var=var;
the problem disappeared. Anyway, knowing this, I can prevent any feature problems. Maybe it's from the <demo> version problems, who knows. But defenetly the while() was not executed correctly after OS_waitXYZ(). Because I read your service bulletin, I guessed that the solution is similar.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: OS_WaitXYZ() and while() strange behaviour

Postby Salvo Tech Support » Wed Feb 07, 2001 9:05 am

Hi Luben.

Can you post a complete code fragment with several lines before and after OS_WaitXyz()? That would be helpful.

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: OS_WaitXYZ() and while() strange behaviour

Postby luben » Wed Feb 07, 2001 10:30 am

Hello,

Unfortunately I don't keep non working copies of my projects. But for sure the fragment was something like that:

code:

OS_WaitBinSem(SEM,Label);
while(......)


after I put var=var; (like you recommended somewhere in the forum) between them the problem disappered.

You menshened in the forum that this could appear with <else>, but seems that this appeares with while too.

About the strange behaviour - the <while> is just not executed, just like it not exists. I was quiet surprised to see such behaviour with ICD sond. I lost alomost half day to locate the problem. I tried to rewrite the row with while, to change the logical expression - in vain. After I put dummy instruction everything was OK.

Between while and OS_WaitXYZ was empty row, but without empty row is the same.

If you interest more in the problem I'll try to remade the mistake and to send you "bug" file.

Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: OS_WaitXYZ() and while() strange behaviour

Postby Salvo Tech Support » Thu Feb 08, 2001 7:59 am

Hi Luben.

1) A full code fragment would definitely be useful.

2) Are you using PIC C v7.86PL3 or higher?

3) Did you try the same code without optimizations?

4) Did you implement one of the suggested workarounds in SB-3?

5) The fix you mention is in the Tips, Tricks and Troubleshooting chapter of the Salvo User Manual under While() statements and context switches.

[This message has been edited by Salvo Tech Support (edited February 08, 2001).]

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: OS_WaitXYZ() and while() strange behaviour

Postby luben » Thu Feb 08, 2001 9:36 am

Hello,

>>2) Are you using PIC C v7.86PL3 or higher?
I'm using v7.86PL3


>>3) Did you try the same code without optimizations?
no, I didn't try it with optimization switched OFF


>>4) Did you implement one of the suggested workarounds in SB-3?
SB-3 fixes the problem in the same way

I'll try to remade the project (and the error) and to see the same mistake with real object and using ICD sond. Then will send you the source.

Regards
Luben


luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria


Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron