[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] netconn_write/recv from two different tasks..
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-users] netconn_write/recv from two different tasks.. |
Date: |
Wed, 6 Mar 2013 14:20:10 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Thomas,
On Wed, Mar 06, 2013 at 03:03:55AM -0800, ThomasJ wrote:
>
> or is it better to use a semaphore around the netconn_recv and
> netconn_write, so no write can be done during receiving and no receive
> during wrie?
>
> How does you handle it?
This is exactly the same from the lwIP point of view, however, I
personally prefer message passing over mutexes, because this is less
subject to dead locks or priority swap issues.
By the way, netconn_new_with_callback() allows lwIP users to write
fully-event based user code, which I also personally prefer over some
kind of rx polling.
Sylvain
signature.asc
Description: Digital signature