We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c10f373 commit ca55684Copy full SHA for ca55684
common/sys/thread.cpp
@@ -184,20 +184,6 @@ namespace embree
184
if (pthread_setaffinity_np(pthread_self(), sizeof(cset), &cset) != 0)
185
std::cerr << "Thread: cannot set affinity" << std::endl;
186
}
187
-
188
- ssize_t getThreadAffinity(pthread_t pth)
189
- {
190
- cpu_set_t cset;
191
- CPU_ZERO(&cset);
192
- int error = pthread_getaffinity_np(pth, sizeof(cset), &cset);
193
- if (error != 0) perror("pthread_getaffinity_np");
194
195
- for (int j=0; j<CPU_COUNT(&cset); j++)
196
- if (CPU_ISSET(j, &cset))
197
- return j;
198
199
- return -1;
200
- }
201
202
#endif
203
0 commit comments