lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Feb 28, 2006 at 10:26:27AM +1100, D Burgess wrote:
> 2) a set of ANSI C basic "lock free" containers lists, queues (LIFO, FIFO)
> would be a perfect world.

Bear in mind that the ANSI/ISO C standard doesn't even have the basic
concept of concurrency.

> > - You still need machine-specific primitives (compare-and-swap
> >   and memory barriers). It's not very portable.

Not only that, but different machines provide different primitives, so
if you're aiming for best performance you should really tune the
entire algorithm to what the machine makes available: LL/SC, CMPXCHG,
the number of bits of atomicity, alignment constraints, cache line
size, cache coherency details, and so on.

                                                  -Dave Dodge