mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 14:30:35 +08:00
POSIX: fixed hrt call and workqueue implementation
The HRT call processing normally happens via HW timer interrupt handler. Since the POSIX port has no ISR handling, the HP work queue is used. Instead of irq_save() and irq_restore() calls to disable/enable interrupts, a mutex is used to protect each queue. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -43,6 +43,10 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
namespace px4 {
|
||||
void init_once(void);
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef int (*px4_main_t)(int argc, char *argv[]);
|
||||
@@ -94,6 +98,8 @@ int main(int argc, char **argv)
|
||||
|
||||
string mystr;
|
||||
|
||||
px4::init_once();
|
||||
|
||||
px4::init(argc, argv, "mainapp");
|
||||
|
||||
while(1) {
|
||||
|
||||
Reference in New Issue
Block a user