loader: Remove d_type from devdesc.
[unleashed.git] / include / sched.h
blob5eed5fb3714382c980755c383c3741883457709e
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
29 #ifndef _SCHED_H
30 #define _SCHED_H
32 #include <sys/types.h>
33 #include <time.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 struct sched_param {
40 int sched_priority; /* scheduling priority */
41 int sched_pad[8];
45 * POSIX scheduling policies
47 #define SCHED_OTHER 0 /* traditional time-sharing scheduling class */
48 #define SCHED_FIFO 1 /* real-time class: run to completion */
49 #define SCHED_RR 2 /* real-time class: round-robin */
50 #define SCHED_SYS 3 /* system scheduling class */
51 #define SCHED_IA 4 /* interactive time-sharing class */
52 #define SCHED_FSS 5 /* fair-share scheduling class */
53 #define SCHED_FX 6 /* fixed-priority scheduling class */
54 #define _SCHED_NEXT 7 /* first unassigned policy number */
57 * function prototypes
59 int sched_getparam(pid_t, struct sched_param *);
60 int sched_setparam(pid_t, const struct sched_param *);
61 int sched_getscheduler(pid_t);
62 int sched_setscheduler(pid_t, int, const struct sched_param *);
63 int sched_yield(void);
64 int sched_get_priority_max(int);
65 int sched_get_priority_min(int);
66 int sched_rr_get_interval(pid_t, struct timespec *);
68 #ifdef __cplusplus
70 #endif
72 #endif /* _SCHED_H */