[mpich2-commits] r7430 - mpich2/trunk/src/include
jayesh at mcs.anl.gov
jayesh at mcs.anl.gov
Tue Nov 9 15:19:40 CST 2010
Author: jayesh
Date: 2010-11-09 15:19:40 -0600 (Tue, 09 Nov 2010)
New Revision: 7430
Modified:
mpich2/trunk/src/include/mpiu_ex.h
Log:
Re-init only valid/reqd ov fields
Modified: mpich2/trunk/src/include/mpiu_ex.h
===================================================================
--- mpich2/trunk/src/include/mpiu_ex.h 2010-11-09 21:17:51 UTC (rev 7429)
+++ mpich2/trunk/src/include/mpiu_ex.h 2010-11-09 21:19:40 UTC (rev 7430)
@@ -307,13 +307,11 @@
}
/*
- MPIU_ExReInitOverlapped
+ MPIU_ExReInitOverlapped ==> ONLY REQD for manual events
Re-Initialize the success & failure callback function fields
- The hEvent field of the OVERLAPPED is reset since it will
- be reused
- Returns TRUE if Re-init succeeds, FALSE otherwise
+ Re-init the event
*/
static
@@ -325,10 +323,18 @@
MPIU_ExCompletionRoutine pfnFailure
)
{
- pOverlapped->pfnSuccess = pfnSuccess;
- pOverlapped->pfnFailure = pfnFailure;
+ /* Re-init succ/fail handlers only if they are ~null */
+ if(pfnSuccess){
+ pOverlapped->pfnSuccess = pfnSuccess;
+ }
+ if(pfnFailure){
+ pOverlapped->pfnFailure = pfnFailure;
+ }
- return(ResetEvent(pOverlapped->ov.hEvent));
+ if(pOverlapped->ov.hEvent)
+ return(ResetEvent(pOverlapped->ov.hEvent));
+ else
+ return TRUE;
}
/*
More information about the mpich2-commits
mailing list