Changeset 3a4ae6c in rtems for c/src/exec/score


Ignore:
Timestamp:
09/11/95 19:35:39 (27 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
ced11f99
Parents:
5072b07
Message:

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

Location:
c/src/exec/score
Files:
18 added
135 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/cpu/hppa1.1/cpu.c

    r5072b07 r3a4ae6c  
    2020#include <rtems/system.h>
    2121#include <rtems/fatal.h>
    22 #include <rtems/isr.h>
    23 #include <rtems/intr.h>
    24 #include <rtems/wkspace.h>
    25 
    26 rtems_status_code hppa_external_interrupt_initialize(void);
     22#include <rtems/core/isr.h>
     23#include <rtems/core/wkspace.h>
     24
     25void hppa_external_interrupt_initialize(void);
    2726void hppa_external_interrupt_enable(unsigned32);
    2827void hppa_external_interrupt_disable(unsigned32);
     
    7372
    7473    extern void IVA_Table(void);
    75 
    76     if ( cpu_table == NULL )
    77         rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
    7874
    7975    /*
     
    195191 */
    196192
    197 rtems_status_code
     193void
    198194hppa_external_interrupt_initialize(void)
    199195{
     
    208204    rtems_interrupt_catch((rtems_isr_entry) hppa_external_interrupt,
    209205                          HPPA_INTERRUPT_EXTERNAL_INTERRUPT, &ignore) ;
    210 
    211     return RTEMS_SUCCESSFUL;
    212206}
    213207
  • c/src/exec/score/cpu/hppa1.1/cpu.h

    r5072b07 r3a4ae6c  
    3131#endif
    3232
    33 #include <rtems/hppa.h>              /* pick up machine definitions */
     33#include <rtems/core/hppa.h>              /* pick up machine definitions */
    3434#ifndef ASM
    35 #include <rtems/hppatypes.h>
     35#include <rtems/core/hppatypes.h>
    3636#endif
    3737
  • c/src/exec/score/cpu/hppa1.1/cpu_asm.s

    r5072b07 r3a4ae6c  
    2828#
    2929
    30 #include <rtems/hppa.h>
    31 #include <rtems/cpu_asm.h>
    32 #include <rtems/cpu.h>
    33 
    34 #include <offsets.h>
     30#include <rtems/core/hppa.h>
     31#include <rtems/core/cpu_asm.h>
     32#include <rtems/core/cpu.h>
     33
     34#include <rtems/core/offsets.h>
    3535
    3636        .SPACE $PRIVATE$
  • c/src/exec/score/cpu/hppa1.1/rtems.s

    r5072b07 r3a4ae6c  
    1616
    1717#include <rtems/hppa.h>
    18 #include <rtems/cpu_asm.h>
     18#include <rtems/core/cpu_asm.h>
    1919
    2020        .SPACE $PRIVATE$
  • c/src/exec/score/cpu/i386/asm.h

    r5072b07 r3a4ae6c  
    3232
    3333#define ASM
    34 #include <rtems/i386.h>
     34#include <rtems/core/i386.h>
    3535
    3636/*
  • c/src/exec/score/cpu/i386/cpu.c

    r5072b07 r3a4ae6c  
    1616#include <rtems/system.h>
    1717#include <rtems/fatal.h>
    18 #include <rtems/isr.h>
    19 #include <rtems/wkspace.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/core/wkspace.h>
    2020
    2121/*  _CPU_Initialize
     
    3636  register unsigned16  fp_status asm ("ax");
    3737  register unsigned8  *fp_context;
    38 
    39   if ( cpu_table == NULL )
    40     rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
    4138
    4239  _CPU_Table = *cpu_table;
     
    6865}
    6966
     67/*PAGE
     68 *
     69 *  _CPU_ISR_Get_level
     70 */
     71 
     72unsigned32 _CPU_ISR_Get_level( void )
     73{
     74  unsigned32 level;
     75 
     76  i386_get_interrupt_level( level );
     77 
     78  return level;
     79}
     80 
    7081/*PAGE
    7182 *
  • c/src/exec/score/cpu/i386/cpu.h

    r5072b07 r3a4ae6c  
    2323
    2424#ifndef ASM
    25 #include <rtems/i386types.h>
    26 #endif
    27 #include <rtems/i386.h>
     25#include <rtems/core/i386types.h>
     26#endif
     27#include <rtems/core/i386.h>
    2828
    2929/* conditional compilation parameters */
     
    120120/* variables */
    121121
    122 EXTERN unsigned8  _CPU_Null_fp_context[ CPU_CONTEXT_FP_SIZE ];
    123 EXTERN void      *_CPU_Interrupt_stack_low;
    124 EXTERN void      *_CPU_Interrupt_stack_high;
     122EXTERN Context_Control_fp  _CPU_Null_fp_context;
     123EXTERN void               *_CPU_Interrupt_stack_low;
     124EXTERN void               *_CPU_Interrupt_stack_high;
    125125
    126126/* constants */
     
    192192    else              asm volatile ( "sti" ); \
    193193  }
     194
     195unsigned32 _CPU_ISR_Get_level( void );
    194196
    195197/* end of ISR handler macros */
  • c/src/exec/score/cpu/i386/i386.h

    r5072b07 r3a4ae6c  
    166166    ); \
    167167  }
     168
     169#define i386_get_interrupt_level( _level ) \
     170  do { \
     171    register unsigned32 _eflags = 0; \
     172    \
     173    asm volatile ( "push %0 ; \
     174                    popf " \
     175                    : "=r" ((_eflags)) : "0" ((_eflags)) \
     176    ); \
     177    \
     178    _level = (_eflags & 0x0200) ? 0 : 1; \
     179  } while (0)
    168180
    169181/*
  • c/src/exec/score/cpu/i960/asm.h

    r5072b07 r3a4ae6c  
    3232
    3333#define ASM
    34 #include <rtems/i960.h>
     34#include <rtems/core/i960.h>
    3535
    3636/*
  • c/src/exec/score/cpu/i960/cpu.c

    r5072b07 r3a4ae6c  
    2222#include <rtems/system.h>
    2323#include <rtems/fatal.h>
    24 #include <rtems/isr.h>
     24#include <rtems/core/isr.h>
    2525
    2626/*  _CPU_Initialize
     
    4141{
    4242
    43   if ( cpu_table == NULL )
    44     rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
    45 
    4643  _CPU_Table = *cpu_table;
    4744
     45}
     46
     47/*PAGE
     48 *
     49 *  _CPU_ISR_Get_level
     50 */
     51 
     52unsigned32 _CPU_ISR_Get_level( void )
     53{
     54  unsigned32 level;
     55 
     56  i960_get_interrupt_level( level );
     57 
     58  return level;
    4859}
    4960
  • c/src/exec/score/cpu/i960/cpu.h

    r5072b07 r3a4ae6c  
    2424#pragma align 4            /* for GNU C structure alignment */
    2525
    26 #include <rtems/i960.h>
     26#include <rtems/core/i960.h>
    2727#ifndef ASM
    28 #include <rtems/i960types.h>
     28#include <rtems/core/i960types.h>
    2929#endif
    3030
     
    237237    ); \
    238238  }
     239
     240unsigned32 _CPU_ISR_Get_level( void );
    239241
    240242/* ISR handler section macros */
  • c/src/exec/score/cpu/i960/i960.h

    r5072b07 r3a4ae6c  
    170170  }
    171171
     172#define i960_get_interrupt_level( _level ) \
     173  { \
     174    i960_disable_interrupts( _level ); \
     175    i960_enable_interrupts( _level ); \
     176    (_level) = ((_level) & 0x1f0000) >> 16; \
     177  } while ( 0 )
     178
    172179#define i960_atomic_modify( mask, addr, prev ) \
    173180 { register unsigned int  _mask = (mask); \
     
    200207#define i960_clear_intr( xint ) \
    201208 { register unsigned int _xint=(xint); \
    202    asm volatile( "loop_til_cleared:
    203                     clrbit %0,sf0,sf0 ; \
    204                     bbs    %0,sf0,loop_til_cleared" \
     209asm volatile( "loop_til_cleared: clrbit %0,sf0,sf0 ; \
     210                  bbs    %0,sf0, loop_til_cleared" \
    205211                  : "=d" (_xint) : "0" (_xint) ); \
    206212 }
  • c/src/exec/score/cpu/m68k/asm.h

    r5072b07 r3a4ae6c  
    3232
    3333#define ASM
    34 #include <rtems/m68k.h>
     34#include <rtems/core/m68k.h>
    3535
    3636/*
  • c/src/exec/score/cpu/m68k/cpu.c

    r5072b07 r3a4ae6c  
    1515#include <rtems/system.h>
    1616#include <rtems/fatal.h>
    17 #include <rtems/isr.h>
     17#include <rtems/core/isr.h>
    1818
    1919/*  _CPU_Initialize
     
    3434{
    3535
    36   if ( cpu_table == NULL )
    37     rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
    38 
    3936  _CPU_Table = *cpu_table;
    4037
     38}
     39
     40/*PAGE
     41 *
     42 *  _CPU_ISR_Get_level
     43 */
     44 
     45unsigned32 _CPU_ISR_Get_level( void )
     46{
     47  unsigned32 level;
     48
     49  m68k_get_interrupt_level( level );
     50
     51  return level;
    4152}
    4253
  • c/src/exec/score/cpu/m68k/cpu.h

    r5072b07 r3a4ae6c  
    3131#define NO_UNINITIALIZED_WARNINGS
    3232
    33 #include <rtems/m68k.h>
     33#include <rtems/core/m68k.h>
    3434#ifndef ASM
    35 #include <rtems/m68ktypes.h>
     35#include <rtems/core/m68ktypes.h>
    3636#endif
    3737
     
    222222#define _CPU_ISR_Set_level( _newlevel ) \
    223223   m68k_set_interrupt_level( _newlevel )
     224
     225unsigned32 _CPU_ISR_Get_level( void );
    224226
    225227/* end of ISR handler macros */
  • c/src/exec/score/cpu/m68k/m68k.h

    r5072b07 r3a4ae6c  
    197197  }
    198198
     199#define m68k_get_interrupt_level( _level ) \
     200  do { \
     201    register unsigned32 _tmpsr = 0; \
     202    \
     203    asm volatile( "movw  %%sr,%0" \
     204                   : "=d" (_tmpsr) : "0" (_tmpsr) \
     205    ); \
     206    \
     207    _level = (_tmpsr & 0x0700) >> 8; \
     208  } while (0)
     209   
    199210#define m68k_set_interrupt_level( _newlevel ) \
    200211  { \
  • c/src/exec/score/cpu/no_cpu/asm.h

    r5072b07 r3a4ae6c  
    3232
    3333#define ASM
    34 #include <rtems/no_cpu.h>
     34#include <rtems/core/no_cpu.h>
    3535
    3636/*
  • c/src/exec/score/cpu/no_cpu/cpu.c

    r5072b07 r3a4ae6c  
    1616#include <rtems/system.h>
    1717#include <rtems/fatal.h>
    18 #include <rtems/isr.h>
    19 #include <rtems/wkspace.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/core/wkspace.h>
    2020
    2121/*  _CPU_Initialize
     
    3434)
    3535{
    36   if ( cpu_table == NULL )
    37     rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
    38 
    3936  /*
    4037   *  The thread_dispatch argument is the address of the entry point
     
    6057
    6158  _CPU_Table = *cpu_table;
     59}
     60
     61/*PAGE
     62 *
     63 *  _CPU_ISR_Get_level
     64 */
     65 
     66unsigned32 _CPU_ISR_Get_level( void )
     67{
     68  /*
     69   *  This routine returns the current interrupt level.
     70   */
    6271}
    6372
  • c/src/exec/score/cpu/no_cpu/cpu.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/no_cpu.h>               /* pick up machine definitions */
     24#include <rtems/core/no_cpu.h>               /* pick up machine definitions */
    2525#ifndef ASM
    26 #include <rtems/no_cputypes.h>
     26#include <rtems/core/no_cputypes.h>
    2727#endif
    2828
  • c/src/exec/score/cpu/no_cpu/cpu_asm.c

    r5072b07 r3a4ae6c  
    2525
    2626#include <rtems/system.h>
    27 #include <rtems/cpu.h>
     27#include <rtems/core/cpu.h>
    2828/* #include "cpu_asm.h> */
    2929
  • c/src/exec/score/cpu/no_cpu/cpu_asm.h

    r5072b07 r3a4ae6c  
    2222/* pull in the generated offsets */
    2323
    24 #include <offsets.h>
     24#include <rtems/core/offsets.h>
    2525
    2626/*
  • c/src/exec/score/cpu/no_cpu/rtems.c

    r5072b07 r3a4ae6c  
    2323
    2424#include <rtems/system.h>
    25 #include <rtems/cpu.h>
     25#include <rtems/core/cpu.h>
    2626/* #include "asm.h> */
    2727
  • c/src/exec/score/cpu/powerpc/cpu.c

    r5072b07 r3a4ae6c  
    3131#include <rtems/system.h>
    3232#include <rtems/fatal.h>
    33 #include <rtems/isr.h>
    34 #include <rtems/context.h>
    35 #include <rtems/thread.h>
    36 #include <rtems/wkspace.h>
     33#include <rtems/core/isr.h>
     34#include <rtems/core/context.h>
     35#include <rtems/core/thread.h>
     36#include <rtems/core/wkspace.h>
    3737
    3838/*
    3939 *  These are for testing purposes.
    4040 */
     41/*
    4142#define Testing
     43*/
    4244
    4345#ifdef Testing
     
    120122#endif
    121123
    122   if ( cpu_table == NULL )
    123     rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
    124 
    125124  if ( cpu_table->spurious_handler )
    126125    handler = (proc_ptr)cpu_table->spurious_handler;
     
    165164    */
    166165
    167     _ISR_Vector_table[ vector ] = new_handler ? (rtems_isr_entry)new_handler :
    168        _CPU_Table.spurious_handler ? (rtems_isr_entry)_CPU_Table.spurious_handler :
    169        (rtems_isr_entry)ppc_spurious;
     166    _ISR_Vector_table[ vector ] =
     167       (new_handler) ? (ISR_Handler_entry) new_handler :
     168       ((_CPU_Table.spurious_handler) ?
     169          (ISR_Handler_entry) _CPU_Table.spurious_handler :
     170          (ISR_Handler_entry) ppc_spurious);
    170171}
    171172
  • c/src/exec/score/cpu/powerpc/cpu.h

    r5072b07 r3a4ae6c  
    3838#endif
    3939
    40 #include <rtems/ppc.h>               /* pick up machine definitions */
     40#include <rtems/core/ppc.h>               /* pick up machine definitions */
    4141#ifndef ASM
    4242struct CPU_Interrupt_frame;
    4343
    44 #include <rtems/ppctypes.h>
     44#include <rtems/core/ppctypes.h>
    4545#endif
    4646
  • c/src/exec/score/cpu/unix/cpu.c

    r5072b07 r3a4ae6c  
    1818
    1919#include <rtems/system.h>
    20 #include <rtems/isr.h>
     20#include <rtems/core/isr.h>
    2121
    2222#include <stdio.h>
     
    187187}
    188188
     189/*PAGE
     190 *
     191 *  _CPU_ISR_Get_level
     192 */
     193
     194unsigned32 _CPU_ISR_Get_level( void )
     195{
     196  sigset_t sigset;
     197 
     198  sigprocmask( 0, 0, &sigset );
     199
     200  /*
     201   *  This is an educated guess based on ONLY ONE of the signals we
     202   *  disable/enable to mask ISRs.
     203   */
     204
     205  if ( sigismember( &sigset, SIGUSR1 ) )
     206    return 1;
     207  else
     208    return 0;
     209}
     210
    189211/*  _CPU_Initialize
    190212 *
     
    199221void _CPU_Initialize(
    200222  rtems_cpu_table  *cpu_table,
    201   void      (*thread_dispatch)      /* ignored on this CPU */
    202 )
    203 {
    204   if ( cpu_table == NULL )
    205     _CPU_Fatal_halt( RTEMS_NOT_CONFIGURED );
    206 
     223  void            (*thread_dispatch)      /* ignored on this CPU */
     224)
     225{
    207226  /*
    208227   *  The thread_dispatch argument is the address of the entry point
  • c/src/exec/score/cpu/unix/cpu.h

    r5072b07 r3a4ae6c  
    2727#endif
    2828
    29 #include <rtems/unix.h>
     29#include <rtems/core/unix.h>
    3030#ifndef ASM
    31 #include <rtems/unixtypes.h>
     31#include <rtems/core/unixtypes.h>
    3232#endif
    3333
     
    668668  }
    669669
     670unsigned32 _CPU_ISR_Get_level( void );
     671
    670672/* end of ISR handler macros */
    671673
  • c/src/exec/score/headers/address.h

    r5072b07 r3a4ae6c  
    5353
    5454/*
    55  *  _Addresses_Add
    56  *
    57  *  DESCRIPTION:
    58  *
    59  *  This function is used to add two addresses.  It returns the
    60  *  resulting address.  This address is typically converted to an
    61  *  access type before being used further.
    62  */
    63 
    64 STATIC INLINE void *_Addresses_Add (
    65   void *left,
    66   void *right
    67 );
    68 
    69 /*
    7055 *  _Addresses_Subtract
    7156 *
     
    11398);
    11499
    115 #include <rtems/address.inl>
     100#include <rtems/core/address.inl>
    116101
    117102#ifdef __cplusplus
  • c/src/exec/score/headers/chain.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/address.h>
     24#include <rtems/core/address.h>
    2525
    2626/*
     
    423423);
    424424
    425 #include <rtems/chain.inl>
     425#include <rtems/core/chain.inl>
    426426
    427427#ifdef __cplusplus
  • c/src/exec/score/headers/context.h

    r5072b07 r3a4ae6c  
    2121#endif
    2222
    23 #include <rtems/cpu.h>
     23#include <rtems/core/cpu.h>
    2424
    2525/*
  • c/src/exec/score/headers/heap.h

    r5072b07 r3a4ae6c  
    387387);
    388388
    389 #include <rtems/heap.inl>
     389#include <rtems/core/heap.inl>
    390390
    391391#ifdef __cplusplus
  • c/src/exec/score/headers/isr.h

    r5072b07 r3a4ae6c  
    1717 */
    1818
    19 #ifndef __RTEMS_ISR_h
    20 #define __RTEMS_ISR_h
     19#ifndef __ISR_h
     20#define __ISR_h
    2121
    2222#ifdef __cplusplus
     
    3232
    3333/*
    34  *  The following type defines the control block used to manage
    35  *  the vectors.
    36  */
    37 
    38 typedef unsigned32 rtems_vector_number;
     34 *  The following type defines the type used to manage the vectors.
     35 */
     36
     37typedef unsigned32 ISR_Vector_number;
    3938
    4039/*
     
    4241 */
    4342
    44 typedef void rtems_isr;
     43typedef void ISR_Handler;
    4544
    4645/*
     
    4847 */
    4948
    50 typedef rtems_isr ( *rtems_isr_entry )(
    51                  rtems_vector_number
     49typedef ISR_Handler ( *ISR_Handler_entry )(
     50                 ISR_Vector_number
    5251             );
    5352/*
     
    6665
    6766/*
    68  *  The following declares the RTEMS Vector Table.  Application
    69  *  interrupt service routines are vectored by RTEMS via this table.
    70  */
    71 
    72 EXTERN rtems_isr_entry _ISR_Vector_table[CPU_INTERRUPT_NUMBER_OF_VECTORS];
     67 *  The following declares the Vector Table.  Application
     68 *  interrupt service routines are vectored by the ISR Handler via this table.
     69 */
     70
     71EXTERN ISR_Handler_entry _ISR_Vector_table[CPU_INTERRUPT_NUMBER_OF_VECTORS];
    7372
    7473/*
     
    8079 */
    8180
    82 STATIC INLINE void _ISR_Handler_initialization ( void );
     81void _ISR_Handler_initialization ( void );
    8382
    8483/*
     
    155154
    156155/*
     156 *  _ISR_Get_level
     157 *
     158 *  DESCRIPTION:
     159 *
     160 *  This routine returns the current interrupt level.
     161 */
     162 
     163#define _ISR_Get_level() \
     164        _CPU_ISR_Get_level()
     165 
     166/*
    157167 *  _ISR_Set_level
    158168 *
     
    177187
    178188STATIC INLINE boolean _ISR_Is_vector_number_valid (
    179   rtems_vector_number   vector
     189  ISR_Vector_number   vector
    180190);
    181191
     
    198208 *  DESCRIPTION:
    199209 *
    200  *  This routine is the RTEMS interrupt dispatcher.  ALL interrupts
     210 *  This routine is the interrupt dispatcher.  ALL interrupts
    201211 *  are vectored to this routine so that minimal context can be saved
    202212 *  and setup performed before the application's high-level language
     
    230240void _ISR_Dispatch( void );
    231241
    232 #include <rtems/isr.inl>
     242#include <rtems/core/isr.inl>
    233243
    234244#ifdef __cplusplus
  • c/src/exec/score/headers/mpci.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_MPCI_h
    18 #define __RTEMS_MPCI_h
     17#ifndef __MPCI_h
     18#define __MPCI_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/states.h>
    26 #include <rtems/status.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/threadq.h>
    29 #include <rtems/tqdata.h>
    30 #include <rtems/watchdog.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/states.h>
     26#include <rtems/core/thread.h>
     27#include <rtems/core/threadq.h>
     28#include <rtems/core/tqdata.h>
     29#include <rtems/core/watchdog.h>
     30#include <rtems/core/coresem.h>
    3131
    3232/*
     
    4646
    4747/*
     48 *  The following records define the Multiprocessor Communications
     49 *  Interface (MPCI) Table.  This table defines the user-provided
     50 *  MPCI which is a required part of a multiprocessor system.
     51 *
     52 *  For non-blocking local operations that become remote operations,
     53 *  we need a timeout.  This is a per-driver timeout: default_timeout
     54 */
     55
     56typedef void MPCI_Entry;
     57
     58typedef MPCI_Entry ( *MPCI_initialization_entry )( void );
     59
     60typedef MPCI_Entry ( *MPCI_get_packet_entry )(
     61                 MP_packet_Prefix **
     62             );
     63
     64typedef MPCI_Entry ( *MPCI_return_packet_entry )(
     65                 MP_packet_Prefix *
     66             );
     67
     68typedef MPCI_Entry ( *MPCI_send_entry )(
     69                 unsigned32,
     70                 MP_packet_Prefix *
     71             );
     72
     73typedef MPCI_Entry ( *MPCI_receive_entry )(
     74                 MP_packet_Prefix **
     75             );
     76
     77typedef struct {
     78  unsigned32                 default_timeout;        /* in ticks */
     79  unsigned32                 maximum_packet_size;
     80  MPCI_initialization_entry  initialization;
     81  MPCI_get_packet_entry      get_packet;
     82  MPCI_return_packet_entry   return_packet;
     83  MPCI_send_entry            send_packet;
     84  MPCI_receive_entry         receive_packet;
     85} MPCI_Control;
     86
     87/*
     88 *  The following defines the type for packet processing routines
     89 *  invoked by the MPCI Receive server.
     90 */
     91
     92typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
     93 
     94/*
     95 *  This is the core semaphore which the MPCI Receive Server blocks on.
     96 */
     97
     98EXTERN CORE_semaphore_Control _MPCI_Semaphore;
     99/*
     100 *  The following thread queue is used to maintain a list of tasks
     101 *  which currently have outstanding remote requests.
     102 */
     103
     104EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
     105
     106/*
     107 *  The following define the internal pointers to the user's
     108 *  configuration information.
     109 */
     110 
     111EXTERN MPCI_Control *_MPCI_table;
     112
     113/*
     114 *  The following points to the MPCI Receive Server.
     115 */
     116 
     117EXTERN Thread_Control *_MPCI_Receive_server_tcb;
     118
     119/*
     120 *  The following table contains the process packet routines provided
     121 *  by each object that supports MP operations.
     122 */
     123
     124EXTERN MPCI_Packet_processor _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
     125
     126/*
    48127 *  _MPCI_Handler_initialization
    49128 *
     
    53132 */
    54133
    55 void _MPCI_Handler_initialization ( void );
     134void _MPCI_Handler_initialization(
     135  MPCI_Control            *users_mpci_table
     136);
    56137
    57138/*
     
    67148
    68149/*
     150 *  _MPCI_Register_packet_processor
     151 *
     152 *  DESCRIPTION:
     153 *
     154 *  This routine registers the MPCI packet processor for the
     155 *  designated object class.
     156 */
     157 
     158void _MPCI_Register_packet_processor(
     159  MP_packet_Classes      the_object,
     160  MPCI_Packet_processor  the_packet_processor
     161 
     162);
     163 
     164/*
    69165 *  _MPCI_Get_packet
    70166 *
     
    75171 */
    76172
    77 rtems_packet_prefix *_MPCI_Get_packet ( void );
     173MP_packet_Prefix *_MPCI_Get_packet ( void );
    78174
    79175/*
     
    87183
    88184void _MPCI_Return_packet (
    89   rtems_packet_prefix *the_packet
     185  MP_packet_Prefix *the_packet
    90186);
    91187
     
    101197void _MPCI_Send_process_packet (
    102198  unsigned32        destination,
    103   rtems_packet_prefix *the_packet
     199  MP_packet_Prefix *the_packet
    104200);
    105201
     
    113209 */
    114210
    115 rtems_status_code _MPCI_Send_request_packet (
     211unsigned32 _MPCI_Send_request_packet (
    116212  unsigned32         destination,
    117   rtems_packet_prefix  *the_packet,
     213  MP_packet_Prefix  *the_packet,
    118214  States_Control     extra_state
    119215);
     
    130226void _MPCI_Send_response_packet (
    131227  unsigned32        destination,
    132   rtems_packet_prefix *the_packet
     228  MP_packet_Prefix *the_packet
    133229);
    134230
     
    142238 */
    143239
    144 rtems_packet_prefix  *_MPCI_Receive_packet ( void );
     240MP_packet_Prefix  *_MPCI_Receive_packet ( void );
    145241
    146242/*
     
    154250
    155251Thread_Control *_MPCI_Process_response (
    156   rtems_packet_prefix *the_packet
    157 );
    158 
    159 /*
    160  *  The following thread queue is used to maintain a list of tasks
    161  *  which currently have outstanding remote requests.
    162  */
    163 
    164 EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
     252  MP_packet_Prefix *the_packet
     253);
     254
     255/*PAGE
     256 *
     257 *  _MPCI_Receive_server
     258 *
     259 */
     260 
     261void _MPCI_Receive_server( void );
     262
     263/*PAGE
     264 *
     265 *  _MPCI_Announce
     266 *
     267 *  DESCRIPTION:
     268 *
     269 *  XXX
     270 */
     271 
     272void _MPCI_Announce ( void );
    165273
    166274#ifdef __cplusplus
  • c/src/exec/score/headers/mppkt.h

    r5072b07 r3a4ae6c  
    22 *
    33 *  This package is the specification for the Packet Handler.
    4  *  This handler defines the basic RTEMS packet and provides
     4 *  This handler defines the basic packet and provides
    55 *  mechanisms to utilize packets based on this prefix.
     6 *  Packets are the fundamental basis for messages passed between
     7 *  nodes in an MP system.
    68 *
    79 *
     
    1719 */
    1820
    19 #ifndef __RTEMS_MP_PACKET_h
    20 #define __RTEMS_MP_PACKET_h
     21#ifndef __MP_PACKET_h
     22#define __MP_PACKET_h
    2123
    2224#ifdef __cplusplus
     
    2426#endif
    2527
    26 #include <rtems/object.h>
    27 #include <rtems/priority.h>
    28 #include <rtems/watchdog.h>
     28#include <rtems/core/object.h>
     29#include <rtems/core/priority.h>
     30#include <rtems/core/watchdog.h>
    2931
    3032/*
    31  * The following enumerated type defines the packet classes
    32  *  supported by RTEMS.
     33 *  The following enumerated type defines the packet classes.
    3334 *
    3435 *  NOTE:  In general, each class corresponds to a manager
     
    3839
    3940typedef enum {
    40   RTEMS_MP_PACKET_INTERNAL_THREADS = 0,
    41   RTEMS_MP_PACKET_TASKS            = 1,
    42   RTEMS_MP_PACKET_MESSAGE_QUEUE    = 2,
    43   RTEMS_MP_PACKET_SEMAPHORE        = 3,
    44   RTEMS_MP_PACKET_PARTITION        = 4,
    45   RTEMS_MP_PACKET_REGION           = 5,
    46   RTEMS_MP_PACKET_EVENT            = 6,
    47   RTEMS_MP_PACKET_SIGNAL           = 7
    48 }   rtems_mp_packet_classes;
     41  MP_PACKET_INTERNAL_THREADS = 0,
     42  MP_PACKET_TASKS            = 1,
     43  MP_PACKET_MESSAGE_QUEUE    = 2,
     44  MP_PACKET_SEMAPHORE        = 3,
     45  MP_PACKET_PARTITION        = 4,
     46  MP_PACKET_REGION           = 5,
     47  MP_PACKET_EVENT            = 6,
     48  MP_PACKET_SIGNAL           = 7
     49}   MP_packet_Classes;
    4950
    50 #define MP_PACKET_CLASSES_FIRST  RTEMS_MP_PACKET_INTERNAL_THREADS
    51 #define MP_PACKET_CLASSES_LAST   RTEMS_MP_PACKET_SIGNAL
     51#define MP_PACKET_CLASSES_FIRST  MP_PACKET_INTERNAL_THREADS
     52#define MP_PACKET_CLASSES_LAST   MP_PACKET_SIGNAL
    5253
    5354/*
    5455 *  The following record contains the prefix for every packet
    55  *  passed between RTEMS nodes.
     56 *  passed between nodes in an MP system.
    5657 *
    5758 *  NOTE: This structure is padded to insure that anything
    5859 *        following it is on a 16 byte boundary.  This is
    5960 *        the most stringent structure alignment rule
    60  *        the RTEMS project has encountered yet (i960CA).
     61 *        encountered yet (i960CA).
    6162 */
    6263
    6364typedef struct {
    64   rtems_mp_packet_classes the_class;
     65  MP_packet_Classes      the_class;
    6566  Objects_Id              id;
    6667  Objects_Id              source_tid;
    6768  Priority_Control        source_priority;
    68   rtems_status_code       return_code;
     69  unsigned32              return_code;
    6970  unsigned32              length;
    7071  unsigned32              to_convert;
    71   rtems_interval          timeout;
    72 }   rtems_packet_prefix;
     72  Watchdog_Interval       timeout;
     73}   MP_packet_Prefix;
    7374
    7475/*
     
    7677 */
    7778
    78 #define RTEMS_MINIMUM_PACKET_SIZE  64
     79#define MP_PACKET_MINIMUM_PACKET_SIZE  64
    7980
    8081/*
     
    8283 *  in a packet which must be converted to native format in a
    8384 *  heterogeneous system.  In packets longer than
    84  *  RTEMS_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
     85 *  MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
    8586 *  may a user message buffer which is not automatically endian swapped.
    8687 */
    8788
    88 #define RTEMS_MINIMUN_HETERO_CONVERSION  ( sizeof( rtems_packet_prefix ) / 4 )
     89#define MP_PACKET_MINIMUN_HETERO_CONVERSION  ( sizeof( MP_packet_Prefix ) / 4 )
    8990
    9091/*
     
    9899
    99100STATIC INLINE boolean _Mp_packet_Is_valid_packet_class (
    100   rtems_mp_packet_classes the_packet_class
     101  MP_packet_Classes the_packet_class
    101102);
    102103
     
    111112
    112113STATIC INLINE boolean _Mp_packet_Is_null (
    113   rtems_packet_prefix   *the_packet
     114  MP_packet_Prefix   *the_packet
    114115);
    115116
    116 #include <rtems/mppkt.inl>
     117#include <rtems/core/mppkt.inl>
    117118
    118119#ifdef __cplusplus
  • c/src/exec/score/headers/object.h

    r5072b07 r3a4ae6c  
    22 *
    33 *  This include file contains all the constants and structures associated
    4  *  with the RTEMS Object Handler.  This Handler provides mechanisms which
    5  *  can be used to initialize and manipulate all RTEMS objects.
     4 *  with the Object Handler.  This Handler provides mechanisms which
     5 *  can be used to initialize and manipulate all objects which have
     6 *  ids.
    67 *
    78 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1617 */
    1718
    18 #ifndef __RTEMS_OBJECTS_h
    19 #define __RTEMS_OBJECTS_h
     19#ifndef __OBJECTS_h
     20#define __OBJECTS_h
    2021
    2122#ifdef __cplusplus
     
    2324#endif
    2425
    25 #include <rtems/chain.h>
     26#include <rtems/core/chain.h>
    2627
    2728/*
     
    143144
    144145EXTERN unsigned32  _Objects_Local_node;
     146EXTERN unsigned32  _Objects_Maximum_nodes;
    145147
    146148/*
     
    165167 */
    166168
    167 #define RTEMS_SEARCH_ALL_NODES   0
    168 #define RTEMS_SEARCH_OTHER_NODES 0x7FFFFFFE
    169 #define RTEMS_SEARCH_LOCAL_NODE  0x7FFFFFFF
    170 #define RTEMS_WHO_AM_I           0
     169#define OBJECTS_SEARCH_ALL_NODES   0
     170#define OBJECTS_SEARCH_OTHER_NODES 0x7FFFFFFE
     171#define OBJECTS_SEARCH_LOCAL_NODE  0x7FFFFFFF
     172#define OBJECTS_WHO_AM_I           0
    171173
    172174/*
     
    174176 */
    175177
    176 #define RTEMS_OBJECT_ID_INITIAL_INDEX   (0)
    177 #define RTEMS_OBJECT_ID_FINAL_INDEX     (0xffff)
    178 
    179 #define RTEMS_OBJECT_ID_INITIAL(node)   (_Objects_Build_id(      \
    180                                             OBJECTS_NO_CLASS, \
    181                                             node, \
    182                                             RTEMS_OBJECT_ID_INITIAL_INDEX))
    183 #define RTEMS_OBJECT_ID_FINAL           ((Objects_Id)~0)
     178#define OBJECTS_ID_INITIAL_INDEX   (0)
     179#define OBJECTS_ID_FINAL_INDEX     (0xffff)
     180
     181#define OBJECTS_ID_INITIAL(node)   (_Objects_Build_id(      \
     182                                      OBJECTS_NO_CLASS, \
     183                                      node, \
     184                                      OBJECTS_ID_INITIAL_INDEX))
     185#define OBJECTS_ID_FINAL           ((Objects_Id)~0)
    184186
    185187/*
     
    194196void _Objects_Handler_initialization(
    195197  unsigned32 node,
     198  unsigned32 maximum_nodes,
    196199  unsigned32 maximum_global_objects
    197200);
     
    304307 */
    305308
    306 rtems_status_code _Objects_Name_to_id(
     309typedef enum {
     310  OBJECTS_SUCCESSFUL,
     311  OBJECTS_INVALID_NAME,
     312  OBJECTS_INVALID_NODE
     313} Objects_Name_to_id_errors;
     314
     315#define OBJECTS_NAME_ERRORS_FIRST OBJECTS_SUCCESSFUL
     316#define OBJECTS_NAME_ERRORS_LAST  OBJECTS_INVALID_NODE
     317
     318Objects_Name_to_id_errors _Objects_Name_to_id(
    307319  Objects_Information *information,
    308320  Objects_Name         name,
     
    379391
    380392/*
    381  *  rtems_get_class
     393 *  _Objects_Get_class
    382394 *
    383395 *  DESCRIPTION:
     
    387399 */
    388400 
    389 STATIC INLINE Objects_Classes rtems_get_class(
     401STATIC INLINE Objects_Classes _Objects_Get_class(
    390402  Objects_Id id
    391403);
    392404
    393405/*
    394  *  rtems_get_node
     406 *  _Objects_Get_node
    395407 *
    396408 *  DESCRIPTION:
     
    400412 */
    401413
    402 STATIC INLINE unsigned32 rtems_get_node(
     414STATIC INLINE unsigned32 _Objects_Get_node(
    403415  Objects_Id id
    404416);
    405417
    406418/*
    407  *  rtems_get_index
     419 *  _Objects_Get_index
    408420 *
    409421 *  DESCRIPTION:
     
    413425 */
    414426
    415 STATIC INLINE unsigned32 rtems_get_index(
     427STATIC INLINE unsigned32 _Objects_Get_index(
    416428  Objects_Id id
    417429);
     
    533545);
    534546
    535 #include <rtems/object.inl>
     547#include <rtems/core/object.inl>
    536548#include <rtems/objectmp.h>
    537549
  • c/src/exec/score/headers/objectmp.h

    r5072b07 r3a4ae6c  
    4343
    4444void _Objects_MP_Handler_initialization (
     45  unsigned32 node,
     46  unsigned32 maximum_nodes,
    4547  unsigned32 maximum_global_objects
    4648);
     
    141143 */
    142144
    143 rtems_status_code _Objects_MP_Global_name_search (
     145Objects_Name_to_id_errors _Objects_MP_Global_name_search (
    144146  Objects_Information *information,
    145147  Objects_Name         the_name,
     
    172174 */
    173175
     176EXTERN unsigned32     _Objects_MP_Maximum_global_objects;
    174177EXTERN Chain_Control  _Objects_MP_Inactive_global_objects;
    175178
  • c/src/exec/score/headers/priority.h

    r5072b07 r3a4ae6c  
    33 *  This include file contains all thread priority manipulation routines.
    44 *  This Handler provides mechanisms which can be used to
    5  *  initialize and manipulate RTEMS priorities.
     5 *  initialize and manipulate thread priorities.
    66 *
    77 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1616 */
    1717
    18 #ifndef __RTEMS_PRIORITY_h
    19 #define __RTEMS_PRIORITY_h
     18#ifndef __PRIORITY_h
     19#define __PRIORITY_h
    2020
    2121#ifdef __cplusplus
     
    3232typedef unsigned32 Priority_Control;
    3333
    34 #define RTEMS_MINIMUM_PRIORITY      1         /* highest thread priority */
    35 #define RTEMS_MAXIMUM_PRIORITY      255       /* lowest thread priority */
     34#define PRIORITY_MINIMUM      0         /* highest thread priority */
     35#define PRIORITY_MAXIMUM      255       /* lowest thread priority */
    3636
    3737/*
     
    6161EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
    6262EXTERN Priority_Bit_map_control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
    63 
    64 /*
    65  *  The following constants are useful when manipulating priority.
    66  */
    67 
    68 #define RTEMS_CURRENT_PRIORITY      0         /* obtain current priority */
    6963
    7064/*
     
    186180);
    187181
    188 #include <rtems/priority.inl>
     182#include <rtems/core/priority.inl>
    189183
    190184#ifdef __cplusplus
  • c/src/exec/score/headers/stack.h

    r5072b07 r3a4ae6c  
    1616 */
    1717
    18 #ifndef __RTEMS_STACK_h
    19 #define __RTEMS_STACK_h
     18#ifndef __STACK_h
     19#define __STACK_h
    2020
    2121#ifdef __cplusplus
     
    2828 */
    2929
    30 #define RTEMS_MINIMUM_STACK_SIZE  CPU_STACK_MINIMUM_SIZE
     30#define STACK_MINIMUM_SIZE  CPU_STACK_MINIMUM_SIZE
    3131
    3232/*
     
    8686);
    8787
    88 #include <rtems/stack.inl>
     88#include <rtems/core/stack.inl>
    8989
    9090#ifdef __cplusplus
  • c/src/exec/score/headers/states.h

    r5072b07 r3a4ae6c  
    11/*  states.h
    22 *
    3  *  This include file contains all RTEMS state information.
     3 *  This include file contains thread execution state information.
    44 *
    55 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    4444#define STATES_WAITING_FOR_EVENT     0x0080  /* wait for event */
    4545#define STATES_WAITING_FOR_SEMAPHORE 0x0100  /* wait for semaphore */
    46 #define STATES_WAITING_FOR_TIME      0x0200  /* wait for specific TOD */
    47 #define STATES_WAITING_FOR_RPC_REPLY 0x0400  /* wait for rpc reply */
    48 #define STATES_WAITING_FOR_PERIOD    0x0800  /* rate monotonic delay */
     46#define STATES_WAITING_FOR_MUTEX     0x0200  /* wait for mutex */
     47#define STATES_WAITING_FOR_TIME      0x0400  /* wait for specific TOD */
     48#define STATES_WAITING_FOR_RPC_REPLY 0x0800  /* wait for rpc reply */
     49#define STATES_WAITING_FOR_PERIOD    0x1000  /* rate monotonic delay */
    4950
    5051#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER      | \
    5152                                 STATES_WAITING_FOR_SEGMENT     | \
    5253                                 STATES_WAITING_FOR_MESSAGE     | \
     54                                 STATES_WAITING_FOR_MUTEX       | \
    5355                                 STATES_WAITING_FOR_SEMAPHORE   )
    5456
     
    222224
    223225/*
     226 *  _States_Is_waiting_for_mutex
     227 *
     228 *  DESCRIPTION:
     229 *
     230 *  This function returns TRUE if the WAITING_FOR_MUTEX state
     231 *  is set in the_states, and FALSE otherwise.
     232 */
     233 
     234STATIC INLINE boolean _States_Is_waiting_for_mutex (
     235  States_Control the_states
     236);
     237
     238/*
    224239 *  _States_Is_waiting_for_semaphore
    225240 *
     
    328343);
    329344
    330 #include <rtems/states.inl>
     345#include <rtems/core/states.inl>
    331346
    332347#ifdef __cplusplus
  • c/src/exec/score/headers/sysstate.h

    r5072b07 r3a4ae6c  
    4141
    4242/*
     43 *  The following variable indicates whether or not this is
     44 *  an multiprocessing system.
     45 */
     46 
     47EXTERN boolean _System_state_Is_multiprocessing;
     48
     49/*
    4350 *  The following variable contains the current system state.
    4451 */
     
    4653EXTERN System_state_Codes _System_state_Current;
    4754
     55/*
     56 *  _System_state_Handler_initialization
     57 *
     58 *  DESCRIPTION:
     59 *
     60 *  This routine initializes the system state handler.
     61 */
     62 
     63STATIC INLINE void _System_state_Handler_initialization (
     64  boolean  is_multiprocessing
     65);
     66 
    4867/*
    4968 *  _System_state_Set
  • c/src/exec/score/headers/system.h

    r5072b07 r3a4ae6c  
    7777typedef void * proc_ptr;
    7878
    79 #include <rtems/cpu.h>             /* processor specific information */
    80 #include <rtems/status.h>          /* RTEMS status codes */
    81 #include <rtems/directives.h>
     79#include <rtems/core/cpu.h>        /* processor specific information */
    8280
    8381/*
     
    117115
    118116/*
    119  *  The jump table of entry points into RTEMS directives.
    120  */
    121 
    122 extern const void * _Entry_points[ RTEMS_NUMBER_OF_ENTRY_POINTS ];
    123 
    124 /*
    125117 *  The following defines the CPU dependent information table.
    126118 */
  • c/src/exec/score/headers/thread.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_THREAD_h
    18 #define __RTEMS_THREAD_h
     17#ifndef __THREAD_h
     18#define __THREAD_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/asr.h>
    25 #include <rtems/attr.h>
    26 #include <rtems/context.h>
    27 #include <rtems/cpu.h>
    28 #include <rtems/eventset.h>
    29 #include <rtems/modes.h>
    30 #include <rtems/mppkt.h>
    31 #include <rtems/object.h>
    32 #include <rtems/options.h>
    33 #include <rtems/priority.h>
    34 #include <rtems/stack.h>
    35 #include <rtems/states.h>
    36 #include <rtems/tod.h>
    37 #include <rtems/tqdata.h>
    38 #include <rtems/watchdog.h>
    39 
    40 /*
    41  *  Notepads constants (indices into notepad array)
    42  */
    43 
    44 #define RTEMS_NOTEPAD_FIRST 0             /* lowest numbered notepad */
    45 #define RTEMS_NOTEPAD_0    0              /* notepad location 0  */
    46 #define RTEMS_NOTEPAD_1    1              /* notepad location 1  */
    47 #define RTEMS_NOTEPAD_2    2              /* notepad location 2  */
    48 #define RTEMS_NOTEPAD_3    3              /* notepad location 3  */
    49 #define RTEMS_NOTEPAD_4    4              /* notepad location 4  */
    50 #define RTEMS_NOTEPAD_5    5              /* notepad location 5  */
    51 #define RTEMS_NOTEPAD_6    6              /* notepad location 6  */
    52 #define RTEMS_NOTEPAD_7    7              /* notepad location 7  */
    53 #define RTEMS_NOTEPAD_8    8              /* notepad location 8  */
    54 #define RTEMS_NOTEPAD_9    9              /* notepad location 9  */
    55 #define RTEMS_NOTEPAD_10   10             /* notepad location 10 */
    56 #define RTEMS_NOTEPAD_11   11             /* notepad location 11 */
    57 #define RTEMS_NOTEPAD_12   12             /* notepad location 12 */
    58 #define RTEMS_NOTEPAD_13   13             /* notepad location 13 */
    59 #define RTEMS_NOTEPAD_14   14             /* notepad location 14 */
    60 #define RTEMS_NOTEPAD_15   15             /* notepad location 15 */
    61 #define RTEMS_NOTEPAD_LAST RTEMS_NOTEPAD_15     /* highest numbered notepad */
    62 
    63 #define RTEMS_NUMBER_NOTEPADS  (RTEMS_NOTEPAD_LAST+1)
    64 
    65 /*
    66  *  The following defines the "return type" of an RTEMS thread.
    67  *
    68  *  NOTE:  Keep both types for internal threads.
    69  */
    70 
    71 typedef void rtems_task;
     24#include <rtems/core/context.h>
     25#include <rtems/core/cpu.h>
     26#include <rtems/core/mppkt.h>
     27#include <rtems/core/object.h>
     28#include <rtems/core/priority.h>
     29#include <rtems/core/stack.h>
     30#include <rtems/core/states.h>
     31#include <rtems/core/tod.h>
     32#include <rtems/core/tqdata.h>
     33#include <rtems/core/watchdog.h>
     34
     35/*
     36 *  The following defines the "return type" of a thread.
     37 */
     38
    7239typedef void Thread;
    7340
    7441/*
    75  *  The following defines the argument to an RTEMS thread.
    76  */
    77 
    78 typedef unsigned32 rtems_task_argument;
    79 typedef unsigned32 Thread_Argument;
    80 
    81 /*
    82  *  The following defines the type for the entry point of an RTEMS thread.
    83  */
    84 
    85 typedef rtems_task ( *rtems_task_entry )(
    86                       rtems_task_argument
    87                    );
    88 
    89 typedef Thread ( *Thread_Entry )( );
    90 
    91 /*
    92  *  The following structure contains the information which defines
    93  *  the starting state of a thread.
     42 *  The following defines the ways in which the entry point for a
     43 *  thread can be invoked.  Basically, it can be passed any
     44 *  combination/permutation of a pointer and an unsigned32 value.
     45 *
     46 *  NOTE: For now, we are ignoring the return type.
    9447 */
    9548
     
    10154} Thread_Start_types;
    10255
     56typedef Thread ( *Thread_Entry )( );
     57
     58/*
     59 *  The following structure contains the information which defines
     60 *  the starting state of a thread.
     61 */
     62
    10363typedef struct {
    10464  Thread_Entry         entry_point;      /* starting thread address         */
     
    10666  void                *pointer_argument; /* pointer argument                */
    10767  unsigned32           numeric_argument; /* numeric argument                */
    108   Modes_Control        initial_modes;    /* initial mode                    */
     68                                         /* initial execution modes         */
     69  boolean              is_preemptible;
     70  boolean              is_timeslice;
     71  unsigned32           isr_level;
    10972  Priority_Control     initial_priority; /* initial priority                */
    11073  Stack_Control        Initial_stack;    /* stack information               */
     
    11881 */
    11982
     83#define THREAD_STATUS_PROXY_BLOCKING 0x1111111
     84
    12085typedef struct {
    12186  Objects_Id            id;              /* waiting on this object       */
    122   rtems_option          option_set;      /* wait mode                    */
    123   union {
    124     unsigned32          segment_size;    /* size of segment requested    */
    125     rtems_event_set     event_condition;
    126     unsigned32         *message_size_p;  /* ptr for return size of message */
    127   } Extra;
    128   void                 *return_argument; /* address of user return param */
    129   rtems_status_code     return_code;     /* status for thread awakened   */
     87  unsigned32            count;           /* "generic" fields to be used */
     88  void                 *return_argument; /*   when blocking */
     89  void                 *return_argument_1;
     90  unsigned32            option;
     91
     92  /*
     93   *  NOTE: The following assumes that all API return codes can be
     94   *        treated as an unsigned32. 
     95   */
     96  unsigned32            return_code;     /* status for thread awakened   */
     97
    13098  Chain_Control         Block2n;         /* 2 - n priority blocked chain */
    13199  Thread_queue_Control *queue;           /* pointer to thread queue      */
     
    148116  Thread_Wait_information  Wait;
    149117  Watchdog_Control         Timer;
    150   rtems_packet_prefix     *receive_packet;
     118  MP_packet_Prefix        *receive_packet;
    151119     /****************** end of common block ********************/
    152120  Chain_Node               Active;
     
    162130 */
    163131
    164 /* XXX structure in wrong file .. API .. not core */
    165 
    166 typedef struct {
    167   boolean                   is_global;
    168   unsigned32                Notepads[ RTEMS_NUMBER_NOTEPADS ];
    169   rtems_event_set           pending_events;
    170   rtems_event_set           events_out;
    171   ASR_Information           Signal;
    172 }  RTEMS_API_Control;
     132typedef enum {
     133  THREAD_API_RTEMS
     134}  Thread_APIs;
     135
     136#define THREAD_API_FIRST THREAD_API_RTEMS
     137#define THREAD_API_LAST  THREAD_API_RTEMS
    173138
    174139typedef struct {
     
    180145  Thread_Wait_information   Wait;
    181146  Watchdog_Control          Timer;
    182   rtems_packet_prefix      *receive_packet;
     147  MP_packet_Prefix         *receive_packet;
    183148     /****************** end of common block ********************/
     149  boolean                   is_global;
    184150  Chain_Control            *ready;
    185151  Priority_Information      Priority_map;
    186152  Thread_Start_information  Start;
    187   Modes_Control             current_modes;
     153  boolean                   is_preemptible;
     154  boolean                   is_timeslice;
    188155  Context_Control           Registers;
    189156  void                     *fp_context;
    190   RTEMS_API_Control        *RTEMS_API;
    191   void                     *extension;
     157  void                     *API_Extensions[ THREAD_API_LAST + 1 ];
     158  void                    **extensions;
    192159}   Thread_Control;
    193160
    194161/*
    195  *  External API name for Thread_Control
    196  */
    197 
    198 typedef Thread_Control rtems_tcb;
    199 
     162 *  The following context area contains the context of the "thread"
     163 *  which invoked the start multitasking routine.  This context is
     164 *  restored as the last action of the stop multitasking routine.  Thus
     165 *  control of the processor can be returned to the environment
     166 *  which initiated the system.
     167 */
     168 
     169EXTERN Context_Control _Thread_BSP_context;
     170 
    200171/*
    201172 *  The following declares the dispatch critical section nesting
     
    207178
    208179/*
     180 *  The following holds how many user extensions are in the system.  This
     181 *  is used to determine how many user extension data areas to allocate
     182 *  per thread.
     183 */
     184
     185EXTERN unsigned32 _Thread_Maximum_extensions;
     186
     187/*
    209188 *  The following data items are used to manage timeslicing.
    210189 */
     
    229208/*
    230209 *  The following points to the highest priority ready thread
    231  *  in the system.  Unless the current thread is RTEMS_NO_PREEMPT,
     210 *  in the system.  Unless the current thread is not preemptibl,
    232211 *  then this thread will be context switched to when the next
    233212 *  dispatch occurs.
     
    244223
    245224/*
    246  *  The following context area contains the context of the "thread"
    247  *  which invoked rtems_initialize_executive.  This context is restored
    248  *  as the last action of the rtems_shutdown_executive directive.  Thus
    249  *  control of the processor can be returned to the environment
    250  *  which initiated RTEMS.
    251  */
    252 
    253 EXTERN Context_Control _Thread_BSP_context;
    254 
    255 /*
    256225 *  _Thread_Handler_initialization
    257226 *
     
    262231
    263232void _Thread_Handler_initialization (
    264   unsigned32 ticks_per_timeslice,
    265   unsigned32 maximum_proxies
     233  unsigned32   ticks_per_timeslice,
     234  unsigned32   maximum_extensions,
     235  unsigned32   maximum_proxies
    266236);
    267237
     
    273243 *  This routine initiates multitasking.  It is invoked only as
    274244 *  part of initialization and its invocation is the last act of
    275  *  the rtems_initialize_executive directive.
     245 *  the non-multitasking part of the system initialization.
    276246 */
    277247
     
    287257 *
    288258 *  This routine halts multitasking and returns control to
    289  *  the "thread" which initially invoked the rtems_initialize_executive
    290  *  directive.
     259 *  the "thread" (i.e. the BSP) which initially invoked the
     260 *  routine which initialized the system.
    291261 */
    292262
     
    334304  boolean              is_fp,         /* TRUE if thread uses FP */
    335305  Priority_Control     priority,
    336   Modes_Control        mode,
     306  boolean              is_preemptible,
     307  boolean              is_timeslice,
     308  unsigned32           isr_level,
    337309  Objects_Name         name
    338310 
     
    453425 *  executing thread's timeslice is reset.  Otherwise, the
    454426 *  currently executing thread is placed at the rear of the
    455  *  RTEMS_FIFO for this priority and a new heir is selected.
     427 *  FIFO for this priority and a new heir is selected.
    456428 */
    457429
     
    552524 *
    553525 *  This routine is invoked when a thread must be unblocked at the
    554  *  end of a delay such as the rtems_task_wake_after and rtems_task_wake_when
    555  *  directives.
     526 *  end of a time based delay (i.e. wake after or wake when).
    556527 */
    557528
     
    591562
    592563/*
    593  *  _Thread_Change_mode
    594  *
    595  *  DESCRIPTION:
    596  *
    597  *  This routine changes the current values of the modes
    598  *  indicated by mask of the calling thread are changed to that
    599  *  indicated in mode_set.  The former mode of the thread is
    600  *  returned in mode_set.  If the changes in the current mode
    601  *  indicate that a thread dispatch operation may be necessary,
    602  *  then need_dispatch is TRUE, otherwise it is FALSE.
    603  */
    604 
    605 boolean _Thread_Change_mode(
    606   Modes_Control  new_mode_set,
    607   Modes_Control  mask,
    608   Modes_Control *old_mode_set
    609 );
     564 *  _Thread_Evaluate_mode
     565 *
     566 *  DESCRIPTION:
     567 *
     568 *  This routine XXX
     569 */
     570
     571boolean _Thread_Evaluate_mode( void );
    610572
    611573/*
     
    783745);
    784746
    785 #include <rtems/thread.inl>
    786 #include <rtems/threadmp.h>
     747/*
     748 *  _Thread_Is_proxy_blocking
     749 *
     750 *  DESCRIPTION:
     751 *
     752 *  This function returns TRUE if the status code is equal to the
     753 *  status which indicates that a proxy is blocking, and FALSE otherwise.
     754 */
     755 
     756STATIC INLINE boolean _Thread_Is_proxy_blocking (
     757  unsigned32 code
     758);
     759
     760#include <rtems/core/thread.inl>
     761#include <rtems/core/threadmp.h>
    787762
    788763#ifdef __cplusplus
  • c/src/exec/score/headers/threadmp.h

    r5072b07 r3a4ae6c  
    105105EXTERN Chain_Control _Thread_MP_Inactive_proxies;
    106106
    107 #include <rtems/threadmp.inl>
     107#include <rtems/core/threadmp.inl>
    108108
    109109#ifdef __cplusplus
  • c/src/exec/score/headers/threadq.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_THREAD_QUEUE_h
    18 #define __RTEMS_THREAD_QUEUE_h
     17#ifndef __THREAD_QUEUE_h
     18#define __THREAD_QUEUE_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/tqdata.h>
    25 
    26 #include <rtems/object.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/watchdog.h>
     24#include <rtems/core/tqdata.h>
     25
     26#include <rtems/core/object.h>
     27#include <rtems/core/thread.h>
     28#include <rtems/core/watchdog.h>
    2929
    3030/*
     
    7676void _Thread_queue_Enqueue(
    7777  Thread_queue_Control *the_thread_queue,
    78   rtems_interval        timeout
     78  Watchdog_Interval     timeout
    7979);
    8080
     
    132132void _Thread_queue_Flush(
    133133  Thread_queue_Control       *the_thread_queue,
    134   Thread_queue_Flush_callout  remote_extract_callout
     134  Thread_queue_Flush_callout  remote_extract_callout,
     135  unsigned32                  status
    135136);
    136137
     
    150151  Thread_queue_Disciplines      the_discipline,
    151152  States_Control                state,
    152   Thread_queue_Extract_callout  proxy_extract_callout
     153  Thread_queue_Extract_callout  proxy_extract_callout,
     154  unsigned32                    timeout_status
    153155);
    154156
     
    180182  Thread_queue_Control *the_thread_queue,
    181183  Thread_Control       *the_thread,
    182   rtems_interval     timeout
     184  Watchdog_Interval     timeout
    183185);
    184186
     
    232234 *  This routine enqueues the currently executing thread on
    233235 *  the_thread_queue with an optional timeout using the
    234  *  RTEMS_FIFO discipline.
     236 *  FIFO discipline.
    235237 */
    236238
     
    238240  Thread_queue_Control *the_thread_queue,
    239241  Thread_Control       *the_thread,
    240   rtems_interval     timeout
     242  Watchdog_Interval     timeout
    241243);
    242244
  • c/src/exec/score/headers/tod.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_TIME_OF_DAY_h
    18 #define __RTEMS_TIME_OF_DAY_h
     17#ifndef __TIME_OF_DAY_h
     18#define __TIME_OF_DAY_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/object.h>
    25 #include <rtems/watchdog.h>
     24#include <rtems/core/object.h>
     25#include <rtems/core/watchdog.h>
    2626
    2727/*
     
    4343/*
    4444 *  The following constant define the earliest year to which an
    45  *  RTEMS time of day can be initialized.  This is considered the
     45 *  time of day can be initialized.  This is considered the
    4646 *  epoch.
    4747 */
     
    6262  unsigned32 second;               /* second, 0 -> 59 */
    6363  unsigned32 ticks;                /* elapsed ticks between secs */
    64 }   rtems_time_of_day;
     64}   TOD_Control;
    6565
    6666/*
     
    6868 */
    6969
    70 EXTERN rtems_time_of_day _TOD_Current;
     70EXTERN TOD_Control _TOD_Current;
    7171
    7272/*
     
    7575 */
    7676
    77 EXTERN rtems_interval _TOD_Seconds_since_epoch;
     77EXTERN Watchdog_Interval _TOD_Seconds_since_epoch;
    7878
    7979/*
     
    8282 */
    8383
    84 EXTERN rtems_interval _TOD_Ticks_since_boot;
     84EXTERN Watchdog_Interval _TOD_Ticks_since_boot;
    8585
    8686/*
     
    174174
    175175void _TOD_Set(
    176   rtems_time_of_day       *the_tod,
    177   rtems_interval  seconds_since_epoch
     176  TOD_Control       *the_tod,
     177  Watchdog_Interval  seconds_since_epoch
    178178);
    179179
     
    183183 *  DESCRIPTION:
    184184 *
    185  *  This function returns STATUS.RTEMS_SUCCESSFUL if THE_TOD contains
     185 *  This function returns TRUE if THE_TOD contains
    186186 *  a valid time of day, and FALSE otherwise.
    187187 */
    188188
    189 rtems_status_code _TOD_Validate(
    190   rtems_time_of_day *the_tod
     189boolean _TOD_Validate(
     190  TOD_Control *the_tod
    191191);
    192192
     
    199199 */
    200200
    201 rtems_interval _TOD_To_seconds(
    202   rtems_time_of_day *the_tod
     201Watchdog_Interval _TOD_To_seconds(
     202  TOD_Control *the_tod
    203203);
    204204
     
    244244
    245245STATIC INLINE void _TOD_Activate(
    246   rtems_interval ticks
     246  Watchdog_Interval ticks
    247247);
    248248
     
    263263
    264264/*
    265  *  RTEMS_MILLISECONDS_TO_MICROSECONDS
     265 *  TOD_MILLISECONDS_TO_MICROSECONDS
    266266 *
    267267 *  DESCRIPTION:
     
    274274 */
    275275
    276 #define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) ((_ms) * 1000)
    277 
    278 /*
    279  *  RTEMS_MILLISECONDS_TO_TICKS
     276#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((_ms) * 1000)
     277
     278/*
     279 *  TOD_MILLISECONDS_TO_TICKS
    280280 *
    281281 *  DESCRIPTION:
     
    288288 */
    289289
    290 #define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
    291     (RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick)
    292 
    293 #include <rtems/tod.inl>
     290#define TOD_MILLISECONDS_TO_TICKS(_ms) \
     291    (TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick)
     292
     293#include <rtems/core/tod.inl>
    294294
    295295#ifdef __cplusplus
  • c/src/exec/score/headers/tqdata.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_THREAD_QUEUE_DATA_h
    18 #define __RTEMS_THREAD_QUEUE_DATA_h
     17#ifndef __THREAD_QUEUE_DATA_h
     18#define __THREAD_QUEUE_DATA_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/chain.h>
    25 #include <rtems/priority.h>
    26 #include <rtems/states.h>
     24#include <rtems/core/chain.h>
     25#include <rtems/core/priority.h>
     26#include <rtems/core/states.h>
    2727
    2828/*
     
    3232
    3333typedef enum {
    34   THREAD_QUEUE_DISCIPLINE_FIFO,     /* RTEMS_FIFO queue discipline */
    35   THREAD_QUEUE_DISCIPLINE_PRIORITY  /* RTEMS_PRIORITY queue discipline */
     34  THREAD_QUEUE_DISCIPLINE_FIFO,     /* FIFO queue discipline */
     35  THREAD_QUEUE_DISCIPLINE_PRIORITY  /* PRIORITY queue discipline */
    3636}   Thread_queue_Disciplines;
    3737
     
    5252  Thread_queue_Disciplines discipline; /* queue discipline               */
    5353  States_Control           state;      /* state of threads on Thread_q   */
     54  unsigned32               timeout_status;
    5455}   Thread_queue_Control;
    5556
     
    8182);
    8283
    83 #include <rtems/tqdata.inl>
     84#include <rtems/core/tqdata.inl>
    8485
    8586#ifdef __cplusplus
  • c/src/exec/score/headers/userext.h

    r5072b07 r3a4ae6c  
    33 *  This include file contains all information about user extensions.  This
    44 *  Handler provides mechanisms which can be used to initialize and manipulate
    5  *  all RTEMS user extensions.
     5 *  all user extensions.
    66 *
    77 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1616 */
    1717
    18 #ifndef __RTEMS_USER_EXTENSIONS_h
    19 #define __RTEMS_USER_EXTENSIONS_h
     18#ifndef __USER_EXTENSIONS_h
     19#define __USER_EXTENSIONS_h
    2020
    2121#ifdef __cplusplus
     
    2323#endif
    2424
    25 #include <rtems/config.h>
    26 #include <rtems/thread.h>
     25#include <rtems/core/interr.h>
     26#include <rtems/core/chain.h>
     27#include <rtems/core/thread.h>
     28
     29/*
     30 *  The following records defines the User Extension Table.
     31 *  This table defines the application dependent routines which
     32 *  are invoked at critical points in the life of each thread and
     33 *  the system as a whole.
     34 */
     35 
     36typedef void User_extensions_routine;
     37 
     38typedef boolean ( *User_extensions_thread_create_extension )(
     39                 Thread_Control *,
     40                 Thread_Control *
     41             );
     42 
     43typedef User_extensions_routine ( *User_extensions_thread_delete_extension )(
     44                 Thread_Control *,
     45                 Thread_Control *
     46             );
     47 
     48typedef User_extensions_routine ( *User_extensions_thread_start_extension )(
     49                 Thread_Control *,
     50                 Thread_Control *
     51             );
     52 
     53typedef User_extensions_routine ( *User_extensions_thread_restart_extension )(
     54                 Thread_Control *,
     55                 Thread_Control *
     56             );
     57 
     58typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
     59                 Thread_Control *,
     60                 Thread_Control *
     61             );
     62 
     63typedef User_extensions_routine (*User_extensions_thread_post_switch_extension)(
     64                 Thread_Control *
     65             );
     66 
     67typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
     68                 Thread_Control *
     69             );
     70 
     71typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
     72                 Thread_Control *
     73             );
     74 
     75typedef User_extensions_routine ( *User_extensions_fatal_extension )(
     76                 Internal_errors_Source  /* the_source  */,
     77                 boolean                 /* is_internal */,
     78                 unsigned32              /* the_error   */
     79             );
     80
     81 
     82typedef struct {
     83  User_extensions_thread_create_extension       thread_create;
     84  User_extensions_thread_start_extension        thread_start;
     85  User_extensions_thread_restart_extension      thread_restart;
     86  User_extensions_thread_delete_extension       thread_delete;
     87  User_extensions_thread_switch_extension       thread_switch;
     88  User_extensions_thread_post_switch_extension  thread_post_switch;
     89  User_extensions_thread_begin_extension        thread_begin;
     90  User_extensions_thread_exitted_extension      thread_exitted;
     91  User_extensions_fatal_extension               fatal;
     92}   User_extensions_Table;
    2793
    2894/*
     
    3197
    3298typedef struct {
    33   Chain_Node                     Node;
    34   rtems_extensions_table  Callouts;
     99  Chain_Node              Node;
     100  User_extensions_Table   Callouts;
    35101}   User_extensions_Control;
    36102
     
    58124
    59125STATIC INLINE void _User_extensions_Handler_initialization (
    60     rtems_extensions_table *initial_extensions
     126    User_extensions_Table *initial_extensions
    61127);
    62128
     
    71137STATIC INLINE void _User_extensions_Add_set (
    72138  User_extensions_Control  *the_extension,
    73   rtems_extensions_table   *extension_table
     139  User_extensions_Table    *extension_table
     140);
     141
     142/*
     143 *  _User_extensions_Add_API_set
     144 *
     145 *  DESCRIPTION:
     146 *
     147 *  This routine is used to add an API extension set to the active list.
     148 */
     149 
     150STATIC INLINE void _User_extensions_Add_API_set (
     151  User_extensions_Control  *the_extension
    74152);
    75153
     
    87165
    88166/*
    89  *  _User_extensions_Task_create
    90  *
    91  *  DESCRIPTION:
    92  *
    93  *  This routine is used to invoke the user extension for
    94  *  the rtems_task_create directive.
    95  */
    96 
    97 STATIC INLINE void _User_extensions_Task_create (
    98   Thread_Control *the_thread
    99 );
    100 
    101 /*
    102  *  _User_extensions_Task_delete
    103  *
    104  *  DESCRIPTION:
    105  *
    106  *  This routine is used to invoke the user extension for
    107  *  the rtems_task_delete directive.
    108  */
    109 
    110 STATIC INLINE void _User_extensions_Task_delete (
    111   Thread_Control *the_thread
    112 );
    113 
    114 /*
    115  *  _User_extensions_Task_start
    116  *
    117  *  DESCRIPTION:
    118  *
    119  *  This routine is used to invoke the user extension for
    120  *  the rtems_task_start directive.
    121  */
    122 
    123 STATIC INLINE void _User_extensions_Task_start (
    124   Thread_Control *the_thread
    125 );
    126 
    127 /*
    128  *  _User_extensions_Task_restart
    129  *
    130  *  DESCRIPTION:
    131  *
    132  *  This routine is used to invoke the user extension for
    133  *  the rtems_task_restart directive.
    134  */
    135 
    136 STATIC INLINE void _User_extensions_Task_restart (
    137   Thread_Control *the_thread
    138 );
    139 
    140 /*
    141  *  _User_extensions_Task_switch
     167 *  _User_extensions_Thread_create
     168 *
     169 *  DESCRIPTION:
     170 *
     171 *  This routine is used to invoke the user extension for
     172 *  the thread creation operate.
     173 */
     174
     175boolean _User_extensions_Thread_create (
     176  Thread_Control *the_thread
     177);
     178
     179/*
     180 *  _User_extensions_Thread_delete
     181 *
     182 *  DESCRIPTION:
     183 *
     184 *  This routine is used to invoke the user extension for
     185 *  the thread deletion operation.
     186 */
     187
     188void _User_extensions_Thread_delete (
     189  Thread_Control *the_thread
     190);
     191
     192/*
     193 *  _User_extensions_Thread_start
     194 *
     195 *  DESCRIPTION:
     196 *
     197 *  This routine is used to invoke the user extension for
     198 *  the thread start operation.
     199 */
     200
     201void _User_extensions_Thread_start (
     202  Thread_Control *the_thread
     203);
     204
     205/*
     206 *  _User_extensions_Thread_restart
     207 *
     208 *  DESCRIPTION:
     209 *
     210 *  This routine is used to invoke the user extension for
     211 *  the thread restart operation.
     212 */
     213
     214void _User_extensions_Thread_restart (
     215  Thread_Control *the_thread
     216);
     217
     218/*
     219 *  _User_extensions_Thread_switch
    142220 *
    143221 *  DESCRIPTION:
     
    147225 */
    148226
    149 STATIC INLINE void _User_extensions_Task_switch (
     227STATIC INLINE void _User_extensions_Thread_switch (
    150228  Thread_Control *executing,
    151229  Thread_Control *heir
     
    153231
    154232/*
    155  *  _User_extensions_Task_begin
     233 *  _User_extensions_Thread_post_switch
     234 *
     235 *  DESCRIPTION:
     236 *
     237 *  This routine is used to invoke the user extension which is invoked
     238 *  after a context switch occurs (i.e. we are running in the context
     239 *  of the new thread).
     240 */
     241 
     242STATIC INLINE void _User_extensions_Thread_post_switch (
     243  Thread_Control *executing
     244);
     245 
     246
     247/*
     248 *  _User_extensions_Thread_begin
    156249 *
    157250 *  DESCRIPTION:
    158251 *
    159252 *  This routine is used to invoke the user extension which
    160  *  is invoked when a task begins.
    161  */
    162 
    163 STATIC INLINE void _User_extensions_Task_begin (
     253 *  is invoked when a thread begins.
     254 */
     255
     256void _User_extensions_Thread_begin (
    164257  Thread_Control *executing
    165258);
    166259
    167260/*
    168  *  _User_extensions_Task_exitted
     261 *  _User_extensions_Thread_exitted
    169262 *
    170263 *  DESCRIPTION:
    171264 *
    172265 *  This routine is used to invoke the user extension which
    173  *  is invoked when a task exits.
    174  */
    175 
    176 STATIC INLINE void _User_extensions_Task_exitted (
     266 *  is invoked when a thread exits.
     267 */
     268
     269void _User_extensions_Thread_exitted (
    177270  Thread_Control *executing
    178271);
    179272
    180273/*
    181  *  _User_extensions_Task_exitted
    182  *
    183  *  DESCRIPTION:
    184  *
    185  *  This routine is used to invoke the user extension which
    186  *  is invoked when a task exits.
    187  */
    188 
    189 STATIC INLINE void _User_extensions_Task_exitted (
    190   Thread_Control *executing
    191 );
    192 
    193 /*
    194274 *  _User_extensions_Fatal
    195275 *
    196276 *  DESCRIPTION:
    197277 *
    198  *  This routine is used to invoke the user extension for
    199  *  the rtems_fatal_error_occurred directive.
    200  */
    201 
    202 STATIC INLINE void _User_extensions_Fatal (
    203   unsigned32 the_error
    204 );
    205 
    206 #include <rtems/userext.inl>
     278 *  This routine is used to invoke the user extension invoked
     279 *  when a fatal error occurs.
     280 */
     281
     282void _User_extensions_Fatal (
     283  Internal_errors_Source  the_source,
     284  boolean                 is_internal,
     285  unsigned32              the_error
     286);
     287
     288#include <rtems/core/userext.inl>
    207289
    208290#ifdef __cplusplus
  • c/src/exec/score/headers/watchdog.h

    r5072b07 r3a4ae6c  
    1616 */
    1717
    18 #ifndef __RTEMS_WATCHDOG_h
    19 #define __RTEMS_WATCHDOG_h
     18#ifndef __WATCHDOG_h
     19#define __WATCHDOG_h
    2020
    2121#ifdef __cplusplus
     
    2323#endif
    2424
    25 #include <rtems/object.h>
     25#include <rtems/core/object.h>
    2626
    2727/*
     
    3030 */
    3131
    32 typedef unsigned32 rtems_interval;
    33 
    34 /*
    35  *  The following types define a pointer to a watchdog/timer service routine.
    36  */
    37 
    38 typedef void rtems_timer_service_routine;
    39 
    40 typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
     32typedef unsigned32 Watchdog_Interval;
     33
     34/*
     35 *  The following types define a pointer to a watchdog service routine.
     36 */
     37
     38typedef void Watchdog_Service_routine;
     39
     40typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )(
    4141                 Objects_Id,
    4242                 void *
     
    4747 */
    4848
    49 #define RTEMS_NO_TIMEOUT  0
     49#define WATCHDOG_NO_TIMEOUT  0
    5050
    5151/*
     
    9393  Chain_Node        Node;
    9494  Watchdog_States   state;
    95   rtems_interval initial;
    96   rtems_interval delta_interval;
    97   rtems_timer_service_routine_entry  routine;
     95  Watchdog_Interval initial;
     96  Watchdog_Interval delta_interval;
     97  Watchdog_Service_routine_entry  routine;
    9898  Objects_Id        id;
    9999  void             *user_data;
     
    141141STATIC INLINE void _Watchdog_Initialize(
    142142   Watchdog_Control *the_watchdog,
    143    rtems_timer_service_routine_entry  routine,
     143   Watchdog_Service_routine_entry  routine,
    144144   Objects_Id        id,
    145145   void             *user_data
     
    239239STATIC INLINE void _Watchdog_Insert_ticks(
    240240  Watchdog_Control      *the_watchdog,
    241   rtems_interval      units,
     241  Watchdog_Interval      units,
    242242  Watchdog_Insert_modes  insert_mode
    243243);
     
    257257STATIC INLINE void _Watchdog_Insert_seconds(
    258258  Watchdog_Control      *the_watchdog,
    259   rtems_interval      units,
     259  Watchdog_Interval      units,
    260260  Watchdog_Insert_modes  insert_mode
    261261);
     
    274274STATIC INLINE void _Watchdog_Adjust_seconds(
    275275  Watchdog_Adjust_directions direction,
    276   rtems_interval          units
     276  Watchdog_Interval          units
    277277);
    278278
     
    289289STATIC INLINE void _Watchdog_Adjust_ticks(
    290290  Watchdog_Adjust_directions direction,
    291   rtems_interval          units
     291  Watchdog_Interval          units
    292292);
    293293
     
    375375  Chain_Control              *header,
    376376  Watchdog_Adjust_directions  direction,
    377   rtems_interval              units
     377  Watchdog_Interval           units
    378378);
    379379
     
    409409);
    410410
    411 #include <rtems/watchdog.inl>
     411#include <rtems/core/watchdog.inl>
    412412
    413413#ifdef __cplusplus
  • c/src/exec/score/headers/wkspace.h

    r5072b07 r3a4ae6c  
    11/*  wkspace.h
    22 *
    3  *  This include file contains information related to the RTEMS
     3 *  This include file contains information related to the
    44 *  RAM Workspace.  This Handler provides mechanisms which can be used to
    5  *  define, initialize and manipulate the RTEMS workspace.
     5 *  define, initialize and manipulate the workspace.
    66 *
    77 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1616 */
    1717
    18 #ifndef __RTEMS_WORKSPACE_h
    19 #define __RTEMS_WORKSPACE_h
     18#ifndef __WORKSPACE_h
     19#define __WORKSPACE_h
    2020
    2121#ifdef __cplusplus
     
    2323#endif
    2424
    25 #include <rtems/heap.h>
    26 #include <rtems/fatal.h>
    27 #include <rtems/status.h>
     25#include <rtems/core/heap.h>
     26#include <rtems/core/interr.h>
    2827
    2928/*
    30  *  The following is used to manage the RTEMS Workspace.
     29 *  The following is used to manage the Workspace.
    3130 *
    3231 */
     
    6867 *  This routine returns the address of a block of memory of size
    6968 *  bytes.  If a block of the appropriate size cannot be allocated
    70  *  from the workspace, then the rtems_fatal_error_occurred directive
    71  *  is invoked.
     69 *  from the workspace, then the internal error handler is invoked.
    7270 */
    7371
     
    9088);
    9189
    92 #include <rtems/wkspace.inl>
     90#include <rtems/core/wkspace.inl>
    9391
    9492#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/address.h

    r5072b07 r3a4ae6c  
    5353
    5454/*
    55  *  _Addresses_Add
    56  *
    57  *  DESCRIPTION:
    58  *
    59  *  This function is used to add two addresses.  It returns the
    60  *  resulting address.  This address is typically converted to an
    61  *  access type before being used further.
    62  */
    63 
    64 STATIC INLINE void *_Addresses_Add (
    65   void *left,
    66   void *right
    67 );
    68 
    69 /*
    7055 *  _Addresses_Subtract
    7156 *
     
    11398);
    11499
    115 #include <rtems/address.inl>
     100#include <rtems/core/address.inl>
    116101
    117102#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/chain.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/address.h>
     24#include <rtems/core/address.h>
    2525
    2626/*
     
    423423);
    424424
    425 #include <rtems/chain.inl>
     425#include <rtems/core/chain.inl>
    426426
    427427#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/context.h

    r5072b07 r3a4ae6c  
    2121#endif
    2222
    23 #include <rtems/cpu.h>
     23#include <rtems/core/cpu.h>
    2424
    2525/*
  • c/src/exec/score/include/rtems/score/heap.h

    r5072b07 r3a4ae6c  
    387387);
    388388
    389 #include <rtems/heap.inl>
     389#include <rtems/core/heap.inl>
    390390
    391391#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/isr.h

    r5072b07 r3a4ae6c  
    1717 */
    1818
    19 #ifndef __RTEMS_ISR_h
    20 #define __RTEMS_ISR_h
     19#ifndef __ISR_h
     20#define __ISR_h
    2121
    2222#ifdef __cplusplus
     
    3232
    3333/*
    34  *  The following type defines the control block used to manage
    35  *  the vectors.
    36  */
    37 
    38 typedef unsigned32 rtems_vector_number;
     34 *  The following type defines the type used to manage the vectors.
     35 */
     36
     37typedef unsigned32 ISR_Vector_number;
    3938
    4039/*
     
    4241 */
    4342
    44 typedef void rtems_isr;
     43typedef void ISR_Handler;
    4544
    4645/*
     
    4847 */
    4948
    50 typedef rtems_isr ( *rtems_isr_entry )(
    51                  rtems_vector_number
     49typedef ISR_Handler ( *ISR_Handler_entry )(
     50                 ISR_Vector_number
    5251             );
    5352/*
     
    6665
    6766/*
    68  *  The following declares the RTEMS Vector Table.  Application
    69  *  interrupt service routines are vectored by RTEMS via this table.
    70  */
    71 
    72 EXTERN rtems_isr_entry _ISR_Vector_table[CPU_INTERRUPT_NUMBER_OF_VECTORS];
     67 *  The following declares the Vector Table.  Application
     68 *  interrupt service routines are vectored by the ISR Handler via this table.
     69 */
     70
     71EXTERN ISR_Handler_entry _ISR_Vector_table[CPU_INTERRUPT_NUMBER_OF_VECTORS];
    7372
    7473/*
     
    8079 */
    8180
    82 STATIC INLINE void _ISR_Handler_initialization ( void );
     81void _ISR_Handler_initialization ( void );
    8382
    8483/*
     
    155154
    156155/*
     156 *  _ISR_Get_level
     157 *
     158 *  DESCRIPTION:
     159 *
     160 *  This routine returns the current interrupt level.
     161 */
     162 
     163#define _ISR_Get_level() \
     164        _CPU_ISR_Get_level()
     165 
     166/*
    157167 *  _ISR_Set_level
    158168 *
     
    177187
    178188STATIC INLINE boolean _ISR_Is_vector_number_valid (
    179   rtems_vector_number   vector
     189  ISR_Vector_number   vector
    180190);
    181191
     
    198208 *  DESCRIPTION:
    199209 *
    200  *  This routine is the RTEMS interrupt dispatcher.  ALL interrupts
     210 *  This routine is the interrupt dispatcher.  ALL interrupts
    201211 *  are vectored to this routine so that minimal context can be saved
    202212 *  and setup performed before the application's high-level language
     
    230240void _ISR_Dispatch( void );
    231241
    232 #include <rtems/isr.inl>
     242#include <rtems/core/isr.inl>
    233243
    234244#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/mpci.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_MPCI_h
    18 #define __RTEMS_MPCI_h
     17#ifndef __MPCI_h
     18#define __MPCI_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/states.h>
    26 #include <rtems/status.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/threadq.h>
    29 #include <rtems/tqdata.h>
    30 #include <rtems/watchdog.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/states.h>
     26#include <rtems/core/thread.h>
     27#include <rtems/core/threadq.h>
     28#include <rtems/core/tqdata.h>
     29#include <rtems/core/watchdog.h>
     30#include <rtems/core/coresem.h>
    3131
    3232/*
     
    4646
    4747/*
     48 *  The following records define the Multiprocessor Communications
     49 *  Interface (MPCI) Table.  This table defines the user-provided
     50 *  MPCI which is a required part of a multiprocessor system.
     51 *
     52 *  For non-blocking local operations that become remote operations,
     53 *  we need a timeout.  This is a per-driver timeout: default_timeout
     54 */
     55
     56typedef void MPCI_Entry;
     57
     58typedef MPCI_Entry ( *MPCI_initialization_entry )( void );
     59
     60typedef MPCI_Entry ( *MPCI_get_packet_entry )(
     61                 MP_packet_Prefix **
     62             );
     63
     64typedef MPCI_Entry ( *MPCI_return_packet_entry )(
     65                 MP_packet_Prefix *
     66             );
     67
     68typedef MPCI_Entry ( *MPCI_send_entry )(
     69                 unsigned32,
     70                 MP_packet_Prefix *
     71             );
     72
     73typedef MPCI_Entry ( *MPCI_receive_entry )(
     74                 MP_packet_Prefix **
     75             );
     76
     77typedef struct {
     78  unsigned32                 default_timeout;        /* in ticks */
     79  unsigned32                 maximum_packet_size;
     80  MPCI_initialization_entry  initialization;
     81  MPCI_get_packet_entry      get_packet;
     82  MPCI_return_packet_entry   return_packet;
     83  MPCI_send_entry            send_packet;
     84  MPCI_receive_entry         receive_packet;
     85} MPCI_Control;
     86
     87/*
     88 *  The following defines the type for packet processing routines
     89 *  invoked by the MPCI Receive server.
     90 */
     91
     92typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
     93 
     94/*
     95 *  This is the core semaphore which the MPCI Receive Server blocks on.
     96 */
     97
     98EXTERN CORE_semaphore_Control _MPCI_Semaphore;
     99/*
     100 *  The following thread queue is used to maintain a list of tasks
     101 *  which currently have outstanding remote requests.
     102 */
     103
     104EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
     105
     106/*
     107 *  The following define the internal pointers to the user's
     108 *  configuration information.
     109 */
     110 
     111EXTERN MPCI_Control *_MPCI_table;
     112
     113/*
     114 *  The following points to the MPCI Receive Server.
     115 */
     116 
     117EXTERN Thread_Control *_MPCI_Receive_server_tcb;
     118
     119/*
     120 *  The following table contains the process packet routines provided
     121 *  by each object that supports MP operations.
     122 */
     123
     124EXTERN MPCI_Packet_processor _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
     125
     126/*
    48127 *  _MPCI_Handler_initialization
    49128 *
     
    53132 */
    54133
    55 void _MPCI_Handler_initialization ( void );
     134void _MPCI_Handler_initialization(
     135  MPCI_Control            *users_mpci_table
     136);
    56137
    57138/*
     
    67148
    68149/*
     150 *  _MPCI_Register_packet_processor
     151 *
     152 *  DESCRIPTION:
     153 *
     154 *  This routine registers the MPCI packet processor for the
     155 *  designated object class.
     156 */
     157 
     158void _MPCI_Register_packet_processor(
     159  MP_packet_Classes      the_object,
     160  MPCI_Packet_processor  the_packet_processor
     161 
     162);
     163 
     164/*
    69165 *  _MPCI_Get_packet
    70166 *
     
    75171 */
    76172
    77 rtems_packet_prefix *_MPCI_Get_packet ( void );
     173MP_packet_Prefix *_MPCI_Get_packet ( void );
    78174
    79175/*
     
    87183
    88184void _MPCI_Return_packet (
    89   rtems_packet_prefix *the_packet
     185  MP_packet_Prefix *the_packet
    90186);
    91187
     
    101197void _MPCI_Send_process_packet (
    102198  unsigned32        destination,
    103   rtems_packet_prefix *the_packet
     199  MP_packet_Prefix *the_packet
    104200);
    105201
     
    113209 */
    114210
    115 rtems_status_code _MPCI_Send_request_packet (
     211unsigned32 _MPCI_Send_request_packet (
    116212  unsigned32         destination,
    117   rtems_packet_prefix  *the_packet,
     213  MP_packet_Prefix  *the_packet,
    118214  States_Control     extra_state
    119215);
     
    130226void _MPCI_Send_response_packet (
    131227  unsigned32        destination,
    132   rtems_packet_prefix *the_packet
     228  MP_packet_Prefix *the_packet
    133229);
    134230
     
    142238 */
    143239
    144 rtems_packet_prefix  *_MPCI_Receive_packet ( void );
     240MP_packet_Prefix  *_MPCI_Receive_packet ( void );
    145241
    146242/*
     
    154250
    155251Thread_Control *_MPCI_Process_response (
    156   rtems_packet_prefix *the_packet
    157 );
    158 
    159 /*
    160  *  The following thread queue is used to maintain a list of tasks
    161  *  which currently have outstanding remote requests.
    162  */
    163 
    164 EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
     252  MP_packet_Prefix *the_packet
     253);
     254
     255/*PAGE
     256 *
     257 *  _MPCI_Receive_server
     258 *
     259 */
     260 
     261void _MPCI_Receive_server( void );
     262
     263/*PAGE
     264 *
     265 *  _MPCI_Announce
     266 *
     267 *  DESCRIPTION:
     268 *
     269 *  XXX
     270 */
     271 
     272void _MPCI_Announce ( void );
    165273
    166274#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/mppkt.h

    r5072b07 r3a4ae6c  
    22 *
    33 *  This package is the specification for the Packet Handler.
    4  *  This handler defines the basic RTEMS packet and provides
     4 *  This handler defines the basic packet and provides
    55 *  mechanisms to utilize packets based on this prefix.
     6 *  Packets are the fundamental basis for messages passed between
     7 *  nodes in an MP system.
    68 *
    79 *
     
    1719 */
    1820
    19 #ifndef __RTEMS_MP_PACKET_h
    20 #define __RTEMS_MP_PACKET_h
     21#ifndef __MP_PACKET_h
     22#define __MP_PACKET_h
    2123
    2224#ifdef __cplusplus
     
    2426#endif
    2527
    26 #include <rtems/object.h>
    27 #include <rtems/priority.h>
    28 #include <rtems/watchdog.h>
     28#include <rtems/core/object.h>
     29#include <rtems/core/priority.h>
     30#include <rtems/core/watchdog.h>
    2931
    3032/*
    31  * The following enumerated type defines the packet classes
    32  *  supported by RTEMS.
     33 *  The following enumerated type defines the packet classes.
    3334 *
    3435 *  NOTE:  In general, each class corresponds to a manager
     
    3839
    3940typedef enum {
    40   RTEMS_MP_PACKET_INTERNAL_THREADS = 0,
    41   RTEMS_MP_PACKET_TASKS            = 1,
    42   RTEMS_MP_PACKET_MESSAGE_QUEUE    = 2,
    43   RTEMS_MP_PACKET_SEMAPHORE        = 3,
    44   RTEMS_MP_PACKET_PARTITION        = 4,
    45   RTEMS_MP_PACKET_REGION           = 5,
    46   RTEMS_MP_PACKET_EVENT            = 6,
    47   RTEMS_MP_PACKET_SIGNAL           = 7
    48 }   rtems_mp_packet_classes;
     41  MP_PACKET_INTERNAL_THREADS = 0,
     42  MP_PACKET_TASKS            = 1,
     43  MP_PACKET_MESSAGE_QUEUE    = 2,
     44  MP_PACKET_SEMAPHORE        = 3,
     45  MP_PACKET_PARTITION        = 4,
     46  MP_PACKET_REGION           = 5,
     47  MP_PACKET_EVENT            = 6,
     48  MP_PACKET_SIGNAL           = 7
     49}   MP_packet_Classes;
    4950
    50 #define MP_PACKET_CLASSES_FIRST  RTEMS_MP_PACKET_INTERNAL_THREADS
    51 #define MP_PACKET_CLASSES_LAST   RTEMS_MP_PACKET_SIGNAL
     51#define MP_PACKET_CLASSES_FIRST  MP_PACKET_INTERNAL_THREADS
     52#define MP_PACKET_CLASSES_LAST   MP_PACKET_SIGNAL
    5253
    5354/*
    5455 *  The following record contains the prefix for every packet
    55  *  passed between RTEMS nodes.
     56 *  passed between nodes in an MP system.
    5657 *
    5758 *  NOTE: This structure is padded to insure that anything
    5859 *        following it is on a 16 byte boundary.  This is
    5960 *        the most stringent structure alignment rule
    60  *        the RTEMS project has encountered yet (i960CA).
     61 *        encountered yet (i960CA).
    6162 */
    6263
    6364typedef struct {
    64   rtems_mp_packet_classes the_class;
     65  MP_packet_Classes      the_class;
    6566  Objects_Id              id;
    6667  Objects_Id              source_tid;
    6768  Priority_Control        source_priority;
    68   rtems_status_code       return_code;
     69  unsigned32              return_code;
    6970  unsigned32              length;
    7071  unsigned32              to_convert;
    71   rtems_interval          timeout;
    72 }   rtems_packet_prefix;
     72  Watchdog_Interval       timeout;
     73}   MP_packet_Prefix;
    7374
    7475/*
     
    7677 */
    7778
    78 #define RTEMS_MINIMUM_PACKET_SIZE  64
     79#define MP_PACKET_MINIMUM_PACKET_SIZE  64
    7980
    8081/*
     
    8283 *  in a packet which must be converted to native format in a
    8384 *  heterogeneous system.  In packets longer than
    84  *  RTEMS_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
     85 *  MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
    8586 *  may a user message buffer which is not automatically endian swapped.
    8687 */
    8788
    88 #define RTEMS_MINIMUN_HETERO_CONVERSION  ( sizeof( rtems_packet_prefix ) / 4 )
     89#define MP_PACKET_MINIMUN_HETERO_CONVERSION  ( sizeof( MP_packet_Prefix ) / 4 )
    8990
    9091/*
     
    9899
    99100STATIC INLINE boolean _Mp_packet_Is_valid_packet_class (
    100   rtems_mp_packet_classes the_packet_class
     101  MP_packet_Classes the_packet_class
    101102);
    102103
     
    111112
    112113STATIC INLINE boolean _Mp_packet_Is_null (
    113   rtems_packet_prefix   *the_packet
     114  MP_packet_Prefix   *the_packet
    114115);
    115116
    116 #include <rtems/mppkt.inl>
     117#include <rtems/core/mppkt.inl>
    117118
    118119#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/object.h

    r5072b07 r3a4ae6c  
    22 *
    33 *  This include file contains all the constants and structures associated
    4  *  with the RTEMS Object Handler.  This Handler provides mechanisms which
    5  *  can be used to initialize and manipulate all RTEMS objects.
     4 *  with the Object Handler.  This Handler provides mechanisms which
     5 *  can be used to initialize and manipulate all objects which have
     6 *  ids.
    67 *
    78 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1617 */
    1718
    18 #ifndef __RTEMS_OBJECTS_h
    19 #define __RTEMS_OBJECTS_h
     19#ifndef __OBJECTS_h
     20#define __OBJECTS_h
    2021
    2122#ifdef __cplusplus
     
    2324#endif
    2425
    25 #include <rtems/chain.h>
     26#include <rtems/core/chain.h>
    2627
    2728/*
     
    143144
    144145EXTERN unsigned32  _Objects_Local_node;
     146EXTERN unsigned32  _Objects_Maximum_nodes;
    145147
    146148/*
     
    165167 */
    166168
    167 #define RTEMS_SEARCH_ALL_NODES   0
    168 #define RTEMS_SEARCH_OTHER_NODES 0x7FFFFFFE
    169 #define RTEMS_SEARCH_LOCAL_NODE  0x7FFFFFFF
    170 #define RTEMS_WHO_AM_I           0
     169#define OBJECTS_SEARCH_ALL_NODES   0
     170#define OBJECTS_SEARCH_OTHER_NODES 0x7FFFFFFE
     171#define OBJECTS_SEARCH_LOCAL_NODE  0x7FFFFFFF
     172#define OBJECTS_WHO_AM_I           0
    171173
    172174/*
     
    174176 */
    175177
    176 #define RTEMS_OBJECT_ID_INITIAL_INDEX   (0)
    177 #define RTEMS_OBJECT_ID_FINAL_INDEX     (0xffff)
    178 
    179 #define RTEMS_OBJECT_ID_INITIAL(node)   (_Objects_Build_id(      \
    180                                             OBJECTS_NO_CLASS, \
    181                                             node, \
    182                                             RTEMS_OBJECT_ID_INITIAL_INDEX))
    183 #define RTEMS_OBJECT_ID_FINAL           ((Objects_Id)~0)
     178#define OBJECTS_ID_INITIAL_INDEX   (0)
     179#define OBJECTS_ID_FINAL_INDEX     (0xffff)
     180
     181#define OBJECTS_ID_INITIAL(node)   (_Objects_Build_id(      \
     182                                      OBJECTS_NO_CLASS, \
     183                                      node, \
     184                                      OBJECTS_ID_INITIAL_INDEX))
     185#define OBJECTS_ID_FINAL           ((Objects_Id)~0)
    184186
    185187/*
     
    194196void _Objects_Handler_initialization(
    195197  unsigned32 node,
     198  unsigned32 maximum_nodes,
    196199  unsigned32 maximum_global_objects
    197200);
     
    304307 */
    305308
    306 rtems_status_code _Objects_Name_to_id(
     309typedef enum {
     310  OBJECTS_SUCCESSFUL,
     311  OBJECTS_INVALID_NAME,
     312  OBJECTS_INVALID_NODE
     313} Objects_Name_to_id_errors;
     314
     315#define OBJECTS_NAME_ERRORS_FIRST OBJECTS_SUCCESSFUL
     316#define OBJECTS_NAME_ERRORS_LAST  OBJECTS_INVALID_NODE
     317
     318Objects_Name_to_id_errors _Objects_Name_to_id(
    307319  Objects_Information *information,
    308320  Objects_Name         name,
     
    379391
    380392/*
    381  *  rtems_get_class
     393 *  _Objects_Get_class
    382394 *
    383395 *  DESCRIPTION:
     
    387399 */
    388400 
    389 STATIC INLINE Objects_Classes rtems_get_class(
     401STATIC INLINE Objects_Classes _Objects_Get_class(
    390402  Objects_Id id
    391403);
    392404
    393405/*
    394  *  rtems_get_node
     406 *  _Objects_Get_node
    395407 *
    396408 *  DESCRIPTION:
     
    400412 */
    401413
    402 STATIC INLINE unsigned32 rtems_get_node(
     414STATIC INLINE unsigned32 _Objects_Get_node(
    403415  Objects_Id id
    404416);
    405417
    406418/*
    407  *  rtems_get_index
     419 *  _Objects_Get_index
    408420 *
    409421 *  DESCRIPTION:
     
    413425 */
    414426
    415 STATIC INLINE unsigned32 rtems_get_index(
     427STATIC INLINE unsigned32 _Objects_Get_index(
    416428  Objects_Id id
    417429);
     
    533545);
    534546
    535 #include <rtems/object.inl>
     547#include <rtems/core/object.inl>
    536548#include <rtems/objectmp.h>
    537549
  • c/src/exec/score/include/rtems/score/objectmp.h

    r5072b07 r3a4ae6c  
    4343
    4444void _Objects_MP_Handler_initialization (
     45  unsigned32 node,
     46  unsigned32 maximum_nodes,
    4547  unsigned32 maximum_global_objects
    4648);
     
    141143 */
    142144
    143 rtems_status_code _Objects_MP_Global_name_search (
     145Objects_Name_to_id_errors _Objects_MP_Global_name_search (
    144146  Objects_Information *information,
    145147  Objects_Name         the_name,
     
    172174 */
    173175
     176EXTERN unsigned32     _Objects_MP_Maximum_global_objects;
    174177EXTERN Chain_Control  _Objects_MP_Inactive_global_objects;
    175178
  • c/src/exec/score/include/rtems/score/priority.h

    r5072b07 r3a4ae6c  
    33 *  This include file contains all thread priority manipulation routines.
    44 *  This Handler provides mechanisms which can be used to
    5  *  initialize and manipulate RTEMS priorities.
     5 *  initialize and manipulate thread priorities.
    66 *
    77 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1616 */
    1717
    18 #ifndef __RTEMS_PRIORITY_h
    19 #define __RTEMS_PRIORITY_h
     18#ifndef __PRIORITY_h
     19#define __PRIORITY_h
    2020
    2121#ifdef __cplusplus
     
    3232typedef unsigned32 Priority_Control;
    3333
    34 #define RTEMS_MINIMUM_PRIORITY      1         /* highest thread priority */
    35 #define RTEMS_MAXIMUM_PRIORITY      255       /* lowest thread priority */
     34#define PRIORITY_MINIMUM      0         /* highest thread priority */
     35#define PRIORITY_MAXIMUM      255       /* lowest thread priority */
    3636
    3737/*
     
    6161EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
    6262EXTERN Priority_Bit_map_control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
    63 
    64 /*
    65  *  The following constants are useful when manipulating priority.
    66  */
    67 
    68 #define RTEMS_CURRENT_PRIORITY      0         /* obtain current priority */
    6963
    7064/*
     
    186180);
    187181
    188 #include <rtems/priority.inl>
     182#include <rtems/core/priority.inl>
    189183
    190184#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/stack.h

    r5072b07 r3a4ae6c  
    1616 */
    1717
    18 #ifndef __RTEMS_STACK_h
    19 #define __RTEMS_STACK_h
     18#ifndef __STACK_h
     19#define __STACK_h
    2020
    2121#ifdef __cplusplus
     
    2828 */
    2929
    30 #define RTEMS_MINIMUM_STACK_SIZE  CPU_STACK_MINIMUM_SIZE
     30#define STACK_MINIMUM_SIZE  CPU_STACK_MINIMUM_SIZE
    3131
    3232/*
     
    8686);
    8787
    88 #include <rtems/stack.inl>
     88#include <rtems/core/stack.inl>
    8989
    9090#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/states.h

    r5072b07 r3a4ae6c  
    11/*  states.h
    22 *
    3  *  This include file contains all RTEMS state information.
     3 *  This include file contains thread execution state information.
    44 *
    55 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    4444#define STATES_WAITING_FOR_EVENT     0x0080  /* wait for event */
    4545#define STATES_WAITING_FOR_SEMAPHORE 0x0100  /* wait for semaphore */
    46 #define STATES_WAITING_FOR_TIME      0x0200  /* wait for specific TOD */
    47 #define STATES_WAITING_FOR_RPC_REPLY 0x0400  /* wait for rpc reply */
    48 #define STATES_WAITING_FOR_PERIOD    0x0800  /* rate monotonic delay */
     46#define STATES_WAITING_FOR_MUTEX     0x0200  /* wait for mutex */
     47#define STATES_WAITING_FOR_TIME      0x0400  /* wait for specific TOD */
     48#define STATES_WAITING_FOR_RPC_REPLY 0x0800  /* wait for rpc reply */
     49#define STATES_WAITING_FOR_PERIOD    0x1000  /* rate monotonic delay */
    4950
    5051#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER      | \
    5152                                 STATES_WAITING_FOR_SEGMENT     | \
    5253                                 STATES_WAITING_FOR_MESSAGE     | \
     54                                 STATES_WAITING_FOR_MUTEX       | \
    5355                                 STATES_WAITING_FOR_SEMAPHORE   )
    5456
     
    222224
    223225/*
     226 *  _States_Is_waiting_for_mutex
     227 *
     228 *  DESCRIPTION:
     229 *
     230 *  This function returns TRUE if the WAITING_FOR_MUTEX state
     231 *  is set in the_states, and FALSE otherwise.
     232 */
     233 
     234STATIC INLINE boolean _States_Is_waiting_for_mutex (
     235  States_Control the_states
     236);
     237
     238/*
    224239 *  _States_Is_waiting_for_semaphore
    225240 *
     
    328343);
    329344
    330 #include <rtems/states.inl>
     345#include <rtems/core/states.inl>
    331346
    332347#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/sysstate.h

    r5072b07 r3a4ae6c  
    4141
    4242/*
     43 *  The following variable indicates whether or not this is
     44 *  an multiprocessing system.
     45 */
     46 
     47EXTERN boolean _System_state_Is_multiprocessing;
     48
     49/*
    4350 *  The following variable contains the current system state.
    4451 */
     
    4653EXTERN System_state_Codes _System_state_Current;
    4754
     55/*
     56 *  _System_state_Handler_initialization
     57 *
     58 *  DESCRIPTION:
     59 *
     60 *  This routine initializes the system state handler.
     61 */
     62 
     63STATIC INLINE void _System_state_Handler_initialization (
     64  boolean  is_multiprocessing
     65);
     66 
    4867/*
    4968 *  _System_state_Set
  • c/src/exec/score/include/rtems/score/thread.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_THREAD_h
    18 #define __RTEMS_THREAD_h
     17#ifndef __THREAD_h
     18#define __THREAD_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/asr.h>
    25 #include <rtems/attr.h>
    26 #include <rtems/context.h>
    27 #include <rtems/cpu.h>
    28 #include <rtems/eventset.h>
    29 #include <rtems/modes.h>
    30 #include <rtems/mppkt.h>
    31 #include <rtems/object.h>
    32 #include <rtems/options.h>
    33 #include <rtems/priority.h>
    34 #include <rtems/stack.h>
    35 #include <rtems/states.h>
    36 #include <rtems/tod.h>
    37 #include <rtems/tqdata.h>
    38 #include <rtems/watchdog.h>
    39 
    40 /*
    41  *  Notepads constants (indices into notepad array)
    42  */
    43 
    44 #define RTEMS_NOTEPAD_FIRST 0             /* lowest numbered notepad */
    45 #define RTEMS_NOTEPAD_0    0              /* notepad location 0  */
    46 #define RTEMS_NOTEPAD_1    1              /* notepad location 1  */
    47 #define RTEMS_NOTEPAD_2    2              /* notepad location 2  */
    48 #define RTEMS_NOTEPAD_3    3              /* notepad location 3  */
    49 #define RTEMS_NOTEPAD_4    4              /* notepad location 4  */
    50 #define RTEMS_NOTEPAD_5    5              /* notepad location 5  */
    51 #define RTEMS_NOTEPAD_6    6              /* notepad location 6  */
    52 #define RTEMS_NOTEPAD_7    7              /* notepad location 7  */
    53 #define RTEMS_NOTEPAD_8    8              /* notepad location 8  */
    54 #define RTEMS_NOTEPAD_9    9              /* notepad location 9  */
    55 #define RTEMS_NOTEPAD_10   10             /* notepad location 10 */
    56 #define RTEMS_NOTEPAD_11   11             /* notepad location 11 */
    57 #define RTEMS_NOTEPAD_12   12             /* notepad location 12 */
    58 #define RTEMS_NOTEPAD_13   13             /* notepad location 13 */
    59 #define RTEMS_NOTEPAD_14   14             /* notepad location 14 */
    60 #define RTEMS_NOTEPAD_15   15             /* notepad location 15 */
    61 #define RTEMS_NOTEPAD_LAST RTEMS_NOTEPAD_15     /* highest numbered notepad */
    62 
    63 #define RTEMS_NUMBER_NOTEPADS  (RTEMS_NOTEPAD_LAST+1)
    64 
    65 /*
    66  *  The following defines the "return type" of an RTEMS thread.
    67  *
    68  *  NOTE:  Keep both types for internal threads.
    69  */
    70 
    71 typedef void rtems_task;
     24#include <rtems/core/context.h>
     25#include <rtems/core/cpu.h>
     26#include <rtems/core/mppkt.h>
     27#include <rtems/core/object.h>
     28#include <rtems/core/priority.h>
     29#include <rtems/core/stack.h>
     30#include <rtems/core/states.h>
     31#include <rtems/core/tod.h>
     32#include <rtems/core/tqdata.h>
     33#include <rtems/core/watchdog.h>
     34
     35/*
     36 *  The following defines the "return type" of a thread.
     37 */
     38
    7239typedef void Thread;
    7340
    7441/*
    75  *  The following defines the argument to an RTEMS thread.
    76  */
    77 
    78 typedef unsigned32 rtems_task_argument;
    79 typedef unsigned32 Thread_Argument;
    80 
    81 /*
    82  *  The following defines the type for the entry point of an RTEMS thread.
    83  */
    84 
    85 typedef rtems_task ( *rtems_task_entry )(
    86                       rtems_task_argument
    87                    );
    88 
    89 typedef Thread ( *Thread_Entry )( );
    90 
    91 /*
    92  *  The following structure contains the information which defines
    93  *  the starting state of a thread.
     42 *  The following defines the ways in which the entry point for a
     43 *  thread can be invoked.  Basically, it can be passed any
     44 *  combination/permutation of a pointer and an unsigned32 value.
     45 *
     46 *  NOTE: For now, we are ignoring the return type.
    9447 */
    9548
     
    10154} Thread_Start_types;
    10255
     56typedef Thread ( *Thread_Entry )( );
     57
     58/*
     59 *  The following structure contains the information which defines
     60 *  the starting state of a thread.
     61 */
     62
    10363typedef struct {
    10464  Thread_Entry         entry_point;      /* starting thread address         */
     
    10666  void                *pointer_argument; /* pointer argument                */
    10767  unsigned32           numeric_argument; /* numeric argument                */
    108   Modes_Control        initial_modes;    /* initial mode                    */
     68                                         /* initial execution modes         */
     69  boolean              is_preemptible;
     70  boolean              is_timeslice;
     71  unsigned32           isr_level;
    10972  Priority_Control     initial_priority; /* initial priority                */
    11073  Stack_Control        Initial_stack;    /* stack information               */
     
    11881 */
    11982
     83#define THREAD_STATUS_PROXY_BLOCKING 0x1111111
     84
    12085typedef struct {
    12186  Objects_Id            id;              /* waiting on this object       */
    122   rtems_option          option_set;      /* wait mode                    */
    123   union {
    124     unsigned32          segment_size;    /* size of segment requested    */
    125     rtems_event_set     event_condition;
    126     unsigned32         *message_size_p;  /* ptr for return size of message */
    127   } Extra;
    128   void                 *return_argument; /* address of user return param */
    129   rtems_status_code     return_code;     /* status for thread awakened   */
     87  unsigned32            count;           /* "generic" fields to be used */
     88  void                 *return_argument; /*   when blocking */
     89  void                 *return_argument_1;
     90  unsigned32            option;
     91
     92  /*
     93   *  NOTE: The following assumes that all API return codes can be
     94   *        treated as an unsigned32. 
     95   */
     96  unsigned32            return_code;     /* status for thread awakened   */
     97
    13098  Chain_Control         Block2n;         /* 2 - n priority blocked chain */
    13199  Thread_queue_Control *queue;           /* pointer to thread queue      */
     
    148116  Thread_Wait_information  Wait;
    149117  Watchdog_Control         Timer;
    150   rtems_packet_prefix     *receive_packet;
     118  MP_packet_Prefix        *receive_packet;
    151119     /****************** end of common block ********************/
    152120  Chain_Node               Active;
     
    162130 */
    163131
    164 /* XXX structure in wrong file .. API .. not core */
    165 
    166 typedef struct {
    167   boolean                   is_global;
    168   unsigned32                Notepads[ RTEMS_NUMBER_NOTEPADS ];
    169   rtems_event_set           pending_events;
    170   rtems_event_set           events_out;
    171   ASR_Information           Signal;
    172 }  RTEMS_API_Control;
     132typedef enum {
     133  THREAD_API_RTEMS
     134}  Thread_APIs;
     135
     136#define THREAD_API_FIRST THREAD_API_RTEMS
     137#define THREAD_API_LAST  THREAD_API_RTEMS
    173138
    174139typedef struct {
     
    180145  Thread_Wait_information   Wait;
    181146  Watchdog_Control          Timer;
    182   rtems_packet_prefix      *receive_packet;
     147  MP_packet_Prefix         *receive_packet;
    183148     /****************** end of common block ********************/
     149  boolean                   is_global;
    184150  Chain_Control            *ready;
    185151  Priority_Information      Priority_map;
    186152  Thread_Start_information  Start;
    187   Modes_Control             current_modes;
     153  boolean                   is_preemptible;
     154  boolean                   is_timeslice;
    188155  Context_Control           Registers;
    189156  void                     *fp_context;
    190   RTEMS_API_Control        *RTEMS_API;
    191   void                     *extension;
     157  void                     *API_Extensions[ THREAD_API_LAST + 1 ];
     158  void                    **extensions;
    192159}   Thread_Control;
    193160
    194161/*
    195  *  External API name for Thread_Control
    196  */
    197 
    198 typedef Thread_Control rtems_tcb;
    199 
     162 *  The following context area contains the context of the "thread"
     163 *  which invoked the start multitasking routine.  This context is
     164 *  restored as the last action of the stop multitasking routine.  Thus
     165 *  control of the processor can be returned to the environment
     166 *  which initiated the system.
     167 */
     168 
     169EXTERN Context_Control _Thread_BSP_context;
     170 
    200171/*
    201172 *  The following declares the dispatch critical section nesting
     
    207178
    208179/*
     180 *  The following holds how many user extensions are in the system.  This
     181 *  is used to determine how many user extension data areas to allocate
     182 *  per thread.
     183 */
     184
     185EXTERN unsigned32 _Thread_Maximum_extensions;
     186
     187/*
    209188 *  The following data items are used to manage timeslicing.
    210189 */
     
    229208/*
    230209 *  The following points to the highest priority ready thread
    231  *  in the system.  Unless the current thread is RTEMS_NO_PREEMPT,
     210 *  in the system.  Unless the current thread is not preemptibl,
    232211 *  then this thread will be context switched to when the next
    233212 *  dispatch occurs.
     
    244223
    245224/*
    246  *  The following context area contains the context of the "thread"
    247  *  which invoked rtems_initialize_executive.  This context is restored
    248  *  as the last action of the rtems_shutdown_executive directive.  Thus
    249  *  control of the processor can be returned to the environment
    250  *  which initiated RTEMS.
    251  */
    252 
    253 EXTERN Context_Control _Thread_BSP_context;
    254 
    255 /*
    256225 *  _Thread_Handler_initialization
    257226 *
     
    262231
    263232void _Thread_Handler_initialization (
    264   unsigned32 ticks_per_timeslice,
    265   unsigned32 maximum_proxies
     233  unsigned32   ticks_per_timeslice,
     234  unsigned32   maximum_extensions,
     235  unsigned32   maximum_proxies
    266236);
    267237
     
    273243 *  This routine initiates multitasking.  It is invoked only as
    274244 *  part of initialization and its invocation is the last act of
    275  *  the rtems_initialize_executive directive.
     245 *  the non-multitasking part of the system initialization.
    276246 */
    277247
     
    287257 *
    288258 *  This routine halts multitasking and returns control to
    289  *  the "thread" which initially invoked the rtems_initialize_executive
    290  *  directive.
     259 *  the "thread" (i.e. the BSP) which initially invoked the
     260 *  routine which initialized the system.
    291261 */
    292262
     
    334304  boolean              is_fp,         /* TRUE if thread uses FP */
    335305  Priority_Control     priority,
    336   Modes_Control        mode,
     306  boolean              is_preemptible,
     307  boolean              is_timeslice,
     308  unsigned32           isr_level,
    337309  Objects_Name         name
    338310 
     
    453425 *  executing thread's timeslice is reset.  Otherwise, the
    454426 *  currently executing thread is placed at the rear of the
    455  *  RTEMS_FIFO for this priority and a new heir is selected.
     427 *  FIFO for this priority and a new heir is selected.
    456428 */
    457429
     
    552524 *
    553525 *  This routine is invoked when a thread must be unblocked at the
    554  *  end of a delay such as the rtems_task_wake_after and rtems_task_wake_when
    555  *  directives.
     526 *  end of a time based delay (i.e. wake after or wake when).
    556527 */
    557528
     
    591562
    592563/*
    593  *  _Thread_Change_mode
    594  *
    595  *  DESCRIPTION:
    596  *
    597  *  This routine changes the current values of the modes
    598  *  indicated by mask of the calling thread are changed to that
    599  *  indicated in mode_set.  The former mode of the thread is
    600  *  returned in mode_set.  If the changes in the current mode
    601  *  indicate that a thread dispatch operation may be necessary,
    602  *  then need_dispatch is TRUE, otherwise it is FALSE.
    603  */
    604 
    605 boolean _Thread_Change_mode(
    606   Modes_Control  new_mode_set,
    607   Modes_Control  mask,
    608   Modes_Control *old_mode_set
    609 );
     564 *  _Thread_Evaluate_mode
     565 *
     566 *  DESCRIPTION:
     567 *
     568 *  This routine XXX
     569 */
     570
     571boolean _Thread_Evaluate_mode( void );
    610572
    611573/*
     
    783745);
    784746
    785 #include <rtems/thread.inl>
    786 #include <rtems/threadmp.h>
     747/*
     748 *  _Thread_Is_proxy_blocking
     749 *
     750 *  DESCRIPTION:
     751 *
     752 *  This function returns TRUE if the status code is equal to the
     753 *  status which indicates that a proxy is blocking, and FALSE otherwise.
     754 */
     755 
     756STATIC INLINE boolean _Thread_Is_proxy_blocking (
     757  unsigned32 code
     758);
     759
     760#include <rtems/core/thread.inl>
     761#include <rtems/core/threadmp.h>
    787762
    788763#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/threadmp.h

    r5072b07 r3a4ae6c  
    105105EXTERN Chain_Control _Thread_MP_Inactive_proxies;
    106106
    107 #include <rtems/threadmp.inl>
     107#include <rtems/core/threadmp.inl>
    108108
    109109#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/threadq.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_THREAD_QUEUE_h
    18 #define __RTEMS_THREAD_QUEUE_h
     17#ifndef __THREAD_QUEUE_h
     18#define __THREAD_QUEUE_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/tqdata.h>
    25 
    26 #include <rtems/object.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/watchdog.h>
     24#include <rtems/core/tqdata.h>
     25
     26#include <rtems/core/object.h>
     27#include <rtems/core/thread.h>
     28#include <rtems/core/watchdog.h>
    2929
    3030/*
     
    7676void _Thread_queue_Enqueue(
    7777  Thread_queue_Control *the_thread_queue,
    78   rtems_interval        timeout
     78  Watchdog_Interval     timeout
    7979);
    8080
     
    132132void _Thread_queue_Flush(
    133133  Thread_queue_Control       *the_thread_queue,
    134   Thread_queue_Flush_callout  remote_extract_callout
     134  Thread_queue_Flush_callout  remote_extract_callout,
     135  unsigned32                  status
    135136);
    136137
     
    150151  Thread_queue_Disciplines      the_discipline,
    151152  States_Control                state,
    152   Thread_queue_Extract_callout  proxy_extract_callout
     153  Thread_queue_Extract_callout  proxy_extract_callout,
     154  unsigned32                    timeout_status
    153155);
    154156
     
    180182  Thread_queue_Control *the_thread_queue,
    181183  Thread_Control       *the_thread,
    182   rtems_interval     timeout
     184  Watchdog_Interval     timeout
    183185);
    184186
     
    232234 *  This routine enqueues the currently executing thread on
    233235 *  the_thread_queue with an optional timeout using the
    234  *  RTEMS_FIFO discipline.
     236 *  FIFO discipline.
    235237 */
    236238
     
    238240  Thread_queue_Control *the_thread_queue,
    239241  Thread_Control       *the_thread,
    240   rtems_interval     timeout
     242  Watchdog_Interval     timeout
    241243);
    242244
  • c/src/exec/score/include/rtems/score/tod.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_TIME_OF_DAY_h
    18 #define __RTEMS_TIME_OF_DAY_h
     17#ifndef __TIME_OF_DAY_h
     18#define __TIME_OF_DAY_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/object.h>
    25 #include <rtems/watchdog.h>
     24#include <rtems/core/object.h>
     25#include <rtems/core/watchdog.h>
    2626
    2727/*
     
    4343/*
    4444 *  The following constant define the earliest year to which an
    45  *  RTEMS time of day can be initialized.  This is considered the
     45 *  time of day can be initialized.  This is considered the
    4646 *  epoch.
    4747 */
     
    6262  unsigned32 second;               /* second, 0 -> 59 */
    6363  unsigned32 ticks;                /* elapsed ticks between secs */
    64 }   rtems_time_of_day;
     64}   TOD_Control;
    6565
    6666/*
     
    6868 */
    6969
    70 EXTERN rtems_time_of_day _TOD_Current;
     70EXTERN TOD_Control _TOD_Current;
    7171
    7272/*
     
    7575 */
    7676
    77 EXTERN rtems_interval _TOD_Seconds_since_epoch;
     77EXTERN Watchdog_Interval _TOD_Seconds_since_epoch;
    7878
    7979/*
     
    8282 */
    8383
    84 EXTERN rtems_interval _TOD_Ticks_since_boot;
     84EXTERN Watchdog_Interval _TOD_Ticks_since_boot;
    8585
    8686/*
     
    174174
    175175void _TOD_Set(
    176   rtems_time_of_day       *the_tod,
    177   rtems_interval  seconds_since_epoch
     176  TOD_Control       *the_tod,
     177  Watchdog_Interval  seconds_since_epoch
    178178);
    179179
     
    183183 *  DESCRIPTION:
    184184 *
    185  *  This function returns STATUS.RTEMS_SUCCESSFUL if THE_TOD contains
     185 *  This function returns TRUE if THE_TOD contains
    186186 *  a valid time of day, and FALSE otherwise.
    187187 */
    188188
    189 rtems_status_code _TOD_Validate(
    190   rtems_time_of_day *the_tod
     189boolean _TOD_Validate(
     190  TOD_Control *the_tod
    191191);
    192192
     
    199199 */
    200200
    201 rtems_interval _TOD_To_seconds(
    202   rtems_time_of_day *the_tod
     201Watchdog_Interval _TOD_To_seconds(
     202  TOD_Control *the_tod
    203203);
    204204
     
    244244
    245245STATIC INLINE void _TOD_Activate(
    246   rtems_interval ticks
     246  Watchdog_Interval ticks
    247247);
    248248
     
    263263
    264264/*
    265  *  RTEMS_MILLISECONDS_TO_MICROSECONDS
     265 *  TOD_MILLISECONDS_TO_MICROSECONDS
    266266 *
    267267 *  DESCRIPTION:
     
    274274 */
    275275
    276 #define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) ((_ms) * 1000)
    277 
    278 /*
    279  *  RTEMS_MILLISECONDS_TO_TICKS
     276#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((_ms) * 1000)
     277
     278/*
     279 *  TOD_MILLISECONDS_TO_TICKS
    280280 *
    281281 *  DESCRIPTION:
     
    288288 */
    289289
    290 #define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
    291     (RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick)
    292 
    293 #include <rtems/tod.inl>
     290#define TOD_MILLISECONDS_TO_TICKS(_ms) \
     291    (TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick)
     292
     293#include <rtems/core/tod.inl>
    294294
    295295#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/tqdata.h

    r5072b07 r3a4ae6c  
    1515 */
    1616
    17 #ifndef __RTEMS_THREAD_QUEUE_DATA_h
    18 #define __RTEMS_THREAD_QUEUE_DATA_h
     17#ifndef __THREAD_QUEUE_DATA_h
     18#define __THREAD_QUEUE_DATA_h
    1919
    2020#ifdef __cplusplus
     
    2222#endif
    2323
    24 #include <rtems/chain.h>
    25 #include <rtems/priority.h>
    26 #include <rtems/states.h>
     24#include <rtems/core/chain.h>
     25#include <rtems/core/priority.h>
     26#include <rtems/core/states.h>
    2727
    2828/*
     
    3232
    3333typedef enum {
    34   THREAD_QUEUE_DISCIPLINE_FIFO,     /* RTEMS_FIFO queue discipline */
    35   THREAD_QUEUE_DISCIPLINE_PRIORITY  /* RTEMS_PRIORITY queue discipline */
     34  THREAD_QUEUE_DISCIPLINE_FIFO,     /* FIFO queue discipline */
     35  THREAD_QUEUE_DISCIPLINE_PRIORITY  /* PRIORITY queue discipline */
    3636}   Thread_queue_Disciplines;
    3737
     
    5252  Thread_queue_Disciplines discipline; /* queue discipline               */
    5353  States_Control           state;      /* state of threads on Thread_q   */
     54  unsigned32               timeout_status;
    5455}   Thread_queue_Control;
    5556
     
    8182);
    8283
    83 #include <rtems/tqdata.inl>
     84#include <rtems/core/tqdata.inl>
    8485
    8586#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/userext.h

    r5072b07 r3a4ae6c  
    33 *  This include file contains all information about user extensions.  This
    44 *  Handler provides mechanisms which can be used to initialize and manipulate
    5  *  all RTEMS user extensions.
     5 *  all user extensions.
    66 *
    77 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1616 */
    1717
    18 #ifndef __RTEMS_USER_EXTENSIONS_h
    19 #define __RTEMS_USER_EXTENSIONS_h
     18#ifndef __USER_EXTENSIONS_h
     19#define __USER_EXTENSIONS_h
    2020
    2121#ifdef __cplusplus
     
    2323#endif
    2424
    25 #include <rtems/config.h>
    26 #include <rtems/thread.h>
     25#include <rtems/core/interr.h>
     26#include <rtems/core/chain.h>
     27#include <rtems/core/thread.h>
     28
     29/*
     30 *  The following records defines the User Extension Table.
     31 *  This table defines the application dependent routines which
     32 *  are invoked at critical points in the life of each thread and
     33 *  the system as a whole.
     34 */
     35 
     36typedef void User_extensions_routine;
     37 
     38typedef boolean ( *User_extensions_thread_create_extension )(
     39                 Thread_Control *,
     40                 Thread_Control *
     41             );
     42 
     43typedef User_extensions_routine ( *User_extensions_thread_delete_extension )(
     44                 Thread_Control *,
     45                 Thread_Control *
     46             );
     47 
     48typedef User_extensions_routine ( *User_extensions_thread_start_extension )(
     49                 Thread_Control *,
     50                 Thread_Control *
     51             );
     52 
     53typedef User_extensions_routine ( *User_extensions_thread_restart_extension )(
     54                 Thread_Control *,
     55                 Thread_Control *
     56             );
     57 
     58typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
     59                 Thread_Control *,
     60                 Thread_Control *
     61             );
     62 
     63typedef User_extensions_routine (*User_extensions_thread_post_switch_extension)(
     64                 Thread_Control *
     65             );
     66 
     67typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
     68                 Thread_Control *
     69             );
     70 
     71typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
     72                 Thread_Control *
     73             );
     74 
     75typedef User_extensions_routine ( *User_extensions_fatal_extension )(
     76                 Internal_errors_Source  /* the_source  */,
     77                 boolean                 /* is_internal */,
     78                 unsigned32              /* the_error   */
     79             );
     80
     81 
     82typedef struct {
     83  User_extensions_thread_create_extension       thread_create;
     84  User_extensions_thread_start_extension        thread_start;
     85  User_extensions_thread_restart_extension      thread_restart;
     86  User_extensions_thread_delete_extension       thread_delete;
     87  User_extensions_thread_switch_extension       thread_switch;
     88  User_extensions_thread_post_switch_extension  thread_post_switch;
     89  User_extensions_thread_begin_extension        thread_begin;
     90  User_extensions_thread_exitted_extension      thread_exitted;
     91  User_extensions_fatal_extension               fatal;
     92}   User_extensions_Table;
    2793
    2894/*
     
    3197
    3298typedef struct {
    33   Chain_Node                     Node;
    34   rtems_extensions_table  Callouts;
     99  Chain_Node              Node;
     100  User_extensions_Table   Callouts;
    35101}   User_extensions_Control;
    36102
     
    58124
    59125STATIC INLINE void _User_extensions_Handler_initialization (
    60     rtems_extensions_table *initial_extensions
     126    User_extensions_Table *initial_extensions
    61127);
    62128
     
    71137STATIC INLINE void _User_extensions_Add_set (
    72138  User_extensions_Control  *the_extension,
    73   rtems_extensions_table   *extension_table
     139  User_extensions_Table    *extension_table
     140);
     141
     142/*
     143 *  _User_extensions_Add_API_set
     144 *
     145 *  DESCRIPTION:
     146 *
     147 *  This routine is used to add an API extension set to the active list.
     148 */
     149 
     150STATIC INLINE void _User_extensions_Add_API_set (
     151  User_extensions_Control  *the_extension
    74152);
    75153
     
    87165
    88166/*
    89  *  _User_extensions_Task_create
    90  *
    91  *  DESCRIPTION:
    92  *
    93  *  This routine is used to invoke the user extension for
    94  *  the rtems_task_create directive.
    95  */
    96 
    97 STATIC INLINE void _User_extensions_Task_create (
    98   Thread_Control *the_thread
    99 );
    100 
    101 /*
    102  *  _User_extensions_Task_delete
    103  *
    104  *  DESCRIPTION:
    105  *
    106  *  This routine is used to invoke the user extension for
    107  *  the rtems_task_delete directive.
    108  */
    109 
    110 STATIC INLINE void _User_extensions_Task_delete (
    111   Thread_Control *the_thread
    112 );
    113 
    114 /*
    115  *  _User_extensions_Task_start
    116  *
    117  *  DESCRIPTION:
    118  *
    119  *  This routine is used to invoke the user extension for
    120  *  the rtems_task_start directive.
    121  */
    122 
    123 STATIC INLINE void _User_extensions_Task_start (
    124   Thread_Control *the_thread
    125 );
    126 
    127 /*
    128  *  _User_extensions_Task_restart
    129  *
    130  *  DESCRIPTION:
    131  *
    132  *  This routine is used to invoke the user extension for
    133  *  the rtems_task_restart directive.
    134  */
    135 
    136 STATIC INLINE void _User_extensions_Task_restart (
    137   Thread_Control *the_thread
    138 );
    139 
    140 /*
    141  *  _User_extensions_Task_switch
     167 *  _User_extensions_Thread_create
     168 *
     169 *  DESCRIPTION:
     170 *
     171 *  This routine is used to invoke the user extension for
     172 *  the thread creation operate.
     173 */
     174
     175boolean _User_extensions_Thread_create (
     176  Thread_Control *the_thread
     177);
     178
     179/*
     180 *  _User_extensions_Thread_delete
     181 *
     182 *  DESCRIPTION:
     183 *
     184 *  This routine is used to invoke the user extension for
     185 *  the thread deletion operation.
     186 */
     187
     188void _User_extensions_Thread_delete (
     189  Thread_Control *the_thread
     190);
     191
     192/*
     193 *  _User_extensions_Thread_start
     194 *
     195 *  DESCRIPTION:
     196 *
     197 *  This routine is used to invoke the user extension for
     198 *  the thread start operation.
     199 */
     200
     201void _User_extensions_Thread_start (
     202  Thread_Control *the_thread
     203);
     204
     205/*
     206 *  _User_extensions_Thread_restart
     207 *
     208 *  DESCRIPTION:
     209 *
     210 *  This routine is used to invoke the user extension for
     211 *  the thread restart operation.
     212 */
     213
     214void _User_extensions_Thread_restart (
     215  Thread_Control *the_thread
     216);
     217
     218/*
     219 *  _User_extensions_Thread_switch
    142220 *
    143221 *  DESCRIPTION:
     
    147225 */
    148226
    149 STATIC INLINE void _User_extensions_Task_switch (
     227STATIC INLINE void _User_extensions_Thread_switch (
    150228  Thread_Control *executing,
    151229  Thread_Control *heir
     
    153231
    154232/*
    155  *  _User_extensions_Task_begin
     233 *  _User_extensions_Thread_post_switch
     234 *
     235 *  DESCRIPTION:
     236 *
     237 *  This routine is used to invoke the user extension which is invoked
     238 *  after a context switch occurs (i.e. we are running in the context
     239 *  of the new thread).
     240 */
     241 
     242STATIC INLINE void _User_extensions_Thread_post_switch (
     243  Thread_Control *executing
     244);
     245 
     246
     247/*
     248 *  _User_extensions_Thread_begin
    156249 *
    157250 *  DESCRIPTION:
    158251 *
    159252 *  This routine is used to invoke the user extension which
    160  *  is invoked when a task begins.
    161  */
    162 
    163 STATIC INLINE void _User_extensions_Task_begin (
     253 *  is invoked when a thread begins.
     254 */
     255
     256void _User_extensions_Thread_begin (
    164257  Thread_Control *executing
    165258);
    166259
    167260/*
    168  *  _User_extensions_Task_exitted
     261 *  _User_extensions_Thread_exitted
    169262 *
    170263 *  DESCRIPTION:
    171264 *
    172265 *  This routine is used to invoke the user extension which
    173  *  is invoked when a task exits.
    174  */
    175 
    176 STATIC INLINE void _User_extensions_Task_exitted (
     266 *  is invoked when a thread exits.
     267 */
     268
     269void _User_extensions_Thread_exitted (
    177270  Thread_Control *executing
    178271);
    179272
    180273/*
    181  *  _User_extensions_Task_exitted
    182  *
    183  *  DESCRIPTION:
    184  *
    185  *  This routine is used to invoke the user extension which
    186  *  is invoked when a task exits.
    187  */
    188 
    189 STATIC INLINE void _User_extensions_Task_exitted (
    190   Thread_Control *executing
    191 );
    192 
    193 /*
    194274 *  _User_extensions_Fatal
    195275 *
    196276 *  DESCRIPTION:
    197277 *
    198  *  This routine is used to invoke the user extension for
    199  *  the rtems_fatal_error_occurred directive.
    200  */
    201 
    202 STATIC INLINE void _User_extensions_Fatal (
    203   unsigned32 the_error
    204 );
    205 
    206 #include <rtems/userext.inl>
     278 *  This routine is used to invoke the user extension invoked
     279 *  when a fatal error occurs.
     280 */
     281
     282void _User_extensions_Fatal (
     283  Internal_errors_Source  the_source,
     284  boolean                 is_internal,
     285  unsigned32              the_error
     286);
     287
     288#include <rtems/core/userext.inl>
    207289
    208290#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/watchdog.h

    r5072b07 r3a4ae6c  
    1616 */
    1717
    18 #ifndef __RTEMS_WATCHDOG_h
    19 #define __RTEMS_WATCHDOG_h
     18#ifndef __WATCHDOG_h
     19#define __WATCHDOG_h
    2020
    2121#ifdef __cplusplus
     
    2323#endif
    2424
    25 #include <rtems/object.h>
     25#include <rtems/core/object.h>
    2626
    2727/*
     
    3030 */
    3131
    32 typedef unsigned32 rtems_interval;
    33 
    34 /*
    35  *  The following types define a pointer to a watchdog/timer service routine.
    36  */
    37 
    38 typedef void rtems_timer_service_routine;
    39 
    40 typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
     32typedef unsigned32 Watchdog_Interval;
     33
     34/*
     35 *  The following types define a pointer to a watchdog service routine.
     36 */
     37
     38typedef void Watchdog_Service_routine;
     39
     40typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )(
    4141                 Objects_Id,
    4242                 void *
     
    4747 */
    4848
    49 #define RTEMS_NO_TIMEOUT  0
     49#define WATCHDOG_NO_TIMEOUT  0
    5050
    5151/*
     
    9393  Chain_Node        Node;
    9494  Watchdog_States   state;
    95   rtems_interval initial;
    96   rtems_interval delta_interval;
    97   rtems_timer_service_routine_entry  routine;
     95  Watchdog_Interval initial;
     96  Watchdog_Interval delta_interval;
     97  Watchdog_Service_routine_entry  routine;
    9898  Objects_Id        id;
    9999  void             *user_data;
     
    141141STATIC INLINE void _Watchdog_Initialize(
    142142   Watchdog_Control *the_watchdog,
    143    rtems_timer_service_routine_entry  routine,
     143   Watchdog_Service_routine_entry  routine,
    144144   Objects_Id        id,
    145145   void             *user_data
     
    239239STATIC INLINE void _Watchdog_Insert_ticks(
    240240  Watchdog_Control      *the_watchdog,
    241   rtems_interval      units,
     241  Watchdog_Interval      units,
    242242  Watchdog_Insert_modes  insert_mode
    243243);
     
    257257STATIC INLINE void _Watchdog_Insert_seconds(
    258258  Watchdog_Control      *the_watchdog,
    259   rtems_interval      units,
     259  Watchdog_Interval      units,
    260260  Watchdog_Insert_modes  insert_mode
    261261);
     
    274274STATIC INLINE void _Watchdog_Adjust_seconds(
    275275  Watchdog_Adjust_directions direction,
    276   rtems_interval          units
     276  Watchdog_Interval          units
    277277);
    278278
     
    289289STATIC INLINE void _Watchdog_Adjust_ticks(
    290290  Watchdog_Adjust_directions direction,
    291   rtems_interval          units
     291  Watchdog_Interval          units
    292292);
    293293
     
    375375  Chain_Control              *header,
    376376  Watchdog_Adjust_directions  direction,
    377   rtems_interval              units
     377  Watchdog_Interval           units
    378378);
    379379
     
    409409);
    410410
    411 #include <rtems/watchdog.inl>
     411#include <rtems/core/watchdog.inl>
    412412
    413413#ifdef __cplusplus
  • c/src/exec/score/include/rtems/score/wkspace.h

    r5072b07 r3a4ae6c  
    11/*  wkspace.h
    22 *
    3  *  This include file contains information related to the RTEMS
     3 *  This include file contains information related to the
    44 *  RAM Workspace.  This Handler provides mechanisms which can be used to
    5  *  define, initialize and manipulate the RTEMS workspace.
     5 *  define, initialize and manipulate the workspace.
    66 *
    77 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1616 */
    1717
    18 #ifndef __RTEMS_WORKSPACE_h
    19 #define __RTEMS_WORKSPACE_h
     18#ifndef __WORKSPACE_h
     19#define __WORKSPACE_h
    2020
    2121#ifdef __cplusplus
     
    2323#endif
    2424
    25 #include <rtems/heap.h>
    26 #include <rtems/fatal.h>
    27 #include <rtems/status.h>
     25#include <rtems/core/heap.h>
     26#include <rtems/core/interr.h>
    2827
    2928/*
    30  *  The following is used to manage the RTEMS Workspace.
     29 *  The following is used to manage the Workspace.
    3130 *
    3231 */
     
    6867 *  This routine returns the address of a block of memory of size
    6968 *  bytes.  If a block of the appropriate size cannot be allocated
    70  *  from the workspace, then the rtems_fatal_error_occurred directive
    71  *  is invoked.
     69 *  from the workspace, then the internal error handler is invoked.
    7270 */
    7371
     
    9088);
    9189
    92 #include <rtems/wkspace.inl>
     90#include <rtems/core/wkspace.inl>
    9391
    9492#ifdef __cplusplus
  • c/src/exec/score/include/rtems/system.h

    r5072b07 r3a4ae6c  
    7777typedef void * proc_ptr;
    7878
    79 #include <rtems/cpu.h>             /* processor specific information */
    80 #include <rtems/status.h>          /* RTEMS status codes */
    81 #include <rtems/directives.h>
     79#include <rtems/core/cpu.h>        /* processor specific information */
    8280
    8381/*
     
    117115
    118116/*
    119  *  The jump table of entry points into RTEMS directives.
    120  */
    121 
    122 extern const void * _Entry_points[ RTEMS_NUMBER_OF_ENTRY_POINTS ];
    123 
    124 /*
    125117 *  The following defines the CPU dependent information table.
    126118 */
  • c/src/exec/score/inline/address.inl

    r5072b07 r3a4ae6c  
    2929)
    3030{
    31   return (base + offset);
     31  return (void *)((char *)base + offset);
    3232}
    3333
     
    4343)
    4444{
    45   return (base - offset);
    46 }
    47 
    48 /*PAGE
    49  *
    50  *  _Addresses_Add
    51  *
    52  *  NOTE:  The cast of an address to an unsigned32 makes this code
    53  *         dependent on an addresses being thirty two bits.
    54  */
    55 
    56 STATIC INLINE void *_Addresses_Add (
    57   void *left,
    58   void *right
    59 )
    60 {
    61   return (left + (unsigned32)right);
     45  return (void *)((char *)base - offset);
    6246}
    6347
  • c/src/exec/score/inline/heap.inl

    r5072b07 r3a4ae6c  
    1818#define __HEAP_inl
    1919
    20 #include <rtems/address.h>
     20#include <rtems/core/address.h>
    2121
    2222/*PAGE
  • c/src/exec/score/inline/isr.inl

    r5072b07 r3a4ae6c  
    1717#ifndef __ISR_inl
    1818#define __ISR_inl
    19 
    20 /*PAGE
    21  *
    22  *  _ISR_Handler_initialization
    23  *
    24  */
    25 
    26 STATIC INLINE void _ISR_Handler_initialization ( void )
    27 {
    28   _ISR_Signals_to_thread_executing = FALSE;
    29   _ISR_Nest_level = 0;
    30 }
    3119
    3220/*PAGE
  • c/src/exec/score/inline/mppkt.inl

    r5072b07 r3a4ae6c  
    2727
    2828STATIC INLINE boolean _Mp_packet_Is_valid_packet_class (
    29   rtems_mp_packet_classes the_packet_class
     29  MP_packet_Classes the_packet_class
    3030)
    3131{
     
    4040
    4141STATIC INLINE boolean _Mp_packet_Is_null (
    42   rtems_packet_prefix   *the_packet
     42  MP_packet_Prefix   *the_packet
    4343)
    4444{
  • c/src/exec/score/inline/object.inl

    r5072b07 r3a4ae6c  
    3737/*PAGE
    3838 *
    39  *  rtems_get_class
     39 *  _Objects_Get_class
    4040 */
    4141 
    42 STATIC INLINE Objects_Classes rtems_get_class(
     42STATIC INLINE Objects_Classes _Objects_Get_class(
    4343  Objects_Id id
    4444)
     
    5151/*PAGE
    5252 *
    53  *  rtems_get_node
     53 *  _Objects_Get_node
    5454 *
    5555 */
    5656
    57 STATIC INLINE unsigned32 rtems_get_node(
     57STATIC INLINE unsigned32 _Objects_Get_node(
    5858  Objects_Id id
    5959)
     
    6464/*PAGE
    6565 *
    66  *  rtems_get_index
     66 *  _Objects_Get_index
    6767 *
    6868 */
    6969
    70 STATIC INLINE unsigned32 rtems_get_index(
     70STATIC INLINE unsigned32 _Objects_Get_index(
    7171  Objects_Id id
    7272)
     
    111111)
    112112{
    113   return _Objects_Is_local_node( rtems_get_node(id) );
     113  return _Objects_Is_local_node( _Objects_Get_node(id) );
    114114}
    115115
     
    169169  unsigned32  index;
    170170
    171   index = rtems_get_index( the_object->id );
     171  index = _Objects_Get_index( the_object->id );
    172172  information->local_table[ index ] = the_object;
    173173
     
    191191  unsigned32 index;
    192192
    193   index = rtems_get_index( the_object->id );
     193  index = _Objects_Get_index( the_object->id );
    194194  information->local_table[ index ] = NULL;
    195195  _Objects_Clear_name( the_object->name, information->name_length );
  • c/src/exec/score/inline/priority.inl

    r5072b07 r3a4ae6c  
    1818#define __PRIORITY_inl
    1919
    20 #include <rtems/bitfield.h>
     20#include <rtems/core/bitfield.h>
    2121
    2222/*PAGE
     
    4545)
    4646{
    47   return (  ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
    48             ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
     47  /*
     48   *  Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned,
     49   *  then checking for less than 0 is unnecessary.
     50   */
     51
     52  return ( the_priority <= PRIORITY_MAXIMUM );
    4953}
    5054
  • c/src/exec/score/inline/rtems/score/address.inl

    r5072b07 r3a4ae6c  
    2929)
    3030{
    31   return (base + offset);
     31  return (void *)((char *)base + offset);
    3232}
    3333
     
    4343)
    4444{
    45   return (base - offset);
    46 }
    47 
    48 /*PAGE
    49  *
    50  *  _Addresses_Add
    51  *
    52  *  NOTE:  The cast of an address to an unsigned32 makes this code
    53  *         dependent on an addresses being thirty two bits.
    54  */
    55 
    56 STATIC INLINE void *_Addresses_Add (
    57   void *left,
    58   void *right
    59 )
    60 {
    61   return (left + (unsigned32)right);
     45  return (void *)((char *)base - offset);
    6246}
    6347
  • c/src/exec/score/inline/rtems/score/heap.inl

    r5072b07 r3a4ae6c  
    1818#define __HEAP_inl
    1919
    20 #include <rtems/address.h>
     20#include <rtems/core/address.h>
    2121
    2222/*PAGE
  • c/src/exec/score/inline/rtems/score/isr.inl

    r5072b07 r3a4ae6c  
    1717#ifndef __ISR_inl
    1818#define __ISR_inl
    19 
    20 /*PAGE
    21  *
    22  *  _ISR_Handler_initialization
    23  *
    24  */
    25 
    26 STATIC INLINE void _ISR_Handler_initialization ( void )
    27 {
    28   _ISR_Signals_to_thread_executing = FALSE;
    29   _ISR_Nest_level = 0;
    30 }
    3119
    3220/*PAGE
  • c/src/exec/score/inline/rtems/score/mppkt.inl

    r5072b07 r3a4ae6c  
    2727
    2828STATIC INLINE boolean _Mp_packet_Is_valid_packet_class (
    29   rtems_mp_packet_classes the_packet_class
     29  MP_packet_Classes the_packet_class
    3030)
    3131{
     
    4040
    4141STATIC INLINE boolean _Mp_packet_Is_null (
    42   rtems_packet_prefix   *the_packet
     42  MP_packet_Prefix   *the_packet
    4343)
    4444{
  • c/src/exec/score/inline/rtems/score/object.inl

    r5072b07 r3a4ae6c  
    3737/*PAGE
    3838 *
    39  *  rtems_get_class
     39 *  _Objects_Get_class
    4040 */
    4141 
    42 STATIC INLINE Objects_Classes rtems_get_class(
     42STATIC INLINE Objects_Classes _Objects_Get_class(
    4343  Objects_Id id
    4444)
     
    5151/*PAGE
    5252 *
    53  *  rtems_get_node
     53 *  _Objects_Get_node
    5454 *
    5555 */
    5656
    57 STATIC INLINE unsigned32 rtems_get_node(
     57STATIC INLINE unsigned32 _Objects_Get_node(
    5858  Objects_Id id
    5959)
     
    6464/*PAGE
    6565 *
    66  *  rtems_get_index
     66 *  _Objects_Get_index
    6767 *
    6868 */
    6969
    70 STATIC INLINE unsigned32 rtems_get_index(
     70STATIC INLINE unsigned32 _Objects_Get_index(
    7171  Objects_Id id
    7272)
     
    111111)
    112112{
    113   return _Objects_Is_local_node( rtems_get_node(id) );
     113  return _Objects_Is_local_node( _Objects_Get_node(id) );
    114114}
    115115
     
    169169  unsigned32  index;
    170170
    171   index = rtems_get_index( the_object->id );
     171  index = _Objects_Get_index( the_object->id );
    172172  information->local_table[ index ] = the_object;
    173173
     
    191191  unsigned32 index;
    192192
    193   index = rtems_get_index( the_object->id );
     193  index = _Objects_Get_index( the_object->id );
    194194  information->local_table[ index ] = NULL;
    195195  _Objects_Clear_name( the_object->name, information->name_length );
  • c/src/exec/score/inline/rtems/score/priority.inl

    r5072b07 r3a4ae6c  
    1818#define __PRIORITY_inl
    1919
    20 #include <rtems/bitfield.h>
     20#include <rtems/core/bitfield.h>
    2121
    2222/*PAGE
     
    4545)
    4646{
    47   return (  ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
    48             ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
     47  /*
     48   *  Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned,
     49   *  then checking for less than 0 is unnecessary.
     50   */
     51
     52  return ( the_priority <= PRIORITY_MAXIMUM );
    4953}
    5054
  • c/src/exec/score/inline/rtems/score/stack.inl

    r5072b07 r3a4ae6c  
    4444)
    4545{
    46   return ( size >= RTEMS_MINIMUM_STACK_SIZE );
     46  return ( size >= STACK_MINIMUM_SIZE );
    4747}
    4848
  • c/src/exec/score/inline/rtems/score/states.inl

    r5072b07 r3a4ae6c  
    22 *
    33 *  This file contains the macro implementation of the inlined
    4  *  routines associated with RTEMS state information.
     4 *  routines associated with thread state information.
    55 *
    66 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    178178/*PAGE
    179179 *
     180 *  _States_Is_waiting_for_mutex
     181 *
     182 */
     183 
     184STATIC INLINE boolean _States_Is_waiting_for_mutex (
     185  States_Control the_states
     186)
     187{
     188   return (the_states & STATES_WAITING_FOR_MUTEX);
     189}
     190
     191/*PAGE
     192 *
    180193 *  _States_Is_waiting_for_semaphore
    181194 *
  • c/src/exec/score/inline/rtems/score/sysstate.inl

    r5072b07 r3a4ae6c  
    1818#define __SYSTEM_STATE_inl
    1919
     20/*PAGE
     21 *
     22 *  _System_state_Handler_initialization
     23 */
     24 
     25STATIC INLINE void _System_state_Handler_initialization (
     26  boolean  is_multiprocessing
     27)
     28{
     29  _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
     30  _System_state_Is_multiprocessing = is_multiprocessing;
     31}
     32 
    2033/*PAGE
    2134 *
  • c/src/exec/score/inline/rtems/score/thread.inl

    r5072b07 r3a4ae6c  
    249249  }
    250250 
    251   the_class = rtems_get_class( id );
     251  the_class = _Objects_Get_class( id );
    252252 
    253253  if ( the_class > OBJECTS_CLASSES_LAST ) {
     
    266266}
    267267
     268/*
     269 *  _Thread_Is_proxy_blocking
     270 *
     271 */
     272
     273STATIC INLINE boolean _Thread_Is_proxy_blocking (
     274  unsigned32 code
     275)
     276{
     277  return (code == THREAD_STATUS_PROXY_BLOCKING);
     278}
     279
    268280#endif
    269281/* end of include file */
  • c/src/exec/score/inline/rtems/score/tod.inl

    r5072b07 r3a4ae6c  
    5959
    6060STATIC INLINE void _TOD_Activate(
    61   rtems_interval ticks
     61  Watchdog_Interval ticks
    6262)
    6363{
  • c/src/exec/score/inline/rtems/score/userext.inl

    r5072b07 r3a4ae6c  
    2525
    2626STATIC INLINE void _User_extensions_Handler_initialization (
    27     rtems_extensions_table *initial_extensions
     27    User_extensions_Table *initial_extensions
    2828)
    2929{
     
    4343STATIC INLINE void _User_extensions_Add_set (
    4444  User_extensions_Control *the_extension,
    45   rtems_extensions_table  *extension_table
     45  User_extensions_Table   *extension_table
    4646)
    4747{
     
    5151}
    5252
     53/*PAGE
     54 *
     55 *  _User_extensions_Add_API_set
     56 */
     57 
     58STATIC INLINE void _User_extensions_Add_API_set (
     59  User_extensions_Control *the_extension
     60)
     61{
     62  _Chain_Prepend( &_User_extensions_List, &the_extension->Node );
     63}
     64 
    5365/*PAGE
    5466 *
     
    6577/*PAGE
    6678 *
    67  *  _User_extensions_Task_create
     79 *  _User_extensions_Thread_switch
    6880 *
    6981 */
    7082
    71 STATIC INLINE void _User_extensions_Task_create (
    72   Thread_Control *the_thread
    73 )
    74 {
    75   Chain_Node              *the_node;
    76   User_extensions_Control *the_extension;
    77 
    78   for ( the_node = _User_extensions_List.first ;
    79         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    80         the_node = the_node->next ) {
    81 
    82     the_extension = (User_extensions_Control *) the_node;
    83 
    84     if ( the_extension->Callouts.rtems_task_create != NULL )
    85       (*the_extension->Callouts.rtems_task_create)(
    86         _Thread_Executing,
    87         the_thread
    88       );
    89   }
    90 }
    91 
    92 /*PAGE
    93  *
    94  *  _User_extensions_Task_delete
    95  */
    96 
    97 STATIC INLINE void _User_extensions_Task_delete (
    98   Thread_Control *the_thread
    99 )
    100 {
    101   Chain_Node              *the_node;
    102   User_extensions_Control *the_extension;
    103 
    104   for ( the_node = _User_extensions_List.last ;
    105         !_Chain_Is_head( &_User_extensions_List, the_node ) ;
    106         the_node = the_node->previous ) {
    107 
    108     the_extension = (User_extensions_Control *) the_node;
    109 
    110     if ( the_extension->Callouts.rtems_task_delete != NULL )
    111       (*the_extension->Callouts.rtems_task_delete)(
    112         _Thread_Executing,
    113         the_thread
    114       );
    115   }
    116 }
    117 
    118 /*PAGE
    119  *
    120  *  _User_extensions_Task_start
    121  *
    122  */
    123 
    124 STATIC INLINE void _User_extensions_Task_start (
    125   Thread_Control *the_thread
    126 )
    127 {
    128   Chain_Node              *the_node;
    129   User_extensions_Control *the_extension;
    130 
    131   for ( the_node = _User_extensions_List.first ;
    132         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    133         the_node = the_node->next ) {
    134 
    135     the_extension = (User_extensions_Control *) the_node;
    136 
    137     if ( the_extension->Callouts.rtems_task_start != NULL )
    138       (*the_extension->Callouts.rtems_task_start)(
    139         _Thread_Executing,
    140         the_thread
    141       );
    142   }
    143 }
    144 
    145 /*PAGE
    146  *
    147  *  _User_extensions_Task_restart
    148  *
    149  */
    150 
    151 STATIC INLINE void _User_extensions_Task_restart (
    152   Thread_Control *the_thread
    153 )
    154 {
    155   Chain_Node              *the_node;
    156   User_extensions_Control *the_extension;
    157 
    158   for ( the_node = _User_extensions_List.first ;
    159         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    160         the_node = the_node->next ) {
    161 
    162     the_extension = (User_extensions_Control *) the_node;
    163 
    164     if ( the_extension->Callouts.rtems_task_restart != NULL )
    165       (*the_extension->Callouts.rtems_task_restart)(
    166         _Thread_Executing,
    167         the_thread
    168       );
    169   }
    170 }
    171 
    172 /*PAGE
    173  *
    174  *  _User_extensions_Task_switch
    175  *
    176  */