Skip to content

Commit fdafdbc

Browse files
committed
Cleanup: Fix build
1 parent 47bb237 commit fdafdbc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/rtapi/uspace_rtapi_posix.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "uspace_rtapi_posix.hh"
22
#include "rtapi.h"
3-
#include "uspace_common.h"
43

54
#include <stdio.h>
65
#include <stdlib.h>
@@ -96,6 +95,8 @@ pthread_once_t Posix::lock_once = PTHREAD_ONCE_INIT;
9695
pthread_key_t Posix::key;
9796
pthread_mutex_t Posix::thread_lock;
9897

98+
extern RtapiApp &App(); //ToDo: Nicer
99+
99100
void *Posix::wrapper(void *arg)
100101
{
101102
struct rtapi_task *task;
@@ -171,7 +172,7 @@ void Posix::wait() {
171172
}
172173
else
173174
{
174-
int res = rtapi_clock_nanosleep(RTAPI_CLOCK, TIMER_ABSTIME, &task->nextstart, nullptr, &now);
175+
int res = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &task->nextstart, nullptr);
175176
if(res < 0) perror("clock_nanosleep");
176177
}
177178
if(do_thread_lock)
@@ -204,7 +205,7 @@ void Posix::do_outb(unsigned char val, unsigned int port)
204205

205206
void Posix::do_delay(long ns) {
206207
struct timespec ts = {0, ns};
207-
rtapi_clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL, NULL);
208+
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, nullptr);
208209
}
209210

210211
int Posix::run_threads(int fd, int(*callback)(int fd)) {

0 commit comments

Comments
 (0)