VirtualBox

Changeset 37774 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jul 4, 2011 9:19:27 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72646
Message:

Build fixes for current FreeBSD 9 (Thanks to Bernhard Froehlich and Jung-uk Kim)

Location:
trunk/src/VBox/Runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c

    r36232 r37774  
    164164    if (RTMpGetOnlineCount() > 1)
    165165    {
    166 #if  __FreeBSD_version >= 700000
    167         cpumask_t   Mask = ~(cpumask_t)curcpu;
     166#if __FreeBSD_version >= 900000
     167        cpuset_t    Mask;
     168#elif  __FreeBSD_version >= 700000
     169        cpumask_t   Mask;
    168170#endif
    169171        RTMPARGS    Args;
     
    175177        Args.cHits = 0;
    176178#if __FreeBSD_version >= 700000
     179# if __FreeBSD_version >= 900000
     180    Mask = all_cpus;
     181    CPU_CLR(curcpu, &Mask);
     182# else
     183    Mask = ~(cpumask_t)curcpu;
     184# endif
    177185        smp_rendezvous_cpus(Mask, NULL, rtmpOnOthersFreeBSDWrapper, smp_no_rendevous_barrier, &Args);
    178186#else
     
    204212RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
    205213{
    206 #if  __FreeBSD_version >= 700000
    207     cpumask_t   Mask = 1 << idCpu;
     214#if __FreeBSD_version >= 900000
     215    cpuset_t    Mask;
     216#elif  __FreeBSD_version >= 700000
     217    cpumask_t   Mask;
    208218#endif
    209219    RTMPARGS    Args;
     
    219229    Args.cHits = 0;
    220230#if __FreeBSD_version >= 700000
     231# if __FreeBSD_version >= 900000
     232    CPU_SETOF(idCpu, &Mask);
     233# else
    221234    Mask = (cpumask_t)1 << idCpu;
     235# endif
    222236    smp_rendezvous_cpus(Mask, NULL, rtmpOnSpecificFreeBSDWrapper, smp_no_rendevous_barrier, &Args);
    223237#else
     
    243257RTDECL(int) RTMpPokeCpu(RTCPUID idCpu)
    244258{
     259#if __FreeBSD_version >= 900000
     260    cpuset_t    Mask;
     261#elif  __FreeBSD_version >= 700000
    245262    cpumask_t   Mask;
     263#endif
    246264
    247265    /* Will panic if no rendezvousing cpus, so make sure the cpu is online. */
     
    249267        return VERR_CPU_NOT_FOUND;
    250268
     269# if __FreeBSD_version >= 900000
     270    CPU_SETOF(idCpu, &Mask);
     271# else
    251272    Mask = (cpumask_t)1 << idCpu;
     273# endif
    252274    smp_rendezvous_cpus(Mask, NULL, rtmpFreeBSDPokeCallback, smp_no_rendevous_barrier, NULL);
    253275
  • trunk/src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp

    r33540 r37774  
    200200    pReqInt->AioCB.aio_sigevent.sigev_value.sival_ptr = pReqInt;
    201201    pReqInt->AioCB.aio_lio_opcode = uTransferDirection;
    202     pReqInt->AioCB.aio_fildes     = (int)hFile;
     202    pReqInt->AioCB.aio_fildes     = RTFileToNative(hFile);
    203203    pReqInt->AioCB.aio_offset     = off;
    204204    pReqInt->AioCB.aio_nbytes     = cbTransfer;
     
    236236
    237237    pReqInt->fFlush           = true;
    238     pReqInt->AioCB.aio_fildes = (int)hFile;
     238    pReqInt->AioCB.aio_fildes = RTFileToNative(hFile);
    239239    pReqInt->AioCB.aio_offset = 0;
    240240    pReqInt->AioCB.aio_nbytes = 0;
Note: See TracChangeset for help on using the changeset viewer.

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