| 163 | } |
| 164 | |
| 165 | void cancelPendingEvents(SimObject *obj) |
| 166 | { |
| 167 | Mutex::lockMutex(gEventQueueMutex); |
| 168 | |
| 169 | SimEvent **walk = &gEventQueue; |
| 170 | SimEvent *current; |
| 171 | |
| 172 | while((current = *walk) != NULL) |
| 173 | { |
| 174 | if(current->destObject == obj) |
| 175 | { |
| 176 | *walk = current->nextEvent; |
| 177 | delete current; |
| 178 | } |
| 179 | else |
| 180 | walk = &(current->nextEvent); |
| 181 | } |
| 182 | Mutex::unlockMutex(gEventQueueMutex); |
| 183 | } |
| 184 | |
| 185 | //--------------------------------------------------------------------------- |
| 186 | // event pending test |
no outgoing calls
no test coverage detected