summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpunsupported01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-18 11:53:48 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-22 16:46:01 +0200
commit05e82bd76b057bf60f8590c5226561538ba9057e (patch)
treefd84479c03e705bb5ab414b2364e0b131f6d2eef /testsuites/smptests/smpunsupported01
parentrtems: Error for task variables on SMP (diff)
downloadrtems-05e82bd76b057bf60f8590c5226561538ba9057e.tar.bz2
score: Error for non-preemptible tasks on SMP
A common use case for disabled preemption was to ensure mutual exclusion on single-processor configurations. On SMP this does not work. To abandon non-preemptible tasks simplifies the scheduler.
Diffstat (limited to 'testsuites/smptests/smpunsupported01')
-rw-r--r--testsuites/smptests/smpunsupported01/init.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/testsuites/smptests/smpunsupported01/init.c b/testsuites/smptests/smpunsupported01/init.c
index 3379de614d..a9782e859a 100644
--- a/testsuites/smptests/smpunsupported01/init.c
+++ b/testsuites/smptests/smpunsupported01/init.c
@@ -21,6 +21,8 @@
static void test(void)
{
rtems_status_code sc;
+ rtems_mode mode;
+ rtems_id id;
rtems_test_assert(rtems_configuration_is_smp_enabled());
@@ -35,6 +37,19 @@ static void test(void)
sc = rtems_task_variable_get(RTEMS_SELF, NULL, NULL);
rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
+
+ sc = rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &mode);
+ rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
+
+ sc = rtems_task_create(
+ rtems_build_name('T', 'A', 'S', 'K'),
+ RTEMS_MINIMUM_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_NO_PREEMPT,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id
+ );
+ rtems_test_assert(sc == RTEMS_UNSATISFIED);
}
static void Init(rtems_task_argument arg)
@@ -55,7 +70,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 1
-#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE