Changeset 781
- Timestamp:
- 10/02/06 11:17:21 (6 years ago)
- Location:
- branches/ithildin-scons
- Files:
-
- 2 edited
-
etc/ithildin.conf (modified) (1 diff)
-
lib/timer.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-scons/etc/ithildin.conf
r578 r781 12 12 // be allocated. this 'can' be set above what your system's limit is, but 13 13 // it won't do you any good. by default set it to 1024 14 maxsockets 256;14 maxsockets 1024; 15 15 16 16 // the 'username' setting specifies which user the daemon should try to run -
branches/ithildin-scons/lib/timer.c
r761 r781 26 26 static timer_event_t *find_timer(timer_ref_t); 27 27 static inline void insert_timer(timer_event_t *); 28 29 /* This inserts a timer into the correct position in the timer list. That is, 30 * it sorts the timer list by order of execution. At the top of the file 31 * so gcc can inline it. */ 32 static inline void insert_timer(timer_event_t *timer) { 33 timer_event_t *tep; 34 35 tep = LIST_FIRST(&me.timers); 36 if (tep == NULL) { 37 LIST_INSERT_HEAD(&me.timers, timer, lp); 38 return; 39 } 40 41 while (tep != NULL) { 42 if (tep->next > timer->next) { 43 LIST_INSERT_BEFORE(tep, timer, lp); 44 return; 45 } 46 if (LIST_NEXT(tep, lp) == NULL) 47 break; 48 tep = LIST_NEXT(tep, lp); 49 } 50 LIST_INSERT_AFTER(tep, timer, lp); 51 } 28 52 29 53 /* This creates a new timer which repeats for the given count (0 means no … … 147 171 } 148 172 149 /* This inserts a timer into the correct position in the timer list. That is,150 * it sorts the timer list by order of execution. */151 static inline void insert_timer(timer_event_t *timer) {152 timer_event_t *tep;153 154 tep = LIST_FIRST(&me.timers);155 if (tep == NULL) {156 LIST_INSERT_HEAD(&me.timers, timer, lp);157 return;158 }159 160 while (tep != NULL) {161 if (tep->next > timer->next) {162 LIST_INSERT_BEFORE(tep, timer, lp);163 return;164 }165 if (LIST_NEXT(tep, lp) == NULL)166 break;167 tep = LIST_NEXT(tep, lp);168 }169 LIST_INSERT_AFTER(tep, timer, lp);170 }171 172 173 /* vi:set ts=8 sts=4 sw=4 tw=76 et: */
Note: See TracChangeset
for help on using the changeset viewer.
