VirtualBox

Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (4 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstAnimate.cpp

    r82968 r85121  
    5252
    5353
    54 static void SigInterrupt(int iSignal)
     54static void SigInterrupt(int iSignal) RT_NOTHROW_DEF
    5555{
    5656    NOREF(iSignal);
     
    6060}
    6161
    62 typedef DECLCALLBACK(int) FNSETGUESTGPR(PVM, uint32_t);
     62typedef DECLCALLBACKTYPE(int, FNSETGUESTGPR,(PVM, uint32_t));
    6363typedef FNSETGUESTGPR *PFNSETGUESTGPR;
    6464static int scriptGPReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
     
    7272}
    7373
    74 typedef DECLCALLBACK(int) FNSETGUESTSEL(PVM, uint16_t);
     74typedef DECLCALLBACKTYPE(int, FNSETGUESTSEL,(PVM, uint16_t));
    7575typedef FNSETGUESTSEL *PFNSETGUESTSEL;
    7676static int scriptSelReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
     
    8484}
    8585
    86 typedef DECLCALLBACK(int) FNSETGUESTSYS(PVM, uint32_t);
     86typedef DECLCALLBACKTYPE(int, FNSETGUESTSYS,(PVM, uint32_t));
    8787typedef FNSETGUESTSYS *PFNSETGUESTSYS;
    8888static int scriptSysReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
     
    9797
    9898
    99 typedef DECLCALLBACK(int) FNSETGUESTDTR(PVM, uint32_t, uint16_t);
     99typedef DECLCALLBACKTYPE(int, FNSETGUESTDTR,(PVM, uint32_t, uint16_t));
    100100typedef FNSETGUESTDTR *PFNSETGUESTDTR;
    101101static int scriptDtrReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
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