mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 17:28:54 +08:00
platforms: cleaned up defines
This commit is contained in:
@@ -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
|
||||
|
||||
#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,
|
||||
pthread_mutex_t *mutex,
|
||||
const struct timespec *abstime);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user