Changeset 1402 for trunk/pdns/pdns/mtasker.hh
- Timestamp:
- 09/22/09 12:14:43 (10 months ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/mtasker.hh (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/mtasker.hh
r853 r1402 1 1 /* 2 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002 - 200 6PowerDNS.COM BV3 Copyright (C) 2002 - 2009 PowerDNS.COM BV 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 66 66 EventKey key; 67 67 ucontext_t *context; 68 time_tttd;68 struct timeval ttd; 69 69 int tid; 70 70 }; … … 74 74 indexed_by < 75 75 ordered_unique<member<Waiter,EventKey,&Waiter::key> >, 76 ordered_non_unique<tag<KeyTag>, member<Waiter, time_t,&Waiter::ttd> >76 ordered_non_unique<tag<KeyTag>, member<Waiter,struct timeval,&Waiter::ttd> > 77 77 > 78 78 > waiters_t; … … 91 91 92 92 typedef void tfunc_t(void *); //!< type of the pointer that starts a thread 93 int waitEvent(EventKey &key, EventVal *val=0, unsigned int timeout =0, unsigned intnow=0);93 int waitEvent(EventKey &key, EventVal *val=0, unsigned int timeoutMsec=0, struct timeval* now=0); 94 94 void yield(); 95 95 int sendEvent(const EventKey& key, const EventVal* val=0); 96 96 void getEvents(std::vector<EventKey>& events); 97 97 void makeThread(tfunc_t *start, void* val); 98 bool schedule( unsigned intnow=0);98 bool schedule(struct timeval* now=0); 99 99 bool noProcesses(); 100 100 unsigned int numProcesses();