VirtualBox

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


Ignore:
Timestamp:
Feb 20, 2020 5:23:23 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136236
Message:

IPRT: Merged the two tls files, with the sideeffect that destructors only works for IPRT threads in non-dll setups.

Location:
trunk/src/VBox/Runtime
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/Makefile.kmk

    r83101 r83124  
    19731973        $(if-expr 1,r3/win/time-win.cpp,r3/nt/time-nt.cpp) \
    19741974        r3/win/time2-win.cpp \
     1975        r3/win/tls-win.cpp \
    19751976        r3/win/utf16locale-win.cpp \
    19761977        r3/win/utf8-win.cpp \
     
    21962197VBoxRT_SOURCES.x86            := $(RuntimeR3_SOURCES.x86)
    21972198VBoxRT_SOURCES.amd64          := $(RuntimeR3_SOURCES.amd64)
    2198 VBoxRT_SOURCES.win            := $(filter-out r3/win/tls-win.cpp, $(VBoxRT_SOURCES.win))\
     2199VBoxRT_SOURCES.win            += \
    21992200        r3/win/dllmain-win.cpp \
    2200         r3/win/tls-dllmain-win.cpp \
    2201         $(call TARGET_PATH,VBoxRT)/VBoxRT.def
     2201         $(VBoxRT_0_OUTDIR)/VBoxRT.def
    22022202VBoxRT_INCS                   := $(RuntimeR3_INCS)
    22032203VBoxRT_INCS.$(KBUILD_TARGET)  := $(RuntimeR3_INCS.$(KBUILD_TARGET))
  • trunk/src/VBox/Runtime/common/misc/thread.cpp

    r82968 r83124  
    664664    Assert(pThread->cRefs >= 1);
    665665
     666    /*
     667     * Destroy TLS entries.
     668     */
    666669#ifdef IPRT_WITH_GENERIC_TLS
    667     /*
    668      * Destroy TLS entries.
    669      */
    670670    rtThreadTlsDestruction(pThread);
    671 #endif /* IPRT_WITH_GENERIC_TLS */
     671#elif defined(RT_OS_WINDOWS)
     672    rtThreadWinTlsDestruction();
     673#endif
    672674
    673675    /*
  • trunk/src/VBox/Runtime/include/internal/thread.h

    r83101 r83124  
    265265#endif
    266266#ifdef RT_OS_WINDOWS
    267 DECLHIDDEN(void)         rtTlsWinDetachThread(void); /* in tls-dllmain-win.cpp */
     267DECLHIDDEN(void)         rtThreadWinTlsDestruction(void); /* in tls-win.cpp */
    268268#endif
    269269
  • trunk/src/VBox/Runtime/r3/win/dllmain-win.cpp

    r83101 r83124  
    8282
    8383        case DLL_THREAD_DETACH:
    84             rtTlsWinDetachThread();
     84            rtThreadWinTlsDestruction();
    8585            rtThreadNativeDetach();
    8686            break;
  • trunk/src/VBox/Runtime/r3/win/tls-win.cpp

    r83123 r83124  
    200200 * Called by dllmain-win.cpp when a thread detaches.
    201201 */
    202 DECLHIDDEN(void) rtTlsWinDetachThread(void)
     202DECLHIDDEN(void) rtThreadWinTlsDestruction(void)
    203203{
    204204    if (ASMAtomicReadU32(&g_cTlsDtors) > 0)
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