All pastes #1663 Raw Edit

Anonymous

public text v1 · immutable
#1663 ·published 2004-10-22 19:49 UTC
rendered paste body
         case: QUEUE_STRATEGY_INORDER:
                if (!pos) {
                        if (!q->wrapped) {
                                /* No more channels, start over */
                                q->rrpos = 0;
                        } else {
                                /* Prioritize next entry */
                                q->rrpos++;
                        }
                        q->wrapped = 0;
                }
                if (pos < q->rrpos) {
                        tmp->metric = 1000 + pos;
                } else {
                        if (pos > q->rrpos) {
                                /* Indicate there is another priority */
                                q->wrapped = 1;
                        }
                        tmp->metric = pos;
                }
                tmp->metric += mem->penalty * 1000000;
                break;