* sp59/init.c, sp59/sp59.scn: Added status code assignment. Fixed typos.
	* sp63/init.c: Check return value of _Heap_Initialize().
This commit is contained in:
Joel Sherrill
2009-08-26 02:13:38 +00:00
parent 6749520127
commit bd039332dd
4 changed files with 17 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
2009-08-25 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* sp59/init.c, sp59/sp59.scn: Added status code assignment. Fixed typos.
* sp63/init.c: Check return value of _Heap_Initialize().
2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* spwatchdog/spwatchdog.scn, spwatchdog/task1.c: Add test for

View File

@@ -23,7 +23,7 @@ rtems_task Blocking_task(
void *address_1;
puts( "Blocking_task - wait for memory" );
rtems_region_get_segment(
status = rtems_region_get_segment(
Region,
ALLOC_SIZE,
RTEMS_DEFAULT_OPTIONS,
@@ -79,7 +79,7 @@ rtems_task Init(
);
directive_failed( status, "rtems_region_create of RN1" );
puts( "TA1 - rtems_region_get_segment - get segment to consume memory" );
puts( "Init - rtems_region_get_segment - get segment to consume memory" );
rtems_region_get_segment(
Region,
ALLOC_SIZE,
@@ -93,7 +93,7 @@ rtems_task Init(
status = rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(1000) );
directive_failed( status, "rtems_task_wake_after" );
puts( "Init1 - rtems_region_get_segment - return segment" );
puts( "Init - rtems_region_get_segment - return segment" );
status = rtems_region_return_segment( Region, address_1 );
directive_failed( status, "rtems_region_return_segment" );

View File

@@ -3,10 +3,10 @@ Init - blocking task priority will be 220
Init - rtems_task_create - delay task - OK
Init - rtems_task_start - delay task - OK
Init - rtems_region_create - OK
TA1 - rtems_region_get_segment - get segment to consume memory
Init - rtems_region_get_segment - get segment to consume memory
Init - rtems_task_wake_after - let other task block - OK
Blocking_task - wait for memory
Init1 - rtems_region_get_segment - return segment
Init - rtems_region_get_segment - return segment
Init - rtems_task_wake_after - let other task run again - OK
Blocking_task - Got memory segment after freed
Blocking_task - delete self

View File

@@ -30,6 +30,7 @@ void test_case_one(void)
puts( "Init - _Heap_Initialize (for test one) - OK" );
heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 );
printf( "Init - Heap size=%d\n", heap_size );
assert( heap_size );
puts( "Init - _Heap_Allocate - too large size (overflow)- not OK");
ptr1 = _Heap_Allocate( &Heap, 0xffffffff );
@@ -59,6 +60,7 @@ void test_case_two(void)
puts( "\nInit - _Heap_Initialize (for test two) - OK" );
heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 );
printf( "Init - Heap size=%d\n", heap_size );
assert( heap_size );
puts( "Init - _Heap_Allocate_aligned - OK");
ptr1 = _Heap_Allocate_aligned( &Heap, 64, 4 );
@@ -97,9 +99,11 @@ void test_case_three(void)
for ( alloc=4 ; alloc < sizeof(Memory)/2 ; alloc+=4 ) {
heap_size =
_Heap_Initialize( &Heap, &Memory[sz], sizeof(Memory)/2, 1 << pg );
do {
ptr1 = _Heap_Allocate_aligned( &Heap, alloc, 1 <<al );
} while ( ptr1 );
if ( heap_size != 0 ) {
do {
ptr1 = _Heap_Allocate_aligned( &Heap, alloc, 1 <<al );
} while ( ptr1 );
}
}
}
}