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

Location:
trunk/src/VBox/Devices/Network/lwip-new/vbox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.cpp

    r82968 r85121  
    4646}
    4747
    48 typedef struct {
     48typedef struct LWIPCOREUSERCALLBACK
     49{
    4950    PFNRT1 pfn;
    5051    void *pvUser;
     
    6465
    6566/**
    66  * @note: this function executes on TCPIP thread.
    67  */
    68 static void lwipCoreUserCallback(void *pvArg)
     67 * @note this function executes on TCPIP thread.
     68 */
     69static void lwipCoreUserCallback(void *pvArg) RT_NOTHROW_DEF
    6970{
    7071    LogFlowFunc(("ENTER: pvArg:%p\n", pvArg));
     
    8182
    8283/**
    83  * @note: this function executes on TCPIP thread.
    84  */
    85 static void lwipCoreInitDone(void *pvArg)
     84 * @note this function executes on TCPIP thread.
     85 */
     86static void lwipCoreInitDone(void *pvArg) RT_NOTHROW_DEF
    8687{
    8788    LogFlowFunc(("ENTER: pvArg:%p\n", pvArg));
     
    9596
    9697/**
    97  * @note: this function executes on TCPIP thread.
    98  */
    99 static void lwipCoreFiniDone(void *pvArg)
     98 * @note this function executes on TCPIP thread.
     99 */
     100static void lwipCoreFiniDone(void *pvArg) RT_NOTHROW_DEF
    100101{
    101102    LogFlowFunc(("ENTER: pvArg:%p\n", pvArg));
  • trunk/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.h

    r82968 r85121  
    2323#endif
    2424
    25 
    26 typedef DECLCALLBACKPTR(void, PFNRT1)(void *);
    27 
    2825/**
    29  * initiliazes LWIP core, and do callback on tcp/ip thread
     26 * Initializes LWIP core, and do callback on tcp/ip thread.
    3027 */
    3128int vboxLwipCoreInitialize(PFNRT1 pfnCallback, void * pfnCallbackArg);
    3229void vboxLwipCoreFinalize(PFNRT1 pfnCallback, void * pfnCallbackArg);
     30
    3331#endif /* !VBOX_INCLUDED_SRC_Network_lwip_new_vbox_VBoxLwipCore_h */
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