VirtualBox

儲存庫 vbox 的更動 62859


忽略:
時間撮記:
2016-8-2 上午12:31:43 (8 年 以前)
作者:
vboxsync
訊息:

iprt: on NetBSD use sched_yield().

From Kamil Rytarowski, but fixed to actually cover all instances where
we need to decide between sched_yield, and pthread_yield and variants.

位置:
trunk/src/VBox/Runtime/r3/posix
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Runtime/r3/posix/semevent-posix.cpp

    r62564 r62859  
    5050#endif
    5151
    52 #if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
     52#if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_NETBSD)
    5353# include <sched.h>
    5454# define pthread_yield() sched_yield()
  • trunk/src/VBox/Runtime/r3/posix/thread2-posix.cpp

    r62477 r62859  
    3333#include <pthread.h>
    3434#include <unistd.h>
    35 #if defined(RT_OS_SOLARIS)
     35#if defined(RT_OS_SOLARIS) || defined(RT_OS_NETBSD)
    3636# include <sched.h>
    3737#endif
     
    6363#elif defined(RT_OS_FREEBSD) /* void pthread_yield */
    6464        pthread_yield();
    65 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
     65#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_NETBSD)
    6666        sched_yield();
    6767#else
     
    102102#elif defined(RT_OS_FREEBSD) /* void pthread_yield */
    103103        pthread_yield();
    104 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
     104#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_NETBSD)
    105105        sched_yield();
    106106#else
     
    131131#ifdef RT_OS_DARWIN
    132132    pthread_yield_np();
    133 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
     133#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_NETBSD)
    134134    sched_yield();
    135135#else
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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