Dear All I'm going to start to use this two functions to perform a goto in case of a while 1 loop is added into some section of the code. into the main I've
if (setjmp (env) == 0) { blocked_loop =1; while (1); } else { blocked_loop = 0; //Continue to skip on while 1 infinite loop }
into an interrupt (a timer that is called each 2ms) i'll call
if (blocked_loop== 1) { blocked_loop = 0; longjmp (env, 1); /* return 1 to setjmp */ }
but it dosn't seems to works. Do you have any suggestion? Thanks in advance Best Regards Francesco Dodi
coroutines...?
Tomorrow I'll try to find if it could be a solution www.chiark.greenend.org.uk/.../coroutines.html dunkels.com/.../examples.html but from a first overlook it I can't get how to return from a freezed function! (especially in C!)