forked from Imagelibrary/rtems
2009-05-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp04/system.h, sp04/task1.c, sp04/tswitch.c, sp07/init.c, sp12/init.c, sp13/putbuff.c, sp13/system.h, sp13/task1.c, sp15/init.c, sp16/system.h, sp19/fptask.c, sp25/system.h, sp26/task1.c, sp27/init.c, sp28/init.c, sp29/init.c, sp31/task1.c, sp33/init.c, sp34/changepri.c, sp35/priinv.c, sp37/init.c, sp38/init.c, sp39/init.c, sp41/init.c, sp42/init.c, sp43/init.c, sp44/init.c, sp45/init.c, sp46/init.c, sp47/init.c, sp48/init.c, spfatal03/testcase.h, spfatal05/testcase.h, spfatal06/testcase.h, spfatal_support/system.h, spobjgetnext/init.c, spsize/getint.c, spsize/size.c: Fix warnings.
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
2009-05-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* sp04/system.h, sp04/task1.c, sp04/tswitch.c, sp07/init.c,
|
||||
sp12/init.c, sp13/putbuff.c, sp13/system.h, sp13/task1.c,
|
||||
sp15/init.c, sp16/system.h, sp19/fptask.c, sp25/system.h,
|
||||
sp26/task1.c, sp27/init.c, sp28/init.c, sp29/init.c, sp31/task1.c,
|
||||
sp33/init.c, sp34/changepri.c, sp35/priinv.c, sp37/init.c,
|
||||
sp38/init.c, sp39/init.c, sp41/init.c, sp42/init.c, sp43/init.c,
|
||||
sp44/init.c, sp45/init.c, sp46/init.c, sp47/init.c, sp48/init.c,
|
||||
spfatal03/testcase.h, spfatal05/testcase.h, spfatal06/testcase.h,
|
||||
spfatal_support/system.h, spobjgetnext/init.c, spsize/getint.c,
|
||||
spsize/size.c: Fix warnings.
|
||||
|
||||
2009-05-07 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac: Add initial test of _Objects_Get_next.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -69,13 +69,13 @@ TEST_EXTERN volatile uint32_t Run_count[ 4 ];
|
||||
*/
|
||||
|
||||
struct taskSwitchLog {
|
||||
int taskIndex;
|
||||
unsigned int taskIndex;
|
||||
rtems_time_of_day when;
|
||||
};
|
||||
|
||||
extern struct taskSwitchLog taskSwitchLog[];
|
||||
extern int taskSwitchLogIndex;
|
||||
volatile extern int testsFinished;
|
||||
extern unsigned int taskSwitchLogIndex;
|
||||
extern volatile int testsFinished;
|
||||
|
||||
|
||||
/* end of include file */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -23,8 +23,8 @@
|
||||
static void
|
||||
showTaskSwitches (void)
|
||||
{
|
||||
int i;
|
||||
int switches = taskSwitchLogIndex;
|
||||
unsigned int i;
|
||||
unsigned int switches = taskSwitchLogIndex;
|
||||
|
||||
for (i = 0 ; i < switches ; i++) {
|
||||
put_name( Task_name[taskSwitchLog[i].taskIndex], FALSE );
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "system.h"
|
||||
|
||||
struct taskSwitchLog taskSwitchLog[1000];
|
||||
int taskSwitchLogIndex;
|
||||
unsigned int taskSwitchLogIndex;
|
||||
volatile int testsFinished;
|
||||
|
||||
rtems_extension Task_switch(
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -132,7 +132,7 @@ rtems_task Init(
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA2" );
|
||||
|
||||
#define TA3_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 4)
|
||||
#define TA3_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 4u)
|
||||
status = rtems_task_create(
|
||||
Task_name[ 3 ],
|
||||
TA3_PRIORITY,
|
||||
@@ -143,7 +143,7 @@ rtems_task Init(
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA3" );
|
||||
|
||||
#define TA4_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1)
|
||||
#define TA4_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1u)
|
||||
status = rtems_task_create(
|
||||
Task_name[ 4 ],
|
||||
TA4_PRIORITY,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -79,7 +79,7 @@ rtems_task Init(
|
||||
Priority_test_driver( 0 );
|
||||
|
||||
puts( "INIT - Backward priority queue test" );
|
||||
Priority_test_driver( (RTEMS_MAXIMUM_PRIORITY / 2) + 1 );
|
||||
Priority_test_driver( (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u );
|
||||
|
||||
rtems_test_pause();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -21,15 +21,16 @@
|
||||
#include "system.h"
|
||||
|
||||
void Put_buffer(
|
||||
long *buffer
|
||||
void *buffer
|
||||
)
|
||||
{
|
||||
int i, j;
|
||||
char c;
|
||||
long *b = buffer;
|
||||
|
||||
for ( i = 0; i < MESSAGE_SIZE / sizeof(long); i++ ) {
|
||||
for ( i = 0; i < (int) (MESSAGE_SIZE / sizeof(long)); i++ ) {
|
||||
for ( j = sizeof(long) - 1; j >= 0; j-- ) {
|
||||
if ( (c = (buffer[i] >> (8 * j)) & 0xFF) == 0 )
|
||||
if ( (c = (char)(b[i] >> (8 * j)) & 0xFF) == 0 )
|
||||
return;
|
||||
printf( "%c", c );
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-20007.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -27,7 +27,7 @@ void Fill_buffer(
|
||||
);
|
||||
|
||||
void Put_buffer(
|
||||
long *buffer
|
||||
void *buffer
|
||||
);
|
||||
|
||||
rtems_task Task_1(
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,26 +20,33 @@
|
||||
#include "system.h"
|
||||
#include <string.h> /* for memcmp */
|
||||
|
||||
void dope_buffer(
|
||||
unsigned char *buff,
|
||||
int buff_size,
|
||||
unsigned char v
|
||||
);
|
||||
|
||||
unsigned char big_send_buffer[2048];
|
||||
unsigned char big_receive_buffer[2048];
|
||||
|
||||
long buffer[ MESSAGE_SIZE / sizeof(long) ];
|
||||
|
||||
void dope_buffer(unsigned char *buff,
|
||||
int buff_size,
|
||||
uint32_t v)
|
||||
void dope_buffer(
|
||||
unsigned char *buff,
|
||||
int buff_size,
|
||||
unsigned char v
|
||||
)
|
||||
{
|
||||
int i;
|
||||
unsigned char ch;
|
||||
int i;
|
||||
unsigned char ch;
|
||||
|
||||
ch = (' ' + (v % (0x7f - ' ')));
|
||||
ch = (' ' + (v % (0x7f - ' ')));
|
||||
|
||||
for (i=0; i<buff_size; i++)
|
||||
{
|
||||
*buff++ = ch++;
|
||||
if (ch >= 0x7f)
|
||||
ch = ' ';
|
||||
}
|
||||
for (i=0; i<buff_size; i++) {
|
||||
*buff++ = ch++;
|
||||
if (ch >= 0x7f)
|
||||
ch = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
rtems_task Task_1(
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -39,7 +39,7 @@ rtems_task Init(
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
4,
|
||||
4u,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -68,7 +68,7 @@ TEST_EXTERN uint8_t Area_2[4096] CPU_STRUCTURE_ALIGNMENT;
|
||||
TEST_EXTERN uint8_t Area_3[4096] CPU_STRUCTURE_ALIGNMENT;
|
||||
TEST_EXTERN uint8_t Area_4[8192] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
#define BASE_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
|
||||
#define BASE_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2u) + 1u)
|
||||
|
||||
#define Put_address_from_area_1( _to_be_printed ) \
|
||||
printf( "0x%08lx", \
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -52,7 +52,7 @@ rtems_task FP_task(
|
||||
printf( " - float base = (NA)\n" );
|
||||
#endif
|
||||
|
||||
previous_seconds = -1;
|
||||
previous_seconds = (uint32_t)-1;
|
||||
|
||||
while( FOREVER ) {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -47,7 +47,7 @@ TEST_EXTERN rtems_name Region_name[ 2 ]; /* array of region names */
|
||||
/* test will fail... segment sizes need to be reworked for <=32K buffer */
|
||||
TEST_EXTERN uint8_t Area_1[20*1024] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
#define BASE_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
|
||||
#define BASE_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2u) + 1u)
|
||||
|
||||
#define Put_address_from_area_1( _to_be_printed ) \
|
||||
printf( "0x%08lx", \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -85,7 +85,7 @@ createTask (char c, rtems_id *tid)
|
||||
rtems_status_code sc;
|
||||
|
||||
sc = rtems_task_create (rtems_build_name('S','u','b',c),
|
||||
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||
RTEMS_MAXIMUM_PRIORITY - 1u,
|
||||
RTEMS_MINIMUM_STACK_SIZE * 4,
|
||||
RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
|
||||
RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
/*
|
||||
* Test for rtems_semaphore_flush
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* 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 <bsp.h>
|
||||
|
||||
rtems_task Init (rtems_task_argument argument);
|
||||
void starttask(int arg);
|
||||
rtems_task subtask(rtems_task_argument arg);
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
@@ -64,7 +73,7 @@ starttask (int arg)
|
||||
printf ("Can't create task: %s\n", rtems_status_text (sc));
|
||||
rtems_task_suspend (RTEMS_SELF);
|
||||
}
|
||||
sc = rtems_task_start (tid, subtask, arg);
|
||||
sc = rtems_task_start (tid, subtask, (rtems_task_argument) arg);
|
||||
if (sc != RTEMS_SUCCESSFUL) {
|
||||
printf ("Can't start task: %s\n", rtems_status_text (sc));
|
||||
rtems_task_suspend (RTEMS_SELF);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* 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.
|
||||
@@ -28,6 +31,17 @@ rtems_task Init(rtems_task_argument argument);
|
||||
#include <rtems/error.h>
|
||||
#include <stdio.h>
|
||||
|
||||
rtems_task subtask(rtems_task_argument arg);
|
||||
rtems_task Task_variable_deleter(rtems_task_argument ignored);
|
||||
void starttask(int arg);
|
||||
void test_errors(void);
|
||||
void test_dtor(void *pointer);
|
||||
void test_multiple_taskvars(void);
|
||||
void test_out_of_memory(void);
|
||||
rtems_task Other_Task(rtems_task_argument ignored);
|
||||
void test_delete_from_other_task(void);
|
||||
void test_delete_as_side_effect(void);
|
||||
|
||||
volatile void *taskvar;
|
||||
volatile int nRunning;
|
||||
volatile int nDeleted;
|
||||
@@ -96,7 +110,7 @@ starttask (int arg)
|
||||
rtems_status_code sc;
|
||||
|
||||
sc = rtems_task_create(rtems_build_name ('S', 'R', 'V', arg + 'A'),
|
||||
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||
RTEMS_MAXIMUM_PRIORITY - 1u,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
|
||||
RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
|
||||
@@ -280,7 +294,7 @@ void test_delete_from_other_task(void)
|
||||
directive_failed( sc, "add for other task case" );
|
||||
|
||||
sc = rtems_task_create(rtems_build_name ('O', 'T', 'H', 'R'),
|
||||
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||
RTEMS_MAXIMUM_PRIORITY - 1u,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
|
||||
RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
|
||||
@@ -327,7 +341,7 @@ void test_delete_as_side_effect(void)
|
||||
test_dtor_ran = 0;
|
||||
|
||||
sc = rtems_task_create(rtems_build_name ('O', 'T', 'H', 'R'),
|
||||
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||
RTEMS_MAXIMUM_PRIORITY - 1u,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
|
||||
RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/*
|
||||
* Test for rtems_semaphore_flush
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -26,6 +30,8 @@ rtems_task Init (rtems_task_argument argument);
|
||||
#include <stdlib.h>
|
||||
|
||||
rtems_interval ticksPerSecond;
|
||||
rtems_task subtask(rtems_task_argument arg);
|
||||
void startTask(rtems_id arg);
|
||||
|
||||
rtems_task
|
||||
subtask (rtems_task_argument arg)
|
||||
@@ -49,7 +55,7 @@ startTask (rtems_id arg)
|
||||
rtems_status_code sc;
|
||||
|
||||
sc = rtems_task_create (rtems_build_name ('S', 'R', 'V', 'A'),
|
||||
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||
RTEMS_MAXIMUM_PRIORITY - 1u,
|
||||
RTEMS_MINIMUM_STACK_SIZE * 2,
|
||||
RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
|
||||
RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
|
||||
@@ -172,11 +178,11 @@ rtems_task Init (rtems_task_argument ignored)
|
||||
|
||||
sc = rtems_semaphore_obtain (semnorec, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
|
||||
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
|
||||
diff = now - then;
|
||||
diff = (int) (now - then);
|
||||
then = now;
|
||||
if (sc != RTEMS_SUCCESSFUL)
|
||||
printf ("%d: Failed to obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
|
||||
else if (diff < (2 * ticksPerSecond))
|
||||
else if (diff < (int) (2 * ticksPerSecond))
|
||||
printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks not %d ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2002.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,6 +20,11 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_timer_service_routine Should_not_fire_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
);
|
||||
|
||||
volatile int TSR_fired;
|
||||
|
||||
rtems_timer_service_routine Should_not_fire_TSR(
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
/* spmonotonic -- sanity check the rate monotonic manager
|
||||
/*
|
||||
* spmonotonic -- sanity check the rate monotonic manager
|
||||
*
|
||||
* 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 .
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* 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$
|
||||
*/
|
||||
@@ -22,6 +26,10 @@ rtems_task Init (rtems_task_argument ignored);
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
rtems_task Waiter(
|
||||
rtems_task_argument number
|
||||
);
|
||||
|
||||
rtems_id Barrier;
|
||||
|
||||
int SuccessfulCase;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
* Test program to demonstrate reordering of threads on thread queues
|
||||
* when their priority changes.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -24,11 +28,13 @@
|
||||
#include "tmacros.h"
|
||||
|
||||
rtems_task BlockingTasks(rtems_task_argument arg);
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
const char *CallerName(void);
|
||||
|
||||
/*
|
||||
* CallerName -- print the calling tasks name or id as configured
|
||||
*/
|
||||
const char *CallerName()
|
||||
const char *CallerName(void)
|
||||
{
|
||||
static char buffer[32];
|
||||
#if defined(TEST_PRINT_TASK_ID)
|
||||
@@ -110,7 +116,7 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
for (i = 0; i < NUMBER_OF_BLOCKING_TASKS; i++) {
|
||||
status = rtems_task_create(
|
||||
rtems_build_name('B','L','K','0'+i), /* Name */
|
||||
2+i, /* Priority */
|
||||
(rtems_task_priority) 2+i, /* Priority */
|
||||
RTEMS_MINIMUM_STACK_SIZE*2, /* Stack size (8KB) */
|
||||
RTEMS_DEFAULT_MODES | RTEMS_NO_ASR, /* Mode */
|
||||
RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, /* Attributes */
|
||||
@@ -118,7 +124,11 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
directive_failed( status, "rtems_task_create (BLKn)" );
|
||||
|
||||
printf( "Blockers[%d] Id = 0x%08x\n", i, Blockers[i] );
|
||||
status = rtems_task_start(Blockers[i], BlockingTasks, i);
|
||||
status = rtems_task_start(
|
||||
Blockers[i],
|
||||
BlockingTasks,
|
||||
(rtems_task_argument)i
|
||||
);
|
||||
directive_failed( status, "rtems_task_start (BLKn)" );
|
||||
}
|
||||
|
||||
@@ -128,7 +138,9 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
puts( "rtems_task_set_priority -- invert priorities of tasks" );
|
||||
for (i = 0; i < NUMBER_OF_BLOCKING_TASKS; i++) {
|
||||
rtems_task_priority opri;
|
||||
rtems_task_priority npri= 2 + NUMBER_OF_BLOCKING_TASKS - i - 1;
|
||||
rtems_task_priority npri;
|
||||
|
||||
npri = (rtems_task_priority) (2 + NUMBER_OF_BLOCKING_TASKS - i - 1);
|
||||
|
||||
status = rtems_task_set_priority(Blockers[i], npri, &opri);
|
||||
directive_failed( status, "rtems_task_set_priority" );
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
* e-mail: ulf.ivraeus@space.se
|
||||
* ----------------------------- --- -- - - -
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -56,7 +60,10 @@
|
||||
volatile uint32_t Iterations = 0;
|
||||
#endif
|
||||
|
||||
const char *CallerName(void);
|
||||
|
||||
/* Task entry point prototypes */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
rtems_task Medium_Exec(rtems_task_argument TaskArg);
|
||||
rtems_task Low_Exec(rtems_task_argument TaskArg);
|
||||
rtems_task High_Exec(rtems_task_argument TaskArg);
|
||||
@@ -69,7 +76,7 @@ rtems_isr LocalHwIsr(/*in*/ rtems_vector_number Vector);
|
||||
void AccessLocalHw(void);
|
||||
void AccessRemoteHw(void);
|
||||
|
||||
const char *CallerName()
|
||||
const char *CallerName(void)
|
||||
{
|
||||
static char buffer[32];
|
||||
#if defined(TEST_PRINT_TASK_ID)
|
||||
@@ -410,7 +417,7 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
|
||||
/* -- Medium-prio Test Tasks --- */
|
||||
for (i = 0; i < NofMediumTask_C; i++) {
|
||||
#define MEDIUM_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
|
||||
#define MEDIUM_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2u) + 1u)
|
||||
status = rtems_task_create(
|
||||
rtems_build_name('M','E','D','0'+i), /* Name */
|
||||
MEDIUM_PRIORITY, /* Priority */
|
||||
@@ -421,12 +428,16 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
directive_failed( status, "rtems_task_create (MEDn)" );
|
||||
|
||||
printf( "TaMedium[%d] Id = 0x%08x\n", i, TaMedium[i] );
|
||||
status = rtems_task_start(TaMedium[i], Medium_Exec, i);
|
||||
status = rtems_task_start(
|
||||
TaMedium[i],
|
||||
Medium_Exec,
|
||||
(rtems_task_argument) i
|
||||
);
|
||||
directive_failed( status, "rtems_task_start (MEDn)" );
|
||||
}
|
||||
|
||||
/* -- High-prio Test Task --- */
|
||||
#define HIGH_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2))
|
||||
#define HIGH_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2u))
|
||||
status = rtems_task_create(
|
||||
rtems_build_name('H','I','G','H'), /* Name */
|
||||
HIGH_PRIORITY, /* Priority */
|
||||
@@ -441,7 +452,7 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
directive_failed( status, "rtems_task_start (HIGH)" );
|
||||
|
||||
/* -- Low-prio Test Task --- */
|
||||
#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1)
|
||||
#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1u)
|
||||
status = rtems_task_create(
|
||||
rtems_build_name('L','O','W',' '), /* Name */
|
||||
LOW_PRIORITY, /* Priority */
|
||||
@@ -456,7 +467,7 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
directive_failed( status, "rtems_task_start (LOW)" );
|
||||
|
||||
/* -- HW Simulator Task --- */
|
||||
#define HWTASK_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2)
|
||||
#define HWTASK_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2u)
|
||||
status = rtems_task_create(
|
||||
rtems_build_name('H','W','S','M'), /* Name */
|
||||
HWTASK_PRIORITY, /* Priority */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Interrupt Disable/Enable Tests
|
||||
* Clock Tick from task level
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -16,6 +16,28 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
/* prototypes */
|
||||
void test_interrupt_inline(void);
|
||||
void check_isr_in_progress_inline(void);
|
||||
rtems_task blocked_task(rtems_task_argument argument);
|
||||
rtems_timer_service_routine test_unblock_task(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
rtems_timer_service_routine test_unblock_task(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
void check_isr_worked(
|
||||
char *s,
|
||||
int result
|
||||
);
|
||||
rtems_timer_service_routine test_isr_in_progress(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
|
||||
/* test bodies */
|
||||
void test_interrupt_inline(void)
|
||||
{
|
||||
rtems_interrupt_level level;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Classic API Signal to Task from ISR
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,6 +18,11 @@ volatile bool signal_sent;
|
||||
volatile bool signal_processed;
|
||||
|
||||
rtems_id main_task;
|
||||
void signal_handler(rtems_signal_set signals);
|
||||
rtems_timer_service_routine test_signal_from_isr(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
|
||||
void signal_handler(
|
||||
rtems_signal_set signals
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Classic API Signal to Task from ISR
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -14,6 +14,15 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_timer_service_routine test_event_from_isr(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
rtems_timer_service_routine test_event_with_timeout_from_isr(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
|
||||
volatile bool case_hit;
|
||||
|
||||
rtems_id main_task;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Classic API Signal to Task from ISR
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,6 +20,17 @@ volatile bool case_hit;
|
||||
rtems_id main_task;
|
||||
rtems_id Semaphore;
|
||||
|
||||
/* prototypes */
|
||||
Thread_blocking_operation_States getState(void);
|
||||
rtems_timer_service_routine test_release_from_isr(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
rtems_timer_service_routine test_release_with_timeout_from_isr(
|
||||
rtems_id timer,
|
||||
void *arg
|
||||
);
|
||||
|
||||
Thread_blocking_operation_States getState(void)
|
||||
{
|
||||
Objects_Locations location;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Exercise thread queue enqueue and dequeue priority
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,6 +20,13 @@
|
||||
|
||||
#define MAX_TASKS 20
|
||||
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
rtems_task Locker_task(rtems_task_argument unused);
|
||||
void do_test(
|
||||
rtems_attribute attr,
|
||||
bool extract /* TRUE if extract, not release */
|
||||
);
|
||||
|
||||
/*
|
||||
* Carefully chosen to exercise threadq enqueue/dequeue priority logic.
|
||||
* Somewhat randomly sorted to ensure than if discipline is FIFO, run-time
|
||||
@@ -108,7 +115,8 @@ void do_test(
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
status = rtems_task_start( Task_id[ i ], Locker_task, i );
|
||||
status = rtems_task_start(
|
||||
Task_id[ i ], Locker_task, (rtems_task_argument)i );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
status = rtems_task_wake_after( 10 );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Exercise Object Manager Services
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -23,6 +23,17 @@
|
||||
#undef rtems_object_id_get_index
|
||||
#undef rtems_object_id_get_node
|
||||
|
||||
void print_class_info(
|
||||
uint32_t api,
|
||||
uint32_t class,
|
||||
rtems_object_api_class_information *info
|
||||
);
|
||||
void change_name(
|
||||
rtems_id id,
|
||||
const char *newName,
|
||||
bool printable
|
||||
);
|
||||
|
||||
rtems_id main_task;
|
||||
rtems_name main_name;
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
rtems_task TaskAB_entry(rtems_task_argument me);
|
||||
|
||||
/*** Task priorities ***/
|
||||
#define TASK_A_PRIORITY 10
|
||||
#define TASK_B_PRIORITY 10
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -11,6 +11,14 @@
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_timer_service_routine Malloc_From_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
);
|
||||
|
||||
rtems_id Timer_id[ 3 ]; /* array of timer ids */
|
||||
rtems_name Timer_name[ 3 ]; /* array of timer names */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -12,6 +12,13 @@
|
||||
#include <tmacros.h>
|
||||
#include <rtems/cpuuse.h>
|
||||
|
||||
rtems_task Periodic_Task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
|
||||
volatile int partial_loop = 0;
|
||||
|
||||
rtems_task Periodic_Task(
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
rtems_task test_asr(rtems_task_argument unused);
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
|
||||
rtems_task test_asr(rtems_task_argument unused)
|
||||
{
|
||||
rtems_mode mode;
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
/*
|
||||
* Verify creation of semaphores with unlimited attribute works.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* 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>
|
||||
#include <rtems/libcsupport.h>
|
||||
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
|
||||
#define MAX 5000
|
||||
rtems_id Semaphores[MAX];
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
/*
|
||||
* Classic API Init task create failure
|
||||
* Classic API Init task create failure
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* 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$
|
||||
*/
|
||||
@@ -34,12 +41,10 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
|
||||
rtems_id Mutex_id[1];
|
||||
rtems_name Mutex_name[1];
|
||||
|
||||
void force_error()
|
||||
void force_error(void)
|
||||
{
|
||||
ISR_Level level;
|
||||
rtems_status_code status;
|
||||
|
||||
|
||||
Mutex_name[0] = rtems_build_name( 'S','0',' ',' ');
|
||||
status = rtems_semaphore_create(
|
||||
Mutex_name[0],
|
||||
@@ -60,7 +65,6 @@ void force_error()
|
||||
/* !!! SHOULD NOT RETURN FROM THE ABOVE CALL */
|
||||
|
||||
_Thread_Enable_dispatch();
|
||||
_ISR_Enable( level );
|
||||
directive_failed( status, "rtems_semaphore_obtain" );
|
||||
|
||||
/* we will not run this far */
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
/*
|
||||
* Classic API Init task create failure
|
||||
* Classic API Init task create failure
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* 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$
|
||||
*/
|
||||
@@ -31,6 +38,8 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
|
||||
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
|
||||
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_THREAD_EXITTED
|
||||
|
||||
rtems_task EmptyTask( rtems_task_argument unused );
|
||||
|
||||
rtems_task EmptyTask(
|
||||
rtems_task_argument unused
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Classic API Init task create failure
|
||||
* Classic API Init task create failure
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
@@ -36,6 +36,8 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
|
||||
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
|
||||
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_BAD_STACK_HOOK
|
||||
|
||||
void *New_stack_allocate_hook(uint32_t unused);
|
||||
|
||||
void *New_stack_allocate_hook(uint32_t unused)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -32,7 +32,18 @@ rtems_extension Fatal_extension(
|
||||
uint32_t error
|
||||
);
|
||||
|
||||
/* need prototypes */
|
||||
void Put_Error(
|
||||
uint32_t source,
|
||||
uint32_t error
|
||||
);
|
||||
|
||||
void Put_Source(
|
||||
uint32_t source
|
||||
);
|
||||
|
||||
void force_error(void);
|
||||
|
||||
/* need some prototypes for test cases */
|
||||
|
||||
#include "testcase.h"
|
||||
|
||||
|
||||
@@ -15,7 +15,14 @@
|
||||
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 1
|
||||
#include "system.h"
|
||||
|
||||
/* prototypes */
|
||||
int scan_objects(
|
||||
Objects_Information *information,
|
||||
Objects_Id start
|
||||
);
|
||||
|
||||
#define MAX_SCAN 10
|
||||
|
||||
int scan_objects(
|
||||
Objects_Information *information,
|
||||
Objects_Id start
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Output parameters:
|
||||
* returns - number read
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int getint( void );
|
||||
|
||||
int getint( void )
|
||||
{
|
||||
char buff[16];
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/* main
|
||||
*
|
||||
/*
|
||||
* This program is run to determine the data space and work space
|
||||
* requirements of the current version of RTEMS.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -52,6 +51,10 @@
|
||||
|
||||
/* external function prototypes */
|
||||
int getint( void );
|
||||
void size_rtems(int mode);
|
||||
void help_size(void);
|
||||
void print_formula(void);
|
||||
|
||||
|
||||
/* These are always defined by the executive.
|
||||
*
|
||||
@@ -134,9 +137,6 @@ extern CORE_semaphore_Control _MPCI_Semaphore;
|
||||
|
||||
uint32_t sys_req;
|
||||
|
||||
void help_size();
|
||||
void print_formula();
|
||||
|
||||
void size_rtems(
|
||||
int mode
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user