VirtualBox

Changeset 68555 in vbox for trunk


Ignore:
Timestamp:
Aug 31, 2017 12:09:56 PM (7 years ago)
Author:
vboxsync
Message:

merging vbglioc r117701: VBoxGueSTR0LibSharedFolders,VBoxGuest.h: Added new HGCM macros for dealing with passing page lists (the lists are placed after the parameters).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r68550 r68555  
    490490
    491491/**
     492 * Initialize a HGCM header (VBGLIOCHGCMCALL) for a non-timed call, custom size.
     493 *
     494 * This is usually only needed when appending page lists to the call.
     495 *
     496 * @param   a_pHdr          The header to initalize.
     497 * @param   a_idClient      The client connection ID to call thru.
     498 * @param   a_idFunction    The function we're calling
     499 * @param   a_cParameters   Number of parameters.
     500 * @param   a_cbReq         The request size.
     501 */
     502# define VBGL_HGCM_HDR_INIT_EX(a_pHdr, a_idClient, a_idFunction, a_cParameters, a_cbReq) \
     503    do { \
     504        Assert((a_cbReq) >= sizeof(VBGLIOCHGCMCALL) + (a_cParameters) * sizeof(HGCMFunctionParameter)); \
     505        VBGLREQHDR_INIT_EX(&(a_pHdr)->Hdr, (a_cbReq), (a_cbReq)); \
     506        (a_pHdr)->u32ClientID    = (a_idClient); \
     507        (a_pHdr)->u32Function    = (a_idFunction); \
     508        (a_pHdr)->cMsTimeout     = RT_INDEFINITE_WAIT; \
     509        (a_pHdr)->fInterruptible = true; \
     510        (a_pHdr)->bReserved      = 0; \
     511        (a_pHdr)->cParms         = (a_cParameters); \
     512    } while (0)
     513
     514/**
    492515 * Initialize a HGCM header (VBGLIOCHGCMCALL), with timeout (interruptible).
    493516 *
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c

    r68550 r68555  
    5252    (a)->fInterruptible = false /* Currently we do like nfs with -o hard (default). */
    5353
     54#define VBOX_INIT_CALL_EX(a, b, c, a_cbReq) \
     55    LogFunc(("%s, idClient=%d\n", "SHFL_FN_" # b, (c)->idClient)); \
     56    VBGL_HGCM_HDR_INIT_EX(a, (c)->idClient, SHFL_FN_##b, SHFL_CPARMS_##b, a_cbReq); \
     57    (a)->fInterruptible = false /* Currently we do like nfs with -o hard (default). */
     58
    5459
    5560
     
    347352        return VERR_NO_TMP_MEMORY;
    348353
    349     VBOX_INIT_CALL(&pData->callInfo, READ, pClient);
     354    VBOX_INIT_CALL_EX(&pData->callInfo, READ, pClient, cbData);
    350355
    351356    pData->root.type                      = VMMDevHGCMParmType_32bit;
     
    425430        return VERR_NO_TMP_MEMORY;
    426431
    427     VBOX_INIT_CALL(&pData->callInfo, WRITE, pClient);
     432    VBOX_INIT_CALL_EX(&pData->callInfo, WRITE, pClient, cbData);
    428433
    429434    pData->root.type                      = VMMDevHGCMParmType_32bit;
     
    473478        return VERR_NO_TMP_MEMORY;
    474479
    475     VBOX_INIT_CALL(&pData->callInfo, WRITE, pClient);
     480    VBOX_INIT_CALL_EX(&pData->callInfo, WRITE, pClient, cbData);
    476481
    477482    pData->root.type                      = VMMDevHGCMParmType_32bit;
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