Changeset 28087 in vbox
- Timestamp:
- Apr 8, 2010 12:46:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestControl/service.cpp
r28086 r28087 36 36 #include <iprt/cpp/autores.h> 37 37 #include <iprt/cpp/utils.h> 38 #include <iprt/critsect.h>39 38 #include <iprt/err.h> 40 39 #include <iprt/mem.h> … … 118 117 /** The host command list */ 119 118 HostCmdList mHostCmds; 120 RTCRITSECT critsect;121 119 122 120 public: … … 135 133 "GuestCtrlReq"); 136 134 #endif 137 if (RT_SUCCESS(rc))138 rc = RTCritSectInit(&critsect);139 140 135 if (RT_FAILURE(rc)) 141 136 throw rc; … … 275 270 int Service::execBufferAllocate(PVBOXGUESTCTRPARAMBUFFER pBuf, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 276 271 { 277 RTCritSectEnter(&critsect);278 279 272 AssertPtr(pBuf); 280 273 int rc = VINF_SUCCESS; … … 333 326 } 334 327 } 335 RTCritSectLeave(&critsect);336 328 return rc; 337 329 } … … 340 332 void Service::execBufferFree(PVBOXGUESTCTRPARAMBUFFER pBuf) 341 333 { 342 RTCritSectEnter(&critsect);343 334 AssertPtr(pBuf); 344 335 for (uint32_t i = 0; i < pBuf->uParmCount; i++) … … 357 348 pBuf->uParmCount = 0; 358 349 } 359 RTCritSectLeave(&critsect);360 350 } 361 351 … … 363 353 int Service::execBufferAssign(PVBOXGUESTCTRPARAMBUFFER pBuf, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 364 354 { 365 RTCritSectEnter(&critsect);366 367 355 AssertPtr(pBuf); 368 356 int rc = VINF_SUCCESS; … … 398 386 } 399 387 } 400 RTCritSectLeave(&critsect);401 388 return rc; 402 389 } … … 422 409 int rc = VINF_SUCCESS; 423 410 424 /** @todo !!!!! LOCKING !!!!!!!!! */425 426 411 if (cParms < 2) 427 412 { … … 430 415 } 431 416 else 432 { 433 /* 417 { 418 /* 434 419 * If host command list is empty (nothing to do right now) just 435 420 * defer the call until we got something to do (makes the client … … 466 451 else 467 452 { 468 rc = execBufferAssign(&curCmd.parmBuf, cParms, paParms); 453 rc = execBufferAssign(&curCmd.parmBuf, cParms, paParms); 469 454 if (RT_SUCCESS(rc)) 470 455 mHostCmds.pop_front(); … … 487 472 int Service::hostNotifyGuest(GuestCall *pCall, uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 488 473 { 489 /** @todo !!!!! LOCKING !!!!!!!!! */490 491 474 AssertPtr(pCall); 492 int rc = VINF_SUCCESS; 475 int rc = VINF_SUCCESS; 493 476 494 477 int rc2 = guestGetHostMsg(pCall->mHandle, pCall->mNumParms, pCall->mParms); … … 502 485 int Service::hostProcessCmd(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 503 486 { 504 /** @todo !!!!! LOCKING !!!!!!!!! */505 506 487 int rc = VINF_SUCCESS; 507 488 … … 549 530 /* The guest asks the host for the next messsage to process. */ 550 531 case GUEST_GET_HOST_MSG: 551 LogFlowFunc(("GUEST_GET_HOST_MSG\n")); 532 LogFlowFunc(("GUEST_GET_HOST_MSG\n")); 552 533 rc = guestGetHostMsg(callHandle, cParms, paParms); 553 534 break; … … 571 552 rc = VERR_NOT_IMPLEMENTED; 572 553 } 573 /* 574 * If current call is not deferred, call the completion function. 554 /* 555 * If current call is not deferred, call the completion function. 575 556 */ 576 557 if (rc != VINF_HGCM_ASYNC_EXECUTE)
Note:
See TracChangeset
for help on using the changeset viewer.