Changeset 145becf in rtems


Ignore:
Timestamp:
05/02/14 13:33:23 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
4d906bda
Parents:
e239760
git-author:
Sebastian Huber <sebastian.huber@…> (05/02/14 13:33:23)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/05/14 06:26:27)
Message:

score: Add SMP test message handler

This handler can be used to test the inter-processor interrupt
implementation.

Files:
4 added
4 edited

Legend:

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

    re239760 r145becf  
    4343 */
    4444#define SMP_MESSAGE_SHUTDOWN UINT32_C(0x1)
     45
     46/**
     47 * @brief SMP message to request a test handler invocation.
     48 *
     49 * @see _SMP_Send_message().
     50 */
     51#define SMP_MESSAGE_TEST UINT32_C(0x2)
    4552
    4653/**
     
    102109  RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
    103110
     111typedef void ( *SMP_Test_message_handler )( Per_CPU_Control *cpu_self );
     112
     113extern SMP_Test_message_handler _SMP_Test_message_handler;
     114
     115/**
     116 * @brief Sets the handler for test messages.
     117 *
     118 * This handler can be used to test the inter-processor interrupt
     119 * implementation.
     120 */
     121static inline void _SMP_Set_test_message_handler(
     122  SMP_Test_message_handler handler
     123)
     124{
     125  _SMP_Test_message_handler = handler;
     126}
     127
    104128/**
    105129 * @brief Interrupt handler for inter-processor interrupts.
     
    122146      /* does not continue past here */
    123147    }
     148
     149    if ( ( message & SMP_MESSAGE_TEST ) != 0 ) {
     150      ( *_SMP_Test_message_handler )( cpu_self );
     151    }
    124152  }
    125153}
  • cpukit/score/src/smp.c

    re239760 r145becf  
    167167  }
    168168}
     169
     170static void _SMP_Test_message_default_handler( Per_CPU_Control *cpu_self )
     171{
     172  (void) cpu_self;
     173}
     174
     175SMP_Test_message_handler _SMP_Test_message_handler =
     176  _SMP_Test_message_default_handler;
  • testsuites/smptests/Makefile.am

    re239760 r145becf  
    1919SUBDIRS += smpfatal07
    2020SUBDIRS += smpfatal08
     21SUBDIRS += smpipi01
    2122SUBDIRS += smpload01
    2223SUBDIRS += smplock01
  • testsuites/smptests/configure.ac

    re239760 r145becf  
    7474smpfatal07/Makefile
    7575smpfatal08/Makefile
     76smpipi01/Makefile
    7677smpload01/Makefile
    7778smplock01/Makefile
Note: See TracChangeset for help on using the changeset viewer.