VirtualBox

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


Ignore:
Timestamp:
Jan 28, 2007 10:46:05 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17979
Message:

RTThreadSelf() -> RTThreadNativeSelf() for Ring-0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/log.cpp

    r192 r408  
    112112{
    113113    /** The thread. */
    114     RTTHREAD volatile   Thread;
     114    RTNATIVETHREAD volatile NativeThread;
    115115    /** The (process / session) key. */
    116     uintptr_t volatile  uKey;
     116    uintptr_t volatile      uKey;
    117117    /** The logger instance.*/
    118     PRTLOGGER volatile  pLogger;
     118    PRTLOGGER volatile      pLogger;
    119119}                                   g_aPerThreadLoggers[8];
    120120#endif /* IN_RING0 */
     
    12501250    if (g_cPerThreadLoggers)
    12511251    {
    1252         const RTTHREAD Self = RTThreadSelf();
     1252        const RTNATIVETHREAD Self = RTThreadNativeSelf();
    12531253        int32_t i = ELEMENTS(g_aPerThreadLoggers);
    12541254        while (i-- > 0)
    1255             if (g_aPerThreadLoggers[i].Thread == Self)
     1255            if (g_aPerThreadLoggers[i].NativeThread == Self)
    12561256                return g_aPerThreadLoggers[i].pLogger;
    12571257    }
     
    12811281RTDECL(int) RTLogSetDefaultInstanceThread(PRTLOGGER pLogger, uintptr_t uKey)
    12821282{
    1283     int         rc;
    1284     RTTHREAD    Self = RTThreadSelf();
     1283    int             rc;
     1284    RTNATIVETHREAD  Self = RTThreadNativeSelf();
    12851285    if (pLogger)
    12861286    {
     
    12921292        int32_t i = ELEMENTS(g_aPerThreadLoggers);
    12931293        while (i-- > 0)
    1294             if (g_aPerThreadLoggers[i].Thread == Self)
     1294            if (g_aPerThreadLoggers[i].NativeThread == Self)
    12951295            {
    12961296                ASMAtomicXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].uKey, (void *)uKey);
     
    13141314            while (i-- > 0)
    13151315            {
    1316                 AssertCompile(sizeof(RTTHREAD) == sizeof(void*));
    1317                 if (    g_aPerThreadLoggers[i].Thread == NIL_RTTHREAD
    1318                     &&  ASMAtomicCmpXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].Thread, Self, NIL_RTTHREAD))
     1316                AssertCompile(sizeof(RTNATIVETHREAD) == sizeof(void*));
     1317                if (    g_aPerThreadLoggers[i].NativeThread == NIL_RTTHREAD
     1318                    &&  ASMAtomicCmpXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].NativeThread, (void *)Self, (void *)NIL_RTNATIVETHREAD))
    13191319                {
    13201320                    ASMAtomicXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].uKey, (void *)uKey);
     
    13351335        int32_t i = ELEMENTS(g_aPerThreadLoggers);
    13361336        while (i-- > 0)
    1337             if (    g_aPerThreadLoggers[i].Thread == Self
     1337            if (    g_aPerThreadLoggers[i].NativeThread == Self
    13381338                ||  g_aPerThreadLoggers[i].uKey == uKey)
    13391339            {
    13401340                ASMAtomicXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].uKey, NULL);
    13411341                ASMAtomicXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].pLogger, NULL);
    1342                 ASMAtomicXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].Thread, NIL_RTTHREAD);
     1342                ASMAtomicXchgPtr((void * volatile *)&g_aPerThreadLoggers[i].NativeThread, (void *)NIL_RTNATIVETHREAD);
    13431343                ASMAtomicDecS32(&g_cPerThreadLoggers);
    13441344            }
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