|
|
@ -68,14 +68,6 @@ __thread uint64_t rwr_lock_cnt;
|
|
|
|
#include <sys/cpuset.h>
|
|
|
|
#include <sys/cpuset.h>
|
|
|
|
#include <sys/thr.h>
|
|
|
|
#include <sys/thr.h>
|
|
|
|
#define cpu_set_t cpuset_t
|
|
|
|
#define cpu_set_t cpuset_t
|
|
|
|
#elif OS_DARWIN
|
|
|
|
|
|
|
|
#include <mach/mach.h>
|
|
|
|
|
|
|
|
#include <mach/mach_init.h>
|
|
|
|
|
|
|
|
#include <mach/thread_policy.h>
|
|
|
|
|
|
|
|
#define cpu_set_t thread_affinity_policy_data_t
|
|
|
|
|
|
|
|
#define CPU_SET(cpu_id, new_mask) ((*(new_mask)).affinity_tag = ((cpu_id) + 1))
|
|
|
|
|
|
|
|
#define CPU_ISSET(cpu_id, new_mask) (((*(new_mask)).affinity_tag == ((cpu_id) + 1)))
|
|
|
|
|
|
|
|
#define CPU_ZERO(new_mask) ((*(new_mask)).affinity_tag = THREAD_AFFINITY_TAG_NULL)
|
|
|
|
|
|
|
|
#endif /* OS_FREEBSD */
|
|
|
|
#endif /* OS_FREEBSD */
|
|
|
|
|
|
|
|
|
|
|
|
/* prototypes */
|
|
|
|
/* prototypes */
|
|
|
|