VirtualBox

Ignore:
Timestamp:
Nov 11, 2010 1:03:17 PM (14 years ago)
Author:
vboxsync
Message:

crOpenGL/wddm: more multithreading fixes, vista expirience index works now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r33929 r33988  
    3535#include "cr_threads.h"
    3636#include "net_internals.h"
     37#include "cr_process.h"
    3738
    3839#include <iprt/thread.h>
     
    12501251}
    12511252
     1253static int crVBoxHGCMSetPID(CRConnection *conn, CRpid pid)
     1254{
     1255    CRVBOXHGCMSETPID parms;
     1256    int rc;
     1257
     1258    parms.hdr.result      = VERR_WRONG_ORDER;
     1259    parms.hdr.u32ClientID = conn->u32ClientID;
     1260    parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_PID;
     1261    parms.hdr.cParms      = SHCRGL_CPARMS_SET_PID;
     1262
     1263    parms.u64PID.type     = VMMDevHGCMParmType_64bit;
     1264    parms.u64PID.u.value64 = (uintptr_t) pid;
     1265
     1266    rc = crVBoxHGCMCall(&parms, sizeof(parms));
     1267
     1268    if (RT_FAILURE(rc) || RT_FAILURE(parms.hdr.result))
     1269    {
     1270        Assert(0);
     1271
     1272        crWarning("SHCRGL_GUEST_FN_SET_PID failed!");
     1273        return FALSE;
     1274    }
     1275
     1276    return TRUE;
     1277}
     1278
    12521279/**
    12531280 * The function that actually connects.  This should only be called by clients,
     
    13221349    if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &Hdr) >= 0)
    13231350#else
    1324     /*@todo it'd fail */
    13251351    if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &info, sizeof (info)) >= 0)
    13261352#endif
     
    13281354        if (info.result == VINF_SUCCESS)
    13291355        {
     1356            int rc;
    13301357            conn->u32ClientID = info.u32ClientID;
    13311358            crDebug("HGCM connect was successful: client id =0x%x\n", conn->u32ClientID);
    13321359
     1360            rc = crVBoxHGCMSetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);
     1361            if (!rc)
     1362            {
     1363                return rc;
     1364            }
     1365            rc = crVBoxHGCMSetPID(conn, crGetPID());
    13331366            VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
    1334             return crVBoxHGCMSetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);
     1367            return rc;
    13351368        }
    13361369        else
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