Ignore:
Timestamp:
Sep 5, 2014, 11:33:57 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
d11e6efe
Parents:
33676c8c
git-author:
Sebastian Huber <sebastian.huber@…> (09/05/14 11:33:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/08/14 05:53:03)
Message:

tmtests/tmcontext01: Improve cache dirty function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/tmtests/tmcontext01/init.c

    r33676c8c r8d30713d  
    4545static Context_Control ctx;
    4646
    47 static void dirty_data_cache(volatile int *d)
     47static int dirty_data_cache(volatile int *d, int j)
    4848{
    4949  size_t n = data_size / sizeof(*d);
     
    5151
    5252  for (i = 0; i < n; ++i) {
    53     d[i] = i;
    54   }
     53    d[i] = i + j;
     54  }
     55
     56  return i + j;
    5557}
    5658
     
    8991
    9092    if (dirty) {
    91       dirty_data_cache(main_data);
     93      dirty_data_cache(main_data, fl);
    9294      rtems_cache_invalidate_entire_instruction();
    9395    }
     
    111113{
    112114  volatile int *load_data = (volatile int *) arg;
     115  int j = (int) rtems_get_current_processor();
    113116
    114117  while (true) {
    115     dirty_data_cache(load_data);
     118    j = dirty_data_cache(load_data, j);
    116119  }
    117120}
Note: See TracChangeset for help on using the changeset viewer.