1. Cliff Biffle
  2. m3forth

Commits

Cliff Biffle  committed 4be4eed

Fixed YIELD to become a no-op if executed in a handler. This is a bit of a hack, but we were getting hard-faults when doing serial I/O from handler code because of the SVC.

  • Participants
  • Parent commits 763c182
  • Branches subroutine-threading

Comments (0)

Files changed (1)

File kernel.s

View file
           bx W                @ Jump directly, do not alter return address.
 
 DEF tYIELD, "YIELD"
+          mrs W, IPSR         @ Check interrupt status.
+          cbnz W, 1f          @ If servicing an interrupt, don't SVC.
           svc 0
-          NEXT
+1:        NEXT
 
 DEF tDROPMINUSPRIVS, "DROP-PRIVS"
           mrs W, CONTROL