|
|
|
@ -5,19 +5,11 @@
@@ -5,19 +5,11 @@
|
|
|
|
|
#include <pthread.h> |
|
|
|
|
|
|
|
|
|
#if defined(__PX4_APPLE_LEGACY) |
|
|
|
|
|
|
|
|
|
__BEGIN_DECLS |
|
|
|
|
|
|
|
|
|
// TODO: check if this is required
|
|
|
|
|
#define clockid_t unsigned |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
int px4_clock_gettime(clockid_t clk_id, struct timespec *tp); |
|
|
|
|
int px4_clock_settime(clockid_t clk_id, struct timespec *tp); |
|
|
|
|
|
|
|
|
|
__EXPORT unsigned int sleep(unsigned int sec); |
|
|
|
|
|
|
|
|
|
__END_DECLS |
|
|
|
|
|
|
|
|
|
#elif defined(__PX4_QURT) |
|
|
|
|
#if defined(__PX4_QURT) |
|
|
|
|
|
|
|
|
|
#include <sys/timespec.h> |
|
|
|
|
|
|
|
|
@ -32,17 +24,6 @@ __END_DECLS
@@ -32,17 +24,6 @@ __END_DECLS
|
|
|
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
#define px4_clock_gettime clock_gettime |
|
|
|
|
#define px4_clock_settime clock_settime |
|
|
|
|
|
|
|
|
|
#define px4_usleep system_usleep |
|
|
|
|
#define px4_sleep system_sleep |
|
|
|
|
#define px4_pthread_cond_timedwait system_pthread_cond_timedwait |
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__BEGIN_DECLS |
|
|
|
|
__EXPORT int px4_clock_gettime(clockid_t clk_id, struct timespec *tp); |
|
|
|
|
__EXPORT int px4_clock_settime(clockid_t clk_id, const struct timespec *tp); |
|
|
|
@ -53,8 +34,5 @@ __EXPORT int px4_pthread_cond_timedwait(pthread_cond_t *cond,
@@ -53,8 +34,5 @@ __EXPORT int px4_pthread_cond_timedwait(pthread_cond_t *cond,
|
|
|
|
|
pthread_mutex_t *mutex, |
|
|
|
|
const struct timespec *abstime); |
|
|
|
|
__END_DECLS |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|