VirtualBox

Changeset 7966 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Apr 15, 2008 6:07:42 AM (17 years ago)
Author:
vboxsync
Message:

soalris vboxdrv: proper priority values and locking in rtThreadNativeSetPriority.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c

    r5999 r7966  
    5050int rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType)
    5151{
    52     int iPriority;   
     52    int iPriority;
    5353    switch (enmType)
    5454    {
    55         case RTTHREADTYPE_INFREQUENT_POLLER:    iPriority = 1;              break;
    56         case RTTHREADTYPE_EMULATION:            iPriority = 25;             break;
    57         case RTTHREADTYPE_DEFAULT:              iPriority = 53;             break;
    58         case RTTHREADTYPE_MSG_PUMP:             iPriority = 75;             break;
    59         case RTTHREADTYPE_IO:                   iPriority = 100;            break;
    60         case RTTHREADTYPE_TIMER:                iPriority = 127;            break;
     55        case RTTHREADTYPE_INFREQUENT_POLLER:    iPriority = 60;             break;
     56        case RTTHREADTYPE_EMULATION:            iPriority = 66;             break;
     57        case RTTHREADTYPE_DEFAULT:              iPriority = 72;             break;
     58        case RTTHREADTYPE_MSG_PUMP:             iPriority = 78;             break;
     59        case RTTHREADTYPE_IO:                   iPriority = 84;             break;
     60        case RTTHREADTYPE_TIMER:                iPriority = 99;             break;
    6161        default:
    6262            AssertMsgFailed(("enmType=%d\n", enmType));
     
    6464    }
    6565
    66     pri_t threadPrio = iPriority;
    67     curthread->t_pri = threadPrio;
     66    thread_lock(curthread);
     67    THREAD_CHANGE_PRI(curthread, iPriority);
     68    thread_unlock(curthread);
    6869    return VINF_SUCCESS;
    6970}
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