[cpp-threads] Memory model counterproposal: synchronizedoperations
Peter Dimov
pdimov at mmltd.net
Fri May 27 10:53:44 BST 2005
Nelson, Clark wrote:
>> It is fairly reasonable to pass the address of a local
>> variable as the
>> argument to the thread function (if the parent then does a
>> join.) Doesn't
>> OpenMP do that all the time?
>
> Yes, I suppose it does. And my proposal for the C/C++ standard would
> invalidate it. But technically, that would be interesting only for
> someone who was trying to implement OpenMP in terms of portable C or
> C++.
I gave OpenMP as an example of this scenario, but it's reasonable to expect
it to be present in pthreads-based programs as well. Something along the
lines of:
double a[ N ];
// spawn K threads, passing each a pointer to a subset of A
// join the threads
I don't have any voting power, of course, but if I did, I'd vote against the
restriction.
More information about the cpp-threads
mailing list