summaryrefslogtreecommitdiff
path: root/newlib/libc/sys/rtems/sys/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/rtems/sys/sched.h')
-rw-r--r--newlib/libc/sys/rtems/sys/sched.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/newlib/libc/sys/rtems/sys/sched.h b/newlib/libc/sys/rtems/sys/sched.h
new file mode 100644
index 00000000000..16cee13c739
--- /dev/null
+++ b/newlib/libc/sys/rtems/sys/sched.h
@@ -0,0 +1,56 @@
+/*
+ * $Id$
+ */
+
+
+#ifndef __POSIX_SYS_SCHEDULING_h
+#define __POSIX_SYS_SCHEDULING_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/features.h>
+
+#include <sys/types.h>
+#include <sys/time.h>
+
+/*
+ * 13.2 Scheduling Policies, P1003.1b-1993, p. 250
+ *
+ * NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34.
+ */
+
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+#if defined(_POSIX_SPORADIC_SERVER)
+#define SCHED_SPORADIC 3
+#endif
+
+/*
+ * 13.1 Scheduling Parameters, P1003.1b-1993, p. 249
+ *
+ * NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33.
+ */
+
+struct sched_param {
+ int sched_priority; /* Process execution scheduling priority */
+
+#if defined(_POSIX_SPORADIC_SERVER)
+ int ss_low_priority; /* Low scheduling priority for sporadic */
+ /* server */
+ struct timespec ss_replenish_period;
+ /* Replenishment period for sporadic server */
+ struct timespec ss_initial_budget; /* Initial budget for sporadic server */
+#endif
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+