| 140 | // event cancellation |
| 141 | |
| 142 | void cancelEvent(U32 eventSequence) |
| 143 | { |
| 144 | Mutex::lockMutex(gEventQueueMutex); |
| 145 | |
| 146 | SimEvent **walk = &gEventQueue; |
| 147 | SimEvent *current; |
| 148 | |
| 149 | while((current = *walk) != NULL) |
| 150 | { |
| 151 | if(current->sequenceCount == eventSequence) |
| 152 | { |
| 153 | *walk = current->nextEvent; |
| 154 | delete current; |
| 155 | Mutex::unlockMutex(gEventQueueMutex); |
| 156 | return; |
| 157 | } |
| 158 | else |
| 159 | walk = &(current->nextEvent); |
| 160 | } |
| 161 | |
| 162 | Mutex::unlockMutex(gEventQueueMutex); |
| 163 | } |
| 164 | |
| 165 | void cancelPendingEvents(SimObject *obj) |
| 166 | { |
no outgoing calls
no test coverage detected