lock down processor affinity.
This commit is contained in:
parent
0bf9abd12f
commit
bd6706e65f
|
@ -252,6 +252,7 @@ void OAKRA_Module_OutputDS::beginThread() {
|
||||||
threadData = new ThreadData();
|
threadData = new ThreadData();
|
||||||
((ThreadData *)threadData)->ds = this;
|
((ThreadData *)threadData)->ds = this;
|
||||||
HANDLE updateThread = CreateThread(0,0,updateProc,threadData,0,&updateThreadId);
|
HANDLE updateThread = CreateThread(0,0,updateProc,threadData,0,&updateThreadId);
|
||||||
|
SetThreadAffinityMask(updateThread,1);
|
||||||
SetThreadPriority(updateThread,THREAD_PRIORITY_TIME_CRITICAL);
|
SetThreadPriority(updateThread,THREAD_PRIORITY_TIME_CRITICAL);
|
||||||
//SetThreadPriority(updateThread,THREAD_PRIORITY_HIGHEST);
|
//SetThreadPriority(updateThread,THREAD_PRIORITY_HIGHEST);
|
||||||
}
|
}
|
||||||
|
|
|
@ -557,6 +557,8 @@ void initDirectories()
|
||||||
#include "x6502.h"
|
#include "x6502.h"
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
|
SetThreadAffinityMask(GetCurrentThread(),1);
|
||||||
|
|
||||||
printf("%08x",opsize);
|
printf("%08x",opsize);
|
||||||
|
|
||||||
char *t;
|
char *t;
|
||||||
|
|
|
@ -1490,6 +1490,7 @@ static int fceu_exec_time(lua_State *L)
|
||||||
goEvent = CreateEvent(0,true,false,0);
|
goEvent = CreateEvent(0,true,false,0);
|
||||||
DWORD threadid;
|
DWORD threadid;
|
||||||
HANDLE thread = CreateThread(0,0,fceu_exec_time_proc,(LPVOID)L,0,&threadid);
|
HANDLE thread = CreateThread(0,0,fceu_exec_time_proc,(LPVOID)L,0,&threadid);
|
||||||
|
SetThreadAffinityMask(thread,1);
|
||||||
//wait for the lua thread to start
|
//wait for the lua thread to start
|
||||||
WaitForSingleObject(readyEvent,INFINITE);
|
WaitForSingleObject(readyEvent,INFINITE);
|
||||||
ResetEvent(readyEvent);
|
ResetEvent(readyEvent);
|
||||||
|
|
Loading…
Reference in New Issue