Changeset 41307 in vbox for trunk/src/VBox/Runtime/common/log/log.cpp
- Timestamp:
- May 15, 2012 12:09:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r41306 r41307 183 183 *******************************************************************************/ 184 184 #ifdef IN_RC 185 /** Default logger instance. */ 186 extern "C" DECLIMPORT(RTLOGGERRC) g_Logger; 185 /** Default logger instance. Make it weak because our RC module loader does not 186 * necessarily resolve this symbol and the compiler _must_ check if this is 187 * the case or not. */ 188 extern "C" DECLWEAK(DECLIMPORT(RTLOGGERRC)) g_Logger; 187 189 #else /* !IN_RC */ 188 190 /** Default logger instance. */ … … 2113 2115 { 2114 2116 #ifdef IN_RC 2115 /* 2116 * XXX gcc assumes that the address of a variable is always > 0 but this 2117 * is not always true for g_Logger (special case in our RC loader) 2118 */ 2119 PRTLOGGER pLogger1 = &g_Logger; 2120 pLogger = ASMAtomicReadPtrT(&pLogger1, PRTLOGGER); 2117 pLogger = &g_Logger; 2121 2118 #else 2122 2119 pLogger = g_pLogger; … … 2164 2161 { 2165 2162 #ifdef IN_RC 2166 /* 2167 * XXX gcc assumes that the address of a variable is always > 0 but this 2168 * is not always true for g_Logger (special case in our RC loader) 2169 */ 2170 PRTLOGGER pLogger = &g_Logger; 2171 return ASMAtomicReadPtrT(&pLogger, PRTLOGGER); 2163 return &g_Logger; 2172 2164 2173 2165 #else /* !IN_RC */ … … 2206 2198 { 2207 2199 #ifdef IN_RC 2208 /* 2209 * XXX gcc assumes that the address of a variable is always > 0 but this 2210 * is not always true for g_Logger (special case in our RC loader) 2211 */ 2212 PRTLOGGER pLogger = &g_Logger; 2213 return ASMAtomicReadPtrT(&pLogger, PRTLOGGER); 2200 return &g_Logger; 2214 2201 #else 2215 2202 # ifdef IN_RING0
Note:
See TracChangeset
for help on using the changeset viewer.