1 /* sched.h: scheduler interface for Cygwin
3 Copyright 2001 Red Hat, Inc.
5 Written by Robert Collins <rbtcollins@hotmail.com>
7 This file is part of Cygwin.
9 This software is a copyrighted work licensed under the terms of the
10 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
13 /* Written from the opengroup specifications */
19 /* we return -1 and set errno on failure */
33 /* max priority for policy */
34 int sched_get_priority_max (int);
35 /* min priority for policy */
36 int sched_get_priority_min (int);
37 /* get sched params for process */
38 int sched_getparam (pid_t
, struct sched_param
*);
39 /* get the scheduler for pid */
40 int sched_getscheduler (pid_t
);
41 /* get the time quantum for pid */
42 int sched_rr_get_interval (pid_t
, struct timespec
*);
43 /* set the scheduling parameters */
44 int sched_setparam (pid_t
, const struct sched_param
*);
45 /* set the scheduler */
46 int sched_setscheduler (pid_t
, int, const struct sched_param
*);
48 int sched_yield (void);
50 #if defined(__INSIDE_CYGWIN__) || defined(__INSIDE_MSYS__)
51 /* These are private helper functions used to calculate scheduler settings and
52 * validate parameters */
54 /* check parameters for validity */
55 int valid_sched_parameters(const struct sched_param
*);
56 /* set a single thread's priority */
57 int sched_set_thread_priority(HANDLE thread
, int priority
);
59 #endif /* __INSIDE_CYGWIN__ || __INSIDE_MSYS__*/