[ofw] [PATCH] uDAPL v2 - dapltest patches for mdep processor yield
Arlin Davis
arlin.r.davis at intel.com
Thu Aug 20 11:04:56 PDT 2009
Be thread scheduler friendly and release the current thread thus allowing other threads to run.
Signed off by Stan Smith stan.smith at intel.com
--- 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;
More information about the ofw
mailing list