Changeset 699 for trunk/pdns/pdns/mtasker.cc
- Timestamp:
- 04/14/06 13:26:50 (4 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/mtasker.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/mtasker.cc
r695 r699 159 159 */ 160 160 161 template<class EventKey, class EventVal>int MTasker<EventKey,EventVal>::waitEvent( constEventKey &key, EventVal *val, unsigned int timeout)161 template<class EventKey, class EventVal>int MTasker<EventKey,EventVal>::waitEvent(EventKey &key, EventVal *val, unsigned int timeout) 162 162 { 163 163 if(d_waiters.count(key)) { // there was already an exact same waiter … … 181 181 *val=d_waitval; 182 182 d_tid=w.tid; 183 key=d_eventkey; 183 184 return d_waitstatus; 184 185 } … … 217 218 ucontext_t *userspace=waiter->context; 218 219 d_tid=waiter->tid; // set tid 219 220 d_eventkey=waiter->key; // pass waitEvent the exact key it was woken for 220 221 d_waiters.erase(waiter); // removes the waitpoint 221 222 if(swapcontext(&d_kernel,userspace)) { // swaps back to the above point 'A'