swich task A and task B

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

swich task A and task B

vincent cui

All:

 

My platform is LWIP and FreeRTOS, and create task A or task B by user choice. There is only one running task of A and B.

When user enable and create another task, it needs disable and cancel the first task, then enable and create another task.

But if user want to enable and create first task, he need wait 2 minutes to wait first task resource to be released totally. Is there

Another way to reduce the wait time ?

 

 

Vincent  


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: swich task A and task B

Kieran Mansley

On 25 Aug 2012, at 02:07, vincent cui wrote:

> But if user want to enable and create first task, he need wait 2 minutes to wait first task resource to be released totally. Is there
> Another way to reduce the wait time ?

I'm guessing this is because of lwIP sockets in the time wait state?  Is that correct.  If so, you could reduce the time that sockets spend in the time wait state (it's controlled by a define somewhere) or just reinitialise lwIP assuming you don't want to preserve any connections when you switch.

Kieran
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: swich task A and task B

Richard Barry-2
In reply to this post by vincent cui
I'm not sure if this is a FreeRTOS question, or an lwIP question, and
you don't say what the resource is you are waiting to be released.  I'm
guessing you are talking about a TCP connection in the TIME_WAIT state.
 Is that correct?


Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for microcontrollers.  More than 7000 downloads per month.

+ http://www.FreeRTOS.org/trace
15 interconnected trace views. An indispensable productivity tool.



On 25/08/2012 02:07, vincent cui wrote:

> All:
>
>  
>
> My platform is LWIP and FreeRTOS, and create task A or task B by user
> choice. There is only one running task of A and B.
>
> When user enable and create another task, it needs disable and cancel
> the first task, then enable and create another task.
>
> But if user want to enable and create first task, he need wait 2 minutes
> to wait first task resource to be released totally. Is there
>
> Another way to reduce the wait time ?
>
>  
>
>  
>
> Vincent  
>
>
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>

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