Changeset 1260
- Timestamp:
- 08/24/08 18:16:07 (19 months ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 1 added
- 2 modified
-
misc.hh (modified) (2 diffs)
-
mtasker.cc (modified) (1 diff)
-
rdtsc.hh (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/misc.hh
r1256 r1260 23 23 24 24 #if 0 25 #define RDTSC(qp) \26 do { \27 unsigned long lowPart, highPart; \28 __asm__ __volatile__("cpuid"); \29 __asm__ __volatile__("rdtsc" : "=a" (lowPart), "=d" (highPart)); \30 qp = (((unsigned long long) highPart) << 32) | lowPart; \31 } while (0)32 33 25 #include <iostream> 34 26 using std::cout; … … 383 375 } 384 376 377 inline void setSocketReusable(int fd) 378 { 379 int tmp=1; 380 setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&tmp, static_cast<unsigned>(sizeof tmp)); 381 } 382 385 383 string stripDot(const string& dom); 386 384 void seedRandom(const string& source); -
trunk/pdns/pdns/mtasker.cc
r1116 r1260 302 302 if(i->ttd && (unsigned int)i->ttd < now) { 303 303 d_waitstatus=TimeOut; 304 d_eventkey=i->key; // pass waitEvent the exact key it was woken for 304 305 ucontext_t* uc = i->context; 305 306 ttdindex.erase(i++); // removes the waitpoint