mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-12 17:55:38 +00:00
Add note about high resource-consumption in LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT default implementations
This commit is contained in:
parent
e12bb2a4eb
commit
e3c2b8a339
@ -70,14 +70,22 @@
|
|||||||
#define LWIP_RAND() ((u32_t)rand())
|
#define LWIP_RAND() ((u32_t)rand())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Platform specific diagnostic output */
|
/** Platform specific diagnostic output.\n
|
||||||
|
* Note the default implementation pulls in printf, which may
|
||||||
|
* in turn pull in a lot of standard libary code. In resource-constrained
|
||||||
|
* systems, this should be defined to something less resource-consuming.
|
||||||
|
*/
|
||||||
#ifndef LWIP_PLATFORM_DIAG
|
#ifndef LWIP_PLATFORM_DIAG
|
||||||
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
|
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Platform specific assertion handling */
|
/** Platform specific assertion handling.\n
|
||||||
|
* Note the default implementation pulls in printf, fflush and abort, which may
|
||||||
|
* in turn pull in a lot of standard libary code. In resource-constrained
|
||||||
|
* systems, this should be defined to something less resource-consuming.
|
||||||
|
*/
|
||||||
#ifndef LWIP_PLATFORM_ASSERT
|
#ifndef LWIP_PLATFORM_ASSERT
|
||||||
#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \
|
#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \
|
||||||
x, __LINE__, __FILE__); fflush(NULL); abort();} while(0)
|
x, __LINE__, __FILE__); fflush(NULL); abort();} while(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user