[Top][All Lists]

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

[lwip-users] upgrading to 1.4.0

From: Martin Velek
Subject: [lwip-users] upgrading to 1.4.0
Date: Thu, 23 Jun 2011 13:27:37 +0200

I am doing an upgrade of LWIP from 1.3.2 to 1.4.0(#define NO_SYS 0,
the OS supports mutexes) . Please, could you help me to confirm the
following steps?

1) Remove all stuff around timers, these are now completely handled inside LWIP.

2) Change function prototypes and implementation around semaphores, mboxes,etc.

3) Add new functions to support mutexes and typedef __type__ sys_mutex_t

4) Add new functions to determine if sem/mbox/mutex is valid or to invalide it.
Here I would like to ask, what is good *_invalide() for. If this
functions is called, should I also free the sem/msg/mutex? I could
understand the *_invalide() is called if and only if during an
initialization process to set variables into a known state or after
freeing by *_free().

E.g. with a FreeRTOS, the semaphore is of a type void * and NULL value
is (void *)0. However, if the semaphore is created and then
invalidated, from the function name I would propose that the function
should set the semaphore to the NULL because there is a function
sys_sem_free() to free the semaphore. There will be a memory leak if I
set the semaphore to the NULL in the *_invalide() function. Or what is
worse, the sys_sem_free() will fail with a NULL semaphore.

Did I miss something?

Thank you

reply via email to

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