Pumpkin, Inc.

Pumpkin User Forums

OSMsgQEmpty

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

OSMsgQEmpty

Postby aek » Mon Aug 26, 2002 1:49 am

Hello.

We'll take a look at that and try to fix it -- I believe it's related to a cast inside that function.

Regards,

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

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

Re: OSMsgQEmpty

Postby jtemples » Mon Aug 26, 2002 11:47 am

This doesn't appear to be a Salvo problem, but I have noticed that an OSMsgQEmpty call takes about 400 cycles with Hi-Tech PICC18. The culprit is a "call awdiv" generated by the compiler for this function, which takes about 300 cycles. The pointer expression must be too complicated for the compiler.
jtemples
 
Posts: 45
Joined: Tue Jul 16, 2002 11:00 pm

Re: OSMsgQEmpty

Postby aek » Sat Oct 19, 2002 8:51 am

Man, that awdiv is brutal. It appears to be used because of the pointer arithmetic that's done inside of OSMsgQEmpty().

The net result is that OSMsgQEmpty() is unbelievably slow, with interrupts disabled while it runs. Clearly, it is to be avoided when it compiles like this ...

Anyway, I've added an OSMsgQCount() to the v3.1 distribution. 10 cycles or so for PICC-18.

Regards,

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

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


Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron