18 #ifndef _RTEMS_SCORE_USEREXTIMPL_H 19 #define _RTEMS_SCORE_USEREXTIMPL_H 83 void _User_extensions_Handler_initialization(
void );
85 void _User_extensions_Add_set(
93 _User_extensions_Add_set( extension );
101 extension->Callouts = *extension_table;
103 _User_extensions_Add_set( extension );
106 void _User_extensions_Remove_set(
128 void _User_extensions_Thread_create_visitor(
134 void _User_extensions_Thread_delete_visitor(
140 void _User_extensions_Thread_start_visitor(
146 void _User_extensions_Thread_restart_visitor(
152 void _User_extensions_Thread_begin_visitor(
158 void _User_extensions_Thread_exitted_visitor(
166 Internal_errors_t error;
169 void _User_extensions_Fatal_visitor(
175 void _User_extensions_Thread_terminate_visitor(
201 static inline bool _User_extensions_Thread_create(
Thread_Control *created )
207 _User_extensions_Thread_create_visitor,
214 static inline void _User_extensions_Thread_delete(
Thread_Control *deleted )
218 _User_extensions_Thread_delete_visitor,
223 static inline void _User_extensions_Thread_start(
Thread_Control *started )
227 _User_extensions_Thread_start_visitor,
232 static inline void _User_extensions_Thread_restart(
Thread_Control *restarted )
236 _User_extensions_Thread_restart_visitor,
241 static inline void _User_extensions_Thread_begin(
Thread_Control *executing )
245 _User_extensions_Thread_begin_visitor,
250 static inline void _User_extensions_Thread_switch(
263 if ( node != tail ) {
265 #if defined(RTEMS_SMP) 269 cpu_self = _Per_CPU_Get();
271 #if defined(RTEMS_SMP) 274 _Per_CPU_Acquire( cpu_self );
276 #if defined(RTEMS_SMP) 280 while ( node != tail ) {
284 (*extension->thread_switch)( executing, heir );
289 _Per_CPU_Release( cpu_self );
290 #if defined(RTEMS_SMP) 296 static inline void _User_extensions_Thread_exitted(
Thread_Control *executing )
300 _User_extensions_Thread_exitted_visitor,
305 static inline void _User_extensions_Fatal(
307 Internal_errors_t error
314 _User_extensions_Fatal_visitor,
319 static inline void _User_extensions_Thread_terminate(
325 _User_extensions_Thread_terminate_visitor,
330 static inline void _User_extensions_Acquire(
ISR_lock_Context *lock_context )
333 &_User_extensions_List.Lock,
338 static inline void _User_extensions_Release(
ISR_lock_Context *lock_context )
341 &_User_extensions_List.Lock,
346 static inline void _User_extensions_Destroy_iterators(
353 _User_extensions_Acquire( &lock_context );
357 while ( iter !=
NULL ) {
359 iter = iter->previous;
362 _User_extensions_Release( &lock_context );
Manages the switch callouts.
Definition: userextdata.h:39
Definition: userextimpl.h:164
User Extension Handler Data Structures.
A chain iterator which is updated during node extraction if it is properly registered.
Definition: chainimpl.h:898
#define _ISR_lock_ISR_disable_and_acquire(_lock, _context)
Acquires an ISR lock.
Definition: isrlock.h:223
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
void _User_extensions_Iterate(void *arg, User_extensions_Visitor visitor, Chain_Iterator_direction direction)
Iterates through all user extensions and calls the visitor for each.
Definition: userextiterate.c:150
RTEMS_INLINE_ROUTINE void _Chain_Iterator_destroy(Chain_Iterator *the_iterator)
Destroys the iterator.
Definition: chainimpl.h:1110
#define ISR_LOCK_MEMBER(_designator)
Defines an ISR lock member.
Definition: isrlock.h:89
Chain_Control _User_extensions_Switches_list
List of active task switch extensions.
Chain iterator for dynamic user extensions.
Definition: userextimpl.h:45
void(* User_extensions_Visitor)(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
User extension visitor.
Definition: userextimpl.h:117
struct User_extensions_Iterator * last_user_extensions_iterator
LIFO list of user extensions iterators.
Definition: thread.h:867
#define _ISR_Local_disable(_level)
Disables interrupts on this processor.
Definition: isrlevel.h:54
uint32_t ISR_Level
Definition: isrlevel.h:38
Per CPU Core Structure.
Definition: percpu.h:290
#define _ISR_lock_Release_and_ISR_enable(_lock, _context)
Releases an ISR lock.
Definition: isrlock.h:248
Iteration from head to tail.
Definition: chainimpl.h:884
#define _ISR_Local_enable(_level)
Enables interrupts on this processor.
Definition: isrlevel.h:71
RTEMS_INLINE_ROUTINE const Chain_Node * _Chain_Immutable_first(const Chain_Control *the_chain)
Return pointer to immutable chain's first node.
Definition: chainimpl.h:274
RTEMS_INLINE_ROUTINE const Chain_Node * _Chain_Immutable_next(const Chain_Node *the_node)
Return pointer the immutable next node from this node.
Definition: chainimpl.h:340
Definition: userextimpl.h:50
Definition: userextimpl.h:123
User extension table.
Definition: userext.h:232
Chain_Iterator_registry Iterators
Chain iterator registration.
Definition: userextimpl.h:59
Manages each user extension set.
Definition: userextdata.h:50
Chain_Control Active
Active dynamically added user extensions.
Definition: userextimpl.h:54
Chain_Iterator_direction
The chain iterator direction.
Definition: chainimpl.h:880
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
Iteration from tail to head.
Definition: chainimpl.h:889
RTEMS_INLINE_ROUTINE const Chain_Node * _Chain_Immutable_tail(const Chain_Control *the_chain)
Return pointer to immutable chain tail.
Definition: chainimpl.h:240
User_extensions_List _User_extensions_List
List of active extensions.
Definition: userextiterate.c:32
Constants and Structures Related with the Thread Control Block.
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:42
struct User_extensions_Iterator User_extensions_Iterator
Chain iterator for dynamic user extensions.
A registry for chain iterators.
Definition: chainimpl.h:930
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77