VirtualBox

Changeset 41058 in vbox for trunk/include


Ignore:
Timestamp:
Apr 25, 2012 9:42:29 PM (13 years ago)
Author:
vboxsync
Message:

crHgsmi cleanup & adjustments

Location:
trunk/include/VBox
Files:
2 edited

Legend:

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

    r36536 r41058  
    3333
    3434typedef struct VBOXUHGSMI_BUFFER *PVBOXUHGSMI_BUFFER;
    35 typedef void* HVBOXUHGSMI_SYNCHOBJECT;
    3635
    37 typedef enum
     36typedef struct VBOXUHGSMI_BUFFER_TYPE_FLAGS
    3837{
    39     VBOXUHGSMI_SYNCHOBJECT_TYPE_NONE = 0,
    40     VBOXUHGSMI_SYNCHOBJECT_TYPE_EVENT,
    41     VBOXUHGSMI_SYNCHOBJECT_TYPE_SEMAPHORE
    42 } VBOXUHGSMI_SYNCHOBJECT_TYPE;
     38    union
     39    {
     40        struct
     41        {
     42            uint32_t fCommand    : 1;
     43            uint32_t Reserved    : 31;
     44        };
     45        uint32_t Value;
     46    };
     47} VBOXUHGSMI_BUFFER_TYPE_FLAGS;
    4348
    4449typedef struct VBOXUHGSMI_BUFFER_LOCK_FLAGS
     
    6772            uint32_t bHostReadOnly          : 1;
    6873            uint32_t bHostWriteOnly         : 1;
    69             uint32_t bDoNotRetire           : 1; /**< the buffer will be uset in a subsequent command */
    70             uint32_t bDoNotSignalCompletion : 1; /**< do not signal notification object on completion for this alloc */
     74            uint32_t bDoNotRetire           : 1; /**< the buffer will be used in a subsequent command */
    7175            uint32_t bEntireBuffer          : 1;
    72             uint32_t Reserved               : 27;
     76            uint32_t Reserved               : 28;
    7377        };
    7478        uint32_t Value;
     
    7882/* the caller can specify NULL as a hSynch and specify a valid enmSynchType to make UHGSMI create a proper object itself,
    7983 *  */
    80 typedef DECLCALLBACK(int) FNVBOXUHGSMI_BUFFER_CREATE(PVBOXUHGSMI pHgsmi, uint32_t cbBuf,
    81         VBOXUHGSMI_SYNCHOBJECT_TYPE enmSynchType, HVBOXUHGSMI_SYNCHOBJECT hSynch,
    82         PVBOXUHGSMI_BUFFER* ppBuf);
     84typedef DECLCALLBACK(int) FNVBOXUHGSMI_BUFFER_CREATE(PVBOXUHGSMI pHgsmi, uint32_t cbBuf, VBOXUHGSMI_BUFFER_TYPE_FLAGS fType, PVBOXUHGSMI_BUFFER* ppBuf);
    8385typedef FNVBOXUHGSMI_BUFFER_CREATE *PFNVBOXUHGSMI_BUFFER_CREATE;
    8486
     
    9193} VBOXUHGSMI_BUFFER_SUBMIT, *PVBOXUHGSMI_BUFFER_SUBMIT;
    9294
    93 typedef DECLCALLBACK(int) FNVBOXUHGSMI_BUFFER_SUBMIT_ASYNCH(PVBOXUHGSMI pHgsmi, PVBOXUHGSMI_BUFFER_SUBMIT aBuffers, uint32_t cBuffers);
    94 typedef FNVBOXUHGSMI_BUFFER_SUBMIT_ASYNCH *PFNVBOXUHGSMI_BUFFER_SUBMIT_ASYNCH;
     95typedef DECLCALLBACK(int) FNVBOXUHGSMI_BUFFER_SUBMIT(PVBOXUHGSMI pHgsmi, PVBOXUHGSMI_BUFFER_SUBMIT aBuffers, uint32_t cBuffers);
     96typedef FNVBOXUHGSMI_BUFFER_SUBMIT *PFNVBOXUHGSMI_BUFFER_SUBMIT;
    9597
    9698typedef DECLCALLBACK(int) FNVBOXUHGSMI_BUFFER_DESTROY(PVBOXUHGSMI_BUFFER pBuf);
     
    106108{
    107109    PFNVBOXUHGSMI_BUFFER_CREATE pfnBufferCreate;
    108     PFNVBOXUHGSMI_BUFFER_SUBMIT_ASYNCH pfnBufferSubmitAsynch;
     110    PFNVBOXUHGSMI_BUFFER_SUBMIT pfnBufferSubmit;
    109111    /** User custom data. */
    110112    void *pvUserData;
     
    119121    /* r/o data added for ease of access and simplicity
    120122     * modifying it leads to unpredictable behavior */
    121     HVBOXUHGSMI_SYNCHOBJECT hSynch;
    122     VBOXUHGSMI_SYNCHOBJECT_TYPE enmSynchType;
     123    VBOXUHGSMI_BUFFER_TYPE_FLAGS fType;
    123124    uint32_t cbBuffer;
    124     bool bSynchCreated;
    125125    /** User custom data. */
    126126    void *pvUserData;
    127127} VBOXUHGSMI_BUFFER;
    128128
     129#define VBoxUhgsmiBufferCreate(_pUhgsmi, _cbBuf, _fType, _ppBuf) ((_pUhgsmi)->pfnBufferCreate(_pUhgsmi, _cbBuf, _fType, _ppBuf))
     130#define VBoxUhgsmiBufferSubmit(_pUhgsmi, _aBuffers, _cBuffers) ((_pUhgsmi)->pfnBufferSubmit(_pUhgsmi, _aBuffers, _cBuffers))
     131
     132#define VBoxUhgsmiBufferLock(_pBuf, _offLock, _cbLock, _fFlags, _pvLock) ((_pBuf)->pfnLock(_pBuf, _offLock, _cbLock, _fFlags, _pvLock))
     133#define VBoxUhgsmiBufferUnlock(_pBuf) ((_pBuf)->pfnUnlock(_pBuf))
     134#define VBoxUhgsmiBufferDestroy(_pBuf) ((_pBuf)->pfnDestroy(_pBuf))
     135
    129136#endif
    130137
  • trunk/include/VBox/VBoxVideo.h

    r39603 r41058  
    13741374    VBOXVIDEOOFFSET offBuffer;
    13751375    uint32_t cbBuffer;
    1376     uint32_t u32GuesData;
    1377     uint64_t u64GuesData;
     1376    uint32_t u32GuestData;
     1377    uint64_t u64GuestData;
    13781378} VBOXVDMACMD_CHROMIUM_BUFFER, *PVBOXVDMACMD_CHROMIUM_BUFFER;
    13791379
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