Quote:
Originally Posted by Ether
a thread overruns (is not finished when next scheduled)
|
Quote:
Originally Posted by Todd
a task monitor in C++ that tracked task overrun and decided what to do when a task overran
|
Can you explain what you mean by task overrun? The way I would interpret that doesn't have any meaning in the context of a preemptive scheduler like VxWorks uses.
If you're looking for a way for multiple tasks of the same priority to share the processor (in C++), the docs say you can enable round-robin scheduling by using taskLib's kernelTimeSlice() function, which accepts the round-robin time-slice period as a parameter. Tasks always run if they have the highest task priority that is ready to run (as before), but after enabling round-robin, if you have multiple tasks at that priority, each task will be allowed to execute, in tern, until either its time slice has elapsed or the task blocks. You can can call taskDelay(NO_WAIT) if you want to place the current task at the end of the run queue without any delay.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor