mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
hsbench: cpuset portability
This commit is contained in:
parent
79b42cff58
commit
f739314696
@ -125,10 +125,10 @@ public:
|
||||
// Apply processor affinity (if available) to this thread.
|
||||
bool affine(UNUSED int cpu) {
|
||||
#ifdef HAVE_DECL_PTHREAD_SETAFFINITY_NP
|
||||
#if defined(__linux__)
|
||||
cpu_set_t cpuset;
|
||||
#else // BSD
|
||||
#if defined(__FreeBSD__)
|
||||
cpuset_t cpuset;
|
||||
#else
|
||||
cpu_set_t cpuset;
|
||||
#endif
|
||||
CPU_ZERO(&cpuset);
|
||||
assert(cpu >= 0 && cpu < CPU_SETSIZE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user