17 #ifndef HWLOC_GLIBC_SCHED_H
18 #define HWLOC_GLIBC_SCHED_H
21 #include <hwloc/helper.h>
24 #if !defined _GNU_SOURCE || !defined _SCHED_H || (!defined CPU_SETSIZE && !defined sched_priority)
25 #error Please make sure to include sched.h before including glibc-sched.h, and define _GNU_SOURCE before any inclusion of sched.h
34 #ifdef HWLOC_HAVE_CPU_SET
51 cpu_set_t *schedset, size_t schedsetsize)
55 CPU_ZERO_S(schedsetsize, schedset);
57 CPU_SET_S(cpu, schedsetsize, schedset);
62 assert(schedsetsize == sizeof(cpu_set_t));
64 CPU_SET(cpu, schedset);
79 const cpu_set_t *schedset, size_t schedsetsize)
86 count = CPU_COUNT_S(schedsetsize, schedset);
89 if (CPU_ISSET_S(cpu, schedsetsize, schedset)) {
100 assert(schedsetsize == sizeof(cpu_set_t));
101 for(cpu=0; cpu<CPU_SETSIZE; cpu++)
102 if (CPU_ISSET(cpu, schedset))
|
|