VirtualBox

Changeset 85121 in vbox for trunk/include/VBox/vmm/em.h


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/include/VBox/vmm/em.h

    r82968 r85121  
    116116 * @{
    117117 */
    118 typedef DECLCALLBACK(uint32_t)  FNEMULATEPARAM2UINT32(void *pvParam1, uint64_t val2);
    119 typedef FNEMULATEPARAM2UINT32  *PFNEMULATEPARAM2UINT32;
    120 typedef DECLCALLBACK(uint32_t)  FNEMULATEPARAM2(void *pvParam1, size_t val2);
    121 typedef FNEMULATEPARAM2        *PFNEMULATEPARAM2;
    122 typedef DECLCALLBACK(uint32_t)  FNEMULATEPARAM3(void *pvParam1, uint64_t val2, size_t val3);
    123 typedef FNEMULATEPARAM3        *PFNEMULATEPARAM3;
    124 typedef DECLCALLBACK(int)       FNEMULATELOCKPARAM2(void *pvParam1, uint64_t val2, RTGCUINTREG32 *pf);
    125 typedef FNEMULATELOCKPARAM2    *PFNEMULATELOCKPARAM2;
    126 typedef DECLCALLBACK(int)       FNEMULATELOCKPARAM3(void *pvParam1, uint64_t val2, size_t cb, RTGCUINTREG32 *pf);
    127 typedef FNEMULATELOCKPARAM3    *PFNEMULATELOCKPARAM3;
     118typedef DECLCALLBACKTYPE(uint32_t, FNEMULATEPARAM2UINT32,(void *pvParam1, uint64_t val2));
     119typedef FNEMULATEPARAM2UINT32    *PFNEMULATEPARAM2UINT32;
     120typedef DECLCALLBACKTYPE(uint32_t, FNEMULATEPARAM2,(void *pvParam1, size_t val2));
     121typedef FNEMULATEPARAM2          *PFNEMULATEPARAM2;
     122typedef DECLCALLBACKTYPE(uint32_t, FNEMULATEPARAM3,(void *pvParam1, uint64_t val2, size_t val3));
     123typedef FNEMULATEPARAM3          *PFNEMULATEPARAM3;
     124typedef DECLCALLBACKTYPE(int, FNEMULATELOCKPARAM2,(void *pvParam1, uint64_t val2, RTGCUINTREG32 *pf));
     125typedef FNEMULATELOCKPARAM2 *PFNEMULATELOCKPARAM2;
     126typedef DECLCALLBACKTYPE(int, FNEMULATELOCKPARAM3,(void *pvParam1, uint64_t val2, size_t cb, RTGCUINTREG32 *pf));
     127typedef FNEMULATELOCKPARAM3 *PFNEMULATELOCKPARAM3;
    128128/** @}  */
    129129
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