Changeset 239dd35f in rtems


Ignore:
Timestamp:
Feb 3, 2017, 10:24:30 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d9c65429
Parents:
07d71279
git-author:
Sebastian Huber <sebastian.huber@…> (02/03/17 10:24:30)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/17 10:25:04)
Message:

smptests: Fix warnings

Location:
testsuites/smptests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • testsuites/smptests/smp03/tasks.c

    r07d71279 r239dd35f  
    2121
    2222  /* Show that this task is running on cpu X */
    23   sprintf( task_name, "TA%" PRIu32, task_index );
     23  sprintf( task_name, "TA%" PRIuPTR, task_index );
    2424  PrintTaskInfo( task_name );
    2525
  • testsuites/smptests/smp08/init.c

    r07d71279 r239dd35f  
    4444  rtems_status_code status;
    4545  rtems_time_of_day time;
    46   int               i;
     46  uint32_t          i;
    4747  char              ch[4];
    4848  rtems_id          id;
     
    7979  for ( i=1; i <= rtems_get_processor_count() *3; i++ ) {
    8080
    81     sprintf(ch, "%02" PRId32, i );
     81    sprintf(ch, "%02" PRIu32, i );
    8282    status = rtems_task_create(
    8383      rtems_build_name( 'T', 'A', ch[0], ch[1] ),
  • testsuites/smptests/smp08/tasks.c

    r07d71279 r239dd35f  
    2222  uint32_t    task_index;
    2323  rtems_status_code status;
    24   uint32_t          cpu_num;
    2524  char              name[5];
    2625  char             *p;
     
    3130
    3231  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
     32  rtems_test_assert( status == RTEMS_SUCCESSFUL );
    3333  task_index = task_number( tid );
    3434  for ( ; ; ) {
    35 
    36     /* Get the CPU Number */
    37     cpu_num = rtems_get_current_processor();
    38 
    3935    status = rtems_clock_get_tod( &time );
     36    rtems_test_assert( status == RTEMS_SUCCESSFUL );
    4037    if ( time.second >= 35 ) {
    4138      TEST_END();
     
    4643    status = rtems_task_wake_after(
    4744      task_index * 5 * rtems_clock_get_ticks_per_second() );
     45    rtems_test_assert( status == RTEMS_SUCCESSFUL );
    4846  }
    4947}
  • testsuites/smptests/smpschedaffinity05/init.c

    r07d71279 r239dd35f  
    1717 * on the core init is running on will preempt it.
    1818 *
    19  * Test tasks run and delete themselves. 
     19 * Test tasks run and delete themselves.
    2020 * Init task never blocks.
    2121 */
     
    2626
    2727#include <rtems.h>
     28#include <inttypes.h>
    2829
    2930#include "tmacros.h"
     
    5354
    5455rtems_id           task_sem;
    55  
     56
    5657static void verify_tasks(void);
    5758
     
    6162 */
    6263static void test_delay(int ticks)
    63 { 
     64{
    6465  rtems_interval start, stop;
    6566  start = rtems_clock_get_ticks_since_boot();
     
    8788
    8889  printf("Verify Tasks Ran\n");
    89  
     90
    9091  while( rtems_semaphore_obtain (task_sem, RTEMS_NO_WAIT, 0) != RTEMS_SUCCESSFUL );
    91  
     92
    9293  /* Set Init task data */
    9394  task_data[0].ran = true;
     
    9798  for (i = 0; i < NUM_CPUS; i++) {
    9899    if (i==0)
    99       printf("Init(%d): ran=%d expected=%d actual=%d\n",
     100      printf("Init(%" PRIu32 "): ran=%d expected=%d actual=%d\n",
    100101        task_data[i].priority,
    101102        task_data[i].ran,
     
    104105      );
    105106    else
    106       printf( "TA0%d(%d): ran=%d expected=%d actual=%d\n",
    107         i, 
     107      printf( "TA0%d(%" PRIu32 "): ran=%d expected=%d actual=%d\n",
     108        i,
    108109        task_data[i].priority,
    109110        task_data[i].ran,
     
    143144  printf("Create Semaphore\n");
    144145
    145   sc = rtems_semaphore_create( 
     146  sc = rtems_semaphore_create(
    146147    rtems_build_name('S', 'E', 'M', '0'),
    147148    1,                                               /* initial count = 1 */
    148149    RTEMS_BINARY_SEMAPHORE |
    149     RTEMS_PRIORITY | 
     150    RTEMS_PRIORITY |
    150151    RTEMS_PRIORITY_CEILING,
    151152    0,
     
    167168      );
    168169      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    169  
    170       sc = rtems_task_set_affinity( 
    171         task_data[ i ].id, 
    172         size, 
     170
     171      sc = rtems_task_set_affinity(
     172        task_data[ i ].id,
     173        size,
    173174        &task_data[i].cpuset
    174175      );
    175176      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    176      
     177
    177178      printf(
    178         "Start TA%d at priority %d on cpu %d\n",
    179          i, 
    180          task_data[i].priority, 
     179        "Start TA%d at priority %" PRIu32 " on cpu %d\n",
     180         i,
     181         task_data[i].priority,
    181182         task_data[i].expected_cpu
    182183      );
     
    187188  /* spin for 100 ticks */
    188189  test_delay(100);
    189  
     190
    190191  verify_tasks();
    191192
    192193  i = TASK_COUNT - 1;
    193194  task_data[ i ].priority = 4;
    194   printf("Set TA%d priority %d\n", i,task_data[i].priority );
     195  printf("Set TA%d priority %" PRIu32 "\n", i,task_data[i].priority );
    195196  sc = rtems_task_set_priority(
    196197    task_data[ i ].id,
Note: See TracChangeset for help on using the changeset viewer.