[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] RE: [patch #6459] Minor changes to err.h, stats.c & httpd/f
From: |
Bill Auerbach |
Subject: |
[lwip-devel] RE: [patch #6459] Minor changes to err.h, stats.c & httpd/fs |
Date: |
Thu, 13 Mar 2008 16:23:03 -0400 |
> Subject: [patch #6459] Minor changes to err.h, stats.c & httpd/fs
>
> 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
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Bill Auerbach, 2008/03/11
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Frédéric Bernon, 2008/03/13
- [lwip-devel] RE: [patch #6459] Minor changes to err.h, stats.c & httpd/fs,
Bill Auerbach <=
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Frédéric Bernon, 2008/03/16
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Simon Goldschmidt, 2008/03/27
- RE: [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Pettinato, Jim, 2008/03/27
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Frédéric Bernon, 2008/03/27
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Frédéric Bernon, 2008/03/27
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Simon Goldschmidt, 2008/03/27
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Frédéric Bernon, 2008/03/30
- [lwip-devel] [patch #6459] Minor changes to err.h, stats.c & httpd/fs, Frédéric Bernon, 2008/03/30