]>
Commit | Line | Data |
---|---|---|
7b3547eb | 1 | /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. |
4a2c9975 | 2 | Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc. |
7e3be507 UD |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Library General Public License as | |
7 | published by the Free Software Foundation; either version 2 of the | |
8 | License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Library General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Library General Public | |
16 | License along with the GNU C Library; see the file COPYING.LIB. If not, | |
17 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
18 | Boston, MA 02111-1307, USA. */ | |
7b3547eb RM |
19 | |
20 | #ifndef _SCHED_H | |
21 | #define _SCHED_H 1 | |
22 | ||
23 | #include <features.h> | |
24 | ||
25 | /* Get type definitions. */ | |
5107cf1d | 26 | #include <bits/types.h> |
b9b49b44 UD |
27 | |
28 | #define __need_timespec | |
29 | #include <time.h> | |
7b3547eb RM |
30 | |
31 | /* Get system specific constant and data structure definitions. */ | |
5107cf1d | 32 | #include <bits/sched.h> |
4a2c9975 UD |
33 | /* Define the real names for the elements of `struct sched_param'. */ |
34 | #define sched_priority __sched_priority | |
35 | ||
7b3547eb RM |
36 | |
37 | __BEGIN_DECLS | |
38 | ||
39 | /* Set scheduling parameters for a process. */ | |
c1422e5b UD |
40 | extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) |
41 | __THROW; | |
7b3547eb RM |
42 | |
43 | /* Retrieve scheduling parameters for a particular process. */ | |
c1422e5b | 44 | extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW; |
7b3547eb RM |
45 | |
46 | /* Set scheduling algorithm and/or parameters for a process. */ | |
c1422e5b UD |
47 | extern int sched_setscheduler (__pid_t __pid, int __policy, |
48 | __const struct sched_param *__param) __THROW; | |
7b3547eb RM |
49 | |
50 | /* Retrieve scheduling algorithm for a particular purpose. */ | |
c1422e5b | 51 | extern int sched_getscheduler (__pid_t __pid) __THROW; |
7b3547eb RM |
52 | |
53 | /* Yield the processor. */ | |
c1422e5b | 54 | extern int sched_yield (void) __THROW; |
7b3547eb RM |
55 | |
56 | /* Get maximum priority value for a scheduler. */ | |
c1422e5b | 57 | extern int sched_get_priority_max (int __algorithm) __THROW; |
7b3547eb RM |
58 | |
59 | /* Get minimum priority value for a scheduler. */ | |
c1422e5b | 60 | extern int sched_get_priority_min (int __algorithm) __THROW; |
7b3547eb RM |
61 | |
62 | /* Get the SCHED_RR interval for the named process. */ | |
c1422e5b | 63 | extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW; |
7b3547eb RM |
64 | |
65 | __END_DECLS | |
66 | ||
67 | #endif /* sched.h */ |