[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Help with LwIP Modem
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-users] Help with LwIP Modem |
Date: |
Fri, 8 Jul 2016 10:31:39 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi,
On Fri, Jul 08, 2016 at 10:14:32AM +0200, Simon Goldschmidt wrote:
> Sylvain Rochet wrote:
> > You can't call tcpip_input() from an interrupt, this is a blocking
> > message passing, it can block.
>
> It's not: tcpip_input/tcpip_inpkt calls sys_mbox_trypost(), which does
> not have to be blocking but should return != ERR_OK if the queue is
> full (drop input packets).
> However, this is a port function, so the port may well not support
> doing this from interrupt if it's written in a wrong way.
Wrong way is a bit hard, the problem here is that some OS have two
differents API, one which must be called from interrupt context, and one
from threads. This is the case at least for FreeRTOS:
xQueueSend vs xQueueSendFromISR
xSemaphoreGive vs xSemaphoreGiveFromISR
...
lwIP sys port is not designed to deal with interrupt context vs thread
context, the necessary data bit about this condition is lost in the
port, so calling xQueueSend from interrupt instead of xQueueSendFromISR
can block, so tcpip_input() called from interrupt is actually a blocking
function.
Sylvain
signature.asc
Description: Digital signature
- Re: [lwip-users] Help with LwIP Modem, (continued)
- Re: [lwip-users] Help with LwIP Modem, Sergio R. Caprile, 2016/07/06
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernández, 2016/07/06
- Re: [lwip-users] Help with LwIP Modem, Sylvain Rochet, 2016/07/07
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernández, 2016/07/07
- Re: [lwip-users] Help with LwIP Modem, Sylvain Rochet, 2016/07/07
- Re: [lwip-users] Help with LwIP Modem, Sylvain Rochet, 2016/07/07
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernández, 2016/07/07
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/07
- Re: [lwip-users] Help with LwIP Modem, Sylvain Rochet, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Simon Goldschmidt, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem,
Sylvain Rochet <=
- Re: [lwip-users] Help with LwIP Modem, Simon Goldschmidt, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Sylvain Rochet, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Simon Goldschmidt, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jeff Barlow, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, address@hidden, 2016/07/09
- Re: [lwip-users] Help with LwIP Modem, address@hidden, 2016/07/09
- Re: [lwip-users] Help with LwIP Modem, Jeff Barlow, 2016/07/09