VirtualBox

Changeset 37233 in vbox for trunk/include/iprt/err.h


Ignore:
Timestamp:
May 27, 2011 1:31:57 PM (14 years ago)
Author:
vboxsync
Message:

IRPT: Adding RTErrVarsSave/Restore/++ to preserve errno, h_error/WSAGetLastError and GetLastError accross assertions.

File:
1 edited

Legend:

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

    r37196 r37233  
    540540    }
    541541}
     542
     543/**
     544 * Storage for error variables.
     545 *
     546 * @remarks Do NOT touch the members!  They are platform specific and what's
     547 *          where may change at any time!
     548 */
     549typedef union RTERRVARS
     550{
     551    int8_t  ai8Vars[32];
     552    int16_t ai16Vars[16];
     553    int32_t ai32Vars[8];
     554    int64_t ai64Vars[4];
     555} RTERRVARS;
     556/** Pointer to an error variable storage union.  */
     557typedef RTERRVARS *PRTERRVARS;
     558/** Pointer to a const error variable storage union.  */
     559typedef RTERRVARS const *PCRTERRVARS;
     560
     561/**
     562 * Saves the error variables.
     563 *
     564 * @returns @a pVars.
     565 * @param   pVars       The variable storage union.
     566 */
     567RTDECL(PRTERRVARS) RTErrVarsSave(PRTERRVARS pVars);
     568
     569/**
     570 * Restores the error variables.
     571 *
     572 * @param   pVars       The variable storage union.
     573 */
     574RTDECL(void) RTErrVarsRestore(PCRTERRVARS pVars);
     575
     576/**
     577 * Checks if the first variable set equals the second.
     578 *
     579 * @returns true if they are equal, false if not.
     580 * @param   pVars1      The first variable storage union.
     581 * @param   pVars2      The second variable storage union.
     582 */
     583RTDECL(bool) RTErrVarsAreEqual(PCRTERRVARS pVars1, PCRTERRVARS pVars2);
     584
     585/**
     586 * Checks if the (live) error variables have changed since we saved them.
     587 *
     588 * @returns @c true if they have changed, @c false if not.
     589 * @param   pVars       The saved variables to compare the current state
     590 *                      against.
     591 */
     592RTDECL(bool) RTErrVarsHaveChanged(PCRTERRVARS pVars);
    542593
    543594RT_C_DECLS_END
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