[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] RFC: debug and asserts
From: |
Jani Monoses |
Subject: |
[lwip-devel] RFC: debug and asserts |
Date: |
Tue, 4 Nov 2003 12:11:21 +0200 |
Hi all
I'd like to make some changes to debug and assert configurability and
expect possible objections.
1) Make assert be selectable separately from debug, currently it's only
on if debug is on.
2) Change throughout the code constructs of the form:
#if TCP_DEBUG
LWIP_DEBUGF (TCP_DEBUG,......)
#endif
to only the LWIP_DEBUGF line. For readability and consistency (some
places have it either with or without ifdefs). LWIP_DEBUGF evaluates to
something like if (constant & flag_constant) { do things} so if constant
is 0 I expect any compiler to optimize away the construct anyway.
3) Make debug and assert be checked with #if not #ifdef for consistency
again. We'll have all lwip tunables always defined, having defaults in
opts.h and switching them will mean chaniging a value in lwipopts.h from
0 to 1 or viceversa. The ones we want to make sure somebody has to set
knowingly we can even omit form opts.h so the compiler complains.
Jani
- [lwip-devel] RFC: debug and asserts,
Jani Monoses <=