[rtems commit] posix: sched_get_priority_min()

Sebastian Huber sebh at rtems.org
Tue Jun 14 10:10:08 UTC 2016


Module:    rtems
Branch:    master
Commit:    ea02782abcaa1de2cdff715443564eaae7d49c51
Changeset: http://git.rtems.org/rtems/commit/?id=ea02782abcaa1de2cdff715443564eaae7d49c51

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jun 14 11:12:19 2016 +0200

posix: sched_get_priority_min()

Enable for all configurations since it pulls in no additional
dependencies.

---

 cpukit/posix/Makefile.am                  | 4 +++-
 testsuites/smptests/smpscheduler02/init.c | 7 ++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 461e6eb..a119bd0 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -208,10 +208,12 @@ libposix_a_SOURCES += src/psxnametoid.c
 EXTRA_DIST += src/README.mqueue
 
 libposix_a_SOURCES += src/sched_getparam.c src/sched_getprioritymax.c \
-    src/sched_getprioritymin.c src/sched_getscheduler.c \
+    src/sched_getscheduler.c \
     src/sched_rr_get_interval.c src/sched_setparam.c \
     src/sched_setscheduler.c src/sched_yield.c
 endif
 
+libposix_a_SOURCES += src/sched_getprioritymin.c
+
 include $(srcdir)/preinstall.am
 include $(top_srcdir)/automake/local.am
diff --git a/testsuites/smptests/smpscheduler02/init.c b/testsuites/smptests/smpscheduler02/init.c
index 40a481c..c7fe053 100644
--- a/testsuites/smptests/smpscheduler02/init.c
+++ b/testsuites/smptests/smpscheduler02/init.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2014, 2016 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Dornierstr. 4
@@ -16,6 +16,8 @@
   #include "config.h"
 #endif
 
+#include <sched.h>
+
 #include <rtems.h>
 #include <rtems/libcsupport.h>
 
@@ -40,6 +42,7 @@ static void task(rtems_task_argument arg)
   (void) arg;
 
   rtems_test_assert(rtems_get_current_processor() == 1);
+  rtems_test_assert(sched_get_priority_min(SCHED_RR) == 1);
 
   sc = rtems_event_transient_send(main_task_id);
   rtems_test_assert(sc == RTEMS_SUCCESSFUL);
@@ -130,6 +133,8 @@ static void test(void)
   rtems_test_assert(sc == RTEMS_SUCCESSFUL);
   rtems_test_assert(CPU_EQUAL(&cpuset, &first_cpu));
 
+  rtems_test_assert(sched_get_priority_min(SCHED_RR) == 1);
+
   if (cpu_count > 1) {
     sc = rtems_task_set_scheduler(task_id, scheduler_b_id);
     rtems_test_assert(sc == RTEMS_SUCCESSFUL);



More information about the vc mailing list