AP_HAL_PX4: locking fix