Changeset 96052 in vbox
- Timestamp:
- Aug 5, 2022 10:48:48 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nocrt/errno.h
r95975 r96052 46 46 47 47 RT_C_DECLS_BEGIN 48 48 49 RTDECL(int *) rtNoCrtGetErrnoPtr(void); 49 50 # define errno (*rtNoCrtGetErrnoPtr()) -
trunk/src/VBox/Runtime/Makefile.kmk
r96045 r96052 1802 1802 common/string/nocrt-strdup.cpp \ 1803 1803 common/string/nocrt-stricmp.cpp \ 1804 common/string/strtok_r.cpp 1804 common/string/nocrt-strtol.cpp \ 1805 common/string/strtok_r.cpp \ 1806 r3/nocrt-per-thread-1.cpp \ 1807 r3/nocrt-per-thread-2.cpp \ 1808 r3/nocrt-errno.cpp 1805 1809 RuntimeR3_SOURCES.x86 = $(RuntimeBaseR3_SOURCES.x86) \ 1806 1810 common/misc/setjmp.asm \ -
trunk/src/VBox/Runtime/common/misc/thread.cpp
r95200 r96052 394 394 #ifdef RT_WITH_ICONV_CACHE 395 395 rtStrIconvCacheInit(pThread); 396 #endif 397 #if defined(IPRT_NO_CRT) && defined(IN_RING3) 398 pThread->NoCrt.enmAllocType = RTNOCRTTHREADDATA::kAllocType_Embedded; 399 RTListInit(&pThread->NoCrt.ListEntry); 396 400 #endif 397 401 rc = RTSemEventMultiCreate(&pThread->EventUser); … … 465 469 ASMAtomicIncU32(&g_cThreadInTree); 466 470 ASMAtomicIncU32(&g_acRTThreadTypeStats[pThread->enmType]); 471 472 #if defined(IPRT_NO_CRT) && defined(IN_RING3) 473 RTTLS const iTlsPerThread = g_iTlsRtNoCrtPerThread; 474 if ( iTlsPerThread != NIL_RTTLS 475 && RTTlsGet(iTlsPerThread) == NULL) 476 RTTlsSet(iTlsPerThread, &pThread->NoCrt); 477 #endif 467 478 } 468 479 … … 687 698 */ 688 699 rtThreadRemove(pThread); 700 701 #if defined(IPRT_NO_CRT) && defined(IN_RING3) 702 RTTLS const iTlsPerThread = g_iTlsRtNoCrtPerThread; 703 if ( iTlsPerThread != NIL_RTTLS 704 && RTTlsGet(iTlsPerThread) == &pThread->NoCrt) 705 RTTlsSet(iTlsPerThread, &g_RtNoCrtPerThreadDummy); 706 #endif 707 689 708 rtThreadRelease(pThread); 690 709 } -
trunk/src/VBox/Runtime/common/string/nocrt-strtok.cpp
r96045 r96052 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #include "internal/ iprt.h"31 #include "internal/nocrt.h" 32 32 #include <iprt/string.h> 33 33 … … 36 36 char *RT_NOCRT(strtok)(char *psz, const char *pszDelimiters) 37 37 { 38 static char *s_pszState = NULL; /** @todo make this a TLS variable. */ 39 return RT_NOCRT(strtok_r)(psz, pszDelimiters, &s_pszState); 38 PRTNOCRTTHREADDATA pNoCrtData = rtNoCrtThreadDataGet(); 39 if (pNoCrtData) 40 return RT_NOCRT(strtok_r)(psz, pszDelimiters, &pNoCrtData->pszStrToken); 41 42 static char *s_pszFallback = NULL; 43 return RT_NOCRT(strtok_r)(psz, pszDelimiters, &s_pszFallback); 40 44 } 41 45 RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL(strtok); -
trunk/src/VBox/Runtime/include/internal/thread.h
r94718 r96052 42 42 #ifdef RT_WITH_ICONV_CACHE 43 43 # include "internal/string.h" 44 #endif 45 #if defined(IPRT_NO_CRT) && defined(IN_RING3) 46 # include "internal/nocrt.h" 44 47 #endif 45 48 … … 106 109 /** Handle cache for iconv. 107 110 * @remarks ASSUMES sizeof(void *) >= sizeof(iconv_t). */ 108 void *ahIconvs[RTSTRICONV_END];111 void *ahIconvs[RTSTRICONV_END]; 109 112 #endif 110 113 #ifdef IPRT_WITH_GENERIC_TLS … … 114 117 /** Thread name. */ 115 118 char szName[RTTHREAD_NAME_LEN]; 119 #if defined(IPRT_NO_CRT) && defined(IN_RING3) 120 /** No-CRT per thread data. */ 121 RTNOCRTTHREADDATA NoCrt; 122 #endif 116 123 } RTTHREADINT; 117 124 /** Pointer to the internal representation of a thread. */
Note:
See TracChangeset
for help on using the changeset viewer.