VirtualBox

Changeset 34266 in vbox


Ignore:
Timestamp:
Nov 22, 2010 8:42:39 PM (14 years ago)
Author:
vboxsync
Message:

PCI: use stable_sort() when sorting rules for more predicatble results, raise priority for chipset-specific rules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/BusAssignmentManager.cpp

    r34123 r34266  
    115115     *  Alternative approach is to assign separate slot to each device.
    116116     */
    117     {"piix3ide",      0, 31, 1,  1},
    118     {"ahci",          0, 31, 2,  1},
    119     {"smbus",         0, 31, 3,  1},
    120     {"usb-ohci",      0, 31, 4,  1},
    121     {"usb-ehci",      0, 31, 5,  1},
    122     {"thermal",       0, 31, 6,  1},
     117    {"piix3ide",      0, 31, 1,  2},
     118    {"ahci",          0, 31, 2,  2},
     119    {"smbus",         0, 31, 3,  2},
     120    {"usb-ohci",      0, 31, 4,  2},
     121    {"usb-ehci",      0, 31, 5,  2},
     122    {"thermal",       0, 31, 6,  2},
    123123
    124124    /* to make sure rule never used before rules assigning devices on it */
     
    358358    AssertMsg(matchingRules.size() > 0, ("No rule for %s(%s)\n", pszName, pszAlias));
    359359
    360     sort(matchingRules.begin(), matchingRules.end(), RuleComparator);
     360    stable_sort(matchingRules.begin(), matchingRules.end(), RuleComparator);
    361361
    362362    for (size_t iRule = 0; iRule < matchingRules.size(); iRule++)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette