We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi I need to know if either of the functions defined below is set up the right way to make it reentrant. They are both delay functions that will be called more than once at the same time. I think there is something wrong here. thank you! static void delay2 (void) small reentrant { unsigned long w; for (w = 0; w < 10; w++) { ; } } OR static void delay1 (unsigned long w) small reentrant { unsigned long a; for (a = 0; a < w; a++) { ; } }
Thanks Drew Davis. The problem I have is that at the beggining of my program there has to be a delay por instance 50 msec. But sometimes it takes up to a second for this short delay to be completely executed. I know this because an LED should go on and off with this delay. Now, I do not know if is this delay causing the problem or something else in the program, but this is the part I notice failing because it is the beginning of the program and after that everything works with a delay while processing (I mean takes longer) and it should not be that way...Is that clear to you? Thank you very much