38#ifndef _RTEMS_SCORE_USEREXTIMPL_H
39#define _RTEMS_SCORE_USEREXTIMPL_H
126static inline void _User_extensions_Add_API_set(
139static inline void _User_extensions_Add_set_with_table(
144 extension->Callouts = *extension_table;
256 Internal_errors_t error;
313static inline bool _User_extensions_Thread_create(
Thread_Control *created )
331static inline void _User_extensions_Thread_delete(
Thread_Control *deleted )
345static inline void _User_extensions_Thread_start(
Thread_Control *started )
359static inline void _User_extensions_Thread_restart(
Thread_Control *restarted )
373static inline void _User_extensions_Thread_begin(
Thread_Control *executing )
388static inline void _User_extensions_Thread_switch(
398 tail = _Chain_Immutable_tail( chain );
399 node = _Chain_Immutable_first( chain );
401 if ( node != tail ) {
402#if defined(RTEMS_SMP)
406 cpu_self = _Per_CPU_Get();
409 _Per_CPU_Acquire( cpu_self, &lock_context );
411 executing = cpu_self->ancestor;
412 cpu_self->ancestor = heir;
413 node = _Chain_Immutable_first( chain );
420 if ( executing != heir ) {
423 while ( node != tail ) {
427 node = _Chain_Immutable_next( node );
428 (*extension->thread_switch)( executing, heir );
431#if defined(RTEMS_SMP)
434 _Per_CPU_Release( cpu_self, &lock_context );
445static inline void _User_extensions_Thread_exitted(
Thread_Control *executing )
460static inline void _User_extensions_Fatal(
462 Internal_errors_t error
479static inline void _User_extensions_Thread_terminate(
495static inline void _User_extensions_Acquire(
ISR_lock_Context *lock_context )
508static inline void _User_extensions_Release(
ISR_lock_Context *lock_context )
522static inline void _User_extensions_Destroy_iterators(
529 _User_extensions_Acquire( &lock_context );
533 while ( iter !=
NULL ) {
534 _Chain_Iterator_destroy( &iter->Iterator );
535 iter = iter->previous;
538 _User_extensions_Release( &lock_context );
This header file provides interfaces of the Chain Handler which are only used by the implementation.
Chain_Iterator_direction
The chain iterator direction.
Definition: chainimpl.h:890
@ CHAIN_ITERATOR_BACKWARD
Iteration from tail to head.
Definition: chainimpl.h:899
@ CHAIN_ITERATOR_FORWARD
Iteration from head to tail.
Definition: chainimpl.h:894
#define _ISR_lock_ISR_enable(_context)
Restores the saved interrupt state of the ISR lock context.
Definition: isrlock.h:435
#define _ISR_lock_ISR_disable(_context)
Disables interrupts and saves the previous interrupt state in the ISR lock context.
Definition: isrlock.h:414
#define _ISR_lock_Release_and_ISR_enable(_lock, _context)
Releases an ISR lock.
Definition: isrlock.h:279
#define _ISR_lock_ISR_disable_and_acquire(_lock, _context)
Acquires an ISR lock.
Definition: isrlock.h:254
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:63
void _User_extensions_Thread_create_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Creates a visitor.
Definition: userextiterate.c:59
void _User_extensions_Thread_delete_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Deletes a visitor.
Definition: userextiterate.c:74
void _User_extensions_Thread_start_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Starts a visitor.
Definition: userextiterate.c:87
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:168
void _User_extensions_Remove_set(User_extensions_Control *extension)
Removes a user extension.
Definition: userextremoveset.c:45
void _User_extensions_Thread_restart_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Restarts a visitor.
Definition: userextiterate.c:100
struct User_extensions_Iterator User_extensions_Iterator
Chain iterator for dynamic user extensions.
void(* User_extensions_Visitor)(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
User extension visitor.
Definition: userextimpl.h:165
void _User_extensions_Thread_terminate_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Terminates a visitor.
Definition: userextiterate.c:154
void _User_extensions_Fatal_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Calls the fatal function of the thread callout for the visitor.
Definition: userextiterate.c:139
void _User_extensions_Thread_begin_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Calls the begin function of the thread callout for the visitor.
Definition: userextiterate.c:113
void _User_extensions_Thread_exitted_visitor(Thread_Control *executing, void *arg, const User_extensions_Table *callouts)
Calls the exitted function of the thread callout for the visitor.
Definition: userextiterate.c:126
User_extensions_List _User_extensions_List
List of active extensions.
Definition: userextiterate.c:50
Chain_Control _User_extensions_Switches_list
List of active task switch extensions.
void _User_extensions_Handler_initialization(void)
Initializes the user extensions handler.
Definition: userext.c:44
void _User_extensions_Add_set(User_extensions_Control *extension)
Adds a user extension.
Definition: userextaddset.c:65
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
This header file provides the interfaces of the ISR Locks.
This header file provides the interfaces of the Per-CPU Information.
This header file provides interfaces of the Thread Handler which are used by the implementation and t...
A registry for chain iterators.
Definition: chainimpl.h:940
A chain iterator which is updated during node extraction if it is properly registered.
Definition: chainimpl.h:908
This structure represents a chain node.
Definition: chain.h:78
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:81
ISR lock control.
Definition: isrlock.h:72
Per CPU Core Structure.
Definition: percpu.h:384
Manages each user extension set.
Definition: userextdata.h:72
Definition: userextimpl.h:254
Chain iterator for dynamic user extensions.
Definition: userextimpl.h:66
Definition: userextimpl.h:71
Chain_Iterator_registry Iterators
Chain iterator registration.
Definition: userextimpl.h:80
Chain_Control Active
Active dynamically added user extensions.
Definition: userextimpl.h:75
Manages the switch callouts.
Definition: userextdata.h:61
User extension table.
Definition: userext.h:253
Definition: userextimpl.h:171
struct User_extensions_Iterator * last_user_extensions_iterator
LIFO list of user extensions iterators.
Definition: thread.h:967
This union represents a chain control block.
Definition: chain.h:96
This header file provides data structures used by the implementation and the Application Configuratio...