[En-Nut-Discussion] Suggested modification to nut\net\tcpsm.c again

Harald Kipp harald.kipp at egnite.de
Thu Nov 12 17:41:31 CET 2009


Nathan Moore wrote:

> Best thing would be to use uint_fast16_t, I think.

That will optimize 32-bit code. But it scares *me* to mix up fixes with
optimizations. As explained to Zack, I don't see any other advantage.

Let's do the fix first and then think about optimizations. There is
plenty of room here in the TCP stack. In fact I discovered the problem
while trying to do some performance tests.


> Using this timeout value as a flag as well as a timing value still scares
> me, though,
> because everytime it is used or a place that uses it is changed there is a
> chance
> that someone will forget to |= 1 it.

May a comment line help? Or is there a better solution which doesn't
require additional RAM space?

Harald



More information about the En-Nut-Discussion mailing list