orb nuttx: add irqsave() guard around 64bit timestamp readout

This commit is contained in:
Beat Küng
2016-04-26 11:07:08 +02:00
committed by Lorenz Meier
parent 1ce5d795be
commit 825d754036
+6 -3
View File
@@ -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);