I am capturing some notes that @staticfloat wrote in an email exchange. It would be a good idea to clean these up a bit and capture them somewhere. Is the dev docs section in the manual the right place?
The documentation for the function shmem_wait seems inconsistent with the function signatures as it describes parameters target, pe, and value that are actually not part of the interface. The parameter ivar is described but at least in the C interface the variable is named var (without the prefix i).