Path: blob/main/contrib/llvm-project/libc/include/llvm-libc-macros/linux/sched-macros.h
213799 views
//===-- Definition of macros from sched.h ---------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H9#define LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H1011// Definitions of SCHED_* macros must match was linux as at:12// https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/sched.h1314// Posix required15#define SCHED_OTHER 016#define SCHED_FIFO 117#define SCHED_RR 21819// Linux extentions20#define SCHED_BATCH 321#define SCHED_ISO 4 // Not yet implemented, reserved.22#define SCHED_IDLE 523#define SCHED_DEADLINE 62425#define CPU_SETSIZE __CPU_SETSIZE26#define NCPUBITS __NCPUBITS27#define CPU_COUNT_S(setsize, set) __sched_getcpucount(setsize, set)28#define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t), set)29#define CPU_ZERO_S(setsize, set) __sched_setcpuzero(setsize, set)30#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t), set)31#define CPU_SET_S(cpu, setsize, set) __sched_setcpuset(cpu, setsize, set)32#define CPU_SET(cpu, setsize, set) CPU_SET_S(cpu, sizeof(cpt_set_t), set)33#define CPU_ISSET_S(cpu, setsize, set) __sched_getcpuisset(cpu, setsize, set)34#define CPU_ISSET(cpu, setsize, set) CPU_ISSET_S(cpu, sizeof(cpt_set_t), set)3536#endif // LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H373839