Lucian Copat wrote: > I am using PICC-18 8.35, but I would like to avoid declaring reentrant > procedures. Why? After all, this is what you want. BTW, they are not really declared as being re-entrant, you just tell the compiler that you will take care that the routine will not be called from an interrupt thread while it's being run from the main thread. > So there is not a *standard* way of treating this kind of interrupt ? I'm not sure what you mean by "standard". A C compiler that uses a static stack and creates non-reentrant code is in that respect non-standard, so if you want that, you need to use a different compiler. However, such code on a PIC 18 is in general less efficient. OTOH, with PICC-18, declaring such a function in the appropriate way (that is, telling the compiler it is ok that it appears in both the main call tree and an interrupt call tree because you are taking care that it won't be in the routine in both threads at the same time) /is/ the standard way of treating this kind of situation. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist