Changeset 72426 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Jun 4, 2018 11:38:23 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r69969 r72426 175 175 char * volatile pchRingBufCur; 176 176 /** @} */ 177 178 /** Thread name for use in ring-0 with RTLOGFLAGS_PREFIX_THREAD. */ 179 char szR0ThreadName[16]; 177 180 178 181 # ifdef IN_RING3 /* Note! Must be at the end! */ … … 826 829 pLogger->pInt->pfnPrefix = NULL; 827 830 pLogger->pInt->pvPrefixUserArg = NULL; 828 pLogger->pInt->afPadding1[0] = false;829 pLogger->pInt->afPadding1[1] = false;830 831 pLogger->pInt->fCreated = false; 832 RT_ZERO(pLogger->pInt->szR0ThreadName); 831 833 pLogger->pInt->cMaxGroups = cGroups; 832 834 pLogger->pInt->papszGroups = papszGroups; … … 1274 1276 RTDECL(int) RTLogCreateForR0(PRTLOGGER pLogger, size_t cbLogger, 1275 1277 RTR0PTR pLoggerR0Ptr, RTR0PTR pfnLoggerR0Ptr, RTR0PTR pfnFlushR0Ptr, 1276 uint32_t fFlags, uint32_t fDestFlags )1278 uint32_t fFlags, uint32_t fDestFlags, char const *pszThreadName) 1277 1279 { 1278 1280 /* … … 1284 1286 AssertReturn(pLoggerR0Ptr != NIL_RTR0PTR, VERR_INVALID_PARAMETER); 1285 1287 AssertReturn(pfnLoggerR0Ptr != NIL_RTR0PTR, VERR_INVALID_PARAMETER); 1288 size_t const cchThreadName = pszThreadName ? strlen(pszThreadName) : 0; 1289 AssertReturn(cchThreadName < sizeof(pLogger->pInt->szR0ThreadName), VERR_INVALID_NAME); 1286 1290 1287 1291 /* … … 1327 1331 else 1328 1332 pInt->pacEntriesPerGroup= NULL; 1333 1334 RT_ZERO(pInt->szR0ThreadName); 1335 if (cchThreadName) 1336 memcpy(pInt->szR0ThreadName, pszThreadName, cchThreadName); 1329 1337 1330 1338 pInt->fCreated = true; … … 3815 3823 const char *pszName = "EMT-RC"; 3816 3824 #else 3817 const char *pszName = "R0";3825 const char *pszName = pLogger->pInt->szR0ThreadName[0] ? pLogger->pInt->szR0ThreadName : "R0"; 3818 3826 #endif 3819 3827 psz = rtLogStPNCpyPad(psz, pszName, 16, 8);
Note:
See TracChangeset
for help on using the changeset viewer.