Re: [linux-audio-dev] MidiShare Linux

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] MidiShare Linux
From: Stephane Letz (letz_AT_grame.fr)
Date: Thu Jul 20 2000 - 16:48:08 EEST


>Perhaps Stephane meant thread safe in sense of multiple writers and one
>reader, and this is where this ringbuffer approach fails.
>But as said in my other mail, it's simplicity and efficiency is almost
>unbeatable by other approaches, and in many problems you can
>transform the "multiple writers with one reader" problem into
>one writer per fifo plus a reader which reads all the fifos in sequence.
>This is what I do in both hdrbench and disksampler, and it works like a charm.

I think you design is OK with the one reader/one writer restriction. What
we try to do is to implement
lock-free data structures (LIFO, then FIFO) that are thread-safe in a more
general sense.
Look at the following page for the LIFO code:

http://cvs.grame.fr/cgi-bin/midishare-cvs/src/common/Headers/lflifo.h?rev=1.5&co
ntent-type=text/x-cvsweb-markup
(i hope Yann is preparing something to explain the whole concept )

This LIFO is multiple readers/writers safe in a UP context , and in a SMP
context when compiled with the "lock" instruction.

Stephane Letz

Grame: Centre National de creation musicale
9, Rue du Garet
69001 Lyon
Tel: 04-72-07-37-00
Fax: 04-72-07-37-01
Web: www.grame.fr


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jul 20 2000 - 17:50:04 EEST