I rarely ask questions on this forum, but since I couldn't [easily] find it in the help-files, or on-line, I'm asking you guys.
I usually (like never) don't use the 'reentrant' pragma, but I think I may have to do that with a particular routine.
BUT I can't find the key-word that declares a function as reentrant. Am I missing something? Is there one for Keil's IDE tools? If so, what is its form? Can I get a link to the 'official' use of it?
Thanks in advance, and I need it asap because I need to pass this class and I don't want to really learn how to do this 'embedded' stuff anyway but the teacher keeps hounding me.
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
//Hopes useful for you
void Count(char param) reentrant { // }
void main(void) { while(1) { Count(1); } }
//EzSVCS, SVCS for keil, http://easysoft.cc
Thanks for your input, but your prior post seemed a bit 'spam-ish' and I don't simply link to any site without knowing more about it.
Ref my post: http://www.keil.com/forum/docs/thread12146.asp
and your site's info is:
www.alexa.com/.../http://easysoft.cc
I do appreciate your input, but I'm kind of waiting for the veteran forum contributors to help [fully] answer my question.
The ARM calling convention, as defined does not require any special #pragma to cause a function to be reentrant. Use of global variables may cause a function not to be reentrant, but that is fully in your control.
Bingo !
Thanks. That is exactly the answer I needed.
(Especially from you, THE Mr. McNamara)
Oops, I missed your change of architecture.
I was about to post earlier that I use ARM so I have to do extra work to make the functions non-reentrant :)
Per, Thanks for the effort anyway.
And what is the difference between:
: Per Westermark
and
Per Westermark
?
(and, please no comments about his colon)
Hi, some more infos: en.wikipedia.org/.../Reentrant_(subroutine)
It is good to see that you are critical about your internet information sources. Receiving public answers that can be validated by other users too is a big improvement from mailing lists, where some people regularly leaves the list and posts private answers directly to the OP.
The problem with the name is that one computer have managed to sneak in (with a bit of help from me) a colon in the name field. I know about it, but always manages to make the post before remembering to fix it.
This is posted from the "ok" machine, so the other machine still has the error in the name. The machine with the problem has too little RAM so it sometimes takes a pause to swap. Then it happens that I starts to type before the form has loaded fully. If I don't notice it before posting, then the browser will remember the extra characters in all following posts until I remember to correct the name.
BUT I can't find the key-word that declares a function as reentrant. Am I missing something?
Yes - first year computer science.
Are you still left with the impression that the world works the same as they told you at school?
Given that Keil already has the "reentrant" keyword for some if its compilers, it is most definitely prudent to check if there is any extra magic needed for other embedded compilers:
http://www.keil.com/support/man/docs/c51/c51_le_reentrantfuncs.htm
As far as I can recall, Jack, first year computer science does not even start touching these issues (at least, not in the institution where I studied. The more theoretical programs don't, at all!). I guess this puts me high on your black list, then.
C'mon, Jack, if you want to be condescending, at least do it right. First year computer science does not necessarily involve C in any way, and therefore won't convey the bit of information that C functions are considered reentrant by default unless noted otherwise in the compilers manual.
Therefore, you'd have to point to K&R or another C textbook, not first year computer science classes.
But Christoph, the captain told us in the past that he had the privilege of working together with some of the guys that thought up C in the first place. Do you seriously believe Jack can muster K&R against him...?
.....working together with some of the guys....
And I worked together with some of the guys from Led Zeppelin, but it hasn't made me a great musician!
...but it hasn't made me a great musician!
that was not my intention. But Jack's insinuation that the captain needs basic training after all these years is in simple terms - repugnant. The guy was/is building guided missiles, for god's sake (maybe that's Jack's problem...?).
View all questions in Keil forum