2 * Written by Joel Sherrill <joel@OARcorp.com>.
4 * COPYRIGHT (c) 1989-2010.
5 * On-Line Applications Research Corporation (OAR).
7 * Permission to use, copy, modify, and distribute this software for any
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
10 * or modification of this software.
12 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
13 * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION
14 * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
15 * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
23 #include <sys/types.h>
24 #include <sys/sched.h>
30 #if defined(_POSIX_PRIORITY_SCHEDULING)
32 * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803
36 const struct sched_param
*__param
40 * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800
44 struct sched_param
*__param
48 * XBD 13 - Set Scheduling Policy and Scheduling Parameters,
49 * P1003.1b-2008, p. 1805
51 int sched_setscheduler(
54 const struct sched_param
*__param
58 * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801
60 int sched_getscheduler(
65 * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799
67 int sched_get_priority_max(
71 int sched_get_priority_min(
76 * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802
78 int sched_rr_get_interval(
80 struct timespec
*__interval
82 #endif /* _POSIX_PRIORITY_SCHEDULING */
84 #if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING)
87 * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807
89 int sched_yield( void );
91 #endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */
94 int sched_getcpu(void);
96 /* The following functions should only be declared if the type
97 cpu_set_t is defined through indirect inclusion of sys/cpuset.h,
98 only available on some targets. */
100 int sched_getaffinity (pid_t
, size_t, cpu_set_t
*);
101 int sched_get_thread_affinity (void *, size_t, cpu_set_t
*);
102 int sched_setaffinity (pid_t
, size_t, const cpu_set_t
*);
103 int sched_set_thread_affinity (void *, size_t, const cpu_set_t
*);
104 #endif /* _SYS_CPUSET_H_ */
112 #endif /* _SCHED_H_ */