mirror of https://github.com/ARMmbed/mbed-os.git
ONME-4366 - Fix UBLOX_EVK_ODIN_W2 fails in emac tests due to heap memory allocation failure. Increse event queue and free allocated buffer if cannot post packet to event queue.
parent
48f544f9e4
commit
0693da6e2b
|
|
@ -92,7 +92,7 @@ static rtos::Semaphore link_status_semaphore;
|
||||||
#if defined (__ICCARM__)
|
#if defined (__ICCARM__)
|
||||||
#pragma location = ".ethusbram"
|
#pragma location = ".ethusbram"
|
||||||
#endif
|
#endif
|
||||||
ETHMEM_SECTION static EventQueue worker_loop_event_queue(20 * EVENTS_EVENT_SIZE);
|
ETHMEM_SECTION static EventQueue worker_loop_event_queue(50 * EVENTS_EVENT_SIZE);
|
||||||
|
|
||||||
static void worker_loop_event_cb(int event);
|
static void worker_loop_event_cb(int event);
|
||||||
static Event<void(int)> worker_loop_event(&worker_loop_event_queue, worker_loop_event_cb);
|
static Event<void(int)> worker_loop_event(&worker_loop_event_queue, worker_loop_event_cb);
|
||||||
|
|
@ -434,7 +434,11 @@ void emac_if_link_state_change_cb(bool up)
|
||||||
|
|
||||||
void emac_if_link_input_cb(void *buf)
|
void emac_if_link_input_cb(void *buf)
|
||||||
{
|
{
|
||||||
link_input_event.post(buf);
|
if (link_input_event.post(buf) == 0) {
|
||||||
|
if (buf) {
|
||||||
|
emac_m_mngr_get()->free(buf);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void link_input_event_cb(void *buf)
|
static void link_input_event_cb(void *buf)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue