lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Wait queue order for mutex, semaphore, mailbox?


From: address@hidden
Subject: Re: [lwip-users] Wait queue order for mutex, semaphore, mailbox?
Date: Fri, 12 Nov 2021 06:12:02 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

Am 11.11.2021 um 21:46 schrieb Grant Edwards:
On 2021-11-11, goldsimon@gmx.de <goldsimon@gmx.de> wrote:
Am 11.11.2021 um 17:36 schrieb Grant Edwards:
What should the wait queue order be for lwIP mailboxes, mutexes, and
semaphores?

The port I'm trying to fix-up and get running is configuring all for
FIFO wait queues.

I'm not sure I understand your question. Do you mean 'if multiple
threads are waiting, which one gets woken first'?

Yes.

In that case, it's nothing we as lwIP developers can answer:

But they're the ones that actually know what those kernel objects are
used for.

"for": yes. But to me, your "FIFO or priority" question is a performance
question: the core of lwIP is not really using those objects (in the way
you want to know about), only the application threads using sockets etc.


it's mainly a question of how you want your system to behave. Using
a decent embedded RTOS, I would say the answer is "the thread with
the highest priority should be woken first", but that's really up to
how your OS shall behave.

So the lwIP stack will work correctly with either FIFO or priority
queueing for the kernel objects used internally by lwIP?

Yes, the only impact I can see is performance: using a FIFO mechanism,
you will probably not be able to implement a true priority based thread
system.

Regards,
Simon



reply via email to

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