osx fixes. Update cmake files.

This commit is contained in:
castano
2012-02-14 18:00:47 +00:00
parent 778bdec4ba
commit 21af952fec
7 changed files with 33 additions and 11 deletions

View File

@ -32,6 +32,28 @@ void Event::wait() {
WaitForSingleObject(m->handle, INFINITE);
}
#elif NV_OS_UNIX
// @@ TODO
#pragma NV_MESSAGE("Implement event using pthreads!")
struct Event::Private {
};
Event::Event() : m(new Private) {
}
Event::~Event() {
}
void Event::post() {
}
void Event::wait() {
}
#endif
/*static*/ void Event::post(Event * events, uint count) {
for (uint i = 0; i < count; i++) {
@ -40,14 +62,9 @@ void Event::wait() {
}
/*static*/ void Event::wait(Event * events, uint count) {
// @@ Use wait for multiple objects?
// @@ Use wait for multiple objects in win32?
for (uint i = 0; i < count; i++) {
events[i].wait();
}
}
#elif NV_OS_UNIX
// @@ TODO
#pragma NV_MESSAGE("Implement event using pthreads!")
#endif

View File

@ -9,8 +9,12 @@
using namespace nv;
// @@ nvthread is only fully implemented in win32.
#if NV_OS_WIN32
#define ENABLE_PARALLEL_FOR 1
#else
#define ENABLE_PARALLEL_FOR 0
#endif
void worker(void * arg) {
ParallelFor * owner = (ParallelFor *)arg;