diff options
author | Christopher Faylor <me@cgf.cx> | 2001-03-21 14:00:29 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-03-21 14:00:29 +0000 |
commit | 6b2a2aa4af1e76e0784faebc39526fbb1081adaa (patch) | |
tree | dcb53813a7758348984374b3ac33512dd6179be9 /winsup/cygwin/include | |
parent | 9a08b2c02eea0c955c5fef0b0287803947fef0b6 (diff) | |
download | cygnal-6b2a2aa4af1e76e0784faebc39526fbb1081adaa.tar.gz cygnal-6b2a2aa4af1e76e0784faebc39526fbb1081adaa.tar.bz2 cygnal-6b2a2aa4af1e76e0784faebc39526fbb1081adaa.zip |
Add missing files.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/sched.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/winsup/cygwin/include/sched.h b/winsup/cygwin/include/sched.h new file mode 100644 index 000000000..8b8e277e6 --- /dev/null +++ b/winsup/cygwin/include/sched.h @@ -0,0 +1,53 @@ +/* sched.h: scheduler interface for Cygwin + + Copyright 2001 Red Hat, Inc. + + Written by Robert Collins <rbtcollins@hotmail.com> + + This file is part of Cygwin. + + This software is a copyrighted work licensed under the terms of the + Cygwin license. Please consult the file "CYGWIN_LICENSE" for + details. */ + +/* Written from the opengroup specifications */ + +#ifndef _SCHED_H +#define _SCHED_H +#include <time.h> + +/* we return -1 and set errno on failure */ +#define SCHED_FIFO 1 +#define SCHED_RR 2 +#define SCHED_OTHER 3 + +struct sched_param +{ + int sched_priority; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +/* max priority for policy */ + int sched_get_priority_max (int); +/* min priority for policy */ + int sched_get_priority_min (int); +/* get sched params for process */ + int sched_getparam (pid_t, struct sched_param *); +/* get the scheduler for pid */ + int sched_getscheduler (pid_t); +/* get the time quantum for pid */ + int sched_rr_get_interval (pid_t, struct timespec *); +/* set the scheduling parameters */ + int sched_setparam (pid_t, const struct sched_param *); +/* set the scheduler */ + int sched_setscheduler (pid_t, int, const struct sched_param *); +/* yield the cpu */ + int sched_yield (void); + +#ifdef __cplusplus +} +#endif +#endif /* _SCHED_H */ |