vis, light: set low process priority on windows
This commit is contained in:
parent
5302a3b539
commit
3005504fe5
|
|
@ -82,6 +82,12 @@ InterruptThreadProgress__(void)
|
|||
int numthreads = 1;
|
||||
CRITICAL_SECTION crit;
|
||||
|
||||
void
|
||||
LowerProcessPriority(void)
|
||||
{
|
||||
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
|
||||
}
|
||||
|
||||
int
|
||||
GetDefaultThreads(void)
|
||||
{
|
||||
|
|
@ -170,6 +176,12 @@ RunThreadsOn(int start, int workcnt, void *(func)(void *), void *arg)
|
|||
int numthreads = 1;
|
||||
pthread_mutex_t *my_mutex;
|
||||
|
||||
void
|
||||
LowerProcessPriority(void)
|
||||
{
|
||||
/* not implemented for now */
|
||||
}
|
||||
|
||||
int
|
||||
GetDefaultThreads(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
extern int numthreads;
|
||||
|
||||
void LowerProcessPriority(void);
|
||||
int GetDefaultThreads(void);
|
||||
int GetMaxThreads(void); /* returns 0 if no limit specified */
|
||||
int GetThreadWork(void);
|
||||
|
|
|
|||
|
|
@ -270,6 +270,7 @@ main(int argc, const char **argv)
|
|||
init_log("light.log");
|
||||
logprint("---- light / TyrUtils " stringify(TYRUTILS_VERSION) " ----\n");
|
||||
|
||||
LowerProcessPriority();
|
||||
numthreads = GetDefaultThreads();
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue