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: Muhamad Ikhwan Ismail
Subject: RE: [lwip-users] Semaphore counter overflow after data transfer (lwip 1.3.0)
Date: Wed, 21 May 2008 08:06:46 +0000


Hi guys,

After a thorough check I can confirm the semaphore which overflowed was not from lwip.
It was the kernel timeout semphore, and during the crash it seems that no task exchange happens
and the current task pointer points to the tcpip thread task. Could it be due to the fact that
I implemented sys_arch_protect to shutdown interrupt ? Has anyone who implemented sys_arch_protect
the same way I did faced with the same problem?

Thanks in advance.

Ikhwan






> Subject: Re: [lwip-users] Semaphore counter overflow after data transfer (lwip 1.3.0)
> From: address@hidden
> To: address@hidden
> 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
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users


Keep your kids safer online with Windows Live Family Safety. Help protect your kids.

reply via email to

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