[ofa-general] [PATCH] dapl common: add debug output during thread create failure

Arlin Davis arlin.r.davis at intel.com
Fri Jan 16 10:40:32 PST 2009


dapl common: add debug output during thread create failure. 

Need strerror messages to help isolate create thread errors.

Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
---
 dapl/udapl/linux/dapl_osd.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dapl/udapl/linux/dapl_osd.c b/dapl/udapl/linux/dapl_osd.c
index 26c778c..b828b91 100644
--- a/dapl/udapl/linux/dapl_osd.c
+++ b/dapl/udapl/linux/dapl_osd.c
@@ -562,6 +562,9 @@ dapl_os_thread_create (
     status = pthread_attr_init ( &thread_attr );
     if ( status != 0 )
     {
+	dapl_log(DAPL_DBG_TYPE_ERR, 
+		 " uDAPL: pthread_attr_init: ERR=%s\n", 
+		 strerror(errno));
 	return DAT_ERROR (DAT_INTERNAL_ERROR,0);
     }
 
@@ -570,6 +573,9 @@ dapl_os_thread_create (
 					   PTHREAD_CREATE_DETACHED );
     if ( status != 0 )
     {
+	dapl_log(DAPL_DBG_TYPE_ERR, 
+		 " uDAPL: pthread_attr_setdetachstate: ERR=%s\n", 
+		 strerror(errno));
 	return DAT_ERROR (DAT_INTERNAL_ERROR,0);
     }
 
@@ -592,6 +598,9 @@ dapl_os_thread_create (
 
     if ( status != 0 )
     {
+	dapl_log(DAPL_DBG_TYPE_ERR, 
+		 " uDAPL: pthread_create: ERR=%s\n", 
+		 strerror(errno));
 	return DAT_ERROR (DAT_INSUFFICIENT_RESOURCES,0);
     }
 
-- 
1.5.2.5





More information about the general mailing list