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.

File:
1 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}
Note: See TracChangeset for help on using the changeset viewer.