VirtualBox

Changeset 26580 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Feb 16, 2010 1:59:48 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57763
Message:

slirp_state.h: Use RTReqCall*.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r26495 r26580  
    504504# define DO_TCP_OUTPUT(data, sotcb)                                     \
    505505    do {                                                                \
    506         PRTREQ pReq = NULL;                                             \
     506        PRTREQ pReq;                                                    \
    507507        int rc;                                                         \
    508         rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL);  \
    509         AssertRC(rc);                                                   \
    510         pReq->u.Internal.pfn      = (PFNRT)tcp_output;                  \
    511         pReq->u.Internal.cArgs    = 2;                                  \
    512         pReq->u.Internal.aArgs[0] = (uintptr_t)(data);                  \
    513         pReq->u.Internal.aArgs[1] = (uintptr_t)(sotcb);                 \
    514         pReq->fFlags              = RTREQFLAGS_VOID;                    \
    515         rc = RTReqQueue(pReq, 0);                                       \
     508        rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies*/,    \
     509                           (PFNRT)tcp_output 2, data, sotcb);           \
    516510        if (RT_LIKELY(rc) == VERR_TIMEOUT)                              \
    517511        {                                                               \
     
    528522# define DO_TCP_INPUT(data, mbuf, size, so)                             \
    529523    do {                                                                \
    530         PRTREQ pReq = NULL;                                             \
    531524        int rc;                                                         \
    532         rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL);  \
    533         AssertReleaseRC(rc);                                            \
    534         pReq->u.Internal.pfn      = (PFNRT)tcp_input;                   \
    535         pReq->u.Internal.cArgs    = 4;                                  \
    536         pReq->u.Internal.aArgs[0] = (uintptr_t)(data);                  \
    537         pReq->u.Internal.aArgs[1] = (uintptr_t)(mbuf);                  \
    538         pReq->u.Internal.aArgs[2] = (uintptr_t)(size);                  \
    539         pReq->u.Internal.aArgs[3] = (uintptr_t)(so);                    \
    540         pReq->fFlags              = RTREQFLAGS_VOID|RTREQFLAGS_NO_WAIT; \
    541         rc = RTReqQueue(pReq, 0);                                       \
     525        rc = RTReqCallEx((data)->pReqQueue, NULL, 0 /*cMillies*/,       \
     526                         RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,          \
     527                         (PFNRT)tcp_input, 4, data, mbuf, size, so);    \
    542528        AssertReleaseRC(rc);                                            \
    543529    } while(0)
     
    545531# define DO_TCP_CONNECT(data, so)                                       \
    546532    do {                                                                \
    547         PRTREQ pReq = NULL;                                             \
     533        PRTREQ pReq;                                                    \
    548534        int rc;                                                         \
    549         rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL);  \
    550         AssertReleaseRC(rc);                                            \
    551         pReq->u.Internal.pfn      = (PFNRT)tcp_connect;                 \
    552         pReq->u.Internal.cArgs    = 2;                                  \
    553         pReq->u.Internal.aArgs[0] = (uintptr_t)(data);                  \
    554         pReq->u.Internal.aArgs[1] = (uintptr_t)(so);                    \
    555         pReq->fFlags              = RTREQFLAGS_VOID;                    \
    556         rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \
     535        rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies*/,    \
     536                           (PFNRT)tcp_connect, 2, data, so);            \
    557537        if (RT_LIKELY(rc) == VERR_TIMEOUT)                              \
    558538        {                                                               \
     
    569549# define DO_SOREAD(ret, data, so, ifclose)                              \
    570550    do {                                                                \
    571         PRTREQ pReq = NULL;                                             \
     551        PRTREQ pReq;                                                    \
    572552        int rc;                                                         \
    573         rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL);  \
    574         AssertReleaseRC(rc);                                            \
    575         pReq->u.Internal.pfn      = (PFNRT)soread_queue;                \
    576         pReq->u.Internal.cArgs    = 4;                                  \
    577         pReq->u.Internal.aArgs[0] = (uintptr_t)(data);                  \
    578         pReq->u.Internal.aArgs[1] = (uintptr_t)(so);                    \
    579         pReq->u.Internal.aArgs[2] = (uintptr_t)(ifclose);               \
    580         pReq->u.Internal.aArgs[3] = (uintptr_t)&(ret);                  \
    581         pReq->fFlags              = RTREQFLAGS_VOID;                    \
    582         rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \
     553        rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies*/,    \
     554                           (PFNRT)soread_queue, 4,                      \
     555                           data, so, ifclose, &(ret));                  \
    583556        if (RT_LIKELY(rc) == VERR_TIMEOUT)                              \
    584557        {                                                               \
     
    595568# define DO_SOWRITE(ret, data, so)                                      \
    596569    do {                                                                \
    597         PRTREQ pReq = NULL;                                             \
     570        PRTREQ pReq;                                                    \
    598571        int rc;                                                         \
    599         rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL);  \
    600         AssertReleaseRC(rc);                                            \
    601         pReq->u.Internal.pfn      = (PFNRT)sowrite;                     \
    602         pReq->u.Internal.cArgs    = 2;                                  \
    603         pReq->u.Internal.aArgs[0] = (uintptr_t)(data);                  \
    604         pReq->u.Internal.aArgs[1] = (uintptr_t)(so);                    \
    605         pReq->fFlags              = RTREQFLAGS_RETURN_MASK;             \
    606         rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \
     572        rc = RTReqCall((data)->pReqQueue, &pReq, 0 /*cMillies*/,        \
     573                       (PFNRT)sowrite, 2, data, so);                    \
    607574        if (RT_LIKELY(rc) == VERR_TIMEOUT)                              \
    608575        {                                                               \
     
    619586# define DO_SORECFROM(data, so)                                         \
    620587    do {                                                                \
    621         PRTREQ pReq = NULL;                                             \
     588        PRTREQ pReq;                                                    \
    622589        int rc;                                                         \
    623         rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL);  \
    624         AssertReleaseRC(rc);                                            \
    625         pReq->u.Internal.pfn      = (PFNRT)sorecvfrom;                  \
    626         pReq->u.Internal.cArgs    = 2;                                  \
    627         pReq->u.Internal.aArgs[0] = (uintptr_t)(data);                  \
    628         pReq->u.Internal.aArgs[1] = (uintptr_t)(so);                    \
    629         pReq->fFlags              = RTREQFLAGS_VOID;                    \
    630         rc = RTReqQueue(pReq, 0);                                       \
     590        rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies */,   \
     591                           (PFNRT)sorecvfrom, 2, data, so);             \
    631592        if (RT_LIKELY(rc) == VERR_TIMEOUT)                              \
    632593        {                                                               \
     
    643604# define DO_UDP_DETACH(data, so, so_next)                               \
    644605    do {                                                                \
    645         PRTREQ pReq = NULL;                                             \
     606        PRTREQ pReq;                                                    \
    646607        int rc;                                                         \
    647         rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL);  \
    648         AssertReleaseRC(rc);                                            \
    649         pReq->u.Internal.pfn      = (PFNRT)udp_detach;                  \
    650         pReq->u.Internal.cArgs    = 2;                                  \
    651         pReq->u.Internal.aArgs[0] = (uintptr_t)(data);                  \
    652         pReq->u.Internal.aArgs[1] = (uintptr_t)(so);                    \
    653         pReq->fFlags              = RTREQFLAGS_VOID;                    \
    654         rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \
     608        rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /* cMillies*/,   \
     609                           (PFNRT)udp_detach, 2, data, so);             \
    655610        if (RT_LIKELY(rc) == VERR_TIMEOUT)                              \
    656611        {                                                               \
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