lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs


From: Frédéric Bernon
Subject: [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs
Date: Sun, 16 Mar 2008 08:21:50 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12

Follow-up Comment #2, patch #6459 (project lwip):

(Bill's answer from mailing list)

> 
> Follow-up Comment #1, patch #6459 (project lwip):
> 
> I would prefer to keep available stats functions to be able to call in my
> application.

I accept this.  Then can we please put the prototypes for them in stats.h?
Because there are no prototypes so I assumed they couldn't (wouldn't) be
called outside of stats.c.  (And my compiler is picky and warns on no
prototypes on public functions which is how I found this.)

> For err_t, can you explain why you need that?

To use the native type for a processor which on 16/32 bit processors can be
faster than chars.  Also, signed chars on many 8-bit processors are
expensive (e.g. Z80 and family need several instructions to sign extend and
also need runtime calls to compare signed chars).  If we could use sizeof in
#if's we could set the type to the native processor size automatically.  Or
use an enum for errors which makes debugging more meaningful and enums are
the native size of the processor.

I can build each way and see if there is a code size change for me, but it's
one platform test.

It's not urgent, but overriding the type and seeing the comment to be able
to might lead someone to change it for better performance and/or code size.
Admittedly, the gain is probably very minor.

> For httpd, to be honest, I don't use it, and I didn't think that anyone
> use it in production. So, no objections for that...

Ok, then maybe we don't need it.  I used it as a base for a simple WEB
server and was sending a JPG over 64k.  Pointers to the file system (which
in this example is stored in ROM) are better to have const.

Bill


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6459>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]