#include #ifndef __C51__ #define reentrant #endif void test0(void) { int a=5; a++; } void test(void) reentrant { int a=5; a++; } int test1(void) reentrant { int a=5; return a; } int test2(int b) reentrant { int a=b+2; return a; } void main(void) { int a; void (*ptest)(void) reentrant; int (*ptest1)(void) reentrant; /* int (*ptest2)(int b) reentrant; */ ptest=test; ptest1=0xc000; /* ptest1=test2; */ (*ptest)(); a=(*ptest1)(); /* a=(*ptest1)(a); */ a++; }