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/_timespec.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /* Scheduling Policies */
31 /* Open Group Specifications Issue 6 */
32 #if defined(__CYGWIN__)
33 #define SCHED_OTHER    3
34 #else
35 #define SCHED_OTHER    0
36 #endif
37 
38 #define SCHED_FIFO     1
39 #define SCHED_RR       2
40 
41 #if defined(_POSIX_SPORADIC_SERVER)
42 #define SCHED_SPORADIC 4
43 #endif
44 
45 /* Scheduling Parameters */
46 /* Open Group Specifications Issue 6 */
47 
48 struct sched_param {
49   int sched_priority;           /* Process execution scheduling priority */
50 
51 #if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER)
52   int sched_ss_low_priority;    /* Low scheduling priority for sporadic */
53                                 /*   server */
54   struct timespec sched_ss_repl_period;
55                                 /* Replenishment period for sporadic server */
56   struct timespec sched_ss_init_budget;
57                                /* Initial budget for sporadic server */
58   int sched_ss_max_repl;       /* Maximum pending replenishments for */
59                                /* sporadic server */
60 #endif
61 };
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif
68 /* end of include file */
69 
70