1 /*
2  *  Written by Joel Sherrill <joel@OARcorp.com>.
3  *
4  *  COPYRIGHT (c) 1989-2010.
5  *  On-Line Applications Research Corporation (OAR).
6  *
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.
11  *
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.
16  *
17  *  $Id$
18  */
19 
20 
21 #ifndef _SYS_SCHED_H_
22 #define _SYS_SCHED_H_
23 
24 #include <sys/cdefs.h>
25 #include <sys/_types.h>
26 #include <sys/_timespec.h>
27 
28 _BEGIN_STD_C
29 
30 /* Scheduling Policies */
31 /* Open Group Specifications Issue 6 */
32 #define SCHED_OTHER    0
33 
34 #define SCHED_FIFO     1
35 #define SCHED_RR       2
36 
37 #if defined(_POSIX_SPORADIC_SERVER)
38 #define SCHED_SPORADIC 4
39 #endif
40 
41 /* Scheduling Parameters */
42 /* Open Group Specifications Issue 6 */
43 
44 struct sched_param {
45   int sched_priority;           /* Process execution scheduling priority */
46 
47 #if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER)
48   int sched_ss_low_priority;    /* Low scheduling priority for sporadic */
49                                 /*   server */
50   struct timespec sched_ss_repl_period;
51                                 /* Replenishment period for sporadic server */
52   struct timespec sched_ss_init_budget;
53                                /* Initial budget for sporadic server */
54   int sched_ss_max_repl;       /* Maximum pending replenishments for */
55                                /* sporadic server */
56 #endif
57 };
58 
59 _END_STD_C
60 
61 #endif
62 /* end of include file */
63 
64