VirtualBox

Ignore:
Timestamp:
Jan 4, 2019 1:55:24 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/rtProcNativeSetPriority: Must update g_pProcessPriority on windows and OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/os2/sched-os2.cpp

    r76553 r76634  
    209209{
    210210    Assert(enmPriority > RTPROCPRIORITY_INVALID && enmPriority < RTPROCPRIORITY_LAST);
    211     return VINF_SUCCESS;
     211
     212    if (enmPriority == RTPROCPRIORITY_DEFAULT)
     213    {
     214        g_pProcessPriority = &g_aDefaultPriority;
     215        return VINF_SUCCESS;
     216    }
     217
     218    for (size_t i = 0; i < RT_ELEMENTS(g_aPriorities); i++)
     219        if (g_aPriorities[i].enmPriority == enmPriority)
     220        {
     221            g_pProcessPriority = &g_aPriorities[i];
     222            return VINF_SUCCESS;
     223        }
     224
     225    AssertFailedReturn(VERR_INTERNAL_ERROR);
    212226}
    213227
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