CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

re-entrancy of @MUL1616

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
soundscu



Joined: 29 Jun 2007
Posts: 62
Location: Raleigh, NC

View user's profile Send private message Visit poster's website

re-entrancy of @MUL1616
PostPosted: Mon Jan 05, 2009 12:17 pm     Reply with quote

I'm getting a warning about interrupts being disabled to avoid re-entrancy in @MUL1616. Of course, this is because this routine gets used both inside and outside an interrupt routine.

Using #ORG, I've managed to create a 2nd copy of MUL1616. Looking at the assembly code, I can see there are now @MUL1616 and @@MUL1616 at different locations.

I can see every call to these two routines, and I can see where some blocks of code that I think should be inside ORGed areas are not where I expect them to be. And this results in them using the wrong copy of MUL1616.

At first is seemed liked #INLINE functions weren't getting properly placed. But now I'm not sure...

And I'm suffering from a rare system crash that seems to result from interrupts being disabled at a bad time. Any suggestions on how to rein in the #ORG thing and ensure the right copies of MUL1616s are getting used?

The only other solution I can think of is to write my interrupt routines in assembler. Geez, I'd rather not have to do that right now... I quit using PicBasicPro 'cause I had to do that in every project. :)

Thanks,
Jim
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 05, 2009 12:20 pm     Reply with quote

Post a short but complete test program. Post only the code that is
necessary to show the problem (no Wizard code). The program must
be compilable without errors. It should have an #include, #fuses, #use
delay, and a main().

Also post your compiler version.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group