diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2003-11-11 00:58:28 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2003-11-11 00:58:28 +0000 |
commit | 5ada27d280649f5d0f5a1a27769a48f7483695c1 (patch) | |
tree | b3089902dbb5a7e90144314e9c4a1852d83bd382 /c/src/tests/sptests/sp12 | |
parent | 2003-11-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-5ada27d280649f5d0f5a1a27769a48f7483695c1.tar.bz2 |
2003-11-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* sp01/.cvsignore: Remove.
* sp01/Makefile.am: Remove.
* sp01/init.c: Remove.
* sp01/sp01.doc: Remove.
* sp01/sp01.scn: Remove.
* sp01/system.h: Remove.
* sp01/task1.c: Remove.
* sp02/.cvsignore: Remove.
* sp02/Makefile.am: Remove.
* sp02/init.c: Remove.
* sp02/preempt.c: Remove.
* sp02/sp02.doc: Remove.
* sp02/sp02.scn: Remove.
* sp02/system.h: Remove.
* sp02/task1.c: Remove.
* sp02/task2.c: Remove.
* sp02/task3.c: Remove.
* .cvsignore: Remove.
* ChangeLog: Remove.
* Makefile.am: Remove.
* README: Remove.
* configure.ac: Remove.
* sptests.am: Remove.
* sp03/.cvsignore: Remove.
* sp03/Makefile.am: Remove.
* sp03/init.c: Remove.
* sp03/sp03.doc: Remove.
* sp03/sp03.scn: Remove.
* sp03/system.h: Remove.
* sp03/task1.c: Remove.
* sp03/task2.c: Remove.
* sp04/.cvsignore: Remove.
* sp04/Makefile.am: Remove.
* sp04/init.c: Remove.
* sp04/sp04.doc: Remove.
* sp04/sp04.scn: Remove.
* sp04/system.h: Remove.
* sp04/task1.c: Remove.
* sp04/task2.c: Remove.
* sp04/task3.c: Remove.
* sp04/tswitch.c: Remove.
* sp05/.cvsignore: Remove.
* sp05/Makefile.am: Remove.
* sp05/init.c: Remove.
* sp05/sp05.doc: Remove.
* sp05/sp05.scn: Remove.
* sp05/system.h: Remove.
* sp05/task1.c: Remove.
* sp05/task2.c: Remove.
* sp05/task3.c: Remove.
* sp06/.cvsignore: Remove.
* sp06/Makefile.am: Remove.
* sp06/init.c: Remove.
* sp06/sp06.doc: Remove.
* sp06/sp06.scn: Remove.
* sp06/system.h: Remove.
* sp06/task1.c: Remove.
* sp06/task2.c: Remove.
* sp06/task3.c: Remove.
* sp07/.cvsignore: Remove.
* sp07/Makefile.am: Remove.
* sp07/init.c: Remove.
* sp07/sp07.doc: Remove.
* sp07/sp07.scn: Remove.
* sp07/system.h: Remove.
* sp07/task1.c: Remove.
* sp07/task2.c: Remove.
* sp07/task3.c: Remove.
* sp07/task4.c: Remove.
* sp07/taskexit.c: Remove.
* sp07/tcreate.c: Remove.
* sp07/tdelete.c: Remove.
* sp07/trestart.c: Remove.
* sp07/tstart.c: Remove.
* sp08/.cvsignore: Remove.
* sp08/Makefile.am: Remove.
* sp08/init.c: Remove.
* sp08/sp08.doc: Remove.
* sp08/sp08.scn: Remove.
* sp08/system.h: Remove.
* sp08/task1.c: Remove.
* sp09/.cvsignore: Remove.
* sp09/Makefile.am: Remove.
* sp09/delay.c: Remove.
* sp09/init.c: Remove.
* sp09/isr.c: Remove.
* sp09/screen01.c: Remove.
* sp09/screen02.c: Remove.
* sp09/screen03.c: Remove.
* sp09/screen04.c: Remove.
* sp09/screen05.c: Remove.
* sp09/screen06.c: Remove.
* sp09/screen07.c: Remove.
* sp09/screen08.c: Remove.
* sp09/screen09.c: Remove.
* sp09/screen10.c: Remove.
* sp09/screen11.c: Remove.
* sp09/screen12.c: Remove.
* sp09/screen13.c: Remove.
* sp09/screen14.c: Remove.
* sp09/sp09.doc: Remove.
* sp09/sp09.scn: Remove.
* sp09/system.h: Remove.
* sp09/task1.c: Remove.
* sp09/task2.c: Remove.
* sp09/task3.c: Remove.
* sp09/task4.c: Remove.
* sp11/.cvsignore: Remove.
* sp11/Makefile.am: Remove.
* sp11/init.c: Remove.
* sp11/sp11.doc: Remove.
* sp11/sp11.scn: Remove.
* sp11/system.h: Remove.
* sp11/task1.c: Remove.
* sp11/task2.c: Remove.
* sp11/timer.c: Remove.
* sp12/.cvsignore: Remove.
* sp12/Makefile.am: Remove.
* sp12/init.c: Remove.
* sp12/pridrv.c: Remove.
* sp12/pritask.c: Remove.
* sp12/sp12.doc: Remove.
* sp12/sp12.scn: Remove.
* sp12/system.h: Remove.
* sp12/task1.c: Remove.
* sp12/task2.c: Remove.
* sp12/task3.c: Remove.
* sp12/task4.c: Remove.
* sp12/task5.c: Remove.
* sp13/.cvsignore: Remove.
* sp13/Makefile.am: Remove.
* sp13/fillbuff.c: Remove.
* sp13/init.c: Remove.
* sp13/putbuff.c: Remove.
* sp13/sp13.doc: Remove.
* sp13/sp13.scn: Remove.
* sp13/system.h: Remove.
* sp13/task1.c: Remove.
* sp13/task2.c: Remove.
* sp13/task3.c: Remove.
* sp14/.cvsignore: Remove.
* sp14/Makefile.am: Remove.
* sp14/asr.c: Remove.
* sp14/init.c: Remove.
* sp14/sp14.doc: Remove.
* sp14/sp14.scn: Remove.
* sp14/system.h: Remove.
* sp14/task1.c: Remove.
* sp14/task2.c: Remove.
* sp15/.cvsignore: Remove.
* sp15/Makefile.am: Remove.
* sp15/init.c: Remove.
* sp15/sp15.doc: Remove.
* sp15/sp15.scn: Remove.
* sp15/system.h: Remove.
* sp15/task1.c: Remove.
* sp16/.cvsignore: Remove.
* sp16/Makefile.am: Remove.
* sp16/init.c: Remove.
* sp16/sp16.doc: Remove.
* sp16/sp16.scn: Remove.
* sp16/system.h: Remove.
* sp16/task1.c: Remove.
* sp16/task2.c: Remove.
* sp16/task3.c: Remove.
* sp16/task4.c: Remove.
* sp16/task5.c: Remove.
* sp17/.cvsignore: Remove.
* sp17/Makefile.am: Remove.
* sp17/asr.c: Remove.
* sp17/init.c: Remove.
* sp17/sp17.doc: Remove.
* sp17/sp17.scn: Remove.
* sp17/system.h: Remove.
* sp17/task1.c: Remove.
* sp17/task2.c: Remove.
* sp19/.cvsignore: Remove.
* sp19/Makefile.am: Remove.
* sp19/first.c: Remove.
* sp19/fptask.c: Remove.
* sp19/fptest.h: Remove.
* sp19/init.c: Remove.
* sp19/inttest.h: Remove.
* sp19/sp19.doc: Remove.
* sp19/sp19.scn: Remove.
* sp19/system.h: Remove.
* sp19/task1.c: Remove.
* sp20/.cvsignore: Remove.
* sp20/Makefile.am: Remove.
* sp20/getall.c: Remove.
* sp20/init.c: Remove.
* sp20/sp20.doc: Remove.
* sp20/sp20.scn: Remove.
* sp20/system.h: Remove.
* sp20/task1.c: Remove.
* sp21/.cvsignore: Remove.
* sp21/Makefile.am: Remove.
* sp21/init.c: Remove.
* sp21/sp21.doc: Remove.
* sp21/sp21.scn: Remove.
* sp21/system.h: Remove.
* sp21/task1.c: Remove.
* sp22/.cvsignore: Remove.
* sp22/Makefile.am: Remove.
* sp22/delay.c: Remove.
* sp22/init.c: Remove.
* sp22/prtime.c: Remove.
* sp22/sp22.doc: Remove.
* sp22/sp22.scn: Remove.
* sp22/system.h: Remove.
* sp22/task1.c: Remove.
* sp23/.cvsignore: Remove.
* sp23/Makefile.am: Remove.
* sp23/init.c: Remove.
* sp23/sp23.doc: Remove.
* sp23/sp23.scn: Remove.
* sp23/system.h: Remove.
* sp23/task1.c: Remove.
* sp24/.cvsignore: Remove.
* sp24/Makefile.am: Remove.
* sp24/init.c: Remove.
* sp24/resume.c: Remove.
* sp24/sp24.doc: Remove.
* sp24/sp24.scn: Remove.
* sp24/system.h: Remove.
* sp24/task1.c: Remove.
* sp25/.cvsignore: Remove.
* sp25/Makefile.am: Remove.
* sp25/init.c: Remove.
* sp25/sp25.doc: Remove.
* sp25/sp25.scn: Remove.
* sp25/system.h: Remove.
* sp25/task1.c: Remove.
* sp26/.cvsignore: Remove.
* sp26/Makefile.am: Remove.
* sp26/init.c: Remove.
* sp26/sp26.doc: Remove.
* sp26/sp26.scn: Remove.
* sp26/system.h: Remove.
* sp26/task1.c: Remove.
* sp27/.cvsignore: Remove.
* sp27/Makefile.am: Remove.
* sp27/init.c: Remove.
* sp27/sp27.doc: Remove.
* sp27/sp27.scn: Remove.
* sp28/.cvsignore: Remove.
* sp28/Makefile.am: Remove.
* sp28/init.c: Remove.
* sp28/sp28.doc: Remove.
* sp28/sp28.scn: Remove.
* sp29/.cvsignore: Remove.
* sp29/Makefile.am: Remove.
* sp29/init.c: Remove.
* sp29/sp29.doc: Remove.
* sp29/sp29.scn: Remove.
* sp30/.cvsignore: Remove.
* sp30/Makefile.am: Remove.
* sp30/init.c: Remove.
* sp30/resume.c: Remove.
* sp30/sp30.doc: Remove.
* sp30/sp30.scn: Remove.
* sp30/system.h: Remove.
* sp30/task1.c: Remove.
* sp31/.cvsignore: Remove.
* sp31/Makefile.am: Remove.
* sp31/delay.c: Remove.
* sp31/init.c: Remove.
* sp31/prtime.c: Remove.
* sp31/sp31.doc: Remove.
* sp31/sp31.scn: Remove.
* sp31/system.h: Remove.
* sp31/task1.c: Remove.
* sp32/.cvsignore: Remove.
* sp32/Makefile.am: Remove.
* sp32/init.c: Remove.
* sp32/sp32.scn: Remove.
* spfatal/.cvsignore: Remove.
* spfatal/Makefile.am: Remove.
* spfatal/README: Remove.
* spfatal/fatal.c: Remove.
* spfatal/init.c: Remove.
* spfatal/puterr.c: Remove.
* spfatal/spfatal.doc: Remove.
* spfatal/spfatal.scn: Remove.
* spfatal/system.h: Remove.
* spfatal/task1.c: Remove.
* spsize/.cvsignore: Remove.
* spsize/Makefile.am: Remove.
* spsize/getint.c: Remove.
* spsize/init.c: Remove.
* spsize/size.c: Remove.
* spsize/size.scn: Remove.
* spsize/system.h: Remove.
Diffstat (limited to '')
-rw-r--r-- | c/src/tests/sptests/sp12/.cvsignore | 2 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/Makefile.am | 38 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/init.c | 178 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/pridrv.c | 130 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/pritask.c | 90 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/sp12.doc | 26 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/sp12.scn | 78 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/system.h | 82 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/task1.c | 152 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/task2.c | 64 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/task3.c | 49 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/task4.c | 36 | ||||
-rw-r--r-- | c/src/tests/sptests/sp12/task5.c | 54 |
13 files changed, 0 insertions, 979 deletions
diff --git a/c/src/tests/sptests/sp12/.cvsignore b/c/src/tests/sptests/sp12/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/sptests/sp12/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/sptests/sp12/Makefile.am b/c/src/tests/sptests/sp12/Makefile.am deleted file mode 100644 index 1b31edc879..0000000000 --- a/c/src/tests/sptests/sp12/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -## -## $Id$ -## - - -TEST = sp12 - -MANAGERS = io semaphore - -C_FILES = init.c task1.c task2.c task3.c task4.c task5.c pridrv.c pritask.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = scn doc -DOCS = $(DOCTYPES:%=$(TEST).%) - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -PGM = ${ARCH}/$(TEST).exe - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sptests.am - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -all-local: $(ARCH) $(TMPINSTALL_FILES) - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/sptests/sp12/init.c b/c/src/tests/sptests/sp12/init.c deleted file mode 100644 index acb8cb78cc..0000000000 --- a/c/src/tests/sptests/sp12/init.c +++ /dev/null @@ -1,178 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is a user initialization task and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define TEST_INIT -#include "system.h" - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_status_code status; - - puts( "\n\n*** TEST 12 ***" ); - - Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' ); - Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' ); - Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' ); - Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' ); - Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' ); - - Priority_task_name[ 1 ] = rtems_build_name( 'P', 'R', 'I', '1' ); - Priority_task_name[ 2 ] = rtems_build_name( 'P', 'R', 'I', '2' ); - Priority_task_name[ 3 ] = rtems_build_name( 'P', 'R', 'I', '3' ); - Priority_task_name[ 4 ] = rtems_build_name( 'P', 'R', 'I', '4' ); - Priority_task_name[ 5 ] = rtems_build_name( 'P', 'R', 'I', '5' ); - - Semaphore_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' ); - Semaphore_name[ 2 ] = rtems_build_name( 'S', 'M', '2', ' ' ); - Semaphore_name[ 3 ] = rtems_build_name( 'S', 'M', '3', ' ' ); - - status = rtems_semaphore_create( - Semaphore_name[ 1 ], - 1, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_NO_PRIORITY, - &Semaphore_id[ 1 ] - ); - directive_failed( status, "rtems_semaphore_create of SM1" ); - - status = rtems_semaphore_create( - Semaphore_name[ 2 ], - 0, - RTEMS_PRIORITY, - RTEMS_NO_PRIORITY, - &Semaphore_id[ 2 ] - ); - directive_failed( status, "rtems_semaphore_create of SM2" ); - - status = rtems_semaphore_create( - Semaphore_name[ 3 ], - 1, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_NO_PRIORITY, - &Semaphore_id[ 3 ] - ); - directive_failed( status, "rtems_semaphore_create of SM3" ); - - puts( "INIT - Forward priority queue test" ); - Priority_test_driver( 0 ); - - puts( "INIT - Backward priority queue test" ); - Priority_test_driver( 32 ); - -rtems_test_pause(); - - puts( "INIT - Binary Semaphore and Priority Inheritance Test" ); - - status = rtems_semaphore_delete( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_delete of SM2" ); - - puts( "INIT - rtems_semaphore_create - allocated binary semaphore" ); - status = rtems_semaphore_create( - Semaphore_name[ 2 ], - 0, - RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, - RTEMS_NO_PRIORITY, - &Semaphore_id[ 2 ] - ); - directive_failed( status, "rtems_semaphore_create of priority inherit SM2" ); - - puts( "INIT - rtems_semaphore_release - allocated binary semaphore" ); - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release of SM2" ); - - puts( "INIT - rtems_semaphore_delete - allocated binary semaphore" ); - status = rtems_semaphore_delete( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_delete of SM2" ); - - status = rtems_semaphore_create( - Semaphore_name[ 2 ], - 1, - RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, - RTEMS_NO_PRIORITY, - &Semaphore_id[ 2 ] - ); - directive_failed( status, "rtems_semaphore_create of priority inherit SM2" ); - - Priority_test_driver( 64 ); - -rtems_test_pause(); - - status = rtems_semaphore_delete( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_delete of SM2" ); - - status = rtems_semaphore_create( - Semaphore_name[ 2 ], - 0, - RTEMS_PRIORITY, - RTEMS_NO_PRIORITY, - &Semaphore_id[ 2 ] - ); - directive_failed( status, "rtems_semaphore_create of priority SM2" ); - - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release of SM2" ); - - status = rtems_task_create( - Task_name[ 1 ], - 4, - RTEMS_MINIMUM_STACK_SIZE * 2, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Task_id[ 1 ] - ); - directive_failed( status, "rtems_task_create of TA1" ); - - status = rtems_task_create( - Task_name[ 2 ], - 4, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Task_id[ 2 ] - ); - directive_failed( status, "rtems_task_create of TA2" ); - - status = rtems_task_create( - Task_name[ 3 ], - 4, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Task_id[ 3 ] - ); - directive_failed( status, "rtems_task_create of TA3" ); - - status = rtems_task_start( Task_id[ 1 ], Task_1, 0 ); - directive_failed( status, "rtems_task_start of TA1" ); - - status = rtems_task_start( Task_id[ 2 ], Task_2, 0 ); - directive_failed( status, "rtems_task_start of TA2" ); - - status = rtems_task_start( Task_id[ 3 ], Task_3, 0 ); - directive_failed( status, "rtems_task_start of TA3" ); - - status = rtems_task_delete( RTEMS_SELF ); - directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); -} diff --git a/c/src/tests/sptests/sp12/pridrv.c b/c/src/tests/sptests/sp12/pridrv.c deleted file mode 100644 index 37c8ea6591..0000000000 --- a/c/src/tests/sptests/sp12/pridrv.c +++ /dev/null @@ -1,130 +0,0 @@ -/* Priority_test_driver - * - * This routine is the initialization task for this test program. - * It is a user initialization task and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: - * priority_base - priority_base switch - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" - -void Priority_test_driver( - rtems_unsigned32 priority_base -) -{ - rtems_task_priority previous_priority; - rtems_unsigned32 index; - rtems_status_code status; - - for ( index = 1 ; index <= 5 ; index++ ) { - switch ( index ) { - case 1: - case 2: - case 3: - Task_priority[ index ] = priority_base + index; - break; - default: - Task_priority[ index ] = priority_base + 3; - break; - } - - status = rtems_task_create( - Priority_task_name[ index ], - Task_priority[ index ], - RTEMS_MINIMUM_STACK_SIZE * 2, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Priority_task_id[ index ] - ); - directive_failed( status, "rtems_task_create loop" ); - - } - - if ( priority_base == 0 ) { - for ( index = 1 ; index <= 5 ; index++ ) { - status = rtems_task_start( - Priority_task_id[ index ], - Priority_task, - index - ); - directive_failed( status, "rtems_task_start loop" ); - } - } else { - for ( index = 5 ; index >= 1 ; index-- ) { - status = rtems_task_start( - Priority_task_id[ index ], - Priority_task, - index - ); - directive_failed( status, "rtems_task_start loop" ); - - status = rtems_task_wake_after( TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after loop" ); - - if ( priority_base == 64 ) { - if ( index == 4 ) { - status = rtems_task_set_priority( - Priority_task_id[ 5 ], - priority_base + 4, - &previous_priority - ); - printf( "PDRV - change priority of PRI5 from %d to %d\n", - previous_priority, - priority_base + 4 - ); - directive_failed( status, "PDRV rtems_task_set_priority" ); - } - status = rtems_task_set_priority( - Priority_task_id[ 5 ], - RTEMS_CURRENT_PRIORITY, - &previous_priority - ); - directive_failed( status, "PDRV rtems_task_set_priority CURRENT" ); - printf( "PDRV - priority of PRI5 is %d\n", previous_priority ); - } - } - } - - status = rtems_task_wake_after( TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after after loop" ); - - if ( priority_base == 0 ) { - for ( index = 1 ; index <= 5 ; index++ ) { - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release loop" ); - } - } - - if ( priority_base == 64 ) { - puts( "PDRV - rtems_task_resume - PRI5" ); - status = rtems_task_resume( Priority_task_id[ 5 ] ); - directive_failed( status, "rtems_task_resume" ); - - status = rtems_task_wake_after( 1 * TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after so PRI5 can run" ); - - status = rtems_task_delete( Priority_task_id[ 5 ] ); - directive_failed( status, "rtems_task_delete of PRI5" ); - } - else { - for ( index = 1 ; index <= 5 ; index++ ) { - status = rtems_task_delete( Priority_task_id[ index ] ); - directive_failed( status, "rtems_task_delete loop" ); - } - } -} diff --git a/c/src/tests/sptests/sp12/pritask.c b/c/src/tests/sptests/sp12/pritask.c deleted file mode 100644 index cd91646d61..0000000000 --- a/c/src/tests/sptests/sp12/pritask.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Priority_task - * - * This routine serves as a test task. It verifies the semaphore manager. - * - * Input parameters: - * its_index - priority index - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" - -rtems_task Priority_task( - rtems_task_argument its_index -) -{ - rtems_interval timeout; - rtems_task_priority its_priority; - rtems_task_priority current_priority; - rtems_status_code status; - rtems_unsigned32 index; - - its_priority = Task_priority[ its_index ]; - - if ( its_priority < 3 ) - timeout = 5 * TICKS_PER_SECOND; - else - timeout = RTEMS_NO_TIMEOUT; - - put_name( Priority_task_name[ its_index ], FALSE ); - puts( " - rtems_semaphore_obtain - wait forever on SM2" ); - - status = rtems_semaphore_obtain( - Semaphore_id[ 2 ], - RTEMS_DEFAULT_OPTIONS, - timeout - ); - directive_failed( status, "rtems_semaphore_obtain of SM2" ); - - if ( its_priority < 64 ) { - printf( "PRI%d - WHY AM I HERE? (pri=%d)", its_index, its_priority ); - rtems_test_exit( 0 ); - } - - if ( its_index == 5 ) - puts( "PRI5 - rtems_task_suspend - until all priority tasks blocked" ); - status = rtems_task_suspend( RTEMS_SELF ); - directive_failed( status, "rtems_task_suspend" ); - - puts( "PRI5 - rtems_task_delete - all tasks waiting on SM2" ); - for ( index = 1 ; index < 5 ; index++ ) { - status = rtems_task_delete( Priority_task_id[ index ] ); - directive_failed( status, "rtems_task_delete loop" ); - } - - puts( "PRI5 - rtems_semaphore_obtain - nested" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 2 ], - RTEMS_DEFAULT_OPTIONS, - timeout - ); - directive_failed( status, "rtems_semaphore_obtain nested" ); - - puts( "PRI5 - rtems_semaphore_release - nested" ); - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release nested " ); - - puts( "PRI5 - rtems_semaphore_release - restore priority" ); - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release" ); - - status = rtems_task_set_priority( - RTEMS_SELF, - RTEMS_CURRENT_PRIORITY, - ¤t_priority - ); - directive_failed( status, "PRI5 rtems_task_set_priority CURRENT" ); - printf( "PRI5 - priority of PRI5 is %d\n", current_priority ); - - (void) rtems_task_suspend( RTEMS_SELF ); -} diff --git a/c/src/tests/sptests/sp12/sp12.doc b/c/src/tests/sptests/sp12/sp12.doc deleted file mode 100644 index b4f67ef7a7..0000000000 --- a/c/src/tests/sptests/sp12/sp12.doc +++ /dev/null @@ -1,26 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - -This file describes the directives and concepts tested by this test set. - -test set name: test12 - -directives: - ex_init, ex_start, t_create, t_start, t_delete, tm_tick, i_return, - sm_create, sm_ident, sm_delete, sm_p, sm_v, tm_wkafter, t_setpri - -concepts: - - a. This test checks out the semaphore manager. - - b. This test forces _Flush_taskq() to unblock a task waiting - on a deleted object. diff --git a/c/src/tests/sptests/sp12/sp12.scn b/c/src/tests/sptests/sp12/sp12.scn deleted file mode 100644 index e75a804b0c..0000000000 --- a/c/src/tests/sptests/sp12/sp12.scn +++ /dev/null @@ -1,78 +0,0 @@ -*** TEST 12 *** -INIT - Forward priority queue test -PRI1 - rtems_semaphore_obtain - wait forever on SM2 -PRI2 - rtems_semaphore_obtain - wait forever on SM2 -PRI3 - rtems_semaphore_obtain - wait forever on SM2 -PRI4 - rtems_semaphore_obtain - wait forever on SM2 -PRI5 - rtems_semaphore_obtain - wait forever on SM2 -INIT - Backward priority queue test -PRI5 - rtems_semaphore_obtain - wait forever on SM2 -PRI4 - rtems_semaphore_obtain - wait forever on SM2 -PRI3 - rtems_semaphore_obtain - wait forever on SM2 -PRI2 - rtems_semaphore_obtain - wait forever on SM2 -PRI1 - rtems_semaphore_obtain - wait forever on SM2 -<pause> -INIT - Binary Semaphore and Priority Inheritance Test -INIT - rtems_semaphore_create - allocated binary semaphore -INIT - rtems_semaphore_release - allocated binary semaphore -INIT - rtems_semaphore_delete - allocated binary semaphore -PRI5 - rtems_semaphore_obtain - wait forever on SM2 -PRI5 - rtems_task_suspend - until all priority tasks blocked -PDRV - priority of PRI5 is 67 -PRI4 - rtems_semaphore_obtain - wait forever on SM2 -PDRV - change priority of PRI5 from 67 to 68 -PDRV - priority of PRI5 is 67 -PRI3 - rtems_semaphore_obtain - wait forever on SM2 -PDRV - priority of PRI5 is 67 -PRI2 - rtems_semaphore_obtain - wait forever on SM2 -PDRV - priority of PRI5 is 66 -PRI1 - rtems_semaphore_obtain - wait forever on SM2 -PDRV - priority of PRI5 is 65 -PDRV - rtems_task_resume - PRI5 -PRI5 - rtems_task_delete - all tasks waiting on SM2 -PRI5 - rtems_semaphore_obtain - nested -PRI5 - rtems_semaphore_release - nested -PRI5 - rtems_semaphore_release - restore priority -PRI5 - priority of PRI5 is 68 -<pause> -TA1 - rtems_semaphore_ident - smid => 18010002 -TA1 - rtems_semaphore_obtain - wait forever on SM2 -TA1 - got SM2 -TA1 - rtems_semaphore_obtain - wait forever on SM3 -TA1 - got SM3 -TA1 - rtems_semaphore_obtain - get SM1 - RTEMS_NO_WAIT -TA1 - got SM1 -TA1 - rtems_task_wake_after - sleep 5 seconds -TA2 - rtems_semaphore_obtain - wait forever on SM1 -TA3 - rtems_semaphore_obtain - wait forever on SM2 -<pause> -TA1 - rtems_semaphore_release - release SM1 -TA1 - rtems_semaphore_obtain - waiting for SM1 with 10 second timeout -TA2 - got SM1 -TA2 - rtems_semaphore_release - release SM1 -TA2 - rtems_task_set_priority - make self highest priority task -TA2 - rtems_semaphore_obtain - wait forever on SM2 -TA1 - got SM1 -TA1 - rtems_semaphore_release - release SM2 -TA2 - got SM2 -TA2 - rtems_semaphore_release - release SM2 -TA2 - rtems_task_delete - delete self -TA1 - rtems_task_wake_after - sleep 5 seconds -TA3 - got SM2 -TA3 - rtems_semaphore_release - release SM2 -TA3 - rtems_semaphore_obtain - wait forever on SM3 -<pause> -TA1 - rtems_task_delete - delete TA3 -TA1 - rtems_task_wake_after - sleep 5 seconds -TA4 - rtems_semaphore_obtain - wait forever on SM1 -TA5 - rtems_semaphore_obtain - wait forever on SM1 -TA1 - rtems_task_delete - delete TA4 -TA1 - rtems_semaphore_release - release SM1 -TA1 - rtems_task_wake_after - sleep 5 seconds -TA5 - got SM1 -TA5 - rtems_semaphore_obtain - wait forever on SM1 -TA1 - rtems_semaphore_delete - delete SM1 -TA1 - rtems_semaphore_delete - delete SM3 -TA1 - rtems_task_delete - delete self -TA5 - SM1 deleted by TA1 -*** END OF TEST 12 *** diff --git a/c/src/tests/sptests/sp12/system.h b/c/src/tests/sptests/sp12/system.h deleted file mode 100644 index 4b167ea751..0000000000 --- a/c/src/tests/sptests/sp12/system.h +++ /dev/null @@ -1,82 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <tmacros.h> - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -void Priority_test_driver( - rtems_unsigned32 priority_base -); - -rtems_task Priority_task( - rtems_task_argument its_index -); - -rtems_task Task_1( - rtems_task_argument argument -); - -rtems_task Task_2( - rtems_task_argument argument -); - -rtems_task Task_3( - rtems_task_argument argument -); - -rtems_task Task_4( - rtems_task_argument argument -); - -rtems_task Task5( - rtems_task_argument argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) -#define CONFIGURE_MAXIMUM_TASKS 8 -#define CONFIGURE_MAXIMUM_SEMAPHORES 10 -#define CONFIGURE_TICKS_PER_TIMESLICE 100 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_EXTRA_TASK_STACKS (6 * RTEMS_MINIMUM_STACK_SIZE) - -#include <confdefs.h> - -/* global variables */ - - -TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */ -TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */ - -TEST_EXTERN rtems_id Priority_task_id[ 6 ]; /* array of task ids */ -TEST_EXTERN rtems_name Priority_task_name[ 6 ]; /* array of task names */ - -TEST_EXTERN rtems_task_priority Task_priority[ 6 ]; - -TEST_EXTERN rtems_id Semaphore_id[ 4 ]; /* array of semaphore ids */ -TEST_EXTERN rtems_name Semaphore_name[ 4 ]; /* array of semaphore names */ - -/* end of include file */ diff --git a/c/src/tests/sptests/sp12/task1.c b/c/src/tests/sptests/sp12/task1.c deleted file mode 100644 index 7d16c2881b..0000000000 --- a/c/src/tests/sptests/sp12/task1.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Task_1 - * - * This routine serves as a test task. It verifies the semaphore manager. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" - -rtems_task Task_1( - rtems_task_argument argument -) -{ - rtems_id smid; - rtems_status_code status; - - status = rtems_semaphore_ident( - Semaphore_name[ 1 ], - RTEMS_SEARCH_ALL_NODES, - &smid - ); - printf( "TA1 - rtems_semaphore_ident - smid => %08x\n", smid ); - directive_failed( status, "rtems_semaphore_ident of SM1" ); - - puts( "TA1 - rtems_semaphore_obtain - wait forever on SM2" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 2 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain of SM2" ); - puts( "TA1 - got SM2" ); - - puts( "TA1 - rtems_semaphore_obtain - wait forever on SM3" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 3 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain of SM3" ); - puts( "TA1 - got SM3" ); - - puts( "TA1 - rtems_semaphore_obtain - get SM1 - RTEMS_NO_WAIT" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 1 ], - RTEMS_NO_WAIT, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain of SM1" ); - puts( "TA1 - got SM1" ); - - puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" ); - status = rtems_task_wake_after( 5*TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after" ); - -rtems_test_pause(); - - puts( "TA1 - rtems_semaphore_release - release SM1" ); - status = rtems_semaphore_release( Semaphore_id[ 1 ] ); - directive_failed( status, "rtems_semaphore_release of SM1" ); - - puts( - "TA1 - rtems_semaphore_obtain - waiting for SM1 with 10 second timeout" - ); - status = rtems_semaphore_obtain( - Semaphore_id[ 1 ], - RTEMS_DEFAULT_OPTIONS, - 10 * TICKS_PER_SECOND - ); - directive_failed( status, "rtems_semaphore_obtain of SM1" ); - puts( "TA1 - got SM1" ); - - puts( "TA1 - rtems_semaphore_release - release SM2" ); - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release of SM2" ); - - puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" ); - status = rtems_task_wake_after( 5*TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after" ); - -rtems_test_pause(); - - puts( "TA1 - rtems_task_delete - delete TA3" ); - status = rtems_task_delete( Task_id[ 3 ] ); - directive_failed( status, "rtems_task_delete of TA3" ); - - status = rtems_task_create( - Task_name[ 4 ], - 4, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Task_id[ 4 ] - ); - directive_failed( status, "rtems_task_create of TA4" ); - - status = rtems_task_create( - Task_name[ 5 ], - 4, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Task_id[ 5 ] - ); - directive_failed( status, "rtems_task_create of TA5" ); - - status = rtems_task_start( Task_id[ 4 ], Task_4, 0 ); - directive_failed( status, "rtems_task_start of TA4" ); - - status = rtems_task_start( Task_id[ 5 ], Task5, 0 ); - directive_failed( status, "rtems_task_start of TA5" ); - - puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" ); - status = rtems_task_wake_after( 5*TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after" ); - - puts( "TA1 - rtems_task_delete - delete TA4" ); - status = rtems_task_delete( Task_id[ 4 ] ); - directive_failed( status, "rtems_task_delete of TA4" ); - - puts( "TA1 - rtems_semaphore_release - release SM1" ); - status = rtems_semaphore_release( Semaphore_id[ 1 ] ); - directive_failed( status, "rtems_semaphore_release on SM1" ); - - puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" ); - status = rtems_task_wake_after( 5*TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after" ); - - puts( "TA1 - rtems_semaphore_delete - delete SM1" ); - status = rtems_semaphore_delete( Semaphore_id[ 1 ] ); - directive_failed( status, "rtems_semaphore_delete of SM1" ); - - puts( "TA1 - rtems_semaphore_delete - delete SM3" ); - status = rtems_semaphore_delete( Semaphore_id[ 3 ] ); - directive_failed( status, "rtems_semaphore_delete of SM3" ); - - puts( "TA1 - rtems_task_delete - delete self" ); - status = rtems_task_delete( RTEMS_SELF ); - directive_failed( status, "rtems_task_delete of TA1" ); -} diff --git a/c/src/tests/sptests/sp12/task2.c b/c/src/tests/sptests/sp12/task2.c deleted file mode 100644 index ccb985b01b..0000000000 --- a/c/src/tests/sptests/sp12/task2.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Task_2 - * - * This routine serves as a test task. It simply obtains semaphores - * 1 and 2, the later when it is a high priority task. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - - -#include "system.h" - -rtems_task Task_2( - rtems_task_argument argument -) -{ - rtems_status_code status; - rtems_task_priority previous_priority; - - puts( "TA2 - rtems_semaphore_obtain - wait forever on SM1" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 1 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - puts( "TA2 - got SM1" ); - directive_failed( status, "rtems_semaphore_obtain on SM1" ); - - puts( "TA2 - rtems_semaphore_release - release SM1" ); - status = rtems_semaphore_release( Semaphore_id[ 1 ] ); - directive_failed( status, "rtems_semaphore_release on SM1" ); - - puts( "TA2 - rtems_task_set_priority - make self highest priority task" ); - status = rtems_task_set_priority( RTEMS_SELF, 3, &previous_priority ); - directive_failed( status, "rtems_task_set_priority on TA2" ); - - puts( "TA2 - rtems_semaphore_obtain - wait forever on SM2" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 2 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - puts( "TA2 - got SM2" ); - directive_failed( status, "rtems_semaphore_obtain on SM2" ); - - puts( "TA2 - rtems_semaphore_release - release SM2" ); - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release on SM2" ); - - puts( "TA2 - rtems_task_delete - delete self" ); - status = rtems_task_delete( RTEMS_SELF ); - directive_failed( status, "rtems_task_delete of TA2" ); -} diff --git a/c/src/tests/sptests/sp12/task3.c b/c/src/tests/sptests/sp12/task3.c deleted file mode 100644 index a8d7bf1ef6..0000000000 --- a/c/src/tests/sptests/sp12/task3.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Task_3 - * - * This routine serves as a test task. It simply obtains semaphore - * 2 and waits forever attempting to obtain semaphore 3. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" - -rtems_task Task_3( - rtems_task_argument argument -) -{ - rtems_status_code status; - - puts( "TA3 - rtems_semaphore_obtain - wait forever on SM2" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 2 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain on SM2" ); - puts( "TA3 - got SM2" ); - - puts( "TA3 - rtems_semaphore_release - release SM2" ); - status = rtems_semaphore_release( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_release on SM2" ); - - puts( "TA3 - rtems_semaphore_obtain - wait forever on SM3" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 3 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain on SM3" ); -} diff --git a/c/src/tests/sptests/sp12/task4.c b/c/src/tests/sptests/sp12/task4.c deleted file mode 100644 index e27ddc35fe..0000000000 --- a/c/src/tests/sptests/sp12/task4.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Task_4 - * - * This routine serves as a test task. It waits forever attempting - * to obtain semaphore 1. However, it should never get the semaphore! - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" - -rtems_task Task_4( - rtems_task_argument argument -) -{ - rtems_status_code status; - - puts( "TA4 - rtems_semaphore_obtain - wait forever on SM1" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 1 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain on SM1" ); -} diff --git a/c/src/tests/sptests/sp12/task5.c b/c/src/tests/sptests/sp12/task5.c deleted file mode 100644 index 99b8e04e94..0000000000 --- a/c/src/tests/sptests/sp12/task5.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Task5 - * - * This routine serves as a test task. It obtains semaphore 1 correctly - * once, then waits for semaphore 1 again. Task 1 should delete the - * semaphore, thus waking this task up. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" - -rtems_task Task5( - rtems_task_argument argument -) -{ - rtems_status_code status; - - puts( "TA5 - rtems_semaphore_obtain - wait forever on SM1" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 1 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain on SM1" ); - puts( "TA5 - got SM1" ); - - puts( "TA5 - rtems_semaphore_obtain - wait forever on SM1" ); - status = rtems_semaphore_obtain( - Semaphore_id[ 1 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - fatal_directive_status( - status, - RTEMS_OBJECT_WAS_DELETED, - "rtems_semaphore_obtain on SM1" - ); - puts( "TA5 - SM1 deleted by TA1" ); - - puts( "*** END OF TEST 12 ***" ); - rtems_test_exit( 0 ); -} |