Re: [linux-audio-dev] lock-free fifos

2002-05-13 Thread Tim Goetze
Ingo Oeser wrote: >Hi Tim, > >On Sun, May 12, 2002 at 12:24:57PM +0200, Tim Goetze wrote: >> nevertheless, i went looking at the other archs and very much to my >> surprise found corresponding code for ppc and sparc for example. to >> my surprise because i assume it to be unused, otherwise there'

Re: [linux-audio-dev] lock-free fifos

2002-05-12 Thread Ingo Oeser
Hi Tim, On Sun, May 12, 2002 at 12:24:57PM +0200, Tim Goetze wrote: > nevertheless, i went looking at the other archs and very much to my > surprise found corresponding code for ppc and sparc for example. to > my surprise because i assume it to be unused, otherwise there'd be an > implementation

Re: [linux-audio-dev] lock-free fifos

2002-05-12 Thread Tim Goetze
Ingo Oeser wrote: >Hi Tim, > >On Sat, May 11, 2002 at 03:51:09PM +0200, Tim Goetze wrote: >> i'm evaluating the following construct to implement a lock-free fifo >> that allows more than one thread on the writer side: >> >> here, the i386 'xadd' instruction atomically adds 'i' to the counter >>

Re: [linux-audio-dev] lock-free fifos

2002-05-11 Thread Ingo Oeser
Hi Tim, On Sat, May 11, 2002 at 03:51:09PM +0200, Tim Goetze wrote: > i'm evaluating the following construct to implement a lock-free fifo > that allows more than one thread on the writer side: > > here, the i386 'xadd' instruction atomically adds 'i' to the counter > variable and returns the co

[linux-audio-dev] lock-free fifos

2002-05-11 Thread Tim Goetze
hello all, i'm evaluating the following construct to implement a lock-free fifo that allows more than one thread on the writer side: inline int return_and_add (int i = 1) { register int j asm ("eax") = i; /* the lock prefix is not strictly needed on * single-p