[LLVMdev] RFC: Atomics.h
Owen Anderson
resistor at mac.com
Sat May 16 22:03:10 PDT 2009
On May 16, 2009, at 7:47 PM, Luke Dalessandro wrote:
> 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?
Not as yet. Chris may have ideas in this direction, but I don't think
they're been written down anywhere. For now, I'm just trying to
enhance the thread-safety of some obviously unsafe pieces of code.
> 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.
I totally agree. However, at least one case of thread-unsafety
(ManagedStatic), has proven very-difficult-to-impossible to implement
correctly without using lower-level operations.
--Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090516/37f0253c/attachment.bin>
More information about the llvm-dev
mailing list