Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2010-04-01 22:33:37 +0400
committerJeff Johnston <jjohnstn@redhat.com>2010-04-01 22:33:37 +0400
commitc1bfa897da72bb555650e021e90b1b929a66d69c (patch)
treea9b8d9f4bb8331d2da267d2a7d0858456f09d06b /newlib/libc/include/sched.h
parent7e53fcbc29e360ef35278411899ac0b049cd8662 (diff)
2010-04-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sched.h: Include prototypes for sched_* methods. * libc/include/sys/sched.h: Update to POSIX 1003.1b-2008. Rework constants to allow sharing between RTEMS and Cygwin.
Diffstat (limited to 'newlib/libc/include/sched.h')
-rw-r--r--newlib/libc/include/sched.h85
1 files changed, 84 insertions, 1 deletions
diff --git a/newlib/libc/include/sched.h b/newlib/libc/include/sched.h
index a59a0f4ba..504ad5274 100644
--- a/newlib/libc/include/sched.h
+++ b/newlib/libc/include/sched.h
@@ -1,11 +1,94 @@
+/*
+ * Written by Joel Sherrill <joel@OARcorp.com>.
+ *
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software.
+ *
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION
+ * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
+ * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+ *
+ * $Id$
+ */
+
#ifndef _SCHED_H_
#define _SCHED_H_
+#include <sys/types.h>
+#include <sys/sched.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <sys/sched.h>
+#if defined(_POSIX_PRIORITY_SCHEDULING)
+/*
+ * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803
+ */
+int sched_setparam(
+ pid_t __pid,
+ const struct sched_param *__param
+);
+
+/*
+ * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800
+ */
+int sched_getparam(
+ pid_t __pid,
+ struct sched_param *__param
+);
+
+/*
+ * XBD 13 - Set Scheduling Policy and Scheduling Parameters,
+ * P1003.1b-2008, p. 1805
+ */
+int sched_setscheduler(
+ pid_t __pid,
+ int __policy,
+ const struct sched_param *__param
+);
+
+/*
+ * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801
+ */
+int sched_getscheduler(
+ pid_t __pid
+);
+
+/*
+ * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799
+ */
+int sched_get_priority_max(
+ int __policy
+);
+
+int sched_get_priority_min(
+ int __policy
+);
+
+/*
+ * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802
+ */
+int sched_rr_get_interval(
+ pid_t __pid,
+ struct timespec *__interval
+);
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+
+#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING)
+
+/*
+ * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807
+ */
+int sched_yield( void );
+
+#endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */
#ifdef __cplusplus
}