Changeset 1801 in kBuild for trunk/src/kmk
- Timestamp:
- Sep 21, 2008 2:29:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/incdep.c
r1800 r1801 130 130 /* The handles to the worker threads. */ 131 131 #ifdef HAVE_PTHREAD 132 static pthread_t incdep_threads[ 1];132 static pthread_t incdep_threads[4]; 133 133 #elif defined (WINDOWS32) 134 static HANDLE incdep_threads[ 1];134 static HANDLE incdep_threads[4]; 135 135 #elif defined (__OS2__) 136 static TID incdep_threads[1]; 137 #endif 136 static TID incdep_threads[4]; 137 #endif 138 static unsigned incdep_num_threads = 1; 138 139 139 140 /* flag indicating whether the worker threads should terminate or not. */ … … 431 432 432 433 incdep_terminate = 0; 433 for (i = 0; i < sizeof (incdep_threads) / sizeof (incdep_threads[0]); i++) 434 incdep_num_threads = sizeof (incdep_threads) / sizeof (incdep_threads[0]); 435 if (incdep_num_threads + 1 > job_slots) 436 incdep_num_threads = job_slots <= 1 ? 1 : job_slots - 1; 437 for (i = 0; i < incdep_num_threads; i++) 434 438 { 435 439 #ifdef HAVE_PTHREAD … … 489 493 /* wait for the threads to quit */ 490 494 491 for (i = 0; i < sizeof (incdep_threads) / sizeof (incdep_threads[0]); i++)495 for (i = 0; i < incdep_num_threads; i++) 492 496 { 493 497 /* later? */ 494 498 } 499 incdep_num_threads = 0; 495 500 496 501 /* destroy the lock and condition variables / event objects. */
Note:
See TracChangeset
for help on using the changeset viewer.