mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 10:50:19 +08:00
Upstream NuttX irq{save|restor} -> {enter/leave}_critical_section
This commit is contained in:
committed by
Lorenz Meier
parent
3eee469fbc
commit
f5a0c04ae8
@@ -47,8 +47,8 @@ namespace uavcan_node
|
||||
|
||||
struct AllocatorSynchronizer
|
||||
{
|
||||
const ::irqstate_t state = ::irqsave();
|
||||
~AllocatorSynchronizer() { ::irqrestore(state); }
|
||||
const ::irqstate_t state = ::enter_critical_section();
|
||||
~AllocatorSynchronizer() { ::leave_critical_section(state); }
|
||||
};
|
||||
|
||||
struct Allocator : public uavcan::HeapBasedPoolAllocator<uavcan::MemPoolBlockSize, AllocatorSynchronizer>
|
||||
|
||||
Reference in New Issue
Block a user