2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>

* sp09/screen12.c, sp09/sp09.scn, sp21/Makefile.am, sp35/priinv.c,
	sp39/init.c, sp50/init.c, sp57/init.c, sp72/init.c, sp73/init.c,
	spintrcritical01/init.c, spprivenv01/init.c, spsimplesched01/init.c,
	spsimplesched02/init.c: Remove warnings.
This commit is contained in:
Joel Sherrill
2011-05-05 16:45:57 +00:00
parent ff7ff62a0f
commit c0d7e23ce9
14 changed files with 110 additions and 90 deletions
+7
View File
@@ -1,3 +1,10 @@
2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen12.c, sp09/sp09.scn, sp21/Makefile.am, sp35/priinv.c,
sp39/init.c, sp50/init.c, sp57/init.c, sp72/init.c, sp73/init.c,
spintrcritical01/init.c, spprivenv01/init.c, spsimplesched01/init.c,
spsimplesched02/init.c: Remove warnings.
2011-04-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
* sp09/screen02.c: Use integer value that fits into one character.
+1 -46
View File
@@ -6,7 +6,7 @@
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-2009.
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -27,9 +27,6 @@ void Screen12()
void *segment_address_1;
void *segment_address_2;
void *segment_address_3;
uint32_t good_back_flag;
uint32_t good_front_flag;
uint32_t offset;
uintptr_t segment_size;
rtems_status_code status;
Heap_Information_block the_info;
@@ -400,48 +397,6 @@ void Screen12()
puts( "TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION" );
rtems_debug_disable( RTEMS_DEBUG_REGION );
#if 0
offset = (segment_address_1 - (void *)Region_good_area) / 4;
/* bad FRONT_FLAG error */
good_front_flag = Region_good_area[ offset - 1 ];
Region_good_area[ offset - 1 ] = good_front_flag + 2;
status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
fatal_directive_status(
status,
RTEMS_INVALID_ADDRESS,
"rtems_region_return_segment with back_flag != front_flag"
);
puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
Region_good_area[ offset - 1 ] = good_front_flag;
/* bad FRONT_FLAG error */
good_back_flag = Region_good_area[ offset - 2 ];
Region_good_area[ offset - 2 ] = 1024;
status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
fatal_directive_status(
status,
RTEMS_INVALID_ADDRESS,
"rtems_region_return_segment with back_flag != front_flag"
);
puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
Region_good_area[ offset - 2 ] = good_back_flag;
#else
offset = 0;
good_front_flag = 0;
good_back_flag = 0;
puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
#endif
puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" );
rtems_debug_enable( RTEMS_DEBUG_REGION );
-2
View File
@@ -273,8 +273,6 @@ TA1 - rtems_region_resize_segment - RTEMS_INVALID_ID
TA1 - rtems_region_return_segment - RTEMS_INVALID_ID
TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS
TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION
TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION
TA1 - rtems_region_extend - RTEMS_INVALID_ID
TA1 - rtems_region_extend - within heap - RTEMS_INVALID_ADDRESS
+1
View File
@@ -13,6 +13,7 @@ include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
AM_CPPFLAGS += -Wno-deprecated-declarations
LINK_OBJS = $(sp21_OBJECTS) $(sp21_LDADD)
LINK_LIBS = $(sp21_LDLIBS)
+17 -7
View File
@@ -243,17 +243,20 @@ void AccessLocalHw(void)
{
rtems_status_code Sts;
rtems_task_priority EnterPrio; /* Statistics log */
#if defined(TEST_PRINT_STATISTICS)
rtems_task_priority AccessPrio; /* : */
rtems_task_priority LeavePrio; /* : */
uint32_t EnterCnt; /* : */
uint32_t AccessCnt; /* : */
rtems_task_priority EnterPrio; /* Statistics log */
uint32_t EnterCnt; /* : */
rtems_task_priority LeavePrio; /* : */
uint32_t LeaveCnt; /* : */
#endif
#if defined(TEST_PRINT_STATISTICS)
/* Store information about the current situation */
EnterPrio = _Thread_Executing->current_priority;
EnterCnt = _Thread_Executing->resource_count;
#endif
printf(" AccessLocalHw called by %s\n", CallerName());
@@ -269,18 +272,20 @@ void AccessLocalHw(void)
Sts = rtems_semaphore_obtain(LocalHwSync_S, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
directive_failed( Sts, "rtems_semaphore_obtain(LocalHwAccess_R...)" );
#if defined(TEST_PRINT_STATISTICS)
/* Store information about the current situation */
AccessPrio = _Thread_Executing->current_priority;
AccessCnt = _Thread_Executing->resource_count;
#endif
Sts = rtems_semaphore_release(LocalHwAccess_R);
directive_failed( Sts, "rtems_semaphore_release(LocalHwAccess_R)" );
#if defined(TEST_PRINT_STATISTICS)
/* Store information about the current situation */
LeavePrio = _Thread_Executing->current_priority;
LeaveCnt = _Thread_Executing->resource_count;
#if defined(TEST_PRINT_STATISTICS)
printf(
" AccessLocalHw from %s statistics:\n"
" - Prio: %d -> %d -> %d\n - Cnt: %d -> %d -> %d\n",
@@ -304,17 +309,20 @@ void AccessRemoteHw(void)
{
rtems_status_code Sts;
#if defined(TEST_PRINT_STATISTICS)
rtems_task_priority EnterPrio; /* Statistics log */
rtems_task_priority AccessPrio; /* : */
rtems_task_priority LeavePrio; /* : */
uint32_t EnterCnt; /* : */
uint32_t AccessCnt; /* : */
uint32_t LeaveCnt; /* : */
#endif
#if defined(TEST_PRINT_STATISTICS)
/* Store information about the current situation */
EnterPrio = _Thread_Executing->current_priority;
EnterCnt = _Thread_Executing->resource_count;
#endif
printf("AccessRemoteHw called by %s\n", CallerName());
@@ -329,18 +337,20 @@ void AccessRemoteHw(void)
printf("AccessRemoteHw access local %s\n", CallerName());
AccessLocalHw();
#if defined(TEST_PRINT_STATISTICS)
/* Store information about the current situation */
AccessPrio = _Thread_Executing->current_priority;
AccessCnt = _Thread_Executing->resource_count;
#endif
Sts = rtems_semaphore_release(RemoteHwAccess_R);
directive_failed( Sts, "rtems_semaphore_release(RemoreHwAccess_R" );
#if defined(TEST_PRINT_STATISTICS)
/* Store information about the current situation */
LeavePrio = _Thread_Executing->current_priority;
LeaveCnt = _Thread_Executing->resource_count;
#if defined(TEST_PRINT_STATISTICS)
printf(
"\nAccessRemoteHw from %s statistics:\n"
" - Prio: %d -> %d -> %d\n - Cnt: %d -> %d -> %d\n",
+7 -3
View File
@@ -1,7 +1,7 @@
/*
* Classic API Signal to Task from ISR
*
* COPYRIGHT (c) 1989-2009.
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -44,17 +44,20 @@ rtems_timer_service_routine test_event_from_isr(
* This event send hits the critical section but sends to
* another task so doesn't impact this critical section.
*/
rtems_event_send( other_task, 0x02 );
status = rtems_event_send( other_task, 0x02 );
directive_failed( status, "event send" );
/*
* This event send hits the main task but doesn't satisfy
* it's blocking condition so it will still block
*/
rtems_event_send( main_task, 0x02 );
status = rtems_event_send( main_task, 0x02 );
directive_failed( status, "event send" );
case_hit = TRUE;
}
status = rtems_event_send( main_task, 0x01 );
directive_failed( status, "event send" );
}
rtems_timer_service_routine test_event_with_timeout_from_isr(
@@ -72,6 +75,7 @@ rtems_timer_service_routine test_event_with_timeout_from_isr(
case_hit = TRUE;
}
status = rtems_event_send( main_task, 0x01 );
directive_failed( status, "event send" );
}
rtems_task Init(
+5 -3
View File
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-2009.
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -20,17 +20,19 @@ volatile bool timerRan;
rtems_timer_service_routine Timer_Routine( rtems_id id, void *ignored )
{
rtems_status_code sc;
rtems_status_code status;
Fired++;
timerRan = true;
sc = rtems_timer_server_fire_after(
status = rtems_timer_server_fire_after(
id,
rtems_clock_get_ticks_per_second(),
Timer_Routine,
NULL
);
directive_failed( status, "fire after" );
}
rtems_task Init(
+2 -1
View File
@@ -1,6 +1,6 @@
/* Restart a task which is delaying
*
* COPYRIGHT (c) 1989-2009.
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -24,6 +24,7 @@ rtems_task Delay_task(
puts( "Delay - rtems_task_wake_after - OK" );
status = rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(2000) );
directive_failed( status, "wake after" );
puts( "ERROR - delay task woke up!!" );
rtems_test_exit(0);
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-2010.
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -30,6 +30,8 @@ rtems_task Test_task(
RTEMS_DEFAULT_OPTIONS,
rtems_clock_get_ticks_per_second() * 10
);
directive_failed( status, "obtain" );
}
rtems_task Init(
+23 -6
View File
@@ -31,6 +31,8 @@ rtems_task Test_task(
task_index = arg;
for ( ; ; ) {
status = rtems_clock_get_tod( &time );
directive_failed( status, "get tod" );
if ( time.second >= 15 ) {
puts( "*** END OF SP73 (YIELD) TEST ***" );
rtems_test_exit( 0 );
@@ -38,11 +40,12 @@ rtems_task Test_task(
put_name( Task_name[ task_index ], FALSE );
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
status = rtems_task_wake_after(
task_index * 5 * rtems_clock_get_ticks_per_second() );
task_index * 5 * rtems_clock_get_ticks_per_second()
);
directive_failed( status, "wake after" );
}
}
rtems_task Init(
rtems_task_argument argument
)
@@ -71,25 +74,39 @@ rtems_task Init(
Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
);
directive_failed( status, "create 1" );
status = rtems_task_create(
Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
);
directive_failed( status, "create 2" );
status = rtems_task_create(
Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
);
directive_failed( status, "create 3" );
status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
directive_failed( status, "start 1" );
rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
rtems_task_set_priority(Task_id[1], 1, &old);
status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
directive_failed( status, "start 2" );
rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
directive_failed( status, "start 3" );
status = rtems_task_set_priority(Task_id[1], 1, &old);
directive_failed( status, "set priority" );
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
directive_failed( status, "wake after" );
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "delete" );
}
/* configuration information */
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-2009.
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -82,7 +82,9 @@ rtems_timer_service_routine test_release_from_isr(
if ( getState() == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
case_hit = true;
}
status = rtems_semaphore_release( Semaphore );
directive_failed( status, "release" );
}
+9 -8
View File
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-2010.
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -20,11 +20,12 @@
rtems_task task_routine( rtems_task_argument not_used )
{
int sc = 0;
rtems_status_code sc;
puts( "task_routine - setting up a private environment" );
sc = rtems_libio_set_private_env();
directive_failed( sc, "set private env" );
sleep( 1 );
rtems_task_delete( RTEMS_SELF );
@@ -34,12 +35,12 @@ rtems_task Init(
rtems_task_argument argument
)
{
int sc = 0;
bool status = 0;
void *alloc_ptr = (void *)0;
rtems_id current_task_id;
rtems_id task_id;
rtems_name another_task_name;
rtems_status_code sc;
bool status;
void *alloc_ptr;
rtems_id current_task_id;
rtems_id task_id;
rtems_name another_task_name;
Heap_Information_block Info;
puts( "\n\n*** TEST USER ENVIRONMENT ROUTINE - 01 ***" );
+29 -9
View File
@@ -25,15 +25,18 @@ rtems_task Test_task(
rtems_task_argument unused
)
{
rtems_id tid;
rtems_time_of_day time;
uint32_t task_index;
rtems_status_code status;
rtems_id tid;
rtems_time_of_day time;
uint32_t task_index;
rtems_status_code status;
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "task ident" );
task_index = task_number( tid );
for ( ; ; ) {
status = rtems_clock_get_tod( &time );
directive_failed( status, "clock get tod" );
if ( time.second >= 35 ) {
puts( "*** END OF SIMPLE01 TEST ***" );
rtems_test_exit( 0 );
@@ -41,7 +44,9 @@ rtems_task Test_task(
put_name( Task_name[ task_index ], FALSE );
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
status = rtems_task_wake_after(
task_index * 5 * rtems_clock_get_ticks_per_second() );
task_index * 5 * rtems_clock_get_ticks_per_second()
);
directive_failed( status, "wake after" );
}
}
@@ -73,28 +78,43 @@ rtems_task Init(
Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
);
directive_failed( status, "create 1" );
status = rtems_task_create(
Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
);
directive_failed( status, "create 2" );
status = rtems_task_create(
Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
);
directive_failed( status, "create 3" );
status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
directive_failed( status, "start 1" );
rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
directive_failed( status, "start 2" );
rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
directive_failed( status, "start 3" );
rtems_task_set_priority(Task_id[1], 2, &old);
rtems_task_set_priority(Task_id[2], 2, &old);
rtems_task_set_priority(Task_id[3], 2, &old);
status = rtems_task_set_priority( Task_id[1], 2, &old );
directive_failed( status, "set priority 1" );
status = rtems_task_set_priority( Task_id[2], 2, &old );
directive_failed( status, "set priority 2" );
status = rtems_task_set_priority( Task_id[3], 2, &old );
directive_failed( status, "set priority 3" );
rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
directive_failed( status, "yield" );
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "delete self" );
}
/* configuration information */
+3 -3
View File
@@ -28,14 +28,14 @@ rtems_task Test_task(
)
{
rtems_id tid;
uint32_t task_index;
rtems_status_code status;
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
task_index = task_number( tid );
directive_failed( status, "wake after" );
for ( ; ; ) {
rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
directive_failed( status, "yield" );
}
}