Changeset 3051 in kBuild for trunk/src/kmk/w32/subproc
- Timestamp:
- Jul 24, 2017 10:59:59 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/w32/subproc/sub_proc.c
r2912 r3051 548 548 #ifdef KMK 549 549 size_t exec_path_len; 550 extern int process_priority; 550 551 551 552 assert (pproc->enmType == kRegular); … … 716 717 else if (argv[0]) 717 718 kmk_cache_exec_image(argv[0]); 719 720 switch (process_priority) { 721 case 1: flags |= CREATE_SUSPENDED | IDLE_PRIORITY_CLASS; break; 722 case 2: flags |= CREATE_SUSPENDED | BELOW_NORMAL_PRIORITY_CLASS; break; 723 case 3: flags |= CREATE_SUSPENDED | NORMAL_PRIORITY_CLASS; break; 724 case 4: flags |= CREATE_SUSPENDED | HIGH_PRIORITY_CLASS; break; 725 case 5: flags |= CREATE_SUSPENDED | REALTIME_PRIORITY_CLASS; break; 726 } 718 727 #endif 719 728 if (CreateProcess( … … 741 750 return(-1); 742 751 } 752 #ifdef KMK 753 switch (process_priority) { 754 case 1: SetThreadPriority(procInfo.hThread, THREAD_PRIORITY_IDLE); break; 755 case 2: SetThreadPriority(procInfo.hThread, THREAD_PRIORITY_BELOW_NORMAL); break; 756 case 3: SetThreadPriority(procInfo.hThread, THREAD_PRIORITY_NORMAL); break; 757 case 4: SetThreadPriority(procInfo.hThread, THREAD_PRIORITY_HIGHEST); break; 758 case 5: SetThreadPriority(procInfo.hThread, THREAD_PRIORITY_TIME_CRITICAL); break; 759 } 760 ResumeThread(procInfo.hThread); 761 #endif 743 762 } 744 763
Note:
See TracChangeset
for help on using the changeset viewer.