lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Semaphore counter overflow after data transfer (lwip 1.


From: Kieran Mansley
Subject: Re: [lwip-users] Semaphore counter overflow after data transfer (lwip 1.3.0)
Date: Tue, 20 May 2008 09:34:56 +0100

On Tue, 2008-05-20 at 06:23 +0000, Muhamad Ikhwan Ismail wrote:

> all global semaphores and the conn semaphores, and none was found with
> overflow error. Is there any other semaphore I should be aware of ?

In the core of lwIP there are the following sys_sem_t instances.  There
may be more in your port of course:

struct lwip_select_cb {
...
sys_sem_t sem;
}


/** Semaphore protecting the sockets array */
static sys_sem_t socksem;
/** Semaphore protecting select_cb_list */
static sys_sem_t selectsem;


#if LWIP_TCPIP_CORE_LOCKING
/** The global semaphore to lock the stack. */
sys_sem_t lock_tcpip_core;
#endif /* LWIP_TCPIP_CORE_LOCKING */


/** concurrent access protection */
static sys_sem_t mem_sem;


  /** sem that is used to synchroneously execute functions in the core
context */
  sys_sem_t op_completed;


struct dns_api_msg {
...
  /** This semaphore is posted when the name is resolved, the
application thread
      should wait on it. */
  sys_sem_t sem;
...
}


struct netifapi_msg_msg {
#if !LWIP_TCPIP_CORE_LOCKING
  sys_sem_t sem;
#endif /* !LWIP_TCPIP_CORE_LOCKING */
 ...
}


err_t
netconn_gethostbyname(const char *name, struct ip_addr *addr)
{
...
  sys_sem_t sem;
...
}


Hope that helps - you should be able to find where they are in the
source by searching.

Thanks

Kieran





reply via email to

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