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: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Wed Jul 19 2000 - 19:38:30 EEST


>> Note: the lock free FIFO that we use is not SMP safe, unless you've
>> started using atomic_t's, and in addition, the design requires a
>> bounded FIFO size. MidiShare doesn't use limits like this.
>
>Huh ?
>No SMP-safe ?
>I thought 32bit accesses are atomic on x86 boxes (both up and SMP) ?

Depends on how you use them. For bounded FIFO's, its probably OK to
leave out the "lock" instruction on the x86. But it does change the
semantics in a subtle way. The instruction is atomic, yes, but without
the "lock", you can't ensure correct execution in some cases where the
processor reorders instructions.

>And as for the bounded sizes do you refer to the 24bit limtitation of
>atomic_t on SPARCs ?

No. Based on Yann's presentation at the LSM (which i missed most of
because I was struggling with a photocopier :() MidiShare uses lock
free *lists*, not lock free managed arrays. So they can keep
arbitrarily long lists of events, and not be fixed to some
predetermined size. Before you jump on all the obvious problems with
this, go and take a look at MidiShare first. The folks from GRAME are
not beginners with this stuff you know.

>BTW: shoul I definitively use atomic_t for the read and write pointers in the
>ringbuffer structure ?
>So at least SMP SPARC users will be happy. :-)

its more portable that way, yes.

--p


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

This archive was generated by hypermail 2b28 : Wed Jul 19 2000 - 20:09:24 EEST