[LLVMdev] RFC: Atomics.h

Luke Dalessandro luked at cs.rochester.edu
Sat May 16 19:47:09 PDT 2009


Owen Anderson wrote:
> Some of you may have noticed that I addedd include/llvm/System/Atomics.h 
> to the repository briefly, which will be used for adding support for 
> threading in LLVM.

Just out of curiosity, is there a design document somewhere for the plan 
for threading?

Also, atomic ops are usually pretty low level things used for 
nonblocking algorithms or to build higher level locking constructs. Is 
that the plan here too? It seems like you'd want to avoid anything too 
fancy since LLVM has to run on so many different architectures with 
their variety of memory semantics, etc.

Luke

> 
> I have tried to provided appropriate implementations of the atomic ops 
> (currently memory fence and CAS) for platforms we care about, but my 
> knowledge of these, and my ability to test them, is limited.  So, 
> please, if you run on any less common platform, test out the file, and 
> send me patches to improve it if it doesn't work verbatim on your system.
> 
> Thanks,
> 
> --Owen
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list