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


Ignore:
Timestamp:
09/11/95 19:35:39 (28 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/rtems
Files:
2 added
116 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/rtems/headers/asr.h

    r5072b07 r3a4ae6c  
    2323#endif
    2424
    25 #include <rtems/modes.h>
     25#include <rtems/rtems/modes.h>
    2626
    2727/*
     
    5555
    5656typedef struct {
     57  boolean           is_enabled;       /* are ASRs enabled currently? */
    5758  rtems_asr_entry   handler;          /* address of RTEMS_ASR */
    5859  Modes_Control     mode_set;         /* RTEMS_ASR mode */
     
    168169);
    169170
    170 #include <rtems/asr.inl>
     171#include <rtems/rtems/asr.inl>
    171172
    172173#ifdef __cplusplus
  • c/src/exec/rtems/headers/attr.h

    r5072b07 r3a4ae6c  
    4444#define RTEMS_NO_INHERIT_PRIORITY 0x00000000
    4545#define RTEMS_INHERIT_PRIORITY    0x00000020
     46
     47#define RTEMS_NO_PRIORITY_CEILING 0x00000000
     48#define RTEMS_PRIORITY_CEILING    0x00000040
    4649
    4750#if ( CPU_HARDWARE_FP == TRUE )
     
    178181);
    179182
    180 #include <rtems/attr.inl>
     183/*
     184 *  _Attributes_Is_priority_ceiling
     185 *
     186 *  DESCRIPTION:
     187 *
     188 *  This function returns TRUE if the priority ceiling attribute
     189 *  is enabled in the attribute_set and FALSE otherwise.
     190 */
     191 
     192STATIC INLINE boolean _Attributes_Is_priority_ceiling(
     193  rtems_attribute attribute_set
     194);
     195 
     196
     197#include <rtems/rtems/attr.inl>
    181198
    182199#ifdef __cplusplus
  • c/src/exec/rtems/headers/clock.h

    r5072b07 r3a4ae6c  
    3030#endif
    3131
    32 #include <rtems/tod.h>
     32#include <rtems/core/tod.h>
     33#include <rtems/rtems/types.h>
    3334
    3435/*
  • c/src/exec/rtems/headers/dpmem.h

    r5072b07 r3a4ae6c  
    3333#endif
    3434
    35 #include <rtems.h>
    36 #include <rtems/object.h>
     35#include <rtems/core/object.h>
    3736
    3837/*
     
    202201);
    203202
    204 #include <rtems/dpmem.inl>
     203#include <rtems/rtems/dpmem.inl>
    205204
    206205#ifdef __cplusplus
  • c/src/exec/rtems/headers/event.h

    r5072b07 r3a4ae6c  
    2929#endif
    3030
    31 #include <rtems/object.h>
    32 #include <rtems/options.h>
    33 #include <rtems/thread.h>
    34 #include <rtems/watchdog.h>
    35 #include <rtems/eventset.h>
     31#include <rtems/core/object.h>
     32#include <rtems/rtems/types.h>
     33#include <rtems/rtems/options.h>
     34#include <rtems/core/thread.h>
     35#include <rtems/core/watchdog.h>
     36#include <rtems/rtems/eventset.h>
    3637
    3738/*
     
    105106
    106107void _Event_Seize (
    107   rtems_event_set event_in,
    108   rtems_option    option_set,
    109   rtems_interval  ticks
     108  rtems_event_set  event_in,
     109  rtems_option     option_set,
     110  rtems_interval   ticks,
     111  rtems_event_set *event_out
    110112);
    111113
     
    148150EXTERN boolean _Event_Sync;    /* event manager sync flag */
    149151
    150 #include <rtems/event.inl>
    151 #include <rtems/eventmp.h>
     152#include <rtems/rtems/eventmp.h>
     153#include <rtems/rtems/event.inl>
    152154
    153155#ifdef __cplusplus
  • c/src/exec/rtems/headers/eventmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/event.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/object.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/watchdog.h>
     24#include <rtems/rtems/event.h>
     25#include <rtems/core/mppkt.h>
     26#include <rtems/core/object.h>
     27#include <rtems/core/thread.h>
     28#include <rtems/core/watchdog.h>
    2929
    3030/*
  • c/src/exec/rtems/headers/eventset.h

    r5072b07 r3a4ae6c  
    133133);
    134134
    135 #include <rtems/eventset.inl>
     135#include <rtems/rtems/eventset.inl>
    136136
    137137#ifdef __cplusplus
  • c/src/exec/rtems/headers/intr.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/isr.h>
     24#include <rtems/core/isr.h>
    2525
    2626/*
     
    2929
    3030typedef ISR_Level rtems_interrupt_level;
     31
     32/*
     33 *  The following type defines the control block used to manage
     34 *  the vectors.
     35 */
     36 
     37typedef ISR_Vector_number rtems_vector_number;
     38
     39/*
     40 *  Return type for ISR Handler
     41 */
     42 
     43typedef void rtems_isr;
     44
     45/*
     46 *  Pointer to an ISR Handler
     47 */
     48 
     49typedef rtems_isr ( *rtems_isr_entry )(
     50                 rtems_vector_number
     51             );
    3152
    3253/*
  • c/src/exec/rtems/headers/message.h

    r5072b07 r3a4ae6c  
    3535#endif
    3636
    37 #include <rtems/types.h>
    38 #include <rtems/chain.h>
    39 #include <rtems/object.h>
    40 #include <rtems/threadq.h>
     37#include <rtems/rtems/types.h>
     38#include <rtems/core/chain.h>
     39#include <rtems/core/object.h>
     40#include <rtems/rtems/attr.h>
     41#include <rtems/core/threadq.h>
    4142
    4243/*
     
    469470);
    470471
    471 #include <rtems/message.inl>
    472 #include <rtems/msgmp.h>
     472#include <rtems/rtems/message.inl>
     473#include <rtems/rtems/msgmp.h>
    473474
    474475#ifdef __cplusplus
  • c/src/exec/rtems/headers/modes.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/isr.h>
     24#include <rtems/core/isr.h>
    2525
    2626/*
     
    174174);
    175175
    176 #include <rtems/modes.inl>
     176#include <rtems/rtems/modes.inl>
    177177
    178178#ifdef __cplusplus
  • c/src/exec/rtems/headers/mp.h

    r5072b07 r3a4ae6c  
    4646void rtems_multiprocessing_announce ( void );
    4747
    48 /*
    49  *
    50  *  _Multiprocessing_Receive_server
    51  *
    52  *  DESCRIPTION:
    53  *
    54  *  This routine is a server thread which processes remote requests
    55  *  from other nodes.
    56  */
    57 
    58 Thread _Multiprocessing_Receive_server (
    59   Thread_Argument ignored
    60 );
    61 
    6248#ifdef __cplusplus
    6349}
  • c/src/exec/rtems/headers/msgmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/message.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/object.h>
    27 #include <rtems/options.h>
    28 #include <rtems/thread.h>
    29 #include <rtems/watchdog.h>
     24#include <rtems/rtems/message.h>
     25#include <rtems/core/mppkt.h>
     26#include <rtems/core/object.h>
     27#include <rtems/rtems/options.h>
     28#include <rtems/core/thread.h>
     29#include <rtems/core/watchdog.h>
    3030
    3131/*
     
    9898  unsigned32                         *size_p,
    9999  rtems_option                        option_set,
    100   rtems_interval                      timeout
     100  Watchdog_Interval                   timeout
    101101);
    102102
  • c/src/exec/rtems/headers/options.h

    r5072b07 r3a4ae6c  
    7070);
    7171
    72 #include <rtems/options.inl>
     72#include <rtems/rtems/options.inl>
    7373
    7474#ifdef __cplusplus
  • c/src/exec/rtems/headers/part.h

    r5072b07 r3a4ae6c  
    3232#endif
    3333
    34 #include <rtems.h>
    35 #include <rtems/address.h>
    36 #include <rtems/attr.h>
    37 #include <rtems/object.h>
     34#include <rtems/core/address.h>
     35#include <rtems/core/object.h>
     36#include <rtems/rtems/attr.h>
     37#include <rtems/rtems/types.h>
    3838
    3939/*
     
    281281);
    282282
    283 #include <rtems/part.inl>
    284 #include <rtems/partmp.h>
     283#include <rtems/rtems/part.inl>
     284#include <rtems/rtems/partmp.h>
    285285
    286286#ifdef __cplusplus
  • c/src/exec/rtems/headers/partmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/part.h>
    28 #include <rtems/thread.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/rtems/options.h>
     27#include <rtems/core/thread.h>
     28
     29#include <rtems/rtems/part.h>
    2930
    3031/*
  • c/src/exec/rtems/headers/ratemon.h

    r5072b07 r3a4ae6c  
    3030#endif
    3131
    32 #include <rtems.h>
    33 #include <rtems/object.h>
    34 #include <rtems/thread.h>
    35 #include <rtems/watchdog.h>
     32#include <rtems/core/object.h>
     33#include <rtems/core/thread.h>
     34#include <rtems/core/watchdog.h>
    3635
    3736/*
     
    5150 */
    5251
    53 #define RTEMS_PERIOD_STATUS       RTEMS_NO_TIMEOUT
     52#define RTEMS_PERIOD_STATUS       WATCHDOG_NO_TIMEOUT
    5453
    5554/*
     
    149148
    150149rtems_status_code rtems_rate_monotonic_period(
    151   Objects_Id        id,
    152   rtems_interval length
     150  Objects_Id      id,
     151  rtems_interval  length
    153152);
    154153
     
    277276);
    278277
    279 #include <rtems/ratemon.inl>
     278#include <rtems/rtems/ratemon.inl>
    280279
    281280#ifdef __cplusplus
  • c/src/exec/rtems/headers/region.h

    r5072b07 r3a4ae6c  
    3131#endif
    3232
    33 #include <rtems.h>
    34 #include <rtems/object.h>
    35 #include <rtems/threadq.h>
    36 #include <rtems/heap.h>
     33#include <rtems/core/object.h>
     34#include <rtems/core/threadq.h>
     35#include <rtems/core/heap.h>
    3736#include <rtems/debug.h>
     37#include <rtems/rtems/attr.h>
     38#include <rtems/rtems/types.h>
    3839
    3940/*
     
    159160  Objects_Id         id,
    160161  unsigned32         size,
    161   rtems_option    option_set,
    162   rtems_interval  timeout,
     162  rtems_option       option_set,
     163  rtems_interval     timeout,
    163164  void              **segment
    164165);
     
    279280);
    280281
    281 #include <rtems/region.inl>
    282 #include <rtems/regionmp.h>
     282#include <rtems/rtems/region.inl>
     283#include <rtems/rtems/regionmp.h>
    283284
    284285/*
  • c/src/exec/rtems/headers/regionmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/region.h>
    28 #include <rtems/thread.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/core/thread.h>
     27
     28#include <rtems/rtems/options.h>
     29#include <rtems/rtems/region.h>
    2930
    3031/*
     
    8889  void                        *segment,
    8990  unsigned32                   size,
    90   rtems_option              option_set,
    91   rtems_interval            timeout
     91  rtems_option                 option_set,
     92  rtems_interval               timeout
    9293);
    9394
  • c/src/exec/rtems/headers/rtems.h

    r5072b07 r3a4ae6c  
    2525
    2626#include <rtems/system.h>
    27 #include <rtems/types.h>
     27#include <rtems/rtems/status.h>
     28#include <rtems/rtems/types.h>
    2829
     30#include <rtems/config.h>
    2931#include <rtems/init.h>
    30 #include <rtems/tasks.h>
    31 #include <rtems/intr.h>
    32 #include <rtems/clock.h>
     32#include <rtems/rtems/tasks.h>
     33#include <rtems/rtems/intr.h>
     34#include <rtems/rtems/clock.h>
    3335#include <rtems/extension.h>
    34 #include <rtems/timer.h>
    35 #include <rtems/sem.h>
    36 #include <rtems/message.h>
    37 #include <rtems/event.h>
    38 #include <rtems/signal.h>
    39 #include <rtems/event.h>
    40 #include <rtems/part.h>
    41 #include <rtems/region.h>
    42 #include <rtems/dpmem.h>
     36#include <rtems/rtems/timer.h>
     37#include <rtems/rtems/sem.h>
     38#include <rtems/rtems/message.h>
     39#include <rtems/rtems/event.h>
     40#include <rtems/rtems/signal.h>
     41#include <rtems/rtems/event.h>
     42#include <rtems/rtems/part.h>
     43#include <rtems/rtems/region.h>
     44#include <rtems/rtems/dpmem.h>
    4345#include <rtems/io.h>
    4446#include <rtems/fatal.h>
    45 #include <rtems/ratemon.h>
    46 #include <rtems/mp.h>
     47#include <rtems/rtems/ratemon.h>
     48#include <rtems/rtems/mp.h>
    4749
    48 #include <rtems/support.h>
     50#include <rtems/rtems/support.h>
     51#include <rtems/sysstate.h>
    4952
    5053#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
     54
     55/*
     56 *  The following define the constants which may be used in name searches.
     57 */
     58 
     59#define RTEMS_SEARCH_ALL_NODES   OBJECTS_SEARCH_ALL_NODES
     60#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
     61#define RTEMS_SEARCH_LOCAL_NODE  OBJECTS_SEARCH_LOCAL_NODE
     62#define RTEMS_WHO_AM_I           OBJECTS_WHO_AM_I
     63 
     64/*
     65 * Parameters and return id's for _Objects_Get_next
     66 */
     67 
     68#define RTEMS_OBJECT_ID_INITIAL_INDEX   OBJECTS_ID_INITIAL_INDEX
     69#define RTEMS_OBJECT_ID_FINAL_INDEX     OBJECTS_ID_FINAL_INDEX
     70 
     71#define RTEMS_OBJECT_ID_INITIAL(node)   OBJECTS_ID_INITIAL(node)
     72#define RTEMS_OBJECT_ID_FINAL           OBJECTS_ID_FINAL
     73 
     74/*
     75 *  The following constant defines the minimum stack size which every
     76 *  thread must exceed.
     77 */
     78
     79#define RTEMS_MINIMUM_STACK_SIZE  STACK_MINIMUM_SIZE
     80
     81/*
     82 *  Constant for indefinite wait.  (actually an illegal interval)
     83 */
     84
     85#define RTEMS_NO_TIMEOUT  WATCHDOG_NO_TIMEOUT
     86
     87/*
     88 *  An MPCI must support packets of at least this size.
     89 */
     90 
     91#define RTEMS_MINIMUM_PACKET_SIZE  MP_PACKET_MINIMUM_PACKET_SIZE
     92 
     93/*
     94 *  The following constant defines the number of unsigned32's
     95 *  in a packet which must be converted to native format in a
     96 *  heterogeneous system.  In packets longer than
     97 *  MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
     98 *  may a user message buffer which is not automatically endian swapped.
     99 */
     100 
     101#define RTEMS_MINIMUN_HETERO_CONVERSION  MP_PACKET_MINIMUN_HETERO_CONVERSION
     102
    51103
    52104#ifdef __cplusplus
  • c/src/exec/rtems/headers/sem.h

    r5072b07 r3a4ae6c  
    3232#endif
    3333
    34 #include <rtems.h>
    35 #include <rtems/attr.h>
    36 #include <rtems/object.h>
    37 #include <rtems/threadq.h>
     34#include <rtems/rtems/types.h>
     35#include <rtems/rtems/support.h>
     36#include <rtems/rtems/tasks.h>
     37#include <rtems/rtems/attr.h>
     38#include <rtems/core/coremutex.h>
     39#include <rtems/core/object.h>
     40#include <rtems/core/coresem.h>
     41#include <rtems/core/threadq.h>
    3842
    3943/*
     
    4246
    4347typedef struct {
    44   Objects_Control       Object;
    45   Thread_queue_Control  Wait_queue;
    46   rtems_attribute    attribute_set;
    47   unsigned32            count;
    48   unsigned32            nest_count;
    49   Thread_Control       *holder;
    50   Objects_Id            holder_id;
     48  Objects_Control          Object;
     49  rtems_attribute          attribute_set;
     50  union {
     51    CORE_mutex_Control     mutex;
     52    CORE_semaphore_Control semaphore;
     53  } Core_control;
    5154}   Semaphore_Control;
    5255
     
    8386
    8487rtems_status_code rtems_semaphore_create(
    85   rtems_name            name,
    86   unsigned32            count,
    87   rtems_attribute       attribute_set,
    88   rtems_task_priority   priority_ceiling,
    89   Objects_Id           *id
     88  rtems_name           name,
     89  unsigned32           count,
     90  rtems_attribute      attribute_set,
     91  rtems_task_priority  priority_ceiling,
     92  rtems_id            *id
    9093);
    9194
     
    107110  rtems_name    name,
    108111  unsigned32    node,
    109   Objects_Id   *id
     112  rtems_id     *id
    110113);
    111114
     
    120123
    121124rtems_status_code rtems_semaphore_delete(
    122   Objects_Id id
     125  rtems_id  id
    123126);
    124127
     
    138141
    139142rtems_status_code rtems_semaphore_obtain(
    140   Objects_Id        id,
    141   unsigned32        option_set,
     143  rtems_id       id,
     144  unsigned32     option_set,
    142145  rtems_interval timeout
    143146);
     
    156159
    157160rtems_status_code rtems_semaphore_release(
    158   Objects_Id id
     161  rtems_id  id
    159162);
    160163
     
    214217
    215218STATIC INLINE Semaphore_Control *_Semaphore_Get (
    216   Objects_Id         id,
     219  rtems_id           id,
    217220  Objects_Locations *location
    218221);
     
    230233);
    231234
    232 #include <rtems/sem.inl>
    233 #include <rtems/semmp.h>
     235/*
     236 *  _Semaphore_Translate_core_mutex_return_code
     237 *
     238 *  DESCRIPTION:
     239 *
     240 *  This function returns a RTEMS status code based on the mutex
     241 *  status code specified.
     242 */
     243 
     244rtems_status_code _Semaphore_Translate_core_mutex_return_code (
     245  unsigned32 the_mutex_status
     246);
     247
     248/*
     249 *  _Semaphore_Translate_core_semaphore_return_code
     250 *
     251 *  DESCRIPTION:
     252 *
     253 *  This function returns a RTEMS status code based on the semaphore
     254 *  status code specified.
     255 */
     256 
     257rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
     258  unsigned32 the_mutex_status
     259);
     260 
     261/*PAGE
     262 *
     263 *  _Semaphore_Core_mutex_mp_support
     264 *
     265 *  DESCRIPTION:
     266 *
     267 *  This function processes the global actions necessary for remote
     268 *  accesses to a global semaphore based on a core mutex.  This function
     269 *  is called by the core.
     270 */
     271
     272void  _Semaphore_Core_mutex_mp_support (
     273  Thread_Control *the_thread,
     274  rtems_id        id
     275);
     276
     277/*PAGE
     278 *
     279 *  _Semaphore_Core_mp_support
     280 *
     281 *  DESCRIPTION:
     282 *
     283 *  This function processes the global actions necessary for remote
     284 *  accesses to a global semaphore based on a core semaphore.  This function
     285 *  is called by the core.
     286 */
     287 
     288void  _Semaphore_Core_semaphore_mp_support (
     289  Thread_Control *the_thread,
     290  rtems_id        id
     291);
     292
     293#include <rtems/rtems/sem.inl>
     294#include <rtems/rtems/semmp.h>
    234295
    235296#ifdef __cplusplus
  • c/src/exec/rtems/headers/semmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/sem.h>
    28 #include <rtems/thread.h>
    29 #include <rtems/watchdog.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/rtems/options.h>
     27#include <rtems/rtems/sem.h>
     28#include <rtems/core/thread.h>
     29#include <rtems/core/watchdog.h>
    3030
    3131/*
     
    8585  Semaphore_MP_Remote_operations operation,
    8686  Objects_Id                     semaphore_id,
    87   rtems_option                option_set,
    88   rtems_interval              timeout
     87  rtems_option                   option_set,
     88  rtems_interval                 timeout
    8989);
    9090
  • c/src/exec/rtems/headers/signal.h

    r5072b07 r3a4ae6c  
    2828#endif
    2929
    30 #include <rtems/asr.h>
    31 #include <rtems/modes.h>
    32 #include <rtems/object.h>
    33 #include <rtems/status.h>
    34 #include <rtems/types.h>
     30#include <rtems/rtems/asr.h>
     31#include <rtems/rtems/modes.h>
     32#include <rtems/core/object.h>
     33#include <rtems/rtems/status.h>
     34#include <rtems/rtems/types.h>
     35
     36/*
     37 *  _Signal_Manager_initialization
     38 *
     39 *  DESCRIPTION:
     40 *
     41 *  This routine performs the initialization necessary for this manager.
     42 */
     43 
     44void _Signal_Manager_initialization( void );
    3545
    3646/*
     
    6474);
    6575
    66 #include <rtems/signalmp.h>
     76#include <rtems/rtems/signalmp.h>
    6777
    6878#ifdef __cplusplus
  • c/src/exec/rtems/headers/signalmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/asr.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/object.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/watchdog.h>
     24#include <rtems/rtems/asr.h>
     25#include <rtems/core/mppkt.h>
     26#include <rtems/core/object.h>
     27#include <rtems/core/thread.h>
     28#include <rtems/core/watchdog.h>
    2929
    3030/*
  • c/src/exec/rtems/headers/status.h

    r5072b07 r3a4ae6c  
    5353  RTEMS_NOT_IMPLEMENTED          = 24, /* directive not implemented */
    5454  RTEMS_INTERNAL_ERROR           = 25, /* RTEMS inconsistency detected */
    55   RTEMS_PROXY_BLOCKING           = 26, /* internal multiprocessing only */
    56   RTEMS_NO_MEMORY                = 27  /* could not get enough memory */
     55  RTEMS_NO_MEMORY                = 26  /* could not get enough memory */
    5756} rtems_status_code;
    5857
    5958#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
    6059#define RTEMS_STATUS_CODES_LAST  RTEMS_NO_MEMORY
     60
     61extern rtems_status_code _Status_Object_name_errors_to_status[];
     62
     63#ifdef INIT
     64rtems_status_code _Status_Object_name_errors_to_status[] = {
     65  RTEMS_SUCCESSFUL,      /* OBJECTS_SUCCESSFUL */
     66  RTEMS_INVALID_NAME,    /* OBJECTS_INVALID_NAME */
     67  RTEMS_INVALID_NODE     /* OBJECTS_INVALID_NODE */
     68};
     69#endif
    6170
    6271/*
     
    8796);
    8897
    89 /*
    90  *  _Status_Is_proxy_blocking
    91  *
    92  *  DESCRIPTION:
    93  *
    94  *  This function returns TRUE if the status code is equal to the
    95  *  status which indicates that a proxy is blocking, and FALSE otherwise.
    96  */
    97 
    98 STATIC INLINE boolean _Status_Is_proxy_blocking (
    99   rtems_status_code code
    100 );
    101 
    102 #include <rtems/status.inl>
     98#include <rtems/rtems/status.inl>
    10399
    104100#ifdef __cplusplus
  • c/src/exec/rtems/headers/support.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/types.h>
     24#include <rtems/rtems/types.h>
    2525
    2626/*
     
    7171);
    7272
    73 #include <rtems/support.inl>
     73/*
     74 *  rtems_get_class
     75 *
     76 *  DESCRIPTION:
     77 *
     78 *  This function returns the class portion of the ID.
     79 *
     80 */
     81 
     82#define rtems_get_class( _id ) \
     83  _Objects_Get_class( _id )
     84 
     85/*
     86 *  rtems_get_node
     87 *
     88 *  DESCRIPTION:
     89 *
     90 *  This function returns the node portion of the ID.
     91 *
     92 */
     93 
     94#define rtems_get_node( _id ) \
     95  _Objects_Get_node( _id )
     96 
     97/*
     98 *  rtems_get_index
     99 *
     100 *  DESCRIPTION:
     101 *
     102 *  This function returns the index portion of the ID.
     103 *
     104 */
     105 
     106#define rtems_get_index( _id ) \
     107  _Objects_Get_index( _id )
     108
     109/*
     110 *  Time related
     111 */
     112
     113#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
     114        TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
     115#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
     116        TOD_MILLISECONDS_TO_TICKS(_ms)
     117
     118#include <rtems/rtems/support.inl>
    74119
    75120#ifdef __cplusplus
  • c/src/exec/rtems/headers/taskmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/priority.h>
    28 #include <rtems/tasks.h>
    29 #include <rtems/thread.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/rtems/options.h>
     27#include <rtems/core/priority.h>
     28#include <rtems/rtems/tasks.h>
     29#include <rtems/core/thread.h>
    3030
    3131/*
  • c/src/exec/rtems/headers/tasks.h

    r5072b07 r3a4ae6c  
    3939#endif
    4040
    41 #include <rtems.h>
    42 #include <rtems/message.h>
    43 #include <rtems/object.h>
    44 #include <rtems/part.h>
    45 #include <rtems/region.h>
    46 #include <rtems/sem.h>
    47 #include <rtems/states.h>
    48 #include <rtems/thread.h>
    49 #include <rtems/threadq.h>
    50 #include <rtems/types.h>
     41#include <rtems/core/object.h>
     42#include <rtems/core/states.h>
     43#include <rtems/core/thread.h>
     44#include <rtems/rtems/types.h>
     45#include <rtems/rtems/eventset.h>
     46#include <rtems/rtems/asr.h>
     47#include <rtems/rtems/attr.h>
    5148
    5249/*
     
    6158 */
    6259
    63 #define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
     60#define RTEMS_YIELD_PROCESSOR WATCHDOG_NO_TIMEOUT
     61
     62/*
     63 *  Define the type for an RTEMS API task priority.
     64 */
     65
     66typedef Priority_Control rtems_task_priority;
     67
     68#define RTEMS_NO_PRIORITY           RTEMS_CURRENT_PRIORITY
     69
     70#define RTEMS_MINIMUM_PRIORITY      (PRIORITY_MINIMUM + 1)
     71#define RTEMS_MAXIMUM_PRIORITY      PRIORITY_MAXIMUM
     72
     73/*
     74 *  The following constant is passed to rtems_task_set_priority when the
     75 *  caller wants to obtain the current priority.
     76 */
     77
     78#define RTEMS_CURRENT_PRIORITY      PRIORITY_MINIMUM   
     79
     80/*
     81 *  Notepads constants (indices into notepad array)
     82 */
     83 
     84#define RTEMS_NOTEPAD_FIRST 0             /* lowest numbered notepad */
     85#define RTEMS_NOTEPAD_0    0              /* notepad location 0  */
     86#define RTEMS_NOTEPAD_1    1              /* notepad location 1  */
     87#define RTEMS_NOTEPAD_2    2              /* notepad location 2  */
     88#define RTEMS_NOTEPAD_3    3              /* notepad location 3  */
     89#define RTEMS_NOTEPAD_4    4              /* notepad location 4  */
     90#define RTEMS_NOTEPAD_5    5              /* notepad location 5  */
     91#define RTEMS_NOTEPAD_6    6              /* notepad location 6  */
     92#define RTEMS_NOTEPAD_7    7              /* notepad location 7  */
     93#define RTEMS_NOTEPAD_8    8              /* notepad location 8  */
     94#define RTEMS_NOTEPAD_9    9              /* notepad location 9  */
     95#define RTEMS_NOTEPAD_10   10             /* notepad location 10 */
     96#define RTEMS_NOTEPAD_11   11             /* notepad location 11 */
     97#define RTEMS_NOTEPAD_12   12             /* notepad location 12 */
     98#define RTEMS_NOTEPAD_13   13             /* notepad location 13 */
     99#define RTEMS_NOTEPAD_14   14             /* notepad location 14 */
     100#define RTEMS_NOTEPAD_15   15             /* notepad location 15 */
     101#define RTEMS_NOTEPAD_LAST RTEMS_NOTEPAD_15     /* highest numbered notepad */
     102 
     103#define RTEMS_NUMBER_NOTEPADS  (RTEMS_NOTEPAD_LAST+1)
     104
     105/*
     106 *  External API name for Thread_Control
     107 */
     108
     109typedef Thread_Control rtems_tcb;
     110
     111/*
     112 *  The following defines the "return type" of an RTEMS task.
     113 */
     114 
     115typedef void rtems_task;
     116
     117/*
     118 *  The following defines the argument to an RTEMS task.
     119 */
     120 
     121typedef unsigned32 rtems_task_argument;
     122
     123/*
     124 *  The following defines the type for the entry point of an RTEMS task.
     125 */
     126 
     127typedef rtems_task ( *rtems_task_entry )(
     128                      rtems_task_argument
     129                   );
     130 
     131/*
     132 *  The following records define the Initialization Tasks Table.
     133 *  Each entry contains the information required by RTEMS to
     134 *  create and start a user task automatically at executive
     135 *  initialization time.
     136 */
     137 
     138typedef struct {
     139  rtems_name            name;              /* task name */
     140  unsigned32            stack_size;        /* task stack size */
     141  rtems_task_priority   initial_priority;  /* task priority */
     142  rtems_attribute       attribute_set;     /* task attributes */
     143  rtems_task_entry      entry_point;       /* task entry point */
     144  rtems_mode            mode_set;          /* task initial mode */
     145  unsigned32            argument;          /* task argument */
     146} rtems_initialization_tasks_table;
     147
     148/*
     149 *  This is the API specific information required by each thread for
     150 *  the RTEMS API to function correctly.
     151 */
     152
     153 
     154typedef struct {
     155  unsigned32                Notepads[ RTEMS_NUMBER_NOTEPADS ];
     156  rtems_event_set           pending_events;
     157  rtems_event_set           event_condition;
     158  ASR_Information           Signal;
     159}  RTEMS_API_Control;
    64160
    65161/*
     
    71167
    72168/*
     169 *  These are used to manage the user initialization tasks.
     170 */
     171
     172EXTERN rtems_initialization_tasks_table *_RTEMS_tasks_User_initialization_tasks;
     173EXTERN unsigned32   _RTEMS_tasks_Number_of_initialization_tasks;
     174
     175/*
    73176 *  _RTEMS_tasks_Manager_initialization
    74177 *
     
    79182 
    80183void _RTEMS_tasks_Manager_initialization(
    81   unsigned32   maximum_tasks
     184  unsigned32                        maximum_tasks,
     185  unsigned32                        number_of_initialization_tasks,
     186  rtems_initialization_tasks_table *user_tasks
    82187);
    83188
     
    285390
    286391rtems_status_code rtems_task_wake_after(
    287   rtems_interval ticks
     392  rtems_interval  ticks
    288393);
    289394
     
    314419
    315420/*
    316  *  _RTEMS_tasks_Cancel_wait
    317  *
    318  *  DESCRIPTION:
    319  *
    320  *  This routine unblocks the_thread and cancels any timers
    321  *  which the_thread has active.
    322  */
    323 
    324 STATIC INLINE void _RTEMS_tasks_Cancel_wait(
    325   Thread_Control *the_thread
    326 );
    327 
    328 /*
    329  *  _RTEMS_Tasks_Priority_to_Core
     421 *  _RTEMS_tasks_Priority_to_Core
    330422 *
    331423 *  DESCRIPTION:
     
    334426 */
    335427 
    336 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core(
     428STATIC INLINE Priority_Control _RTEMS_tasks_Priority_to_Core(
    337429  rtems_task_priority   priority
    338430);
    339431
    340 #include <rtems/tasks.inl>
    341 #include <rtems/taskmp.h>
     432/*PAGE
     433 *
     434 *  _RTEMS_tasks_Initialize_user_tasks
     435 *
     436 *  This routine creates and starts all configured user
     437 *  initialzation threads.
     438 *
     439 *  Input parameters: NONE
     440 *
     441 *  Output parameters:  NONE
     442 */
     443 
     444void _RTEMS_tasks_Initialize_user_tasks( void );
     445
     446/*PAGE
     447 *
     448 *  _RTEMS_tasks_Priority_is_valid
     449 *
     450 */
     451 
     452STATIC INLINE boolean _RTEMS_tasks_Priority_is_valid (
     453  rtems_task_priority the_priority
     454);
     455
     456#include <rtems/rtems/tasks.inl>
     457#include <rtems/rtems/taskmp.h>
    342458
    343459#ifdef __cplusplus
  • c/src/exec/rtems/headers/timer.h

    r5072b07 r3a4ae6c  
    3434#endif
    3535
    36 #include <rtems.h>
    37 #include <rtems/object.h>
    38 #include <rtems/tod.h>
    39 #include <rtems/watchdog.h>
     36#include <rtems/core/object.h>
     37#include <rtems/core/tod.h>
     38#include <rtems/core/watchdog.h>
    4039
    4140/*
     
    5150
    5251/*
    53  *  The following defines the type of a Timer Service Routine.
    54  */
    55 
    56 typedef rtems_timer_service_routine_entry Timer_Service;
     52 *  The following types define a pointer to a timer service routine.
     53 */
     54 
     55typedef void rtems_timer_service_routine;
     56 
     57typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
     58                 rtems_id,
     59                 void *
     60             );
    5761
    5862/*
     
    154158
    155159rtems_status_code rtems_timer_fire_after(
    156   Objects_Id         id,
    157   rtems_interval  ticks,
    158   Timer_Service      routine,
    159   void              *user_data
     160  Objects_Id                         id,
     161  rtems_interval                     ticks,
     162  rtems_timer_service_routine_entry  routine,
     163  void                              *user_data
    160164);
    161165
     
    171175
    172176rtems_status_code rtems_timer_fire_when(
    173   Objects_Id         id,
    174   rtems_time_of_day       *wall_time,
    175   Timer_Service      routine,
    176   void              *user_data
     177  Objects_Id                          id,
     178  rtems_time_of_day                  *wall_time,
     179  rtems_timer_service_routine_entry   routine,
     180  void                               *user_data
    177181);
    178182
     
    284288);
    285289
    286 #include <rtems/timer.inl>
     290#include <rtems/rtems/timer.inl>
    287291
    288292#ifdef __cplusplus
  • c/src/exec/rtems/headers/types.h

    r5072b07 r3a4ae6c  
    2121#endif
    2222
    23 #include <rtems/object.h>
    24 #include <rtems/priority.h>
    25 #include <rtems/modes.h>
     23#include <rtems/core/object.h>
     24#include <rtems/core/priority.h>
     25#include <rtems/rtems/modes.h>
     26#include <rtems/core/mpci.h>
     27#include <rtems/core/mppkt.h>
    2628
    2729/*
     
    5254
    5355/*
    54  *  Define the type for an RTEMS API task priority.
     56 *  Time related
    5557 */
    5658
    57 typedef Priority_Control rtems_task_priority;
     59typedef Watchdog_Interval rtems_interval;
     60typedef TOD_Control       rtems_time_of_day;
    5861
    59 #define RTEMS_NO_PRIORITY  RTEMS_CURRENT_PRIORITY
    6062/*
    6163 *  Define the type for an RTEMS API task mode.
     
    6365 
    6466typedef Modes_Control rtems_mode;
     67
     68/*
     69 *  MPCI related entries
     70 */
     71
     72typedef MP_packet_Classes          rtems_mp_packet_classes;
     73typedef MP_packet_Prefix           rtems_packet_prefix;
     74
     75typedef MPCI_initialization_entry  rtems_mpci_initialization_entry;
     76typedef MPCI_get_packet_entry      rtems_mpci_get_packet_entry;
     77typedef MPCI_return_packet_entry   rtems_mpci_return_packet_entry;
     78typedef MPCI_send_entry            rtems_mpci_send_packet_entry;
     79typedef MPCI_receive_entry         rtems_mpci_receive_packet_entry;
     80
     81typedef MPCI_Entry rtems_mpci_entry;
     82
     83typedef MPCI_Control rtems_mpci_table;
    6584
    6685#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems.h

    r5072b07 r3a4ae6c  
    2525
    2626#include <rtems/system.h>
    27 #include <rtems/types.h>
     27#include <rtems/rtems/status.h>
     28#include <rtems/rtems/types.h>
    2829
     30#include <rtems/config.h>
    2931#include <rtems/init.h>
    30 #include <rtems/tasks.h>
    31 #include <rtems/intr.h>
    32 #include <rtems/clock.h>
     32#include <rtems/rtems/tasks.h>
     33#include <rtems/rtems/intr.h>
     34#include <rtems/rtems/clock.h>
    3335#include <rtems/extension.h>
    34 #include <rtems/timer.h>
    35 #include <rtems/sem.h>
    36 #include <rtems/message.h>
    37 #include <rtems/event.h>
    38 #include <rtems/signal.h>
    39 #include <rtems/event.h>
    40 #include <rtems/part.h>
    41 #include <rtems/region.h>
    42 #include <rtems/dpmem.h>
     36#include <rtems/rtems/timer.h>
     37#include <rtems/rtems/sem.h>
     38#include <rtems/rtems/message.h>
     39#include <rtems/rtems/event.h>
     40#include <rtems/rtems/signal.h>
     41#include <rtems/rtems/event.h>
     42#include <rtems/rtems/part.h>
     43#include <rtems/rtems/region.h>
     44#include <rtems/rtems/dpmem.h>
    4345#include <rtems/io.h>
    4446#include <rtems/fatal.h>
    45 #include <rtems/ratemon.h>
    46 #include <rtems/mp.h>
     47#include <rtems/rtems/ratemon.h>
     48#include <rtems/rtems/mp.h>
    4749
    48 #include <rtems/support.h>
     50#include <rtems/rtems/support.h>
     51#include <rtems/sysstate.h>
    4952
    5053#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
     54
     55/*
     56 *  The following define the constants which may be used in name searches.
     57 */
     58 
     59#define RTEMS_SEARCH_ALL_NODES   OBJECTS_SEARCH_ALL_NODES
     60#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
     61#define RTEMS_SEARCH_LOCAL_NODE  OBJECTS_SEARCH_LOCAL_NODE
     62#define RTEMS_WHO_AM_I           OBJECTS_WHO_AM_I
     63 
     64/*
     65 * Parameters and return id's for _Objects_Get_next
     66 */
     67 
     68#define RTEMS_OBJECT_ID_INITIAL_INDEX   OBJECTS_ID_INITIAL_INDEX
     69#define RTEMS_OBJECT_ID_FINAL_INDEX     OBJECTS_ID_FINAL_INDEX
     70 
     71#define RTEMS_OBJECT_ID_INITIAL(node)   OBJECTS_ID_INITIAL(node)
     72#define RTEMS_OBJECT_ID_FINAL           OBJECTS_ID_FINAL
     73 
     74/*
     75 *  The following constant defines the minimum stack size which every
     76 *  thread must exceed.
     77 */
     78
     79#define RTEMS_MINIMUM_STACK_SIZE  STACK_MINIMUM_SIZE
     80
     81/*
     82 *  Constant for indefinite wait.  (actually an illegal interval)
     83 */
     84
     85#define RTEMS_NO_TIMEOUT  WATCHDOG_NO_TIMEOUT
     86
     87/*
     88 *  An MPCI must support packets of at least this size.
     89 */
     90 
     91#define RTEMS_MINIMUM_PACKET_SIZE  MP_PACKET_MINIMUM_PACKET_SIZE
     92 
     93/*
     94 *  The following constant defines the number of unsigned32's
     95 *  in a packet which must be converted to native format in a
     96 *  heterogeneous system.  In packets longer than
     97 *  MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
     98 *  may a user message buffer which is not automatically endian swapped.
     99 */
     100 
     101#define RTEMS_MINIMUN_HETERO_CONVERSION  MP_PACKET_MINIMUN_HETERO_CONVERSION
     102
    51103
    52104#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/asr.h

    r5072b07 r3a4ae6c  
    2323#endif
    2424
    25 #include <rtems/modes.h>
     25#include <rtems/rtems/modes.h>
    2626
    2727/*
     
    5555
    5656typedef struct {
     57  boolean           is_enabled;       /* are ASRs enabled currently? */
    5758  rtems_asr_entry   handler;          /* address of RTEMS_ASR */
    5859  Modes_Control     mode_set;         /* RTEMS_ASR mode */
     
    168169);
    169170
    170 #include <rtems/asr.inl>
     171#include <rtems/rtems/asr.inl>
    171172
    172173#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/attr.h

    r5072b07 r3a4ae6c  
    4444#define RTEMS_NO_INHERIT_PRIORITY 0x00000000
    4545#define RTEMS_INHERIT_PRIORITY    0x00000020
     46
     47#define RTEMS_NO_PRIORITY_CEILING 0x00000000
     48#define RTEMS_PRIORITY_CEILING    0x00000040
    4649
    4750#if ( CPU_HARDWARE_FP == TRUE )
     
    178181);
    179182
    180 #include <rtems/attr.inl>
     183/*
     184 *  _Attributes_Is_priority_ceiling
     185 *
     186 *  DESCRIPTION:
     187 *
     188 *  This function returns TRUE if the priority ceiling attribute
     189 *  is enabled in the attribute_set and FALSE otherwise.
     190 */
     191 
     192STATIC INLINE boolean _Attributes_Is_priority_ceiling(
     193  rtems_attribute attribute_set
     194);
     195 
     196
     197#include <rtems/rtems/attr.inl>
    181198
    182199#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/clock.h

    r5072b07 r3a4ae6c  
    3030#endif
    3131
    32 #include <rtems/tod.h>
     32#include <rtems/core/tod.h>
     33#include <rtems/rtems/types.h>
    3334
    3435/*
  • c/src/exec/rtems/include/rtems/rtems/dpmem.h

    r5072b07 r3a4ae6c  
    3333#endif
    3434
    35 #include <rtems.h>
    36 #include <rtems/object.h>
     35#include <rtems/core/object.h>
    3736
    3837/*
     
    202201);
    203202
    204 #include <rtems/dpmem.inl>
     203#include <rtems/rtems/dpmem.inl>
    205204
    206205#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/event.h

    r5072b07 r3a4ae6c  
    2929#endif
    3030
    31 #include <rtems/object.h>
    32 #include <rtems/options.h>
    33 #include <rtems/thread.h>
    34 #include <rtems/watchdog.h>
    35 #include <rtems/eventset.h>
     31#include <rtems/core/object.h>
     32#include <rtems/rtems/types.h>
     33#include <rtems/rtems/options.h>
     34#include <rtems/core/thread.h>
     35#include <rtems/core/watchdog.h>
     36#include <rtems/rtems/eventset.h>
    3637
    3738/*
     
    105106
    106107void _Event_Seize (
    107   rtems_event_set event_in,
    108   rtems_option    option_set,
    109   rtems_interval  ticks
     108  rtems_event_set  event_in,
     109  rtems_option     option_set,
     110  rtems_interval   ticks,
     111  rtems_event_set *event_out
    110112);
    111113
     
    148150EXTERN boolean _Event_Sync;    /* event manager sync flag */
    149151
    150 #include <rtems/event.inl>
    151 #include <rtems/eventmp.h>
     152#include <rtems/rtems/eventmp.h>
     153#include <rtems/rtems/event.inl>
    152154
    153155#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/eventmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/event.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/object.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/watchdog.h>
     24#include <rtems/rtems/event.h>
     25#include <rtems/core/mppkt.h>
     26#include <rtems/core/object.h>
     27#include <rtems/core/thread.h>
     28#include <rtems/core/watchdog.h>
    2929
    3030/*
  • c/src/exec/rtems/include/rtems/rtems/eventset.h

    r5072b07 r3a4ae6c  
    133133);
    134134
    135 #include <rtems/eventset.inl>
     135#include <rtems/rtems/eventset.inl>
    136136
    137137#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/intr.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/isr.h>
     24#include <rtems/core/isr.h>
    2525
    2626/*
     
    2929
    3030typedef ISR_Level rtems_interrupt_level;
     31
     32/*
     33 *  The following type defines the control block used to manage
     34 *  the vectors.
     35 */
     36 
     37typedef ISR_Vector_number rtems_vector_number;
     38
     39/*
     40 *  Return type for ISR Handler
     41 */
     42 
     43typedef void rtems_isr;
     44
     45/*
     46 *  Pointer to an ISR Handler
     47 */
     48 
     49typedef rtems_isr ( *rtems_isr_entry )(
     50                 rtems_vector_number
     51             );
    3152
    3253/*
  • c/src/exec/rtems/include/rtems/rtems/message.h

    r5072b07 r3a4ae6c  
    3535#endif
    3636
    37 #include <rtems/types.h>
    38 #include <rtems/chain.h>
    39 #include <rtems/object.h>
    40 #include <rtems/threadq.h>
     37#include <rtems/rtems/types.h>
     38#include <rtems/core/chain.h>
     39#include <rtems/core/object.h>
     40#include <rtems/rtems/attr.h>
     41#include <rtems/core/threadq.h>
    4142
    4243/*
     
    469470);
    470471
    471 #include <rtems/message.inl>
    472 #include <rtems/msgmp.h>
     472#include <rtems/rtems/message.inl>
     473#include <rtems/rtems/msgmp.h>
    473474
    474475#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/modes.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/isr.h>
     24#include <rtems/core/isr.h>
    2525
    2626/*
     
    174174);
    175175
    176 #include <rtems/modes.inl>
     176#include <rtems/rtems/modes.inl>
    177177
    178178#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/mp.h

    r5072b07 r3a4ae6c  
    4646void rtems_multiprocessing_announce ( void );
    4747
    48 /*
    49  *
    50  *  _Multiprocessing_Receive_server
    51  *
    52  *  DESCRIPTION:
    53  *
    54  *  This routine is a server thread which processes remote requests
    55  *  from other nodes.
    56  */
    57 
    58 Thread _Multiprocessing_Receive_server (
    59   Thread_Argument ignored
    60 );
    61 
    6248#ifdef __cplusplus
    6349}
  • c/src/exec/rtems/include/rtems/rtems/msgmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/message.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/object.h>
    27 #include <rtems/options.h>
    28 #include <rtems/thread.h>
    29 #include <rtems/watchdog.h>
     24#include <rtems/rtems/message.h>
     25#include <rtems/core/mppkt.h>
     26#include <rtems/core/object.h>
     27#include <rtems/rtems/options.h>
     28#include <rtems/core/thread.h>
     29#include <rtems/core/watchdog.h>
    3030
    3131/*
     
    9898  unsigned32                         *size_p,
    9999  rtems_option                        option_set,
    100   rtems_interval                      timeout
     100  Watchdog_Interval                   timeout
    101101);
    102102
  • c/src/exec/rtems/include/rtems/rtems/options.h

    r5072b07 r3a4ae6c  
    7070);
    7171
    72 #include <rtems/options.inl>
     72#include <rtems/rtems/options.inl>
    7373
    7474#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/part.h

    r5072b07 r3a4ae6c  
    3232#endif
    3333
    34 #include <rtems.h>
    35 #include <rtems/address.h>
    36 #include <rtems/attr.h>
    37 #include <rtems/object.h>
     34#include <rtems/core/address.h>
     35#include <rtems/core/object.h>
     36#include <rtems/rtems/attr.h>
     37#include <rtems/rtems/types.h>
    3838
    3939/*
     
    281281);
    282282
    283 #include <rtems/part.inl>
    284 #include <rtems/partmp.h>
     283#include <rtems/rtems/part.inl>
     284#include <rtems/rtems/partmp.h>
    285285
    286286#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/partmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/part.h>
    28 #include <rtems/thread.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/rtems/options.h>
     27#include <rtems/core/thread.h>
     28
     29#include <rtems/rtems/part.h>
    2930
    3031/*
  • c/src/exec/rtems/include/rtems/rtems/ratemon.h

    r5072b07 r3a4ae6c  
    3030#endif
    3131
    32 #include <rtems.h>
    33 #include <rtems/object.h>
    34 #include <rtems/thread.h>
    35 #include <rtems/watchdog.h>
     32#include <rtems/core/object.h>
     33#include <rtems/core/thread.h>
     34#include <rtems/core/watchdog.h>
    3635
    3736/*
     
    5150 */
    5251
    53 #define RTEMS_PERIOD_STATUS       RTEMS_NO_TIMEOUT
     52#define RTEMS_PERIOD_STATUS       WATCHDOG_NO_TIMEOUT
    5453
    5554/*
     
    149148
    150149rtems_status_code rtems_rate_monotonic_period(
    151   Objects_Id        id,
    152   rtems_interval length
     150  Objects_Id      id,
     151  rtems_interval  length
    153152);
    154153
     
    277276);
    278277
    279 #include <rtems/ratemon.inl>
     278#include <rtems/rtems/ratemon.inl>
    280279
    281280#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/region.h

    r5072b07 r3a4ae6c  
    3131#endif
    3232
    33 #include <rtems.h>
    34 #include <rtems/object.h>
    35 #include <rtems/threadq.h>
    36 #include <rtems/heap.h>
     33#include <rtems/core/object.h>
     34#include <rtems/core/threadq.h>
     35#include <rtems/core/heap.h>
    3736#include <rtems/debug.h>
     37#include <rtems/rtems/attr.h>
     38#include <rtems/rtems/types.h>
    3839
    3940/*
     
    159160  Objects_Id         id,
    160161  unsigned32         size,
    161   rtems_option    option_set,
    162   rtems_interval  timeout,
     162  rtems_option       option_set,
     163  rtems_interval     timeout,
    163164  void              **segment
    164165);
     
    279280);
    280281
    281 #include <rtems/region.inl>
    282 #include <rtems/regionmp.h>
     282#include <rtems/rtems/region.inl>
     283#include <rtems/rtems/regionmp.h>
    283284
    284285/*
  • c/src/exec/rtems/include/rtems/rtems/regionmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/region.h>
    28 #include <rtems/thread.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/core/thread.h>
     27
     28#include <rtems/rtems/options.h>
     29#include <rtems/rtems/region.h>
    2930
    3031/*
     
    8889  void                        *segment,
    8990  unsigned32                   size,
    90   rtems_option              option_set,
    91   rtems_interval            timeout
     91  rtems_option                 option_set,
     92  rtems_interval               timeout
    9293);
    9394
  • c/src/exec/rtems/include/rtems/rtems/sem.h

    r5072b07 r3a4ae6c  
    3232#endif
    3333
    34 #include <rtems.h>
    35 #include <rtems/attr.h>
    36 #include <rtems/object.h>
    37 #include <rtems/threadq.h>
     34#include <rtems/rtems/types.h>
     35#include <rtems/rtems/support.h>
     36#include <rtems/rtems/tasks.h>
     37#include <rtems/rtems/attr.h>
     38#include <rtems/core/coremutex.h>
     39#include <rtems/core/object.h>
     40#include <rtems/core/coresem.h>
     41#include <rtems/core/threadq.h>
    3842
    3943/*
     
    4246
    4347typedef struct {
    44   Objects_Control       Object;
    45   Thread_queue_Control  Wait_queue;
    46   rtems_attribute    attribute_set;
    47   unsigned32            count;
    48   unsigned32            nest_count;
    49   Thread_Control       *holder;
    50   Objects_Id            holder_id;
     48  Objects_Control          Object;
     49  rtems_attribute          attribute_set;
     50  union {
     51    CORE_mutex_Control     mutex;
     52    CORE_semaphore_Control semaphore;
     53  } Core_control;
    5154}   Semaphore_Control;
    5255
     
    8386
    8487rtems_status_code rtems_semaphore_create(
    85   rtems_name            name,
    86   unsigned32            count,
    87   rtems_attribute       attribute_set,
    88   rtems_task_priority   priority_ceiling,
    89   Objects_Id           *id
     88  rtems_name           name,
     89  unsigned32           count,
     90  rtems_attribute      attribute_set,
     91  rtems_task_priority  priority_ceiling,
     92  rtems_id            *id
    9093);
    9194
     
    107110  rtems_name    name,
    108111  unsigned32    node,
    109   Objects_Id   *id
     112  rtems_id     *id
    110113);
    111114
     
    120123
    121124rtems_status_code rtems_semaphore_delete(
    122   Objects_Id id
     125  rtems_id  id
    123126);
    124127
     
    138141
    139142rtems_status_code rtems_semaphore_obtain(
    140   Objects_Id        id,
    141   unsigned32        option_set,
     143  rtems_id       id,
     144  unsigned32     option_set,
    142145  rtems_interval timeout
    143146);
     
    156159
    157160rtems_status_code rtems_semaphore_release(
    158   Objects_Id id
     161  rtems_id  id
    159162);
    160163
     
    214217
    215218STATIC INLINE Semaphore_Control *_Semaphore_Get (
    216   Objects_Id         id,
     219  rtems_id           id,
    217220  Objects_Locations *location
    218221);
     
    230233);
    231234
    232 #include <rtems/sem.inl>
    233 #include <rtems/semmp.h>
     235/*
     236 *  _Semaphore_Translate_core_mutex_return_code
     237 *
     238 *  DESCRIPTION:
     239 *
     240 *  This function returns a RTEMS status code based on the mutex
     241 *  status code specified.
     242 */
     243 
     244rtems_status_code _Semaphore_Translate_core_mutex_return_code (
     245  unsigned32 the_mutex_status
     246);
     247
     248/*
     249 *  _Semaphore_Translate_core_semaphore_return_code
     250 *
     251 *  DESCRIPTION:
     252 *
     253 *  This function returns a RTEMS status code based on the semaphore
     254 *  status code specified.
     255 */
     256 
     257rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
     258  unsigned32 the_mutex_status
     259);
     260 
     261/*PAGE
     262 *
     263 *  _Semaphore_Core_mutex_mp_support
     264 *
     265 *  DESCRIPTION:
     266 *
     267 *  This function processes the global actions necessary for remote
     268 *  accesses to a global semaphore based on a core mutex.  This function
     269 *  is called by the core.
     270 */
     271
     272void  _Semaphore_Core_mutex_mp_support (
     273  Thread_Control *the_thread,
     274  rtems_id        id
     275);
     276
     277/*PAGE
     278 *
     279 *  _Semaphore_Core_mp_support
     280 *
     281 *  DESCRIPTION:
     282 *
     283 *  This function processes the global actions necessary for remote
     284 *  accesses to a global semaphore based on a core semaphore.  This function
     285 *  is called by the core.
     286 */
     287 
     288void  _Semaphore_Core_semaphore_mp_support (
     289  Thread_Control *the_thread,
     290  rtems_id        id
     291);
     292
     293#include <rtems/rtems/sem.inl>
     294#include <rtems/rtems/semmp.h>
    234295
    235296#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/semmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/sem.h>
    28 #include <rtems/thread.h>
    29 #include <rtems/watchdog.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/rtems/options.h>
     27#include <rtems/rtems/sem.h>
     28#include <rtems/core/thread.h>
     29#include <rtems/core/watchdog.h>
    3030
    3131/*
     
    8585  Semaphore_MP_Remote_operations operation,
    8686  Objects_Id                     semaphore_id,
    87   rtems_option                option_set,
    88   rtems_interval              timeout
     87  rtems_option                   option_set,
     88  rtems_interval                 timeout
    8989);
    9090
  • c/src/exec/rtems/include/rtems/rtems/signal.h

    r5072b07 r3a4ae6c  
    2828#endif
    2929
    30 #include <rtems/asr.h>
    31 #include <rtems/modes.h>
    32 #include <rtems/object.h>
    33 #include <rtems/status.h>
    34 #include <rtems/types.h>
     30#include <rtems/rtems/asr.h>
     31#include <rtems/rtems/modes.h>
     32#include <rtems/core/object.h>
     33#include <rtems/rtems/status.h>
     34#include <rtems/rtems/types.h>
     35
     36/*
     37 *  _Signal_Manager_initialization
     38 *
     39 *  DESCRIPTION:
     40 *
     41 *  This routine performs the initialization necessary for this manager.
     42 */
     43 
     44void _Signal_Manager_initialization( void );
    3545
    3646/*
     
    6474);
    6575
    66 #include <rtems/signalmp.h>
     76#include <rtems/rtems/signalmp.h>
    6777
    6878#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/signalmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/asr.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/object.h>
    27 #include <rtems/thread.h>
    28 #include <rtems/watchdog.h>
     24#include <rtems/rtems/asr.h>
     25#include <rtems/core/mppkt.h>
     26#include <rtems/core/object.h>
     27#include <rtems/core/thread.h>
     28#include <rtems/core/watchdog.h>
    2929
    3030/*
  • c/src/exec/rtems/include/rtems/rtems/status.h

    r5072b07 r3a4ae6c  
    5353  RTEMS_NOT_IMPLEMENTED          = 24, /* directive not implemented */
    5454  RTEMS_INTERNAL_ERROR           = 25, /* RTEMS inconsistency detected */
    55   RTEMS_PROXY_BLOCKING           = 26, /* internal multiprocessing only */
    56   RTEMS_NO_MEMORY                = 27  /* could not get enough memory */
     55  RTEMS_NO_MEMORY                = 26  /* could not get enough memory */
    5756} rtems_status_code;
    5857
    5958#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
    6059#define RTEMS_STATUS_CODES_LAST  RTEMS_NO_MEMORY
     60
     61extern rtems_status_code _Status_Object_name_errors_to_status[];
     62
     63#ifdef INIT
     64rtems_status_code _Status_Object_name_errors_to_status[] = {
     65  RTEMS_SUCCESSFUL,      /* OBJECTS_SUCCESSFUL */
     66  RTEMS_INVALID_NAME,    /* OBJECTS_INVALID_NAME */
     67  RTEMS_INVALID_NODE     /* OBJECTS_INVALID_NODE */
     68};
     69#endif
    6170
    6271/*
     
    8796);
    8897
    89 /*
    90  *  _Status_Is_proxy_blocking
    91  *
    92  *  DESCRIPTION:
    93  *
    94  *  This function returns TRUE if the status code is equal to the
    95  *  status which indicates that a proxy is blocking, and FALSE otherwise.
    96  */
    97 
    98 STATIC INLINE boolean _Status_Is_proxy_blocking (
    99   rtems_status_code code
    100 );
    101 
    102 #include <rtems/status.inl>
     98#include <rtems/rtems/status.inl>
    10399
    104100#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/support.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/types.h>
     24#include <rtems/rtems/types.h>
    2525
    2626/*
     
    7171);
    7272
    73 #include <rtems/support.inl>
     73/*
     74 *  rtems_get_class
     75 *
     76 *  DESCRIPTION:
     77 *
     78 *  This function returns the class portion of the ID.
     79 *
     80 */
     81 
     82#define rtems_get_class( _id ) \
     83  _Objects_Get_class( _id )
     84 
     85/*
     86 *  rtems_get_node
     87 *
     88 *  DESCRIPTION:
     89 *
     90 *  This function returns the node portion of the ID.
     91 *
     92 */
     93 
     94#define rtems_get_node( _id ) \
     95  _Objects_Get_node( _id )
     96 
     97/*
     98 *  rtems_get_index
     99 *
     100 *  DESCRIPTION:
     101 *
     102 *  This function returns the index portion of the ID.
     103 *
     104 */
     105 
     106#define rtems_get_index( _id ) \
     107  _Objects_Get_index( _id )
     108
     109/*
     110 *  Time related
     111 */
     112
     113#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
     114        TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
     115#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
     116        TOD_MILLISECONDS_TO_TICKS(_ms)
     117
     118#include <rtems/rtems/support.inl>
    74119
    75120#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/taskmp.h

    r5072b07 r3a4ae6c  
    2222#endif
    2323
    24 #include <rtems/mppkt.h>
    25 #include <rtems/object.h>
    26 #include <rtems/options.h>
    27 #include <rtems/priority.h>
    28 #include <rtems/tasks.h>
    29 #include <rtems/thread.h>
     24#include <rtems/core/mppkt.h>
     25#include <rtems/core/object.h>
     26#include <rtems/rtems/options.h>
     27#include <rtems/core/priority.h>
     28#include <rtems/rtems/tasks.h>
     29#include <rtems/core/thread.h>
    3030
    3131/*
  • c/src/exec/rtems/include/rtems/rtems/tasks.h

    r5072b07 r3a4ae6c  
    3939#endif
    4040
    41 #include <rtems.h>
    42 #include <rtems/message.h>
    43 #include <rtems/object.h>
    44 #include <rtems/part.h>
    45 #include <rtems/region.h>
    46 #include <rtems/sem.h>
    47 #include <rtems/states.h>
    48 #include <rtems/thread.h>
    49 #include <rtems/threadq.h>
    50 #include <rtems/types.h>
     41#include <rtems/core/object.h>
     42#include <rtems/core/states.h>
     43#include <rtems/core/thread.h>
     44#include <rtems/rtems/types.h>
     45#include <rtems/rtems/eventset.h>
     46#include <rtems/rtems/asr.h>
     47#include <rtems/rtems/attr.h>
    5148
    5249/*
     
    6158 */
    6259
    63 #define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
     60#define RTEMS_YIELD_PROCESSOR WATCHDOG_NO_TIMEOUT
     61
     62/*
     63 *  Define the type for an RTEMS API task priority.
     64 */
     65
     66typedef Priority_Control rtems_task_priority;
     67
     68#define RTEMS_NO_PRIORITY           RTEMS_CURRENT_PRIORITY
     69
     70#define RTEMS_MINIMUM_PRIORITY      (PRIORITY_MINIMUM + 1)
     71#define RTEMS_MAXIMUM_PRIORITY      PRIORITY_MAXIMUM
     72
     73/*
     74 *  The following constant is passed to rtems_task_set_priority when the
     75 *  caller wants to obtain the current priority.
     76 */
     77
     78#define RTEMS_CURRENT_PRIORITY      PRIORITY_MINIMUM   
     79
     80/*
     81 *  Notepads constants (indices into notepad array)
     82 */
     83 
     84#define RTEMS_NOTEPAD_FIRST 0             /* lowest numbered notepad */
     85#define RTEMS_NOTEPAD_0    0              /* notepad location 0  */
     86#define RTEMS_NOTEPAD_1    1              /* notepad location 1  */
     87#define RTEMS_NOTEPAD_2    2              /* notepad location 2  */
     88#define RTEMS_NOTEPAD_3    3              /* notepad location 3  */
     89#define RTEMS_NOTEPAD_4    4              /* notepad location 4  */
     90#define RTEMS_NOTEPAD_5    5              /* notepad location 5  */
     91#define RTEMS_NOTEPAD_6    6              /* notepad location 6  */
     92#define RTEMS_NOTEPAD_7    7              /* notepad location 7  */
     93#define RTEMS_NOTEPAD_8    8              /* notepad location 8  */
     94#define RTEMS_NOTEPAD_9    9              /* notepad location 9  */
     95#define RTEMS_NOTEPAD_10   10             /* notepad location 10 */
     96#define RTEMS_NOTEPAD_11   11             /* notepad location 11 */
     97#define RTEMS_NOTEPAD_12   12             /* notepad location 12 */
     98#define RTEMS_NOTEPAD_13   13             /* notepad location 13 */
     99#define RTEMS_NOTEPAD_14   14             /* notepad location 14 */
     100#define RTEMS_NOTEPAD_15   15             /* notepad location 15 */
     101#define RTEMS_NOTEPAD_LAST RTEMS_NOTEPAD_15     /* highest numbered notepad */
     102 
     103#define RTEMS_NUMBER_NOTEPADS  (RTEMS_NOTEPAD_LAST+1)
     104
     105/*
     106 *  External API name for Thread_Control
     107 */
     108
     109typedef Thread_Control rtems_tcb;
     110
     111/*
     112 *  The following defines the "return type" of an RTEMS task.
     113 */
     114 
     115typedef void rtems_task;
     116
     117/*
     118 *  The following defines the argument to an RTEMS task.
     119 */
     120 
     121typedef unsigned32 rtems_task_argument;
     122
     123/*
     124 *  The following defines the type for the entry point of an RTEMS task.
     125 */
     126 
     127typedef rtems_task ( *rtems_task_entry )(
     128                      rtems_task_argument
     129                   );
     130 
     131/*
     132 *  The following records define the Initialization Tasks Table.
     133 *  Each entry contains the information required by RTEMS to
     134 *  create and start a user task automatically at executive
     135 *  initialization time.
     136 */
     137 
     138typedef struct {
     139  rtems_name            name;              /* task name */
     140  unsigned32            stack_size;        /* task stack size */
     141  rtems_task_priority   initial_priority;  /* task priority */
     142  rtems_attribute       attribute_set;     /* task attributes */
     143  rtems_task_entry      entry_point;       /* task entry point */
     144  rtems_mode            mode_set;          /* task initial mode */
     145  unsigned32            argument;          /* task argument */
     146} rtems_initialization_tasks_table;
     147
     148/*
     149 *  This is the API specific information required by each thread for
     150 *  the RTEMS API to function correctly.
     151 */
     152
     153 
     154typedef struct {
     155  unsigned32                Notepads[ RTEMS_NUMBER_NOTEPADS ];
     156  rtems_event_set           pending_events;
     157  rtems_event_set           event_condition;
     158  ASR_Information           Signal;
     159}  RTEMS_API_Control;
    64160
    65161/*
     
    71167
    72168/*
     169 *  These are used to manage the user initialization tasks.
     170 */
     171
     172EXTERN rtems_initialization_tasks_table *_RTEMS_tasks_User_initialization_tasks;
     173EXTERN unsigned32   _RTEMS_tasks_Number_of_initialization_tasks;
     174
     175/*
    73176 *  _RTEMS_tasks_Manager_initialization
    74177 *
     
    79182 
    80183void _RTEMS_tasks_Manager_initialization(
    81   unsigned32   maximum_tasks
     184  unsigned32                        maximum_tasks,
     185  unsigned32                        number_of_initialization_tasks,
     186  rtems_initialization_tasks_table *user_tasks
    82187);
    83188
     
    285390
    286391rtems_status_code rtems_task_wake_after(
    287   rtems_interval ticks
     392  rtems_interval  ticks
    288393);
    289394
     
    314419
    315420/*
    316  *  _RTEMS_tasks_Cancel_wait
    317  *
    318  *  DESCRIPTION:
    319  *
    320  *  This routine unblocks the_thread and cancels any timers
    321  *  which the_thread has active.
    322  */
    323 
    324 STATIC INLINE void _RTEMS_tasks_Cancel_wait(
    325   Thread_Control *the_thread
    326 );
    327 
    328 /*
    329  *  _RTEMS_Tasks_Priority_to_Core
     421 *  _RTEMS_tasks_Priority_to_Core
    330422 *
    331423 *  DESCRIPTION:
     
    334426 */
    335427 
    336 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core(
     428STATIC INLINE Priority_Control _RTEMS_tasks_Priority_to_Core(
    337429  rtems_task_priority   priority
    338430);
    339431
    340 #include <rtems/tasks.inl>
    341 #include <rtems/taskmp.h>
     432/*PAGE
     433 *
     434 *  _RTEMS_tasks_Initialize_user_tasks
     435 *
     436 *  This routine creates and starts all configured user
     437 *  initialzation threads.
     438 *
     439 *  Input parameters: NONE
     440 *
     441 *  Output parameters:  NONE
     442 */
     443 
     444void _RTEMS_tasks_Initialize_user_tasks( void );
     445
     446/*PAGE
     447 *
     448 *  _RTEMS_tasks_Priority_is_valid
     449 *
     450 */
     451 
     452STATIC INLINE boolean _RTEMS_tasks_Priority_is_valid (
     453  rtems_task_priority the_priority
     454);
     455
     456#include <rtems/rtems/tasks.inl>
     457#include <rtems/rtems/taskmp.h>
    342458
    343459#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/timer.h

    r5072b07 r3a4ae6c  
    3434#endif
    3535
    36 #include <rtems.h>
    37 #include <rtems/object.h>
    38 #include <rtems/tod.h>
    39 #include <rtems/watchdog.h>
     36#include <rtems/core/object.h>
     37#include <rtems/core/tod.h>
     38#include <rtems/core/watchdog.h>
    4039
    4140/*
     
    5150
    5251/*
    53  *  The following defines the type of a Timer Service Routine.
    54  */
    55 
    56 typedef rtems_timer_service_routine_entry Timer_Service;
     52 *  The following types define a pointer to a timer service routine.
     53 */
     54 
     55typedef void rtems_timer_service_routine;
     56 
     57typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
     58                 rtems_id,
     59                 void *
     60             );
    5761
    5862/*
     
    154158
    155159rtems_status_code rtems_timer_fire_after(
    156   Objects_Id         id,
    157   rtems_interval  ticks,
    158   Timer_Service      routine,
    159   void              *user_data
     160  Objects_Id                         id,
     161  rtems_interval                     ticks,
     162  rtems_timer_service_routine_entry  routine,
     163  void                              *user_data
    160164);
    161165
     
    171175
    172176rtems_status_code rtems_timer_fire_when(
    173   Objects_Id         id,
    174   rtems_time_of_day       *wall_time,
    175   Timer_Service      routine,
    176   void              *user_data
     177  Objects_Id                          id,
     178  rtems_time_of_day                  *wall_time,
     179  rtems_timer_service_routine_entry   routine,
     180  void                               *user_data
    177181);
    178182
     
    284288);
    285289
    286 #include <rtems/timer.inl>
     290#include <rtems/rtems/timer.inl>
    287291
    288292#ifdef __cplusplus
  • c/src/exec/rtems/include/rtems/rtems/types.h

    r5072b07 r3a4ae6c  
    2121#endif
    2222
    23 #include <rtems/object.h>
    24 #include <rtems/priority.h>
    25 #include <rtems/modes.h>
     23#include <rtems/core/object.h>
     24#include <rtems/core/priority.h>
     25#include <rtems/rtems/modes.h>
     26#include <rtems/core/mpci.h>
     27#include <rtems/core/mppkt.h>
    2628
    2729/*
     
    5254
    5355/*
    54  *  Define the type for an RTEMS API task priority.
     56 *  Time related
    5557 */
    5658
    57 typedef Priority_Control rtems_task_priority;
     59typedef Watchdog_Interval rtems_interval;
     60typedef TOD_Control       rtems_time_of_day;
    5861
    59 #define RTEMS_NO_PRIORITY  RTEMS_CURRENT_PRIORITY
    6062/*
    6163 *  Define the type for an RTEMS API task mode.
     
    6365 
    6466typedef Modes_Control rtems_mode;
     67
     68/*
     69 *  MPCI related entries
     70 */
     71
     72typedef MP_packet_Classes          rtems_mp_packet_classes;
     73typedef MP_packet_Prefix           rtems_packet_prefix;
     74
     75typedef MPCI_initialization_entry  rtems_mpci_initialization_entry;
     76typedef MPCI_get_packet_entry      rtems_mpci_get_packet_entry;
     77typedef MPCI_return_packet_entry   rtems_mpci_return_packet_entry;
     78typedef MPCI_send_entry            rtems_mpci_send_packet_entry;
     79typedef MPCI_receive_entry         rtems_mpci_receive_packet_entry;
     80
     81typedef MPCI_Entry rtems_mpci_entry;
     82
     83typedef MPCI_Control rtems_mpci_table;
    6584
    6685#ifdef __cplusplus
  • c/src/exec/rtems/inline/asr.inl

    r5072b07 r3a4ae6c  
    1818#define __INLINE_ASR_inl
    1919
    20 #include <rtems/isr.h>
     20#include <rtems/core/isr.h>
    2121
    2222/*PAGE
     
    3030)
    3131{
     32  information->is_enabled      = TRUE;
    3233  information->handler         = NULL;
    3334  information->mode_set        = RTEMS_DEFAULT_MODES;
     
    4849{
    4950  rtems_signal_set _signals;
    50   ISR_Level              _level;
     51  ISR_Level        _level;
    5152
    5253  _ISR_Disable( _level );
  • c/src/exec/rtems/inline/attr.inl

    r5072b07 r3a4ae6c  
    109109}
    110110
     111/*PAGE
     112 *
     113 *  _Attributes_Is_priority_ceiling
     114 *
     115 */
     116 
     117STATIC INLINE boolean _Attributes_Is_priority_ceiling(
     118  rtems_attribute attribute_set
     119)
     120{
     121   return ( attribute_set & RTEMS_PRIORITY_CEILING );
     122}
     123
    111124#endif
    112125/* end of include file */
  • c/src/exec/rtems/inline/event.inl

    r5072b07 r3a4ae6c  
    2525{
    2626  _Event_Sync = FALSE;
     27
     28  /*
     29   *  Register the MP Process Packet routine.
     30   */
     31 
     32  _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
    2733}
    2834
  • c/src/exec/rtems/inline/message.inl

    r5072b07 r3a4ae6c  
    1818#define __MESSAGE_QUEUE_inl
    1919
    20 #include <rtems/wkspace.h>
     20#include <rtems/core/wkspace.h>
    2121
    2222/*PAGE
  • c/src/exec/rtems/inline/modes.inl

    r5072b07 r3a4ae6c  
    5454)
    5555{
    56    return ( mode_set & RTEMS_ASR_MASK );
     56   return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
    5757}
    5858
     
    6767)
    6868{
    69    return ( ( mode_set & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT );
     69   return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
    7070}
    7171
     
    8080)
    8181{
    82   return ((mode_set & (RTEMS_TIMESLICE_MASK|RTEMS_PREEMPT_MASK)) ==
    83                   (RTEMS_TIMESLICE|RTEMS_PREEMPT) );
     82  return (mode_set & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE;
    8483}
    8584
  • c/src/exec/rtems/inline/rtems/rtems/asr.inl

    r5072b07 r3a4ae6c  
    1818#define __INLINE_ASR_inl
    1919
    20 #include <rtems/isr.h>
     20#include <rtems/core/isr.h>
    2121
    2222/*PAGE
     
    3030)
    3131{
     32  information->is_enabled      = TRUE;
    3233  information->handler         = NULL;
    3334  information->mode_set        = RTEMS_DEFAULT_MODES;
     
    4849{
    4950  rtems_signal_set _signals;
    50   ISR_Level              _level;
     51  ISR_Level        _level;
    5152
    5253  _ISR_Disable( _level );
  • c/src/exec/rtems/inline/rtems/rtems/attr.inl

    r5072b07 r3a4ae6c  
    109109}
    110110
     111/*PAGE
     112 *
     113 *  _Attributes_Is_priority_ceiling
     114 *
     115 */
     116 
     117STATIC INLINE boolean _Attributes_Is_priority_ceiling(
     118  rtems_attribute attribute_set
     119)
     120{
     121   return ( attribute_set & RTEMS_PRIORITY_CEILING );
     122}
     123
    111124#endif
    112125/* end of include file */
  • c/src/exec/rtems/inline/rtems/rtems/event.inl

    r5072b07 r3a4ae6c  
    2525{
    2626  _Event_Sync = FALSE;
     27
     28  /*
     29   *  Register the MP Process Packet routine.
     30   */
     31 
     32  _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
    2733}
    2834
  • c/src/exec/rtems/inline/rtems/rtems/message.inl

    r5072b07 r3a4ae6c  
    1818#define __MESSAGE_QUEUE_inl
    1919
    20 #include <rtems/wkspace.h>
     20#include <rtems/core/wkspace.h>
    2121
    2222/*PAGE
  • c/src/exec/rtems/inline/rtems/rtems/modes.inl

    r5072b07 r3a4ae6c  
    5454)
    5555{
    56    return ( mode_set & RTEMS_ASR_MASK );
     56   return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
    5757}
    5858
     
    6767)
    6868{
    69    return ( ( mode_set & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT );
     69   return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
    7070}
    7171
     
    8080)
    8181{
    82   return ((mode_set & (RTEMS_TIMESLICE_MASK|RTEMS_PREEMPT_MASK)) ==
    83                   (RTEMS_TIMESLICE|RTEMS_PREEMPT) );
     82  return (mode_set & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE;
    8483}
    8584
  • c/src/exec/rtems/inline/rtems/rtems/status.inl

    r5072b07 r3a4ae6c  
    4545}
    4646
    47 /*
    48  *  _Status_Is_proxy_blocking
    49  *
    50  */
    51 
    52 STATIC INLINE boolean _Status_Is_proxy_blocking (
    53   rtems_status_code code
    54 )
    55 {
    56   return (code == RTEMS_PROXY_BLOCKING);
    57 }
    58 
    5947#endif
    6048/* end of include file */
  • c/src/exec/rtems/inline/rtems/rtems/tasks.inl

    r5072b07 r3a4ae6c  
    1717#ifndef __RTEMS_TASKS_inl
    1818#define __RTEMS_TASKS_inl
    19 
    20 #include <rtems/msgmp.h>
    21 #include <rtems/partmp.h>
    22 #include <rtems/regionmp.h>
    23 #include <rtems/semmp.h>
    2419
    2520/*PAGE
     
    5247/*PAGE
    5348 *
    54  *  _RTEMS_tasks_Cancel_wait
    55  *
    56  */
    57 
    58 STATIC INLINE void _RTEMS_tasks_Cancel_wait(
    59   Thread_Control *the_thread
    60 )
    61 {
    62   States_Control state;
    63   States_Control remote_state;
    64 
    65   state = the_thread->current_state;
    66 
    67 /* XXX do this with the object class */
    68   if ( _States_Is_waiting_on_thread_queue( state ) ) {
    69     if ( _States_Is_waiting_for_rpc_reply( state ) &&
    70           _States_Is_locally_blocked( state ) ) {
    71       remote_state = _States_Clear(
    72                        STATES_WAITING_FOR_RPC_REPLY | STATES_TRANSIENT,
    73                        state
    74                      );
    75 
    76       switch ( remote_state ) {
    77 
    78         case STATES_WAITING_FOR_BUFFER:
    79           _Partition_MP_Send_extract_proxy( the_thread );
    80           break;
    81         case STATES_WAITING_FOR_SEGMENT:
    82           _Region_MP_Send_extract_proxy( the_thread );
    83           break;
    84         case STATES_WAITING_FOR_SEMAPHORE:
    85           _Semaphore_MP_Send_extract_proxy( the_thread );
    86           break;
    87         case STATES_WAITING_FOR_MESSAGE:
    88           _Message_queue_MP_Send_extract_proxy( the_thread );
    89           break;
    90       }
    91     }
    92     _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
    93   }
    94   else if ( _Watchdog_Is_active( &the_thread->Timer ) )
    95     (void) _Watchdog_Remove( &the_thread->Timer );
    96 }
    97 
    98 /*PAGE
    99  *
    100  *  _RTEMS_Tasks_Priority_to_Core
     49 *  _RTEMS_tasks_Priority_to_Core
    10150 */
    10251 
    103 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core(
     52STATIC INLINE Priority_Control _RTEMS_tasks_Priority_to_Core(
    10453  rtems_task_priority   priority
    10554)
     
    10857}
    10958
     59/*PAGE
     60 *
     61 *  _RTEMS_tasks_Priority_is_valid
     62 *
     63 */
     64 
     65STATIC INLINE boolean _RTEMS_tasks_Priority_is_valid (
     66  rtems_task_priority the_priority
     67)
     68{
     69  return (  ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
     70            ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
     71}
     72
    11073#endif
    11174/* end of include file */
  • c/src/exec/rtems/inline/status.inl

    r5072b07 r3a4ae6c  
    4545}
    4646
    47 /*
    48  *  _Status_Is_proxy_blocking
    49  *
    50  */
    51 
    52 STATIC INLINE boolean _Status_Is_proxy_blocking (
    53   rtems_status_code code
    54 )
    55 {
    56   return (code == RTEMS_PROXY_BLOCKING);
    57 }
    58 
    5947#endif
    6048/* end of include file */
  • c/src/exec/rtems/inline/tasks.inl

    r5072b07 r3a4ae6c  
    1717#ifndef __RTEMS_TASKS_inl
    1818#define __RTEMS_TASKS_inl
    19 
    20 #include <rtems/msgmp.h>
    21 #include <rtems/partmp.h>
    22 #include <rtems/regionmp.h>
    23 #include <rtems/semmp.h>
    2419
    2520/*PAGE
     
    5247/*PAGE
    5348 *
    54  *  _RTEMS_tasks_Cancel_wait
    55  *
    56  */
    57 
    58 STATIC INLINE void _RTEMS_tasks_Cancel_wait(
    59   Thread_Control *the_thread
    60 )
    61 {
    62   States_Control state;
    63   States_Control remote_state;
    64 
    65   state = the_thread->current_state;
    66 
    67 /* XXX do this with the object class */
    68   if ( _States_Is_waiting_on_thread_queue( state ) ) {
    69     if ( _States_Is_waiting_for_rpc_reply( state ) &&
    70           _States_Is_locally_blocked( state ) ) {
    71       remote_state = _States_Clear(
    72                        STATES_WAITING_FOR_RPC_REPLY | STATES_TRANSIENT,
    73                        state
    74                      );
    75 
    76       switch ( remote_state ) {
    77 
    78         case STATES_WAITING_FOR_BUFFER:
    79           _Partition_MP_Send_extract_proxy( the_thread );
    80           break;
    81         case STATES_WAITING_FOR_SEGMENT:
    82           _Region_MP_Send_extract_proxy( the_thread );
    83           break;
    84         case STATES_WAITING_FOR_SEMAPHORE:
    85           _Semaphore_MP_Send_extract_proxy( the_thread );
    86           break;
    87         case STATES_WAITING_FOR_MESSAGE:
    88           _Message_queue_MP_Send_extract_proxy( the_thread );
    89           break;
    90       }
    91     }
    92     _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
    93   }
    94   else if ( _Watchdog_Is_active( &the_thread->Timer ) )
    95     (void) _Watchdog_Remove( &the_thread->Timer );
    96 }
    97 
    98 /*PAGE
    99  *
    100  *  _RTEMS_Tasks_Priority_to_Core
     49 *  _RTEMS_tasks_Priority_to_Core
    10150 */
    10251 
    103 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core(
     52STATIC INLINE Priority_Control _RTEMS_tasks_Priority_to_Core(
    10453  rtems_task_priority   priority
    10554)
     
    10857}
    10958
     59/*PAGE
     60 *
     61 *  _RTEMS_tasks_Priority_is_valid
     62 *
     63 */
     64 
     65STATIC INLINE boolean _RTEMS_tasks_Priority_is_valid (
     66  rtems_task_priority the_priority
     67)
     68{
     69  return (  ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
     70            ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
     71}
     72
    11073#endif
    11174/* end of include file */
  • c/src/exec/rtems/macros/asr.inl

    r5072b07 r3a4ae6c  
    1818#define __INLINE_ASR_h
    1919
    20 #include <rtems/isr.h>
     20#include <rtems/core/isr.h>
    2121
    2222/*PAGE
     
    2828#define _ASR_Initialize( _information ) \
    2929{ \
     30  (_information)->is_enabled      = TRUE; \
    3031  (_information)->handler         = NULL; \
    3132  (_information)->mode_set        = RTEMS_DEFAULT_MODES; \
  • c/src/exec/rtems/macros/attr.inl

    r5072b07 r3a4ae6c  
    7979  ( (_attribute_set) & RTEMS_INHERIT_PRIORITY )
    8080
     81/*PAGE
     82 *
     83 *  _Attributes_Is_priority_ceiling
     84 *
     85 */
     86 
     87#define _Attributes_Is_priority_ceiling( _attribute_set ) \
     88  ( (_attribute_set) & RTEMS_PRIORITY_CEILING )
     89
    8190#endif
    8291/* end of include file */
  • c/src/exec/rtems/macros/event.inl

    r5072b07 r3a4ae6c  
    2323
    2424#define _Event_Manager_initialization() \
    25   _Event_Sync = FALSE
     25  do { \
     26    \
     27    _Event_Sync = FALSE; \
     28    \
     29    /* \
     30     *  Register the MP Process Packet routine. \
     31     */ \
     32    \
     33    _MPCI_Register_packet_processor( \
     34      MP_PACKET_EVENT, \
     35      _Event_MP_Process_packet \
     36    ); \
     37  } while ( 0 )
    2638
    2739#endif
  • c/src/exec/rtems/macros/modes.inl

    r5072b07 r3a4ae6c  
    4242
    4343#define _Modes_Is_asr_disabled( _mode_set ) \
    44    ( (_mode_set) & RTEMS_ASR_MASK )
     44   (((_mode_set) & RTEMS_ASR_MASK) == RTEMS_NO_ASR)
    4545
    4646/*PAGE
     
    6060
    6161#define _Modes_Is_timeslice( _mode_set ) \
    62   (((_mode_set) & (RTEMS_TIMESLICE_MASK|RTEMS_PREEMPT_MASK)) == \
    63                   (RTEMS_TIMESLICE|RTEMS_PREEMPT) )
     62  (((_mode_set) & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE)
    6463
    6564/*PAGE
  • c/src/exec/rtems/macros/rtems/rtems/asr.inl

    r5072b07 r3a4ae6c  
    1818#define __INLINE_ASR_h
    1919
    20 #include <rtems/isr.h>
     20#include <rtems/core/isr.h>
    2121
    2222/*PAGE
     
    2828#define _ASR_Initialize( _information ) \
    2929{ \
     30  (_information)->is_enabled      = TRUE; \
    3031  (_information)->handler         = NULL; \
    3132  (_information)->mode_set        = RTEMS_DEFAULT_MODES; \
  • c/src/exec/rtems/macros/rtems/rtems/attr.inl

    r5072b07 r3a4ae6c  
    7979  ( (_attribute_set) & RTEMS_INHERIT_PRIORITY )
    8080
     81/*PAGE
     82 *
     83 *  _Attributes_Is_priority_ceiling
     84 *
     85 */
     86 
     87#define _Attributes_Is_priority_ceiling( _attribute_set ) \
     88  ( (_attribute_set) & RTEMS_PRIORITY_CEILING )
     89
    8190#endif
    8291/* end of include file */
  • c/src/exec/rtems/macros/rtems/rtems/event.inl

    r5072b07 r3a4ae6c  
    2323
    2424#define _Event_Manager_initialization() \
    25   _Event_Sync = FALSE
     25  do { \
     26    \
     27    _Event_Sync = FALSE; \
     28    \
     29    /* \
     30     *  Register the MP Process Packet routine. \
     31     */ \
     32    \
     33    _MPCI_Register_packet_processor( \
     34      MP_PACKET_EVENT, \
     35      _Event_MP_Process_packet \
     36    ); \
     37  } while ( 0 )
    2638
    2739#endif
  • c/src/exec/rtems/macros/rtems/rtems/modes.inl

    r5072b07 r3a4ae6c  
    4242
    4343#define _Modes_Is_asr_disabled( _mode_set ) \
    44    ( (_mode_set) & RTEMS_ASR_MASK )
     44   (((_mode_set) & RTEMS_ASR_MASK) == RTEMS_NO_ASR)
    4545
    4646/*PAGE
     
    6060
    6161#define _Modes_Is_timeslice( _mode_set ) \
    62   (((_mode_set) & (RTEMS_TIMESLICE_MASK|RTEMS_PREEMPT_MASK)) == \
    63                   (RTEMS_TIMESLICE|RTEMS_PREEMPT) )
     62  (((_mode_set) & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE)
    6463
    6564/*PAGE
  • c/src/exec/rtems/macros/rtems/rtems/status.inl

    r5072b07 r3a4ae6c  
    3636   ((_code1) == (_code2))
    3737
    38 /*
    39  *  _Status_Is_proxy_blocking
    40  *
    41  */
    42 
    43 #define _Status_Is_proxy_blocking( _code ) \
    44   ( (_code) == RTEMS_PROXY_BLOCKING )
    45 
    4638#endif
    4739/* end of include file */
  • c/src/exec/rtems/macros/rtems/rtems/tasks.inl

    r5072b07 r3a4ae6c  
    1717#ifndef __RTEMS_TASKS_inl
    1818#define __RTEMS_TASKS_inl
    19 
    20 #include <rtems/msgmp.h>
    21 #include <rtems/partmp.h>
    22 #include <rtems/regionmp.h>
    23 #include <rtems/semmp.h>
    2419
    2520/*PAGE
     
    4338/*PAGE
    4439 *
    45  *  _RTEMS_tasks_Cancel_wait
    46  *
     40 *  _RTEMS_tasks_Priority_to_Core
    4741 */
    48 
    49 #define _RTEMS_tasks_Cancel_wait( _the_thread ) \
    50   { \
    51     States_Control _state; \
    52     States_Control _remote_state; \
    53     \
    54     _state = (_the_thread)->current_state; \
    55     \
    56     if ( _States_Is_waiting_on_thread_queue( _state ) ) { \
    57       if ( _States_Is_waiting_for_rpc_reply( _state ) && \
    58             _States_Is_locally_blocked( _state ) ) { \
    59         _remote_state = _States_Clear( \
    60                        STATES_WAITING_FOR_RPC_REPLY + STATES_TRANSIENT, \
    61                        _state \
    62                      ); \
    63         \
    64         switch ( _remote_state ) { \
    65           \
    66           case STATES_WAITING_FOR_BUFFER: \
    67             _Partition_MP_Send_extract_proxy( (_the_thread) ); \
    68             break; \
    69           case STATES_WAITING_FOR_SEGMENT: \
    70             _Region_MP_Send_extract_proxy( (_the_thread) ); \
    71             break; \
    72           case STATES_WAITING_FOR_SEMAPHORE: \
    73             _Semaphore_MP_Send_extract_proxy( (_the_thread) ); \
    74             break; \
    75           case STATES_WAITING_FOR_MESSAGE: \
    76             _Message_queue_MP_Send_extract_proxy( (_the_thread) ); \
    77             break; \
    78         } \
    79       } \
    80       _Thread_queue_Extract( (_the_thread)->Wait.queue, (_the_thread) ); \
    81     } \
    82     else if ( _Watchdog_Is_active( &(_the_thread)->Timer ) ) \
    83       (void) _Watchdog_Remove( &(_the_thread)->Timer ); \
    84   }
     42 
     43#define _RTEMS_tasks_Priority_to_Core( _priority ) \
     44  ((Priority_Control) (_priority))
    8545
    8646/*PAGE
    8747 *
    88  *  _RTEMS_Tasks_Priority_to_Core
     48 *  _RTEMS_tasks_Priority_is_valid
     49 *
    8950 */
    9051 
    91 #define _RTEMS_Tasks_Priority_to_Core( _priority ) \
    92   ((Priority_Control) (_priority))
     52#define _RTEMS_tasks_Priority_is_valid( _the_priority ) \
     53  ( ((_the_priority) >= RTEMS_MINIMUM_PRIORITY) && \
     54    ((_the_priority) <= RTEMS_MAXIMUM_PRIORITY) )
     55 
    9356
    9457#endif
  • c/src/exec/rtems/macros/status.inl

    r5072b07 r3a4ae6c  
    3636   ((_code1) == (_code2))
    3737
    38 /*
    39  *  _Status_Is_proxy_blocking
    40  *
    41  */
    42 
    43 #define _Status_Is_proxy_blocking( _code ) \
    44   ( (_code) == RTEMS_PROXY_BLOCKING )
    45 
    4638#endif
    4739/* end of include file */
  • c/src/exec/rtems/macros/tasks.inl

    r5072b07 r3a4ae6c  
    1717#ifndef __RTEMS_TASKS_inl
    1818#define __RTEMS_TASKS_inl
    19 
    20 #include <rtems/msgmp.h>
    21 #include <rtems/partmp.h>
    22 #include <rtems/regionmp.h>
    23 #include <rtems/semmp.h>
    2419
    2520/*PAGE
     
    4338/*PAGE
    4439 *
    45  *  _RTEMS_tasks_Cancel_wait
    46  *
     40 *  _RTEMS_tasks_Priority_to_Core
    4741 */
    48 
    49 #define _RTEMS_tasks_Cancel_wait( _the_thread ) \
    50   { \
    51     States_Control _state; \
    52     States_Control _remote_state; \
    53     \
    54     _state = (_the_thread)->current_state; \
    55     \
    56     if ( _States_Is_waiting_on_thread_queue( _state ) ) { \
    57       if ( _States_Is_waiting_for_rpc_reply( _state ) && \
    58             _States_Is_locally_blocked( _state ) ) { \
    59         _remote_state = _States_Clear( \
    60                        STATES_WAITING_FOR_RPC_REPLY + STATES_TRANSIENT, \
    61                        _state \
    62                      ); \
    63         \
    64         switch ( _remote_state ) { \
    65           \
    66           case STATES_WAITING_FOR_BUFFER: \
    67             _Partition_MP_Send_extract_proxy( (_the_thread) ); \
    68             break; \
    69           case STATES_WAITING_FOR_SEGMENT: \
    70             _Region_MP_Send_extract_proxy( (_the_thread) ); \
    71             break; \
    72           case STATES_WAITING_FOR_SEMAPHORE: \
    73             _Semaphore_MP_Send_extract_proxy( (_the_thread) ); \
    74             break; \
    75           case STATES_WAITING_FOR_MESSAGE: \
    76             _Message_queue_MP_Send_extract_proxy( (_the_thread) ); \
    77             break; \
    78         } \
    79       } \
    80       _Thread_queue_Extract( (_the_thread)->Wait.queue, (_the_thread) ); \
    81     } \
    82     else if ( _Watchdog_Is_active( &(_the_thread)->Timer ) ) \
    83       (void) _Watchdog_Remove( &(_the_thread)->Timer ); \
    84   }
     42 
     43#define _RTEMS_tasks_Priority_to_Core( _priority ) \
     44  ((Priority_Control) (_priority))
    8545
    8646/*PAGE
    8747 *
    88  *  _RTEMS_Tasks_Priority_to_Core
     48 *  _RTEMS_tasks_Priority_is_valid
     49 *
    8950 */
    9051 
    91 #define _RTEMS_Tasks_Priority_to_Core( _priority ) \
    92   ((Priority_Control) (_priority))
     52#define _RTEMS_tasks_Priority_is_valid( _the_priority ) \
     53  ( ((_the_priority) >= RTEMS_MINIMUM_PRIORITY) && \
     54    ((_the_priority) <= RTEMS_MAXIMUM_PRIORITY) )
     55 
    9356
    9457#endif
  • c/src/exec/rtems/optman/no-dpmem.c

    r5072b07 r3a4ae6c  
    1414
    1515#include <rtems/system.h>
    16 #include <rtems/address.h>
    17 #include <rtems/dpmem.h>
    18 #include <rtems/object.h>
    19 #include <rtems/thread.h>
     16#include <rtems/core/address.h>
     17#include <rtems/core/object.h>
     18#include <rtems/core/thread.h>
     19
     20#include <rtems/rtems/status.h>
     21#include <rtems/rtems/types.h>
     22#include <rtems/rtems/dpmem.h>
    2023
    2124void _Dual_ported_memory_Manager_initialization(
     
    3336)
    3437{
    35   return( RTEMS_NOT_CONFIGURED );
     38  return RTEMS_NOT_CONFIGURED;
    3639}
    3740
     
    4144)
    4245{
    43   return( RTEMS_NOT_CONFIGURED );
     46  return RTEMS_NOT_CONFIGURED;
    4447}
    4548
     
    4851)
    4952{
    50   return( RTEMS_NOT_CONFIGURED );
     53  return RTEMS_NOT_CONFIGURED;
    5154}
    5255
     
    5760)
    5861{
    59   return( RTEMS_NOT_CONFIGURED );
     62  return RTEMS_NOT_CONFIGURED;
    6063}
    6164
     
    6669)
    6770{
    68   return( RTEMS_NOT_CONFIGURED );
     71  return RTEMS_NOT_CONFIGURED;
    6972}
  • c/src/exec/rtems/optman/no-event.c

    r5072b07 r3a4ae6c  
    1414
    1515#include <rtems/system.h>
    16 #include <rtems/event.h>
    17 #include <rtems/isr.h>
    18 #include <rtems/object.h>
    19 #include <rtems/options.h>
    20 #include <rtems/states.h>
    21 #include <rtems/thread.h>
     16#include <rtems/rtems/status.h>
     17#include <rtems/rtems/event.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/core/object.h>
     20#include <rtems/rtems/options.h>
     21#include <rtems/core/states.h>
     22#include <rtems/core/thread.h>
    2223
    2324rtems_status_code rtems_event_send(
     
    2627)
    2728{
    28   return( RTEMS_NOT_CONFIGURED );
     29  return RTEMS_NOT_CONFIGURED;
    2930}
    3031
     
    3637)
    3738{
    38   return( RTEMS_NOT_CONFIGURED );
     39  return RTEMS_NOT_CONFIGURED;
    3940}
    4041
  • c/src/exec/rtems/optman/no-mp.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/config.h>
    18 #include <rtems/cpu.h>
    19 #include <rtems/event.h>
    20 #include <rtems/fatal.h>
    21 #include <rtems/intthrd.h>
    22 #include <rtems/message.h>
    23 #include <rtems/mp.h>
    24 #include <rtems/mpci.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/part.h>
    27 #include <rtems/sem.h>
    28 #include <rtems/signal.h>
    29 #include <rtems/states.h>
    30 #include <rtems/tasks.h>
    31 #include <rtems/thread.h>
    32 #include <rtems/threadq.h>
    33 #include <rtems/watchdog.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/mp.h>
     19#include <rtems/core/cpu.h>
     20#include <rtems/core/interr.h>
     21#include <rtems/core/mpci.h>
     22#include <rtems/core/mppkt.h>
     23#include <rtems/core/states.h>
     24#include <rtems/core/thread.h>
     25#include <rtems/core/threadq.h>
     26#include <rtems/core/tqdata.h>
     27#include <rtems/core/watchdog.h>
     28#include <rtems/sysstate.h>
    3429
    3530void _Multiprocessing_Manager_initialization ( void )
     
    4136}
    4237
    43 Thread _Multiprocessing_Receive_server (
    44   Thread_Argument ignored
     38void _MPCI_Handler_initialization(
     39  MPCI_Control            *users_mpci_table
    4540)
    46 {
    47 }
    48 
    49 void _MPCI_Handler_initialization ( void )
    5041{
    5142}
     
    5546}
    5647
    57 rtems_packet_prefix *_MPCI_Get_packet ( void )
     48void _MPCI_Register_packet_processor(
     49  Objects_Classes        the_class,
     50  MPCI_Packet_processor  the_packet_processor
     51 
     52)
     53{
     54}
     55 
     56MP_packet_Prefix *_MPCI_Get_packet ( void )
    5857{
    5958  return NULL;
     
    6160
    6261void _MPCI_Return_packet (
    63   rtems_packet_prefix   *the_packet
     62  MP_packet_Prefix   *the_packet
    6463)
    6564{
     
    6867void _MPCI_Send_process_packet (
    6968  unsigned32          destination,
    70   rtems_packet_prefix   *the_packet
     69  MP_packet_Prefix   *the_packet
    7170)
    7271{
    7372}
    7473
    75 rtems_status_code _MPCI_Send_request_packet (
     74unsigned32 _MPCI_Send_request_packet (
    7675  unsigned32          destination,
    77   rtems_packet_prefix   *the_packet,
     76  MP_packet_Prefix   *the_packet,
    7877  States_Control      extra_state
    7978)
    8079{
    81   return( RTEMS_NOT_CONFIGURED );
     80  return 0;
    8281}
    8382
    8483void _MPCI_Send_response_packet (
    8584  unsigned32          destination,
    86   rtems_packet_prefix   *the_packet
     85  MP_packet_Prefix   *the_packet
    8786)
    8887{
    8988}
    9089
    91 rtems_packet_prefix  *_MPCI_Receive_packet ( void )
     90MP_packet_Prefix  *_MPCI_Receive_packet ( void )
    9291{
    9392  return NULL;
     
    9594
    9695Thread_Control *_MPCI_Process_response (
    97   rtems_packet_prefix  *the_packet
     96  MP_packet_Prefix  *the_packet
    9897)
    9998{
    10099  return NULL;
    101100}
     101
     102void _MPCI_Receive_server( void )
     103{
     104}
     105
     106void _MPCI_Announce ( void )
     107{
     108}
     109
     110/* end of file */
  • c/src/exec/rtems/optman/no-msg.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/attr.h>
    18 #include <rtems/chain.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/attr.h>
     19#include <rtems/core/chain.h>
    1920#include <rtems/config.h>
    20 #include <rtems/isr.h>
    21 #include <rtems/message.h>
    22 #include <rtems/object.h>
    23 #include <rtems/options.h>
    24 #include <rtems/states.h>
    25 #include <rtems/thread.h>
    26 #include <rtems/wkspace.h>
     21#include <rtems/core/isr.h>
     22#include <rtems/rtems/message.h>
     23#include <rtems/core/object.h>
     24#include <rtems/rtems/options.h>
     25#include <rtems/core/states.h>
     26#include <rtems/core/thread.h>
     27#include <rtems/core/wkspace.h>
    2728
    2829void _Message_queue_Manager_initialization(
     
    4041)
    4142{
    42   return( RTEMS_NOT_CONFIGURED );
     43  return RTEMS_NOT_CONFIGURED;
    4344}
    4445
     
    4950)
    5051{
    51   return( RTEMS_NOT_CONFIGURED );
     52  return RTEMS_NOT_CONFIGURED;
    5253}
    5354
     
    5657)
    5758{
    58   return( RTEMS_NOT_CONFIGURED );
     59  return RTEMS_NOT_CONFIGURED;
    5960}
    6061
     
    6566)
    6667{
    67   return( RTEMS_NOT_CONFIGURED );
     68  return RTEMS_NOT_CONFIGURED;
    6869}
    6970
     
    7475)
    7576{
    76   return( RTEMS_NOT_CONFIGURED );
     77  return RTEMS_NOT_CONFIGURED;
    7778}
    7879
     
    8485)
    8586{
    86   return( RTEMS_NOT_CONFIGURED );
     87  return RTEMS_NOT_CONFIGURED;
    8788}
    8889
     
    9596)
    9697{
    97   return( RTEMS_NOT_CONFIGURED );
     98  return RTEMS_NOT_CONFIGURED;
    9899}
    99100
     
    103104)
    104105{
    105   return( RTEMS_NOT_CONFIGURED );
     106  return RTEMS_NOT_CONFIGURED;
    106107}
    107108
     
    131132)
    132133{
    133   return( RTEMS_NOT_CONFIGURED );
     134  return RTEMS_NOT_CONFIGURED;
    134135}
  • c/src/exec/rtems/optman/no-part.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/address.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/core/address.h>
    1819#include <rtems/config.h>
    19 #include <rtems/object.h>
    20 #include <rtems/part.h>
    21 #include <rtems/thread.h>
     20#include <rtems/core/object.h>
     21#include <rtems/rtems/part.h>
     22#include <rtems/core/thread.h>
    2223
    2324void _Partition_Manager_initialization(
     
    3637)
    3738{
    38   return( RTEMS_NOT_CONFIGURED );
     39  return RTEMS_NOT_CONFIGURED;
    3940}
    4041
     
    4546)
    4647{
    47   return( RTEMS_NOT_CONFIGURED );
     48  return RTEMS_NOT_CONFIGURED;
    4849}
    4950
     
    5253)
    5354{
    54   return( RTEMS_NOT_CONFIGURED );
     55  return RTEMS_NOT_CONFIGURED;
    5556}
    5657
     
    6061)
    6162{
    62   return( RTEMS_NOT_CONFIGURED );
     63  return RTEMS_NOT_CONFIGURED;
    6364}
    6465
     
    6869)
    6970{
    70   return( RTEMS_NOT_CONFIGURED );
     71  return RTEMS_NOT_CONFIGURED;
    7172}
  • c/src/exec/rtems/optman/no-region.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
     17#include <rtems/rtems/status.h>
    1718#include <rtems/config.h>
    18 #include <rtems/object.h>
    19 #include <rtems/options.h>
    20 #include <rtems/region.h>
    21 #include <rtems/states.h>
    22 #include <rtems/thread.h>
     19#include <rtems/core/object.h>
     20#include <rtems/rtems/options.h>
     21#include <rtems/rtems/region.h>
     22#include <rtems/core/states.h>
     23#include <rtems/core/thread.h>
    2324
    2425void _Region_Manager_initialization(
     
    3738)
    3839{
    39   return( RTEMS_NOT_CONFIGURED );
     40  return RTEMS_NOT_CONFIGURED;
    4041}
    4142
     
    4546)
    4647{
    47   return( RTEMS_NOT_CONFIGURED );
     48  return RTEMS_NOT_CONFIGURED;
    4849}
    4950
     
    5253)
    5354{
    54   return( RTEMS_NOT_CONFIGURED );
     55  return RTEMS_NOT_CONFIGURED;
    5556}
    5657
     
    6364)
    6465{
    65   return( RTEMS_NOT_CONFIGURED );
     66  return RTEMS_NOT_CONFIGURED;
    6667}
    6768
     
    7273)
    7374{
    74   return( RTEMS_NOT_CONFIGURED );
     75  return RTEMS_NOT_CONFIGURED;
    7576}
    7677
     
    8081)
    8182{
    82   return( RTEMS_NOT_CONFIGURED );
     83  return RTEMS_NOT_CONFIGURED;
    8384}
  • c/src/exec/rtems/optman/no-rtmon.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/isr.h>
    18 #include <rtems/object.h>
    19 #include <rtems/ratemon.h>
    20 #include <rtems/thread.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/core/object.h>
     20#include <rtems/core/thread.h>
     21
     22#include <rtems/rtems/types.h>
     23#include <rtems/rtems/ratemon.h>
    2124
    2225void _Rate_monotonic_Manager_initialization(
     
    3134)
    3235{
    33   return( RTEMS_NOT_CONFIGURED );
     36  return RTEMS_NOT_CONFIGURED;
    3437}
    3538
     
    3942)
    4043{
    41   return( RTEMS_NOT_CONFIGURED );
     44  return RTEMS_NOT_CONFIGURED;
    4245}
    4346
     
    4649)
    4750{
    48   return( RTEMS_NOT_CONFIGURED );
     51  return RTEMS_NOT_CONFIGURED;
    4952}
    5053
     
    5356)
    5457{
    55   return( RTEMS_NOT_CONFIGURED );
     58  return RTEMS_NOT_CONFIGURED;
    5659}
    5760
     
    6164)
    6265{
    63   return( RTEMS_NOT_CONFIGURED );
     66  return RTEMS_NOT_CONFIGURED;
    6467}
    6568
  • c/src/exec/rtems/optman/no-sem.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/attr.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/attr.h>
    1819#include <rtems/config.h>
    19 #include <rtems/isr.h>
    20 #include <rtems/object.h>
    21 #include <rtems/options.h>
    22 #include <rtems/sem.h>
    23 #include <rtems/states.h>
    24 #include <rtems/thread.h>
    25 #include <rtems/threadq.h>
     20#include <rtems/core/isr.h>
     21#include <rtems/core/object.h>
     22#include <rtems/rtems/options.h>
     23#include <rtems/rtems/sem.h>
     24#include <rtems/core/states.h>
     25#include <rtems/core/thread.h>
     26#include <rtems/core/threadq.h>
    2627
    2728void _Semaphore_Manager_initialization(
     
    3940)
    4041{
    41   return( RTEMS_NOT_CONFIGURED );
     42  return RTEMS_NOT_CONFIGURED;
    4243}
    4344
     
    4849)
    4950{
    50   return( RTEMS_NOT_CONFIGURED );
     51  return RTEMS_NOT_CONFIGURED;
    5152}
    5253
     
    5556)
    5657{
    57   return( RTEMS_NOT_CONFIGURED );
     58  return RTEMS_NOT_CONFIGURED;
    5859}
    5960
     
    6465)
    6566{
    66   return( RTEMS_NOT_CONFIGURED );
     67  return RTEMS_NOT_CONFIGURED;
    6768}
    6869
     
    7172)
    7273{
    73   return( RTEMS_NOT_CONFIGURED );
     74  return RTEMS_NOT_CONFIGURED;
    7475}
    7576
  • c/src/exec/rtems/optman/no-signal.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/asr.h>
    18 #include <rtems/isr.h>
    19 #include <rtems/modes.h>
    20 #include <rtems/signal.h>
    21 #include <rtems/thread.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/core/thread.h>
    2220
     21#include <rtems/rtems/asr.h>
     22#include <rtems/rtems/modes.h>
     23#include <rtems/rtems/signal.h>
     24
     25void _Signal_Manager_initialization( void )
     26{
     27}
     28 
    2329rtems_status_code rtems_signal_catch(
    2430  rtems_asr_entry   handler,
     
    2632)
    2733{
    28   return( RTEMS_NOT_CONFIGURED );
     34  return RTEMS_NOT_CONFIGURED;
    2935}
    3036
     
    3440)
    3541{
    36   return( RTEMS_NOT_CONFIGURED );
     42  return RTEMS_NOT_CONFIGURED;
    3743}
     44
     45/* end of file */
  • c/src/exec/rtems/optman/no-timer.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/object.h>
    18 #include <rtems/thread.h>
    19 #include <rtems/timer.h>
    20 #include <rtems/tod.h>
    21 #include <rtems/watchdog.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/core/object.h>
     19#include <rtems/core/thread.h>
     20#include <rtems/core/tod.h>
     21#include <rtems/core/watchdog.h>
     22
     23#include <rtems/rtems/types.h>
     24#include <rtems/rtems/timer.h>
    2225
    2326void _Timer_Manager_initialization(
     
    3235)
    3336{
    34   return( RTEMS_NOT_CONFIGURED );
     37  return RTEMS_NOT_CONFIGURED;
    3538}
    3639
     
    4043)
    4144{
    42   return( RTEMS_NOT_CONFIGURED );
     45  return RTEMS_NOT_CONFIGURED;
    4346}
    4447
     
    4750)
    4851{
    49   return( RTEMS_NOT_CONFIGURED );
     52  return RTEMS_NOT_CONFIGURED;
    5053}
    5154
     
    5457)
    5558{
    56   return( RTEMS_NOT_CONFIGURED );
     59  return RTEMS_NOT_CONFIGURED;
    5760}
    5861
    5962rtems_status_code rtems_timer_fire_after(
    60   Objects_Id         id,
    61   rtems_interval  ticks,
    62   Timer_Service      routine,
    63   void              *user_data
     63  Objects_Id                         id,
     64  rtems_interval                     ticks,
     65  rtems_timer_service_routine_entry  routine,
     66  void                              *user_data
    6467)
    6568{
    66   return( RTEMS_NOT_CONFIGURED );
     69  return RTEMS_NOT_CONFIGURED;
    6770}
    6871
    6972rtems_status_code rtems_timer_fire_when(
    70   Objects_Id          id,
    71   rtems_time_of_day        *wall_time,
    72   Timer_Service       routine,
    73   void               *user_data
     73  Objects_Id                         id,
     74  rtems_time_of_day                 *wall_time,
     75  rtems_timer_service_routine_entry  routine,
     76  void                              *user_data
    7477)
    7578{
    76   return( RTEMS_NOT_CONFIGURED );
     79  return RTEMS_NOT_CONFIGURED;
    7780}
    7881
     
    8184)
    8285{
    83   return( RTEMS_NOT_CONFIGURED );
     86  return RTEMS_NOT_CONFIGURED;
    8487}
  • c/src/exec/rtems/src/clock.c

    r5072b07 r3a4ae6c  
    1414
    1515#include <rtems/system.h>
    16 #include <rtems/clock.h>
    17 #include <rtems/config.h>
    18 #include <rtems/isr.h>
    19 #include <rtems/thread.h>
    20 #include <rtems/tod.h>
    21 #include <rtems/watchdog.h>
     16#include <rtems/rtems/status.h>
     17#include <rtems/rtems/clock.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/core/thread.h>
     20#include <rtems/core/tod.h>
     21#include <rtems/core/watchdog.h>
    2222
    2323/*PAGE
     
    5050    case RTEMS_CLOCK_GET_TOD:
    5151      if ( !_TOD_Is_set() )
    52         return( RTEMS_NOT_DEFINED );
     52        return RTEMS_NOT_DEFINED;
    5353
    5454      *(rtems_time_of_day *)time_buffer = _TOD_Current;
    55       return( RTEMS_SUCCESSFUL );
     55      return RTEMS_SUCCESSFUL;
    5656
    5757    case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
    5858      if ( !_TOD_Is_set() )
    59         return( RTEMS_NOT_DEFINED );
     59        return RTEMS_NOT_DEFINED;
    6060
    6161      *(rtems_interval *)time_buffer = _TOD_Seconds_since_epoch;
    62       return( RTEMS_SUCCESSFUL );
     62      return RTEMS_SUCCESSFUL;
    6363
    6464    case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT:
    6565      *(rtems_interval *)time_buffer = _TOD_Ticks_since_boot;
    66       return( RTEMS_SUCCESSFUL );
     66      return RTEMS_SUCCESSFUL;
    6767
    6868    case RTEMS_CLOCK_GET_TICKS_PER_SECOND:
    6969      *(rtems_interval *)time_buffer = _TOD_Ticks_per_second;
    70       return( RTEMS_SUCCESSFUL );
     70      return RTEMS_SUCCESSFUL;
    7171
    7272    case RTEMS_CLOCK_GET_TIME_VALUE:
    7373      if ( !_TOD_Is_set() )
    74         return( RTEMS_NOT_DEFINED );
     74        return RTEMS_NOT_DEFINED;
    7575
    7676      _ISR_Disable( level );
     
    8080      _ISR_Enable( level );
    8181
    82       tmp *= _Configuration_Table->microseconds_per_tick;
     82      tmp *= _TOD_Microseconds_per_tick;
    8383      ((rtems_clock_time_value *)time_buffer)->microseconds = tmp;
    8484
    85       return( RTEMS_SUCCESSFUL );
     85      return RTEMS_SUCCESSFUL;
    8686  }
    8787
    88   return( RTEMS_SUCCESSFUL );   /* should never get here */
     88  return RTEMS_INTERNAL_ERROR;   /* should never get here */
    8989
    9090}
     
    108108)
    109109{
    110   rtems_status_code      local_result;
    111   rtems_interval seconds;
     110  rtems_interval     seconds;
    112111
    113   local_result = _TOD_Validate( time_buffer );
    114   if ( rtems_is_status_successful( local_result ) ) {
     112  if ( _TOD_Validate( time_buffer ) ) {
    115113    seconds = _TOD_To_seconds( time_buffer );
    116114    _Thread_Disable_dispatch();
    117115      _TOD_Set( time_buffer, seconds );
    118116    _Thread_Enable_dispatch();
    119 
     117    return RTEMS_SUCCESSFUL;
    120118  }
    121   return( local_result );
     119  return RTEMS_INVALID_CLOCK;
    122120}
    123121
     
    150148    _Thread_Dispatch();
    151149
    152   return( RTEMS_SUCCESSFUL );
     150  return RTEMS_SUCCESSFUL;
    153151}
  • c/src/exec/rtems/src/dpmem.c

    r5072b07 r3a4ae6c  
    1414
    1515#include <rtems/system.h>
    16 #include <rtems/support.h>
    17 #include <rtems/address.h>
    18 #include <rtems/dpmem.h>
    19 #include <rtems/object.h>
    20 #include <rtems/thread.h>
     16#include <rtems/rtems/status.h>
     17#include <rtems/rtems/support.h>
     18#include <rtems/core/address.h>
     19#include <rtems/rtems/dpmem.h>
     20#include <rtems/core/object.h>
     21#include <rtems/core/thread.h>
     22#include <rtems/rtems/dpmem.h>
    2123
    2224/*PAGE
     
    7981
    8082  if ( !rtems_is_name_valid( name) )
    81     return ( RTEMS_INVALID_NAME );
     83    return RTEMS_INVALID_NAME;
    8284
    8385  if ( !_Addresses_Is_aligned( internal_start ) ||
    8486       !_Addresses_Is_aligned( external_start ) )
    85     return( RTEMS_INVALID_ADDRESS );
     87    return RTEMS_INVALID_ADDRESS;
    8688
    8789  _Thread_Disable_dispatch();             /* to prevent deletion */
     
    9193  if ( !the_port ) {
    9294    _Thread_Enable_dispatch();
    93     return( RTEMS_TOO_MANY );
     95    return RTEMS_TOO_MANY;
    9496  }
    9597
     
    106108  *id = the_port->Object.id;
    107109  _Thread_Enable_dispatch();
    108   return( RTEMS_SUCCESSFUL );
     110  return RTEMS_SUCCESSFUL;
    109111}
    110112
     
    131133)
    132134{
    133   return(
    134     _Objects_Name_to_id(
    135       &_Dual_ported_memory_Information,
    136       &name,
    137       RTEMS_SEARCH_ALL_NODES,
    138       id
    139     )
     135  Objects_Name_to_id_errors  status;
     136
     137  status = _Objects_Name_to_id(
     138    &_Dual_ported_memory_Information,
     139    &name,
     140    OBJECTS_SEARCH_ALL_NODES,
     141    id
    140142  );
     143
     144  return _Status_Object_name_errors_to_status[ status ];
    141145}
    142146
     
    166170  switch ( location ) {
    167171    case OBJECTS_ERROR:
    168       return( RTEMS_INVALID_ID );
     172      return RTEMS_INVALID_ID;
    169173    case OBJECTS_REMOTE:        /* this error cannot be returned */
    170       return( RTEMS_INTERNAL_ERROR );
     174      return RTEMS_INTERNAL_ERROR;
    171175    case OBJECTS_LOCAL:
    172176      _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
    173177      _Dual_ported_memory_Free( the_port );
    174178      _Thread_Enable_dispatch();
    175       return( RTEMS_SUCCESSFUL );
    176   }
    177 
    178   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     179      return RTEMS_SUCCESSFUL;
     180  }
     181
     182  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    179183}
    180184
     
    211215  switch ( location ) {
    212216    case OBJECTS_ERROR:
    213       return( RTEMS_INVALID_ID );
     217      return RTEMS_INVALID_ID;
    214218    case OBJECTS_REMOTE:        /* this error cannot be returned */
    215       return( RTEMS_INTERNAL_ERROR );
     219      return RTEMS_INTERNAL_ERROR;
    216220    case OBJECTS_LOCAL:
    217221      ending = _Addresses_Subtract( internal, the_port->internal_base );
     
    222226                                           ending );
    223227      _Thread_Enable_dispatch();
    224       return( RTEMS_SUCCESSFUL );
    225   }
    226 
    227   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     228      return RTEMS_SUCCESSFUL;
     229  }
     230
     231  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    228232}
    229233
     
    260264  switch ( location ) {
    261265    case OBJECTS_ERROR:
    262       return( RTEMS_INVALID_ID );
     266      return RTEMS_INVALID_ID;
    263267    case OBJECTS_REMOTE:        /* this error cannot be returned */
    264       return( RTEMS_INTERNAL_ERROR );
     268      return RTEMS_INTERNAL_ERROR;
    265269    case OBJECTS_LOCAL:
    266270      ending = _Addresses_Subtract( external, the_port->external_base );
     
    271275                                           ending );
    272276      _Thread_Enable_dispatch();
    273       return( RTEMS_SUCCESSFUL );
    274   }
    275 
    276   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
    277 }
     277      return RTEMS_SUCCESSFUL;
     278  }
     279
     280  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
     281}
  • c/src/exec/rtems/src/event.c

    r5072b07 r3a4ae6c  
    1414
    1515#include <rtems/system.h>
    16 #include <rtems/event.h>
    17 #include <rtems/isr.h>
    18 #include <rtems/object.h>
    19 #include <rtems/options.h>
    20 #include <rtems/states.h>
    21 #include <rtems/thread.h>
     16#include <rtems/rtems/status.h>
     17#include <rtems/rtems/event.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/core/object.h>
     20#include <rtems/rtems/options.h>
     21#include <rtems/core/states.h>
     22#include <rtems/core/thread.h>
     23#include <rtems/rtems/tasks.h>
    2224
    2325/*PAGE
     
    4345  register Thread_Control *the_thread;
    4446  Objects_Locations        location;
     47  RTEMS_API_Control       *api;
    4548
    4649  the_thread = _Thread_Get( id, &location );
    4750  switch ( location ) {
    4851    case OBJECTS_ERROR:
    49       return( RTEMS_INVALID_ID );
     52      return RTEMS_INVALID_ID;
    5053    case OBJECTS_REMOTE:
    5154      return(
     
    5760      );
    5861    case OBJECTS_LOCAL:
    59       _Event_sets_Post( event_in, &the_thread->RTEMS_API->pending_events );
     62      api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
     63      _Event_sets_Post( event_in, &api->pending_events );
    6064      _Event_Surrender( the_thread );
    6165      _Thread_Enable_dispatch();
    62       return( RTEMS_SUCCESSFUL );
     66      return RTEMS_SUCCESSFUL;
    6367  }
    6468
    65   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     69  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    6670}
    6771
     
    9195)
    9296{
     97  RTEMS_API_Control       *api;
     98
     99  api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
     100
    93101  if ( _Event_sets_Is_empty( event_in ) ) {
    94     *event_out = _Thread_Executing->RTEMS_API->pending_events;
    95     return( RTEMS_SUCCESSFUL );
     102    *event_out = api->pending_events;
     103    return RTEMS_SUCCESSFUL;
    96104  }
    97105
    98106  _Thread_Disable_dispatch();
    99   _Event_Seize( event_in, option_set, ticks );
     107  _Event_Seize( event_in, option_set, ticks, event_out );
    100108  _Thread_Enable_dispatch();
    101   *event_out = _Thread_Executing->RTEMS_API->events_out;
    102109  return( _Thread_Executing->Wait.return_code );
    103110}
  • c/src/exec/rtems/src/eventmp.c

    r5072b07 r3a4ae6c  
    1414
    1515#include <rtems/system.h>
    16 #include <rtems/event.h>
    17 #include <rtems/mpci.h>
    18 #include <rtems/mppkt.h>
    19 #include <rtems/object.h>
    20 #include <rtems/options.h>
    21 #include <rtems/states.h>
    22 #include <rtems/thread.h>
     16#include <rtems/rtems/status.h>
     17#include <rtems/rtems/event.h>
     18#include <rtems/core/mpci.h>
     19#include <rtems/core/mppkt.h>
     20#include <rtems/core/object.h>
     21#include <rtems/rtems/options.h>
     22#include <rtems/core/states.h>
     23#include <rtems/core/thread.h>
     24#include <rtems/rtems/support.h>
    2325
    2426/*PAGE
     
    5052
    5153      the_packet                    = _Event_MP_Get_packet();
    52       the_packet->Prefix.the_class  = RTEMS_MP_PACKET_EVENT;
     54      the_packet->Prefix.the_class  = MP_PACKET_EVENT;
    5355      the_packet->Prefix.length     = sizeof ( Event_MP_Packet );
    5456      the_packet->Prefix.to_convert = sizeof ( Event_MP_Packet );
  • c/src/exec/rtems/src/intr.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/isr.h>
    18 #include <rtems/stack.h>
    19 #include <rtems/intr.h>
    20 #include <rtems/wkspace.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/core/isr.h>
     19#include <rtems/rtems/intr.h>
    2120
    2221/*  _Interrupt_Manager_initialization
     
    3130void _Interrupt_Manager_initialization( void )
    3231{
    33 #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
    34 
    35   if ( _CPU_Table.interrupt_stack_size < RTEMS_MINIMUM_STACK_SIZE )
    36     rtems_fatal_error_occurred( RTEMS_INVALID_SIZE );
    37 
    38   _CPU_Interrupt_stack_low =
    39     _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size );
    40 
    41   _CPU_Interrupt_stack_high = _Addresses_Add_offset(
    42     _CPU_Interrupt_stack_low,
    43     _CPU_Table.interrupt_stack_size
    44   );
    45 
    46 #endif
    47 
    48 #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
    49   _CPU_Install_interrupt_stack();
    50 #endif
    51 
    5232}
    5333
     
    7454{
    7555  if ( !_ISR_Is_vector_number_valid( vector ) )
    76     return( RTEMS_INVALID_NUMBER );
     56    return RTEMS_INVALID_NUMBER;
    7757
    7858  if ( !_ISR_Is_valid_user_handler( new_isr_handler ) )
    79     return( RTEMS_INVALID_ADDRESS );
     59    return RTEMS_INVALID_ADDRESS;
    8060
    8161  _ISR_Install_vector(
    8262    vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
    8363
    84   return( RTEMS_SUCCESSFUL );
     64  return RTEMS_SUCCESSFUL;
    8565}
  • c/src/exec/rtems/src/mp.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/config.h>
    18 #include <rtems/cpu.h>
    19 #include <rtems/event.h>
    20 #include <rtems/fatal.h>
    21 #include <rtems/intthrd.h>
    22 #include <rtems/message.h>
    23 #include <rtems/mp.h>
    24 #include <rtems/mpci.h>
    25 #include <rtems/mppkt.h>
    26 #include <rtems/part.h>
    27 #include <rtems/sem.h>
    28 #include <rtems/signal.h>
    29 #include <rtems/states.h>
    30 #include <rtems/tasks.h>
    31 #include <rtems/thread.h>
    32 #include <rtems/threadq.h>
    33 #include <rtems/watchdog.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/mp.h>
     19#include <rtems/core/mpci.h>
    3420
    3521/*PAGE
     
    4127void _Multiprocessing_Manager_initialization ( void )
    4228{
    43   if ( _Configuration_MP_table->node < 1 ||
    44        _Configuration_MP_table->node > _Configuration_MP_table->maximum_nodes )
    45      rtems_fatal_error_occurred( RTEMS_INVALID_NODE );
    46 
    47   _Internal_threads_Set_MP_receive_server( _Multiprocessing_Receive_server );
    4829}
    4930
     
    5637void rtems_multiprocessing_announce ( void )
    5738{
    58   _Thread_Disable_dispatch();
    59   _Event_sets_Post(
    60     RTEMS_EVENT_0,
    61     &_Internal_threads_System_initialization_thread->RTEMS_API->pending_events
    62   );
    63   _Event_Surrender( _Internal_threads_System_initialization_thread );
    64   _Thread_Enable_dispatch();
    65 }
    66 
    67 /*PAGE
    68  *
    69  *  _Multiprocessing_Receive_server
    70  *
    71  */
    72 
    73 typedef void (*packet_processor)( rtems_packet_prefix * );
    74 
    75 packet_processor _Multiprocessor_Packet_processors[] = {
    76   _Internal_threads_MP_Process_packet, /* RTEMS_MP_PACKET_INTERNAL_THREADS */
    77   _RTEMS_tasks_MP_Process_packet,      /* RTEMS_MP_PACKET_TASKS */
    78   _Message_queue_MP_Process_packet,    /* RTEMS_MP_PACKET_MESSAGE_QUEUE */
    79   _Semaphore_MP_Process_packet,        /* RTEMS_MP_PACKET_SEMAPHORE */
    80   _Partition_MP_Process_packet,        /* RTEMS_MP_PACKET_PARTITION */
    81   0,                                   /* RTEMS_MP_PACKET_REGION */
    82   _Event_MP_Process_packet,            /* RTEMS_MP_PACKET_EVENT */
    83   _Signal_MP_Process_packet            /* RTEMS_MP_PACKET_SIGNAL */
    84 };
    85 
    86 Thread _Multiprocessing_Receive_server (
    87   Thread_Argument ignored
    88 )
    89 {
    90 
    91   rtems_packet_prefix *the_packet;
    92   packet_processor     the_function;
    93 
    94   for ( ; ; ) {
    95 
    96     _Thread_Disable_dispatch();
    97     _Event_Seize( RTEMS_EVENT_0, RTEMS_DEFAULT_OPTIONS, RTEMS_NO_TIMEOUT );
    98     _Thread_Enable_dispatch();
    99 
    100     for ( ; ; ) {
    101       the_packet = _MPCI_Receive_packet();
    102 
    103       if ( !the_packet )
    104         break;
    105 
    106       _Thread_Executing->receive_packet = the_packet;
    107 
    108       if ( !_Mp_packet_Is_valid_packet_class ( the_packet->the_class ) )
    109         break;
    110 
    111       the_function = _Multiprocessor_Packet_processors[ the_packet->the_class ];
    112    
    113       if ( !the_function )
    114         break;
    115 
    116       (*the_function)( the_packet );
    117     }
    118   }
     39  _MPCI_Announce();
    11940}
    12041
  • c/src/exec/rtems/src/msg.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/attr.h>
    18 #include <rtems/chain.h>
    19 #include <rtems/config.h>
    20 #include <rtems/isr.h>
    21 #include <rtems/message.h>
    22 #include <rtems/object.h>
    23 #include <rtems/options.h>
    24 #include <rtems/states.h>
    25 #include <rtems/support.h>
    26 #include <rtems/thread.h>
    27 #include <rtems/wkspace.h>
    28 #include <rtems/mpci.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/attr.h>
     19#include <rtems/core/chain.h>
     20#include <rtems/core/isr.h>
     21#include <rtems/rtems/message.h>
     22#include <rtems/core/object.h>
     23#include <rtems/rtems/options.h>
     24#include <rtems/core/states.h>
     25#include <rtems/rtems/support.h>
     26#include <rtems/core/thread.h>
     27#include <rtems/core/wkspace.h>
     28#include <rtems/core/mpci.h>
     29#include <rtems/sysstate.h>
    2930
    3031/*PAGE
     
    5556    FALSE
    5657  );
     58
     59  /*
     60   *  Register the MP Process Packet routine.
     61   */
     62
     63  _MPCI_Register_packet_processor(
     64    MP_PACKET_MESSAGE_QUEUE,
     65    _Message_queue_MP_Process_packet
     66  );
     67
    5768}
    5869
     
    7384    unsigned32 allocated_message_size;
    7485
    75     mq = \
     86    mq =
    7687      (Message_queue_Control *)_Objects_Allocate(&_Message_queue_Information);
    7788
     
    145156
    146157  if ( !rtems_is_name_valid( name ) )
    147     return ( RTEMS_INVALID_NAME );
    148 
    149   if ( _Attributes_Is_global( attribute_set ) &&
    150        !_Configuration_Is_multiprocessing() )
    151     return( RTEMS_MP_NOT_CONFIGURED );
     158    return RTEMS_INVALID_NAME;
     159
     160  if ( _Attributes_Is_global( attribute_set ) && 
     161       !_System_state_Is_multiprocessing )
     162    return RTEMS_MP_NOT_CONFIGURED;
    152163
    153164  if (count == 0)
     
    165176 
    166177  if ( _Attributes_Is_global( attribute_set ) &&
    167        _Configuration_MPCI_table &&
    168        (_Configuration_MPCI_table->maximum_packet_size < max_message_size))
     178       (_MPCI_table->maximum_packet_size < max_message_size))
    169179  {
    170180      return RTEMS_INVALID_SIZE;
     
    178188  if ( !the_message_queue ) {
    179189    _Thread_Enable_dispatch();
    180     return( RTEMS_TOO_MANY );
     190    return RTEMS_TOO_MANY;
    181191  }
    182192
     
    202212       THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
    203213    STATES_WAITING_FOR_MESSAGE,
    204     _Message_queue_MP_Send_extract_proxy
     214    _Message_queue_MP_Send_extract_proxy,
     215    RTEMS_TIMEOUT
    205216  );
    206217
     
    222233
    223234  _Thread_Enable_dispatch();
    224   return( RTEMS_SUCCESSFUL );
     235  return RTEMS_SUCCESSFUL;
    225236}
    226237
     
    249260)
    250261{
    251   return _Objects_Name_to_id(
     262  Objects_Name_to_id_errors  status;
     263
     264  status = _Objects_Name_to_id(
    252265    &_Message_queue_Information,
    253266    &name,
     
    255268    id
    256269  );
     270
     271  return _Status_Object_name_errors_to_status[ status ];
    257272}
    258273
     
    282297  switch ( location ) {
    283298    case OBJECTS_ERROR:
    284       return( RTEMS_INVALID_ID );
     299      return RTEMS_INVALID_ID;
    285300    case OBJECTS_REMOTE:
    286301      _Thread_Dispatch();
    287       return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
     302      return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
    288303    case OBJECTS_LOCAL:
    289304      _Objects_Close( &_Message_queue_Information,
     
    295310        _Thread_queue_Flush(
    296311          &the_message_queue->Wait_queue,
    297           _Message_queue_MP_Send_object_was_deleted
     312          _Message_queue_MP_Send_object_was_deleted,
     313          RTEMS_OBJECT_WAS_DELETED
    298314        );
    299315
     
    315331
    316332      _Thread_Enable_dispatch();
    317       return( RTEMS_SUCCESSFUL );
    318   }
    319 
    320   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     333      return RTEMS_SUCCESSFUL;
     334  }
     335
     336  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    321337}
    322338
     
    404420  switch ( location ) {
    405421    case OBJECTS_ERROR:
    406       return( RTEMS_INVALID_ID );
     422      return RTEMS_INVALID_ID;
    407423    case OBJECTS_REMOTE:
    408424      _Thread_Executing->Wait.return_argument = count;
     
    437453                                   constrained_size);
    438454
    439         *waitp->Extra.message_size_p = constrained_size;
     455        *(rtems_unsigned32 *)the_thread->Wait.return_argument_1 = size;
    440456       
    441457        if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
     
    451467      _Thread_Enable_dispatch();
    452468      *count = number_broadcasted;
    453       return( RTEMS_SUCCESSFUL );
     469      return RTEMS_SUCCESSFUL;
    454470    }
    455471
     
    492508
    493509    case OBJECTS_ERROR:
    494       return( RTEMS_INVALID_ID );
     510      return RTEMS_INVALID_ID;
    495511
    496512    case OBJECTS_REMOTE:
    497       _Thread_Executing->Wait.return_argument = buffer;
    498      
    499513      return _Message_queue_MP_Send_request_packet(
    500514          MESSAGE_QUEUE_MP_RECEIVE_REQUEST,
     
    518532  }
    519533
    520   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     534  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    521535}
    522536
     
    550564  switch ( location ) {
    551565    case OBJECTS_ERROR:
    552       return( RTEMS_INVALID_ID );
     566      return RTEMS_INVALID_ID;
    553567    case OBJECTS_REMOTE:
    554568      _Thread_Executing->Wait.return_argument = count;
     
    570584        *count = 0;
    571585      _Thread_Enable_dispatch();
    572       return( RTEMS_SUCCESSFUL );
    573   }
    574 
    575   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     586      return RTEMS_SUCCESSFUL;
     587  }
     588
     589  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    576590}
    577591
     
    634648  executing->Wait.queue              = &the_message_queue->Wait_queue;
    635649  executing->Wait.id                 = the_message_queue->Object.id;
    636   executing->Wait.option_set         = option_set;
    637   executing->Wait.return_argument    = (unsigned32 *)buffer;
    638   executing->Wait.Extra.message_size_p = size_p;
     650  executing->Wait.option             = option_set;
     651  executing->Wait.return_argument    = (void *)buffer;
     652  executing->Wait.return_argument_1  = (void *)size_p;
    639653  _ISR_Enable( level );
    640654  return FALSE;
     
    725739  {
    726740    case OBJECTS_ERROR:
    727       return( RTEMS_INVALID_ID );
     741      return RTEMS_INVALID_ID;
    728742
    729743    case OBJECTS_REMOTE:
     
    771785          size
    772786        );
    773         *the_thread->Wait.Extra.message_size_p = size;
     787        *(rtems_unsigned32 *)the_thread->Wait.return_argument_1 = size;
    774788       
    775789        if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
     
    784798        }
    785799        _Thread_Enable_dispatch();
    786         return( RTEMS_SUCCESSFUL );
     800        return RTEMS_SUCCESSFUL;
    787801      }
    788802
     
    795809           the_message_queue->maximum_pending_messages ) {
    796810        _Thread_Enable_dispatch();
    797         return( RTEMS_TOO_MANY );
     811        return RTEMS_TOO_MANY;
    798812      }
    799813
     
    801815      if ( the_message == 0) {
    802816        _Thread_Enable_dispatch();
    803         return( RTEMS_UNSATISFIED );
     817        return RTEMS_UNSATISFIED;
    804818      }
    805819
     
    819833
    820834      _Thread_Enable_dispatch();
    821       return( RTEMS_SUCCESSFUL );
     835      return RTEMS_SUCCESSFUL;
    822836         
    823837    default:
  • c/src/exec/rtems/src/msgmp.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/message.h>
    18 #include <rtems/mpci.h>
    19 #include <rtems/msgmp.h>
    20 #include <rtems/object.h>
    21 #include <rtems/options.h>
    22 #include <rtems/thread.h>
    23 #include <rtems/watchdog.h>
    24 #include <rtems/config.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/message.h>
     19#include <rtems/core/mpci.h>
     20#include <rtems/rtems/msgmp.h>
     21#include <rtems/core/object.h>
     22#include <rtems/rtems/options.h>
     23#include <rtems/core/thread.h>
     24#include <rtems/core/watchdog.h>
     25#include <rtems/rtems/support.h>
    2526
    2627/*PAGE
     
    4748
    4849      the_packet                    = _Message_queue_MP_Get_packet();
    49       the_packet->Prefix.the_class  = RTEMS_MP_PACKET_MESSAGE_QUEUE;
     50      the_packet->Prefix.the_class  = MP_PACKET_MESSAGE_QUEUE;
    5051      the_packet->Prefix.length     = sizeof ( Message_queue_MP_Packet );
    5152      the_packet->Prefix.to_convert = sizeof ( Message_queue_MP_Packet );
     
    103104
    104105      the_packet                    = _Message_queue_MP_Get_packet();
    105       the_packet->Prefix.the_class  = RTEMS_MP_PACKET_MESSAGE_QUEUE;
     106      the_packet->Prefix.the_class  = MP_PACKET_MESSAGE_QUEUE;
    106107      the_packet->Prefix.length     = sizeof(Message_queue_MP_Packet);
    107108      if ( size_p )
    108       the_packet->Prefix.length     += *size_p;
     109        the_packet->Prefix.length     += *size_p;
    109110      the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
    110111
     
    115116       */
    116117
    117       if (the_packet->Prefix.length >
    118           _Configuration_MPCI_table->maximum_packet_size)
    119       {
     118      if (the_packet->Prefix.length > _MPCI_table->maximum_packet_size) {
    120119          _Thread_Enable_dispatch();
    121120          return RTEMS_INVALID_SIZE;
     
    133132       */
    134133     
    135       if (buffer)
    136       {
     134      if (buffer) {
    137135          the_packet->Buffer.size = *size_p;
    138136          _Message_queue_Copy_buffer(buffer,
     
    149147
    150148      the_packet                    = _Message_queue_MP_Get_packet();
    151       the_packet->Prefix.the_class  = RTEMS_MP_PACKET_MESSAGE_QUEUE;
     149      the_packet->Prefix.the_class  = MP_PACKET_MESSAGE_QUEUE;
    152150      the_packet->Prefix.length     = sizeof(Message_queue_MP_Packet);
    153151      the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
     
    161159      the_packet->size       = 0;        /* just in case of an error */
    162160
    163       _Thread_Executing->Wait.return_argument      = (unsigned32 *)buffer;
    164       _Thread_Executing->Wait.Extra.message_size_p = size_p;
     161      _Thread_Executing->Wait.return_argument   = (unsigned32 *)buffer;
     162      _Thread_Executing->Wait.return_argument_1 = size_p;
    165163     
    166164      return _MPCI_Send_request_packet(rtems_get_node(message_queue_id),
     
    297295      );
    298296
    299       if ( ! _Status_Is_proxy_blocking( the_packet->Prefix.return_code ) )
     297      if ( ! _Thread_Is_proxy_blocking( the_packet->Prefix.return_code ) )
    300298        _Message_queue_MP_Send_response_packet(
    301299          MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
     
    310308
    311309      if (the_packet->Prefix.return_code == RTEMS_SUCCESSFUL) {
    312         *the_thread->Wait.Extra.message_size_p = the_packet->size;
     310        *(rtems_unsigned32 *)the_thread->Wait.return_argument_1 =
     311           the_packet->size;
    313312
    314313        _Message_queue_Copy_buffer(
  • c/src/exec/rtems/src/part.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/support.h>
    18 #include <rtems/address.h>
    19 #include <rtems/config.h>
    20 #include <rtems/object.h>
    21 #include <rtems/part.h>
    22 #include <rtems/thread.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/support.h>
     19#include <rtems/core/address.h>
     20#include <rtems/core/object.h>
     21#include <rtems/rtems/part.h>
     22#include <rtems/core/thread.h>
     23#include <rtems/sysstate.h>
    2324
    2425/*PAGE
     
    5051  );
    5152
     53  /*
     54   *  Register the MP Process Packet routine.
     55   */
     56
     57  _MPCI_Register_packet_processor(
     58    MP_PACKET_PARTITION,
     59    _Partition_MP_Process_packet
     60  );
     61
    5262}
    5363
     
    8595
    8696  if ( !rtems_is_name_valid( name ) )
    87     return ( RTEMS_INVALID_NAME );
     97    return RTEMS_INVALID_NAME;
    8898
    8999  if ( length == 0 || buffer_size == 0 || length < buffer_size ||
    90100         !_Partition_Is_buffer_size_aligned( buffer_size ) )
    91     return ( RTEMS_INVALID_SIZE );
     101    return RTEMS_INVALID_SIZE;
    92102
    93103  if ( !_Addresses_Is_aligned( starting_address ) )
    94      return( RTEMS_INVALID_ADDRESS );
    95 
    96   if ( _Attributes_Is_global( attribute_set ) &&
    97        !_Configuration_Is_multiprocessing() )
    98     return( RTEMS_MP_NOT_CONFIGURED );
     104     return RTEMS_INVALID_ADDRESS;
     105
     106  if ( _Attributes_Is_global( attribute_set ) && 
     107       !_System_state_Is_multiprocessing )
     108    return RTEMS_MP_NOT_CONFIGURED;
    99109
    100110  _Thread_Disable_dispatch();               /* prevents deletion */
     
    104114  if ( !the_partition ) {
    105115    _Thread_Enable_dispatch();
    106     return( RTEMS_TOO_MANY );
     116    return RTEMS_TOO_MANY;
    107117  }
    108118
     
    112122    _Partition_Free( the_partition );
    113123    _Thread_Enable_dispatch();
    114     return( RTEMS_TOO_MANY );
     124    return RTEMS_TOO_MANY;
    115125  }
    116126  the_partition->starting_address      = starting_address;
     
    135145
    136146  _Thread_Enable_dispatch();
    137   return( RTEMS_SUCCESSFUL );
     147  return RTEMS_SUCCESSFUL;
    138148}
    139149
     
    162172)
    163173{
    164   return _Objects_Name_to_id( &_Partition_Information, &name, node, id );
     174  Objects_Name_to_id_errors  status;
     175
     176  status = _Objects_Name_to_id( &_Partition_Information, &name, node, id );
     177
     178  return _Status_Object_name_errors_to_status[ status ];
    165179}
    166180
     
    191205  switch ( location ) {
    192206    case OBJECTS_ERROR:
    193       return( RTEMS_INVALID_ID );
     207      return RTEMS_INVALID_ID;
    194208    case OBJECTS_REMOTE:
    195209      _Thread_Dispatch();
    196       return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
     210      return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
    197211    case OBJECTS_LOCAL:
    198212      if ( the_partition->number_of_used_blocks == 0 ) {
     
    215229
    216230        _Thread_Enable_dispatch();
    217         return( RTEMS_SUCCESSFUL );
     231        return RTEMS_SUCCESSFUL;
    218232      }
    219233      _Thread_Enable_dispatch();
    220       return( RTEMS_RESOURCE_IN_USE );
    221   }
    222 
    223   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     234      return RTEMS_RESOURCE_IN_USE;
     235  }
     236
     237  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    224238}
    225239
     
    252266  switch ( location ) {
    253267    case OBJECTS_ERROR:
    254       return( RTEMS_INVALID_ID );
     268      return RTEMS_INVALID_ID;
    255269    case OBJECTS_REMOTE:
    256270      _Thread_Executing->Wait.return_argument = buffer;
     
    268282        _Thread_Enable_dispatch();
    269283        *buffer = the_buffer;
    270         return( RTEMS_SUCCESSFUL );
     284        return RTEMS_SUCCESSFUL;
    271285      }
    272286      _Thread_Enable_dispatch();
    273       return( RTEMS_UNSATISFIED );
    274   }
    275 
    276   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     287      return RTEMS_UNSATISFIED;
     288  }
     289
     290  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    277291}
    278292
     
    304318  switch ( location ) {
    305319    case OBJECTS_ERROR:
    306       return( RTEMS_INVALID_ID );
     320      return RTEMS_INVALID_ID;
    307321    case OBJECTS_REMOTE:
    308322      return(
     
    318332        the_partition->number_of_used_blocks -= 1;
    319333        _Thread_Enable_dispatch();
    320         return( RTEMS_SUCCESSFUL );
     334        return RTEMS_SUCCESSFUL;
    321335      }
    322336      _Thread_Enable_dispatch();
    323       return( RTEMS_INVALID_ADDRESS );
    324   }
    325 
    326   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
    327 }
     337      return RTEMS_INVALID_ADDRESS;
     338  }
     339
     340  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
     341}
  • c/src/exec/rtems/src/partmp.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/mpci.h>
    18 #include <rtems/mppkt.h>
    19 #include <rtems/object.h>
    20 #include <rtems/options.h>
    21 #include <rtems/part.h>
    22 #include <rtems/thread.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/core/mpci.h>
     19#include <rtems/core/mppkt.h>
     20#include <rtems/core/object.h>
     21#include <rtems/rtems/options.h>
     22#include <rtems/rtems/part.h>
     23#include <rtems/core/thread.h>
     24#include <rtems/rtems/support.h>
    2325
    2426/*PAGE
     
    4547
    4648      the_packet                    = _Partition_MP_Get_packet();
    47       the_packet->Prefix.the_class  = RTEMS_MP_PACKET_PARTITION;
     49      the_packet->Prefix.the_class  = MP_PACKET_PARTITION;
    4850      the_packet->Prefix.length     = sizeof ( Partition_MP_Packet );
    4951      the_packet->Prefix.to_convert = sizeof ( Partition_MP_Packet );
     
    8991
    9092      the_packet                    = _Partition_MP_Get_packet();
    91       the_packet->Prefix.the_class  = RTEMS_MP_PACKET_PARTITION;
     93      the_packet->Prefix.the_class  = MP_PACKET_PARTITION;
    9294      the_packet->Prefix.length     = sizeof ( Partition_MP_Packet );
    9395      the_packet->Prefix.to_convert = sizeof ( Partition_MP_Packet );
  • c/src/exec/rtems/src/ratemon.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/support.h>
    18 #include <rtems/isr.h>
    19 #include <rtems/object.h>
    20 #include <rtems/ratemon.h>
    21 #include <rtems/thread.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/support.h>
     19#include <rtems/core/isr.h>
     20#include <rtems/core/object.h>
     21#include <rtems/rtems/ratemon.h>
     22#include <rtems/core/thread.h>
    2223
    2324/*PAGE
     
    7879
    7980  if ( !rtems_is_name_valid( name ) )
    80     return( RTEMS_INVALID_NAME );
     81    return RTEMS_INVALID_NAME;
    8182
    8283  _Thread_Disable_dispatch();            /* to prevent deletion */
     
    8687  if ( !the_period ) {
    8788    _Thread_Enable_dispatch();
    88     return( RTEMS_TOO_MANY );
     89    return RTEMS_TOO_MANY;
    8990  }
    9091
     
    9697  *id = the_period->Object.id;
    9798  _Thread_Enable_dispatch();
    98   return( RTEMS_SUCCESSFUL );
     99  return RTEMS_SUCCESSFUL;
    99100}
    100101
     
    121122)
    122123{
    123   return _Objects_Name_to_id(
     124  Objects_Name_to_id_errors  status;
     125
     126  status = _Objects_Name_to_id(
    124127    &_Rate_monotonic_Information,
    125128    &name,
    126     RTEMS_SEARCH_LOCAL_NODE,
     129    OBJECTS_SEARCH_LOCAL_NODE,
    127130    id
    128131  );
     132
     133  return _Status_Object_name_errors_to_status[ status ];
    129134}
    130135
     
    153158  switch ( location ) {
    154159    case OBJECTS_ERROR:
    155       return( RTEMS_INVALID_ID );
    156     case OBJECTS_REMOTE:            /* should never return this */
    157       return( RTEMS_INTERNAL_ERROR );
     160      return RTEMS_INVALID_ID;
     161    case OBJECTS_REMOTE:           
     162      return RTEMS_INTERNAL_ERROR;  /* should never return this */
    158163    case OBJECTS_LOCAL:
    159164      if ( !_Thread_Is_executing( the_period->owner ) ) {
    160165        _Thread_Enable_dispatch();
    161         return( RTEMS_NOT_OWNER_OF_RESOURCE );
     166        return RTEMS_NOT_OWNER_OF_RESOURCE;
    162167      }
    163168      (void) _Watchdog_Remove( &the_period->Timer );
    164169      the_period->state = RATE_MONOTONIC_INACTIVE;
    165170      _Thread_Enable_dispatch();
    166       return( RTEMS_SUCCESSFUL );
    167   }
    168 
    169   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     171      return RTEMS_SUCCESSFUL;
     172  }
     173
     174  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    170175}
    171176
     
    194199  switch ( location ) {
    195200    case OBJECTS_ERROR:
    196       return( RTEMS_INVALID_ID );
     201      return RTEMS_INVALID_ID;
    197202    case OBJECTS_REMOTE:            /* should never return this */
    198       return( RTEMS_INTERNAL_ERROR );
     203      return RTEMS_INTERNAL_ERROR;
    199204    case OBJECTS_LOCAL:
    200205      _Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
     
    203208      _Rate_monotonic_Free( the_period );
    204209      _Thread_Enable_dispatch();
    205       return( RTEMS_SUCCESSFUL );
    206   }
    207 
    208   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     210      return RTEMS_SUCCESSFUL;
     211  }
     212
     213  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    209214}
    210215
     
    226231rtems_status_code rtems_rate_monotonic_period(
    227232  Objects_Id        id,
    228   rtems_interval length
     233  rtems_interval    length
    229234)
    230235{
    231236  Rate_monotonic_Control *the_period;
    232237  Objects_Locations       location;
    233   rtems_status_code            return_value;
     238  rtems_status_code       return_value;
    234239
    235240  the_period = _Rate_monotonic_Get( id, &location );
    236241  switch ( location ) {
    237242    case OBJECTS_ERROR:
    238       return( RTEMS_INVALID_ID );
     243      return RTEMS_INVALID_ID;
    239244    case OBJECTS_REMOTE:            /* should never return this */
    240       return( RTEMS_INTERNAL_ERROR );
     245      return RTEMS_INTERNAL_ERROR;
    241246    case OBJECTS_LOCAL:
    242247      if ( !_Thread_Is_executing( the_period->owner ) ) {
    243248        _Thread_Enable_dispatch();
    244         return( RTEMS_NOT_OWNER_OF_RESOURCE );
     249        return RTEMS_NOT_OWNER_OF_RESOURCE;
    245250      }
    246251
     
    276281                     &the_period->Timer, length, WATCHDOG_ACTIVATE_NOW );
    277282          _Thread_Enable_dispatch();
    278           return( RTEMS_SUCCESSFUL );
     283          return RTEMS_SUCCESSFUL;
    279284
    280285        case RATE_MONOTONIC_ACTIVE:
     
    283288          if ( _Rate_monotonic_Set_state( the_period ) ) {
    284289            _Thread_Enable_dispatch();
    285             return( RTEMS_SUCCESSFUL );
     290            return RTEMS_SUCCESSFUL;
    286291          }
    287292         /* has expired -- fall into next case */
     
    291296                     &the_period->Timer, length, WATCHDOG_ACTIVATE_NOW );
    292297          _Thread_Enable_dispatch();
    293           return( RTEMS_TIMEOUT );
     298          return RTEMS_TIMEOUT;
    294299      }
    295300  }
    296301
    297   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     302  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    298303}
    299304
  • c/src/exec/rtems/src/region.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/support.h>
    18 #include <rtems/config.h>
    19 #include <rtems/object.h>
    20 #include <rtems/options.h>
    21 #include <rtems/region.h>
    22 #include <rtems/states.h>
    23 #include <rtems/thread.h>
     17#include <rtems/rtems/status.h>
     18#include <rtems/rtems/support.h>
     19#include <rtems/core/object.h>
     20#include <rtems/rtems/options.h>
     21#include <rtems/rtems/region.h>
     22#include <rtems/core/states.h>
     23#include <rtems/core/thread.h>
    2424
    2525/*PAGE
     
    4949    FALSE
    5050  );
     51
     52  /*
     53   *  Register the MP Process Packet routine.
     54   */
     55
     56  _MPCI_Register_packet_processor(
     57    MP_PACKET_REGION,
     58    0  /* XXX _Region_MP_Process_packet */
     59  );
     60
    5161}
    5262
     
    8494
    8595  if ( !rtems_is_name_valid( name ) )
    86     return ( RTEMS_INVALID_NAME );
     96    return RTEMS_INVALID_NAME;
    8797
    8898  if ( !_Addresses_Is_aligned( starting_address ) )
    89     return( RTEMS_INVALID_ADDRESS );
     99    return RTEMS_INVALID_ADDRESS;
    90100
    91101  _Thread_Disable_dispatch();             /* to prevent deletion */
     
    95105  if ( !the_region ) {
    96106    _Thread_Enable_dispatch();
    97     return( RTEMS_TOO_MANY );
     107    return RTEMS_TOO_MANY;
    98108  }
    99109
     
    104114    _Region_Free( the_region );
    105115    _Thread_Enable_dispatch();
    106     return( RTEMS_INVALID_SIZE );
     116    return RTEMS_INVALID_SIZE;
    107117  }
    108118
     
    119129       THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
    120130    STATES_WAITING_FOR_SEGMENT,
    121     _Region_MP_Send_extract_proxy
     131    _Region_MP_Send_extract_proxy,
     132    RTEMS_TIMEOUT
    122133  );
    123134
     
    126137  *id = the_region->Object.id;
    127138  _Thread_Enable_dispatch();
    128   return( RTEMS_SUCCESSFUL );
     139  return RTEMS_SUCCESSFUL;
    129140}
    130141
     
    151162)
    152163{
    153   return _Objects_Name_to_id(
    154       &_Region_Information,
    155       &name,
    156       RTEMS_SEARCH_LOCAL_NODE,
    157       id
    158     );
     164  Objects_Name_to_id_errors  status;
     165
     166  status = _Objects_Name_to_id(
     167    &_Region_Information,
     168    &name,
     169    OBJECTS_SEARCH_LOCAL_NODE,
     170    id
     171  );
     172
     173  return _Status_Object_name_errors_to_status[ status ];
    159174}
    160175
     
    185200  switch ( location ) {
    186201    case OBJECTS_ERROR:
    187       return( RTEMS_INVALID_ID );
     202      return RTEMS_INVALID_ID;
    188203    case OBJECTS_REMOTE:        /* this error cannot be returned */
    189       return( RTEMS_INTERNAL_ERROR );
     204      return RTEMS_INTERNAL_ERROR;
    190205    case OBJECTS_LOCAL:
    191206      _Region_Debug_Walk( the_region, 5 );
     
    194209        _Region_Free( the_region );
    195210        _Thread_Enable_dispatch();
    196         return( RTEMS_SUCCESSFUL );
     211        return RTEMS_SUCCESSFUL;
    197212      }
    198213      _Thread_Enable_dispatch();
    199       return( RTEMS_RESOURCE_IN_USE );
    200   }
    201 
    202   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     214      return RTEMS_RESOURCE_IN_USE;
     215  }
     216
     217  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    203218}
    204219
     
    237252  switch ( location ) {
    238253    case OBJECTS_ERROR:
    239       return( RTEMS_INVALID_ID );
     254      return RTEMS_INVALID_ID;
    240255    case OBJECTS_REMOTE:        /* this error cannot be returned */
    241       return( RTEMS_INTERNAL_ERROR );
     256      return RTEMS_INTERNAL_ERROR;
    242257    case OBJECTS_LOCAL:
    243258
     
    265280  }
    266281
    267   return( RTEMS_INTERNAL_ERROR );
     282  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    268283}
    269284
     
    290305