[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] pcb->next points to one of its ancestors causing an end
From: |
brak brak2 |
Subject: |
Re: [lwip-users] pcb->next points to one of its ancestors causing an endless loop |
Date: |
Thu, 7 Jul 2011 14:08:38 +0200 |
> PCB list corruption is almost always due to multiple threads executing
> in the core of lwIP at the same time.
I have the same problem. The most of my lwIP functions is handled in
the interrupt routine of Ethernet module. But some functions are
called in main thread (tcp_write, tcp_output) or UART intterput
(tcp_recved).
If I surround this functions in main thread by
SYS_ARCH_DECL_PROTECT(lev);
SYS_ARCH_PROTECT(lev);
function
SYS_ARCH_UNPROTECT(lev);
will that be enough?
I don't know that to do with tcp_recved in UART interrupt, because
when I put it there the data transfer is faster, just as I want. But
UART interrupt can occure during lwIP core execution.