VirtualBox

Ignore:
Timestamp:
Oct 15, 2008 10:46:08 PM (16 years ago)
Author:
vboxsync
Message:

Created assert-r0drv-linux.c (finally).

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c

    r13310 r13314  
    11/* $Id$ */
    22/** @file
    3  * IPRT -  Assertion Workers, Ring-0 Drivers, Darwin.
     3 * IPRT -  Assertion Workers, Ring-0 Drivers, Linux.
    44 */
    55
     
    3333*   Header Files                                                               *
    3434*******************************************************************************/
    35 #include "the-darwin-kernel.h"
     35#include "the-linux-kernel.h"
    3636
    3737#include <iprt/assert.h>
     
    4949/** The last assert message, 2nd part. */
    5050RTDATADECL(char)                    g_szRTAssertMsg2[2048];
     51/** The last assert message, file name. */
     52RTDATADECL(const char *) volatile   g_pszRTAssertExpr;
    5153/** The last assert message, file name. */
    5254RTDATADECL(const char *) volatile   g_pszRTAssertFile;
     
    6668#endif
    6769
    68     printf("\r\n!!Assertion Failed!!\r\n"
     70    printk("\r\n!!Assertion Failed!!\r\n"
    6971           "Expression: %s\r\n"
    7072           "Location  : %s(%d) %s\r\n",
     
    7678                "Location  : %s(%d) %s\n",
    7779                pszExpr, pszFile, uLine, pszFunction);
    78     ASMAtomicUoWritePtr(&g_pszRTAssertFile, pszFile);
     80    ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertExpr, (void *)pszExpr);
     81    ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFile, (void *)pszFile);
     82    ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFunction, (void *)pszFunction);
    7983    ASMAtomicUoWriteU32(&g_u32RTAssertLine, uLine);
    80     ASMAtomicUoWritePtr(&g_pszRTAssertFunction, pszFunction);
    8184}
    8285
     
    97100    szMsg[sizeof(szMsg) - 1] = '\0';
    98101    va_end(va);
    99     printf("%s", szMsg);
     102    printk("%s", szMsg);
    100103
    101104    va_start(va, pszFormat);
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