Re: [PATCH v1 1/3] add unbounded Multi-Producer-Multi-Consumer queue

2018-07-19 Thread Junio C Hamano
Ben Peart writes: > +/* > + * struct mpmcq_entry is an opaque structure representing an entry in the > + * queue. > + */ > +struct mpmcq_entry { > + struct mpmcq_entry *next; > +}; > + > +/* > + * struct mpmcq is the concurrent queue structure. Members should not be > + * modified directly. >

Re: [PATCH v1 1/3] add unbounded Multi-Producer-Multi-Consumer queue

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 1:45 PM Ben Peart wrote: > Did you have any further considerations that are worth recording here? (memory, performance, CPU execution, threading, would all come to mind) > Signed-off-by: Ben Peart > +/* > + * Initializes a mpmcq structure. > + */ I'd find the name mpmc

[PATCH v1 1/3] add unbounded Multi-Producer-Multi-Consumer queue

2018-07-18 Thread Ben Peart
Signed-off-by: Ben Peart --- Makefile| 1 + mpmcqueue.c | 49 mpmcqueue.h | 80 + 3 files changed, 130 insertions(+) create mode 100644 mpmcqueue.c create mode 100644 mpmcqueue.h diff --git a/Makefile b/M