[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] core/timers.c with NO_SYS?
From: |
Leon Woestenberg |
Subject: |
Re: [lwip-devel] core/timers.c with NO_SYS? |
Date: |
Tue, 14 Jun 2011 17:13:39 +0200 |
Hello,
On Tue, Jun 14, 2011 at 10:53 AM, Simon Goldschmidt <address@hidden> wrote:
>
> Leon Woestenberg <address@hidden> wrote:
>> I am not following the criticism. Who talked about interrupt locks? I
>> certainly did not.
>
> I was talking about interrupt locks since its currently a common
> implementation to protect the memp and pbuf code.
>
>> Why would pbuf, mem and memp be interrupt disabled locks? That makes
>> no sense to me. They are not in any way related to an interrupt
>> (handler).
>
> Of course they are: RX interrupts from the MAC may call pbuf_alloc(PBUF_POOL)
> to allocate a pbuf to copy received data to.
>
That's why in an RTOS environment the interrupt handler must not do
the actual work; it must schedule a thread that takes the appropriate
lock, not an interrupt disable lock.
Doing work in an interrupt handler is a common design mistake; the
interrupt handler should only make sure the interrupt is silenced
until serviced by a thread.
But it seems there are too many different approaches to take, and
people are using the current architecture for that. I think there is
no way to clean up the current mess without breaking these existing
users.
I will start a new effort on a proper RTOS layer on top of the raw API.
Regards,
--
Leon
- Re: [lwip-devel] core/timers.c with NO_SYS?, (continued)
- Re: [lwip-devel] core/timers.c with NO_SYS?, address@hidden, 2011/06/12
- Re: [lwip-devel] core/timers.c with NO_SYS?, Kieran Mansley, 2011/06/12
- Re: [lwip-devel] core/timers.c with NO_SYS?, Leon Woestenberg, 2011/06/12
- Re: [lwip-devel] core/timers.c with NO_SYS?, Kieran Mansley, 2011/06/13
- Re: [lwip-devel] core/timers.c with NO_SYS?, address@hidden, 2011/06/13
- Re: [lwip-devel] core/timers.c with NO_SYS?, Bill Auerbach, 2011/06/13
- Re: [lwip-devel] core/timers.c with NO_SYS?, Leon Woestenberg, 2011/06/13
- Re: [lwip-devel] core/timers.c with NO_SYS?, Leon Woestenberg, 2011/06/13
- Re: [lwip-devel] core/timers.c with NO_SYS?, Simon Goldschmidt, 2011/06/14
- Re: [lwip-devel] core/timers.c with NO_SYS?, Simon Goldschmidt, 2011/06/14
- Re: [lwip-devel] core/timers.c with NO_SYS?,
Leon Woestenberg <=
- Re: [lwip-devel] core/timers.c with NO_SYS?, Simon Goldschmidt, 2011/06/14
- Re: [lwip-devel] core/timers.c with NO_SYS?, Bill Auerbach, 2011/06/14
- Re: [lwip-devel] core/timers.c with NO_SYS?, Leon Woestenberg, 2011/06/14
- Re: [lwip-devel] core/timers.c with NO_SYS?, Simon Goldschmidt, 2011/06/15
- Re: [lwip-devel] core/timers.c with NO_SYS?, address@hidden, 2011/06/13
- Re: [lwip-devel] core/timers.c with NO_SYS?, Bill Auerbach, 2011/06/13