/* XXX requires /proc interface */
comedi_proc_init();
-#ifdef CONFIG_COMEDI_RT
-// comedi_rt_init();
-#endif
+ comedi_rt_init();
init_drivers();
return 0;
}
kfree(comedi_devices);
-#ifdef CONFIG_COMEDI_RT
-// comedi_rt_cleanup();
-#endif
-
+ comedi_rt_cleanup();
}
#ifdef MODULE
void comedi_event(comedi_device *dev,comedi_subdevice *s,unsigned int mask)
{
+ //DPRINTK("comedi_event %x\n",mask);
+
if(s->cb_mask&mask){
if(s->runflags&SRF_USER){
unsigned int subdev;
comedi_rt_pend_wakeup(&dev->read_wait);
if(subdev==dev->write_subdev)
comedi_rt_pend_wakeup(&dev->write_wait);
+#else
+ printk("BUG: comedi_event() code unreachable\n");
#endif
}else{
if(subdev==dev->read_subdev)
wake_up_interruptible(&dev->write_wait);
}
}else{
- if(s->runflags&SRF_RT){
- s->cb_func(mask,s->cb_arg);
- }else{
+ if(s->cb_func)s->cb_func(mask,s->cb_arg);
/* XXX bug here. If subdevice A is rt, and
* subdevice B tries to callback to a normal
* linux kernel function, it will be at the
* wrong priority. Since this isn't very
* common, I'm not going to worry about it. */
- }
}
}