Lines 90-95
Link Here
|
90 |
#define ISPC_USE_CONCRT |
90 |
#define ISPC_USE_CONCRT |
91 |
#elif defined(__linux__) |
91 |
#elif defined(__linux__) |
92 |
#define ISPC_USE_PTHREADS |
92 |
#define ISPC_USE_PTHREADS |
|
|
93 |
#elif defined(__FreeBSD__) |
94 |
#define ISPC_USE_PTHREADS |
95 |
// #define ISPC_USE_TBB_TASK_GROUP // ISPC_USE_PTHREADS fails for some reason, need to investigate |
93 |
#elif defined(__APPLE__) |
96 |
#elif defined(__APPLE__) |
94 |
#define ISPC_USE_GCD |
97 |
#define ISPC_USE_GCD |
95 |
#endif |
98 |
#endif |
Lines 755-761
InitTaskSystem() {
Link Here
|
755 |
bool success = false; |
758 |
bool success = false; |
756 |
srand(time(NULL)); |
759 |
srand(time(NULL)); |
757 |
for (int i = 0; i < 10; i++) { |
760 |
for (int i = 0; i < 10; i++) { |
758 |
sprintf(name, "ispc_task.%d.%d", (int)getpid(), (int)rand()); |
761 |
sprintf(name, "/ispc_task.%d.%d", (int)getpid(), (int)rand()); |
759 |
workerSemaphore = sem_open(name, O_CREAT, S_IRUSR|S_IWUSR, 0); |
762 |
workerSemaphore = sem_open(name, O_CREAT, S_IRUSR|S_IWUSR, 0); |
760 |
if (workerSemaphore != SEM_FAILED) { |
763 |
if (workerSemaphore != SEM_FAILED) { |
761 |
success = true; |
764 |
success = true; |