13.3 Implementing ATOMIC construct

The target should implement the __sync builtins.

Failing that we could add

  void GOMP_atomic_start (void)
  void GOMP_atomic_end (void)

which reuses the regular lock code, but with yet another lock object private to the library.

Those two functions are used exclusively for explicit atomic constructs; reductions use GOMP_reduction_start and GOMP_reduction_end instead (see Implementing REDUCTION clause).