From: Frank Mori Hess Date: Thu, 10 May 2001 16:47:33 +0000 (+0000) Subject: fixed clearing of async->events X-Git-Tag: r0_7_59~54 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b2f2168e749e4bf3619efdfbbfb0896ed75f8614;p=comedi.git fixed clearing of async->events --- diff --git a/comedi/drivers/comedi_rt_timer.c b/comedi/drivers/comedi_rt_timer.c index 0256d577..63ef5b55 100644 --- a/comedi/drivers/comedi_rt_timer.c +++ b/comedi/drivers/comedi_rt_timer.c @@ -141,6 +141,7 @@ static void timer_ai_task_func(int d) } s->async->events |= COMEDI_CB_EOS; comedi_event(dev,s,s->async->events); + s->async->events = 0; #ifdef CONFIG_COMEDI_RTL rt_task_wait(); #endif @@ -150,6 +151,7 @@ static void timer_ai_task_func(int d) } s->async->events |= COMEDI_CB_EOA; comedi_event(dev,s,s->async->events); + s->async->events = 0; #ifdef CONFIG_COMEDI_RTL rtl_global_pend_irq(devpriv->soft_irq); #endif @@ -192,6 +194,7 @@ static void timer_ao_task_func(int d) } s->async->events |= COMEDI_CB_EOS; comedi_event(dev,s,s->async->events); + s->async->events = 0; #ifdef CONFIG_COMEDI_RTL rt_task_wait(); #endif @@ -202,6 +205,7 @@ static void timer_ao_task_func(int d) }while(ao_repeat_flag); s->async->events |= COMEDI_CB_EOA; comedi_event(dev,s,s->async->events); + s->async->events = 0; #ifdef CONFIG_COMEDI_RTL rtl_global_pend_irq(devpriv->soft_irq); #endif @@ -303,6 +307,8 @@ static int timer_cmd(comedi_device *dev,comedi_subdevice *s) struct timespec ts; comedi_cmd *cmd = &s->async->cmd; + s->async->events = 0; + /* hack attack: drivers are not supposed to do this: */ dev->rt = 1;