summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-10-11 13:54:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-10-11 13:54:46 +0000
commitea744828ad7b348db58a997cfa88825376bf08c5 (patch)
tree9b6264698de749263cee4115cf965af68dba03ec
parent591d45e7d5059dd7bd88aa5616a3ea3d3ce1ee2c (diff)
downloadrtems-ea744828ad7b348db58a997cfa88825376bf08c5.tar.bz2
reordered test cases from simple to complex
-rw-r--r--c/src/tests/tmtests/tm27/task1.c38
-rw-r--r--testsuites/tmtests/tm27/task1.c38
2 files changed, 50 insertions, 26 deletions
diff --git a/c/src/tests/tmtests/tm27/task1.c b/c/src/tests/tmtests/tm27/task1.c
index 51e795d817..c18ae2ab9b 100644
--- a/c/src/tests/tmtests/tm27/task1.c
+++ b/c/src/tests/tmtests/tm27/task1.c
@@ -86,11 +86,15 @@ rtems_task Task_1(
rtems_task_argument argument
)
{
- _Thread_Dispatch_disable_level = 1;
+ Install_tm27_vector( Isr_handler );
- Interrupt_nest = 1;
+ /*
+ * No preempt .. no nesting
+ */
- Install_tm27_vector( Isr_handler );
+ Interrupt_nest = 0;
+
+ _Thread_Dispatch_disable_level = 0;
Interrupt_occurred = 0;
Timer_initialize();
@@ -103,24 +107,28 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
- "INTERRUPT_ENTER (nested interrupt)",
- Interrupt_enter_nested_time,
+ "INTERRUPT_ENTER (no preempt)",
+ Interrupt_enter_time,
1,
0,
0
);
put_time(
- "INTERRUPT_RETURN (nested interrupt)",
- Interrupt_return_nested_time,
+ "INTERRUPT_RETURN (no preempt)",
+ Interrupt_return_time,
1,
0,
0
);
- Interrupt_nest = 0;
+ /*
+ * No preempt .. nested
+ */
- _Thread_Dispatch_disable_level = 0;
+ _Thread_Dispatch_disable_level = 1;
+
+ Interrupt_nest = 1;
Interrupt_occurred = 0;
Timer_initialize();
@@ -133,21 +141,25 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
- "INTERRUPT_ENTER (no preempt)",
- Interrupt_enter_time,
+ "INTERRUPT_ENTER (nested interrupt)",
+ Interrupt_enter_nested_time,
1,
0,
0
);
put_time(
- "INTERRUPT_RETURN (no preempt)",
- Interrupt_return_time,
+ "INTERRUPT_RETURN (nested interrupt)",
+ Interrupt_return_nested_time,
1,
0,
0
);
+ /*
+ * Does a preempt .. not nested
+ */
+
_Thread_Dispatch_disable_level = 0;
_Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].last;
diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c
index 51e795d817..c18ae2ab9b 100644
--- a/testsuites/tmtests/tm27/task1.c
+++ b/testsuites/tmtests/tm27/task1.c
@@ -86,11 +86,15 @@ rtems_task Task_1(
rtems_task_argument argument
)
{
- _Thread_Dispatch_disable_level = 1;
+ Install_tm27_vector( Isr_handler );
- Interrupt_nest = 1;
+ /*
+ * No preempt .. no nesting
+ */
- Install_tm27_vector( Isr_handler );
+ Interrupt_nest = 0;
+
+ _Thread_Dispatch_disable_level = 0;
Interrupt_occurred = 0;
Timer_initialize();
@@ -103,24 +107,28 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
- "INTERRUPT_ENTER (nested interrupt)",
- Interrupt_enter_nested_time,
+ "INTERRUPT_ENTER (no preempt)",
+ Interrupt_enter_time,
1,
0,
0
);
put_time(
- "INTERRUPT_RETURN (nested interrupt)",
- Interrupt_return_nested_time,
+ "INTERRUPT_RETURN (no preempt)",
+ Interrupt_return_time,
1,
0,
0
);
- Interrupt_nest = 0;
+ /*
+ * No preempt .. nested
+ */
- _Thread_Dispatch_disable_level = 0;
+ _Thread_Dispatch_disable_level = 1;
+
+ Interrupt_nest = 1;
Interrupt_occurred = 0;
Timer_initialize();
@@ -133,21 +141,25 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
- "INTERRUPT_ENTER (no preempt)",
- Interrupt_enter_time,
+ "INTERRUPT_ENTER (nested interrupt)",
+ Interrupt_enter_nested_time,
1,
0,
0
);
put_time(
- "INTERRUPT_RETURN (no preempt)",
- Interrupt_return_time,
+ "INTERRUPT_RETURN (nested interrupt)",
+ Interrupt_return_nested_time,
1,
0,
0
);
+ /*
+ * Does a preempt .. not nested
+ */
+
_Thread_Dispatch_disable_level = 0;
_Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].last;