Changeset 534 for trunk/src/gmake/main.c
- Timestamp:
- Sep 19, 2006, 1:16:21 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/main.c
r532 r534 284 284 285 285 #ifdef KMK 286 /* Process priority. 287 0 = no change; 288 1 = idle / max nice; 289 2 = below normal / nice 10; 290 3 = normal / nice 0; 286 /* Process priority. 287 0 = no change; 288 1 = idle / max nice; 289 2 = below normal / nice 10; 290 3 = normal / nice 0; 291 291 4 = high / nice -10; 292 292 4 = realtime / nice -19; */ 293 293 int process_priority = 0; 294 #endif 294 #endif 295 295 296 296 … … 414 414 "print-data-base" }, 415 415 #ifdef KMK 416 { CHAR_MAX+5, positive_int, (char *) &process_priority, 1, 1, 0, 416 { CHAR_MAX+5, positive_int, (char *) &process_priority, 1, 1, 0, 417 417 (char *) &process_priority, (char *) &process_priority, "priority" }, 418 418 #endif … … 515 515 #else /* CONFIG_WITH_EXTENDED_NOTPARALLEL */ 516 516 517 /* Negative if we have seen the `.NOTPARALLEL' target with an 518 empty dependency list. 519 520 Zero if no `.NOTPARALLEL' or no file in the dependency list 521 is being executed. 522 523 Positive when a file in the `.NOTPARALLEL' dependency list 517 /* Negative if we have seen the `.NOTPARALLEL' target with an 518 empty dependency list. 519 520 Zero if no `.NOTPARALLEL' or no file in the dependency list 521 is being executed. 522 523 Positive when a file in the `.NOTPARALLEL' dependency list 524 524 is in progress, the value is the number of notparallel files 525 525 in progress (running or queued for running). … … 689 689 { 690 690 #ifdef WINDOWS32 691 692 693 694 695 696 697 698 699 700 701 702 691 DWORD dwPriority; 692 switch (process_priority) 693 { 694 case 0: return; 695 case 1: dwPriority = IDLE_PRIORITY_CLASS; break; 696 case 2: dwPriority = BELOW_NORMAL_PRIORITY_CLASS; break; 697 case 3: dwPriority = NORMAL_PRIORITY_CLASS; break; 698 case 4: dwPriority = HIGH_PRIORITY_CLASS; break; 699 case 5: dwPriority = REALTIME_PRIORITY_CLASS; break; 700 default: fatal(NILF, _("invalid priority %d\n"), process_priority); 701 } 702 SetPriorityClass(GetCurrentProcess(), dwPriority); 703 703 #else /*#elif HAVE_NICE */ 704 int nice= 0;705 706 707 708 case 1: nice= 19; break;709 case 2: nice= 10; break;710 case 3: nice= 0; break;711 case 4: nice= -10; break;712 case 5: nice= -19; break;713 714 715 nice(nice);716 #endif 704 int nice_level = 0; 705 switch (process_priority) 706 { 707 case 0: return; 708 case 1: nice_level = 19; break; 709 case 2: nice_level = 10; break; 710 case 3: nice_level = 0; break; 711 case 4: nice_level = -10; break; 712 case 5: nice_level = -19; break; 713 default: fatal(NILF, _("invalid priority %d\n"), process_priority); 714 } 715 nice (nice_level); 716 #endif 717 717 } 718 #endif 718 #endif 719 719 720 720 … … 895 895 #ifdef KMK 896 896 /* WORKAROUND: 897 With GNU Make 3.81, this kludge was necessary to get double quotes 898 working correctly again (worked fine with the 3.81beta1 code). 899 beta1 was forcing batch_mode_shell I think, so let's enforce that 897 With GNU Make 3.81, this kludge was necessary to get double quotes 898 working correctly again (worked fine with the 3.81beta1 code). 899 beta1 was forcing batch_mode_shell I think, so let's enforce that 900 900 for the kBuild shell. */ 901 901 if (sh_found && strstr(default_shell, "kmk_ash")) { … … 903 903 batch_mode_shell = 1; 904 904 } else 905 #endif 905 #endif 906 906 /* naive test */ 907 907 if (!unixy_shell && sh_found && … … 1331 1331 #ifdef KMK 1332 1332 set_make_priority (); 1333 #endif 1333 #endif 1334 1334 1335 1335 /* Set always_make_flag if -B was given and we've not restarted already. */
Note:
See TracChangeset
for help on using the changeset viewer.