Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

How to do following in C

$
0
0

I have a c function & it has to be completed in 10ms. If not it should stop executing & return error.

One way is to set a flag in ISR of timer & when it get set should get out of code. But main problem in this that I have to repeatedly check that flag in the function.

Is there any method that if error occur function should exit & return error, without checking that flag many time.

Like

void func(void)

{

   alarm(10);

   //.....statements

   //.....statements

   //.....statements

  //.....statements

}


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>