@@ -95,15 +95,15 @@ struct XenomaiApp : RtapiApp {
9595 {
9696 WithRoot r;
9797 /* Attach to the core. */
98- rtapi_print (" linuxcnc-thread :%d\n " , gettid ());
98+ rtapi_print (" linuxcnc-task :%d\n " , gettid ());
9999 int tfd = evl_attach_self (" linuxcnc-thread:%d" , gettid ());
100100 if (tfd < 0 ){
101101 rtapi_print (" evl_attach_self() failed ret %i errno %i\n " , tfd, errno);
102102 }
103103 }
104104
105105 struct timespec now;
106- clock_gettime (CLOCK_MONOTONIC , &now);
106+ evl_read_clock (EVL_CLOCK_MONOTONIC , &now);
107107
108108 // originally, I used pthread_make_periodic_np here, and
109109 // pthread_wait_np in wait(), but in about 1 run in 50 this led to
@@ -149,7 +149,7 @@ struct XenomaiApp : RtapiApp {
149149 }
150150 rtapi_timespec_advance (task->nextstart , task->nextstart , task->period + task->pll_correction );
151151 struct timespec now;
152- clock_gettime (CLOCK_MONOTONIC , &now);
152+ evl_read_clock (EVL_CLOCK_MONOTONIC , &now);
153153 if (rtapi_timespec_less (task->nextstart , now))
154154 {
155155 if (policy == SCHED_FIFO)
@@ -197,13 +197,13 @@ struct XenomaiApp : RtapiApp {
197197
198198 long long do_get_time () {
199199 struct timespec ts;
200- clock_gettime (CLOCK_MONOTONIC , &ts);
200+ evl_read_clock (EVL_CLOCK_MONOTONIC , &ts);
201201 return ts.tv_sec * 1000000000LL + ts.tv_nsec ;
202202 }
203203
204204 void do_delay (long ns) {
205205 struct timespec ts = {0 , ns};
206- clock_nanosleep (CLOCK_MONOTONIC, 0 , &ts, nullptr );
206+ evl_sleep_until (EVL_CLOCK_MONOTONIC, &ts);
207207 }
208208};
209209
0 commit comments