lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Threading Question using LWIP with TM4C1294NCPDT


From: vr roriz
Subject: Re: [lwip-users] Threading Question using LWIP with TM4C1294NCPDT
Date: Sat, 10 Nov 2018 16:09:54 +0100

Sorry, I forgot to reply.

My problem was probably due to concurrent access to lwIP, since my low_level_output function might block if the ETH Tx buffer is full, waiting for a Tx trigger. I've created an access queue based on messages to simulate a lock in the high-level driver.

Vitor

Em sex, 26 de out de 2018 às 18:29, Jan Menzel <address@hidden> escreveu:
On 26.10.2018 15:57, vr roriz wrote:
>> Vitor, make sure your processes are never cycled by the scheduler
> otherwise you'll violate the threading requirements. I'd suggest to just
> have a single thread for lwip and use a mailbox or similar to trigger
> certain actions. The OS will take care that you can write into the
> mailbox from any interrupt/thread/timer.
>
> Hi Jan, I do have a "mailbox", I am using a message-passing OS. All my
> interrupts just send messages to processes that execute lwIP code, all
> these processes have the same priority. What do you exactly mean by "
> never cycle"? The scheduling algo is priority level based, without
> time-slices.

Just make sure your scheduler never interrupts one process in favour for
an other with same priority. I would consider this non standard.
Alternatively you could have one lock shared between all your processes
to force the scheduler to never interrupt any lwip function to execute
any other.

        Jan

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

[Prev in Thread] Current Thread [Next in Thread]