[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] about rt-task period



Could you post the full working code for this?

qiao (at80401@yahoo.com) wrote:
> hello
> 
>    when testing if the periodis too short,I find the code below do not work
> correctly
> -----------------------------------
> int overrun = 0;
> do{
> 	pthread_wait_np();
> 	if(overrun) {
> 	   conpr("overrun!\n");
> 	   break; 
> 	}
> 	overrun++;
> 	/* calculation code */
> 
> 	overrun--;
> 
>   }while(1);
> ------------------------------------
> for example, the calculation elapse 17 us, I set period=20us,
> the min,max value(actual period minus 20us)  is about 2.6 , 
> 9us /*see examples/measurement/rt_process.c*/,but if  set period=10us, 
> the min,max is about 23,30us , greater than perid! "overrun" doesn't 
> work, why?
> 
> thanks.
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> 
> ----- End of forwarded message from owner-rtl@fsmlabs.com -----
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/