#define start_rt_timer(x)
#define stop_rt_timer()
+#define comedi_rt_task_context_t int
+
#endif
#ifdef CONFIG_COMEDI_RTAI
#include <rtai.h>
#include <rtai_sched.h>
+
+#if RTAI_VERSION_CODE < RTAI_MANGLE_VERSION(3,3,0)
+#define comedi_rt_task_context_t int
+#else
+#define comedi_rt_task_context_t long
+#endif
+
#endif
}
// performs scans
-static void scan_task_func(int d)
+static void scan_task_func(comedi_rt_task_context_t d)
{
comedi_device *dev=(comedi_device *)d;
comedi_subdevice *s = dev->subdevices + 0;
}
}
-static void timer_task_func(int d)
+static void timer_task_func(comedi_rt_task_context_t d)
{
comedi_device *dev=(comedi_device *)d;
comedi_subdevice *s = dev->subdevices + 0;
devpriv->rt_task = kzalloc(sizeof(RT_TASK),GFP_KERNEL);
// initialize real-time tasks
- ret = rt_task_init(devpriv->rt_task, timer_task_func,(int)dev, 3000,
- timer_priority, 0, 0);
+ ret = rt_task_init(devpriv->rt_task, timer_task_func,
+ (comedi_rt_task_context_t)dev, 3000, timer_priority, 0, 0);
if(ret < 0) {
comedi_error(dev, "error initalizing rt_task");
kfree(devpriv->rt_task);
devpriv->scan_task = kzalloc(sizeof(RT_TASK),GFP_KERNEL);
ret = rt_task_init(devpriv->scan_task, scan_task_func,
- (int)dev, 3000, scan_priority, 0, 0);
+ (comedi_rt_task_context_t)dev, 3000, scan_priority, 0, 0);
if(ret < 0){
comedi_error(dev, "error initalizing scan_task");
kfree(devpriv->scan_task);