#include "ga.h"
/* ga_access and release do not protect against overlapping access.  Use a 
   common mutex to guard such uses */

/* ?? is a lock needed at all? */
int ga_access( GA ga, void *buf )
{
  int flag;
  MPI_Win_lock( MPI_LOCK_SHARED, rank, MPI_MODE_NOCHECK, ga.ga_win );
  MPI_Win_attr_get( ga.ga_win, MPI_WIN_BASE, &buf, &flag );
}

int ga_release( GA ga )
{
  MPI_Win_unlock( rank, ga.ga_win );
}
