VirtualBox

儲存庫 vbox 的更動 37295


忽略:
時間撮記:
2011-6-1 下午02:20:54 (13 年 以前)
作者:
vboxsync
訊息:

Runtime/r0drv/linux: Use RTThreadPreemptDisable/Enable wrappers so callbacks don't assert/fail unexpectedly.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c

    r37294 r37295  
    204204    RTMPARGS Args;
    205205
     206    RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
    206207    Args.pfnWorker = pfnWorker;
    207208    Args.pvUser1 = pvUser1;
     
    217218#else /* older kernels */
    218219
    219 # ifdef preempt_disable
    220     preempt_disable();
    221 # endif
     220    RTThreadPreemptDisable(&PreemptState);
    222221    rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
    223222    local_irq_disable();
    224223    rtmpLinuxWrapper(&Args);
    225224    local_irq_enable();
    226 # ifdef preempt_enable
    227     preempt_enable();
    228 # endif
     225    RTThreadPreemptRestore(&PreemptState);
    229226#endif /* older kernels */
    230227    Assert(rc == 0); NOREF(rc);
     
    239236    RTMPARGS Args;
    240237
     238    RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
    241239    Args.pfnWorker = pfnWorker;
    242240    Args.pvUser1 = pvUser1;
     
    245243    Args.cHits = 0;
    246244
    247 #ifdef preempt_disable
    248     preempt_disable();
    249 #endif
     245    RTThreadPreemptDisable(&PreemptState);
    250246#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
    251247    rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
     
    253249    rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
    254250#endif /* older kernels */
    255 #ifdef preempt_enable
    256     preempt_enable();
    257 #endif
     251    RTThreadPreemptRestore(&PreemptState);
    258252
    259253    Assert(rc == 0); NOREF(rc);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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