Browse Source

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

sbg
Beat Küng 9 years ago committed by Lorenz Meier
parent
commit
825d754036
  1. 5
      src/modules/uORB/uORBDevices_nuttx.cpp

5
src/modules/uORB/uORBDevices_nuttx.cpp

@ -267,9 +267,12 @@ uORB::DeviceNode::ioctl(struct file *filp, int cmd, unsigned long arg)
SubscriberData *sd = filp_to_sd(filp); SubscriberData *sd = filp_to_sd(filp);
switch (cmd) { switch (cmd) {
case ORBIOCLASTUPDATE: case ORBIOCLASTUPDATE: {
irqstate_t state = irqsave();
*(hrt_abstime *)arg = _last_update; *(hrt_abstime *)arg = _last_update;
irqrestore(state);
return OK; return OK;
}
case ORBIOCUPDATED: case ORBIOCUPDATED:
*(bool *)arg = appears_updated(sd); *(bool *)arg = appears_updated(sd);

Loading…
Cancel
Save