[argobots-discuss] Can I move a static mutex around in memory?
mdorier at anl.gov
Tue Jun 15 07:04:39 CDT 2021
I would like to understand statically initialized mutex and condition variables better, in particular: can I move them around in memory (assuming all the ULTs in my code have a consistent way of locating them)?
This would come up in C++ containers, for instance:
If I increase the size of the vector, reallocation may take place, and the existing mutexes will be moved somewhere else in memory. Assuming all the ULTs are accessing them by their index in the vector rather than by an ABT_mutex opaque pointer, then this should be fine as long as I am allowed to move ABT_mutex_memory around (regardless of their state). Is that the case?
Same question for condition variables?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the discuss