diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1997-08-26 19:24:22 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1997-08-26 19:24:22 +0000 |
commit | 2d6009586815a2e862932b8607bceb34f7706460 (patch) | |
tree | 15af7201b16505f54d3c0750a27f316a99ed43b8 /c/src/tests/libtests/rtems++/Init.cc | |
parent | removed -lm (diff) | |
download | rtems-2d6009586815a2e862932b8607bceb34f7706460.tar.bz2 |
Patches from Chris Johns to clean up test.
Diffstat (limited to 'c/src/tests/libtests/rtems++/Init.cc')
-rw-r--r-- | c/src/tests/libtests/rtems++/Init.cc | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/c/src/tests/libtests/rtems++/Init.cc b/c/src/tests/libtests/rtems++/Init.cc index c995a3de10..edffed05e9 100644 --- a/c/src/tests/libtests/rtems++/Init.cc +++ b/c/src/tests/libtests/rtems++/Init.cc @@ -25,15 +25,13 @@ #define TEST_INIT #include "System.h" +// make global so it lasts past the Init task's stack's life time +Task1 task_1; + rtems_task Init(rtems_task_argument ) { puts( "\n\n*** RTEMS++ TEST ***" ); - rtemsEvent end_me("INIT"); - Task1 task_1; - - task_1.set_end_event(end_me); - printf( "INIT - Task.create() - " ); task_1.create("TA1 ", 0, RTEMS_MINIMUM_STACK_SIZE); printf("%s\n", task_1.last_status_string()); @@ -54,15 +52,7 @@ rtems_task Init(rtems_task_argument ) task_1.start(0xDEADDEAD); printf("%s\n", task_1.last_status_string()); - // block waiting for any event - rtems_event_set out; - - // wait for task1 to tell me to finish - end_me.receive(RTEMS_SIGNAL_0, out); - - task_1.destroy(); - - printf("*** END OF RTEMS++ TEST ***"); + printf("INIT - Destroy it's self\n"); // needs to be in C, no C++ object owns the Init task rtems_status_code status = rtems_task_delete( RTEMS_SELF ); |