Changeset 781


Ignore:
Timestamp:
10/02/06 11:17:21 (6 years ago)
Author:
wd
Message:

Fix static bogosity in timer.c (lame gcc single pass compile problem) and
change maxsockets setting to be what the normal default would be.

Location:
branches/ithildin-scons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ithildin-scons/etc/ithildin.conf

    r578 r781  
    1212// be allocated.  this 'can' be set above what your system's limit is, but 
    1313// it won't do you any good.  by default set it to 1024 
    14 maxsockets 256; 
     14maxsockets 1024; 
    1515 
    1616// the 'username' setting specifies which user the daemon should try to run 
  • branches/ithildin-scons/lib/timer.c

    r761 r781  
    2626static timer_event_t *find_timer(timer_ref_t); 
    2727static 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. */ 
     32static 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} 
    2852 
    2953/* This creates a new timer which repeats for the given count (0 means no 
     
    147171} 
    148172 
    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  
    172173/* vi:set ts=8 sts=4 sw=4 tw=76 et: */ 
Note: See TracChangeset for help on using the changeset viewer.