kopia lustrzana https://github.com/espressif/esp-idf
lwip: Remove port-specific sys_arch_assert(), use libc __assert_func() instead
rodzic
37b72e8a70
commit
f5e7f2bb8f
|
@ -36,6 +36,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "arch/sys_arch.h"
|
||||
|
||||
|
@ -67,7 +68,8 @@ typedef int sys_prot_t;
|
|||
#include <stdio.h>
|
||||
|
||||
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
|
||||
#define LWIP_PLATFORM_ASSERT(x) do {printf(x); sys_arch_assert(__FILE__, __LINE__);} while(0)
|
||||
// __assert_func is the assertion failure handler from newlib, defined in assert.h
|
||||
#define LWIP_PLATFORM_ASSERT(message) __assert_func(__FILE__, __LINE__, __ASSERT_FUNC, message)
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define LWIP_NOASSERT
|
||||
|
|
|
@ -67,7 +67,6 @@ typedef struct sys_mbox_s {
|
|||
#define sys_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE )
|
||||
#define sys_sem_set_invalid( x ) ( ( *x ) = NULL )
|
||||
|
||||
void sys_arch_assert(const char *file, int line);
|
||||
uint32_t system_get_time(void);
|
||||
void sys_delay_ms(uint32_t ms);
|
||||
sys_sem_t* sys_thread_sem_init(void);
|
||||
|
|
|
@ -482,19 +482,6 @@ sys_arch_unprotect(sys_prot_t pval)
|
|||
sys_mutex_unlock(&g_lwip_protect_mutex);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*
|
||||
* Prints an assertion messages and aborts execution.
|
||||
*/
|
||||
void
|
||||
sys_arch_assert(const char *file, int line)
|
||||
{
|
||||
ESP_LOGE(TAG, "\nAssertion: %d in %s\n", line, file);
|
||||
|
||||
// vTaskEnterCritical();
|
||||
while(1);
|
||||
}
|
||||
|
||||
#define SYS_TLS_INDEX CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX
|
||||
/*
|
||||
* get per thread semphore
|
||||
|
|
Ładowanie…
Reference in New Issue