Are the run-time libraries re-entrant?
Q: Are the compiler’s run-time libraries re-entrant? Can I call library functions from an interrupt? A: Depending on which compiler you’re using, yes. If the compiler implements reentrant functions at all, then the library is fully reentrant except for the rand() function, which uses a static variable. The compilers that don’t support reentrancy are those with a compiled stack, i.e. 6805, PIC, V8 and 8051 in small and medium models. The 8051 in large model is reentrant. The other compilers – 8086, 68K, 6809, 68HC11, Z80, H8/300 and XA are fully reentrant.