[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] [bug #3031] Implement a new fully pool-based pbufimplem
From: |
Goldschmidt Simon |
Subject: |
RE: [lwip-devel] [bug #3031] Implement a new fully pool-based pbufimplementation. |
Date: |
Wed, 25 Jul 2007 13:19:07 +0200 |
onathan,
> I think most chains will be short enough that pbuf_clen()
> isn't much of an issue - the biggest thing would be the
> function call overhead itself, and to be honest, pbuf_clen()
> is so short it should probably be made a function-like macro *anyway*.
I've been breaking my head how to implement pbuf_clen as a function-like
macro, but I can't think of anything... Here's how I could solve it:
#define pbuf_clen(p, len) \
{ \
struct pbuf *q = (p) \
(len) = 0; \
while (q != NULL) { \
++(len); \
q = q->next; \
}\
}
But it would change the use of pbuf_clen from 'len = pbuf_clen(p)' to
'pbuf_clen(p, len)'.
Does anybody have an idea of how to implement this as a macro so that
len
is a return value instead of an argument??
Awaiting your ideas!
Simon
- [lwip-devel] [bug #3031] Implement a new fully pool-based pbuf implementation., Simon Goldschmidt, 2007/07/03
- RE: [lwip-devel] [bug #3031] Implement a new fully pool-based pbufimplementation.,
Goldschmidt Simon <=
- RE: [lwip-devel] [bug #3031] Implement a new fully pool-basedpbufimplementation., Grubb, Jared, 2007/07/25
- RE: [lwip-devel] [bug #3031] Implement a new fullypool-basedpbufimplementation., Goldschmidt Simon, 2007/07/26
- RE: [lwip-devel] [bug #3031] Implement a newfullypool-basedpbufimplementation., Grubb, Jared, 2007/07/26
- Re: [lwip-devel] [bug #3031] Implement a new fullypool-basedpbufimplementation., Jonathan Larmour, 2007/07/31
- Re: [lwip-devel] [bug #3031] Implement a new fully pool-basedpbufimplementation., Thomas Mueller, 2007/07/26