4000ac5c <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4000ac5c: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000ac60: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000ac64: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 4001b2ec <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000ac68: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000ac6c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000ac70: 80 a0 a0 00 cmp %g2, 0 4000ac74: 22 80 00 31 be,a 4000ad38 <_CORE_mutex_Seize_interrupt_trylock+0xdc> 4000ac78: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000ac7c: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000ac80: c6 00 60 08 ld [ %g1 + 8 ], %g3 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000ac84: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000ac88: c6 26 20 60 st %g3, [ %i0 + 0x60 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000ac8c: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000ac90: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000ac94: 80 a0 a0 02 cmp %g2, 2 4000ac98: 02 80 00 05 be 4000acac <_CORE_mutex_Seize_interrupt_trylock+0x50> 4000ac9c: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000aca0: 80 a0 a0 03 cmp %g2, 3 4000aca4: 12 80 00 07 bne 4000acc0 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000aca8: 01 00 00 00 nop _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000acac: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000acb0: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000acb4: 84 00 e0 01 add %g3, 1, %g2 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000acb8: 02 80 00 03 be 4000acc4 <_CORE_mutex_Seize_interrupt_trylock+0x68> 4000acbc: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000acc0: 30 80 00 2d b,a 4000ad74 <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000acc4: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 4000acc8: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 if ( current == ceiling ) { 4000accc: 80 a0 c0 02 cmp %g3, %g2 4000acd0: 12 80 00 03 bne 4000acdc <_CORE_mutex_Seize_interrupt_trylock+0x80> 4000acd4: 01 00 00 00 nop _ISR_Enable( *level_p ); 4000acd8: 30 80 00 27 b,a 4000ad74 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 4000acdc: 08 80 00 0f bleu 4000ad18 <_CORE_mutex_Seize_interrupt_trylock+0xbc> 4000ace0: 84 10 20 06 mov 6, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000ace4: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000ace8: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 4001b230 <_Thread_Dispatch_disable_level> 4000acec: 84 00 a0 01 inc %g2 4000acf0: c4 20 62 30 st %g2, [ %g1 + 0x230 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000acf4: 7f ff db ed call 40001ca8 4000acf8: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000acfc: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000ad00: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000ad04: 7f ff f0 d8 call 40007064 <_Thread_Change_priority> 4000ad08: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000ad0c: 7f ff f2 46 call 40007624 <_Thread_Enable_dispatch> 4000ad10: b0 10 20 00 clr %i0 4000ad14: 30 80 00 1b b,a 4000ad80 <_CORE_mutex_Seize_interrupt_trylock+0x124> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000ad18: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000ad1c: 84 10 20 01 mov 1, %g2 the_mutex->nest_count = 0; /* undo locking above */ 4000ad20: c0 26 20 54 clr [ %i0 + 0x54 ] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000ad24: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000ad28: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000ad2c: 84 00 bf ff add %g2, -1, %g2 4000ad30: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000ad34: 30 80 00 10 b,a 4000ad74 <_CORE_mutex_Seize_interrupt_trylock+0x118> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000ad38: 80 a0 80 01 cmp %g2, %g1 4000ad3c: 12 80 00 13 bne 4000ad88 <_CORE_mutex_Seize_interrupt_trylock+0x12c> 4000ad40: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000ad44: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000ad48: 80 a0 60 00 cmp %g1, 0 4000ad4c: 22 80 00 07 be,a 4000ad68 <_CORE_mutex_Seize_interrupt_trylock+0x10c> 4000ad50: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000ad54: 80 a0 60 01 cmp %g1, 1 4000ad58: 12 80 00 0c bne 4000ad88 <_CORE_mutex_Seize_interrupt_trylock+0x12c> 4000ad5c: 82 10 20 02 mov 2, %g1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000ad60: 10 80 00 05 b 4000ad74 <_CORE_mutex_Seize_interrupt_trylock+0x118> <== NOT EXECUTED 4000ad64: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000ad68: 82 00 60 01 inc %g1 4000ad6c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000ad70: 30 80 00 01 b,a 4000ad74 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4000ad74: 7f ff db cd call 40001ca8 4000ad78: d0 06 40 00 ld [ %i1 ], %o0 4000ad7c: b0 10 20 00 clr %i0 4000ad80: 81 c7 e0 08 ret 4000ad84: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000ad88: 81 c7 e0 08 ret 4000ad8c: 91 e8 20 01 restore %g0, 1, %o0 40006120 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 40006120: 9d e3 bf a0 save %sp, -96, %sp * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 40006124: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1 #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 40006128: a0 10 00 18 mov %i0, %l0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 4000612c: 80 a0 60 00 cmp %g1, 0 40006130: 02 80 00 07 be 4000614c <_CORE_mutex_Surrender+0x2c> 40006134: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 40006138: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000613c: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 4001b2ec <_Thread_Executing> 40006140: 80 a2 00 01 cmp %o0, %g1 40006144: 12 80 00 4b bne 40006270 <_CORE_mutex_Surrender+0x150> 40006148: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 4000614c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40006150: 80 a0 60 00 cmp %g1, 0 40006154: 02 80 00 46 be 4000626c <_CORE_mutex_Surrender+0x14c> 40006158: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 4000615c: 80 a0 60 00 cmp %g1, 0 40006160: 12 80 00 43 bne 4000626c <_CORE_mutex_Surrender+0x14c> 40006164: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 40006168: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000616c: 80 a0 60 02 cmp %g1, 2 40006170: 02 80 00 04 be 40006180 <_CORE_mutex_Surrender+0x60> 40006174: 80 a0 60 03 cmp %g1, 3 40006178: 32 80 00 07 bne,a 40006194 <_CORE_mutex_Surrender+0x74> 4000617c: c0 24 20 5c clr [ %l0 + 0x5c ] the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 40006180: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006184: 82 00 7f ff add %g1, -1, %g1 40006188: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 4000618c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 40006190: c0 24 20 5c clr [ %l0 + 0x5c ] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40006194: 80 a0 60 02 cmp %g1, 2 40006198: 02 80 00 05 be 400061ac <_CORE_mutex_Surrender+0x8c> 4000619c: c0 24 20 60 clr [ %l0 + 0x60 ] 400061a0: 80 a0 60 03 cmp %g1, 3 400061a4: 12 80 00 0d bne 400061d8 <_CORE_mutex_Surrender+0xb8> 400061a8: 01 00 00 00 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 400061ac: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400061b0: 80 a0 60 00 cmp %g1, 0 400061b4: 12 80 00 09 bne 400061d8 <_CORE_mutex_Surrender+0xb8> 400061b8: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { 400061bc: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 400061c0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 400061c4: 80 a2 40 01 cmp %o1, %g1 400061c8: 02 80 00 04 be 400061d8 <_CORE_mutex_Surrender+0xb8> 400061cc: 01 00 00 00 nop _Thread_Change_priority( holder, holder->real_priority, true ); 400061d0: 40 00 03 a5 call 40007064 <_Thread_Change_priority> 400061d4: 94 10 20 01 mov 1, %o2 ! 1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 400061d8: 40 00 05 ef call 40007994 <_Thread_queue_Dequeue> 400061dc: 90 10 00 10 mov %l0, %o0 400061e0: 82 92 20 00 orcc %o0, 0, %g1 400061e4: 22 80 00 1f be,a 40006260 <_CORE_mutex_Surrender+0x140> 400061e8: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400061ec: c6 00 60 08 ld [ %g1 + 8 ], %g3 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 400061f0: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400061f4: c6 24 20 60 st %g3, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400061f8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400061fc: 86 10 20 01 mov 1, %g3 switch ( the_mutex->Attributes.discipline ) { 40006200: 80 a0 a0 02 cmp %g2, 2 40006204: 02 80 00 07 be 40006220 <_CORE_mutex_Surrender+0x100> 40006208: c6 24 20 54 st %g3, [ %l0 + 0x54 ] 4000620c: 80 a0 a0 03 cmp %g2, 3 40006210: 12 80 00 18 bne 40006270 <_CORE_mutex_Surrender+0x150> 40006214: b0 10 20 00 clr %i0 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 40006218: 10 80 00 07 b 40006234 <_CORE_mutex_Surrender+0x114> 4000621c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 40006220: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40006224: 84 00 a0 01 inc %g2 40006228: c4 20 60 1c st %g2, [ %g1 + 0x1c ] break; 4000622c: 81 c7 e0 08 ret 40006230: 91 e8 20 00 restore %g0, 0, %o0 _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ 40006234: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 40006238: 86 00 e0 01 inc %g3 4000623c: c6 20 60 1c st %g3, [ %g1 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 40006240: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 the_thread->current_priority){ 40006244: 80 a2 40 02 cmp %o1, %g2 40006248: 3a 80 00 0a bcc,a 40006270 <_CORE_mutex_Surrender+0x150> 4000624c: b0 10 20 00 clr %i0 _Thread_Change_priority( 40006250: 40 00 03 85 call 40007064 <_Thread_Change_priority> <== NOT EXECUTED 40006254: 94 10 20 00 clr %o2 <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40006258: 81 c7 e0 08 ret <== NOT EXECUTED 4000625c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40006260: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40006264: 81 c7 e0 08 ret 40006268: 91 e8 20 00 restore %g0, 0, %o0 4000626c: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006270: 81 c7 e0 08 ret 40006274: 81 e8 00 00 restore 40007bb4 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 40007bb4: 9d e3 bf a0 save %sp, -96, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 40007bb8: e0 06 60 14 ld [ %i1 + 0x14 ], %l0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007bbc: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40007bc0: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007bc4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40007bc8: 82 06 60 38 add %i1, 0x38, %g1 40007bcc: c2 26 60 40 st %g1, [ %i1 + 0x40 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40007bd0: 2d 10 00 6a sethi %hi(0x4001a800), %l6 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40007bd4: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40007bd8: 80 8c 20 20 btst 0x20, %l0 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40007bdc: a7 28 60 04 sll %g1, 4, %l3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40007be0: ac 15 a1 44 or %l6, 0x144, %l6 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40007be4: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 40007be8: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40007bec: a6 24 c0 01 sub %l3, %g1, %l3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40007bf0: 12 80 00 28 bne 40007c90 <_Thread_queue_Enqueue_priority+0xdc> 40007bf4: a6 06 00 13 add %i0, %l3, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40007bf8: ac 04 e0 04 add %l3, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40007bfc: 7f ff e8 27 call 40001c98 40007c00: 01 00 00 00 nop 40007c04: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 40007c08: a8 10 3f ff mov -1, %l4 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40007c0c: 10 80 00 10 b 40007c4c <_Thread_queue_Enqueue_priority+0x98> 40007c10: e2 04 c0 00 ld [ %l3 ], %l1 search_priority = search_thread->current_priority; if ( priority <= search_priority ) 40007c14: 80 a4 00 14 cmp %l0, %l4 40007c18: 28 80 00 11 bleu,a 40007c5c <_Thread_queue_Enqueue_priority+0xa8> 40007c1c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 40007c20: 7f ff e8 22 call 40001ca8 40007c24: 90 10 00 12 mov %l2, %o0 40007c28: 7f ff e8 1c call 40001c98 40007c2c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007c30: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40007c34: 80 8d 40 01 btst %l5, %g1 40007c38: 32 80 00 05 bne,a 40007c4c <_Thread_queue_Enqueue_priority+0x98> 40007c3c: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40007c40: 7f ff e8 1a call 40001ca8 <== NOT EXECUTED 40007c44: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40007c48: 30 bf ff ed b,a 40007bfc <_Thread_queue_Enqueue_priority+0x48> <== NOT EXECUTED restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40007c4c: 80 a4 40 16 cmp %l1, %l6 40007c50: 32 bf ff f1 bne,a 40007c14 <_Thread_queue_Enqueue_priority+0x60> 40007c54: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40007c58: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007c5c: 80 a0 60 01 cmp %g1, 1 40007c60: 12 80 00 3c bne 40007d50 <_Thread_queue_Enqueue_priority+0x19c> 40007c64: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40007c68: 80 a4 00 14 cmp %l0, %l4 40007c6c: 02 80 00 2e be 40007d24 <_Thread_queue_Enqueue_priority+0x170> 40007c70: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40007c74: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007c78: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40007c7c: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40007c80: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40007c84: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40007c88: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007c8c: 30 80 00 2d b,a 40007d40 <_Thread_queue_Enqueue_priority+0x18c> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40007c90: 7f ff e8 02 call 40001c98 40007c94: e8 0d 80 00 ldub [ %l6 ], %l4 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40007c98: a8 05 20 01 inc %l4 _ISR_Disable( level ); 40007c9c: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40007ca0: 10 80 00 10 b 40007ce0 <_Thread_queue_Enqueue_priority+0x12c> 40007ca4: e2 04 e0 08 ld [ %l3 + 8 ], %l1 search_priority = search_thread->current_priority; if ( priority >= search_priority ) 40007ca8: 80 a4 00 14 cmp %l0, %l4 40007cac: 3a 80 00 11 bcc,a 40007cf0 <_Thread_queue_Enqueue_priority+0x13c> 40007cb0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40007cb4: 7f ff e7 fd call 40001ca8 40007cb8: 90 10 00 12 mov %l2, %o0 40007cbc: 7f ff e7 f7 call 40001c98 40007cc0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007cc4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40007cc8: 80 8d 40 01 btst %l5, %g1 40007ccc: 32 80 00 05 bne,a 40007ce0 <_Thread_queue_Enqueue_priority+0x12c> 40007cd0: e2 04 60 04 ld [ %l1 + 4 ], %l1 _ISR_Enable( level ); 40007cd4: 7f ff e7 f5 call 40001ca8 40007cd8: 90 10 00 12 mov %l2, %o0 goto restart_reverse_search; 40007cdc: 30 bf ff ed b,a 40007c90 <_Thread_queue_Enqueue_priority+0xdc> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40007ce0: 80 a4 40 13 cmp %l1, %l3 40007ce4: 32 bf ff f1 bne,a 40007ca8 <_Thread_queue_Enqueue_priority+0xf4> 40007ce8: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40007cec: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007cf0: 80 a0 60 01 cmp %g1, 1 40007cf4: 12 80 00 17 bne 40007d50 <_Thread_queue_Enqueue_priority+0x19c> 40007cf8: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40007cfc: 80 a4 00 14 cmp %l0, %l4 40007d00: 02 80 00 09 be 40007d24 <_Thread_queue_Enqueue_priority+0x170> 40007d04: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40007d08: c2 04 40 00 ld [ %l1 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40007d0c: e2 26 60 04 st %l1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 40007d10: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40007d14: f0 26 60 44 st %i0, [ %i1 + 0x44 ] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 40007d18: f2 24 40 00 st %i1, [ %l1 ] next_node->previous = the_node; 40007d1c: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007d20: 30 80 00 08 b,a 40007d40 <_Thread_queue_Enqueue_priority+0x18c> 40007d24: a2 04 60 3c add %l1, 0x3c, %l1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 40007d28: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007d2c: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40007d30: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40007d34: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40007d38: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40007d3c: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007d40: 7f ff e7 da call 40001ca8 40007d44: b0 10 20 01 mov 1, %i0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40007d48: 81 c7 e0 08 ret 40007d4c: 81 e8 00 00 restore * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 40007d50: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 40007d54: d0 26 80 00 st %o0, [ %i2 ] return the_thread_queue->sync_state; } 40007d58: 81 c7 e0 08 ret 40007d5c: 81 e8 00 00 restore 40014b68 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40014b68: 9d e3 bf 88 save %sp, -120, %sp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40014b6c: 35 10 00 eb sethi %hi(0x4003ac00), %i2 40014b70: b2 07 bf f4 add %fp, -12, %i1 40014b74: ac 07 bf f8 add %fp, -8, %l6 40014b78: a2 07 bf e8 add %fp, -24, %l1 40014b7c: a6 07 bf ec add %fp, -20, %l3 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40014b80: 37 10 00 eb sethi %hi(0x4003ac00), %i3 40014b84: 2b 10 00 ea sethi %hi(0x4003a800), %l5 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40014b88: c0 27 bf f8 clr [ %fp + -8 ] 40014b8c: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40014b90: f2 27 bf fc st %i1, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40014b94: ec 27 bf f4 st %l6, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40014b98: e2 27 bf f0 st %l1, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40014b9c: e6 27 bf e8 st %l3, [ %fp + -24 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40014ba0: b4 16 a1 24 or %i2, 0x124, %i2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40014ba4: b6 16 e0 60 or %i3, 0x60, %i3 40014ba8: aa 15 63 d0 or %l5, 0x3d0, %l5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40014bac: a8 06 20 30 add %i0, 0x30, %l4 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40014bb0: a4 06 20 68 add %i0, 0x68, %l2 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40014bb4: b8 06 20 08 add %i0, 8, %i4 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40014bb8: ba 06 20 40 add %i0, 0x40, %i5 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 40014bbc: ae 10 20 01 mov 1, %l7 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 40014bc0: f2 26 20 78 st %i1, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40014bc4: c2 06 80 00 ld [ %i2 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40014bc8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40014bcc: 94 10 00 11 mov %l1, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40014bd0: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40014bd4: 92 20 40 09 sub %g1, %o1, %o1 40014bd8: 40 00 10 e6 call 40018f70 <_Watchdog_Adjust_to_chain> 40014bdc: 90 10 00 14 mov %l4, %o0 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40014be0: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40014be4: e0 06 c0 00 ld [ %i3 ], %l0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 40014be8: 80 a4 00 0a cmp %l0, %o2 40014bec: 08 80 00 06 bleu 40014c04 <_Timer_server_Body+0x9c> 40014bf0: 92 24 00 0a sub %l0, %o2, %o1 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40014bf4: 90 10 00 12 mov %l2, %o0 40014bf8: 40 00 10 de call 40018f70 <_Watchdog_Adjust_to_chain> 40014bfc: 94 10 00 11 mov %l1, %o2 40014c00: 30 80 00 06 b,a 40014c18 <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 40014c04: 1a 80 00 05 bcc 40014c18 <_Timer_server_Body+0xb0> 40014c08: 94 22 80 10 sub %o2, %l0, %o2 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 40014c0c: 90 10 00 12 mov %l2, %o0 40014c10: 40 00 10 b1 call 40018ed4 <_Watchdog_Adjust> 40014c14: 92 10 20 01 mov 1, %o1 } watchdogs->last_snapshot = snapshot; 40014c18: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 40014c1c: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40014c20: 40 00 02 61 call 400155a4 <_Chain_Get> 40014c24: 01 00 00 00 nop if ( timer == NULL ) { 40014c28: 80 a2 20 00 cmp %o0, 0 40014c2c: 02 80 00 0f be 40014c68 <_Timer_server_Body+0x100> 40014c30: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40014c34: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40014c38: 80 a0 60 01 cmp %g1, 1 40014c3c: 12 80 00 05 bne 40014c50 <_Timer_server_Body+0xe8> 40014c40: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 40014c44: 92 02 20 10 add %o0, 0x10, %o1 40014c48: 10 80 00 05 b 40014c5c <_Timer_server_Body+0xf4> 40014c4c: 90 10 00 14 mov %l4, %o0 } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40014c50: 12 bf ff f3 bne 40014c1c <_Timer_server_Body+0xb4> 40014c54: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40014c58: 90 10 00 12 mov %l2, %o0 40014c5c: 40 00 10 fa call 40019044 <_Watchdog_Insert> 40014c60: 01 00 00 00 nop 40014c64: 30 bf ff ee b,a 40014c1c <_Timer_server_Body+0xb4> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 40014c68: 7f ff e5 00 call 4000e068 40014c6c: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40014c70: c2 07 bf f4 ld [ %fp + -12 ], %g1 40014c74: 80 a0 40 16 cmp %g1, %l6 40014c78: 12 80 00 0a bne 40014ca0 <_Timer_server_Body+0x138> 40014c7c: 01 00 00 00 nop ts->insert_chain = NULL; 40014c80: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40014c84: 7f ff e4 fd call 4000e078 40014c88: 01 00 00 00 nop _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 40014c8c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40014c90: 80 a0 40 13 cmp %g1, %l3 40014c94: 12 80 00 06 bne 40014cac <_Timer_server_Body+0x144> 40014c98: 01 00 00 00 nop 40014c9c: 30 80 00 1a b,a 40014d04 <_Timer_server_Body+0x19c> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40014ca0: 7f ff e4 f6 call 4000e078 <== NOT EXECUTED 40014ca4: 01 00 00 00 nop <== NOT EXECUTED 40014ca8: 30 bf ff c7 b,a 40014bc4 <_Timer_server_Body+0x5c> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 40014cac: 7f ff e4 ef call 4000e068 40014cb0: 01 00 00 00 nop 40014cb4: 84 10 00 08 mov %o0, %g2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40014cb8: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40014cbc: 80 a4 00 13 cmp %l0, %l3 40014cc0: 02 80 00 0e be 40014cf8 <_Timer_server_Body+0x190> 40014cc4: 80 a4 20 00 cmp %l0, 0 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 40014cc8: c2 04 00 00 ld [ %l0 ], %g1 the_chain->first = new_first; 40014ccc: c2 27 bf e8 st %g1, [ %fp + -24 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 40014cd0: 02 80 00 0a be 40014cf8 <_Timer_server_Body+0x190> 40014cd4: e2 20 60 04 st %l1, [ %g1 + 4 ] watchdog->state = WATCHDOG_INACTIVE; 40014cd8: c0 24 20 08 clr [ %l0 + 8 ] _ISR_Enable( level ); 40014cdc: 7f ff e4 e7 call 4000e078 40014ce0: 01 00 00 00 nop /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 40014ce4: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 40014ce8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 40014cec: 9f c0 40 00 call %g1 40014cf0: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 } 40014cf4: 30 bf ff ee b,a 40014cac <_Timer_server_Body+0x144> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 40014cf8: 7f ff e4 e0 call 4000e078 40014cfc: 90 10 00 02 mov %g2, %o0 40014d00: 30 bf ff b0 b,a 40014bc0 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40014d04: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40014d08: c2 05 40 00 ld [ %l5 ], %g1 40014d0c: 82 00 60 01 inc %g1 40014d10: c2 25 40 00 st %g1, [ %l5 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40014d14: d0 06 00 00 ld [ %i0 ], %o0 40014d18: 40 00 0d e5 call 400184ac <_Thread_Set_state> 40014d1c: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40014d20: 7f ff ff 68 call 40014ac0 <_Timer_server_Reset_interval_system_watchdog> 40014d24: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40014d28: 7f ff ff 7b call 40014b14 <_Timer_server_Reset_tod_system_watchdog> 40014d2c: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40014d30: 40 00 0b 38 call 40017a10 <_Thread_Enable_dispatch> 40014d34: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40014d38: 90 10 00 1c mov %i4, %o0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 40014d3c: ee 2e 20 7c stb %l7, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40014d40: 40 00 11 1e call 400191b8 <_Watchdog_Remove> 40014d44: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40014d48: 40 00 11 1c call 400191b8 <_Watchdog_Remove> 40014d4c: 90 10 00 1d mov %i5, %o0 40014d50: 30 bf ff 9c b,a 40014bc0 <_Timer_server_Body+0x58>