Linux build fix.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6938 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-01-27 22:48:46 +00:00
parent 1c7ca86940
commit 198dcccfb0
2 changed files with 6 additions and 10 deletions

View File

@ -32,11 +32,13 @@
#include <assert.h>
int fd = -1;
std::thread cpuThread;
bool CEXIETHERNET::deactivate()
{
close(fd);
fd = -1;
cpuThread.join();
return true;
}
@ -143,9 +145,8 @@ bool CEXIETHERNET::resume()
return true;
}
THREAD_RETURN CpuThread(void *pArg)
void CpuThread(CEXIETHERNET *self)
{
CEXIETHERNET* self = (CEXIETHERNET*)pArg;
while(1)
{
if(self->CheckRecieved())
@ -176,11 +177,9 @@ THREAD_RETURN CpuThread(void *pArg)
INFO_LOG(SP1, "Received %d bytes of data\n", self->mRecvBufferLength);
self->mWaiting = false;
self->handleRecvdPacket();
return 0;
}
//sleep(1);
}
return 0;
}
bool CEXIETHERNET::startRecv()
@ -192,8 +191,7 @@ bool CEXIETHERNET::startRecv()
INFO_LOG(SP1, "already waiting\n");
return true;
}
Common::Thread *cpuThread = new Common::Thread(CpuThread, (void*)this);
if(cpuThread)
cpuThread = std::thread(CpuThread, this);
mWaiting = true;
return true;

View File

@ -144,9 +144,7 @@ void DestroyXWindow(void)
{
XUnmapWindow(GLWin.dpy, GLWin.win);
GLWin.win = 0;
if (GLWin.xEventThread)
delete GLWin.xEventThread;
GLWin.xEventThread = NULL;
GLWin.xEventThread.join();
XFreeColormap(GLWin.evdpy, GLWin.attr.colormap);
}