1 //===-- Definition of macros from sched.h ---------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H 10 #define LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H 11 12 // Definitions of SCHED_* macros must match was linux as at: 13 // https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/sched.h 14 15 // Posix required 16 #define SCHED_OTHER 0 17 #define SCHED_FIFO 1 18 #define SCHED_RR 2 19 20 // Linux extentions 21 #define SCHED_BATCH 3 22 #define SCHED_ISO 4 // Not yet implemented, reserved. 23 #define SCHED_IDLE 5 24 #define SCHED_DEADLINE 6 25 26 #define CPU_COUNT_S(setsize, set) __sched_getcpucount(setsize, set) 27 #define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t), set) 28 29 #endif // LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H 30