Changeset 577293f in rtems


Ignore:
Timestamp:
Apr 28, 2019, 12:31:10 PM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
9b8e85e2
Parents:
bf867c55
git-author:
Sebastian Huber <sebastian.huber@…> (04/28/19 12:31:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/20/19 07:01:15)
Message:

score: Add _SMP_Synchronize()

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/smpimpl.h

    rbf867c55 r577293f  
    262262);
    263263
     264/**
     265 * @brief Ensures that all store operations issued by the current processor
     266 * before the call this function are visible to all other online processors.
     267 *
     268 * Simply calls _SMP_Othercast_action() with an empty multicast action.
     269 */
     270void _SMP_Synchronize( void );
     271
    264272#endif /* defined( RTEMS_SMP ) */
    265273
  • cpukit/score/src/smpmulticastaction.c

    rbf867c55 r577293f  
    212212  _SMP_Multicast_action( &targets, handler, arg );
    213213}
     214
     215static void _SMP_Do_nothing_action( void *arg )
     216{
     217  /* Do nothing */
     218}
     219
     220void _SMP_Synchronize( void )
     221{
     222  _SMP_Othercast_action( _SMP_Do_nothing_action, NULL );
     223}
  • testsuites/smptests/smpipi01/init.c

    rbf867c55 r577293f  
    1919#include <rtems/score/smpimpl.h>
    2020#include <rtems/score/smpbarrier.h>
    21 #include <rtems/counter.h>
    2221#include <rtems.h>
    2322
     
    196195
    197196  for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) {
     197    Per_CPU_Control *cpu_self;
    198198    uint32_t i;
    199199
    200     /* Wait 1us so that all outstanding messages have been processed */
    201     rtems_counter_delay_nanoseconds(1000000);
     200    cpu_self = _Thread_Dispatch_disable();
     201    _SMP_Synchronize();
     202    _Thread_Dispatch_enable(cpu_self);
    202203
    203204    for (i = 0; i < cpu_count; ++i) {
Note: See TracChangeset for help on using the changeset viewer.