On Wed, Sep 23, 2015 at 08:22:19PM +0300, Alexander Monakov wrote: > This patch provides minimal non-stub implementations for libgomp > mutex/ptrlock/semaphore, using atomic ops and busy waiting. The goal here is > to at least provide stub struct declarations necessary to unbreak libgomp.h. > > Atomics with busy waiting seems to be the only way to provide such primitives > for inter-team synchronizations, but for intra-team ops a more efficient > implementation may be possible.
I expect almost all the synchronization primitives can be just intra-team, the only possible exception (though not required by the standard) would be the locks used in atomic.c I'd say. But I guess this is ok for now as the first step. > > (all functionality is unused since consumers are stubbed out in config/nvptx) > > * config/nvptx/mutex.h: New file. > * config/nvptx/ptrlock.h: New file. > * config/nvptx/sem.h: New file. Jakub