diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-07 15:26:46 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-07 15:26:46 +0000 |
commit | 14a64dc59e3a8000e8809407075e118e23cbeb61 (patch) | |
tree | 5f989fb4c34b4c185d3900e9cc46e9f2aca767a4 /testsuites/sptests/sp12/pritask.c | |
parent | Convert to UNIX CR/LF. (diff) | |
download | rtems-14a64dc59e3a8000e8809407075e118e23cbeb61.tar.bz2 |
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen07.c, sp09/screen12.c, sp09/screen14.c, sp09/sp09.scn
Add test cases for:
+ message queue create requesting too many message buffers
for the available memory
+ region extend with address inside existing heap
+ timer server initiate too large a stack, create error
* sp12/pritask.c, sp12/sp12.scn: Add test cases for:
+ task set priority while holding resource
Diffstat (limited to 'testsuites/sptests/sp12/pritask.c')
-rw-r--r-- | testsuites/sptests/sp12/pritask.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c index 47c74d6e1d..8aa3a0aea4 100644 --- a/testsuites/sptests/sp12/pritask.c +++ b/testsuites/sptests/sp12/pritask.c @@ -7,7 +7,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -51,6 +51,23 @@ rtems_task Priority_task( rtems_test_exit( 0 ); } + /* special case of setting priority while holding a resource */ + { + rtems_task_priority priority; + rtems_task_priority old_priority; + + puts( "Set priority of self while holding resource" ); + status = + rtems_task_set_priority( RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority ); + directive_failed( status, "rtems_task_set_priority get current" ); + status = rtems_task_set_priority( RTEMS_SELF, priority, &old_priority ); + directive_failed( status, "rtems_task_set_priority with resource" ); + if ( priority != old_priority ) { + printf( "priority != old_priority (%d != %d)\n", priority, old_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 ); |