mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-28 15:30:17 +00:00
2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* sp43/init.c, sp43/sp43.scn: Add test of having the object class pointer being null. This does not happen naturally at this time so force the point.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* sp43/init.c, sp43/sp43.scn: Add test of having the object class
|
||||
pointer being null. This does not happen naturally at this time so
|
||||
force the point.
|
||||
|
||||
2009-07-08 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* sp12/sp12.scn: Update screen to reflect priority changes from long
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
@@ -399,7 +400,45 @@ rtems_task Init(
|
||||
directive_failed( status, "rtems_object_get_class_information" );
|
||||
print_class_info( OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TIMERS, &info );
|
||||
|
||||
/*
|
||||
* Ugly hack to force a weird error
|
||||
*/
|
||||
{
|
||||
rtems_status_code sc;
|
||||
rtems_task_priority old_priority;
|
||||
void *tmp;
|
||||
int class;
|
||||
int api;
|
||||
|
||||
class = OBJECTS_INTERNAL_API;
|
||||
api = OBJECTS_INTERNAL_THREADS;
|
||||
|
||||
puts( "rtems_task_set_priority - use valid Idle thread id" );
|
||||
sc = rtems_task_set_priority(
|
||||
rtems_build_id( class, api, 1, 1 ),
|
||||
RTEMS_CURRENT_PRIORITY,
|
||||
&old_priority
|
||||
);
|
||||
directive_failed( sc, "rtems_task_set_priority" );
|
||||
|
||||
/* destroy class pointer */
|
||||
puts( "rtems_task_set_priority - clobber internal thread class info" );
|
||||
tmp = _Objects_Information_table[ class ][ api ];
|
||||
_Objects_Information_table[ class ][ api ] = NULL;
|
||||
|
||||
puts( "rtems_task_set_priority - use valid Idle thread id again" );
|
||||
sc = rtems_task_set_priority(
|
||||
rtems_build_id( class, api, 1, 1 ),
|
||||
RTEMS_CURRENT_PRIORITY,
|
||||
&old_priority
|
||||
);
|
||||
fatal_directive_status( sc, RTEMS_INVALID_ID, "rtems_task_set_priority" );
|
||||
|
||||
/* restore pointer */
|
||||
puts( "rtems_task_set_priority - restore internal thread class info" );
|
||||
_Objects_Information_table[ class ][ api ] = tmp;
|
||||
}
|
||||
|
||||
puts( "*** END OF TEST 43 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -83,4 +83,8 @@ Classic API Timer Information
|
||||
minimum id : 0x12010001 maximum id: 0x12010001
|
||||
maximum : 1 available : 1
|
||||
auto_extend : no
|
||||
rtems_task_set_priority - use valid Idle thread id
|
||||
rtems_task_set_priority - clobber internal thread class info
|
||||
rtems_task_set_priority - use valid Idle thread id again
|
||||
rtems_task_set_priority - restore internal thread class info
|
||||
*** END OF TEST 43 ***
|
||||
|
||||
Reference in New Issue
Block a user