Changeset 3be0c9a in rtems


Ignore:
Timestamp:
Nov 22, 2012, 1:51:25 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
32b2c83
Parents:
67a9159e
git-author:
Sebastian Huber <sebastian.huber@…> (11/22/12 13:51:25)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/22/12 15:35:07)
Message:

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

This file contains the parts of <rtems/score/userext.h> that are only
necessary for the RTEMS implementation.

Files:
1 added
48 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/pthread.c

    r67a9159e r3be0c9a  
    2121#include <rtems/score/stack.h>
    2222#include <rtems/score/thread.h>
    23 #include <rtems/score/userext.h>
     23#include <rtems/score/userextimpl.h>
    2424#include <rtems/score/wkspace.h>
    2525#include <rtems/posix/cancel.h>
  • cpukit/posix/src/pthreadinitthreads.c

    r67a9159e r3be0c9a  
    2121#include <rtems/score/stack.h>
    2222#include <rtems/score/thread.h>
    23 #include <rtems/score/userext.h>
    2423#include <rtems/score/wkspace.h>
    2524#include <rtems/posix/cancel.h>
  • cpukit/rtems/src/taskcreate.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskdelete.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskgetnote.c

    r67a9159e r3be0c9a  
    2727#include <rtems/score/threadq.h>
    2828#include <rtems/score/tod.h>
    29 #include <rtems/score/userext.h>
    3029#include <rtems/score/wkspace.h>
    3130#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskident.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskinitusers.c

    r67a9159e r3be0c9a  
    2828#include <rtems/score/threadq.h>
    2929#include <rtems/score/tod.h>
    30 #include <rtems/score/userext.h>
    3130#include <rtems/score/wkspace.h>
    3231#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskissuspended.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskmode.c

    r67a9159e r3be0c9a  
    2525#include <rtems/score/threadq.h>
    2626#include <rtems/score/tod.h>
    27 #include <rtems/score/userext.h>
    2827#include <rtems/score/wkspace.h>
    2928#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskrestart.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskresume.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/tasks.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
     28#include <rtems/score/userextimpl.h>
    2929#include <rtems/score/wkspace.h>
    3030#include <rtems/score/apiext.h>
  • cpukit/rtems/src/tasksetnote.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/tasksetpriority.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskstart.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/tasksuspend.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/threadq.h>
    2727#include <rtems/score/tod.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskwakeafter.c

    r67a9159e r3be0c9a  
    2727#include <rtems/score/threadq.h>
    2828#include <rtems/score/tod.h>
    29 #include <rtems/score/userext.h>
    3029#include <rtems/score/wkspace.h>
    3130#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskwakewhen.c

    r67a9159e r3be0c9a  
    2727#include <rtems/score/threadq.h>
    2828#include <rtems/score/tod.h>
    29 #include <rtems/score/userext.h>
    3029#include <rtems/score/wkspace.h>
    3130#include <rtems/score/apiext.h>
  • cpukit/sapi/src/exinit.c

    r67a9159e r3be0c9a  
    4444#include <rtems/score/thread.h>
    4545#include <rtems/score/tod.h>
    46 #include <rtems/score/userext.h>
     46#include <rtems/score/userextimpl.h>
    4747#include <rtems/score/watchdog.h>
    4848#include <rtems/score/wkspace.h>
  • cpukit/sapi/src/extensioncreate.c

    r67a9159e r3be0c9a  
    2424#include <rtems/score/object.h>
    2525#include <rtems/score/thread.h>
     26#include <rtems/score/userextimpl.h>
    2627#include <rtems/extension.h>
    2728
  • cpukit/score/Makefile.am

    r67a9159e r3be0c9a  
    5353include_rtems_score_HEADERS += include/rtems/score/tqdata.h
    5454include_rtems_score_HEADERS += include/rtems/score/userext.h
     55include_rtems_score_HEADERS += include/rtems/score/userextimpl.h
    5556include_rtems_score_HEADERS += include/rtems/score/watchdog.h
    5657include_rtems_score_HEADERS += include/rtems/score/wkspace.h
  • cpukit/score/include/rtems/score/userext.h

    r67a9159e r3be0c9a  
    232232}   User_extensions_Control;
    233233
    234 /**
    235  * @brief List of active extensions.
    236  */
    237 extern Chain_Control _User_extensions_List;
    238 
    239 /**
    240  * @brief List of active task switch extensions.
    241  */
    242 extern Chain_Control _User_extensions_Switches_list;
    243 
    244 /**
    245  * @name Extension Maintainance
    246  *
    247  * @{
    248  */
    249 
    250 void _User_extensions_Handler_initialization( void );
    251 
    252 void _User_extensions_Add_set(
    253   User_extensions_Control *extension
    254 );
    255 
    256 RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set(
    257   User_extensions_Control *extension
    258 )
    259 {
    260   _User_extensions_Add_set( extension );
    261 }
    262 
    263 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
    264   User_extensions_Control     *extension,
    265   const User_extensions_Table *extension_table
    266 )
    267 {
    268   extension->Callouts = *extension_table;
    269 
    270   _User_extensions_Add_set( extension );
    271 }
    272 
    273 void _User_extensions_Remove_set(
    274   User_extensions_Control *extension
    275 );
    276 
    277 /**
    278  * @brief User extension visitor.
    279  *
    280  * @param[in, out] executing The currently executing thread.
    281  * @param[in, out] arg The argument passed to _User_extensions_Iterate().
    282  * @param[in] callouts The current callouts.
    283  */
    284 typedef void (*User_extensions_Visitor)(
    285   Thread_Control              *executing,
    286   void                        *arg,
    287   const User_extensions_Table *callouts
    288 );
    289 
    290 typedef struct {
    291   Thread_Control *created;
    292   bool            ok;
    293 } User_extensions_Thread_create_context;
    294 
    295 void _User_extensions_Thread_create_visitor(
    296   Thread_Control              *executing,
    297   void                        *arg,
    298   const User_extensions_Table *callouts
    299 );
    300 
    301 void _User_extensions_Thread_delete_visitor(
    302   Thread_Control              *executing,
    303   void                        *arg,
    304   const User_extensions_Table *callouts
    305 );
    306 
    307 void _User_extensions_Thread_start_visitor(
    308   Thread_Control              *executing,
    309   void                        *arg,
    310   const User_extensions_Table *callouts
    311 );
    312 
    313 void _User_extensions_Thread_restart_visitor(
    314   Thread_Control              *executing,
    315   void                        *arg,
    316   const User_extensions_Table *callouts
    317 );
    318 
    319 void _User_extensions_Thread_begin_visitor(
    320   Thread_Control              *executing,
    321   void                        *arg,
    322   const User_extensions_Table *callouts
    323 );
    324 
    325 void _User_extensions_Thread_exitted_visitor(
    326   Thread_Control              *executing,
    327   void                        *arg,
    328   const User_extensions_Table *callouts
    329 );
    330 
    331 typedef struct {
    332   Internal_errors_Source source;
    333   bool                   is_internal;
    334   Internal_errors_t      error;
    335 } User_extensions_Fatal_context;
    336 
    337 void _User_extensions_Fatal_visitor(
    338   Thread_Control              *executing,
    339   void                        *arg,
    340   const User_extensions_Table *callouts
    341 );
    342 
    343 /**
    344  * @brief Iterates through all user extensions and calls the visitor for each.
    345  *
    346  * @param[in, out] arg The argument passed to the visitor.
    347  * @param[in] visitor The visitor for each extension.
    348  */
    349 void _User_extensions_Iterate(
    350   void                    *arg,
    351   User_extensions_Visitor  visitor
    352 );
    353 
    354 /** @} */
    355 
    356 /**
    357  * @name Extension Callout Dispatcher
    358  *
    359  * @{
    360  */
    361 
    362 static inline bool _User_extensions_Thread_create( Thread_Control *created )
    363 {
    364   User_extensions_Thread_create_context ctx = { created, true };
    365 
    366   _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor );
    367 
    368   return ctx.ok;
    369 }
    370 
    371 static inline void _User_extensions_Thread_delete( Thread_Control *deleted )
    372 {
    373   _User_extensions_Iterate(
    374     deleted,
    375     _User_extensions_Thread_delete_visitor
    376   );
    377 }
    378 
    379 static inline void _User_extensions_Thread_start( Thread_Control *started )
    380 {
    381   _User_extensions_Iterate(
    382     started,
    383     _User_extensions_Thread_start_visitor
    384   );
    385 }
    386 
    387 static inline void _User_extensions_Thread_restart( Thread_Control *restarted )
    388 {
    389   _User_extensions_Iterate(
    390     restarted,
    391     _User_extensions_Thread_restart_visitor
    392   );
    393 }
    394 
    395 static inline void _User_extensions_Thread_begin( Thread_Control *executing )
    396 {
    397   _User_extensions_Iterate(
    398     executing,
    399     _User_extensions_Thread_begin_visitor
    400   );
    401 }
    402 
    403 void _User_extensions_Thread_switch(
    404   Thread_Control *executing,
    405   Thread_Control *heir
    406 );
    407 
    408 static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
    409 {
    410   _User_extensions_Iterate(
    411     executing,
    412     _User_extensions_Thread_exitted_visitor
    413   );
    414 }
    415 
    416 static inline void _User_extensions_Fatal(
    417   Internal_errors_Source source,
    418   bool                   is_internal,
    419   Internal_errors_t      error
    420 )
    421 {
    422   User_extensions_Fatal_context ctx = { source, is_internal, error };
    423 
    424   _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
    425 }
    426 
    427 /** @} */
    428 
    429234/** @} */
    430235
  • cpukit/score/preinstall.am

    r67a9159e r3be0c9a  
    192192PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/userext.h
    193193
     194$(PROJECT_INCLUDE)/rtems/score/userextimpl.h: include/rtems/score/userextimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     195        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/userextimpl.h
     196PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/userextimpl.h
     197
    194198$(PROJECT_INCLUDE)/rtems/score/watchdog.h: include/rtems/score/watchdog.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
    195199        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/watchdog.h
  • cpukit/score/src/interr.c

    r67a9159e r3be0c9a  
    1414#endif
    1515
    16 #include <rtems/system.h>
    1716#include <rtems/score/interr.h>
    1817#include <rtems/score/sysstate.h>
    19 #include <rtems/score/userext.h>
     18#include <rtems/score/userextimpl.h>
    2019
    2120System_state_Codes _System_state_Current;
  • cpukit/score/src/thread.c

    r67a9159e r3be0c9a  
    2828#include <rtems/score/thread.h>
    2929#include <rtems/score/threadq.h>
    30 #include <rtems/score/userext.h>
    3130#include <rtems/score/wkspace.h>
    3231#include <rtems/config.h>
  • cpukit/score/src/threadclearstate.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029
  • cpukit/score/src/threadclose.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
     28#include <rtems/score/userextimpl.h>
    2929#include <rtems/score/wkspace.h>
    3030
  • cpukit/score/src/threadcreateidle.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/config.h>
  • cpukit/score/src/threaddelayended.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029
  • cpukit/score/src/threaddispatch.c

    r67a9159e r3be0c9a  
    2525#include <rtems/score/thread.h>
    2626#include <rtems/score/threadq.h>
    27 #include <rtems/score/userext.h>
     27#include <rtems/score/userextimpl.h>
    2828#include <rtems/score/wkspace.h>
    2929
  • cpukit/score/src/threadhandler.c

    r67a9159e r3be0c9a  
    2929#include <rtems/score/thread.h>
    3030#include <rtems/score/threadq.h>
    31 #include <rtems/score/userext.h>
     31#include <rtems/score/userextimpl.h>
    3232#include <rtems/score/wkspace.h>
    3333#if defined(RTEMS_SMP)
  • cpukit/score/src/threadinitialize.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
     28#include <rtems/score/userextimpl.h>
    2929#include <rtems/score/watchdog.h>
    3030#include <rtems/score/wkspace.h>
  • cpukit/score/src/threadloadenv.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029
  • cpukit/score/src/threadready.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029
  • cpukit/score/src/threadreset.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029
  • cpukit/score/src/threadrestart.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
     28#include <rtems/score/userextimpl.h>
    2929#include <rtems/score/wkspace.h>
    3030
  • cpukit/score/src/threadsetstate.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029
  • cpukit/score/src/threadsettransient.c

    r67a9159e r3be0c9a  
    2727#include <rtems/score/thread.h>
    2828#include <rtems/score/threadq.h>
    29 #include <rtems/score/userext.h>
    3029#include <rtems/score/wkspace.h>
    3130
  • cpukit/score/src/threadstackallocate.c

    r67a9159e r3be0c9a  
    2525#include <rtems/score/thread.h>
    2626#include <rtems/score/threadq.h>
    27 #include <rtems/score/userext.h>
    2827#include <rtems/score/wkspace.h>
    2928#include <rtems/config.h>
  • cpukit/score/src/threadstackfree.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/config.h>
  • cpukit/score/src/threadstart.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
     28#include <rtems/score/userextimpl.h>
    2929#include <rtems/score/wkspace.h>
    3030
  • cpukit/score/src/threadstartmultitasking.c

    r67a9159e r3be0c9a  
    2626#include <rtems/score/thread.h>
    2727#include <rtems/score/threadq.h>
    28 #include <rtems/score/userext.h>
    2928#include <rtems/score/wkspace.h>
    3029
  • cpukit/score/src/userext.c

    r67a9159e r3be0c9a  
    2121
    2222#include <rtems/config.h>
    23 #include <rtems/score/userext.h>
     23#include <rtems/score/userextimpl.h>
    2424#include <rtems/score/wkspace.h>
    2525
  • cpukit/score/src/userextaddset.c

    r67a9159e r3be0c9a  
    2020#endif
    2121
    22 #include <rtems/system.h>
    23 #include <rtems/score/userext.h>
     22#include <rtems/score/userextimpl.h>
    2423
    2524void _User_extensions_Add_set(
  • cpukit/score/src/userextiterate.c

    r67a9159e r3be0c9a  
    1818
    1919#include <rtems/config.h>
    20 #include <rtems/score/userext.h>
     20#include <rtems/score/userextimpl.h>
    2121
    2222CHAIN_DEFINE_EMPTY( _User_extensions_List );
  • cpukit/score/src/userextremoveset.c

    r67a9159e r3be0c9a  
    2020#endif
    2121
    22 #include <rtems/system.h>
    23 #include <rtems/score/userext.h>
     22#include <rtems/score/userextimpl.h>
    2423
    2524void _User_extensions_Remove_set (
  • cpukit/score/src/userextthreadswitch.c

    r67a9159e r3be0c9a  
    2020#endif
    2121
    22 #include <rtems/system.h>
    23 #include <rtems/score/userext.h>
     22#include <rtems/score/userextimpl.h>
    2423
    2524void _User_extensions_Thread_switch (
  • testsuites/sptests/spsize/size.c

    r67a9159e r3be0c9a  
    4545#include <rtems/rtems/timer.h>
    4646#include <rtems/score/tod.h>
    47 #include <rtems/score/userext.h>
     47#include <rtems/score/userextimpl.h>
    4848#include <rtems/score/wkspace.h>
    4949#if defined(RTEMS_SMP)
Note: See TracChangeset for help on using the changeset viewer.