Cygwin: Add new APIs tc[gs]etwinsize()
[newlib-cygwin.git] / newlib / libc / include / sys / sched.h
blob95509dbf06030af6949f254541c566b34f27c854
1 /*
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.
17 * $Id$
21 #ifndef _SYS_SCHED_H_
22 #define _SYS_SCHED_H_
24 #include <sys/_timespec.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
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
38 #define SCHED_FIFO 1
39 #define SCHED_RR 2
41 #if defined(_POSIX_SPORADIC_SERVER)
42 #define SCHED_SPORADIC 4
43 #endif
45 #if __GNU_VISIBLE
46 #define SCHED_IDLE 5
47 #define SCHED_BATCH 6
49 /* Flag to drop realtime policies and negative nice values on fork(). */
50 #define SCHED_RESET_ON_FORK 0x40000000
51 #endif
53 /* Scheduling Parameters */
54 /* Open Group Specifications Issue 6 */
56 struct sched_param {
57 int sched_priority; /* Process execution scheduling priority */
59 #if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER)
60 int sched_ss_low_priority; /* Low scheduling priority for sporadic */
61 /* server */
62 struct timespec sched_ss_repl_period;
63 /* Replenishment period for sporadic server */
64 struct timespec sched_ss_init_budget;
65 /* Initial budget for sporadic server */
66 int sched_ss_max_repl; /* Maximum pending replenishments for */
67 /* sporadic server */
68 #endif
71 #ifdef __cplusplus
73 #endif
75 #endif
76 /* end of include file */