Changeset 18188 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Mar 24, 2009 2:38:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r17416 r18188 1395 1395 1396 1396 /** 1397 * Gets the default logger instance .1397 * Gets the default logger instance, creating it if necessary. 1398 1398 * 1399 1399 * @returns Pointer to default logger instance. … … 1427 1427 return g_pLogger; 1428 1428 #endif /* !IN_RC */ 1429 } 1430 1431 1432 /** 1433 * Gets the default logger instance. 1434 * 1435 * @returns Pointer to default logger instance. 1436 * @returns NULL if no default logger instance available. 1437 */ 1438 RTDECL(PRTLOGGER) RTLogGetDefaultInstance(void) 1439 { 1440 #ifdef IN_RC 1441 return &g_Logger; 1442 #else 1443 # ifdef IN_RING0 1444 /* 1445 * Check per thread loggers first. 1446 */ 1447 if (g_cPerThreadLoggers) 1448 { 1449 const RTNATIVETHREAD Self = RTThreadNativeSelf(); 1450 int32_t i = RT_ELEMENTS(g_aPerThreadLoggers); 1451 while (i-- > 0) 1452 if (g_aPerThreadLoggers[i].NativeThread == Self) 1453 return g_aPerThreadLoggers[i].pLogger; 1454 } 1455 # endif /* IN_RING0 */ 1456 1457 return g_pLogger; 1458 #endif 1429 1459 } 1430 1460
Note:
See TracChangeset
for help on using the changeset viewer.