VirtualBox

Changeset 93498 in vbox for trunk/src


Ignore:
Timestamp:
Jan 31, 2022 1:34:28 PM (3 years ago)
Author:
vboxsync
Message:

Devices/Graphics/libWineStub/debug.c: Tweaked stupid guest-side debug code probably not used on the host side so it builds for arm64. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/shaderlib/libWineStub/debug.c

    r92903 r93498  
    6060
    6161#ifdef VBOX_WITH_WDDM
    62 #include <VBoxDispMpLogger.h>
    63 #include <iprt/errcore.h>
     62# include <VBoxDispMpLogger.h>
     63# include <iprt/errcore.h>
    6464#else
    65 #include <iprt/log.h>
    66 #endif
     65# include <iprt/log.h>
     66#endif
     67#include <iprt/asm.h>
    6768
    6869#if VBOX_WITH_VMSVGA
     
    7071#ifndef RT_OS_WINDOWS
    7172#define GetCurrentThreadId() (1)
     73#define GetCurrentProcessId() (1)
    7274#endif
    7375#endif
     
    324326}
    325327
    326 #if !defined(VBOX_WITH_VMSVGA) || defined(RT_OS_WINDOWS)
     328#ifndef VBOX //!defined(VBOX_WITH_VMSVGA) || defined(RT_OS_WINDOWS)
    327329int interlocked_xchg_add( int *dest, int incr )
    328330{
     
    340342    int idx;
    341343
     344#ifndef VBOX
    342345    idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
     346#else
     347    idx = ASMAtomicIncS32(&pos) - 1;
     348    idx %= RT_ELEMENTS(list);
     349#endif
    343350    if ((ret = realloc( list[idx], size ))) list[idx] = ret;
    344351    return ret;
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