0200ae9c <_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 ) { 200ae9c: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 200aea0: 03 00 80 67 sethi %hi(0x2019c00), %g1 200aea4: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 ! 2019eb0 <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200aea8: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200aeac: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 200aeb0: 80 a0 a0 00 cmp %g2, 0 200aeb4: 22 80 00 31 be,a 200af78 <_CORE_mutex_Seize_interrupt_trylock+0xdc> 200aeb8: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 200aebc: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200aec0: 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; 200aec4: 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; 200aec8: 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; 200aecc: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200aed0: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200aed4: 80 a0 a0 02 cmp %g2, 2 200aed8: 02 80 00 05 be 200aeec <_CORE_mutex_Seize_interrupt_trylock+0x50> 200aedc: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 200aee0: 80 a0 a0 03 cmp %g2, 3 200aee4: 12 80 00 07 bne 200af00 <_CORE_mutex_Seize_interrupt_trylock+0x64> 200aee8: 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++; 200aeec: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200aef0: 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++; 200aef4: 84 00 e0 01 add %g3, 1, %g2 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200aef8: 02 80 00 03 be 200af04 <_CORE_mutex_Seize_interrupt_trylock+0x68> 200aefc: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 200af00: 30 80 00 2d b,a 200afb4 <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200af04: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 200af08: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 if ( current == ceiling ) { 200af0c: 80 a0 c0 02 cmp %g3, %g2 200af10: 12 80 00 03 bne 200af1c <_CORE_mutex_Seize_interrupt_trylock+0x80> 200af14: 01 00 00 00 nop _ISR_Enable( *level_p ); 200af18: 30 80 00 27 b,a 200afb4 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 200af1c: 08 80 00 0f bleu 200af58 <_CORE_mutex_Seize_interrupt_trylock+0xbc> 200af20: 84 10 20 06 mov 6, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200af24: 03 00 80 67 sethi %hi(0x2019c00), %g1 200af28: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 2019df0 <_Thread_Dispatch_disable_level> 200af2c: 84 00 a0 01 inc %g2 200af30: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 200af34: 7f ff db 76 call 2001d0c 200af38: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 200af3c: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200af40: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200af44: 7f ff f0 61 call 20070c8 <_Thread_Change_priority> 200af48: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 200af4c: 7f ff f1 ea call 20076f4 <_Thread_Enable_dispatch> 200af50: b0 10 20 00 clr %i0 200af54: 30 80 00 1b b,a 200afc0 <_CORE_mutex_Seize_interrupt_trylock+0x124> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200af58: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 200af5c: 84 10 20 01 mov 1, %g2 the_mutex->nest_count = 0; /* undo locking above */ 200af60: 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; 200af64: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200af68: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 200af6c: 84 00 bf ff add %g2, -1, %g2 200af70: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 200af74: 30 80 00 10 b,a 200afb4 <_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 ) ) { 200af78: 80 a0 80 01 cmp %g2, %g1 200af7c: 12 80 00 13 bne 200afc8 <_CORE_mutex_Seize_interrupt_trylock+0x12c> 200af80: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 200af84: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200af88: 80 a0 60 00 cmp %g1, 0 200af8c: 22 80 00 07 be,a 200afa8 <_CORE_mutex_Seize_interrupt_trylock+0x10c> 200af90: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200af94: 80 a0 60 01 cmp %g1, 1 200af98: 12 80 00 0c bne 200afc8 <_CORE_mutex_Seize_interrupt_trylock+0x12c> 200af9c: 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; 200afa0: 10 80 00 05 b 200afb4 <_CORE_mutex_Seize_interrupt_trylock+0x118> <== NOT EXECUTED 200afa4: 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++; 200afa8: 82 00 60 01 inc %g1 200afac: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 200afb0: 30 80 00 01 b,a 200afb4 <_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 ); 200afb4: 7f ff db 56 call 2001d0c 200afb8: d0 06 40 00 ld [ %i1 ], %o0 200afbc: b0 10 20 00 clr %i0 200afc0: 81 c7 e0 08 ret 200afc4: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200afc8: 81 c7 e0 08 ret 200afcc: 91 e8 20 01 restore %g0, 1, %o0 02007ccc <_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 ) { 2007ccc: 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; 2007cd0: 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); 2007cd4: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2007cd8: 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); 2007cdc: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2007ce0: 82 06 60 38 add %i1, 0x38, %g1 2007ce4: 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; 2007ce8: 2d 00 80 65 sethi %hi(0x2019400), %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 ]; 2007cec: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2007cf0: 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 ]; 2007cf4: 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; 2007cf8: ac 15 a0 24 or %l6, 0x24, %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 ]; 2007cfc: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 2007d00: 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 ]; 2007d04: a6 24 c0 01 sub %l3, %g1, %l3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2007d08: 12 80 00 28 bne 2007da8 <_Thread_queue_Enqueue_priority+0xdc> 2007d0c: 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; 2007d10: ac 04 e0 04 add %l3, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 2007d14: 7f ff e7 fa call 2001cfc 2007d18: 01 00 00 00 nop 2007d1c: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 2007d20: a8 10 3f ff mov -1, %l4 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2007d24: 10 80 00 10 b 2007d64 <_Thread_queue_Enqueue_priority+0x98> 2007d28: e2 04 c0 00 ld [ %l3 ], %l1 search_priority = search_thread->current_priority; if ( priority <= search_priority ) 2007d2c: 80 a4 00 14 cmp %l0, %l4 2007d30: 28 80 00 11 bleu,a 2007d74 <_Thread_queue_Enqueue_priority+0xa8> 2007d34: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 2007d38: 7f ff e7 f5 call 2001d0c 2007d3c: 90 10 00 12 mov %l2, %o0 2007d40: 7f ff e7 ef call 2001cfc 2007d44: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007d48: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2007d4c: 80 8d 40 01 btst %l5, %g1 2007d50: 32 80 00 05 bne,a 2007d64 <_Thread_queue_Enqueue_priority+0x98> 2007d54: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 2007d58: 7f ff e7 ed call 2001d0c <== NOT EXECUTED 2007d5c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 2007d60: 30 bf ff ed b,a 2007d14 <_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 ) ) { 2007d64: 80 a4 40 16 cmp %l1, %l6 2007d68: 32 bf ff f1 bne,a 2007d2c <_Thread_queue_Enqueue_priority+0x60> 2007d6c: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2007d70: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007d74: 80 a0 60 01 cmp %g1, 1 2007d78: 12 80 00 3c bne 2007e68 <_Thread_queue_Enqueue_priority+0x19c> 2007d7c: 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 ) 2007d80: 80 a4 00 14 cmp %l0, %l4 2007d84: 02 80 00 2e be 2007e3c <_Thread_queue_Enqueue_priority+0x170> 2007d88: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2007d8c: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007d90: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 2007d94: 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; 2007d98: 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; 2007d9c: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2007da0: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007da4: 30 80 00 2d b,a 2007e58 <_Thread_queue_Enqueue_priority+0x18c> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 2007da8: 7f ff e7 d5 call 2001cfc 2007dac: 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; 2007db0: a8 05 20 01 inc %l4 _ISR_Disable( level ); 2007db4: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2007db8: 10 80 00 10 b 2007df8 <_Thread_queue_Enqueue_priority+0x12c> 2007dbc: e2 04 e0 08 ld [ %l3 + 8 ], %l1 search_priority = search_thread->current_priority; if ( priority >= search_priority ) 2007dc0: 80 a4 00 14 cmp %l0, %l4 2007dc4: 3a 80 00 11 bcc,a 2007e08 <_Thread_queue_Enqueue_priority+0x13c> 2007dc8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2007dcc: 7f ff e7 d0 call 2001d0c 2007dd0: 90 10 00 12 mov %l2, %o0 2007dd4: 7f ff e7 ca call 2001cfc 2007dd8: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007ddc: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2007de0: 80 8d 40 01 btst %l5, %g1 2007de4: 32 80 00 05 bne,a 2007df8 <_Thread_queue_Enqueue_priority+0x12c> 2007de8: e2 04 60 04 ld [ %l1 + 4 ], %l1 _ISR_Enable( level ); 2007dec: 7f ff e7 c8 call 2001d0c 2007df0: 90 10 00 12 mov %l2, %o0 goto restart_reverse_search; 2007df4: 30 bf ff ed b,a 2007da8 <_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 ) ) { 2007df8: 80 a4 40 13 cmp %l1, %l3 2007dfc: 32 bf ff f1 bne,a 2007dc0 <_Thread_queue_Enqueue_priority+0xf4> 2007e00: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2007e04: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007e08: 80 a0 60 01 cmp %g1, 1 2007e0c: 12 80 00 17 bne 2007e68 <_Thread_queue_Enqueue_priority+0x19c> 2007e10: 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 ) 2007e14: 80 a4 00 14 cmp %l0, %l4 2007e18: 02 80 00 09 be 2007e3c <_Thread_queue_Enqueue_priority+0x170> 2007e1c: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2007e20: c2 04 40 00 ld [ %l1 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2007e24: 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; 2007e28: 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; 2007e2c: 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; 2007e30: f2 24 40 00 st %i1, [ %l1 ] next_node->previous = the_node; 2007e34: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007e38: 30 80 00 08 b,a 2007e58 <_Thread_queue_Enqueue_priority+0x18c> 2007e3c: 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; 2007e40: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007e44: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 2007e48: 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; 2007e4c: 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; 2007e50: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2007e54: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007e58: 7f ff e7 ad call 2001d0c 2007e5c: b0 10 20 01 mov 1, %i0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2007e60: 81 c7 e0 08 ret 2007e64: 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; 2007e68: 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; 2007e6c: d0 26 80 00 st %o0, [ %i2 ] return the_thread_queue->sync_state; } 2007e70: 81 c7 e0 08 ret 2007e74: 81 e8 00 00 restore 02014bcc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2014bcc: 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; 2014bd0: 35 00 80 e6 sethi %hi(0x2039800), %i2 2014bd4: b2 07 bf f4 add %fp, -12, %i1 2014bd8: ac 07 bf f8 add %fp, -8, %l6 2014bdc: a2 07 bf e8 add %fp, -24, %l1 2014be0: 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(); 2014be4: 37 00 80 e5 sethi %hi(0x2039400), %i3 2014be8: 2b 00 80 e5 sethi %hi(0x2039400), %l5 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2014bec: c0 27 bf f8 clr [ %fp + -8 ] 2014bf0: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 2014bf4: 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); 2014bf8: ec 27 bf f4 st %l6, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2014bfc: 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); 2014c00: 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; 2014c04: b4 16 a0 94 or %i2, 0x94, %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(); 2014c08: b6 16 e3 d4 or %i3, 0x3d4, %i3 2014c0c: aa 15 63 40 or %l5, 0x340, %l5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2014c10: 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 ); 2014c14: 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 ); 2014c18: 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 ); 2014c1c: 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; 2014c20: 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; 2014c24: 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; 2014c28: c2 06 80 00 ld [ %i2 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2014c2c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2014c30: 94 10 00 11 mov %l1, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2014c34: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2014c38: 92 20 40 09 sub %g1, %o1, %o1 2014c3c: 40 00 11 22 call 20190c4 <_Watchdog_Adjust_to_chain> 2014c40: 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; 2014c44: 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(); 2014c48: 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 ) { 2014c4c: 80 a4 00 0a cmp %l0, %o2 2014c50: 08 80 00 06 bleu 2014c68 <_Timer_server_Body+0x9c> 2014c54: 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 ); 2014c58: 90 10 00 12 mov %l2, %o0 2014c5c: 40 00 11 1a call 20190c4 <_Watchdog_Adjust_to_chain> 2014c60: 94 10 00 11 mov %l1, %o2 2014c64: 30 80 00 06 b,a 2014c7c <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 2014c68: 1a 80 00 05 bcc 2014c7c <_Timer_server_Body+0xb0> 2014c6c: 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 ); 2014c70: 90 10 00 12 mov %l2, %o0 2014c74: 40 00 10 ed call 2019028 <_Watchdog_Adjust> 2014c78: 92 10 20 01 mov 1, %o1 } watchdogs->last_snapshot = snapshot; 2014c7c: 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 ); 2014c80: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2014c84: 40 00 02 61 call 2015608 <_Chain_Get> 2014c88: 01 00 00 00 nop if ( timer == NULL ) { 2014c8c: 80 a2 20 00 cmp %o0, 0 2014c90: 02 80 00 0f be 2014ccc <_Timer_server_Body+0x100> 2014c94: 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 ) { 2014c98: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2014c9c: 80 a0 60 01 cmp %g1, 1 2014ca0: 12 80 00 05 bne 2014cb4 <_Timer_server_Body+0xe8> 2014ca4: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2014ca8: 92 02 20 10 add %o0, 0x10, %o1 2014cac: 10 80 00 05 b 2014cc0 <_Timer_server_Body+0xf4> 2014cb0: 90 10 00 14 mov %l4, %o0 } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2014cb4: 12 bf ff f3 bne 2014c80 <_Timer_server_Body+0xb4> 2014cb8: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2014cbc: 90 10 00 12 mov %l2, %o0 2014cc0: 40 00 11 36 call 2019198 <_Watchdog_Insert> 2014cc4: 01 00 00 00 nop 2014cc8: 30 bf ff ee b,a 2014c80 <_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 ); 2014ccc: 7f ff e5 00 call 200e0cc 2014cd0: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2014cd4: c2 07 bf f4 ld [ %fp + -12 ], %g1 2014cd8: 80 a0 40 16 cmp %g1, %l6 2014cdc: 12 80 00 0a bne 2014d04 <_Timer_server_Body+0x138> 2014ce0: 01 00 00 00 nop ts->insert_chain = NULL; 2014ce4: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2014ce8: 7f ff e4 fd call 200e0dc 2014cec: 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 ) ) { 2014cf0: c2 07 bf e8 ld [ %fp + -24 ], %g1 2014cf4: 80 a0 40 13 cmp %g1, %l3 2014cf8: 12 80 00 06 bne 2014d10 <_Timer_server_Body+0x144> 2014cfc: 01 00 00 00 nop 2014d00: 30 80 00 1a b,a 2014d68 <_Timer_server_Body+0x19c> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2014d04: 7f ff e4 f6 call 200e0dc <== NOT EXECUTED 2014d08: 01 00 00 00 nop <== NOT EXECUTED 2014d0c: 30 bf ff c7 b,a 2014c28 <_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 ); 2014d10: 7f ff e4 ef call 200e0cc 2014d14: 01 00 00 00 nop 2014d18: 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)); 2014d1c: 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)) 2014d20: 80 a4 00 13 cmp %l0, %l3 2014d24: 02 80 00 0e be 2014d5c <_Timer_server_Body+0x190> 2014d28: 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; 2014d2c: c2 04 00 00 ld [ %l0 ], %g1 the_chain->first = new_first; 2014d30: c2 27 bf e8 st %g1, [ %fp + -24 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 2014d34: 02 80 00 0a be 2014d5c <_Timer_server_Body+0x190> 2014d38: e2 20 60 04 st %l1, [ %g1 + 4 ] watchdog->state = WATCHDOG_INACTIVE; 2014d3c: c0 24 20 08 clr [ %l0 + 8 ] _ISR_Enable( level ); 2014d40: 7f ff e4 e7 call 200e0dc 2014d44: 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 ); 2014d48: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 2014d4c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2014d50: 9f c0 40 00 call %g1 2014d54: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 } 2014d58: 30 bf ff ee b,a 2014d10 <_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 ); 2014d5c: 7f ff e4 e0 call 200e0dc 2014d60: 90 10 00 02 mov %g2, %o0 2014d64: 30 bf ff b0 b,a 2014c24 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2014d68: c0 2e 20 7c clrb [ %i0 + 0x7c ] 2014d6c: c2 05 40 00 ld [ %l5 ], %g1 2014d70: 82 00 60 01 inc %g1 2014d74: c2 25 40 00 st %g1, [ %l5 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2014d78: d0 06 00 00 ld [ %i0 ], %o0 2014d7c: 40 00 0e 1b call 20185e8 <_Thread_Set_state> 2014d80: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2014d84: 7f ff ff 68 call 2014b24 <_Timer_server_Reset_interval_system_watchdog> 2014d88: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2014d8c: 7f ff ff 7b call 2014b78 <_Timer_server_Reset_tod_system_watchdog> 2014d90: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2014d94: 40 00 0b 53 call 2017ae0 <_Thread_Enable_dispatch> 2014d98: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2014d9c: 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; 2014da0: 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 ); 2014da4: 40 00 11 5a call 201930c <_Watchdog_Remove> 2014da8: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2014dac: 40 00 11 58 call 201930c <_Watchdog_Remove> 2014db0: 90 10 00 1d mov %i5, %o0 2014db4: 30 bf ff 9c b,a 2014c24 <_Timer_server_Body+0x58>