From: Frank Mori Hess Date: Thu, 7 Jun 2001 17:52:22 +0000 (+0000) Subject: tweak to make rt_task clean itself up without one scan delay X-Git-Tag: r0_7_60~185 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1629b4371193074b5b9aac1a6e6a81978eb18ef0;p=comedi.git tweak to make rt_task clean itself up without one scan delay --- diff --git a/comedi/drivers/comedi_rt_timer.c b/comedi/drivers/comedi_rt_timer.c index 982f2f75..ccb316b4 100644 --- a/comedi/drivers/comedi_rt_timer.c +++ b/comedi/drivers/comedi_rt_timer.c @@ -322,6 +322,8 @@ cleanup: static void timer_task_func(int d) { comedi_device *dev=(comedi_device *)d; + comedi_subdevice *s = dev->subdevices + 0; + comedi_cmd *cmd=&s->async->cmd; int ret; unsigned long long n; @@ -331,7 +333,7 @@ static void timer_task_func(int d) devpriv->scan_task_active = 1; devpriv->start = rt_get_time(); - for(n = 0; 1; n++){ + for(n = 0; n < cmd->stop_arg || cmd->stop_src == TRIG_NONE; n++){ // scan timing if(n) rt_task_wait_period();