static void test_chain_insert_ordered( void ) { Chain_Control chain = CHAIN_INITIALIZER_EMPTY(chain); Chain_Node nodes[5]; const Chain_Node *tail; const Chain_Node *node; size_t n = RTEMS_ARRAY_SIZE( nodes ); size_t i = 0; puts( "INIT - Verify _Chain_Insert_ordered_unprotected" ); _Chain_Insert_ordered_unprotected( &chain, &nodes[4], test_order ); _Chain_Insert_ordered_unprotected( &chain, &nodes[2], test_order ); _Chain_Insert_ordered_unprotected( &chain, &nodes[0], test_order ); _Chain_Insert_ordered_unprotected( &chain, &nodes[3], test_order ); _Chain_Insert_ordered_unprotected( &chain, &nodes[1], test_order ); tail = _Chain_Immutable_tail( &chain ); node = _Chain_Immutable_first( &chain ); while ( node != tail && i < n ) { rtems_test_assert( node == &nodes[ i ] ); ++i; node = _Chain_Immutable_next( node ); } rtems_test_assert( i == n ); }
#define THREAD_JOIN_TQ_OPERATIONS &_Thread_queue_Operations_priority static void _Thread_Life_action_handler( Thread_Control *executing, Thread_Action *action, ISR_lock_Context *lock_context ); typedef struct { Chain_Control Chain; ISR_lock_Control Lock; } Thread_Zombie_control; static Thread_Zombie_control _Thread_Zombies = { .Chain = CHAIN_INITIALIZER_EMPTY( _Thread_Zombies.Chain ), .Lock = ISR_LOCK_INITIALIZER( "thread zombies" ) }; static bool _Thread_Raise_real_priority_filter( Thread_Control *the_thread, Priority_Control *new_priority_ptr, void *arg ) { Priority_Control real_priority; Priority_Control new_priority; Priority_Control current_priority; real_priority = the_thread->real_priority; new_priority = *new_priority_ptr;