Changeset 7468 for source/ariba/utility
- Timestamp:
- Jan 25, 2010, 10:50:57 AM (15 years ago)
- Location:
- source/ariba/utility/system
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/system/SystemQueue.cpp
r6919 r7468 95 95 } 96 96 97 void SystemQueue::dropAll( const SystemEventListener* mlistener){ 98 #ifndef UNDERLAY_OMNET 99 directScheduler.dropAll(mlistener); 100 delayScheduler.dropAll(mlistener); 101 #endif 102 } 103 97 104 bool SystemQueue::isEmpty() { 98 105 #ifndef UNDERLAY_OMNET … … 192 199 } 193 200 201 void SystemQueue::QueueThread::dropAll( const SystemEventListener* mlistener) { 202 boost::mutex::scoped_lock lock( queueMutex ); 203 204 bool deleted = false; 205 do{ 206 EventQueue::iterator i = eventsQueue.begin(); 207 EventQueue::iterator iend = eventsQueue.end(); 208 209 for( ; i != iend; i++){ 210 if((*i).getListener() == mlistener){ 211 eventsQueue.erase(i); 212 deleted = true; 213 break; 214 } 215 } 216 }while(deleted); 217 } 218 194 219 void SystemQueue::QueueThread::threadFunc( QueueThread* obj ) { 195 220 -
source/ariba/utility/system/SystemQueue.h
r6919 r7468 125 125 126 126 /** 127 * Drop all queued events for that listener 128 */ 129 void dropAll( const SystemEventListener* mlistener); 130 131 /** 127 132 * Check wheter this queue has items or not. 128 133 * … … 182 187 void enter(); 183 188 void leave(); 189 void dropAll( const SystemEventListener* mlistener); 184 190 185 191 protected: -
source/ariba/utility/system/Timer.cpp
r4987 r7468 100 100 running = false; 101 101 reset(); // cause the sleep to abort 102 //SystemQueue::instance().dropAll(this); 102 103 } 103 104 -
source/ariba/utility/system/Timer.h
r4987 r7468 40 40 #define __TIMER_H 41 41 42 #include <stdint.h> 42 43 #include "ariba/utility/system/SystemEventListener.h" 43 44 #include "ariba/utility/system/SystemQueue.h"
Note:
See TracChangeset
for help on using the changeset viewer.