00001 //List of rdma receiver buffer information that is used for waiting for completion 00002 void MPIPostOneBuffer(const void *buffer, void *ref, int size, int pe, int tag, int type); 00003 00004 int getNewMPITag(void){ 00005 00006 /* A local variable is used to avoid a race condition that can occur when 00007 * the global variable rdmaTag is updated by another thread after the first 00008 * thread releases the lock but before it sends the variable back */ 00009 int newRdmaTag; 00010 #if CMK_SMP 00011 CmiLock(rdmaTagLock); 00012 #endif 00013 00014 rdmaTag++; 00015 00016 /* Reset generated tag when equal to the implementation dependent upper bound. 00017 * This condition also ensures correct resetting of the generated tag if tagUb is INT_MAX */ 00018 if(rdmaTag == tagUb) 00019 rdmaTag = RDMA_BASE_TAG; //reseting can fail if previous tags are in use 00020 00021 //copy the updated value into the local variable to ensure consistent a tag value 00022 newRdmaTag = rdmaTag; 00023 #if CMK_SMP 00024 CmiUnlock(rdmaTagLock); 00025 #endif 00026 return newRdmaTag; 00027 } 00028 00029 // Set the machine specific information for a nocopy pointer (Empty method to maintain API consistency) 00030 void LrtsSetRdmaBufferInfo(void *info, const void *ptr, int size, unsigned short int mode){ 00031 }