Changeset 20747 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jun 21, 2009 8:23:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/REMAll.cpp
r20746 r20747 93 93 static void remNotifyHandlerInsert(PVM pVM, PREMHANDLERNOTIFICATION pRec) 94 94 { 95 uint32_t idxFree; 96 uint32_t idxNext; 95 /* 96 * Fetch a free record. 97 */ 98 uint32_t cFlushes = 0; 99 uint32_t idxFree; 97 100 PREMHANDLERNOTIFICATION pFree; 98 99 /* Fetch a free record. */100 101 do 101 102 { … … 103 104 if (idxFree == (uint32_t)-1) 104 105 { 105 pFree = NULL; 106 break; 106 do 107 { 108 Assert(cFlushes++ != 128); 109 AssertFatal(cFlushes < _1M); 110 remFlushHandlerNotifications(pVM); 111 idxFree = ASMAtomicUoReadU32(&pVM->rem.s.idxFreeList); 112 } while (idxFree == (uint32_t)-1); 107 113 } 108 114 pFree = &pVM->rem.s.aHandlerNotifications[idxFree]; 109 115 } while (!ASMAtomicCmpXchgU32(&pVM->rem.s.idxFreeList, pFree->idxNext, idxFree)); 110 116 111 if (!pFree) 112 { 113 remFlushHandlerNotifications(pVM); 114 /** @todo why are we dropping the pReq here without a fight? If we can drop 115 * one, we can drop all... */ 116 return; 117 } 118 119 /* Copy the record. */ 120 *pFree = *pRec; 121 pFree->idxSelf = idxFree; /* was trashed */ 122 123 /* Insert it into the pending list. */ 117 /* 118 * Copy the record. 119 */ 120 pFree->enmKind = pRec->enmKind; 121 pFree->u = pRec->u; 122 123 /* 124 * Insert it into the pending list. 125 */ 126 uint32_t idxNext; 124 127 do 125 128 {
Note:
See TracChangeset
for help on using the changeset viewer.