| 74 | } |
| 75 | |
| 76 | static void shutdownEventQueue() |
| 77 | { |
| 78 | // Delete all pending events |
| 79 | Mutex::lockMutex(gEventQueueMutex); |
| 80 | SimEvent *walk = gEventQueue; |
| 81 | while(walk) |
| 82 | { |
| 83 | SimEvent *temp = walk->nextEvent; |
| 84 | delete walk; |
| 85 | walk = temp; |
| 86 | } |
| 87 | Mutex::unlockMutex(gEventQueueMutex); |
| 88 | Mutex::destroyMutex(gEventQueueMutex); |
| 89 | } |
| 90 | |
| 91 | //--------------------------------------------------------------------------- |
| 92 | // event post |