- Timestamp:
- Jan 8, 2008 12:56:33 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27120
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMReq.cpp
r5999 r6274 526 526 } 527 527 528 /* 529 * Are we the EMT or not? 530 * Also, store pVM (and fFlags) locally since pReq may be invalid after queuing it. 531 */ 528 532 int rc = VINF_SUCCESS; 529 if (pReq->pVM->NativeThreadEMT != RTThreadNativeSelf()) 530 { 533 PVM pVM = ((VMREQ volatile *)pReq)->pVM; /* volatile paranoia */ 534 if (pVM->NativeThreadEMT != RTThreadNativeSelf()) 535 { 536 unsigned fFlags = ((VMREQ volatile *)pReq)->fFlags; /* volatile paranoia */ 537 531 538 /* 532 539 * Insert it. … … 536 543 do 537 544 { 538 pNext = p Req->pVM->vm.s.pReqs;545 pNext = pVM->vm.s.pReqs; 539 546 pReq->pNext = pNext; 540 } while (!ASMAtomicCmpXchgPtr((void * volatile *)&p Req->pVM->vm.s.pReqs, (void *)pReq, (void *)pNext));547 } while (!ASMAtomicCmpXchgPtr((void * volatile *)&pVM->vm.s.pReqs, (void *)pReq, (void *)pNext)); 541 548 542 549 /* 543 550 * Notify EMT. 544 551 */ 545 VM_FF_SET(p Req->pVM, VM_FF_REQUEST);546 VMR3NotifyFF(p Req->pVM, false);552 VM_FF_SET(pVM, VM_FF_REQUEST); 553 VMR3NotifyFF(pVM, false); 547 554 548 555 /* 549 556 * Wait and return. 550 557 */ 551 if (!( pReq->fFlags & VMREQFLAGS_NO_WAIT))558 if (!(fFlags & VMREQFLAGS_NO_WAIT)) 552 559 rc = VMR3ReqWait(pReq, cMillies); 553 560 LogFlow(("VMR3ReqQueue: returns %Vrc\n", rc)); … … 559 566 */ 560 567 pReq->enmState = VMREQSTATE_QUEUED; 561 rc = vmR3ReqProcessOne(p Req->pVM, pReq);568 rc = vmR3ReqProcessOne(pVM, pReq); 562 569 LogFlow(("VMR3ReqQueue: returns %Vrc (processed)\n", rc)); 563 570 }
Note:
See TracChangeset
for help on using the changeset viewer.