[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Task priorities in TCP/IP Stack
From: |
Christian Steffen |
Subject: |
[lwip-users] Task priorities in TCP/IP Stack |
Date: |
Wed, 24 Feb 2010 15:13:38 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
Hello,
I use the lwIP/FreeRtos at the Atmel AVR32UC3. The current lwIP Version
I use is 1.3.2.
Until now I had big problems with the stack and the priorities. At our
system running three tasks, the TCP/IP task, the ETHINT task and the
TCPECHO task. The FreeRtos is running in preemtive mode and the tcp/ip
and ethint tasks are at the same priorities.
Now I see, that the ETHINT task don't use messages to commit the
received frames to the TCP/IP task. It calls ethernet_input() directly.
This depends, that two tasks work with the stack and the data structures
are not ever constistent (read-modify-write). I receive a lot of
assertions.
Is there a reason, why this is so implemented and not with messages?
At the moment I see three options to solve this problem.
1. Use messages to mbox in ethernetif() (I think this is a clean an safe
alternative)
2. Use kooperative rtos. (this is no opinion for my application)
3. Run the ETHINT task with lower priority than the TCP/IP task. (this
is not safe when an application with higher priority than tcp/ip task
sends a message)
Best regards
Christian Steffen
--
+++ Hensel Elektronik GmbH
+++ Hinrichsdorfer Straße 7c
+++ 18146 Rostock
+++
+++ phone +49 381 659 13 18
+++ fax +49 381 659 13 28
+++ email address@hidden
+++ web www.hensel-elektronik.de
+++
+++ Hensel Elektronik GmbH
+++ Gesellschaft mit beschränkter Haftung
+++ Sitz der Gesellschaft: Rostock
+++ HRB 547 Amtsgericht Rostock
+++ Geschäftsführer: Hans-Joachim Hensel
- [lwip-users] Task priorities in TCP/IP Stack,
Christian Steffen <=