]> git.ipfire.org Git - thirdparty/glibc.git/blame - posix/sched.h
Sun Apr 28 14:14:35 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[thirdparty/glibc.git] / posix / sched.h
CommitLineData
7b3547eb
RM
1/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
2Copyright (C) 1996 Free Software Foundation, Inc.
3This file is part of the GNU C Library.
4
5The GNU C Library is free software; you can redistribute it and/or
6modify it under the terms of the GNU Library General Public License as
7published by the Free Software Foundation; either version 2 of the
8License, or (at your option) any later version.
9
10The GNU C Library is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13Library General Public License for more details.
14
15You should have received a copy of the GNU Library General Public
16License along with the GNU C Library; see the file COPYING.LIB. If
17not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18Boston, MA 02111-1307, USA. */
19
20#ifndef _SCHED_H
21#define _SCHED_H 1
22
23#include <features.h>
24
25/* Get type definitions. */
26#include <gnu/types.h>
27#include <sys/time.h> /* for struct timespec */
28
29/* Get system specific constant and data structure definitions. */
30#include <schedbits.h>
31
32__BEGIN_DECLS
33
34/* Set scheduling parameters for a process. */
35extern int __sched_setparam __P ((__pid_t __pid,
36 __const struct sched_param *__param));
37extern int sched_setparam __P ((__pid_t __pid,
38 __const struct sched_param *__param));
39
40/* Retrieve scheduling parameters for a particular process. */
41extern int __sched_getparam __P ((__pid_t __pid, struct sched_param *__param));
42extern int sched_getparam __P ((__pid_t __pid, struct sched_param *__param));
43
44/* Set scheduling algorithm and/or parameters for a process. */
45extern int __sched_setscheduler __P ((__pid_t __pid, int __policy,
46 __const struct sched_param *__param));
47extern int sched_setscheduler __P ((__pid_t __pid, int __policy,
48 __const struct sched_param *__param));
49
50/* Retrieve scheduling algorithm for a particular purpose. */
51extern int __sched_getscheduler __P ((__pid_t __pid));
52extern int sched_getscheduler __P ((__pid_t __pid));
53
54/* Yield the processor. */
55extern int __sched_yield __P ((void));
56extern int sched_yield __P ((void));
57
58/* Get maximum priority value for a scheduler. */
59extern int __sched_get_priority_max __P ((int __algorithm));
60extern int sched_get_priority_max __P ((int __algorithm));
61
62/* Get minimum priority value for a scheduler. */
63extern int __sched_get_priority_min __P ((int __algorithm));
64extern int sched_get_priority_min __P ((int __algorithm));
65
66/* Get the SCHED_RR interval for the named process. */
67extern int __sched_rr_get_interval __P ((__pid_t __pid, struct timespec *__t));
68extern int sched_rr_get_interval __P ((__pid_t __pid, struct timespec *__t));
69
70__END_DECLS
71
72#endif /* sched.h */