mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen01.c, sp09/screen12.c, sp25/system.h, sp25/task1.c, sp28/init.c, sp39/init.c, sp41/init.c, spfatal01/testcase.h, spfatal08/testcase.h: Change size_t to ssize_t on all Heap, Workspace and Region calls. On 16-bit architectures, size_t can be 16-bits which would limit sizes to 64K. Also address constants which overflowed on 16-bit integer targets.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* sp09/screen01.c, sp09/screen12.c, sp25/system.h, sp25/task1.c,
|
||||
sp28/init.c, sp39/init.c, sp41/init.c, spfatal01/testcase.h,
|
||||
spfatal08/testcase.h: Change size_t to ssize_t on all Heap, Workspace
|
||||
and Region calls. On 16-bit architectures, size_t can be 16-bits
|
||||
which would limit sizes to 64K. Also address constants which
|
||||
overflowed on 16-bit integer targets.
|
||||
|
||||
2008-10-01 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* sp43/sp43.scn: Bump version to 4.9.99.0
|
||||
|
||||
@@ -62,7 +62,7 @@ void Screen1()
|
||||
puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" );
|
||||
|
||||
status = rtems_task_get_note(
|
||||
_RTEMS_tasks_Information.minimum_id + (3<<OBJECTS_API_START_BIT),
|
||||
_RTEMS_tasks_Information.minimum_id + (3L<<OBJECTS_API_START_BIT),
|
||||
RTEMS_NOTEPAD_LAST,
|
||||
¬epad_value
|
||||
);
|
||||
|
||||
@@ -26,7 +26,7 @@ void Screen12()
|
||||
uint32_t good_back_flag;
|
||||
uint32_t good_front_flag;
|
||||
uint32_t offset;
|
||||
size_t segment_size;
|
||||
ssize_t segment_size;
|
||||
rtems_status_code status;
|
||||
Heap_Information_block the_info;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Region_id[ 2 ]; /* array of region ids */
|
||||
TEST_EXTERN rtems_name Region_name[ 2 ]; /* array of region names */
|
||||
|
||||
TEST_EXTERN uint8_t Area_1[64000] CPU_STRUCTURE_ALIGNMENT;
|
||||
TEST_EXTERN uint8_t Area_1[1024] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
#define BASE_PRIORITY 140
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ rtems_task Task_1(
|
||||
void *address_8;
|
||||
rtems_id region_id;
|
||||
Heap_Information_block region_info;
|
||||
size_t segment_size;
|
||||
ssize_t segment_size;
|
||||
rtems_status_code status;
|
||||
|
||||
/* Obtain the region id */
|
||||
|
||||
@@ -35,7 +35,7 @@ volatile int nDeleted;
|
||||
rtems_task
|
||||
subtask (rtems_task_argument arg)
|
||||
{
|
||||
int localvar = arg;
|
||||
uintptr_t localvar = arg;
|
||||
int i;
|
||||
rtems_status_code sc;
|
||||
|
||||
@@ -49,10 +49,11 @@ subtask (rtems_task_argument arg)
|
||||
while (localvar < 1000) {
|
||||
localvar++;
|
||||
rtems_task_wake_after (0);
|
||||
taskvar = (void *)((int)taskvar + 1);
|
||||
taskvar = (void *)((uintptr_t)taskvar + 1);
|
||||
rtems_task_wake_after (0);
|
||||
if ((int)taskvar != localvar) {
|
||||
printf ("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
|
||||
if ((uintptr_t)taskvar != localvar) {
|
||||
printf ("Task:%d taskvar:%d localvar:%d\n",
|
||||
arg, (uintptr_t)taskvar, localvar);
|
||||
rtems_task_suspend (RTEMS_SELF);
|
||||
}
|
||||
}
|
||||
@@ -60,8 +61,9 @@ subtask (rtems_task_argument arg)
|
||||
nDeleted++;
|
||||
directive_failed( sc, "task variable delete" );
|
||||
|
||||
if ((int)taskvar == localvar) {
|
||||
printf("Task:%d deleted taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
|
||||
if ((uintptr_t)taskvar == localvar) {
|
||||
printf("Task:%d deleted taskvar:%d localvar:%d\n",
|
||||
arg, (uintptr_t)taskvar, localvar);
|
||||
nRunning--;
|
||||
rtems_task_suspend (RTEMS_SELF);
|
||||
}
|
||||
@@ -72,8 +74,9 @@ subtask (rtems_task_argument arg)
|
||||
rtems_task_wake_after(0);
|
||||
if (nRunning <= 1)
|
||||
break;
|
||||
if ((int)taskvar == localvar) {
|
||||
printf("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
|
||||
if ((uintptr_t)taskvar == localvar) {
|
||||
printf("Task:%d taskvar:%d localvar:%d\n",
|
||||
arg, (uintptr_t)taskvar, localvar);
|
||||
nRunning--;
|
||||
rtems_task_suspend(RTEMS_SELF);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ rtems_task Init(
|
||||
rtems_event_set out;
|
||||
int i;
|
||||
int max;
|
||||
int iterations = 0;
|
||||
uint32_t iterations = 0;
|
||||
|
||||
puts( "\n\n*** TEST 39 ***" );
|
||||
|
||||
@@ -116,7 +116,7 @@ rtems_task Init(
|
||||
max += 2;
|
||||
|
||||
/* with our clock tick, this is about 30 seconds */
|
||||
if ( ++iterations >= 4 * 1000 * 30)
|
||||
if ( ++iterations >= 4L * 1000L * 30L)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ rtems_task Init(
|
||||
max += 2;
|
||||
|
||||
/* with our clock tick, this is about 30 seconds */
|
||||
if ( ++iterations >= 4 * 1000 * 30)
|
||||
if ( ++iterations >= 4L * 1000L * 30L)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ rtems_task Init(
|
||||
max = 0;
|
||||
|
||||
/* with our clock tick, this is about 30 seconds */
|
||||
if ( ++iterations >= 4 * 1000 * 30)
|
||||
if ( ++iterations >= 4L * 1000L * 30L)
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ rtems_task Init(
|
||||
rtems_id timer;
|
||||
int i;
|
||||
int max;
|
||||
int iterations = 0;
|
||||
uint32_t iterations = 0;
|
||||
|
||||
puts( "\n\n*** TEST 41 ***" );
|
||||
|
||||
@@ -119,7 +119,7 @@ rtems_task Init(
|
||||
max += 2;
|
||||
|
||||
/* with our clock tick, this is about 30 seconds */
|
||||
if ( ++iterations >= 4 * 1000 * 30)
|
||||
if ( ++iterations >= 4L * 1000L * 30L)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ rtems_task Init(
|
||||
max += 2;
|
||||
|
||||
/* with our clock tick, this is about 30 seconds */
|
||||
if ( ++iterations >= 4 * 1000 * 30)
|
||||
if ( ++iterations >= 4L * 1000L * 30L)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ rtems_task Init(
|
||||
max = 0;
|
||||
|
||||
/* with our clock tick, this is about 30 seconds */
|
||||
if ( ++iterations >= 4 * 1000 * 30)
|
||||
if ( ++iterations >= 4L * 1000L * 30L)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#define CONFIGURE_INIT_TASK_STACK_SIZE 0
|
||||
rtems_initialization_tasks_table Initialization_tasks[] = {
|
||||
{ rtems_build_name('I', 'N', 'I', ' '),
|
||||
64 * 1024 * 1024,
|
||||
32UL * 1024UL,
|
||||
1,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
Init,
|
||||
|
||||
@@ -29,7 +29,7 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
|
||||
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
|
||||
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_WORKSPACE_ALLOCATION
|
||||
|
||||
char Workspace[ 64 * 1024 ] CPU_STRUCTURE_ALIGNMENT;
|
||||
char Workspace[ 256 ] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
void force_error()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user