Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #595: rtems-20040318-sp13-fix.patch

File rtems-20040318-sp13-fix.patch, 4.6 KB (added by querbach, on 12/03/06 at 13:31:12)

rtems-20040318-sp13-fix.patch

  • rtems/testsuites/sptests/sp13/fillbuff.c

    RCS file: /home/cvs/19/dnd/rtems/testsuites/sptests/sp13/fillbuff.c,v
    retrieving revision 1.1.1.1
    retrieving revision 1.2
    diff -u -I$Id -r1.1.1.1 -r1.2
     
    2121
    2222#include "system.h"
    2323
    24 #define MESSAGE_SIZE (sizeof(long) * 4)
    25 
    2624void Fill_buffer(
    2725  char *source,
    2826  long *buffer
    2927)
    3028{
    3129  char *p;
    32   int i;
    33 /*
    34   memcpy( buffer, source, 16 );
    35 */
     30  int i, j;
     31
    3632  p = source;
    37   for ( i=0 ; i<MESSAGE_SIZE ; i++ ) {
    38     buffer[i] = *p++;
    39     buffer[i] <<= 8;
    40     buffer[i] |= *p++;
    41     buffer[i] <<= 8;
    42     buffer[i] |= *p++;
    43     buffer[i] <<= 8;
    44     buffer[i] |= *p++;
     33  for ( i = 0 ; i < MESSAGE_SIZE / sizeof(long) ; i++ ) {
     34    buffer[i] = 0;
     35    for ( j = sizeof(long) - 1; j >= 0; j-- ) {
     36      buffer[i] |= *p++ << (8 * j);
     37    }
    4538  }
    4639}
  • rtems/testsuites/sptests/sp13/init.c

    RCS file: /home/cvs/19/dnd/rtems/testsuites/sptests/sp13/init.c,v
    retrieving revision 1.1.1.1
    retrieving revision 1.2
    diff -u -I$Id -r1.1.1.1 -r1.2
     
    2323
    2424#define TEST_INIT
    2525#include "system.h"
    26 
    27 #define MESSAGE_SIZE (sizeof(long) * 4)
    2826
    2927rtems_task Init(
    3028  rtems_task_argument argument
  • rtems/testsuites/sptests/sp13/putbuff.c

    RCS file: /home/cvs/19/dnd/rtems/testsuites/sptests/sp13/putbuff.c,v
    retrieving revision 1.1.1.1
    retrieving revision 1.2
    diff -u -I$Id -r1.1.1.1 -r1.2
     
    2020
    2121#include "system.h"
    2222
    23 #define MESSAGE_SIZE (4)
    24 
    2523void Put_buffer(
    2624  long *buffer
    2725)
    2826{
    29   int i;
    30 /*
    31   printf( "%16s", (char *)buffer );
    32 */
    33   for ( i=0 ; i< MESSAGE_SIZE ; i++ ) {
    34     printf( "%c%c%c%c", (char) (buffer[i] >> 24),
    35                         (char) (buffer[i] >> 16 & 0xff),
    36                         (char) (buffer[i] >> 8 & 0xff),
    37                         (char) (buffer[i] >> 0 & 0xff) );
    38   }
     27  int i, j;
     28  char c;
    3929
     30  for ( i = 0; i < MESSAGE_SIZE / sizeof(long); i++ ) {
     31    for ( j = sizeof(long) - 1; j >= 0; j-- ) {
     32      if ( (c = (buffer[i] >> (8 * j)) & 0xFF) == 0 )
     33        return;
     34      printf( "%c", c );
     35    }
     36  }
    4037}
  • rtems/testsuites/sptests/sp13/system.h

    RCS file: /home/cvs/19/dnd/rtems/testsuites/sptests/sp13/system.h,v
    retrieving revision 1.1.1.1
    retrieving revision 1.2
    diff -u -I$Id -r1.1.1.1 -r1.2
     
    6565
    6666TEST_EXTERN rtems_id   Queue_id[ 4 ];        /* array of queue ids */
    6767TEST_EXTERN rtems_name Queue_name[ 4 ];      /* array of queue names */
     68
     69/* test configuration */
     70
     71#define MESSAGE_SIZE (sizeof(long) * 4)  /* must be multiple of sizeof(long) */
    6872
    6973/* end of include file */
  • rtems/testsuites/sptests/sp13/task1.c

    RCS file: /home/cvs/19/dnd/rtems/testsuites/sptests/sp13/task1.c,v
    retrieving revision 1.1.1.1
    retrieving revision 1.2
    diff -u -I$Id -r1.1.1.1 -r1.2
     
    2323char    big_send_buffer[2048];
    2424char    big_receive_buffer[2048];
    2525
    26 long    buffer[ 4 ];
    27 
    28 #define MESSAGE_SIZE (sizeof(long) * 4)
     26long    buffer[ MESSAGE_SIZE / sizeof(long) ];
    2927
    3028void dope_buffer(unsigned char *buff,
    3129                 int   buff_size,
  • rtems/testsuites/sptests/sp13/task2.c

    RCS file: /home/cvs/19/dnd/rtems/testsuites/sptests/sp13/task2.c,v
    retrieving revision 1.1.1.1
    retrieving revision 1.2
    diff -u -I$Id -r1.1.1.1 -r1.2
     
    1919 */
    2020
    2121#include "system.h"
    22 
    23 #define MESSAGE_SIZE (sizeof(long) * 4)
    2422
    2523rtems_task Task_2(
    2624  rtems_task_argument argument