lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] sys_arch_mbox_fetch


From: Kieran Mansley
Subject: Re: [lwip-users] sys_arch_mbox_fetch
Date: Thu, 15 Oct 2009 15:28:12 +0100

On Thu, 2009-10-15 at 16:17 +0200, Fabian Koch wrote:
> 
> Hey all, 
> 
> our sys_arch layer is very conservative at the moment. It basically
> makes Assertions at any given wrong turn. 
> Also when someone is waiting for sys_arch_mbox_fetch to finish (e.g.
> netconn_accept()), and the mbox is deleted, it fires an Assertion. 
> This happens now when I want to netconn_close() a connection that is
> in LISTEN and sits on its netconn_accept(). the recvmbox gets
> deleted. 

This suggests you have two threads - one in accept and one calling close
- operating on the same connection.

> So in short. Should sys_arch_mbox_fetch() just return "cleanly" when
> the mbox it is waiting for to fill itself is being deleted? 

I'd try to stick to the rule of "one thread per connection/socket" and
then you shouldn't need to worry about that problem.  It can be a tricky
restriction for the application, the case you highlight being a good
example, but there are usually ways to code things appropriately.

Kieran





reply via email to

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