lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] mailbox implementation


From: Simon Goldschmidt
Subject: Re: [lwip-devel] mailbox implementation
Date: Mon, 26 Sep 2011 15:58:54 +0200

MaX <address@hidden> wrote

> I'm planning to write a new implementation for mailbox mechanism. From the 
> documentation I don't understand if lwip mailbox are 
> multiple-producers-multiple-consumers (MPMC) or just 
> single-producer-single-consumer (SPSC). 
> In the second case I can target a lock-free CAS-free implementation with a 
> grater benefit with respect of a more standard lock-free MPMC one. I would 
> say from the lwip structure that the mailbox are all SPSC,

LwIP boxes are used in 2 places, if I remember correctly:
a) as recv/accept mbox: these are SPSC (tcpip_thread produces, an application 
thread consumes)
b) the mbox tcpip_thread uses to process RX packets, netconn requests etc. This 
one is a multiple-producer-single-consumer (netif RX thread and application 
threads using the netconn/socket/netif-API produce, tcpip_thread consumes)

Terefore, SPSC won't be enough, I guess.

Simon


reply via email to

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