How is Scheduler activity inferred by SystemView?
I'm in the process of instrumenting RTX v5 for SystemView. The RTX source has a fairly extensive set of event recording hooks which mean it should be possible to bring up SystemView without actually modifying the RTOS source. I'm able to see interrupts and task activity correctly, but also see diagnostic entries about "Context switch without scheduler".
RTX does everything in an interrupt context. It uses SVC to enter the kernel and PendSV (at the lowest priority of the system) to perform context switches.
I have a single function that's called at the exit of every interrupt handler. This function calls SEGGER_SYSVIEW_RecordExit(). In general, I won't know if the scheduler will be invoked on each ISR exit because that depends on the active ISR's priority. I.e., in the case of nested interrupts, only the last one will actually return to the scheduler.
Is there a way to explicitly declare that the scheduler is running?
I'm in the process of instrumenting RTX v5 for SystemView. The RTX source has a fairly extensive set of event recording hooks which mean it should be possible to bring up SystemView without actually modifying the RTOS source. I'm able to see interrupts and task activity correctly, but also see diagnostic entries about "Context switch without scheduler".
RTX does everything in an interrupt context. It uses SVC to enter the kernel and PendSV (at the lowest priority of the system) to perform context switches.
I have a single function that's called at the exit of every interrupt handler. This function calls SEGGER_SYSVIEW_RecordExit(). In general, I won't know if the scheduler will be invoked on each ISR exit because that depends on the active ISR's priority. I.e., in the case of nested interrupts, only the last one will actually return to the scheduler.
Is there a way to explicitly declare that the scheduler is running?