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