- if (!(old_thread->sched_mode & TH_MODE_REALTIME)) {
- if (old_thread->current_quantum < min_std_quantum) {
- old_thread->reason |= AST_QUANTUM;
- old_thread->current_quantum += std_quantum;
- }
- }
- else
- if (old_thread->current_quantum == 0)
- old_thread->reason |= AST_QUANTUM;
-
- /*
- * If we are doing a direct handoff then
- * give the remainder of our quantum to
- * the next guy.
- */
- if ((old_thread->reason & (AST_HANDOFF|AST_QUANTUM)) == AST_HANDOFF) {
- new_thread->current_quantum = old_thread->current_quantum;