no need to add one worker thread, let end user decide
authorjjenista <jjenista>
Tue, 9 Nov 2010 22:19:29 +0000 (22:19 +0000)
committerjjenista <jjenista>
Tue, 9 Nov 2010 22:19:29 +0000 (22:19 +0000)
Robust/src/Runtime/workschedule.c

index 333bfb0e4cde9afc02ab0118e4768a29e4920c85..afa165822be2cf35b5ee56a764630059b6339a01 100644 (file)
@@ -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;