mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 00:20:35 +08:00
orb nuttx: add irqsave() guard around 64bit timestamp readout
This commit is contained in:
@@ -267,9 +267,12 @@ uORB::DeviceNode::ioctl(struct file *filp, int cmd, unsigned long arg)
|
||||
SubscriberData *sd = filp_to_sd(filp);
|
||||
|
||||
switch (cmd) {
|
||||
case ORBIOCLASTUPDATE:
|
||||
*(hrt_abstime *)arg = _last_update;
|
||||
return OK;
|
||||
case ORBIOCLASTUPDATE: {
|
||||
irqstate_t state = irqsave();
|
||||
*(hrt_abstime *)arg = _last_update;
|
||||
irqrestore(state);
|
||||
return OK;
|
||||
}
|
||||
|
||||
case ORBIOCUPDATED:
|
||||
*(bool *)arg = appears_updated(sd);
|
||||
|
||||
Reference in New Issue
Block a user