Replacing usleep with px4_usleep

This is a step towards isolating time from the system.
This commit is contained in:
Julian Oes
2018-12-22 10:32:18 +01:00
parent e485885344
commit 5b9dea5604
112 changed files with 339 additions and 305 deletions
+1 -1
View File
@@ -340,7 +340,7 @@ extern "C" {
#endif
while (sim_delay) {
usleep(100);
px4_usleep(100);
}
PX4_DEBUG("Called px4_poll timeout = %d", timeout);
+1 -1
View File
@@ -234,7 +234,7 @@ int CDevExample::do_poll(int fd, int timeout, int iterations, int delayms_after_
}
if (delayms_after_poll) {
usleep(delayms_after_poll * 1000);
px4_usleep(delayms_after_poll * 1000);
}
loop_count++;
+1 -1
View File
@@ -1280,7 +1280,7 @@ param_import_internal(int fd, bool mark_saved)
do {
result = bson_decoder_next(&decoder);
usleep(1);
px4_usleep(1);
} while (result > 0);
+1 -1
View File
@@ -57,7 +57,7 @@
#include <nuttx/arch.h>
#define dsm_udelay(arg) up_udelay(arg)
#else
#define dsm_udelay(arg) usleep(arg)
#define dsm_udelay(arg) px4_usleep(arg)
#endif
// #define DSM_DEBUG