Be thread scheduler friendly and release the current thread thus allowing other threads to run.
Signed off by Stan Smith [email protected] --- a/test/dapltest/mdep/linux/dapl_mdep_user.h Wed Aug 19 14:09:52 2009 +++ b/test/dapltest/mdep/linux/dapl_mdep_user.h Wed Aug 19 13:32:36 2009 @@ -200,4 +200,9 @@ #define DT_Mdep_flush() fflush(NULL) +/* + * Release processor to reschedule + */ +#define DT_Mdep_yield pthread_yield + #endif --- a/test/dapltest/mdep/solaris/dapl_mdep_user.h Thu Aug 20 08:49:11 2009 +++ b/test/dapltest/mdep/solaris/dapl_mdep_user.h Wed Aug 19 16:23:28 2009 @@ -74,6 +74,10 @@ #define DT_Mdep_printf printf #define DT_Mdep_flush() fflush(NULL) +/* + * Release processor to reschedule + */ +#define DT_Mdep_yield pthread_yield /* * Locks --- a/test/dapltest/mdep/windows/dapl_mdep_user.h Wed Aug 19 14:08:50 2009 +++ b/test/dapltest/mdep/windows/dapl_mdep_user.h Tue Aug 18 13:57:09 2009 @@ -80,6 +80,11 @@ #define DT_Mdep_flush() fflush(NULL) /* + * Release processor to reschedule + */ +#define DT_Mdep_yield() Sleep(0) + +/* * Locks */ --- a/test/dapltest/test/dapl_test_util.c Wed Aug 19 14:20:07 2009 +++ b/test/dapltest/test/dapl_test_util.c Wed Aug 19 14:20:00 2009 @@ -415,7 +415,7 @@ DAT_EVD_HANDLE evd_handle, DAT_DTO_COMPLETION_EVENT_DATA * dto_statusp) { - for (;;) { + for (;;DT_Mdep_yield()) { DAT_RETURN ret; DAT_EVENT event; _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
