VirtualBox

Changeset 67145 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
May 30, 2017 3:11:29 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115821
Message:

bugref:8524: Additions/linux: play nicely with distribution-installed Additions
Rename HGSMIBufferAlloc.cpp to HGSMIBuffers.cpp and move VBoxHGSMIBufferSubmit() there.

Location:
trunk/src/VBox/Additions/common/VBoxVideo
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp

    r67066 r67145  
    2929#include <VBoxVideoVBE.h>
    3030#include <VBoxVideoIPRT.h>
    31 
    32 /**
    33  * Submit a command descriptor allocated by @a VBoxHGSMIBufferAlloc.
    34  *
    35  * @param  pCtx      the context containing the heap used
    36  * @param  pvBuffer  the pointer returned by @a VBoxHGSMIBufferAlloc
    37  */
    38 DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
    39                                       void *pvBuffer)
    40 {
    41     /* Initialize the buffer and get the offset for port IO. */
    42     HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer);
    43 
    44     Assert(offBuffer != HGSMIOFFSET_VOID);
    45     if (offBuffer != HGSMIOFFSET_VOID)
    46     {
    47         /* Submit the buffer to the host. */
    48         VBVO_PORT_WRITE_U32(pCtx->port, offBuffer);
    49         /* Make the compiler aware that the host has changed memory. */
    50         ASMCompilerBarrier();
    51         return VINF_SUCCESS;
    52     }
    53 
    54     return VERR_INVALID_PARAMETER;
    55 }
    56 
    5731
    5832/** Detect whether HGSMI is supported by the host. */
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp

    r67144 r67145  
    9797#endif
    9898}
     99
     100/**
     101 * Submit a command descriptor allocated by @a VBoxHGSMIBufferAlloc.
     102 *
     103 * @param  pCtx      the context containing the heap used
     104 * @param  pvBuffer  the pointer returned by @a VBoxHGSMIBufferAlloc
     105 */
     106DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
     107                                      void *pvBuffer)
     108{
     109    /* Initialize the buffer and get the offset for port IO. */
     110    HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer);
     111
     112    Assert(offBuffer != HGSMIOFFSET_VOID);
     113    if (offBuffer != HGSMIOFFSET_VOID)
     114    {
     115        /* Submit the buffer to the host. */
     116        VBVO_PORT_WRITE_U32(pCtx->port, offBuffer);
     117        /* Make the compiler aware that the host has changed memory. */
     118        ASMCompilerBarrier();
     119        return VINF_SUCCESS;
     120    }
     121
     122    return VERR_INVALID_PARAMETER;
     123}
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