[Pvfs2-cvs] commit by slang in pvfs2/src/io/job: thread-mgr.c
CVS commit program
cvs at parl.clemson.edu
Tue Jul 8 12:50:18 EDT 2008
Update of /projects/cvsroot/pvfs2/src/io/job
In directory parlweb1:/tmp/cvs-serv26429/src/io/job
Modified Files:
Tag: he-branch
thread-mgr.c
Log Message:
change which thread calls end events for trove.
Index: thread-mgr.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/job/thread-mgr.c,v
diff -p -u -r1.37.4.2 -r1.37.4.3
--- thread-mgr.c 21 May 2008 18:55:24 -0000 1.37.4.2
+++ thread-mgr.c 8 Jul 2008 16:50:18 -0000 1.37.4.3
@@ -24,7 +24,6 @@
static int thread_mgr_test_timeout = THREAD_MGR_TEST_TIMEOUT;
/* TODO: organize this stuff better */
-static void *__bmi_thread_function(void *ptr);
static void *bmi_thread_function(void *ptr);
static void *trove_thread_function(void *ptr);
static void *dev_thread_function(void *ptr);
@@ -88,6 +87,7 @@ static void *trove_thread_function(void
int timeout = thread_mgr_test_timeout;
#ifdef __PVFS2_JOB_THREADED__
+ PINT_event_thread_start("TROVE");
while (trove_thread_running)
#endif
{
@@ -147,23 +147,12 @@ static void *trove_thread_function(void
stat_trove_error_code_array[i]);
}
}
- return (NULL);
-}
-
-
-static void *__bmi_thread_function(void *ptr) {
- void* ret = NULL;
-#ifdef __PVFS2_JOB_THREADED__
- PINT_event_thread_start("BMI");
-#endif
- ret = bmi_thread_function(ptr);
#ifdef __PVFS2_JOB_THREADED__
PINT_event_thread_stop();
#endif
- return ret;
+ return (NULL);
}
-
/* bmi_thread_function()
*
* function executed by the thread in charge of BMI
@@ -178,6 +167,7 @@ static void *bmi_thread_function(void *p
struct PINT_thread_mgr_bmi_callback *tmp_callback;
#ifdef __PVFS2_JOB_THREADED__
+ PINT_event_thread_start("BMI");
while (bmi_thread_running)
#endif
{
@@ -299,6 +289,9 @@ static void *bmi_thread_function(void *p
}
}
+#ifdef __PVFS2_JOB_THREADED__
+ PINT_event_thread_stop();
+#endif
return (NULL);
}
@@ -492,7 +485,7 @@ int PINT_thread_mgr_bmi_start(void)
bmi_thread_running = 1;
#ifdef __PVFS2_JOB_THREADED__
- ret = pthread_create(&bmi_thread_id, NULL, __bmi_thread_function, NULL);
+ ret = pthread_create(&bmi_thread_id, NULL, bmi_thread_function, NULL);
if(ret != 0)
{
BMI_close_context(global_bmi_context);
@@ -851,7 +844,7 @@ void PINT_thread_mgr_trove_push(int max_
void PINT_thread_mgr_bmi_push(int max_idle_time)
{
thread_mgr_test_timeout = max_idle_time;
- __bmi_thread_function(NULL);
+ bmi_thread_function(NULL);
}
/*
More information about the Pvfs2-cvs
mailing list