Leon wrote:

> I would certainly design a pre-emptive system by NOT entering the pbuf
> layer from interrupt context, but instead schedule a high-priority
> real-time task to move the packets of the chip from the interrupt
> handler, and nothing more.

To have a pre-emptive multitasking system doesn't necessarily mean a
high priority task is never interrupted by a lower priority one. In my
case, higher priority just means that it gets more timeslices. (Unlike
eCos where it wouldn't be interrupted by lower priority threads, at
least with the standard scheduling behaviour).

> I am NOT sure if SYS_LIGHTWEIGHT_PROT protects against all concurrent
> acccess possible,

In my case it certainly does, and I think it's generally meant to be.
But it's several years ago that I dealt with this issue.

> I thought this was exactly the reason why it was
> called lightweight when introduced.

I think not. It's lightweight, because it has very little overhead and
is easy to implement (which makes it "low-level", non-portabe and
rigorous. Usually disabling all interrupts below a certain level.)

All the best
Peter



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to