If you were to read() incoming socket data in an infinite while loop, would an interrupt with top priority still run its ISR if the read() call is blocked (i.e. no data in the buffer)?

  • 1
    \$\begingroup\$ More detail required. \$\endgroup\$ – Toor Mar 14 at 23:08
  • 4
    \$\begingroup\$ What OS? Is the read() function provided by the OS? If not, where'd it come from? \$\endgroup\$ – TimWescott Mar 14 at 23:13
  • \$\begingroup\$ mbed OS running on LPC1768 \$\endgroup\$ – 19172281 Mar 14 at 23:17

There's no reason the interrupt would not occur, unless you explicitly disabled interrupts before executing the read().

After all, the whole idea is that it is an interrupt of one sort or another that's going to eventually unblock the call.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.