VirtualBox

Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139061
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/pdmcommon.h

    r82968 r85121  
    115115 * @thread  EMT(0)
    116116 */
    117 typedef DECLCALLBACK(bool) FNPDMUSBASYNCNOTIFY(PPDMUSBINS pUsbIns);
     117typedef DECLCALLBACKTYPE(bool, FNPDMUSBASYNCNOTIFY,(PPDMUSBINS pUsbIns));
    118118/** Pointer to a FNPDMUSBASYNCNOTIFY. */
    119119typedef FNPDMUSBASYNCNOTIFY *PFNPDMUSBASYNCNOTIFY;
     
    131131 * @thread  EMT(0)
    132132 */
    133 typedef DECLCALLBACK(bool) FNPDMDEVASYNCNOTIFY(PPDMDEVINS pDevIns);
     133typedef DECLCALLBACKTYPE(bool, FNPDMDEVASYNCNOTIFY,(PPDMDEVINS pDevIns));
    134134/** Pointer to a FNPDMDEVASYNCNOTIFY. */
    135135typedef FNPDMDEVASYNCNOTIFY *PFNPDMDEVASYNCNOTIFY;
     
    147147 * @thread  EMT(0)
    148148 */
    149 typedef DECLCALLBACK(bool) FNPDMDRVASYNCNOTIFY(PPDMDRVINS pDrvIns);
     149typedef DECLCALLBACKTYPE(bool, FNPDMDRVASYNCNOTIFY,(PPDMDRVINS pDrvIns));
    150150/** Pointer to a FNPDMDRVASYNCNOTIFY. */
    151151typedef FNPDMDRVASYNCNOTIFY *PFNPDMDRVASYNCNOTIFY;
     
    160160 * @param   u64Arg      Optional integer argument for the operation.
    161161 */
    162 typedef DECLCALLBACK(int) FNPDMDEVREQHANDLERR0(PPDMDEVINS pDevIns, uint32_t uOperation, uint64_t u64Arg);
     162typedef DECLCALLBACKTYPE(int, FNPDMDEVREQHANDLERR0,(PPDMDEVINS pDevIns, uint32_t uOperation, uint64_t u64Arg));
    163163/** Ring-0 pointer to a FNPDMDEVREQHANDLERR0. */
    164164typedef R0PTRTYPE(FNPDMDEVREQHANDLERR0 *) PFNPDMDEVREQHANDLERR0;
     
    172172 * @param   u64Arg      Optional integer argument for the operation.
    173173 */
    174 typedef DECLCALLBACK(int) FNPDMDRVREQHANDLERR0(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg);
     174typedef DECLCALLBACKTYPE(int, FNPDMDRVREQHANDLERR0,(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg));
    175175/** Ring-0 pointer to a FNPDMDRVREQHANDLERR0. */
    176176typedef R0PTRTYPE(FNPDMDRVREQHANDLERR0 *) PFNPDMDRVREQHANDLERR0;
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