From: jjenista Date: Tue, 9 Nov 2010 22:19:29 +0000 (+0000) Subject: no need to add one worker thread, let end user decide X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bafeb90f638d1db5e9316b0f8afb156dd8397b0e;p=IRC.git no need to add one worker thread, let end user decide --- 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;