Rev 4874 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4874 | Rev 6099 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Written by Joel Sherrill |
2 | * Written by Joel Sherrill |
3 | * |
3 | * |
4 | * COPYRIGHT (c) 1989-2010. |
4 | * COPYRIGHT (c) 1989-2010. |
5 | * On-Line Applications Research Corporation (OAR). |
5 | * On-Line Applications Research Corporation (OAR). |
6 | * |
6 | * |
7 | * Permission to use, copy, modify, and distribute this software for any |
7 | * Permission to use, copy, modify, and distribute this software for any |
8 | * purpose without fee is hereby granted, provided that this entire notice |
8 | * purpose without fee is hereby granted, provided that this entire notice |
9 | * is included in all copies of any software which is or includes a copy |
9 | * is included in all copies of any software which is or includes a copy |
10 | * or modification of this software. |
10 | * or modification of this software. |
11 | * |
11 | * |
12 | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED |
12 | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED |
13 | * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION |
13 | * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION |
14 | * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS |
14 | * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS |
15 | * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. |
15 | * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. |
16 | * |
16 | * |
17 | * $Id: sched.h,v 1.2 2010/04/01 18:33:33 jjohnstn Exp $ |
17 | * $Id$ |
18 | */ |
18 | */ |
19 | 19 | ||
20 | #ifndef _SCHED_H_ |
20 | #ifndef _SCHED_H_ |
21 | #define _SCHED_H_ |
21 | #define _SCHED_H_ |
22 | 22 | ||
23 | #include |
23 | #include |
24 | #include |
24 | #include |
25 | 25 | ||
26 | #ifdef __cplusplus |
26 | #ifdef __cplusplus |
27 | extern "C" { |
27 | extern "C" { |
28 | #endif |
28 | #endif |
29 | 29 | ||
30 | #if defined(_POSIX_PRIORITY_SCHEDULING) |
30 | #if defined(_POSIX_PRIORITY_SCHEDULING) |
31 | /* |
31 | /* |
32 | * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803 |
32 | * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803 |
33 | */ |
33 | */ |
34 | int sched_setparam( |
34 | int sched_setparam( |
35 | pid_t __pid, |
35 | pid_t __pid, |
36 | const struct sched_param *__param |
36 | const struct sched_param *__param |
37 | ); |
37 | ); |
38 | 38 | ||
39 | /* |
39 | /* |
40 | * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800 |
40 | * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800 |
41 | */ |
41 | */ |
42 | int sched_getparam( |
42 | int sched_getparam( |
43 | pid_t __pid, |
43 | pid_t __pid, |
44 | struct sched_param *__param |
44 | struct sched_param *__param |
45 | ); |
45 | ); |
46 | 46 | ||
47 | /* |
47 | /* |
48 | * XBD 13 - Set Scheduling Policy and Scheduling Parameters, |
48 | * XBD 13 - Set Scheduling Policy and Scheduling Parameters, |
49 | * P1003.1b-2008, p. 1805 |
49 | * P1003.1b-2008, p. 1805 |
50 | */ |
50 | */ |
51 | int sched_setscheduler( |
51 | int sched_setscheduler( |
52 | pid_t __pid, |
52 | pid_t __pid, |
53 | int __policy, |
53 | int __policy, |
54 | const struct sched_param *__param |
54 | const struct sched_param *__param |
55 | ); |
55 | ); |
56 | 56 | ||
57 | /* |
57 | /* |
58 | * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801 |
58 | * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801 |
59 | */ |
59 | */ |
60 | int sched_getscheduler( |
60 | int sched_getscheduler( |
61 | pid_t __pid |
61 | pid_t __pid |
62 | ); |
62 | ); |
63 | 63 | ||
64 | /* |
64 | /* |
65 | * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799 |
65 | * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799 |
66 | */ |
66 | */ |
67 | int sched_get_priority_max( |
67 | int sched_get_priority_max( |
68 | int __policy |
68 | int __policy |
69 | ); |
69 | ); |
70 | 70 | ||
71 | int sched_get_priority_min( |
71 | int sched_get_priority_min( |
72 | int __policy |
72 | int __policy |
73 | ); |
73 | ); |
74 | 74 | ||
75 | /* |
75 | /* |
76 | * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802 |
76 | * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802 |
77 | */ |
77 | */ |
78 | int sched_rr_get_interval( |
78 | int sched_rr_get_interval( |
79 | pid_t __pid, |
79 | pid_t __pid, |
80 | struct timespec *__interval |
80 | struct timespec *__interval |
81 | ); |
81 | ); |
82 | #endif /* _POSIX_PRIORITY_SCHEDULING */ |
82 | #endif /* _POSIX_PRIORITY_SCHEDULING */ |
83 | 83 | ||
84 | #if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) |
84 | #if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) |
85 | 85 | ||
86 | /* |
86 | /* |
87 | * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807 |
87 | * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807 |
88 | */ |
88 | */ |
89 | int sched_yield( void ); |
89 | int sched_yield( void ); |
90 | 90 | ||
91 | #endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */ |
91 | #endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */ |
92 | 92 | ||
93 | #ifdef __cplusplus |
93 | #ifdef __cplusplus |
94 | } |
94 | } |
95 | #endif |
95 | #endif |
96 | 96 | ||
97 | #endif /* _SCHED_H_ */ |
97 | #endif /* _SCHED_H_ */ |