Go to the first, previous, next, last section, table of contents.


Synchronization functions

C function: void shmem_wait (long *paddr, int flag_value)
shmem_wait() waits until the local variable pointed to by paddr is not equal to flag_value, then returns. This is an individual operation, and is useful for point-to-point synchronization.

C function: void shmem_cwait (long *pcount, int count_value)
This function waits until the value pointed to by *pcount is greater than or equal to count_value. It is often used in conjunction with shmem_cget() as follows:
finished = 0;
shmem_cget (mybuffer1, herbuffer, 123, 83, &finished);
shmem_cget (mybuffer2, hisbuffer, 456, 80, &finished);
shmem_cwait (&finished, 2);

shmem_cwait() is an individual function.

C function: void shmem_barrier (int PE_start, int logPE_stride, int PE_size, long *pSync)
shmem_barrier() is a collective procedure that implements barrier synchronization across the nodes in the active set. pSync should have _SHMEM_BARRIER_SYNC_SIZE elements and each element should be initialized to the value _SHMEM_SYNC_VALUE before the call.

C function: void barrier (void)
This function is also a collective operation. It implements barrier synchronization across all nodes.


Go to the first, previous, next, last section, table of contents.