On 08/05/2012 06:20, Simon Goldschmidt wrote:
> vincent cui <[email protected]> wrote:
>> I had port latest lwip1.4.0 to my system, it works well . but I found some
>> additional api about mutex are defined in 1.4.0
>>
>> I want to know that are they necessary ?
> 
> No, as it says in sys.h: "Define LWIP_COMPAT_MUTEX if the port has no mutexes 
> and binary semaphores should be used instead". The only disadvantage of using 
> binary semaphores (in this case, the sys_mutex_* functions are defined to 
> their sys_sem_* substitute) is that you can get priority inversion (mutextes 
> are only used for communication between API tasks using netconn or sockets 
> and the tcpip_thread).
> 
> Simon


Trying to keep everything in the same place and out of my own personal
email (FreeRTOS support questions should use the support forum please!),
from a private email:


> For lwIP 1.4.0 with add mutex api in system layer. They are following. I
> write them with freertos mutex api, but it can’t work, once I remove
> those code, lwIP works again .
>
> Who know why ?
>
>
>
> err_t sys_mutex_new(sys_mutex_t *mutex)
>
> {
>
> //      *mutex = xSemaphoreCreateMutex();


<snip a lot>

There are example FreeRTOS port layers for lwIP in a few places from
which the mutex implementation can just be cut and paste.

A recent(ish) demo is here:
http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_IO/Demo_Applications/LPCXpresso_LPC1769/NXP_LPC1769_Demo_Description.shtml

An older(ish) demo that uses a Windows simulated environment (and now
has an out of date CLI implementation) can be found here:
http://interactive.freertos.org/entries/20290712-freertos-win32-project-with-lwip-web-server


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.


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

Reply via email to