From bafeb90f638d1db5e9316b0f8afb156dd8397b0e Mon Sep 17 00:00:00 2001 From: jjenista Date: Tue, 9 Nov 2010 22:19:29 +0000 Subject: [PATCH] no need to add one worker thread, let end user decide --- Robust/src/Runtime/workschedule.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Robust/src/Runtime/workschedule.c b/Robust/src/Runtime/workschedule.c index 333bfb0e..afa16582 100644 --- a/Robust/src/Runtime/workschedule.c +++ b/Robust/src/Runtime/workschedule.c @@ -226,6 +226,13 @@ void* workerMain( void* arg ) { if( haveWork ) { // let GC see current work litem.seseCommon = (void*)workUnit; + +#ifdef DEBUG_DEQUE + if( workUnit == NULL ) { + printf( "About to execute a null work item\n" ); + } +#endif + workFunc( workUnit ); } } @@ -273,7 +280,7 @@ void workScheduleInit( int numProcessors, pthread_cond_init ( &gccond, NULL ); - numWorkSchedWorkers = numProcessors + 1; + numWorkSchedWorkers = numProcessors; workFunc = func; -- 2.34.1