Changeset 1303 in kBuild for trunk/src/kmk
- Timestamp:
- Dec 1, 2007 11:17:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/main.c
r1280 r1303 312 312 4 = realtime / nice -19; */ 313 313 int process_priority = 0; 314 #endif 314 315 /* Process affinity mask; 0 means any CPU. */ 316 int process_affinity = 0; 317 #endif /* KMK */ 315 318 316 319 … … 431 434 #endif 432 435 #ifdef KMK 433 { CHAR_MAX+ 5, positive_int, (char *) &process_priority, 1, 1, 0,436 { CHAR_MAX+6, positive_int, (char *) &process_priority, 1, 1, 0, 434 437 (char *) &process_priority, (char *) &process_priority, "priority" }, 438 { CHAR_MAX+7, positive_int, (char *) &process_affinity, 1, 1, 0, 439 (char *) &process_affinity, (char *) &process_affinity, "affinity" }, 435 440 #endif 436 441 { 'q', flag, &question_flag, 1, 1, 1, 0, 0, "question" }, … … 711 716 #ifdef KMK 712 717 static void 713 set_make_priority (void)718 set_make_priority_and_affinity (void) 714 719 { 715 720 #ifdef WINDOWS32 … … 726 731 } 727 732 SetPriorityClass(GetCurrentProcess(), dwPriority); 733 if (process_affinity) 734 SetThreadAffinityMask(GetCurrentProcess(), process_affinity); 735 728 736 #else /*#elif HAVE_NICE */ 729 737 int nice_level = 0; … … 740 748 nice (nice_level); 741 749 #endif 750 /** @todo bitch about failures. */ 742 751 } 743 752 #endif … … 1491 1500 1492 1501 #ifdef KMK 1493 set_make_priority ();1502 set_make_priority_and_affinity (); 1494 1503 #endif 1495 1504
Note:
See TracChangeset
for help on using the changeset viewer.