• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define _GNU_SOURCE 1
2 #include <sched.h>
3 #include <malloc.h>
4 
__sched_cpualloc(size_t count)5 cpu_set_t* __sched_cpualloc(size_t count)
6 {
7     // The static analyzer complains that CPU_ALLOC_SIZE eventually expands to
8     // N * sizeof(unsigned long), which is incompatible with cpu_set_t. This is
9     // on purpose.
10     return (cpu_set_t*) malloc(CPU_ALLOC_SIZE(count)); // NOLINT
11 }
12