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
+3 -3
View File
@@ -387,7 +387,7 @@ static int vmount_thread_main(int argc, char *argv[])
} else {
//wait for parameter changes. We still need to wake up regularily to check for thread exit requests
usleep(1e6);
px4_usleep(1e6);
}
if (test_input && test_input->finished()) {
@@ -478,7 +478,7 @@ int vmount_main(int argc, char *argv[])
int counter = 0;
while (!thread_running && vmount_task >= 0) {
usleep(5000);
px4_usleep(5000);
if (++counter >= 100) {
break;
@@ -504,7 +504,7 @@ int vmount_main(int argc, char *argv[])
thread_should_exit = true;
while (thread_running) {
usleep(100000);
px4_usleep(100000);
}
return 0;