Exemplo n.º 1
0
int __rtai_comedi_init(void)
{
	if( set_rt_fun_ext_index(rtai_comedi_fun, FUN_COMEDI_LXRT_INDX) ) {
		printk("Recompile your module with a different index\n");
		return -EACCES;
	}
	return 0;
}
Exemplo n.º 2
0
/***
 *	lxrtnet_init
 */
static int __init lxrtnet_init(void) 
{
	if (set_rt_fun_ext_index(rt_lxrtnet_fun, LxRTNET_IDX)) {
		printk("Recompile your module with a different index\n");
		return -EACCES;
	}

	return(0);
}
Exemplo n.º 3
0
Arquivo: usi.c Projeto: Enextuse/RTAI
static int register_lxrt_usi_support(void)
{
	if(set_rt_fun_ext_index(rtai_usi_fun, FUN_USI_LXRT_INDX))
	{
		printk("LXRT EXTENSION SLOT FOR USI (%d) ALREADY USED\n", FUN_USI_LXRT_INDX);
		return -EACCES;
	}
	return 0;
}
Exemplo n.º 4
0
/* init module */
int init_module(void)
{
  if( set_rt_fun_ext_index(rt_LiAS_fun, MYIDX))
  {
    printk("Recompile the LiAS lxrt module with a different index\n");
   return -EACCES;
  }

  return(0);
}
Exemplo n.º 5
0
int __init rtdm_skin_init(void)
{
	int err;

	rtai_timers_init();
        if(set_rt_fun_ext_index(rtdm, RTDM_INDX)) {
                printk("LXRT extension %d already in use. Recompile RTDM with a different extension index\n", RTDM_INDX);
                return -EACCES;
        }
	if ((err = rtdm_dev_init())) {
	        goto fail;
	}

	xnintr_mount();

#ifdef CONFIG_RTAI_RTDM_SELECT
	if (xnselect_mount()) {
	        goto cleanup_core;
	}
#endif
#ifdef CONFIG_PROC_FS
	if ((err = rtdm_proc_init())) {
	        goto cleanup_core;
	}
#endif /* CONFIG_PROC_FS */

	printk("RTDM started.\n");
	return 0;

cleanup_core:
#ifdef CONFIG_RTAI_RTDM_SELECT
	xnselect_umount();
#endif
	rtdm_dev_cleanup();
#ifdef CONFIG_PROC_FS
	rtdm_proc_cleanup();
#endif /* CONFIG_PROC_FS */
fail:
	return err;
}
Exemplo n.º 6
0
int __rtai_tasklets_init(void)
{
	int cpuid;

	if(set_rt_fun_ext_index(rt_tasklet_fun, TASKLETS_IDX)) {
		printk("Recompile your module with a different index\n");
		return -EACCES;
	}
	if (init_ptimers()) {
		return -ENOMEM;
	}
	for (cpuid = 0; cpuid < num_online_cpus(); cpuid++) {
		timers_lock[cpuid] = timers_lock[0];
		timers_list[cpuid] = timers_list[0];
		timers_list[cpuid].cpuid = cpuid;
		timers_list[cpuid].next = timers_list[cpuid].prev = &timers_list[cpuid];
		rt_task_init_cpuid(&timers_manager[cpuid], rt_timers_manager, cpuid, TaskletsStacksize, TimersManagerPrio, 0, 0, cpuid);
		rt_task_resume(&timers_manager[cpuid]);
	}
	printk(KERN_INFO "RTAI[tasklets]: loaded.\n");
	return 0;
}