Changeset 6ca4f6a in rtems


Ignore:
Timestamp:
Feb 17, 2014, 1:56:51 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
911b1d2
Parents:
f8ff2a0
git-author:
Sebastian Huber <sebastian.huber@…> (02/17/14 13:56:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/19/14 08:59:41)
Message:

score: Add and use <rtems/score/smpimpl.h>

Collect SMP implementation specific parts in the
<rtems/score/smpimpl.h> header file.

Location:
cpukit
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/exinit.c

    rf8ff2a0 r6ca4f6a  
    4646#include <rtems/score/priority.h>
    4747#include <rtems/score/schedulerimpl.h>
     48#include <rtems/score/smpimpl.h>
    4849#include <rtems/score/threadimpl.h>
    4950#include <rtems/score/todimpl.h>
     
    5859#ifdef RTEMS_POSIX_API
    5960  #include <rtems/posix/posixapi.h>
    60 #endif
    61 
    62 #if defined(RTEMS_SMP)
    63   #include <rtems/score/smp.h>
    64   #include <rtems/score/percpu.h>
    6561#endif
    6662
     
    151147  #endif
    152148
    153   #if defined(RTEMS_SMP)
    154     _SMP_Handler_initialize();
    155   #endif
     149  _SMP_Handler_initialize();
    156150
    157151  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
     
    217211  _System_state_Set( SYSTEM_STATE_UP );
    218212
    219 #if defined(RTEMS_SMP)
    220213  _SMP_Request_other_cores_to_perform_first_context_switch();
    221 #endif
    222214
    223215  _Thread_Start_multitasking();
  • cpukit/score/Makefile.am

    rf8ff2a0 r6ca4f6a  
    6262include_rtems_score_HEADERS += include/rtems/score/smpbarrier.h
    6363include_rtems_score_HEADERS += include/rtems/score/smplock.h
     64include_rtems_score_HEADERS += include/rtems/score/smpimpl.h
    6465include_rtems_score_HEADERS += include/rtems/score/stack.h
    6566include_rtems_score_HEADERS += include/rtems/score/stackimpl.h
  • cpukit/score/include/rtems/score/percpu.h

    rf8ff2a0 r6ca4f6a  
    306306  _CPU_SMP_Send_interrupt( _Per_CPU_Get_index( per_cpu ) );
    307307}
    308 
    309 /**
    310  *  @brief Initialize SMP Handler
    311  *
    312  *  This method initialize the SMP Handler.
    313  */
    314 void _SMP_Handler_initialize(void);
    315308
    316309/**
  • cpukit/score/include/rtems/score/smp.h

    rf8ff2a0 r6ca4f6a  
    3535 */
    3636
    37 /**
    38  * @brief SMP message to request a processor shutdown.
    39  *
    40  * @see _SMP_Send_message().
    41  */
    42 #define SMP_MESSAGE_SHUTDOWN UINT32_C(0x1)
    43 
    44 /**
    45  * @brief SMP fatal codes.
    46  */
    47 typedef enum {
    48   SMP_FATAL_SHUTDOWN
    49 } SMP_Fatal_code;
    50 
    5137#if defined( RTEMS_SMP )
    5238  SCORE_EXTERN uint32_t _SMP_Processor_count;
     
    6147
    6248#if defined( RTEMS_SMP )
    63 
    64 /**
    65  *  @brief Sends a SMP message to a processor.
    66  *
    67  *  The target processor may be the sending processor.
    68  *
    69  *  @param[in] cpu The target processor of the message.
    70  *  @param[in] message The message.
    71  */
    72 void _SMP_Send_message( uint32_t cpu, uint32_t message );
    73 
    74 /**
    75  *  @brief Request of others CPUs.
    76  *
    77  *  This method is invoked by RTEMS when it needs to make a request
    78  *  of the other CPUs.  It should be implemented using some type of
    79  *  interprocessor interrupt. CPUs not including the originating
    80  *  CPU should receive the message.
    81  *
    82  *  @param [in] message is message to send
    83  */
    84 void _SMP_Broadcast_message(
    85   uint32_t  message
    86 );
    87 
    88 /**
    89  *  @brief Request other cores to perform first context switch.
    90  *
    91  *  Send message to other cores requesting them to perform
    92  *  their first context switch operation.
    93  */
    94 void _SMP_Request_other_cores_to_perform_first_context_switch(void);
    95 
    96 #endif /* defined( RTEMS_SMP ) */
    97 
    98 /**
    99  *  @brief Request other cores to shutdown.
    100  *
    101  *  Send message to other cores requesting them to shutdown.
    102  */
    103 #if defined( RTEMS_SMP )
    104   void _SMP_Request_other_cores_to_shutdown( void );
    105 #else
    106   #define _SMP_Request_other_cores_to_shutdown() \
    107     do { } while ( 0 )
    108 #endif
    109 
    110 /** @} */
    111 
    112 #if defined( RTEMS_SMP )
    11349  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
    11450    _SMP_Get_current_processor( void )
     
    12056#endif
    12157
     58/** @} */
     59
    12260#ifdef __cplusplus
    12361}
  • cpukit/score/preinstall.am

    rf8ff2a0 r6ca4f6a  
    227227        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smplock.h
    228228PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smplock.h
     229
     230$(PROJECT_INCLUDE)/rtems/score/smpimpl.h: include/rtems/score/smpimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     231        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smpimpl.h
     232PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smpimpl.h
    229233
    230234$(PROJECT_INCLUDE)/rtems/score/stack.h: include/rtems/score/stack.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
  • cpukit/score/src/interr.c

    rf8ff2a0 r6ca4f6a  
    2121#include <rtems/score/interr.h>
    2222#include <rtems/score/isrlevel.h>
    23 #include <rtems/score/smp.h>
     23#include <rtems/score/smpimpl.h>
    2424#include <rtems/score/sysstate.h>
    2525#include <rtems/score/userextimpl.h>
  • cpukit/score/src/smp.c

    rf8ff2a0 r6ca4f6a  
    2020
    2121#include <rtems/bspsmp.h>
     22#include <rtems/score/smpimpl.h>
    2223#include <rtems/score/assert.h>
    2324#include <rtems/score/threaddispatch.h>
    2425#include <rtems/score/threadimpl.h>
    25 #include <rtems/score/smp.h>
    2626#include <rtems/config.h>
    2727#include <rtems/fatal.h>
Note: See TracChangeset for help on using the changeset viewer.