How to set a flag while the function-call subsystem is executing?
Show older comments
I’m working with a multi‑rate system where task2 can be preempted by task1, and I need to measure the execution time of both tasks accurately.
Since task1 may interrupt task2, I want to subtract the time task1 executes during those interruptions from task2’s total execution time. My idea is to have task2 raise a flag whenever it is running, so task1 can detect the preemption and record how long it ran during that period.
How can I keep a signal high for the entire duration of task2’s execution? Both tasks are implemented inside function‑call subsystems.
Thanks!
Answers (0)
Categories
Find more on Multicore Processor Targets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!