VirtualBox

Changeset 8563 in vbox for trunk/include


Ignore:
Timestamp:
May 5, 2008 11:48:05 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30478
Message:

VALID_PHYS32_PTR -> VALID_PHYS32. Fixed AssertGCPhys32 string. Moved the assertion function to the top of the file to help compiler caches.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/assert.h

    r8245 r8563  
    7676 * @{
    7777 */
     78
     79__BEGIN_DECLS
     80
     81/**
     82 * The 1st part of an assert message.
     83 *
     84 * @param   pszExpr     Expression. Can be NULL.
     85 * @param   uLine       Location line number.
     86 * @param   pszFile     Location file name.
     87 * @param   pszFunction Location function name.
     88 * @remark  This API exists in HC Ring-3 and GC.
     89 */
     90RTDECL(void)    AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction);
     91
     92/**
     93 * The 2nd (optional) part of an assert message.
     94 * @param   pszFormat   Printf like format string.
     95 * @param   ...         Arguments to that string.
     96 * @remark  This API exists in HC Ring-3 and GC.
     97 */
     98RTDECL(void)    AssertMsg2(const char *pszFormat, ...);
     99
     100/**
     101 * Overridable function that decides whether assertions executes the breakpoint or not.
     102 *
     103 * The generic implementation will return true.
     104 *
     105 * @returns true if the breakpoint should be hit, false if it should be ignored.
     106 * @remark  The RTDECL() makes this a bit difficult to override on windows. Sorry.
     107 */
     108RTDECL(bool)    RTAssertDoBreakpoint(void);
     109
     110/** The last assert message, 1st part. */
     111extern RTDATADECL(char) g_szRTAssertMsg1[1024];
     112/** The last assert message, 2nd part. */
     113extern RTDATADECL(char) g_szRTAssertMsg2[2048];
     114
     115__END_DECLS
    78116
    79117
     
    19481986 * Asserts that the high dword of a physical address is zero
    19491987 *
    1950  * @param   pv      The pointer.
    1951  */
    1952 #define AssertGCPhys32(pv)          AssertMsg(VALID_PHYS32_PTR(pv), ("%p\n", (pv)))
    1953 
    1954 __BEGIN_DECLS
    1955 
    1956 /**
    1957  * The 1st part of an assert message.
    1958  *
    1959  * @param   pszExpr     Expression. Can be NULL.
    1960  * @param   uLine       Location line number.
    1961  * @param   pszFile     Location file name.
    1962  * @param   pszFunction Location function name.
    1963  * @remark  This API exists in HC Ring-3 and GC.
    1964  */
    1965 RTDECL(void)    AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction);
    1966 
    1967 /**
    1968  * The 2nd (optional) part of an assert message.
    1969  * @param   pszFormat   Printf like format string.
    1970  * @param   ...         Arguments to that string.
    1971  * @remark  This API exists in HC Ring-3 and GC.
    1972  */
    1973 RTDECL(void)    AssertMsg2(const char *pszFormat, ...);
    1974 
    1975 /**
    1976  * Overridable function that decides whether assertions executes the breakpoint or not.
    1977  *
    1978  * The generic implementation will return true.
    1979  *
    1980  * @returns true if the breakpoint should be hit, false if it should be ignored.
    1981  * @remark  The RTDECL() makes this a bit difficult to override on windows. Sorry.
    1982  */
    1983 RTDECL(bool)    RTAssertDoBreakpoint(void);
    1984 
    1985 /** The last assert message, 1st part. */
    1986 extern RTDATADECL(char) g_szRTAssertMsg1[1024];
    1987 /** The last assert message, 2nd part. */
    1988 extern RTDATADECL(char) g_szRTAssertMsg2[2048];
    1989 
    1990 __END_DECLS
     1988 * @param   GCPhys      The address (RTGCPHYS).
     1989 */
     1990#define AssertGCPhys32(GCPhys)      AssertMsg(VALID_PHYS32(GCPhys), ("%RGp\n", (RTGCPHYS)(GCPhys)))
     1991
    19911992
    19921993/** @} */
  • trunk/include/iprt/cdefs.h

    r8530 r8563  
    12071207
    12081208
    1209 /** @def VALID_PHYS32_PTR
     1209/** @def VALID_PHYS32
    12101210 * 32 bits physical address validation macro.
    1211  * @param   ptr
    1212  */
    1213 #define VALID_PHYS32_PTR(ptr)     ( (RTGCPHYS64)(ptr) < _4G )
     1211 * @param   Phys          The RTGCPHYS address.
     1212 */
     1213#define VALID_PHYS32(Phys)  ( (uint64_t)(Phys) < (uint64_t)_4G )
    12141214
    12151215/** @def N_
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette