VirtualBox

Changeset 105353 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jul 16, 2024 11:47:19 AM (5 months ago)
Author:
vboxsync
Message:

iprt/req.h,*: Adjustments of the RTReqQueue API to fit darwin/arm64 restrictions. bugref:10725

Location:
trunk/src/VBox/Devices
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvCloudTunnel.cpp

    r104584 r105353  
    419419        Log2(("%s: submitting TX request (pvSeg=%p, %u bytes) to I/O queue...\n",
    420420              pThis->pszInstance, pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed));
    421         rc = RTReqQueueCallEx(pThis->hIoReqQueue, NULL /*ppReq*/, 0 /*cMillies*/,
    422                               RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
     421        rc = RTReqQueueCallEx(pThis->hIoReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
    423422                              (PFNRT)drvCloudTunnelSendWorker, 2, pThis, pSgBuf);
    424423
     
    743742        return len;
    744743    }
    745     int rc = RTReqQueueCallEx(pThis->hDevReqQueue, NULL /*ppReq*/, 0 /*cMillies*/,
    746                               RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
     744    int rc = RTReqQueueCallEx(pThis->hDevReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
    747745                              (PFNRT)drvCloudTunnelReceiveWorker, 3, pThis, pvPacket, len);
    748746    if (RT_FAILURE(rc))
     
    821819    /* Wake up device thread. */
    822820    PRTREQ pReq;
    823     int rc = RTReqQueueCall(pThis->hDevReqQueue, &pReq, 10000 /*cMillies*/,
    824                             (PFNRT)drvCloudTunnelReceiveWakeup, 1, pThis);
     821    int rc = RTReqQueueCall(pThis->hDevReqQueue, &pReq, 10000 /*cMillies*/, (PFNRT)drvCloudTunnelReceiveWakeup, 1, pThis);
    825822    if (RT_FAILURE(rc))
    826823        LogRel(("%s: failed to wake up device thread - %Rrc\n", pThis->pszInstance, rc));
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r104583 r105353  
    610610    if (pThis->pSlirpThread->enmState == PDMTHREADSTATE_RUNNING)
    611611    {
    612         rc = RTReqQueueCallEx(pThis->hSlirpReqQueue, NULL /*ppReq*/, 0 /*cMillies*/,
    613                               RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
     612        rc = RTReqQueueCallEx(pThis->hSlirpReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
    614613                              (PFNRT)drvNATSendWorker, 2, pThis, pSgBuf);
    615614        if (RT_SUCCESS(rc))
     
    963962
    964963    int rc;
    965     rc = RTReqQueueCallEx(pThis->hHostResQueue, NULL /*ppReq*/, 0 /*cMillies*/,
    966                           RTREQFLAGS_IPRT_STATUS | RTREQFLAGS_NO_WAIT,
     964    rc = RTReqQueueCallEx(pThis->hHostResQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_IPRT_STATUS | RTREQFLAGS_NO_WAIT,
    967965                          (PFNRT)drvNATReqQueueInterrupt, 0);
    968966    return rc;
     
    10461044 * Call a function on the slirp thread.
    10471045 */
    1048 int slirp_call(void *pvUser, PRTREQ *ppReq, RTMSINTERVAL cMillies,
    1049                unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
     1046int slirp_call(void *pvUser, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
    10501047{
    10511048    PDRVNAT pThis = (PDRVNAT)pvUser;
     
    10851082    va_start(va, cArgs);
    10861083
    1087     rc = RTReqQueueCallV(pThis->hHostResQueue, ppReq, cMillies, fFlags,
    1088                          pfnFunction, cArgs, va);
     1084    rc = RTReqQueueCallV(pThis->hHostResQueue, ppReq, cMillies, fFlags, pfnFunction, cArgs, va);
    10891085
    10901086    va_end(va);
     
    12911287             * so we schedule the worker and kick the NAT thread.
    12921288             */
    1293             int rc = RTReqQueueCallEx(pThis->hSlirpReqQueue, NULL /*ppReq*/, 0 /*cMillies*/,
    1294                                       RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
     1289            int rc = RTReqQueueCallEx(pThis->hSlirpReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
    12951290                                      (PFNRT)drvNATReinitializeHostNameResolving, 1, pThis);
    12961291            if (RT_SUCCESS(rc))
  • trunk/src/VBox/Devices/Network/DrvNATlibslirp.cpp

    r105202 r105353  
    334334    if (pThis->pSlirpThread->enmState == PDMTHREADSTATE_RUNNING)
    335335    {
    336         rc = RTReqQueueCallEx(pThis->hSlirpReqQueue, NULL /*ppReq*/, 0 /*cMillies*/,
    337                               RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
     336        rc = RTReqQueueCallEx(pThis->hSlirpReqQueue, NULL /*ppReq*/, 0 /*cMillies*/, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
    338337                              (PFNRT)drvNATSendWorker, 2, pThis, pSgBuf);
    339338        if (RT_SUCCESS(rc))
  • trunk/src/VBox/Devices/Network/slirp/hostres.c

    r98103 r105353  
    175175
    176176
    177 static void hostres_async(struct response *res);
    178 static void hostres_slirp_reply(struct response *res);
     177static DECLCALLBACK(void) hostres_async(struct response *res);
     178static DECLCALLBACK(void) hostres_slirp_reply(struct response *res);
    179179
    180180
     
    205205    res->end = res->qlen = mlen;
    206206
    207     rc = slirp_call_hostres(pData->pvUser, NULL, 0,
    208                             RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
    209                             (PFNRT)hostres_async, 1, res);
    210 
     207    rc = slirp_call_hostres(pData->pvUser, NULL, 0, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT, (PFNRT)hostres_async, 1, res);
    211208    if (RT_FAILURE(rc))
    212209    {
     
    341338    free_labels(res->labels);
    342339
    343     rc = slirp_call(res->pData->pvUser, NULL, 0,
    344                     RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
    345                     (PFNRT)hostres_slirp_reply, 1, res);
    346 
     340    rc = slirp_call(res->pData->pvUser, NULL, 0, RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT, (PFNRT)hostres_slirp_reply, 1, res);
    347341    if (RT_FAILURE(rc))
    348342    {
  • trunk/src/VBox/Devices/Network/slirp/libslirp.h

    r98103 r105353  
    8484
    8585int slirp_call(void *pvUser, PRTREQ *ppReq, RTMSINTERVAL cMillies,
    86                unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
     86               unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...) RT_IPRT_CALL_ATTR(5, 6, 7);
    8787
    8888int slirp_call_hostres(void *pvUser, PRTREQ *ppReq, RTMSINTERVAL cMillies,
    89                        unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
     89                       unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...) RT_IPRT_CALL_ATTR(5, 6, 7);
    9090
    9191
  • trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp

    r99887 r105353  
    10181018    {
    10191019        if (pIoReq->enmType == PDMMEDIAEXIOREQTYPE_READ)
    1020             rc = RTReqQueueCallEx(pThis->hReqQ, NULL, 0, RTREQFLAGS_NO_WAIT,
    1021                                   (PFNRT)drvramdiskIoReqReadWorker, 2, pThis, pIoReq);
     1020            rc = RTReqQueueCallEx(pThis->hReqQ, NULL, 0, RTREQFLAGS_NO_WAIT, (PFNRT)drvramdiskIoReqReadWorker, 2, pThis, pIoReq);
    10221021        else
    10231022        {
     
    14951494
    14961495    ASMAtomicIncU32(&pThis->cIoReqsActive);
    1497     return RTReqQueueCallEx(pThis->hReqQ, NULL, 0, RTREQFLAGS_NO_WAIT,
    1498                             (PFNRT)drvramdiskIoReqFlushWorker, 2, pThis, pIoReq);
     1496    return RTReqQueueCallEx(pThis->hReqQ, NULL, 0, RTREQFLAGS_NO_WAIT, (PFNRT)drvramdiskIoReqFlushWorker, 2, pThis, pIoReq);
    14991497}
    15001498
     
    15371535        ASMAtomicIncU32(&pThis->cIoReqsActive);
    15381536
    1539         rc = RTReqQueueCallEx(pThis->hReqQ, NULL, 0, RTREQFLAGS_NO_WAIT,
    1540                               (PFNRT)drvramdiskIoReqDiscardWorker, 2, pThis, pIoReq);
     1537        rc = RTReqQueueCallEx(pThis->hReqQ, NULL, 0, RTREQFLAGS_NO_WAIT, (PFNRT)drvramdiskIoReqDiscardWorker, 2, pThis, pIoReq);
    15411538        if (rc == VINF_SUCCESS)
    15421539            rc = VINF_PDM_MEDIAEX_IOREQ_IN_PROGRESS;
     
    17061703
    17071704    PRTREQ pReq = NULL;
    1708     int rc = RTReqQueueCallEx(pThis->hReqQ, &pReq, RT_INDEFINITE_WAIT, RTREQFLAGS_IPRT_STATUS,
    1709                               (PFNRT)drvramdiskDestructQueue, 0);
     1705    int rc = RTReqQueueCallEx(pThis->hReqQ, &pReq, RT_INDEFINITE_WAIT, RTREQFLAGS_IPRT_STATUS, (PFNRT)drvramdiskDestructQueue, 0);
    17101706    AssertRC(rc);
    17111707    RTReqRelease(pReq);
  • trunk/src/VBox/Devices/USB/VUSBDevice.cpp

    r100517 r105353  
    554554            {
    555555                RTCritSectEnter(&pDev->pHub->CritSectDevices);
    556                 int rc = vusbDevIoThreadExecSync(pDev, (PFNRT)pDev->pUsbIns->pReg->pfnUsbClearHaltedEndpoint,
    557                                                  2, pDev->pUsbIns, pSetup->wIndex);
     556                int rc = vusbDevIoThreadExecSync(pDev, (PFNRT)pDev->pUsbIns->pReg->pfnUsbClearHaltedEndpoint, 2,
     557                                                 pDev->pUsbIns, pSetup->wIndex);
    558558                RTCritSectLeave(&pDev->pHub->CritSectDevices);
    559559                return RT_SUCCESS(rc);
  • trunk/src/VBox/Devices/USB/VUSBInternal.h

    r104804 r105353  
    504504int vusbDevUrbIoThreadDestroy(PVUSBDEV pDev);
    505505DECLHIDDEN(void) vusbDevCancelAllUrbs(PVUSBDEV pDev, bool fDetaching);
    506 DECLHIDDEN(int) vusbDevIoThreadExecV(PVUSBDEV pDev, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
    507 DECLHIDDEN(int) vusbDevIoThreadExec(PVUSBDEV pDev, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
    508 DECLHIDDEN(int) vusbDevIoThreadExecSync(PVUSBDEV pDev, PFNRT pfnFunction, unsigned cArgs, ...);
     506DECLHIDDEN(int) vusbDevIoThreadExecV(PVUSBDEV pDev, uint32_t fFlags, PFNRT pfnFunction,
     507                                     unsigned cArgs, va_list Args) RT_IPRT_CALL_ATTR(3, 4, 0);
     508DECLHIDDEN(int) vusbDevIoThreadExec(PVUSBDEV pDev, uint32_t fFlags, PFNRT pfnFunction,
     509                                    unsigned cArgs, ...) RT_IPRT_CALL_ATTR(3, 4, 5);
     510DECLHIDDEN(int) vusbDevIoThreadExecSync(PVUSBDEV pDev, PFNRT pfnFunction, unsigned cArgs, ...) RT_IPRT_CALL_ATTR(2, 3, 4);
    509511DECLHIDDEN(int) vusbUrbCancelWorker(PVUSBURB pUrb, CANCELMODE enmMode);
    510512
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