blob: f0ebeb533a8505702e3a11f43d20b2b5234711c8 [file] [log] [blame]
Elliott Hughes13da6002025-02-03 10:42:13 -08001// Copyright (C) 2017 The Android Open Source Project
2// SPDX-License-Identifier: BSD-2-Clause
Elliott Hughes21b56eb2017-10-20 17:57:17 -07003
4#if !defined(DO_NOT_INCLUDE_SCHED_H)
5#include <sched.h>
6#endif
7
8#include "header_checks.h"
9
10static void sched_h() {
11 TYPE(pid_t);
12 TYPE(time_t);
13 TYPE(struct timespec);
14
15 TYPE(struct sched_param);
16 STRUCT_MEMBER(struct sched_param, int, sched_priority);
17#if !defined(__linux__)
18 STRUCT_MEMBER(struct sched_param, int, sched_ss_low_priority);
19 STRUCT_MEMBER(struct sched_param, struct timespec, sched_ss_repl_period);
20 STRUCT_MEMBER(struct sched_param, struct timespec, sched_ss_init_budget);
21 STRUCT_MEMBER(struct sched_param, int, sched_ss_max_repl);
22#endif
23
24 MACRO(SCHED_FIFO);
25 MACRO(SCHED_RR);
26#if !defined(__linux__)
27 MACRO(SCHED_SPORADIC);
28#endif
29 MACRO(SCHED_OTHER);
30
31 FUNCTION(sched_get_priority_max, int (*f)(int));
32 FUNCTION(sched_get_priority_min, int (*f)(int));
33 FUNCTION(sched_getparam, int (*f)(pid_t, struct sched_param*));
34 FUNCTION(sched_getscheduler, int (*f)(pid_t));
35 FUNCTION(sched_rr_get_interval, int (*f)(pid_t, struct timespec*));
36 FUNCTION(sched_setparam, int (*f)(pid_t, const struct sched_param*));
37 FUNCTION(sched_setscheduler, int (*f)(pid_t, int, const struct sched_param*));
38 FUNCTION(sched_yield, int (*f)(void));
39}