VirtualBox

Ignore:
Timestamp:
Oct 15, 2008 9:17:04 PM (16 years ago)
Author:
vboxsync
Message:

IPRT,++: some assert.h cleanup, making a suitable place to call panic() in ring-0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp

    r11645 r13306  
    4444*******************************************************************************/
    4545/** The last assert message, 1st part. */
    46 RTDATADECL(char) g_szRTAssertMsg1[1024];
     46RTDATADECL(char)                    g_szRTAssertMsg1[1024];
    4747/** The last assert message, 2nd part. */
    48 RTDATADECL(char) g_szRTAssertMsg2[2048];
     48RTDATADECL(char)                    g_szRTAssertMsg2[2048];
     49/** The last assert message, file name. */
     50RTDATADECL(const char *) volatile   g_pszRTAssertFile;
     51/** The last assert message, line number. */
     52RTDATADECL(uint32_t) volatile       g_u32RTAssertLine;
     53/** The last assert message, function name. */
     54RTDATADECL(const char *) volatile   g_pszRTAssertFunction;
    4955
    5056
     
    6874                "Location  : %s(%d) %s\n",
    6975                pszExpr, pszFile, uLine, pszFunction);
     76    ASMAtomicUoWritePtr(&g_pszRTAssertFile, pszFile);
     77    ASMAtomicUoWriteU32(&g_u32RTAssertLine, uLine);
     78    ASMAtomicUoWritePtr(&g_pszRTAssertFunction, pszFunction);
    7079}
    7180
     
    91100    RTStrPrintfV(g_szRTAssertMsg2, sizeof(g_szRTAssertMsg2), pszFormat, va);
    92101    va_end(va);
     102}
    93103
     104
     105RTR0DECL(void) RTR0AssertPanicSystem(void)
     106{
    94107    panic("%s%s", g_szRTAssertMsg1, g_szRTAssertMsg2);
    95108}
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