pick_proc() called only just before returning to userspace
- new proc_is_runnable() macro to test whether process is runnable. All tests whether p_rts_flags == 0 converted to use this macro - pick_proc() calls removed from enqueue() and dequeue() - removed the test for recursive calls from pick_proc() as it certainly cannot be called recursively now - PREEMPTED flag to mark processes that were preempted by enqueueuing a higher priority process in enqueue() - enqueue_head() to enqueue PREEMPTED processes again at the head of their current priority queue - NO_QUANTUM flag to block and dequeue processes preempted by timer tick with exceeded quantum. They need to be enqueued again in schedcheck() - next_ptr global variable removed
This commit is contained in:
@@ -90,7 +90,7 @@ irq_hook_t *hook;
|
||||
sprof_info.idle_samples++;
|
||||
} else
|
||||
/* Runnable system process? */
|
||||
if (priv(proc_ptr)->s_flags & SYS_PROC && !proc_ptr->p_rts_flags) {
|
||||
if (priv(proc_ptr)->s_flags & SYS_PROC && proc_is_runnable(proc_ptr)) {
|
||||
/* Note: k_reenter is always 0 here. */
|
||||
|
||||
/* Store sample (process name and program counter). */
|
||||
|
||||
Reference in New Issue
Block a user