brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 597789b Raw
38 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H10#define LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H11 12// Definitions of SCHED_* macros must match was linux as at:13// https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/sched.h14 15// Posix required16#define SCHED_OTHER 017#define SCHED_FIFO 118#define SCHED_RR 219 20// Linux extentions21#define SCHED_BATCH 322#define SCHED_ISO 4 // Not yet implemented, reserved.23#define SCHED_IDLE 524#define SCHED_DEADLINE 625 26#define CPU_SETSIZE __CPU_SETSIZE27#define NCPUBITS __NCPUBITS28#define CPU_COUNT_S(setsize, set) __sched_getcpucount(setsize, set)29#define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t), set)30#define CPU_ZERO_S(setsize, set) __sched_setcpuzero(setsize, set)31#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t), set)32#define CPU_SET_S(cpu, setsize, set) __sched_setcpuset(cpu, setsize, set)33#define CPU_SET(cpu, setsize, set) CPU_SET_S(cpu, sizeof(cpt_set_t), set)34#define CPU_ISSET_S(cpu, setsize, set) __sched_getcpuisset(cpu, setsize, set)35#define CPU_ISSET(cpu, setsize, set) CPU_ISSET_S(cpu, sizeof(cpt_set_t), set)36 37#endif // LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H38