fix PosixThreadSupport for Mac OSX, thanks to David Guthrie,

http://code.google.com/p/bullet/issues/detail?id=111
This commit is contained in:
erwin.coumans
2008-11-06 07:04:36 +00:00
parent 2daf428386
commit 3ca7d91fc6
2 changed files with 58 additions and 23 deletions

View File

@@ -32,7 +32,7 @@ subject to the following restrictions:
typedef void (*PosixThreadFunc)(void* userPtr,void* lsMemory);
typedef void* (*PosixlsMemorySetupFunc)();
///The PosixThreadSupport implements the btThreadSupportInterface using pthreads, to help porting SPU Tasks.
// PosixThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
class PosixThreadSupport : public btThreadSupportInterface
{
public:
@@ -54,7 +54,7 @@ public:
void* m_lsMemory; //initialized using PosixLocalStoreMemorySetupFunc
pthread_t thread;
sem_t startSemaphore;
sem_t* startSemaphore;
unsigned long threadUsed;
};
@@ -111,9 +111,8 @@ public:
///tell the task scheduler we are done with the SPU tasks
virtual void stopSPU();
virtual void setNumTasks(int numTasks)
{
}
virtual void setNumTasks(int numTasks) {}
};