This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: timeout.c in bsd_tcpip


> I don't agree. I think that the old untimeout() is not only inefficient
> but also wrong. 
> First, the link list headed by timeout may link many tcp timers
> such as tt_rexmt, tt_persist, tt_keep, tt_2msl and tt_delack.
> These timers are linked on the list by calling callout_reset() directly, 
> not calling timeout() since they don't need to allocate the entry space 
> for it. Actually the spaces for these timers are allocated 
> (or point to the allocated space) in tcp_newtcpcb(). Likewise these 
> timers are removed from the link list by calling callout_stop()
> directly. On the other hand, untimeout() is used to remove the timer entry 
> which was allocated by timeout() previously. 
> Second, the old untimeout() change the link by calling callout_stop() 
> at the same time when it is tracing the link itself.
> So I think that to look at all elements in the array(_timeout) is 
> not only efficient but also right.

I assumed (wrongly) that all entries we allocated by timeout. I didn't
relies most where in fact using there own memory. In that case, i
agree with you. Looking at each elemet in the array is the correct
thing to do.

      Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]