upc_sync

Date:

09-23-2013

NAME

upc_sync, upc_sync_attempt, upc_synci, upc_synci_attempt - Synchronize a non-blocking operation

SYNOPSIS

#include <upc_nb.h>

void upc_sync(upc_handle_t handle);
int upc_sync_attempt(upc_handle_t handle);
void upc_synci( void );
int upc_synci_attempt( void );

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

The upc_sync[_attempt] and upc_synci[_attempt] functions can be used to ensure that previous non-blocking operations, initiated by the calling thread have completed.

For example, the functions upc_memcpy_nb, upc_memget_nb, and upc_memput_nb functions return a handle which upc_sync and upc_sync_attempt use to ensure that the copy operations have completed for the specified handle. handle must be a valid handle returned by an explicit-handle transfer initiation function to the current thread, or the value UPC_COMPLETE_HANDLE.

The upc_sync function does not return until the non-blocking operation identified by the handle has completed, while upc_sync_attempt returns immediately, returning non-zero if complete, otherwise returning zero.

The upc_synci[_attempt] functions are implicit-handle variations. They do not require an explicit handle; they ensure that all previous non-blocking, but not yet synchronized, operations initiated by the calling thread, have completed.

The upc_synci function does not return until the implicitly identified operations have completed, while upc_sync_attempt returns immediately, returning non-zero if complete, otherwise returning zero.

RETURN VALUE

The upc_synci_attempt function returns non-zero if all implicit-handle, not yet synchronized, non-blocking operations are complete, otherwise it returns 0.

The upc_sync_attempt function returns non-zero if the non-blocking operation associated with handle is complete, otherwise, it returns 0.

SEE ALSO

upc_memget_nb(3c), upc_memput_nb(3c), upc_memset_nb(3c)