Skip to content

Commit

Permalink
removed getThreadAffinity function from thread.cpp, it was causing GL…
Browse files Browse the repository at this point in the history
…IBC2.6 dependency
  • Loading branch information
svenwoop committed Aug 6, 2015
1 parent c10f373 commit ca55684
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions common/sys/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,6 @@ namespace embree
if (pthread_setaffinity_np(pthread_self(), sizeof(cset), &cset) != 0)
std::cerr << "Thread: cannot set affinity" << std::endl;
}

ssize_t getThreadAffinity(pthread_t pth)
{
cpu_set_t cset;
CPU_ZERO(&cset);
int error = pthread_getaffinity_np(pth, sizeof(cset), &cset);
if (error != 0) perror("pthread_getaffinity_np");

for (int j=0; j<CPU_COUNT(&cset); j++)
if (CPU_ISSET(j, &cset))
return j;

return -1;
}
}
#endif

Expand Down

0 comments on commit ca55684

Please sign in to comment.