From 55d4602d22dc7d8fb274df3abeb19b2d16230ff1 Mon Sep 17 00:00:00 2001
From: bje <bje>
Date: Thu, 23 Jul 1998 14:23:46 +0000
Subject: 1998-07-24  Ben Elliston  <bje@cygnus.com>

	* sched.c: New file.
---
 sched.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 sched.c

diff --git a/sched.c b/sched.c
new file mode 100644
index 0000000..b4cbc0d
--- /dev/null
+++ b/sched.c
@@ -0,0 +1,45 @@
+/*
+ * sched.c
+ * 
+ * Description:
+ * POSIX thread functions that deal with thread scheduling.
+ */
+
+#include "pthread.h"
+
+int
+pthread_attr_setschedparam(pthread_attr_t *attr,
+			   const struct sched_param *param)
+{
+  if (is_attr(attr) != 0 || param == NULL)
+    {
+      return EINVAL;
+    }
+
+  attr->priority = param->sched_priority;
+  return 0;
+}
+
+int pthread_attr_getschedparam(const pthread_attr_t *attr,
+			       struct sched_param *param)
+{
+  if (is_attr(attr) != 0 || param == NULL)
+    {
+      return EINVAL;
+    }
+  
+  param->sched_priority = attr->priority;
+  return 0;
+}
+
+int sched_get_priority_max(int policy)
+{
+  /* This is independent of scheduling policy in Win32. */
+  return THREAD_PRIORITY_HIGHEST;
+}
+
+int sched_get_priority_min(int policy)
+{
+  /* This is independent of scheduling policy in Win32. */
+  return THREAD_PRIORITY_LOWEST;
+}
-- 
cgit v1.2.3