CHERIoT-Platform/cheriot-rtos

Loader does not check interrupt status for thread entry points

Opened this issue · 0 comments

If you export an entry point function with interrupts disabled and use it as a thread entry point, it will run with interrupts enabled. This is annoying for realtime control loops and is fixable: we look up the entry point by its export table entry and so can set the relevant bit in mstatus if necessary. Doing this for the highest-priority thread means that it runs, uninterrupted, until it explicitly yields (and then resumes with interrupts disabled).