VirtualBox

Changeset 34256 in vbox for trunk/src/VBox/Runtime/include


Ignore:
Timestamp:
Nov 22, 2010 3:55:00 PM (14 years ago)
Author:
vboxsync
Message:

IPRT: Must clear the TLS entry holding RTTHREAD before freeing the structure or the electric fence heap may cause a crash when blocking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/thread.h

    r33540 r34256  
    159159
    160160/**
     161 * Called from rtThreadDestroy so that the TLS entry and any native data in the
     162 * thread structure can be cleared.
     163 *
     164 * @param   pThread         The thread structure.
     165 */
     166void rtThreadNativeDestroy(PRTTHREADINT pThread);
     167
     168/**
    161169 * Sets the priority of the thread according to the thread type
    162170 * and current process priority.
     
    186194
    187195/* thread.cpp */
    188 int rtThreadMain(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread, const char *pszThreadName);
    189 void rtThreadBlocking(PRTTHREADINT pThread, RTTHREADSTATE enmState, uint64_t u64Block,
    190                       const char *pszFile, unsigned uLine, RTUINTPTR uId);
    191 void rtThreadUnblocked(PRTTHREADINT pThread, RTTHREADSTATE enmCurState);
    192 uint32_t rtThreadRelease(PRTTHREADINT pThread);
    193 void rtThreadTerminate(PRTTHREADINT pThread, int rc);
     196int          rtThreadMain(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread, const char *pszThreadName);
     197void         rtThreadBlocking(PRTTHREADINT pThread, RTTHREADSTATE enmState, uint64_t u64Block,
     198                              const char *pszFile, unsigned uLine, RTUINTPTR uId);
     199void         rtThreadUnblocked(PRTTHREADINT pThread, RTTHREADSTATE enmCurState);
     200uint32_t     rtThreadRelease(PRTTHREADINT pThread);
     201void         rtThreadTerminate(PRTTHREADINT pThread, int rc);
    194202PRTTHREADINT rtThreadGetByNative(RTNATIVETHREAD NativeThread);
    195203PRTTHREADINT rtThreadGet(RTTHREAD Thread);
    196 int rtThreadInit(void);
    197 void rtThreadTerm(void);
    198 void rtThreadInsert(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread);
    199 #ifdef IN_RING3
    200 int rtThreadDoSetProcPriority(RTPROCPRIORITY enmPriority);
     204int          rtThreadInit(void);
     205void         rtThreadTerm(void);
     206void         rtThreadInsert(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread);
     207#ifdef IN_RING3
     208int          rtThreadDoSetProcPriority(RTPROCPRIORITY enmPriority);
    201209#endif /* !IN_RING0 */
    202210#ifdef IPRT_WITH_GENERIC_TLS
    203 void rtThreadClearTlsEntry(RTTLS iTls);
    204 void rtThreadTlsDestruction(PRTTHREADINT pThread); /* in tls-generic.cpp */
     211void         rtThreadClearTlsEntry(RTTLS iTls);
     212void         rtThreadTlsDestruction(PRTTHREADINT pThread); /* in tls-generic.cpp */
    205213#endif
    206214
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