[PD-dev] lock-free fifo

Thomas Grill gr at grrrr.org
Fri Feb 25 17:08:06 CET 2005


Hi Tim,
please have a look at 
http://cvs.sourceforge.net/viewcvs.py/midishare/midishare/src/common/Headers/
The people at Grame have done a wonderful implementation of a fifo using 
two lifos, now using only CAS and no more CAS2. This implementation has 
the further advantage that no additional dynamic allocation is 
necessary. The cell structure used for the lifos/fifos can take 
additional data.

best greetings,
Thomas

Tim Blechmann schrieb:

>>It seems that the x86 CAS/CAS2 fragment are ok, but not the PPC CAS2
>>code. http://www.go-ecs.com/ppc/ppctek1.htm#semsupp says that
>>lwarx/stwcx  instruction can not be nested, because there is only one
>>memory watcher  per cpu available.
>>On the other hand, maybe there's a way to exploit that the memory 
>>watching unit always looks at an entire cache line (64 bytes)?!
>>I don't know.....
>>    
>>
>well, i had a bad feeling about the cas2 on ppcs ... still, i didn't
>have the time to work with a mac ...
>from what i read about the ppc architecture, there is no cas2 or dcas
>available out of the box, so i'll have to have a look at the fifo
>algorithm again... maybe i can somehow adapt it to get it working on
>ppcs ...
>
>i'll look into it again, when i have some more time ...
>
>cheers ... tim
>
>  
>

-- 
--->----->->----->--
Thomas Grill
gr at grrrr.org
+43 699 19715543





More information about the Pd-dev mailing list