Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/thread/src/TPosixThread.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ Int_t TPosixThread::Run(TThread *th, const int affinity)
pthread_attr_init(attr);

if (affinity >= 0) {
#ifdef R__MACOSX
Warning("Run", "Affinity setting not yet implemented on MacOS");
#else
#ifdef __GLIBC__
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
CPU_SET(affinity, &cpuset);
pthread_attr_setaffinity_np(attr, sizeof(cpu_set_t), &cpuset);
#else
Warning("Run", "Affinity setting not yet implemented on this platform");
#endif
}

Expand Down