Example #1
0
void* timer_run_thread(void* x) {
    rtdal_timer_t *obj = (rtdal_timer_t*) x;

    if (DEBUG_rtdal) {
        rtdal_task_print_sched();
    }

    switch(obj->mode) {
    case XENOMAI:
#ifdef __XENO__
        return xenomai_timer_run_thread(obj);
#else
        aerror("Not compiled with xenomai support\n");
        return NULL;
#endif
    case NANOSLEEP:
        return nanoclock_timer_run_thread(obj);
#ifdef EN_TIMERFD
    case TIMERFD:
        return timerfd_timer_run_thread(obj);
#endif
    default:
        aerror_msg("Unknown timer mode %d\n", obj->mode);
        return NULL;
    }
}
Example #2
0
void* timer_run_thread(void* x) {
	rtdal_timer_t *obj = (rtdal_timer_t*) x;

	switch(obj->mode) {
	case XENOMAI:
#ifdef __XENO__
		return xenomai_timer_run_thread(obj);
#else
		aerror("Not compiled with xenomai support\n");
		return NULL;
#endif
	case NANOSLEEP:
		return nanoclock_timer_run_thread(obj);
	default:
		aerror_msg("Unknown timer mode %d\n", obj->mode);
		return NULL;
	}
}