Displaying 1 result from an estimated 1 matches for "atomicopyield".
2006 Oct 30
2
[LLVMdev] "fork" and "sync" for LLVM thread support - any comments?
...sync int (1, 2, 3)
at which point A would resume, but B would block pending a sync(3) from
somewhere.
The optional [how] parameter is there for performance reasons: it is
simply a way to request that LLVM generate code to implement the sync in
a particular way, e.g.
AtomicOpBusyWait
AtomicOpYielding
Signal
etc..
That's it - fork and sync are (I hope) all that's required.
A PATRONIZING EXAMPLE:
Summing the numbers in an array, using two threads:
%sumB = global int 0
int %sumfun(%base, %offset, %count)
[simple loop adding numbers from base[offset] to base[offset+coun...