02005d0c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2005d0c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005d10: 03 00 80 5a sethi %hi(0x2016800), %g1 2005d14: e0 00 62 c4 ld [ %g1 + 0x2c4 ], %l0 ! 2016ac4 <_API_extensions_List> 2005d18: 82 10 62 c4 or %g1, 0x2c4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005d1c: 10 80 00 08 b 2005d3c <_API_extensions_Run_postdriver+0x30> 2005d20: a2 00 60 04 add %g1, 4, %l1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 2005d24: 80 a0 60 00 cmp %g1, 0 2005d28: 22 80 00 05 be,a 2005d3c <_API_extensions_Run_postdriver+0x30> 2005d2c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 2005d30: 9f c0 40 00 call %g1 2005d34: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 2005d38: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005d3c: 80 a4 00 11 cmp %l0, %l1 2005d40: 32 bf ff f9 bne,a 2005d24 <_API_extensions_Run_postdriver+0x18> 2005d44: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 2005d48: 81 c7 e0 08 ret 2005d4c: 81 e8 00 00 restore 02005d50 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 2005d50: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005d54: 03 00 80 5a sethi %hi(0x2016800), %g1 2005d58: e0 00 62 c4 ld [ %g1 + 0x2c4 ], %l0 ! 2016ac4 <_API_extensions_List> 2005d5c: 82 10 62 c4 or %g1, 0x2c4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005d60: a4 00 60 04 add %g1, 4, %l2 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 2005d64: 03 00 80 5a sethi %hi(0x2016800), %g1 2005d68: 10 80 00 08 b 2005d88 <_API_extensions_Run_postswitch+0x38> 2005d6c: a2 10 61 44 or %g1, 0x144, %l1 ! 2016944 <_Thread_Executing> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 2005d70: 80 a0 60 00 cmp %g1, 0 2005d74: 22 80 00 05 be,a 2005d88 <_API_extensions_Run_postswitch+0x38> 2005d78: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 2005d7c: 9f c0 40 00 call %g1 2005d80: d0 04 40 00 ld [ %l1 ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 2005d84: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005d88: 80 a4 00 12 cmp %l0, %l2 2005d8c: 32 bf ff f9 bne,a 2005d70 <_API_extensions_Run_postswitch+0x20> 2005d90: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); } } 2005d94: 81 c7 e0 08 ret 2005d98: 81 e8 00 00 restore 02005cc8 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 2005cc8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005ccc: 03 00 80 5a sethi %hi(0x2016800), %g1 2005cd0: e0 00 62 c4 ld [ %g1 + 0x2c4 ], %l0 ! 2016ac4 <_API_extensions_List> 2005cd4: 82 10 62 c4 or %g1, 0x2c4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005cd8: 10 80 00 08 b 2005cf8 <_API_extensions_Run_predriver+0x30> 2005cdc: a2 00 60 04 add %g1, 4, %l1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 2005ce0: 80 a0 60 00 cmp %g1, 0 2005ce4: 22 80 00 05 be,a 2005cf8 <_API_extensions_Run_predriver+0x30> 2005ce8: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 2005cec: 9f c0 40 00 call %g1 <== NOT EXECUTED 2005cf0: 01 00 00 00 nop <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 2005cf4: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005cf8: 80 a4 00 11 cmp %l0, %l1 2005cfc: 32 bf ff f9 bne,a 2005ce0 <_API_extensions_Run_predriver+0x18> 2005d00: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 2005d04: 81 c7 e0 08 ret 2005d08: 81 e8 00 00 restore 020124f4 <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 20124f4: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 20124f8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 20124fc: a4 10 00 18 mov %i0, %l2 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 2012500: 80 a6 80 01 cmp %i2, %g1 2012504: 18 80 00 17 bgu 2012560 <_CORE_message_queue_Broadcast+0x6c> 2012508: b0 10 20 01 mov 1, %i0 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 201250c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 2012510: 80 a0 60 00 cmp %g1, 0 2012514: 02 80 00 0a be 201253c <_CORE_message_queue_Broadcast+0x48> 2012518: a2 10 20 00 clr %l1 *count = 0; 201251c: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 2012520: 81 c7 e0 08 ret <== NOT EXECUTED 2012524: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2012528: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 201252c: 40 00 1f 44 call 201a23c 2012530: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2012534: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2012538: f4 20 40 00 st %i2, [ %g1 ] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 201253c: 40 00 09 d2 call 2014c84 <_Thread_queue_Dequeue> 2012540: 90 10 00 12 mov %l2, %o0 2012544: 92 10 00 19 mov %i1, %o1 2012548: a0 10 00 08 mov %o0, %l0 201254c: 80 a2 20 00 cmp %o0, 0 2012550: 12 bf ff f6 bne 2012528 <_CORE_message_queue_Broadcast+0x34> 2012554: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 2012558: e2 27 40 00 st %l1, [ %i5 ] 201255c: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 2012560: 81 c7 e0 08 ret 2012564: 81 e8 00 00 restore 02014b04 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 2014b04: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 2014b08: 03 20 00 00 sethi %hi(0x80000000), %g1 2014b0c: 80 a6 80 01 cmp %i2, %g1 2014b10: 02 80 00 15 be 2014b64 <_CORE_message_queue_Insert_message+0x60> 2014b14: f4 26 60 08 st %i2, [ %i1 + 8 ] 2014b18: 82 00 7c 00 add %g1, -1024, %g1 2014b1c: 82 10 63 ff or %g1, 0x3ff, %g1 2014b20: 80 a6 80 01 cmp %i2, %g1 2014b24: 12 80 00 1f bne 2014ba0 <_CORE_message_queue_Insert_message+0x9c> 2014b28: a2 06 20 54 add %i0, 0x54, %l1 case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 2014b2c: 7f ff b6 78 call 200250c 2014b30: 01 00 00 00 nop Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2014b34: e2 26 40 00 st %l1, [ %i1 ] if ( the_message_queue->number_of_pending_messages++ == 0 ) 2014b38: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 old_last_node = the_chain->last; 2014b3c: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 the_chain->last = the_node; 2014b40: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 2014b44: 80 a0 00 01 cmp %g0, %g1 old_last_node->next = the_node; the_node->previous = old_last_node; 2014b48: c4 26 60 04 st %g2, [ %i1 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2014b4c: f2 20 80 00 st %i1, [ %g2 ] 2014b50: 82 00 60 01 inc %g1 2014b54: 84 60 3f ff subx %g0, -1, %g2 2014b58: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 2014b5c: a0 10 00 02 mov %g2, %l0 notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 2014b60: 30 80 00 27 b,a 2014bfc <_CORE_message_queue_Insert_message+0xf8> break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 2014b64: 7f ff b6 6a call 200250c 2014b68: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 2014b6c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2014b70: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 2014b74: 82 06 20 50 add %i0, 0x50, %g1 { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; 2014b78: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2014b7c: c2 26 60 04 st %g1, [ %i1 + 4 ] 2014b80: 80 a0 00 02 cmp %g0, %g2 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 2014b84: f2 20 e0 04 st %i1, [ %g3 + 4 ] 2014b88: 82 60 3f ff subx %g0, -1, %g1 2014b8c: 84 00 a0 01 inc %g2 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 2014b90: c6 26 40 00 st %g3, [ %i1 ] 2014b94: a0 10 00 01 mov %g1, %l0 2014b98: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 2014b9c: 30 80 00 18 b,a 2014bfc <_CORE_message_queue_Insert_message+0xf8> CORE_message_queue_Buffer_control *this_message; Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 2014ba0: 10 80 00 06 b 2014bb8 <_CORE_message_queue_Insert_message+0xb4> <== NOT EXECUTED 2014ba4: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 2014ba8: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 2014bac: 14 80 00 06 bg 2014bc4 <_CORE_message_queue_Insert_message+0xc0> <== NOT EXECUTED 2014bb0: 01 00 00 00 nop <== NOT EXECUTED the_node = the_node->next; 2014bb4: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 2014bb8: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 2014bbc: 32 bf ff fb bne,a 2014ba8 <_CORE_message_queue_Insert_message+0xa4> <== NOT EXECUTED 2014bc0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 2014bc4: 7f ff b6 52 call 200250c <== NOT EXECUTED 2014bc8: 01 00 00 00 nop <== NOT EXECUTED if ( the_message_queue->number_of_pending_messages++ == 0 ) notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 2014bcc: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 2014bd0: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2014bd4: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2014bd8: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2014bdc: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 2014be0: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 2014be4: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 2014be8: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 2014bec: 84 00 a0 01 inc %g2 <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 2014bf0: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 2014bf4: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 2014bf8: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 2014bfc: 7f ff b6 48 call 200251c 2014c00: 01 00 00 00 nop * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 2014c04: 80 8c 20 ff btst 0xff, %l0 2014c08: 02 80 00 08 be 2014c28 <_CORE_message_queue_Insert_message+0x124> 2014c0c: 01 00 00 00 nop 2014c10: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 2014c14: 80 a0 60 00 cmp %g1, 0 2014c18: 02 80 00 04 be 2014c28 <_CORE_message_queue_Insert_message+0x124> 2014c1c: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 2014c20: 9f c0 40 00 call %g1 <== NOT EXECUTED 2014c24: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 2014c28: 81 c7 e0 08 ret 2014c2c: 81 e8 00 00 restore 02011c9c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 2011c9c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 2011ca0: 27 00 80 95 sethi %hi(0x2025400), %l3 2011ca4: e2 04 e0 e4 ld [ %l3 + 0xe4 ], %l1 ! 20254e4 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 2011ca8: a4 10 00 19 mov %i1, %l2 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 2011cac: c0 24 60 34 clr [ %l1 + 0x34 ] _ISR_Disable( level ); 2011cb0: 7f ff c2 17 call 200250c 2011cb4: a0 10 00 18 mov %i0, %l0 2011cb8: 86 10 00 08 mov %o0, %g3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2011cbc: f2 06 20 50 ld [ %i0 + 0x50 ], %i1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2011cc0: 82 06 20 54 add %i0, 0x54, %g1 2011cc4: 80 a6 40 01 cmp %i1, %g1 2011cc8: 02 80 00 24 be 2011d58 <_CORE_message_queue_Seize+0xbc> 2011ccc: 84 06 20 50 add %i0, 0x50, %g2 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 2011cd0: c2 06 40 00 ld [ %i1 ], %g1 the_chain->first = new_first; 2011cd4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 2011cd8: 80 a6 60 00 cmp %i1, 0 2011cdc: 02 80 00 1f be 2011d58 <_CORE_message_queue_Seize+0xbc> 2011ce0: c4 20 60 04 st %g2, [ %g1 + 4 ] the_message_queue->number_of_pending_messages -= 1; 2011ce4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2011ce8: 82 00 7f ff add %g1, -1, %g1 2011cec: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 2011cf0: 7f ff c2 0b call 200251c 2011cf4: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 2011cf8: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 2011cfc: c4 04 e0 e4 ld [ %l3 + 0xe4 ], %g2 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 2011d00: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 2011d04: c2 06 60 08 ld [ %i1 + 8 ], %g1 2011d08: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2011d0c: 92 10 00 11 mov %l1, %o1 2011d10: 40 00 13 43 call 2016a1c 2011d14: 90 10 00 1a mov %i2, %o0 * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 2011d18: 7f ff ea 6f call 200c6d4 <_Thread_queue_Dequeue> 2011d1c: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 2011d20: 80 a2 20 00 cmp %o0, 0 2011d24: 32 80 00 04 bne,a 2011d34 <_CORE_message_queue_Seize+0x98> 2011d28: d4 02 20 30 ld [ %o0 + 0x30 ], %o2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 2011d2c: 7f ff e3 63 call 200aab8 <_Chain_Append> 2011d30: 91 ee 20 68 restore %i0, 0x68, %o0 * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 2011d34: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 2011d38: d4 26 60 0c st %o2, [ %i1 + 0xc ] <== NOT EXECUTED * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 2011d3c: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2011d40: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 2011d44: 40 00 13 36 call 2016a1c <== NOT EXECUTED 2011d48: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 2011d4c: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 2011d50: 40 00 0b 6d call 2014b04 <_CORE_message_queue_Insert_message> <== NOT EXECUTED 2011d54: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 2011d58: 80 8f 20 ff btst 0xff, %i4 2011d5c: 12 80 00 08 bne 2011d7c <_CORE_message_queue_Seize+0xe0> 2011d60: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 2011d64: 7f ff c1 ee call 200251c 2011d68: 90 10 00 03 mov %g3, %o0 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 2011d6c: 82 10 20 04 mov 4, %g1 2011d70: c2 24 60 34 st %g1, [ %l1 + 0x34 ] executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 2011d74: 81 c7 e0 08 ret 2011d78: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2011d7c: c2 24 20 30 st %g1, [ %l0 + 0x30 ] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 2011d80: f6 24 60 28 st %i3, [ %l1 + 0x28 ] return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 2011d84: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 2011d88: f4 24 60 2c st %i2, [ %l1 + 0x2c ] executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 2011d8c: e0 24 60 44 st %l0, [ %l1 + 0x44 ] executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 2011d90: 90 10 00 03 mov %g3, %o0 2011d94: 7f ff c1 e2 call 200251c 2011d98: 35 00 80 33 sethi %hi(0x200cc00), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 2011d9c: b0 10 00 10 mov %l0, %i0 2011da0: b2 10 00 1d mov %i5, %i1 2011da4: 7f ff ea b1 call 200c868 <_Thread_queue_Enqueue_with_handler> 2011da8: 95 ee a0 34 restore %i2, 0x34, %o2 2011dac: 01 00 00 00 nop 02011db0 <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 2011db0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 2011db4: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 2011db8: a2 10 00 18 mov %i0, %l1 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 2011dbc: 80 a6 80 01 cmp %i2, %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 2011dc0: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 2011dc4: 18 80 00 3f bgu 2011ec0 <_CORE_message_queue_Submit+0x110> 2011dc8: b0 10 20 01 mov 1, %i0 /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 2011dcc: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 2011dd0: 80 a0 60 00 cmp %g1, 0 2011dd4: 32 80 00 0f bne,a 2011e10 <_CORE_message_queue_Submit+0x60> 2011dd8: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 2011ddc: 7f ff ea 3e call 200c6d4 <_Thread_queue_Dequeue> 2011de0: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 2011de4: a0 92 20 00 orcc %o0, 0, %l0 2011de8: 02 80 00 09 be 2011e0c <_CORE_message_queue_Submit+0x5c> 2011dec: 92 10 00 19 mov %i1, %o1 2011df0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2011df4: 40 00 13 0a call 2016a1c 2011df8: 94 10 00 1a mov %i2, %o2 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2011dfc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 2011e00: fa 24 20 24 st %i5, [ %l0 + 0x24 ] _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2011e04: 10 80 00 15 b 2011e58 <_CORE_message_queue_Submit+0xa8> 2011e08: f4 20 40 00 st %i2, [ %g1 ] /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 2011e0c: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 2011e10: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 2011e14: 80 a0 80 01 cmp %g2, %g1 2011e18: 1a 80 00 12 bcc 2011e60 <_CORE_message_queue_Submit+0xb0> 2011e1c: 80 a4 a0 00 cmp %l2, 0 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 2011e20: 7f ff e3 32 call 200aae8 <_Chain_Get> 2011e24: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 2011e28: a0 92 20 00 orcc %o0, 0, %l0 2011e2c: 02 80 00 27 be 2011ec8 <_CORE_message_queue_Submit+0x118> 2011e30: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2011e34: 94 10 00 1a mov %i2, %o2 2011e38: 40 00 12 f9 call 2016a1c 2011e3c: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 2011e40: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 2011e44: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 2011e48: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 2011e4c: 92 10 00 10 mov %l0, %o1 2011e50: 40 00 0b 2d call 2014b04 <_CORE_message_queue_Insert_message> 2011e54: 94 10 00 1d mov %i5, %o2 2011e58: 81 c7 e0 08 ret 2011e5c: 91 e8 20 00 restore %g0, 0, %o0 * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 2011e60: 02 80 00 18 be 2011ec0 <_CORE_message_queue_Submit+0x110> 2011e64: b0 10 20 02 mov 2, %i0 /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 2011e68: 03 00 80 95 sethi %hi(0x2025400), %g1 <== NOT EXECUTED 2011e6c: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 20254c0 <_ISR_Nest_level> <== NOT EXECUTED 2011e70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2011e74: 32 80 00 13 bne,a 2011ec0 <_CORE_message_queue_Submit+0x110> <== NOT EXECUTED 2011e78: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 2011e7c: 03 00 80 95 sethi %hi(0x2025400), %g1 <== NOT EXECUTED _ISR_Disable( level ); 2011e80: 7f ff c1 a3 call 200250c <== NOT EXECUTED 2011e84: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20254e4 <_Thread_Executing> <== NOT EXECUTED 2011e88: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2011e8c: c2 24 60 30 st %g1, [ %l1 + 0x30 ] <== NOT EXECUTED _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 2011e90: fa 24 20 24 st %i5, [ %l0 + 0x24 ] <== NOT EXECUTED Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 2011e94: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 2011e98: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 2011e9c: f4 24 20 30 st %i2, [ %l0 + 0x30 ] <== NOT EXECUTED { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 2011ea0: e2 24 20 44 st %l1, [ %l0 + 0x44 ] <== NOT EXECUTED executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 2011ea4: 7f ff c1 9e call 200251c <== NOT EXECUTED 2011ea8: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 2011eac: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 2011eb0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2011eb4: 15 00 80 33 sethi %hi(0x200cc00), %o2 <== NOT EXECUTED 2011eb8: 7f ff ea 6c call 200c868 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 2011ebc: 94 12 a0 34 or %o2, 0x34, %o2 ! 200cc34 <_Thread_queue_Timeout> <== NOT EXECUTED 2011ec0: 81 c7 e0 08 ret 2011ec4: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 2011ec8: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 2011ecc: 81 c7 e0 08 ret <== NOT EXECUTED 2011ed0: 81 e8 00 00 restore <== NOT EXECUTED 0200af8c <_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 ) { 200af8c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 200af90: 03 00 80 5a sethi %hi(0x2016800), %g1 200af94: c4 00 61 44 ld [ %g1 + 0x144 ], %g2 ! 2016944 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 200af98: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200af9c: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200afa0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200afa4: 80 a0 60 00 cmp %g1, 0 200afa8: 22 80 00 32 be,a 200b070 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 200afac: c6 06 20 5c ld [ %i0 + 0x5c ], %g3 the_mutex->lock = CORE_MUTEX_LOCKED; 200afb0: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200afb4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 200afb8: c6 06 20 48 ld [ %i0 + 0x48 ], %g3 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; 200afbc: c2 26 20 60 st %g1, [ %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; 200afc0: c4 26 20 5c st %g2, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200afc4: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200afc8: 80 a0 e0 02 cmp %g3, 2 200afcc: 02 80 00 05 be 200afe0 <_CORE_mutex_Seize_interrupt_trylock+0x54> 200afd0: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 200afd4: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 200afd8: 32 80 00 06 bne,a 200aff0 <_CORE_mutex_Seize_interrupt_trylock+0x64> <== NOT EXECUTED 200afdc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 200afe0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200afe4: 82 00 60 01 inc %g1 200afe8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200afec: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200aff0: 80 a0 60 03 cmp %g1, 3 200aff4: 22 80 00 03 be,a 200b000 <_CORE_mutex_Seize_interrupt_trylock+0x74> 200aff8: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 200affc: 30 80 00 2c b,a 200b0ac <_CORE_mutex_Seize_interrupt_trylock+0x120> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 200b000: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 200b004: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 200b008: 12 80 00 03 bne 200b014 <_CORE_mutex_Seize_interrupt_trylock+0x88> <== NOT EXECUTED 200b00c: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 200b010: 30 80 00 27 b,a 200b0ac <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 200b014: 08 80 00 0f bleu 200b050 <_CORE_mutex_Seize_interrupt_trylock+0xc4> <== NOT EXECUTED 200b018: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200b01c: 05 00 80 5a sethi %hi(0x2016800), %g2 <== NOT EXECUTED 200b020: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 2016880 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 200b024: 82 00 60 01 inc %g1 <== NOT EXECUTED 200b028: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 200b02c: 7f ff db 49 call 2001d50 <== NOT EXECUTED 200b030: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 200b034: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 200b038: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 200b03c: 7f ff ef e6 call 2006fd4 <_Thread_Change_priority> <== NOT EXECUTED 200b040: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 200b044: 7f ff f1 72 call 200760c <_Thread_Enable_dispatch> <== NOT EXECUTED 200b048: b0 10 20 00 clr %i0 <== NOT EXECUTED 200b04c: 30 80 00 1a b,a 200b0b4 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200b050: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 200b054: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 200b058: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 200b05c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200b060: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 200b064: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200b068: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 200b06c: 30 80 00 10 b,a 200b0ac <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED /* * 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 ) ) { 200b070: 80 a0 c0 02 cmp %g3, %g2 200b074: 12 80 00 12 bne 200b0bc <_CORE_mutex_Seize_interrupt_trylock+0x130> 200b078: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 200b07c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200b080: 80 a0 60 00 cmp %g1, 0 200b084: 22 80 00 07 be,a 200b0a0 <_CORE_mutex_Seize_interrupt_trylock+0x114> 200b088: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200b08c: 80 a0 60 01 cmp %g1, 1 200b090: 12 80 00 0b bne 200b0bc <_CORE_mutex_Seize_interrupt_trylock+0x130> 200b094: 82 10 20 02 mov 2, %g1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 200b098: 10 80 00 05 b 200b0ac <_CORE_mutex_Seize_interrupt_trylock+0x120> 200b09c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] * 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++; 200b0a0: 82 00 60 01 inc %g1 200b0a4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 200b0a8: 30 80 00 01 b,a 200b0ac <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( level ); 200b0ac: 7f ff db 29 call 2001d50 200b0b0: b0 10 20 00 clr %i0 200b0b4: 81 c7 e0 08 ret 200b0b8: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200b0bc: 81 c7 e0 08 ret 200b0c0: 91 e8 20 01 restore %g0, 1, %o0 020060c8 <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 20060c8: 9d e3 bf 98 save %sp, -104, %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 ) { 20060cc: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 20060d0: 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 ) { 20060d4: 80 a0 60 00 cmp %g1, 0 20060d8: 02 80 00 07 be 20060f4 <_CORE_mutex_Surrender+0x2c> 20060dc: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 20060e0: 03 00 80 5a sethi %hi(0x2016800), %g1 20060e4: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 ! 2016944 <_Thread_Executing> 20060e8: 80 a2 00 01 cmp %o0, %g1 20060ec: 12 80 00 52 bne 2006234 <_CORE_mutex_Surrender+0x16c> 20060f0: 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 ) 20060f4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 20060f8: 80 a0 60 00 cmp %g1, 0 20060fc: 02 80 00 4d be 2006230 <_CORE_mutex_Surrender+0x168> 2006100: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 2006104: 80 a0 60 00 cmp %g1, 0 2006108: 02 80 00 09 be 200612c <_CORE_mutex_Surrender+0x64> 200610c: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 2006110: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2006114: 80 a0 60 00 cmp %g1, 0 2006118: 02 80 00 47 be 2006234 <_CORE_mutex_Surrender+0x16c> 200611c: b0 10 20 00 clr %i0 2006120: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2006124: 02 80 00 44 be 2006234 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 2006128: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 200612c: 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 ) || 2006130: 80 a0 60 02 cmp %g1, 2 2006134: 02 80 00 04 be 2006144 <_CORE_mutex_Surrender+0x7c> 2006138: 80 a0 60 03 cmp %g1, 3 200613c: 32 80 00 07 bne,a 2006158 <_CORE_mutex_Surrender+0x90> 2006140: 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--; 2006144: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2006148: 82 00 7f ff add %g1, -1, %g1 200614c: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 2006150: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 2006154: 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 ) || 2006158: 80 a0 60 02 cmp %g1, 2 200615c: 02 80 00 05 be 2006170 <_CORE_mutex_Surrender+0xa8> 2006160: c0 24 20 60 clr [ %l0 + 0x60 ] 2006164: 80 a0 60 03 cmp %g1, 3 2006168: 12 80 00 0d bne 200619c <_CORE_mutex_Surrender+0xd4> 200616c: 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 && 2006170: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2006174: 80 a0 60 00 cmp %g1, 0 2006178: 12 80 00 09 bne 200619c <_CORE_mutex_Surrender+0xd4> 200617c: 01 00 00 00 nop 2006180: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 2006184: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2006188: 80 a2 40 01 cmp %o1, %g1 200618c: 02 80 00 04 be 200619c <_CORE_mutex_Surrender+0xd4> 2006190: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 2006194: 40 00 03 90 call 2006fd4 <_Thread_Change_priority> 2006198: 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 ) ) ) { 200619c: 40 00 06 0e call 20079d4 <_Thread_queue_Dequeue> 20061a0: 90 10 00 10 mov %l0, %o0 20061a4: 86 92 20 00 orcc %o0, 0, %g3 20061a8: 02 80 00 1f be 2006224 <_CORE_mutex_Surrender+0x15c> 20061ac: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 20061b0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 20061b4: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 20061b8: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 20061bc: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 20061c0: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 20061c4: 80 a0 a0 02 cmp %g2, 2 20061c8: 02 80 00 07 be 20061e4 <_CORE_mutex_Surrender+0x11c> 20061cc: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 20061d0: 80 a0 a0 03 cmp %g2, 3 20061d4: 12 80 00 18 bne 2006234 <_CORE_mutex_Surrender+0x16c> 20061d8: 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++; 20061dc: 10 80 00 07 b 20061f8 <_CORE_mutex_Surrender+0x130> <== NOT EXECUTED 20061e0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 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++; 20061e4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 20061e8: 82 00 60 01 inc %g1 20061ec: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 20061f0: 81 c7 e0 08 ret 20061f4: 91 e8 20 00 restore %g0, 0, %o0 #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++; if (the_mutex->Attributes.priority_ceiling < 20061f8: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED 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++; 20061fc: 82 00 60 01 inc %g1 <== NOT EXECUTED 2006200: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 2006204: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 2006208: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 200620c: 3a 80 00 0a bcc,a 2006234 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 2006210: b0 10 20 00 clr %i0 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 2006214: 40 00 03 70 call 2006fd4 <_Thread_Change_priority> <== NOT EXECUTED 2006218: 94 10 20 00 clr %o2 <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 200621c: 81 c7 e0 08 ret <== NOT EXECUTED 2006220: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 2006224: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 2006228: 81 c7 e0 08 ret 200622c: 91 e8 20 00 restore %g0, 0, %o0 2006230: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 2006234: 81 c7 e0 08 ret 2006238: 81 e8 00 00 restore 02021454 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 2021454: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 2021458: 7f ff 86 09 call 2002c7c <== NOT EXECUTED 202145c: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2021460: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2021464: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2021468: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 202146c: f2 20 60 04 st %i1, [ %g1 + 4 ] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 2021470: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 2021474: 7f ff 86 06 call 2002c8c <== NOT EXECUTED 2021478: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 202147c: 01 00 00 00 nop 0200ae80 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 200ae80: 03 00 80 5a sethi %hi(0x2016800), %g1 <== NOT EXECUTED 200ae84: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 2016948 <_Debug_Level> <== NOT EXECUTED 200ae88: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED 200ae8c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 200ae90: 81 c3 e0 08 retl <== NOT EXECUTED 200ae94: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 02004f6c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2004f6c: 9d e3 bf 98 save %sp, -104, %sp rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 2004f70: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2004f74: 7f ff f3 73 call 2001d40 2004f78: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 2004f7c: b2 10 00 08 mov %o0, %i1 pending_events = api->pending_events; 2004f80: c8 04 00 00 ld [ %l0 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 2004f84: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 2004f88: 86 88 80 04 andcc %g2, %g4, %g3 2004f8c: 12 80 00 03 bne 2004f98 <_Event_Surrender+0x2c> 2004f90: 03 00 80 5a sethi %hi(0x2016800), %g1 _ISR_Enable( level ); 2004f94: 30 80 00 42 b,a 200509c <_Event_Surrender+0x130> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 2004f98: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 2016920 <_ISR_Nest_level> 2004f9c: 80 a0 60 00 cmp %g1, 0 2004fa0: 22 80 00 1e be,a 2005018 <_Event_Surrender+0xac> 2004fa4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2004fa8: 03 00 80 5a sethi %hi(0x2016800), %g1 2004fac: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 ! 2016944 <_Thread_Executing> 2004fb0: 80 a6 00 01 cmp %i0, %g1 2004fb4: 32 80 00 19 bne,a 2005018 <_Event_Surrender+0xac> 2004fb8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2004fbc: 1b 00 80 5a sethi %hi(0x2016800), %o5 2004fc0: c2 03 63 54 ld [ %o5 + 0x354 ], %g1 ! 2016b54 <_Event_Sync_state> 2004fc4: 80 a0 60 01 cmp %g1, 1 2004fc8: 02 80 00 07 be 2004fe4 <_Event_Surrender+0x78> 2004fcc: 80 a0 c0 02 cmp %g3, %g2 2004fd0: c2 03 63 54 ld [ %o5 + 0x354 ], %g1 2004fd4: 80 a0 60 02 cmp %g1, 2 2004fd8: 32 80 00 10 bne,a 2005018 <_Event_Surrender+0xac> 2004fdc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 2004fe0: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 2004fe4: 02 80 00 04 be 2004ff4 <_Event_Surrender+0x88> 2004fe8: 80 8c 60 02 btst 2, %l1 2004fec: 02 80 00 0a be 2005014 <_Event_Surrender+0xa8> <== NOT EXECUTED 2004ff0: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2004ff4: 82 29 00 03 andn %g4, %g3, %g1 2004ff8: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2004ffc: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 2005000: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005004: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005008: 84 10 20 03 mov 3, %g2 200500c: 03 00 80 5a sethi %hi(0x2016800), %g1 2005010: c4 20 63 54 st %g2, [ %g1 + 0x354 ] ! 2016b54 <_Event_Sync_state> } _ISR_Enable( level ); 2005014: 30 80 00 22 b,a 200509c <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005018: 80 88 61 00 btst 0x100, %g1 200501c: 02 80 00 20 be 200509c <_Event_Surrender+0x130> 2005020: 80 a0 c0 02 cmp %g3, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005024: 02 80 00 04 be 2005034 <_Event_Surrender+0xc8> 2005028: 80 8c 60 02 btst 2, %l1 200502c: 02 80 00 1c be 200509c <_Event_Surrender+0x130> 2005030: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005034: 82 29 00 03 andn %g4, %g3, %g1 2005038: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 200503c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 2005040: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005044: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 2005048: 7f ff f3 42 call 2001d50 200504c: 90 10 00 19 mov %i1, %o0 2005050: 7f ff f3 3c call 2001d40 2005054: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005058: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200505c: 80 a0 60 02 cmp %g1, 2 2005060: 02 80 00 06 be 2005078 <_Event_Surrender+0x10c> 2005064: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005068: 7f ff f3 3a call 2001d50 200506c: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2005070: 10 80 00 08 b 2005090 <_Event_Surrender+0x124> 2005074: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2005078: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200507c: 7f ff f3 35 call 2001d50 2005080: 90 10 00 19 mov %i1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 2005084: 40 00 0e 32 call 200894c <_Watchdog_Remove> 2005088: 90 06 20 48 add %i0, 0x48, %o0 200508c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 2005090: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005094: 40 00 08 48 call 20071b4 <_Thread_Clear_state> 2005098: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200509c: 7f ff f3 2d call 2001d50 20050a0: 91 e8 00 19 restore %g0, %i1, %o0 20050a4: 01 00 00 00 nop 020050a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 20050a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 20050ac: 90 10 00 18 mov %i0, %o0 20050b0: 40 00 09 64 call 2007640 <_Thread_Get> 20050b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20050b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20050bc: 80 a0 60 00 cmp %g1, 0 20050c0: 12 80 00 0f bne 20050fc <_Event_Timeout+0x54> 20050c4: b0 10 00 08 mov %o0, %i0 * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 20050c8: 7f ff f3 1e call 2001d40 20050cc: 01 00 00 00 nop 20050d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 20050d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20050d8: 80 a0 60 00 cmp %g1, 0 20050dc: 12 80 00 0a bne 2005104 <_Event_Timeout+0x5c> 20050e0: 03 00 80 5a sethi %hi(0x2016800), %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20050e4: 05 00 80 5a sethi %hi(0x2016800), %g2 <== NOT EXECUTED 20050e8: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 2016880 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 20050ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20050f0: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 20050f4: 7f ff f3 17 call 2001d50 <== NOT EXECUTED 20050f8: 01 00 00 00 nop <== NOT EXECUTED 20050fc: 81 c7 e0 08 ret <== NOT EXECUTED 2005100: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005104: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 2005108: 80 a6 00 01 cmp %i0, %g1 200510c: 12 80 00 09 bne 2005130 <_Event_Timeout+0x88> 2005110: c0 26 20 24 clr [ %i0 + 0x24 ] Thread_blocking_operation_States sync = _Event_Sync_state; 2005114: 05 00 80 5a sethi %hi(0x2016800), %g2 2005118: c2 00 a3 54 ld [ %g2 + 0x354 ], %g1 ! 2016b54 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 200511c: 80 a0 60 01 cmp %g1, 1 2005120: 18 80 00 05 bgu 2005134 <_Event_Timeout+0x8c> 2005124: 82 10 20 06 mov 6, %g1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005128: 82 10 20 02 mov 2, %g1 200512c: c2 20 a3 54 st %g1, [ %g2 + 0x354 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005130: 82 10 20 06 mov 6, %g1 2005134: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 2005138: 7f ff f3 06 call 2001d50 200513c: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2005140: 90 10 00 18 mov %i0, %o0 2005144: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005148: 40 00 08 1b call 20071b4 <_Thread_Clear_state> 200514c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2005150: 05 00 80 5a sethi %hi(0x2016800), %g2 2005154: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 2016880 <_Thread_Dispatch_disable_level> 2005158: 82 00 7f ff add %g1, -1, %g1 200515c: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] 2005160: 81 c7 e0 08 ret 2005164: 81 e8 00 00 restore 020085c4 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 20085c4: 9d e3 bf 98 save %sp, -104, %sp uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 20085c8: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 20085cc: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 20085d0: 90 10 00 19 mov %i1, %o0 20085d4: 40 00 01 5d call 2008b48 <_Heap_Calc_block_size> 20085d8: 92 10 00 14 mov %l4, %o1 void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 20085dc: b2 06 7f fc add %i1, -4, %i1 uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); if(the_size == 0) 20085e0: ba 92 20 00 orcc %o0, 0, %i5 20085e4: 02 80 00 67 be 2008780 <_Heap_Allocate_aligned+0x1bc> 20085e8: 90 10 20 00 clr %o0 return NULL; if(alignment == 0) 20085ec: 80 a6 a0 00 cmp %i2, 0 20085f0: 22 80 00 02 be,a 20085f8 <_Heap_Allocate_aligned+0x34> 20085f4: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 20085f8: e2 06 20 08 ld [ %i0 + 8 ], %l1 20085fc: 10 80 00 59 b 2008760 <_Heap_Allocate_aligned+0x19c> 2008600: aa 10 20 00 clr %l5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2008604: a6 08 7f fe and %g1, -2, %l3 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 2008608: 80 a4 c0 1d cmp %l3, %i5 200860c: 2a 80 00 54 bcs,a 200875c <_Heap_Allocate_aligned+0x198> 2008610: e2 04 60 08 ld [ %l1 + 8 ], %l1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008614: 92 10 00 1a mov %i2, %o1 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 2008618: ae 04 40 13 add %l1, %l3, %l7 aligned_user_addr = block_end - end_to_user_offs; 200861c: a0 25 c0 19 sub %l7, %i1, %l0 2008620: 40 00 3c 0c call 2017650 <.urem> 2008624: 90 10 00 10 mov %l0, %o0 if(block_size >= the_size) { /* the_block is large enough. */ _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 2008628: 92 10 00 14 mov %l4, %o1 200862c: a4 24 00 08 sub %l0, %o0, %l2 2008630: 40 00 3c 08 call 2017650 <.urem> 2008634: 90 10 00 12 mov %l2, %o0 2008638: a0 04 60 08 add %l1, 8, %l0 200863c: 84 24 80 08 sub %l2, %o0, %g2 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 2008640: 80 a0 80 10 cmp %g2, %l0 2008644: 2a 80 00 46 bcs,a 200875c <_Heap_Allocate_aligned+0x198> 2008648: e2 04 60 08 ld [ %l1 + 8 ], %l1 /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 200864c: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 2008650: 82 20 80 10 sub %g2, %l0, %g1 2008654: 80 a0 40 16 cmp %g1, %l6 2008658: 1a 80 00 15 bcc 20086ac <_Heap_Allocate_aligned+0xe8> 200865c: 80 a4 a0 00 cmp %l2, 0 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 2008660: 82 24 80 10 sub %l2, %l0, %g1 2008664: 80 a0 40 14 cmp %g1, %l4 2008668: 0a 80 00 10 bcs 20086a8 <_Heap_Allocate_aligned+0xe4> 200866c: 84 10 00 10 mov %l0, %g2 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 2008670: 90 10 00 10 mov %l0, %o0 2008674: 40 00 3b f7 call 2017650 <.urem> 2008678: 92 10 00 1a mov %i2, %o1 *value = r ? v - r + a : v; 200867c: 82 04 00 1a add %l0, %i2, %g1 2008680: 80 a2 20 00 cmp %o0, 0 2008684: 12 80 00 03 bne 2008690 <_Heap_Allocate_aligned+0xcc> 2008688: 90 20 40 08 sub %g1, %o0, %o0 200868c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 2008690: 82 22 00 10 sub %o0, %l0, %g1 2008694: 80 a0 40 14 cmp %g1, %l4 2008698: 3a 80 00 31 bcc,a 200875c <_Heap_Allocate_aligned+0x198> 200869c: e2 04 60 08 ld [ %l1 + 8 ], %l1 20086a0: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 20086a4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 20086a8: 80 a4 a0 00 cmp %l2, 0 20086ac: 22 80 00 2c be,a 200875c <_Heap_Allocate_aligned+0x198> 20086b0: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 20086b4: 82 05 e0 08 add %l7, 8, %g1 20086b8: a0 20 40 02 sub %g1, %g2, %l0 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 20086bc: 84 24 c0 10 sub %l3, %l0, %g2 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 20086c0: 80 a0 80 16 cmp %g2, %l6 20086c4: 2a 80 00 08 bcs,a 20086e4 <_Heap_Allocate_aligned+0x120> 20086c8: c6 04 60 08 ld [ %l1 + 8 ], %g3 /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 20086cc: 82 10 a0 01 or %g2, 1, %g1 20086d0: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 20086d4: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 20086d8: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 20086dc: 10 80 00 09 b 2008700 <_Heap_Allocate_aligned+0x13c> 20086e0: e0 24 60 04 st %l0, [ %l1 + 4 ] ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 20086e4: c4 04 60 0c ld [ %l1 + 0xc ], %g2 /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 20086e8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 prev->next = next; next->prev = prev; 20086ec: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 20086f0: 82 00 7f ff add %g1, -1, %g1 { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 20086f4: c6 20 a0 08 st %g3, [ %g2 + 8 ] 20086f8: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 20086fc: a0 10 00 13 mov %l3, %l0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2008700: 84 04 40 10 add %l1, %l0, %g2 } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 2008704: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2008708: 82 10 60 01 or %g1, 1, %g1 200870c: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 2008710: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if(stats->min_free_size > stats->free_size) 2008714: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 2008718: 82 20 40 10 sub %g1, %l0, %g1 if(stats->min_free_size > stats->free_size) 200871c: 80 a0 80 01 cmp %g2, %g1 2008720: 08 80 00 03 bleu 200872c <_Heap_Allocate_aligned+0x168> 2008724: c2 26 20 30 st %g1, [ %i0 + 0x30 ] stats->min_free_size = stats->free_size; 2008728: c2 26 20 34 st %g1, [ %i0 + 0x34 ] stats->used_blocks += 1; 200872c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 2008730: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 stats->allocs += 1; 2008734: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 2008738: 82 00 60 01 inc %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 200873c: 86 00 e0 01 inc %g3 stats->allocs += 1; 2008740: 84 00 a0 01 inc %g2 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 2008744: 86 00 c0 15 add %g3, %l5, %g3 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 2008748: c2 26 20 40 st %g1, [ %i0 + 0x40 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 200874c: c4 26 20 48 st %g2, [ %i0 + 0x48 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 2008750: c6 26 20 4c st %g3, [ %i0 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 2008754: 10 80 00 07 b 2008770 <_Heap_Allocate_aligned+0x1ac> 2008758: 90 10 00 12 mov %l2, %o0 /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 200875c: aa 05 60 01 inc %l5 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 2008760: 80 a4 40 18 cmp %l1, %i0 2008764: 32 bf ff a8 bne,a 2008604 <_Heap_Allocate_aligned+0x40> 2008768: c2 04 60 04 ld [ %l1 + 4 ], %g1 200876c: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 2008770: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2008774: 80 a0 40 15 cmp %g1, %l5 2008778: 2a 80 00 02 bcs,a 2008780 <_Heap_Allocate_aligned+0x1bc> 200877c: ea 26 20 44 st %l5, [ %i0 + 0x44 ] stats->max_search = search_count; return user_ptr; } 2008780: 81 c7 e0 08 ret 2008784: 91 e8 00 08 restore %g0, %o0, %o0 0202b9f4 <_Heap_Get_information>: Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 202b9f4: c0 22 40 00 clr [ %o1 ] Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 202b9f8: d8 02 20 24 ld [ %o0 + 0x24 ], %o4 _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; the_info->Free.total = 0; 202b9fc: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 202ba00: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 202ba04: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 202ba08: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; 202ba0c: c0 22 60 10 clr [ %o1 + 0x10 ] Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 202ba10: 10 80 00 23 b 202ba9c <_Heap_Get_information+0xa8> 202ba14: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 202ba18: 88 08 7f fe and %g1, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 202ba1c: 9a 00 80 04 add %g2, %g4, %o5 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 202ba20: c2 03 60 04 ld [ %o5 + 4 ], %g1 202ba24: 80 88 60 01 btst 1, %g1 202ba28: 22 80 00 0d be,a 202ba5c <_Heap_Get_information+0x68> 202ba2c: c2 02 40 00 ld [ %o1 ], %g1 the_info->Used.number++; 202ba30: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.total += the_size; 202ba34: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 202ba38: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 202ba3c: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 202ba40: 84 00 80 04 add %g2, %g4, %g2 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 202ba44: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 202ba48: 80 a0 c0 04 cmp %g3, %g4 202ba4c: 1a 80 00 13 bcc 202ba98 <_Heap_Get_information+0xa4> 202ba50: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 202ba54: 10 80 00 11 b 202ba98 <_Heap_Get_information+0xa4> 202ba58: c8 22 60 10 st %g4, [ %o1 + 0x10 ] } else { the_info->Free.number++; the_info->Free.total += the_size; 202ba5c: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 202ba60: c6 02 60 04 ld [ %o1 + 4 ], %g3 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 202ba64: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 202ba68: 84 00 80 04 add %g2, %g4, %g2 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 202ba6c: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 202ba70: 80 a0 c0 04 cmp %g3, %g4 202ba74: 1a 80 00 03 bcc 202ba80 <_Heap_Get_information+0x8c> 202ba78: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 202ba7c: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 202ba80: c2 03 40 00 ld [ %o5 ], %g1 202ba84: 80 a1 00 01 cmp %g4, %g1 202ba88: 02 80 00 05 be 202ba9c <_Heap_Get_information+0xa8> 202ba8c: 84 10 00 0d mov %o5, %g2 202ba90: 81 c3 e0 08 retl <== NOT EXECUTED 202ba94: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 202ba98: 84 10 00 0d mov %o5, %g2 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 202ba9c: 80 a0 80 0c cmp %g2, %o4 202baa0: 32 bf ff de bne,a 202ba18 <_Heap_Get_information+0x24> 202baa4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 202baa8: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 202baac: 90 10 20 00 clr %o0 202bab0: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 202bab4: 81 c3 e0 08 retl 202bab8: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 020142d0 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 20142d0: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 20142d4: e8 06 20 14 ld [ %i0 + 0x14 ], %l4 uint32_t const page_size = the_heap->page_size; 20142d8: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 *old_mem_size = 0; 20142dc: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 20142e0: c0 27 00 00 clr [ %i4 ] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 20142e4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 20142e8: 7f ff fb ad call 201319c <.urem> 20142ec: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 20142f0: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 20142f4: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 20142f8: 82 06 7f f8 add %i1, -8, %g1 20142fc: a4 20 40 08 sub %g1, %o0, %l2 _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 2014300: 80 a4 80 04 cmp %l2, %g4 2014304: 84 60 3f ff subx %g0, -1, %g2 2014308: 80 a0 c0 12 cmp %g3, %l2 201430c: 82 60 3f ff subx %g0, -1, %g1 2014310: 80 88 80 01 btst %g2, %g1 2014314: 02 80 00 75 be 20144e8 <_Heap_Resize_block+0x218> 2014318: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 201431c: da 04 a0 04 ld [ %l2 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2014320: aa 0b 7f fe and %o5, -2, %l5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2014324: a2 04 80 15 add %l2, %l5, %l1 old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 2014328: 80 a4 40 04 cmp %l1, %g4 201432c: 84 60 3f ff subx %g0, -1, %g2 2014330: 80 a0 c0 11 cmp %g3, %l1 2014334: 82 60 3f ff subx %g0, -1, %g1 2014338: 80 88 80 01 btst %g2, %g1 201433c: 02 80 00 6b be 20144e8 <_Heap_Resize_block+0x218> 2014340: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2014344: c2 04 60 04 ld [ %l1 + 4 ], %g1 2014348: 80 88 60 01 btst 1, %g1 201434c: 02 80 00 67 be 20144e8 <_Heap_Resize_block+0x218> 2014350: 80 a4 40 03 cmp %l1, %g3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2014354: b0 08 7f fe and %g1, -2, %i0 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 2014358: 84 10 20 01 mov 1, %g2 201435c: 02 80 00 04 be 201436c <_Heap_Resize_block+0x9c> 2014360: 82 04 40 18 add %l1, %i0, %g1 2014364: c2 00 60 04 ld [ %g1 + 4 ], %g1 2014368: 84 08 60 01 and %g1, 1, %g2 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 201436c: 82 24 40 19 sub %l1, %i1, %g1 2014370: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 2014374: c2 26 c0 00 st %g1, [ %i3 ] !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 2014378: b2 10 00 02 mov %g2, %i1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 201437c: 80 a6 80 01 cmp %i2, %g1 2014380: 08 80 00 1e bleu 20143f8 <_Heap_Resize_block+0x128> 2014384: b6 0b 60 01 and %o5, 1, %i3 /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 2014388: 80 a6 60 00 cmp %i1, 0 201438c: 12 80 00 59 bne 20144f0 <_Heap_Resize_block+0x220> 2014390: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 2014394: 92 10 00 16 mov %l6, %o1 2014398: 7f ff fb 81 call 201319c <.urem> 201439c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 20143a0: 80 a2 20 00 cmp %o0, 0 20143a4: 02 80 00 05 be 20143b8 <_Heap_Resize_block+0xe8> 20143a8: 80 a4 00 14 cmp %l0, %l4 20143ac: 82 04 00 16 add %l0, %l6, %g1 20143b0: a0 20 40 08 sub %g1, %o0, %l0 20143b4: 80 a4 00 14 cmp %l0, %l4 20143b8: 1a 80 00 03 bcc 20143c4 <_Heap_Resize_block+0xf4> 20143bc: 90 10 00 10 mov %l0, %o0 20143c0: 90 10 00 14 mov %l4, %o0 else { uint32_t add_block_size = size - old_user_size; _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 20143c4: 80 a2 00 18 cmp %o0, %i0 20143c8: 18 80 00 4a bgu 20144f0 <_Heap_Resize_block+0x220> 20143cc: 94 10 00 08 mov %o0, %o2 return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 20143d0: 92 10 00 11 mov %l1, %o1 20143d4: 7f ff c8 6d call 2006588 <_Heap_Block_allocate> 20143d8: 90 10 00 13 mov %l3, %o0 _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 20143dc: 90 02 00 15 add %o0, %l5, %o0 20143e0: 90 12 00 1b or %o0, %i3, %o0 20143e4: d0 24 a0 04 st %o0, [ %l2 + 4 ] --stats->used_blocks; 20143e8: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 20143ec: 82 00 7f ff add %g1, -1, %g1 20143f0: 10 80 00 39 b 20144d4 <_Heap_Resize_block+0x204> 20143f4: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 20143f8: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 20143fc: 92 10 00 16 mov %l6, %o1 2014400: 7f ff fb 67 call 201319c <.urem> 2014404: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 2014408: a0 a4 00 08 subcc %l0, %o0, %l0 201440c: 22 80 00 33 be,a 20144d8 <_Heap_Resize_block+0x208> 2014410: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 2014414: 84 25 40 10 sub %l5, %l0, %g2 if (new_block_size < min_block_size) { 2014418: 80 a0 80 14 cmp %g2, %l4 201441c: 1a 80 00 07 bcc 2014438 <_Heap_Resize_block+0x168> 2014420: 80 a6 60 00 cmp %i1, 0 uint32_t delta = min_block_size - new_block_size; 2014424: 82 25 00 02 sub %l4, %g2, %g1 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 2014428: a0 a4 00 01 subcc %l0, %g1, %l0 201442c: 02 80 00 2a be 20144d4 <_Heap_Resize_block+0x204> 2014430: 84 00 80 01 add %g2, %g1, %g2 _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 2014434: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2014438: 12 80 00 15 bne 201448c <_Heap_Resize_block+0x1bc> 201443c: 80 a4 00 14 cmp %l0, %l4 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 2014440: 82 10 80 1b or %g2, %i3, %g1 if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 2014444: 86 04 00 18 add %l0, %i0, %g3 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 2014448: c2 24 a0 04 st %g1, [ %l2 + 4 ] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 201444c: 82 10 e0 01 or %g3, 1, %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2014450: 84 04 80 02 add %l2, %g2, %g2 next_next_block->prev_size = new_next_block_size; 2014454: c6 24 40 18 st %g3, [ %l1 + %i0 ] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 2014458: da 04 60 0c ld [ %l1 + 0xc ], %o5 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 201445c: c8 04 60 08 ld [ %l1 + 8 ], %g4 _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 2014460: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 2014464: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 2014468: c8 20 a0 08 st %g4, [ %g2 + 8 ] 201446c: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 2014470: da 20 a0 0c st %o5, [ %g2 + 0xc ] 2014474: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 2014478: 86 00 ff fc add %g3, -4, %g3 next->prev = prev->next = block; 201447c: c4 21 20 0c st %g2, [ %g4 + 0xc ] 2014480: c4 23 60 08 st %g2, [ %o5 + 8 ] 2014484: 10 80 00 14 b 20144d4 <_Heap_Resize_block+0x204> 2014488: c6 27 00 00 st %g3, [ %i4 ] } else if (free_block_size >= min_block_size) { 201448c: 2a 80 00 13 bcs,a 20144d8 <_Heap_Resize_block+0x208> <== NOT EXECUTED 2014490: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 2014494: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 2014498: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 201449c: 82 14 20 01 or %l0, 1, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 20144a0: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 20144a4: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 20144a8: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20144ac: c4 04 e0 50 ld [ %l3 + 0x50 ], %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 20144b0: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20144b4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 20144b8: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20144bc: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 20144c0: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 20144c4: 7f ff db 40 call 200b1c4 <_Heap_Free> <== NOT EXECUTED 20144c8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 20144cc: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 20144d0: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 20144d4: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 20144d8: 82 00 60 01 inc %g1 20144dc: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 20144e0: 81 c7 e0 08 ret 20144e4: 91 e8 20 00 restore %g0, 0, %o0 return HEAP_RESIZE_SUCCESSFUL; 20144e8: 81 c7 e0 08 ret 20144ec: 91 e8 20 02 restore %g0, 2, %o0 } 20144f0: 81 c7 e0 08 ret 20144f4: 91 e8 20 01 restore %g0, 1, %o0 0200dcbc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 200dcbc: 9d e3 bf 98 save %sp, -104, %sp 200dcc0: a6 10 00 18 mov %i0, %l3 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200dcc4: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 200dcc8: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200dccc: 16 80 00 03 bge 200dcd8 <_Heap_Walk+0x1c> 200dcd0: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 source = the_heap->stats.instance; 200dcd4: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 200dcd8: c2 04 20 04 ld [ %l0 + 4 ], %g1 200dcdc: 80 88 60 01 btst 1, %g1 200dce0: 12 80 00 07 bne 200dcfc <_Heap_Walk+0x40> 200dce4: b0 10 20 00 clr %i0 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 200dce8: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED 200dcec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200dcf0: 90 12 21 58 or %o0, 0x158, %o0 <== NOT EXECUTED 200dcf4: 7f ff db 27 call 2004990 <== NOT EXECUTED 200dcf8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 200dcfc: c4 04 00 00 ld [ %l0 ], %g2 200dd00: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1 200dd04: 80 a0 80 01 cmp %g2, %g1 200dd08: 22 80 00 5e be,a 200de80 <_Heap_Walk+0x1c4> 200dd0c: 03 00 80 64 sethi %hi(0x2019000), %g1 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 200dd10: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED 200dd14: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200dd18: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED 200dd1c: 7f ff db 1d call 2004990 <== NOT EXECUTED 200dd20: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200dd24: 10 80 00 57 b 200de80 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200dd28: 03 00 80 64 sethi %hi(0x2019000), %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200dd2c: e8 04 20 04 ld [ %l0 + 4 ], %l4 printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 200dd30: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3 200dd34: a4 0d 3f fe and %l4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 200dd38: a2 04 00 12 add %l0, %l2, %l1 200dd3c: 80 a4 40 01 cmp %l1, %g1 200dd40: 84 60 3f ff subx %g0, -1, %g2 200dd44: 80 a0 c0 11 cmp %g3, %l1 200dd48: 82 60 3f ff subx %g0, -1, %g1 200dd4c: 80 88 80 01 btst %g2, %g1 200dd50: 32 80 00 09 bne,a 200dd74 <_Heap_Walk+0xb8> 200dd54: c2 04 60 04 ld [ %l1 + 4 ], %g1 if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 200dd58: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200dd5c: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED 200dd60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200dd64: 7f ff db 0b call 2004990 <== NOT EXECUTED 200dd68: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200dd6c: 10 80 00 51 b 200deb0 <_Heap_Walk+0x1f4> <== NOT EXECUTED 200dd70: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 200dd74: 80 88 60 01 btst 1, %g1 200dd78: 12 80 00 27 bne 200de14 <_Heap_Walk+0x158> 200dd7c: 80 a6 20 00 cmp %i0, 0 if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 200dd80: c2 04 40 00 ld [ %l1 ], %g1 200dd84: 80 a4 80 01 cmp %l2, %g1 200dd88: 02 80 00 07 be 200dda4 <_Heap_Walk+0xe8> 200dd8c: 80 8d 20 01 btst 1, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200dd90: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200dd94: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200dd98: 7f ff da fe call 2004990 <== NOT EXECUTED 200dd9c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (!prev_used) { 200dda0: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED 200dda4: 32 80 00 0c bne,a 200ddd4 <_Heap_Walk+0x118> 200dda8: c2 04 e0 08 ld [ %l3 + 8 ], %g1 if (do_dump || error) printk("\n"); 200ddac: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200ddb0: 02 80 00 05 be 200ddc4 <_Heap_Walk+0x108> <== NOT EXECUTED 200ddb4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200ddb8: 7f ff da f6 call 2004990 <== NOT EXECUTED 200ddbc: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200ddc0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200ddc4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200ddc8: 7f ff da f2 call 2004990 <== NOT EXECUTED 200ddcc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200ddd0: c2 04 e0 08 ld [ %l3 + 8 ], %g1 <== NOT EXECUTED error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 200ddd4: 80 a0 40 10 cmp %g1, %l0 200ddd8: 02 80 00 0e be 200de10 <_Heap_Walk+0x154> 200dddc: 80 a0 40 13 cmp %g1, %l3 200dde0: 32 bf ff fd bne,a 200ddd4 <_Heap_Walk+0x118> 200dde4: c2 00 60 08 ld [ %g1 + 8 ], %g1 block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 200dde8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200ddec: 22 80 00 05 be,a 200de00 <_Heap_Walk+0x144> <== NOT EXECUTED 200ddf0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200ddf4: 7f ff da e7 call 2004990 <== NOT EXECUTED 200ddf8: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200ddfc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200de00: 7f ff da e4 call 2004990 <== NOT EXECUTED 200de04: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200de08: 10 80 00 06 b 200de20 <_Heap_Walk+0x164> <== NOT EXECUTED 200de0c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 200de10: 80 a6 20 00 cmp %i0, 0 200de14: 22 80 00 06 be,a 200de2c <_Heap_Walk+0x170> 200de18: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 200de1c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 200de20: 7f ff da dc call 2004990 <== NOT EXECUTED 200de24: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200de28: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED 200de2c: 80 a4 80 01 cmp %l2, %g1 200de30: 3a 80 00 05 bcc,a 200de44 <_Heap_Walk+0x188> 200de34: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1 printk("PASS: %d !block size is too small\n", source); 200de38: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED 200de3c: 10 80 00 09 b 200de60 <_Heap_Walk+0x1a4> <== NOT EXECUTED 200de40: 90 12 22 80 or %o0, 0x280, %o0 ! 2019e80 <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 200de44: 40 00 26 03 call 2017650 <.urem> 200de48: 90 10 00 12 mov %l2, %o0 200de4c: 80 a2 20 00 cmp %o0, 0 200de50: 02 80 00 08 be 200de70 <_Heap_Walk+0x1b4> 200de54: 80 a6 20 00 cmp %i0, 0 printk("PASS: %d !block size is misaligned\n", source); 200de58: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED 200de5c: 90 12 22 a8 or %o0, 0x2a8, %o0 ! 2019ea8 <== NOT EXECUTED 200de60: 7f ff da cc call 2004990 <== NOT EXECUTED 200de64: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200de68: 10 80 00 12 b 200deb0 <_Heap_Walk+0x1f4> <== NOT EXECUTED 200de6c: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 200de70: 12 80 00 10 bne 200deb0 <_Heap_Walk+0x1f4> 200de74: 96 10 00 16 mov %l6, %o3 break; 200de78: 10 80 00 09 b 200de9c <_Heap_Walk+0x1e0> 200de7c: a0 10 00 11 mov %l1, %l0 error = 1; } } } if (do_dump || error) printk("\n"); 200de80: aa 10 61 a8 or %g1, 0x1a8, %l5 Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); printk("PASS: %d !the_block not in the free list", source); 200de84: 03 00 80 67 sethi %hi(0x2019c00), %g1 200de88: b8 10 62 50 or %g1, 0x250, %i4 ! 2019e50 printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 200de8c: 03 00 80 67 sethi %hi(0x2019c00), %g1 200de90: ba 10 62 20 or %g1, 0x220, %i5 ! 2019e20 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200de94: 03 00 80 67 sethi %hi(0x2019c00), %g1 200de98: ae 10 61 f0 or %g1, 0x1f0, %l7 ! 2019df0 if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 200de9c: 80 a4 00 16 cmp %l0, %l6 200dea0: 32 bf ff a3 bne,a 200dd2c <_Heap_Walk+0x70> 200dea4: c2 04 e0 20 ld [ %l3 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200dea8: 10 80 00 09 b 200decc <_Heap_Walk+0x210> 200deac: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200deb0: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED 200deb4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200deb8: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED 200debc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 200dec0: 7f ff da b4 call 2004990 <== NOT EXECUTED 200dec4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200dec8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 200decc: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3 200ded0: 94 08 7f fe and %g1, -2, %o2 200ded4: 80 a2 80 0b cmp %o2, %o3 200ded8: 02 80 00 06 be 200def0 <_Heap_Walk+0x234> 200dedc: 92 10 00 19 mov %i1, %o1 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 200dee0: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED 200dee4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200dee8: 7f ff da aa call 2004990 <== NOT EXECUTED 200deec: 90 12 23 10 or %o0, 0x310, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 200def0: 81 c7 e0 08 ret 200def4: 81 e8 00 00 restore 020067c0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 20067c0: 9d e3 bf 88 save %sp, -120, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 20067c4: c4 06 20 08 ld [ %i0 + 8 ], %g2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 20067c8: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 20067cc: 03 00 00 3f sethi %hi(0xfc00), %g1 20067d0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20067d4: a2 08 80 01 and %g2, %g1, %l1 20067d8: 80 a4 00 11 cmp %l0, %l1 20067dc: 3a 80 00 06 bcc,a 20067f4 <_Objects_Extend_information+0x34> 20067e0: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 20067e4: aa 10 00 11 mov %l1, %l5 20067e8: ae 10 20 00 clr %l7 20067ec: 10 80 00 13 b 2006838 <_Objects_Extend_information+0x78> 20067f0: ac 10 20 00 clr %l6 block_count = 0; else { block_count = information->maximum / information->allocation_size; 20067f4: 90 10 00 10 mov %l0, %o0 20067f8: 92 10 00 12 mov %l2, %o1 20067fc: 40 00 31 bc call 2012eec <.udiv> 2006800: aa 10 00 11 mov %l1, %l5 2006804: ac 10 20 00 clr %l6 2006808: 10 80 00 09 b 200682c <_Objects_Extend_information+0x6c> 200680c: ae 10 00 08 mov %o0, %l7 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 2006810: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006814: c2 00 40 02 ld [ %g1 + %g2 ], %g1 2006818: 80 a0 60 00 cmp %g1, 0 200681c: 02 80 00 08 be 200683c <_Objects_Extend_information+0x7c> 2006820: 80 a5 40 10 cmp %l5, %l0 break; else index_base += information->allocation_size; 2006824: aa 05 40 12 add %l5, %l2, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2006828: ac 05 a0 01 inc %l6 200682c: 80 a5 80 17 cmp %l6, %l7 2006830: 0a bf ff f8 bcs 2006810 <_Objects_Extend_information+0x50> 2006834: 85 2d a0 02 sll %l6, 2, %g2 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2006838: 80 a5 40 10 cmp %l5, %l0 200683c: 2a 80 00 5d bcs,a 20069b0 <_Objects_Extend_information+0x1f0> 2006840: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 2006844: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 2006848: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 200684c: ba 04 00 01 add %l0, %g1, %i5 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 2006850: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 2006854: a0 05 e0 01 add %l7, 1, %l0 2006858: 82 07 40 11 add %i5, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 200685c: 02 80 00 0b be 2006888 <_Objects_Extend_information+0xc8> 2006860: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 2006864: 90 02 00 10 add %o0, %l0, %o0 2006868: 90 00 40 08 add %g1, %o0, %o0 200686c: 40 00 08 93 call 2008ab8 <_Workspace_Allocate> 2006870: 91 2a 20 02 sll %o0, 2, %o0 block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 2006874: a4 92 20 00 orcc %o0, 0, %l2 2006878: 32 80 00 0a bne,a 20068a0 <_Objects_Extend_information+0xe0> 200687c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006880: 81 c7 e0 08 ret <== NOT EXECUTED 2006884: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 2006888: 90 02 00 10 add %o0, %l0, %o0 200688c: 90 00 40 08 add %g1, %o0, %o0 2006890: 40 00 08 91 call 2008ad4 <_Workspace_Allocate_or_fatal_error> 2006894: 91 2a 20 02 sll %o0, 2, %o0 2006898: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 200689c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 20068a0: 85 2c 20 02 sll %l0, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 20068a4: 80 a0 40 11 cmp %g1, %l1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 20068a8: a8 04 80 02 add %l2, %g2, %l4 20068ac: a6 05 00 02 add %l4, %g2, %l3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 20068b0: 08 80 00 15 bleu 2006904 <_Objects_Extend_information+0x144> 20068b4: 84 10 20 00 clr %g2 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 20068b8: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 20068bc: a1 2d e0 02 sll %l7, 2, %l0 20068c0: 90 10 00 12 mov %l2, %o0 20068c4: 40 00 18 b1 call 200cb88 20068c8: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 20068cc: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 20068d0: 94 10 00 10 mov %l0, %o2 20068d4: 40 00 18 ad call 200cb88 20068d8: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 20068dc: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 20068e0: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 20068e4: 94 04 40 0a add %l1, %o2, %o2 20068e8: 90 10 00 13 mov %l3, %o0 20068ec: 40 00 18 a7 call 200cb88 20068f0: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 20068f4: 10 80 00 08 b 2006914 <_Objects_Extend_information+0x154> 20068f8: 83 2d e0 02 sll %l7, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 20068fc: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 2006900: c0 24 c0 01 clr [ %l3 + %g1 ] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006904: 80 a0 80 11 cmp %g2, %l1 2006908: 2a bf ff fd bcs,a 20068fc <_Objects_Extend_information+0x13c> 200690c: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2006910: 83 2d e0 02 sll %l7, 2, %g1 inactive_per_block[block_count] = 0; 2006914: c0 25 00 01 clr [ %l4 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006918: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 200691c: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006920: 83 2d 60 02 sll %l5, 2, %g1 2006924: 86 05 40 02 add %l5, %g2, %g3 2006928: 84 04 c0 01 add %l3, %g1, %g2 200692c: 10 80 00 04 b 200693c <_Objects_Extend_information+0x17c> 2006930: 82 10 00 15 mov %l5, %g1 index++ ) { 2006934: 82 00 60 01 inc %g1 2006938: 84 00 a0 04 add %g2, 4, %g2 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 200693c: 80 a0 40 03 cmp %g1, %g3 2006940: 2a bf ff fd bcs,a 2006934 <_Objects_Extend_information+0x174> 2006944: c0 20 80 00 clr [ %g2 ] index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2006948: 7f ff ec fe call 2001d40 200694c: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006950: c2 06 00 00 ld [ %i0 ], %g1 2006954: c8 16 20 04 lduh [ %i0 + 4 ], %g4 2006958: 87 2f 60 10 sll %i5, 0x10, %g3 200695c: 89 29 20 1b sll %g4, 0x1b, %g4 2006960: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006964: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006968: 05 00 00 40 sethi %hi(0x10000), %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 200696c: e8 26 20 30 st %l4, [ %i0 + 0x30 ] information->local_table = local_table; 2006970: e6 26 20 1c st %l3, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006974: 83 28 60 18 sll %g1, 0x18, %g1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 2006978: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 200697c: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006980: e4 26 20 34 st %l2, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006984: 82 10 40 04 or %g1, %g4, %g1 2006988: 82 10 40 03 or %g1, %g3, %g1 200698c: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006990: 7f ff ec f0 call 2001d50 2006994: 01 00 00 00 nop if ( old_tables ) 2006998: 80 a4 20 00 cmp %l0, 0 200699c: 22 80 00 05 be,a 20069b0 <_Objects_Extend_information+0x1f0> 20069a0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 _Workspace_Free( old_tables ); 20069a4: 40 00 08 3e call 2008a9c <_Workspace_Free> 20069a8: 90 10 00 10 mov %l0, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 20069ac: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 20069b0: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 20069b4: 80 a0 60 00 cmp %g1, 0 20069b8: 02 80 00 0f be 20069f4 <_Objects_Extend_information+0x234> 20069bc: a1 2d a0 02 sll %l6, 2, %l0 information->object_blocks[ block ] = 20069c0: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 20069c4: 40 00 31 10 call 2012e04 <.umul> 20069c8: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 20069cc: 40 00 08 3b call 2008ab8 <_Workspace_Allocate> 20069d0: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 20069d4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 20069d8: d0 24 40 10 st %o0, [ %l1 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 20069dc: c2 00 40 10 ld [ %g1 + %l0 ], %g1 20069e0: 80 a0 60 00 cmp %g1, 0 20069e4: 32 80 00 0b bne,a 2006a10 <_Objects_Extend_information+0x250> 20069e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20069ec: 81 c7 e0 08 ret <== NOT EXECUTED 20069f0: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 20069f4: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 20069f8: 40 00 31 03 call 2012e04 <.umul> 20069fc: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 2006a00: 40 00 08 35 call 2008ad4 <_Workspace_Allocate_or_fatal_error> 2006a04: 01 00 00 00 nop 2006a08: d0 24 40 10 st %o0, [ %l1 + %l0 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006a0c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006a10: a5 2d a0 02 sll %l6, 2, %l2 2006a14: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2006a18: d2 00 40 12 ld [ %g1 + %l2 ], %o1 2006a1c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2006a20: 90 07 bf ec add %fp, -20, %o0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006a24: a0 10 00 15 mov %l5, %l0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 2006a28: a8 10 00 08 mov %o0, %l4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006a2c: 40 00 11 4a call 200af54 <_Chain_Initialize> 2006a30: a2 06 20 20 add %i0, 0x20, %l1 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006a34: 10 80 00 0d b 2006a68 <_Objects_Extend_information+0x2a8> 2006a38: 27 00 00 40 sethi %hi(0x10000), %l3 2006a3c: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2006a40: 83 28 60 18 sll %g1, 0x18, %g1 2006a44: 85 28 a0 1b sll %g2, 0x1b, %g2 2006a48: 82 10 40 13 or %g1, %l3, %g1 2006a4c: 82 10 40 02 or %g1, %g2, %g1 2006a50: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006a54: 92 10 00 08 mov %o0, %o1 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006a58: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2006a5c: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006a60: 7f ff fd 14 call 2005eb0 <_Chain_Append> 2006a64: 90 10 00 11 mov %l1, %o0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 2006a68: 40 00 11 2b call 200af14 <_Chain_Get> 2006a6c: 90 10 00 14 mov %l4, %o0 2006a70: 80 a2 20 00 cmp %o0, 0 2006a74: 32 bf ff f2 bne,a 2006a3c <_Objects_Extend_information+0x27c> 2006a78: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006a7c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006a80: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive += information->allocation_size; 2006a84: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006a88: c2 20 80 12 st %g1, [ %g2 + %l2 ] information->inactive += information->allocation_size; 2006a8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006a90: 82 00 40 03 add %g1, %g3, %g1 2006a94: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006a98: 81 c7 e0 08 ret 2006a9c: 81 e8 00 00 restore 02006b4c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 2006b4c: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 2006b50: 82 06 3f ff add %i0, -1, %g1 2006b54: 80 a0 60 03 cmp %g1, 3 2006b58: 38 80 00 1c bgu,a 2006bc8 <_Objects_Get_information+0x7c> 2006b5c: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2006b60: 10 80 00 1c b 2006bd0 <_Objects_Get_information+0x84> 2006b64: 80 a6 60 00 cmp %i1, 0 return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 2006b68: 40 00 12 14 call 200b3b8 <_Objects_API_maximum_class> 2006b6c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 2006b70: 80 a2 20 00 cmp %o0, 0 2006b74: 06 80 00 14 bl 2006bc4 <_Objects_Get_information+0x78> 2006b78: 80 a6 40 08 cmp %i1, %o0 2006b7c: 38 80 00 13 bgu,a 2006bc8 <_Objects_Get_information+0x7c> 2006b80: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 2006b84: 85 2e 20 02 sll %i0, 2, %g2 2006b88: 03 00 80 59 sethi %hi(0x2016400), %g1 2006b8c: 82 10 63 e0 or %g1, 0x3e0, %g1 ! 20167e0 <_Objects_Information_table> 2006b90: c4 00 40 02 ld [ %g1 + %g2 ], %g2 2006b94: 80 a0 a0 00 cmp %g2, 0 2006b98: 02 80 00 0c be 2006bc8 <_Objects_Get_information+0x7c> 2006b9c: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2006ba0: 83 2e 60 02 sll %i1, 2, %g1 2006ba4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 2006ba8: 80 a6 20 00 cmp %i0, 0 2006bac: 02 80 00 07 be 2006bc8 <_Objects_Get_information+0x7c> 2006bb0: 01 00 00 00 nop * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 2006bb4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006bb8: 80 a0 60 00 cmp %g1, 0 2006bbc: 12 80 00 03 bne 2006bc8 <_Objects_Get_information+0x7c> 2006bc0: 01 00 00 00 nop 2006bc4: b0 10 20 00 clr %i0 ! 0 return NULL; #endif return info; } 2006bc8: 81 c7 e0 08 ret 2006bcc: 81 e8 00 00 restore int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2006bd0: 22 bf ff fe be,a 2006bc8 <_Objects_Get_information+0x7c> 2006bd4: b0 10 20 00 clr %i0 2006bd8: 30 bf ff e4 b,a 2006b68 <_Objects_Get_information+0x1c> 02006bdc <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 2006bdc: 9d e3 bf 98 save %sp, -104, %sp #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 2006be0: 03 00 00 3f sethi %hi(0xfc00), %g1 2006be4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 2006be8: 7f ff ec 56 call 2001d40 2006bec: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 2006bf0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006bf4: 80 a0 40 19 cmp %g1, %i1 2006bf8: 0a 80 00 11 bcs 2006c3c <_Objects_Get_isr_disable+0x60> 2006bfc: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 2006c00: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2006c04: f0 00 80 01 ld [ %g2 + %g1 ], %i0 2006c08: 80 a6 20 00 cmp %i0, 0 2006c0c: 02 80 00 06 be 2006c24 <_Objects_Get_isr_disable+0x48> 2006c10: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 2006c14: d0 26 c0 00 st %o0, [ %i3 ] #endif _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; 2006c18: c0 26 80 00 clr [ %i2 ] 2006c1c: 81 c7 e0 08 ret 2006c20: 81 e8 00 00 restore *level_p = level; return the_object; } _ISR_Enable( level ); 2006c24: 7f ff ec 4b call 2001d50 <== NOT EXECUTED 2006c28: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 2006c2c: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 2006c30: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 2006c34: 81 c7 e0 08 ret <== NOT EXECUTED 2006c38: 81 e8 00 00 restore <== NOT EXECUTED return NULL; } _ISR_Enable( level ); 2006c3c: 7f ff ec 45 call 2001d50 2006c40: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 2006c44: 82 10 20 01 mov 1, %g1 2006c48: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 2006c4c: 81 c7 e0 08 ret 2006c50: 81 e8 00 00 restore 02012350 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 2012350: 9d e3 bf 88 save %sp, -120, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 2012354: 80 a6 60 00 cmp %i1, 0 2012358: 22 80 00 41 be,a 201245c <_Objects_Get_name_as_string+0x10c> 201235c: b4 10 20 00 clr %i2 return NULL; if ( name == NULL ) 2012360: 80 a6 a0 00 cmp %i2, 0 2012364: 22 80 00 3f be,a 2012460 <_Objects_Get_name_as_string+0x110> 2012368: b0 10 00 1a mov %i2, %i0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 201236c: b0 96 20 00 orcc %i0, 0, %i0 2012370: 12 80 00 04 bne 2012380 <_Objects_Get_name_as_string+0x30> 2012374: 03 00 80 95 sethi %hi(0x2025400), %g1 2012378: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20254e4 <_Thread_Executing> 201237c: f0 00 60 08 ld [ %g1 + 8 ], %i0 information = _Objects_Get_information_id( tmpId ); 2012380: 7f ff e4 fe call 200b778 <_Objects_Get_information_id> 2012384: 90 10 00 18 mov %i0, %o0 if ( !information ) 2012388: a0 92 20 00 orcc %o0, 0, %l0 201238c: 22 80 00 34 be,a 201245c <_Objects_Get_name_as_string+0x10c> 2012390: b4 10 20 00 clr %i2 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 2012394: 92 10 00 18 mov %i0, %o1 2012398: 7f ff e5 41 call 200b89c <_Objects_Get> 201239c: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 20123a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20123a4: 80 a0 60 00 cmp %g1, 0 20123a8: 32 80 00 2d bne,a 201245c <_Objects_Get_name_as_string+0x10c> 20123ac: b4 10 20 00 clr %i2 case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 20123b0: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1 20123b4: 80 a0 60 00 cmp %g1, 0 20123b8: 22 80 00 07 be,a 20123d4 <_Objects_Get_name_as_string+0x84> 20123bc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name.name_p; 20123c0: d0 02 20 0c ld [ %o0 + 0xc ], %o0 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 20123c4: 80 a2 20 00 cmp %o0, 0 20123c8: 12 80 00 0c bne 20123f8 <_Objects_Get_name_as_string+0xa8> 20123cc: 86 10 00 1a mov %i2, %g3 20123d0: 30 80 00 1f b,a 201244c <_Objects_Get_name_as_string+0xfc> <== NOT EXECUTED lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 20123d4: c0 2f bf ec clrb [ %fp + -20 ] if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 20123d8: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 20123dc: c2 2f bf eb stb %g1, [ %fp + -21 ] if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 20123e0: c4 2f bf e8 stb %g2, [ %fp + -24 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 20123e4: 90 07 bf e8 add %fp, -24, %o0 s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 20123e8: 85 30 60 10 srl %g1, 0x10, %g2 lname[ 2 ] = (u32_name >> 8) & 0xff; 20123ec: 83 30 60 08 srl %g1, 8, %g1 s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 20123f0: c4 2f bf e9 stb %g2, [ %fp + -23 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 20123f4: c2 2f bf ea stb %g1, [ %fp + -22 ] } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint(*s)) ? *s : '*'; 20123f8: 03 00 80 91 sethi %hi(0x2024400), %g1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 20123fc: b2 06 7f ff add %i1, -1, %i1 *d = (isprint(*s)) ? *s : '*'; 2012400: 98 10 60 18 or %g1, 0x18, %o4 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 2012404: 86 10 00 1a mov %i2, %g3 2012408: 10 80 00 0a b 2012430 <_Objects_Get_name_as_string+0xe0> 201240c: 84 10 20 00 clr %g2 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint(*s)) ? *s : '*'; 2012410: c2 03 00 00 ld [ %o4 ], %g1 2012414: c2 48 40 04 ldsb [ %g1 + %g4 ], %g1 2012418: 80 88 60 97 btst 0x97, %g1 201241c: 12 80 00 03 bne 2012428 <_Objects_Get_name_as_string+0xd8> 2012420: 84 00 a0 01 inc %g2 2012424: 9a 10 20 2a mov 0x2a, %o5 2012428: da 28 c0 00 stb %o5, [ %g3 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 201242c: 86 00 e0 01 inc %g3 2012430: 80 a0 80 19 cmp %g2, %i1 2012434: 1a 80 00 06 bcc 201244c <_Objects_Get_name_as_string+0xfc> 2012438: 01 00 00 00 nop 201243c: c8 4a 00 02 ldsb [ %o0 + %g2 ], %g4 2012440: 80 a1 20 00 cmp %g4, 0 2012444: 12 bf ff f3 bne 2012410 <_Objects_Get_name_as_string+0xc0> 2012448: da 0a 00 02 ldub [ %o0 + %g2 ], %o5 *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 201244c: 7f ff e7 9a call 200c2b4 <_Thread_Enable_dispatch> 2012450: c0 28 c0 00 clrb [ %g3 ] return name; } return NULL; /* unreachable path */ } 2012454: 81 c7 e0 08 ret 2012458: 91 e8 00 1a restore %g0, %i2, %o0 201245c: b0 10 00 1a mov %i2, %i0 2012460: 81 c7 e0 08 ret 2012464: 81 e8 00 00 restore 02014f00 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 2014f00: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 2014f04: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2014f08: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 2014f0c: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 2014f10: 22 80 00 02 be,a 2014f18 <_Objects_Get_next+0x18> <== NOT EXECUTED 2014f14: f2 06 20 08 ld [ %i0 + 8 ], %i1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2014f18: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2014f1c: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 2014f20: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 2014f24: 82 0e 40 10 and %i1, %l0, %g1 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2014f28: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2014f2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2014f30: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2014f34: 08 80 00 08 bleu 2014f54 <_Objects_Get_next+0x54> <== NOT EXECUTED 2014f38: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 2014f3c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2014f40: 90 10 20 00 clr %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 2014f44: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2014f48: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 2014f4c: 10 80 00 09 b 2014f70 <_Objects_Get_next+0x70> <== NOT EXECUTED 2014f50: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2014f54: 7f ff da 52 call 200b89c <_Objects_Get> <== NOT EXECUTED 2014f58: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 2014f5c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2014f60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2014f64: 32 bf ff f0 bne,a 2014f24 <_Objects_Get_next+0x24> <== NOT EXECUTED 2014f68: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 2014f6c: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2014f70: 81 c7 e0 08 ret <== NOT EXECUTED 2014f74: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 020080ac <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 20080ac: 9d e3 bf 90 save %sp, -112, %sp 20080b0: 92 10 00 18 mov %i0, %o1 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 20080b4: 80 a6 60 00 cmp %i1, 0 20080b8: 02 80 00 22 be 2008140 <_Objects_Id_to_name+0x94> 20080bc: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 20080c0: 80 a2 60 00 cmp %o1, 0 20080c4: 12 80 00 06 bne 20080dc <_Objects_Id_to_name+0x30> 20080c8: 83 32 60 18 srl %o1, 0x18, %g1 20080cc: 03 00 80 6a sethi %hi(0x201a800), %g1 20080d0: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <_Thread_Executing> 20080d4: d2 00 60 08 ld [ %g1 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 20080d8: 83 32 60 18 srl %o1, 0x18, %g1 20080dc: 84 08 60 07 and %g1, 7, %g2 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 20080e0: 82 00 bf ff add %g2, -1, %g1 20080e4: 80 a0 60 03 cmp %g1, 3 20080e8: 38 80 00 16 bgu,a 2008140 <_Objects_Id_to_name+0x94> 20080ec: b0 10 20 03 mov 3, %i0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 20080f0: 10 80 00 18 b 2008150 <_Objects_Id_to_name+0xa4> 20080f4: 85 28 a0 02 sll %g2, 2, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 20080f8: 83 28 60 02 sll %g1, 2, %g1 20080fc: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 2008100: 80 a2 20 00 cmp %o0, 0 2008104: 02 80 00 0f be 2008140 <_Objects_Id_to_name+0x94> 2008108: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 200810c: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 2008110: 80 a0 60 00 cmp %g1, 0 2008114: 12 80 00 0d bne 2008148 <_Objects_Id_to_name+0x9c> 2008118: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 200811c: 7f ff ff c7 call 2008038 <_Objects_Get> 2008120: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 2008124: 80 a2 20 00 cmp %o0, 0 2008128: 22 80 00 06 be,a 2008140 <_Objects_Id_to_name+0x94> 200812c: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 2008130: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 2008134: b0 10 20 00 clr %i0 2008138: 40 00 02 5f call 2008ab4 <_Thread_Enable_dispatch> 200813c: c2 26 40 00 st %g1, [ %i1 ] 2008140: 81 c7 e0 08 ret 2008144: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 2008148: 81 c7 e0 08 ret <== NOT EXECUTED 200814c: 81 e8 00 00 restore <== NOT EXECUTED the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 2008150: 03 00 80 6a sethi %hi(0x201a800), %g1 2008154: 82 10 61 60 or %g1, 0x160, %g1 ! 201a960 <_Objects_Information_table> 2008158: c4 00 40 02 ld [ %g1 + %g2 ], %g2 200815c: 80 a0 a0 00 cmp %g2, 0 2008160: 12 bf ff e6 bne 20080f8 <_Objects_Id_to_name+0x4c> 2008164: 83 32 60 1b srl %o1, 0x1b, %g1 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008168: 81 c7 e0 08 ret <== NOT EXECUTED 200816c: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 02006dd0 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 2006dd0: 9a 10 00 08 mov %o0, %o5 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 2006dd4: 80 a2 e0 00 cmp %o3, 0 2006dd8: 02 80 00 29 be 2006e7c <_Objects_Name_to_id_u32+0xac> 2006ddc: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 2006de0: 80 a2 60 00 cmp %o1, 0 2006de4: 22 80 00 26 be,a 2006e7c <_Objects_Name_to_id_u32+0xac> 2006de8: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2006dec: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1 2006df0: 84 90 60 00 orcc %g1, 0, %g2 2006df4: 22 80 00 22 be,a 2006e7c <_Objects_Name_to_id_u32+0xac> 2006df8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2006dfc: 80 a2 a0 00 cmp %o2, 0 2006e00: 02 80 00 19 be 2006e64 <_Objects_Name_to_id_u32+0x94> 2006e04: 83 28 a0 10 sll %g2, 0x10, %g1 2006e08: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 2006e0c: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 2006e10: 80 a2 80 01 cmp %o2, %g1 2006e14: 02 80 00 13 be 2006e60 <_Objects_Name_to_id_u32+0x90> 2006e18: 80 a2 a0 01 cmp %o2, 1 2006e1c: 32 80 00 18 bne,a 2006e7c <_Objects_Name_to_id_u32+0xac> 2006e20: 90 10 20 01 mov 1, %o0 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2006e24: 10 80 00 10 b 2006e64 <_Objects_Name_to_id_u32+0x94> 2006e28: 83 28 a0 10 sll %g2, 0x10, %g1 the_object = information->local_table[ index ]; 2006e2c: c2 03 60 1c ld [ %o5 + 0x1c ], %g1 2006e30: c4 00 40 02 ld [ %g1 + %g2 ], %g2 if ( !the_object ) 2006e34: 80 a0 a0 00 cmp %g2, 0 2006e38: 02 80 00 0d be 2006e6c <_Objects_Name_to_id_u32+0x9c> 2006e3c: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 2006e40: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2006e44: 80 a2 40 01 cmp %o1, %g1 2006e48: 32 80 00 0a bne,a 2006e70 <_Objects_Name_to_id_u32+0xa0> 2006e4c: 80 a0 c0 04 cmp %g3, %g4 *id = the_object->id; 2006e50: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2006e54: 90 10 20 00 clr %o0 2006e58: 81 c3 e0 08 retl 2006e5c: c2 22 c0 00 st %g1, [ %o3 ] search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2006e60: 83 28 a0 10 sll %g2, 0x10, %g1 2006e64: 86 10 20 01 mov 1, %g3 2006e68: 89 30 60 10 srl %g1, 0x10, %g4 2006e6c: 80 a0 c0 04 cmp %g3, %g4 2006e70: 08 bf ff ef bleu 2006e2c <_Objects_Name_to_id_u32+0x5c> 2006e74: 85 28 e0 02 sll %g3, 2, %g2 2006e78: 90 10 20 01 mov 1, %o0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 2006e7c: 81 c3 e0 08 retl 2006e80: 01 00 00 00 nop 02006d98 <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 2006d98: 9d e3 bf 98 save %sp, -104, %sp /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 2006d9c: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2006da0: 80 a0 60 00 cmp %g1, 0 2006da4: 22 80 00 09 be,a 2006dc8 <_Objects_Namespace_remove+0x30> 2006da8: c0 26 60 0c clr [ %i1 + 0xc ] 2006dac: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 2006db0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2006db4: 22 80 00 05 be,a 2006dc8 <_Objects_Namespace_remove+0x30> <== NOT EXECUTED 2006db8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 2006dbc: 40 00 07 38 call 2008a9c <_Workspace_Free> <== NOT EXECUTED 2006dc0: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 2006dc4: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 2006dc8: 81 c7 e0 08 ret 2006dcc: 81 e8 00 00 restore 02008b30 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 2008b30: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 2008b34: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 2008b38: 40 00 1d 18 call 200ff98 2008b3c: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 2008b40: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2008b44: 80 a0 60 00 cmp %g1, 0 2008b48: 02 80 00 17 be 2008ba4 <_Objects_Set_name+0x74> 2008b4c: a0 02 20 01 add %o0, 1, %l0 char *d; d = _Workspace_Allocate( length ); 2008b50: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2008b54: 40 00 07 3c call 200a844 <_Workspace_Allocate> <== NOT EXECUTED 2008b58: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 2008b5c: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 2008b60: 02 80 00 27 be 2008bfc <_Objects_Set_name+0xcc> <== NOT EXECUTED 2008b64: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 2008b68: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 2008b6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2008b70: 02 80 00 06 be 2008b88 <_Objects_Set_name+0x58> <== NOT EXECUTED 2008b74: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 2008b78: 40 00 07 2c call 200a828 <_Workspace_Free> <== NOT EXECUTED 2008b7c: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 2008b80: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 2008b84: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 2008b88: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2008b8c: 40 00 1c c9 call 200feb0 <== NOT EXECUTED 2008b90: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 2008b94: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 2008b98: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 2008b9c: 81 c7 e0 08 ret <== NOT EXECUTED 2008ba0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } else { the_object->name.name_u32 = _Objects_Build_name( 2008ba4: 80 a4 20 00 cmp %l0, 0 2008ba8: 02 80 00 1a be 2008c10 <_Objects_Set_name+0xe0> 2008bac: 1b 08 00 00 sethi %hi(0x20000000), %o5 2008bb0: c2 4e 80 00 ldsb [ %i2 ], %g1 2008bb4: 80 a4 20 01 cmp %l0, 1 2008bb8: 02 80 00 16 be 2008c10 <_Objects_Set_name+0xe0> 2008bbc: 9b 28 60 18 sll %g1, 0x18, %o5 2008bc0: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 2008bc4: 80 a4 20 02 cmp %l0, 2 2008bc8: 08 80 00 0f bleu 2008c04 <_Objects_Set_name+0xd4> 2008bcc: 89 28 60 10 sll %g1, 0x10, %g4 2008bd0: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 2008bd4: 80 a4 20 03 cmp %l0, 3 2008bd8: 87 28 60 08 sll %g1, 8, %g3 2008bdc: 08 80 00 03 bleu 2008be8 <_Objects_Set_name+0xb8> 2008be0: 84 10 20 20 mov 0x20, %g2 2008be4: c4 4e a0 03 ldsb [ %i2 + 3 ], %g2 2008be8: 82 13 40 04 or %o5, %g4, %g1 2008bec: b0 10 20 01 mov 1, %i0 2008bf0: 82 10 40 03 or %g1, %g3, %g1 2008bf4: 82 10 40 02 or %g1, %g2, %g1 2008bf8: c2 26 60 0c st %g1, [ %i1 + 0xc ] ); } return TRUE; } 2008bfc: 81 c7 e0 08 ret 2008c00: 81 e8 00 00 restore strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 2008c04: 84 10 20 20 mov 0x20, %g2 2008c08: 10 bf ff f8 b 2008be8 <_Objects_Set_name+0xb8> 2008c0c: 07 00 00 08 sethi %hi(0x2000), %g3 2008c10: 10 bf ff fd b 2008c04 <_Objects_Set_name+0xd4> 2008c14: 09 00 08 00 sethi %hi(0x200000), %g4 02006e8c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2006e8c: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 2006e90: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 2006e94: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2006e98: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2006e9c: 03 00 00 3f sethi %hi(0xfc00), %g1 2006ea0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006ea4: 92 10 00 10 mov %l0, %o1 2006ea8: a2 08 80 01 and %g2, %g1, %l1 2006eac: 40 00 30 10 call 2012eec <.udiv> 2006eb0: 90 22 00 11 sub %o0, %l1, %o0 2006eb4: 10 80 00 2e b 2006f6c <_Objects_Shrink_information+0xe0> 2006eb8: 84 10 20 00 clr %g2 for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 2006ebc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2006ec0: c2 00 40 12 ld [ %g1 + %l2 ], %g1 2006ec4: 80 a0 40 10 cmp %g1, %l0 2006ec8: 12 80 00 28 bne 2006f68 <_Objects_Shrink_information+0xdc> 2006ecc: 84 00 a0 01 inc %g2 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 2006ed0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2006ed4: 03 00 00 3f sethi %hi(0xfc00), %g1 2006ed8: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 2006edc: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006ee0: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 2006ee4: 80 a0 80 11 cmp %g2, %l1 2006ee8: 2a 80 00 0c bcs,a 2006f18 <_Objects_Shrink_information+0x8c> 2006eec: e0 04 00 00 ld [ %l0 ], %l0 2006ef0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006ef4: 82 04 40 01 add %l1, %g1, %g1 2006ef8: 80 a0 80 01 cmp %g2, %g1 2006efc: 1a 80 00 06 bcc 2006f14 <_Objects_Shrink_information+0x88> 2006f00: 90 10 00 10 mov %l0, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 2006f04: 40 00 0f fa call 200aeec <_Chain_Extract> 2006f08: e0 04 00 00 ld [ %l0 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2006f0c: 10 80 00 04 b 2006f1c <_Objects_Shrink_information+0x90> 2006f10: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 2006f14: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2006f18: 80 a4 20 00 cmp %l0, 0 2006f1c: 22 80 00 07 be,a 2006f38 <_Objects_Shrink_information+0xac> 2006f20: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2006f24: c2 04 00 00 ld [ %l0 ], %g1 2006f28: 80 a0 60 00 cmp %g1, 0 2006f2c: 32 bf ff ed bne,a 2006ee0 <_Objects_Shrink_information+0x54> 2006f30: c2 04 20 08 ld [ %l0 + 8 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2006f34: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006f38: 40 00 06 d9 call 2008a9c <_Workspace_Free> 2006f3c: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2006f40: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 2006f44: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2006f48: c0 20 80 12 clr [ %g2 + %l2 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2006f4c: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2006f50: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2006f54: c0 20 80 12 clr [ %g2 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2006f58: 82 20 40 03 sub %g1, %g3, %g1 2006f5c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006f60: 81 c7 e0 08 ret 2006f64: 81 e8 00 00 restore return; } index_base += information->allocation_size; 2006f68: a2 04 40 10 add %l1, %l0, %l1 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2006f6c: 80 a0 80 08 cmp %g2, %o0 2006f70: 0a bf ff d3 bcs 2006ebc <_Objects_Shrink_information+0x30> 2006f74: a5 28 a0 02 sll %g2, 2, %l2 2006f78: 81 c7 e0 08 ret 2006f7c: 81 e8 00 00 restore 02021b68 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2021b68: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 2021b6c: 80 a6 20 00 cmp %i0, 0 2021b70: 02 80 00 10 be 2021bb0 <_Protected_heap_Get_information+0x48> 2021b74: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 2021b78: 02 80 00 0e be 2021bb0 <_Protected_heap_Get_information+0x48> 2021b7c: 23 00 81 67 sethi %hi(0x2059c00), %l1 return false; _RTEMS_Lock_allocator(); 2021b80: 7f ff 9c 99 call 2008de4 <_API_Mutex_Lock> 2021b84: d0 04 61 ec ld [ %l1 + 0x1ec ], %o0 ! 2059dec <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 2021b88: 90 10 00 18 mov %i0, %o0 2021b8c: 40 00 27 9a call 202b9f4 <_Heap_Get_information> 2021b90: 92 10 00 19 mov %i1, %o1 2021b94: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 2021b98: 7f ff 9c a9 call 2008e3c <_API_Mutex_Unlock> 2021b9c: d0 04 61 ec ld [ %l1 + 0x1ec ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 2021ba0: 80 a0 00 10 cmp %g0, %l0 2021ba4: 82 60 3f ff subx %g0, -1, %g1 2021ba8: 81 c7 e0 08 ret 2021bac: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 2021bb0: 81 c7 e0 08 ret <== NOT EXECUTED 2021bb4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006ac8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2006ac8: 9d e3 bf 90 save %sp, -112, %sp 2006acc: 11 00 80 6c sethi %hi(0x201b000), %o0 2006ad0: 92 10 00 18 mov %i0, %o1 2006ad4: 90 12 21 e4 or %o0, 0x1e4, %o0 2006ad8: 40 00 07 9c call 2008948 <_Objects_Get> 2006adc: 94 07 bf f4 add %fp, -12, %o2 /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2006ae0: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006ae4: 80 a0 60 00 cmp %g1, 0 2006ae8: 12 80 00 26 bne 2006b80 <_Rate_monotonic_Timeout+0xb8> 2006aec: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2006af0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006af4: 03 00 00 10 sethi %hi(0x4000), %g1 2006af8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2006afc: 80 88 80 01 btst %g2, %g1 2006b00: 22 80 00 0c be,a 2006b30 <_Rate_monotonic_Timeout+0x68> 2006b04: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2006b08: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2006b0c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006b10: 80 a0 80 01 cmp %g2, %g1 2006b14: 32 80 00 07 bne,a 2006b30 <_Rate_monotonic_Timeout+0x68> 2006b18: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2006b1c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006b20: 40 00 08 e2 call 2008ea8 <_Thread_Clear_state> 2006b24: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 2006b28: 10 80 00 08 b 2006b48 <_Rate_monotonic_Timeout+0x80> 2006b2c: 90 10 00 18 mov %i0, %o0 _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 2006b30: 80 a0 60 01 cmp %g1, 1 2006b34: 12 80 00 0e bne 2006b6c <_Rate_monotonic_Timeout+0xa4> 2006b38: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2006b3c: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006b40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2006b44: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006b48: 7f ff fe 4a call 2006470 <_Rate_monotonic_Initiate_statistics> 2006b4c: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b50: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b54: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b58: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b5c: 11 00 80 6d sethi %hi(0x201b400), %o0 2006b60: 40 00 0f 41 call 200a864 <_Watchdog_Insert> 2006b64: 90 12 20 44 or %o0, 0x44, %o0 ! 201b444 <_Watchdog_Ticks_chain> 2006b68: 30 80 00 02 b,a 2006b70 <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2006b6c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2006b70: 05 00 80 6c sethi %hi(0x201b000), %g2 2006b74: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 201b360 <_Thread_Dispatch_disable_level> 2006b78: 82 00 7f ff add %g1, -1, %g1 2006b7c: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] 2006b80: 81 c7 e0 08 ret 2006b84: 81 e8 00 00 restore 0200736c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 200736c: 9d e3 bf 78 save %sp, -136, %sp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 2007370: 11 00 80 5a sethi %hi(0x2016800), %o0 2007374: 7f ff fc de call 20066ec <_Objects_Allocate> 2007378: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 20169e0 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200737c: 05 00 80 5a sethi %hi(0x2016800), %g2 2007380: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 2016880 <_Thread_Dispatch_disable_level> /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 2007384: 07 00 80 5a sethi %hi(0x2016800), %g3 2007388: 82 00 60 01 inc %g1 200738c: d0 20 e2 2c st %o0, [ %g3 + 0x22c ] 2007390: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 2007394: 03 00 80 5a sethi %hi(0x2016800), %g1 2007398: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 201691c <_Configuration_Table> 200739c: d2 00 e2 2c ld [ %g3 + 0x22c ], %o1 20073a0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 20073a4: 03 00 80 56 sethi %hi(0x2015800), %g1 20073a8: d6 00 62 d0 ld [ %g1 + 0x2d0 ], %o3 ! 2015ad0 20073ac: 03 00 80 53 sethi %hi(0x2014c00), %g1 20073b0: 82 10 63 58 or %g1, 0x358, %g1 ! 2014f58 20073b4: 80 a2 c0 02 cmp %o3, %g2 20073b8: 1a 80 00 03 bcc 20073c4 <_Thread_Create_idle+0x58> 20073bc: c2 27 bf f4 st %g1, [ %fp + -12 ] 20073c0: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 20073c4: 03 00 80 56 sethi %hi(0x2015800), %g1 20073c8: da 08 62 d4 ldub [ %g1 + 0x2d4 ], %o5 ! 2015ad4 20073cc: 82 10 20 01 mov 1, %g1 20073d0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20073d4: 82 07 bf f4 add %fp, -12, %g1 20073d8: c0 23 a0 60 clr [ %sp + 0x60 ] 20073dc: c0 23 a0 64 clr [ %sp + 0x64 ] 20073e0: c0 23 a0 68 clr [ %sp + 0x68 ] 20073e4: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 20073e8: 94 10 20 00 clr %o2 20073ec: 98 10 20 00 clr %o4 20073f0: 11 00 80 5a sethi %hi(0x2016800), %o0 20073f4: 40 00 00 bf call 20076f0 <_Thread_Initialize> 20073f8: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 20169e0 <_Thread_Internal_information> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 20073fc: 03 00 80 5a sethi %hi(0x2016800), %g1 2007400: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 201691c <_Configuration_Table> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2007404: 07 00 80 5a sethi %hi(0x2016800), %g3 2007408: f4 00 60 14 ld [ %g1 + 0x14 ], %i2 200740c: c2 00 e0 80 ld [ %g3 + 0x80 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007410: 05 00 80 5a sethi %hi(0x2016800), %g2 2007414: 82 00 7f ff add %g1, -1, %g1 2007418: c4 00 a2 2c ld [ %g2 + 0x22c ], %g2 200741c: c2 20 e0 80 st %g1, [ %g3 + 0x80 ] 2007420: 03 00 80 5a sethi %hi(0x2016800), %g1 2007424: c4 20 61 44 st %g2, [ %g1 + 0x144 ] ! 2016944 <_Thread_Executing> 2007428: 03 00 80 5a sethi %hi(0x2016800), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 200742c: b0 10 00 02 mov %g2, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007430: c4 20 61 10 st %g2, [ %g1 + 0x110 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 2007434: b2 10 20 00 clr %i1 2007438: b6 10 20 00 clr %i3 200743c: 40 00 03 ae call 20082f4 <_Thread_Start> 2007440: 99 e8 20 00 restore %g0, 0, %o4 2007444: 01 00 00 00 nop 0200c144 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200c144: 03 00 80 5a sethi %hi(0x2016800), %g1 200c148: c4 00 61 44 ld [ %g1 + 0x144 ], %g2 ! 2016944 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200c14c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200c150: 80 a0 60 00 cmp %g1, 0 200c154: 32 80 00 0b bne,a 200c180 <_Thread_Evaluate_mode+0x3c> 200c158: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 200c15c: 03 00 80 5a sethi %hi(0x2016800), %g1 200c160: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 2016910 <_Thread_Heir> 200c164: 80 a0 80 01 cmp %g2, %g1 200c168: 02 80 00 0b be 200c194 <_Thread_Evaluate_mode+0x50> 200c16c: 01 00 00 00 nop 200c170: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 200c174: 80 a0 60 00 cmp %g1, 0 200c178: 02 80 00 07 be 200c194 <_Thread_Evaluate_mode+0x50> 200c17c: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 200c180: 03 00 80 5a sethi %hi(0x2016800), %g1 200c184: 90 10 20 01 mov 1, %o0 200c188: c4 28 61 54 stb %g2, [ %g1 + 0x154 ] 200c18c: 81 c3 e0 08 retl 200c190: 01 00 00 00 nop return TRUE; } return FALSE; } 200c194: 81 c3 e0 08 retl 200c198: 90 10 20 00 clr %o0 ! 0 02007640 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 2007640: 88 10 00 08 mov %o0, %g4 uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 2007644: 80 a2 20 00 cmp %o0, 0 2007648: 12 80 00 0a bne 2007670 <_Thread_Get+0x30> 200764c: 94 10 00 09 mov %o1, %o2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007650: 03 00 80 5a sethi %hi(0x2016800), %g1 2007654: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 2016880 <_Thread_Dispatch_disable_level> 2007658: 84 00 a0 01 inc %g2 200765c: c4 20 60 80 st %g2, [ %g1 + 0x80 ] _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 2007660: 03 00 80 5a sethi %hi(0x2016800), %g1 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 2007664: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 2007668: 81 c3 e0 08 retl 200766c: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 2007670: 83 32 20 18 srl %o0, 0x18, %g1 2007674: 84 08 60 07 and %g1, 7, %g2 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 2007678: 82 00 bf ff add %g2, -1, %g1 200767c: 80 a0 60 03 cmp %g1, 3 2007680: 08 80 00 16 bleu 20076d8 <_Thread_Get+0x98> 2007684: 87 32 20 1b srl %o0, 0x1b, %g3 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 2007688: 82 10 20 01 mov 1, %g1 200768c: 10 80 00 09 b 20076b0 <_Thread_Get+0x70> 2007690: c2 22 80 00 st %g1, [ %o2 ] goto done; } api_information = _Objects_Information_table[ the_api ]; 2007694: 03 00 80 59 sethi %hi(0x2016400), %g1 2007698: 82 10 63 e0 or %g1, 0x3e0, %g1 ! 20167e0 <_Objects_Information_table> 200769c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 20076a0: 80 a0 60 00 cmp %g1, 0 20076a4: 32 80 00 05 bne,a 20076b8 <_Thread_Get+0x78> 20076a8: d0 00 60 04 ld [ %g1 + 4 ], %o0 *location = OBJECTS_ERROR; 20076ac: c6 22 80 00 st %g3, [ %o2 ] 20076b0: 81 c3 e0 08 retl 20076b4: 90 10 20 00 clr %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { 20076b8: 80 a2 20 00 cmp %o0, 0 20076bc: 12 80 00 04 bne 20076cc <_Thread_Get+0x8c> 20076c0: 92 10 00 04 mov %g4, %o1 *location = OBJECTS_ERROR; 20076c4: 81 c3 e0 08 retl <== NOT EXECUTED 20076c8: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 20076cc: 82 13 c0 00 mov %o7, %g1 20076d0: 7f ff fd 61 call 2006c54 <_Objects_Get> 20076d4: 9e 10 40 00 mov %g1, %o7 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 20076d8: 80 a0 e0 01 cmp %g3, 1 20076dc: 22 bf ff ee be,a 2007694 <_Thread_Get+0x54> 20076e0: 85 28 a0 02 sll %g2, 2, %g2 *location = OBJECTS_ERROR; 20076e4: 10 bf ff ea b 200768c <_Thread_Get+0x4c> 20076e8: 82 10 20 01 mov 1, %g1 0200c19c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200c19c: 9d e3 bf 98 save %sp, -104, %sp #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200c1a0: 03 00 80 5a sethi %hi(0x2016800), %g1 200c1a4: e0 00 61 44 ld [ %g1 + 0x144 ], %l0 ! 2016944 <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 200c1a8: 3f 00 80 30 sethi %hi(0x200c000), %i7 200c1ac: be 17 e1 9c or %i7, 0x19c, %i7 ! 200c19c <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200c1b0: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200c1b4: 7f ff d6 e7 call 2001d50 200c1b8: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; doneConstructors = 1; 200c1bc: 82 10 20 01 mov 1, %g1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 200c1c0: 05 00 80 59 sethi %hi(0x2016400), %g2 200c1c4: e2 08 a1 98 ldub [ %g2 + 0x198 ], %l1 ! 2016598 doneConstructors = 1; 200c1c8: c2 28 a1 98 stb %g1, [ %g2 + 0x198 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { 200c1cc: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 200c1d0: 80 a0 60 00 cmp %g1, 0 200c1d4: 02 80 00 0c be 200c204 <_Thread_Handler+0x68> 200c1d8: 03 00 80 5a sethi %hi(0x2016800), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200c1dc: d0 00 61 08 ld [ %g1 + 0x108 ], %o0 ! 2016908 <_Thread_Allocated_fp> 200c1e0: 80 a4 00 08 cmp %l0, %o0 200c1e4: 02 80 00 08 be 200c204 <_Thread_Handler+0x68> 200c1e8: 80 a2 20 00 cmp %o0, 0 if ( _Thread_Allocated_fp != NULL ) 200c1ec: 22 80 00 06 be,a 200c204 <_Thread_Handler+0x68> 200c1f0: e0 20 61 08 st %l0, [ %g1 + 0x108 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200c1f4: 7f ff f2 65 call 2008b88 <_CPU_Context_save_fp> 200c1f8: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200c1fc: 03 00 80 5a sethi %hi(0x2016800), %g1 200c200: e0 20 61 08 st %l0, [ %g1 + 0x108 ] ! 2016908 <_Thread_Allocated_fp> * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 200c204: 7f ff f0 f5 call 20085d8 <_User_extensions_Thread_begin> 200c208: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200c20c: 7f ff ed 00 call 200760c <_Thread_Enable_dispatch> 200c210: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 200c214: 83 2c 60 18 sll %l1, 0x18, %g1 200c218: 80 a0 60 00 cmp %g1, 0 200c21c: 32 80 00 05 bne,a 200c230 <_Thread_Handler+0x94> 200c220: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 { _init (); 200c224: 40 00 25 f3 call 20159f0 <_init> 200c228: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200c22c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200c230: 80 a0 60 01 cmp %g1, 1 200c234: 22 80 00 0d be,a 200c268 <_Thread_Handler+0xcc> 200c238: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200c23c: 2a 80 00 09 bcs,a 200c260 <_Thread_Handler+0xc4> 200c240: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200c244: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200c248: 02 80 00 0d be 200c27c <_Thread_Handler+0xe0> <== NOT EXECUTED 200c24c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 200c250: 12 80 00 14 bne 200c2a0 <_Thread_Handler+0x104> <== NOT EXECUTED 200c254: 01 00 00 00 nop <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200c258: 10 80 00 0d b 200c28c <_Thread_Handler+0xf0> <== NOT EXECUTED 200c25c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 200c260: 10 80 00 03 b 200c26c <_Thread_Handler+0xd0> 200c264: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 200c268: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200c26c: 9f c0 40 00 call %g1 200c270: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200c274: 10 80 00 0b b 200c2a0 <_Thread_Handler+0x104> 200c278: d0 24 20 28 st %o0, [ %l0 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 200c27c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200c280: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200c284: 10 80 00 04 b 200c294 <_Thread_Handler+0xf8> <== NOT EXECUTED 200c288: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200c28c: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED 200c290: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED 200c294: 9f c0 40 00 call %g1 <== NOT EXECUTED 200c298: 01 00 00 00 nop <== NOT EXECUTED 200c29c: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 200c2a0: 7f ff f0 df call 200861c <_User_extensions_Thread_exitted> 200c2a4: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200c2a8: 90 10 20 00 clr %o0 200c2ac: 92 10 20 01 mov 1, %o1 200c2b0: 7f ff e8 e0 call 2006630 <_Internal_error_Occurred> 200c2b4: 94 10 20 06 mov 6, %o2 200c2b8: 01 00 00 00 nop 020076f0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20076f0: 9d e3 bf 98 save %sp, -104, %sp 20076f4: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 20076f8: 80 a6 a0 00 cmp %i2, 0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20076fc: e2 00 40 00 ld [ %g1 ], %l1 2007700: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007704: 12 80 00 0e bne 200773c <_Thread_Initialize+0x4c> 2007708: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 200770c: 90 10 00 19 mov %i1, %o0 2007710: 40 00 02 ba call 20081f8 <_Thread_Stack_Allocate> 2007714: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2007718: 80 a2 20 00 cmp %o0, 0 200771c: 02 80 00 2d be 20077d0 <_Thread_Initialize+0xe0> 2007720: 80 a2 00 1b cmp %o0, %i3 2007724: 0a 80 00 2b bcs 20077d0 <_Thread_Initialize+0xe0> 2007728: 01 00 00 00 nop return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 200772c: 82 10 20 01 mov 1, %g1 ! 1 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 2007730: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 2007734: 10 80 00 04 b 2007744 <_Thread_Initialize+0x54> 2007738: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 200773c: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 2007740: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2007744: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 2007748: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 200774c: 80 8f 20 ff btst 0xff, %i4 2007750: 02 80 00 07 be 200776c <_Thread_Initialize+0x7c> 2007754: b8 10 20 00 clr %i4 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2007758: 40 00 04 d8 call 2008ab8 <_Workspace_Allocate> 200775c: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) { 2007760: b8 92 20 00 orcc %o0, 0, %i4 2007764: 02 80 00 19 be 20077c8 <_Thread_Initialize+0xd8> 2007768: 01 00 00 00 nop /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200776c: 03 00 80 5a sethi %hi(0x2016800), %g1 2007770: d0 00 61 24 ld [ %g1 + 0x124 ], %o0 ! 2016924 <_Thread_Maximum_extensions> fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 2007774: f8 26 61 60 st %i4, [ %i1 + 0x160 ] the_thread->Start.fp_context = fp_area; 2007778: f8 26 60 cc st %i4, [ %i1 + 0xcc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200777c: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2007780: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007784: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007788: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 200778c: c0 26 61 64 clr [ %i1 + 0x164 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007790: 80 a2 20 00 cmp %o0, 0 2007794: 02 80 00 11 be 20077d8 <_Thread_Initialize+0xe8> 2007798: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 200779c: 90 02 20 01 inc %o0 20077a0: 40 00 04 c6 call 2008ab8 <_Workspace_Allocate> 20077a4: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 20077a8: b6 92 20 00 orcc %o0, 0, %i3 20077ac: 12 80 00 0c bne 20077dc <_Thread_Initialize+0xec> 20077b0: 80 a6 e0 00 cmp %i3, 0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 20077b4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 20077b8: 02 80 00 04 be 20077c8 <_Thread_Initialize+0xd8> <== NOT EXECUTED 20077bc: 01 00 00 00 nop <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 20077c0: 40 00 04 b7 call 2008a9c <_Workspace_Free> <== NOT EXECUTED 20077c4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 20077c8: 40 00 02 a4 call 2008258 <_Thread_Stack_Free> <== NOT EXECUTED 20077cc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20077d0: 81 c7 e0 08 ret 20077d4: 91 e8 20 00 restore %g0, 0, %o0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 20077d8: 80 a6 e0 00 cmp %i3, 0 20077dc: 02 80 00 0e be 2007814 <_Thread_Initialize+0x124> 20077e0: f6 26 61 74 st %i3, [ %i1 + 0x174 ] uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 20077e4: 03 00 80 5a sethi %hi(0x2016800), %g1 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 20077e8: 84 10 20 00 clr %g2 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 20077ec: 10 80 00 05 b 2007800 <_Thread_Initialize+0x110> 20077f0: 88 10 61 24 or %g1, 0x124, %g4 the_thread->extensions[i] = NULL; 20077f4: c2 06 61 74 ld [ %i1 + 0x174 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 20077f8: 84 00 a0 01 inc %g2 the_thread->extensions[i] = NULL; 20077fc: c0 20 40 03 clr [ %g1 + %g3 ] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007800: c2 01 00 00 ld [ %g4 ], %g1 2007804: 82 00 60 01 inc %g1 2007808: 80 a0 80 01 cmp %g2, %g1 200780c: 0a bf ff fa bcs 20077f4 <_Thread_Initialize+0x104> 2007810: 87 28 a0 02 sll %g2, 2, %g3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007814: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2007818: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200781c: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 2007820: 80 a4 a0 02 cmp %l2, 2 2007824: 12 80 00 05 bne 2007838 <_Thread_Initialize+0x148> 2007828: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 200782c: 03 00 80 59 sethi %hi(0x2016400), %g1 <== NOT EXECUTED 2007830: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 ! 20167d8 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 2007834: c2 26 60 78 st %g1, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 2007838: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 200783c: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 2007840: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2007844: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007848: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 200784c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 2007850: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2007854: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 2007858: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 200785c: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007860: 40 00 01 c5 call 2007f74 <_Thread_Set_priority> 2007864: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007868: c4 06 60 08 ld [ %i1 + 8 ], %g2 200786c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007870: 03 00 00 3f sethi %hi(0xfc00), %g1 2007874: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007878: 84 08 80 01 and %g2, %g1, %g2 200787c: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2007880: e2 26 60 0c st %l1, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 2007884: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 2007888: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200788c: f2 20 c0 02 st %i1, [ %g3 + %g2 ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 2007890: 90 10 00 19 mov %i1, %o0 2007894: 40 00 03 86 call 20086ac <_User_extensions_Thread_create> 2007898: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 200789c: 80 8a 20 ff btst 0xff, %o0 20078a0: 12 80 00 0e bne 20078d8 <_Thread_Initialize+0x1e8> 20078a4: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 20078a8: 02 80 00 05 be 20078bc <_Thread_Initialize+0x1cc> <== NOT EXECUTED 20078ac: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 20078b0: 40 00 04 7b call 2008a9c <_Workspace_Free> <== NOT EXECUTED 20078b4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 20078b8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 20078bc: 02 80 00 05 be 20078d0 <_Thread_Initialize+0x1e0> <== NOT EXECUTED 20078c0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 20078c4: 40 00 04 76 call 2008a9c <_Workspace_Free> <== NOT EXECUTED 20078c8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 20078cc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20078d0: 40 00 02 62 call 2008258 <_Thread_Stack_Free> <== NOT EXECUTED 20078d4: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 20078d8: 81 c7 e0 08 ret 20078dc: 81 e8 00 00 restore 0200c5a4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 200c5a4: 9d e3 bf 98 save %sp, -104, %sp the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 200c5a8: c4 1e 20 b0 ldd [ %i0 + 0xb0 ], %g2 Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200c5ac: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200c5b0: c4 26 20 7c st %g2, [ %i0 + 0x7c ] Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200c5b4: c2 2e 20 76 stb %g1, [ %i0 + 0x76 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 200c5b8: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 200c5bc: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 200c5c0: f4 26 20 a8 st %i2, [ %i0 + 0xa8 ] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 200c5c4: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 200c5c8: c0 26 20 70 clr [ %i0 + 0x70 ] the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 200c5cc: 7f ff f0 fe call 20089c4 <_Thread_queue_Extract_with_proxy> 200c5d0: 90 10 00 18 mov %i0, %o0 200c5d4: 80 8a 20 ff btst 0xff, %o0 200c5d8: 32 80 00 09 bne,a 200c5fc <_Thread_Reset+0x58> 200c5dc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200c5e0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200c5e4: 80 a0 60 02 cmp %g1, 2 200c5e8: 32 80 00 05 bne,a 200c5fc <_Thread_Reset+0x58> 200c5ec: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200c5f0: 7f ff f4 02 call 20095f8 <_Watchdog_Remove> <== NOT EXECUTED 200c5f4: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200c5f8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 200c5fc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200c600: 80 a0 40 19 cmp %g1, %i1 200c604: 02 80 00 05 be 200c618 <_Thread_Reset+0x74> 200c608: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 200c60c: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 200c610: 7f ff f1 71 call 2008bd4 <_Thread_Set_priority> 200c614: 81 e8 00 00 restore 200c618: 81 c7 e0 08 ret 200c61c: 81 e8 00 00 restore 0200b864 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200b864: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200b868: 03 00 80 5a sethi %hi(0x2016800), %g1 200b86c: e0 00 61 44 ld [ %g1 + 0x144 ], %l0 ! 2016944 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200b870: 7f ff d9 34 call 2001d40 200b874: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200b878: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200b87c: c4 04 40 00 ld [ %l1 ], %g2 200b880: c2 04 60 08 ld [ %l1 + 8 ], %g1 200b884: 80 a0 80 01 cmp %g2, %g1 200b888: 32 80 00 03 bne,a 200b894 <_Thread_Reset_timeslice+0x30> 200b88c: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 200b890: 30 80 00 18 b,a 200b8f0 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200b894: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200b898: 82 04 60 04 add %l1, 4, %g1 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 200b89c: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200b8a0: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200b8a4: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 200b8a8: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200b8ac: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200b8b0: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 200b8b4: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200b8b8: 7f ff d9 26 call 2001d50 200b8bc: 01 00 00 00 nop 200b8c0: 7f ff d9 20 call 2001d40 200b8c4: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200b8c8: 05 00 80 5a sethi %hi(0x2016800), %g2 200b8cc: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 2016910 <_Thread_Heir> 200b8d0: 80 a4 00 01 cmp %l0, %g1 200b8d4: 32 80 00 05 bne,a 200b8e8 <_Thread_Reset_timeslice+0x84> 200b8d8: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 200b8dc: c2 04 40 00 ld [ %l1 ], %g1 200b8e0: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _Context_Switch_necessary = TRUE; 200b8e4: 84 10 20 01 mov 1, %g2 200b8e8: 03 00 80 5a sethi %hi(0x2016800), %g1 200b8ec: c4 28 61 54 stb %g2, [ %g1 + 0x154 ] ! 2016954 <_Context_Switch_necessary> _ISR_Enable( level ); 200b8f0: 7f ff d9 18 call 2001d50 200b8f4: 81 e8 00 00 restore 200b8f8: 01 00 00 00 nop 02009924 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 2009924: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2009928: 7f ff e4 79 call 2002b0c 200992c: 01 00 00 00 nop 2009930: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 2009934: 80 8e 60 ff btst 0xff, %i1 2009938: 22 80 00 04 be,a 2009948 <_Thread_Resume+0x24> 200993c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 2009940: 10 80 00 04 b 2009950 <_Thread_Resume+0x2c> 2009944: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 2009948: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200994c: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 2009950: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 2009954: 80 a0 60 00 cmp %g1, 0 2009958: 22 80 00 03 be,a 2009964 <_Thread_Resume+0x40> 200995c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 2009960: 30 80 00 2e b,a 2009a18 <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 2009964: 80 88 60 02 btst 2, %g1 2009968: 02 80 00 2c be 2009a18 <_Thread_Resume+0xf4> 200996c: 82 08 7f fd and %g1, -3, %g1 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 2009970: 80 a0 60 00 cmp %g1, 0 2009974: 12 80 00 29 bne 2009a18 <_Thread_Resume+0xf4> 2009978: c2 26 20 10 st %g1, [ %i0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 200997c: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 2009980: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2009984: c2 11 00 00 lduh [ %g4 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 2009988: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 200998c: 82 10 40 02 or %g1, %g2, %g1 2009990: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009994: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009998: 1b 00 80 8b sethi %hi(0x2022c00), %o5 200999c: c2 26 00 00 st %g1, [ %i0 ] 20099a0: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2 old_last_node = the_chain->last; 20099a4: c2 00 e0 08 ld [ %g3 + 8 ], %g1 20099a8: c8 13 62 28 lduh [ %o5 + 0x228 ], %g4 the_chain->last = the_node; 20099ac: f0 20 e0 08 st %i0, [ %g3 + 8 ] 20099b0: 84 10 80 04 or %g2, %g4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 20099b4: c2 26 20 04 st %g1, [ %i0 + 4 ] 20099b8: c4 33 62 28 sth %g2, [ %o5 + 0x228 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 20099bc: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 20099c0: 7f ff e4 57 call 2002b1c 20099c4: 90 10 00 10 mov %l0, %o0 20099c8: 7f ff e4 51 call 2002b0c 20099cc: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 20099d0: 07 00 80 8b sethi %hi(0x2022c00), %g3 20099d4: c2 00 e2 00 ld [ %g3 + 0x200 ], %g1 ! 2022e00 <_Thread_Heir> 20099d8: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 20099dc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 20099e0: 80 a0 80 01 cmp %g2, %g1 20099e4: 1a 80 00 0d bcc 2009a18 <_Thread_Resume+0xf4> 20099e8: 03 00 80 8b sethi %hi(0x2022c00), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 20099ec: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 ! 2022e34 <_Thread_Executing> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 20099f0: f0 20 e2 00 st %i0, [ %g3 + 0x200 ] if ( _Thread_Executing->is_preemptible || 20099f4: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 20099f8: 80 a0 60 00 cmp %g1, 0 20099fc: 32 80 00 05 bne,a 2009a10 <_Thread_Resume+0xec> 2009a00: 84 10 20 01 mov 1, %g2 2009a04: 80 a0 a0 00 cmp %g2, 0 2009a08: 12 80 00 04 bne 2009a18 <_Thread_Resume+0xf4> 2009a0c: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009a10: 03 00 80 8b sethi %hi(0x2022c00), %g1 2009a14: c4 28 62 44 stb %g2, [ %g1 + 0x244 ] ! 2022e44 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 2009a18: 7f ff e4 41 call 2002b1c 2009a1c: 91 e8 00 10 restore %g0, %l0, %o0 2009a20: 01 00 00 00 nop 020081f8 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 20081f8: 9d e3 bf 98 save %sp, -104, %sp 20081fc: 03 00 80 56 sethi %hi(0x2015800), %g1 2008200: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 2015ad0 2008204: 80 a6 40 01 cmp %i1, %g1 2008208: 2a 80 00 02 bcs,a 2008210 <_Thread_Stack_Allocate+0x18> 200820c: b2 10 00 01 mov %g1, %i1 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 2008210: 03 00 80 5a sethi %hi(0x2016800), %g1 2008214: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 201691c <_Configuration_Table> 2008218: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 200821c: 80 a0 60 00 cmp %g1, 0 2008220: 22 80 00 06 be,a 2008238 <_Thread_Stack_Allocate+0x40> 2008224: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 2008228: 9f c0 40 00 call %g1 <== NOT EXECUTED 200822c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008230: 10 80 00 05 b 2008244 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED 2008234: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 2008238: 40 00 02 20 call 2008ab8 <_Workspace_Allocate> 200823c: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008240: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 2008244: 80 a0 00 08 cmp %g0, %o0 2008248: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 200824c: b0 0e 40 18 and %i1, %i0, %i0 2008250: 81 c7 e0 08 ret 2008254: 81 e8 00 00 restore 02008258 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 2008258: 9d e3 bf 98 save %sp, -104, %sp /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 200825c: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 2008260: 80 a0 60 00 cmp %g1, 0 2008264: 02 80 00 09 be 2008288 <_Thread_Stack_Free+0x30> 2008268: 03 00 80 5a sethi %hi(0x2016800), %g1 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) 200826c: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 201691c <_Configuration_Table> 2008270: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008274: 80 a0 60 00 cmp %g1, 0 2008278: 02 80 00 06 be 2008290 <_Thread_Stack_Free+0x38> 200827c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 (*_Configuration_Table->stack_free_hook)( 2008280: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008284: 01 00 00 00 nop <== NOT EXECUTED 2008288: 81 c7 e0 08 ret <== NOT EXECUTED 200828c: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 2008290: 40 00 02 03 call 2008a9c <_Workspace_Free> 2008294: 91 e8 00 08 restore %g0, %o0, %o0 2008298: 01 00 00 00 nop 02008340 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 2008340: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 2008344: 03 00 80 5a sethi %hi(0x2016800), %g1 2008348: e0 00 61 44 ld [ %g1 + 0x144 ], %l0 ! 2016944 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 200834c: c2 0c 20 76 ldub [ %l0 + 0x76 ], %g1 2008350: 80 a0 60 00 cmp %g1, 0 2008354: 02 80 00 23 be 20083e0 <_Thread_Tickle_timeslice+0xa0> 2008358: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 200835c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2008360: 80 a0 60 00 cmp %g1, 0 2008364: 12 80 00 1f bne 20083e0 <_Thread_Tickle_timeslice+0xa0> 2008368: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 200836c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 2008370: 80 a0 60 01 cmp %g1, 1 2008374: 0a 80 00 12 bcs 20083bc <_Thread_Tickle_timeslice+0x7c> 2008378: 80 a0 60 02 cmp %g1, 2 200837c: 28 80 00 07 bleu,a 2008398 <_Thread_Tickle_timeslice+0x58> 2008380: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 2008384: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 2008388: 12 80 00 16 bne 20083e0 <_Thread_Tickle_timeslice+0xa0> <== NOT EXECUTED 200838c: 01 00 00 00 nop <== NOT EXECUTED executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 2008390: 10 80 00 0d b 20083c4 <_Thread_Tickle_timeslice+0x84> <== NOT EXECUTED 2008394: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED case THREAD_CPU_BUDGET_ALGORITHM_NONE: break; case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: if ( (int)(--executing->cpu_time_budget) <= 0 ) { 2008398: 82 00 7f ff add %g1, -1, %g1 200839c: 80 a0 60 00 cmp %g1, 0 20083a0: 14 80 00 07 bg 20083bc <_Thread_Tickle_timeslice+0x7c> 20083a4: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 20083a8: 40 00 0d 2f call 200b864 <_Thread_Reset_timeslice> 20083ac: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 20083b0: 03 00 80 59 sethi %hi(0x2016400), %g1 20083b4: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 ! 20167d8 <_Thread_Ticks_per_timeslice> 20083b8: c2 24 20 78 st %g1, [ %l0 + 0x78 ] 20083bc: 81 c7 e0 08 ret 20083c0: 81 e8 00 00 restore } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 20083c4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20083c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20083cc: 12 bf ff fc bne 20083bc <_Thread_Tickle_timeslice+0x7c> <== NOT EXECUTED 20083d0: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 20083d4: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 20083d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20083dc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20083e0: 81 c7 e0 08 ret 20083e4: 81 e8 00 00 restore 02007bfc <_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 ) { 2007bfc: 9d e3 bf 98 save %sp, -104, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 2007c00: e4 06 60 14 ld [ %i1 + 0x14 ], %l2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2007c04: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2007c08: 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); 2007c0c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2007c10: 82 06 60 38 add %i1, 0x38, %g1 2007c14: c2 26 60 40 st %g1, [ %i1 + 0x40 ] header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2007c18: 80 8c a0 20 btst 0x20, %l2 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 2007c1c: 83 34 a0 06 srl %l2, 6, %g1 _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 ]; block_state = the_thread_queue->state; 2007c20: ec 06 20 38 ld [ %i0 + 0x38 ], %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 ]; 2007c24: 85 28 60 04 sll %g1, 4, %g2 2007c28: 83 28 60 02 sll %g1, 2, %g1 2007c2c: 84 20 80 01 sub %g2, %g1, %g2 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2007c30: 12 80 00 31 bne 2007cf4 <_Thread_queue_Enqueue_priority+0xf8> 2007c34: a6 06 00 02 add %i0, %g2, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2007c38: a8 04 e0 04 add %l3, 4, %l4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 2007c3c: aa 10 00 02 mov %g2, %l5 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 2007c40: 7f ff e8 40 call 2001d40 2007c44: 01 00 00 00 nop 2007c48: a6 10 00 08 mov %o0, %l3 search_thread = (Thread_Control *) header->first; 2007c4c: a2 10 3f ff mov -1, %l1 2007c50: 10 80 00 18 b 2007cb0 <_Thread_queue_Enqueue_priority+0xb4> 2007c54: e0 06 00 15 ld [ %i0 + %l5 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority <= search_priority ) 2007c58: 80 a4 80 11 cmp %l2, %l1 2007c5c: 28 80 00 19 bleu,a 2007cc0 <_Thread_queue_Enqueue_priority+0xc4> 2007c60: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 2007c64: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 2007c68: 80 a4 00 14 cmp %l0, %l4 2007c6c: 22 80 00 15 be,a 2007cc0 <_Thread_queue_Enqueue_priority+0xc4> 2007c70: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 2007c74: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2007c78: 80 a4 80 11 cmp %l2, %l1 2007c7c: 28 80 00 11 bleu,a 2007cc0 <_Thread_queue_Enqueue_priority+0xc4> 2007c80: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 2007c84: 7f ff e8 33 call 2001d50 2007c88: 90 10 00 13 mov %l3, %o0 2007c8c: 7f ff e8 2d call 2001d40 2007c90: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007c94: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007c98: 80 8d 80 01 btst %l6, %g1 2007c9c: 32 80 00 05 bne,a 2007cb0 <_Thread_queue_Enqueue_priority+0xb4> 2007ca0: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 2007ca4: 7f ff e8 2b call 2001d50 <== NOT EXECUTED 2007ca8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2007cac: 30 bf ff e5 b,a 2007c40 <_Thread_queue_Enqueue_priority+0x44> <== 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 ) ) { 2007cb0: 80 a4 00 14 cmp %l0, %l4 2007cb4: 32 bf ff e9 bne,a 2007c58 <_Thread_queue_Enqueue_priority+0x5c> 2007cb8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2007cbc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007cc0: 80 a0 60 01 cmp %g1, 1 2007cc4: 12 80 00 48 bne 2007de4 <_Thread_queue_Enqueue_priority+0x1e8> 2007cc8: 90 10 00 13 mov %l3, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2007ccc: 80 a4 80 11 cmp %l2, %l1 2007cd0: 02 80 00 3a be 2007db8 <_Thread_queue_Enqueue_priority+0x1bc> 2007cd4: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2007cd8: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007cdc: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 2007ce0: 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; 2007ce4: 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; 2007ce8: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2007cec: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007cf0: 30 80 00 39 b,a 2007dd4 <_Thread_queue_Enqueue_priority+0x1d8> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2007cf4: 03 00 80 56 sethi %hi(0x2015800), %g1 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 2007cf8: aa 10 00 13 mov %l3, %l5 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2007cfc: ae 10 62 d4 or %g1, 0x2d4, %l7 2007d00: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 2007d04: 7f ff e8 0f call 2001d40 2007d08: a2 00 60 01 add %g1, 1, %l1 2007d0c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 2007d10: 10 80 00 19 b 2007d74 <_Thread_queue_Enqueue_priority+0x178> 2007d14: e0 05 60 08 ld [ %l5 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority >= search_priority ) 2007d18: 80 a4 80 11 cmp %l2, %l1 2007d1c: 3a 80 00 1a bcc,a 2007d84 <_Thread_queue_Enqueue_priority+0x188> 2007d20: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2007d24: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 2007d28: 80 a4 00 13 cmp %l0, %l3 2007d2c: 22 80 00 16 be,a 2007d84 <_Thread_queue_Enqueue_priority+0x188> 2007d30: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 2007d34: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 2007d38: 80 a4 80 11 cmp %l2, %l1 2007d3c: 3a 80 00 12 bcc,a 2007d84 <_Thread_queue_Enqueue_priority+0x188> 2007d40: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 2007d44: 7f ff e8 03 call 2001d50 2007d48: 90 10 00 14 mov %l4, %o0 2007d4c: 7f ff e7 fd call 2001d40 2007d50: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007d54: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007d58: 80 8d 80 01 btst %l6, %g1 2007d5c: 32 80 00 06 bne,a 2007d74 <_Thread_queue_Enqueue_priority+0x178> 2007d60: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 2007d64: 7f ff e7 fb call 2001d50 <== NOT EXECUTED 2007d68: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2007d6c: 10 bf ff e6 b 2007d04 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 2007d70: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2007d74: 80 a4 00 13 cmp %l0, %l3 2007d78: 32 bf ff e8 bne,a 2007d18 <_Thread_queue_Enqueue_priority+0x11c> 2007d7c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2007d80: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007d84: 80 a0 60 01 cmp %g1, 1 2007d88: 12 80 00 17 bne 2007de4 <_Thread_queue_Enqueue_priority+0x1e8> 2007d8c: 90 10 00 14 mov %l4, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2007d90: 80 a4 80 11 cmp %l2, %l1 2007d94: 02 80 00 09 be 2007db8 <_Thread_queue_Enqueue_priority+0x1bc> 2007d98: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2007d9c: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2007da0: e0 26 60 04 st %l0, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 2007da4: 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; 2007da8: f0 26 60 44 st %i0, [ %i1 + 0x44 ] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 2007dac: f2 20 60 04 st %i1, [ %g1 + 4 ] 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; 2007db0: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007db4: 30 80 00 08 b,a 2007dd4 <_Thread_queue_Enqueue_priority+0x1d8> 2007db8: 82 04 20 3c add %l0, 0x3c, %g1 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; 2007dbc: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007dc0: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2007dc4: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 2007dc8: 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; 2007dcc: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 2007dd0: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007dd4: 7f ff e7 df call 2001d50 2007dd8: b0 10 20 01 mov 1, %i0 2007ddc: 81 c7 e0 08 ret 2007de0: 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; 2007de4: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 <== NOT EXECUTED * 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; 2007de8: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 2007dec: 81 c7 e0 08 ret <== NOT EXECUTED 2007df0: 81 e8 00 00 restore <== NOT EXECUTED 0200c2bc <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200c2bc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200c2c0: 7f ff d6 a0 call 2001d40 200c2c4: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200c2c8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200c2cc: 03 00 00 ef sethi %hi(0x3bc00), %g1 200c2d0: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200c2d4: 80 88 80 01 btst %g2, %g1 200c2d8: 32 80 00 04 bne,a 200c2e8 <_Thread_queue_Extract_fifo+0x2c> 200c2dc: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 200c2e0: 7f ff d6 9c call 2001d50 <== NOT EXECUTED 200c2e4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200c2e8: c4 06 60 04 ld [ %i1 + 4 ], %g2 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200c2ec: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 200c2f0: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c2f4: c4 20 60 04 st %g2, [ %g1 + 4 ] 200c2f8: 80 a0 e0 02 cmp %g3, 2 200c2fc: 02 80 00 06 be 200c314 <_Thread_queue_Extract_fifo+0x58> 200c300: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 200c304: 7f ff d6 93 call 2001d50 200c308: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 200c30c: 10 80 00 0a b 200c334 <_Thread_queue_Extract_fifo+0x78> 200c310: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200c314: 82 10 20 03 mov 3, %g1 200c318: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200c31c: 7f ff d6 8d call 2001d50 200c320: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 200c324: 7f ff f1 8a call 200894c <_Watchdog_Remove> 200c328: 90 06 60 48 add %i1, 0x48, %o0 200c32c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200c330: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200c334: 7f ff eb a0 call 20071b4 <_Thread_Clear_state> 200c338: 81 e8 00 00 restore 200c33c: 01 00 00 00 nop 0200b5e0 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 200b5e0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 200b5e4: 7f ff d9 d7 call 2001d40 200b5e8: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200b5ec: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200b5f0: 03 00 00 ef sethi %hi(0x3bc00), %g1 200b5f4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200b5f8: 80 88 80 01 btst %g2, %g1 200b5fc: 32 80 00 03 bne,a 200b608 <_Thread_queue_Extract_priority_helper+0x28> 200b600: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 200b604: 30 80 00 1c b,a 200b674 <_Thread_queue_Extract_priority_helper+0x94> <== NOT EXECUTED */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200b608: 82 06 60 3c add %i1, 0x3c, %g1 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 200b60c: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200b610: 80 a0 c0 01 cmp %g3, %g1 200b614: 02 80 00 13 be 200b660 <_Thread_queue_Extract_priority_helper+0x80> 200b618: c2 06 60 04 ld [ %i1 + 4 ], %g1 new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 200b61c: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 200b620: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 200b624: c6 20 a0 04 st %g3, [ %g2 + 4 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 200b628: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 200b62c: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 200b630: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 200b634: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 200b638: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 200b63c: 80 a0 80 01 cmp %g2, %g1 200b640: 02 80 00 0a be 200b668 <_Thread_queue_Extract_priority_helper+0x88> 200b644: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 200b648: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 200b64c: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 200b650: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 200b654: 82 00 e0 3c add %g3, 0x3c, %g1 200b658: 10 80 00 04 b 200b668 <_Thread_queue_Extract_priority_helper+0x88> 200b65c: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 200b660: c2 20 a0 04 st %g1, [ %g2 + 4 ] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 200b664: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 200b668: 80 8e a0 ff btst 0xff, %i2 200b66c: 22 80 00 04 be,a 200b67c <_Thread_queue_Extract_priority_helper+0x9c> 200b670: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 200b674: 7f ff d9 b7 call 2001d50 200b678: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200b67c: 80 a0 60 02 cmp %g1, 2 200b680: 02 80 00 06 be 200b698 <_Thread_queue_Extract_priority_helper+0xb8> 200b684: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200b688: 7f ff d9 b2 call 2001d50 200b68c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200b690: 10 80 00 08 b 200b6b0 <_Thread_queue_Extract_priority_helper+0xd0> 200b694: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200b698: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200b69c: 7f ff d9 ad call 2001d50 <== NOT EXECUTED 200b6a0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 200b6a4: 7f ff f4 aa call 200894c <_Watchdog_Remove> <== NOT EXECUTED 200b6a8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 200b6ac: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 200b6b0: 7f ff ee c1 call 20071b4 <_Thread_Clear_state> 200b6b4: 81 e8 00 00 restore 200b6b8: 01 00 00 00 nop 0200b6bc <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 200b6bc: c4 02 20 44 ld [ %o0 + 0x44 ], %g2 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 200b6c0: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 200b6c4: 80 a0 e0 00 cmp %g3, 0 200b6c8: 02 80 00 0f be 200b704 <_Thread_queue_Process_timeout+0x48> 200b6cc: 92 10 00 08 mov %o0, %o1 200b6d0: 03 00 80 5a sethi %hi(0x2016800), %g1 200b6d4: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 ! 2016944 <_Thread_Executing> 200b6d8: 80 a2 00 01 cmp %o0, %g1 200b6dc: 32 80 00 0b bne,a 200b708 <_Thread_queue_Process_timeout+0x4c> 200b6e0: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 200b6e4: 80 a0 e0 03 cmp %g3, 3 200b6e8: 02 80 00 0d be 200b71c <_Thread_queue_Process_timeout+0x60> 200b6ec: 01 00 00 00 nop the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200b6f0: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 200b6f4: c2 22 20 34 st %g1, [ %o0 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200b6f8: 82 10 20 02 mov 2, %g1 200b6fc: 81 c3 e0 08 retl 200b700: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200b704: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200b708: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200b70c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200b710: 82 13 c0 00 mov %o7, %g1 200b714: 7f ff ff a8 call 200b5b4 <_Thread_queue_Extract> 200b718: 9e 10 40 00 mov %g1, %o7 200b71c: 81 c3 e0 08 retl <== NOT EXECUTED 200b720: 01 00 00 00 nop 0200a134 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a134: 9d e3 bf 98 save %sp, -104, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a138: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 200a13c: de 06 60 04 ld [ %i1 + 4 ], %o7 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a140: 91 38 60 1f sra %g1, 0x1f, %o0 200a144: 92 10 00 01 mov %g1, %o1 200a148: 83 30 60 1d srl %g1, 0x1d, %g1 200a14c: 87 2a 60 03 sll %o1, 3, %g3 200a150: 85 2a 20 03 sll %o0, 3, %g2 200a154: 84 10 40 02 or %g1, %g2, %g2 200a158: 83 30 e0 1b srl %g3, 0x1b, %g1 200a15c: 99 28 a0 05 sll %g2, 5, %o4 200a160: 9b 28 e0 05 sll %g3, 5, %o5 200a164: 98 10 40 0c or %g1, %o4, %o4 200a168: 9a a3 40 03 subcc %o5, %g3, %o5 200a16c: 83 33 60 1a srl %o5, 0x1a, %g1 200a170: 98 63 00 02 subx %o4, %g2, %o4 200a174: 97 2b 60 06 sll %o5, 6, %o3 200a178: 95 2b 20 06 sll %o4, 6, %o2 200a17c: 96 a2 c0 0d subcc %o3, %o5, %o3 200a180: 94 10 40 0a or %g1, %o2, %o2 200a184: 94 62 80 0c subx %o2, %o4, %o2 200a188: 96 82 c0 09 addcc %o3, %o1, %o3 200a18c: 94 42 80 08 addx %o2, %o0, %o2 200a190: 83 32 e0 1e srl %o3, 0x1e, %g1 200a194: 85 2a a0 02 sll %o2, 2, %g2 200a198: 84 10 40 02 or %g1, %g2, %g2 200a19c: 87 2a e0 02 sll %o3, 2, %g3 200a1a0: 96 82 c0 03 addcc %o3, %g3, %o3 200a1a4: 94 42 80 02 addx %o2, %g2, %o2 200a1a8: 83 32 e0 1e srl %o3, 0x1e, %g1 200a1ac: 85 2a a0 02 sll %o2, 2, %g2 200a1b0: 84 10 40 02 or %g1, %g2, %g2 200a1b4: 87 2a e0 02 sll %o3, 2, %g3 200a1b8: 96 82 c0 03 addcc %o3, %g3, %o3 200a1bc: 94 42 80 02 addx %o2, %g2, %o2 200a1c0: 83 32 e0 1e srl %o3, 0x1e, %g1 200a1c4: 85 2a a0 02 sll %o2, 2, %g2 200a1c8: 84 10 40 02 or %g1, %g2, %g2 200a1cc: 87 2a e0 02 sll %o3, 2, %g3 200a1d0: 96 82 c0 03 addcc %o3, %g3, %o3 200a1d4: 94 42 80 02 addx %o2, %g2, %o2 200a1d8: 85 32 e0 17 srl %o3, 0x17, %g2 200a1dc: 83 2a a0 09 sll %o2, 9, %g1 200a1e0: 9b 2a e0 09 sll %o3, 9, %o5 200a1e4: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 200a1e8: 96 83 40 0f addcc %o5, %o7, %o3 200a1ec: 85 3b e0 1f sra %o7, 0x1f, %g2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 200a1f0: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a1f4: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 200a1f8: 80 92 80 0b orcc %o2, %o3, %g0 200a1fc: 12 80 00 06 bne 200a214 <_Timespec_Divide+0xe0> 200a200: d0 06 00 00 ld [ %i0 ], %o0 *ival_percentage = 0; 200a204: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 200a208: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 200a20c: 81 c7 e0 08 ret <== NOT EXECUTED 200a210: 81 e8 00 00 restore <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a214: 92 10 00 08 mov %o0, %o1 200a218: 83 32 60 1d srl %o1, 0x1d, %g1 200a21c: 9b 2a 60 03 sll %o1, 3, %o5 200a220: 91 3a 20 1f sra %o0, 0x1f, %o0 200a224: 99 2a 20 03 sll %o0, 3, %o4 200a228: 98 10 40 0c or %g1, %o4, %o4 200a22c: 83 33 60 1b srl %o5, 0x1b, %g1 200a230: 85 2b 20 05 sll %o4, 5, %g2 200a234: 87 2b 60 05 sll %o5, 5, %g3 200a238: 84 10 40 02 or %g1, %g2, %g2 200a23c: 86 a0 c0 0d subcc %g3, %o5, %g3 200a240: 83 30 e0 1a srl %g3, 0x1a, %g1 200a244: 84 60 80 0c subx %g2, %o4, %g2 200a248: 9b 28 e0 06 sll %g3, 6, %o5 200a24c: 99 28 a0 06 sll %g2, 6, %o4 200a250: 9a a3 40 03 subcc %o5, %g3, %o5 200a254: 98 10 40 0c or %g1, %o4, %o4 200a258: 98 63 00 02 subx %o4, %g2, %o4 200a25c: 9a 83 40 09 addcc %o5, %o1, %o5 200a260: 83 33 60 1e srl %o5, 0x1e, %g1 200a264: 98 43 00 08 addx %o4, %o0, %o4 200a268: 87 2b 60 02 sll %o5, 2, %g3 200a26c: 85 2b 20 02 sll %o4, 2, %g2 200a270: 9a 83 40 03 addcc %o5, %g3, %o5 200a274: 84 10 40 02 or %g1, %g2, %g2 200a278: 83 33 60 1e srl %o5, 0x1e, %g1 200a27c: 98 43 00 02 addx %o4, %g2, %o4 200a280: 87 2b 60 02 sll %o5, 2, %g3 200a284: 85 2b 20 02 sll %o4, 2, %g2 200a288: 9a 83 40 03 addcc %o5, %g3, %o5 200a28c: 84 10 40 02 or %g1, %g2, %g2 200a290: 83 33 60 1e srl %o5, 0x1e, %g1 200a294: 98 43 00 02 addx %o4, %g2, %o4 200a298: 87 2b 60 02 sll %o5, 2, %g3 200a29c: 85 2b 20 02 sll %o4, 2, %g2 200a2a0: 9a 83 40 03 addcc %o5, %g3, %o5 200a2a4: 84 10 40 02 or %g1, %g2, %g2 200a2a8: 98 43 00 02 addx %o4, %g2, %o4 200a2ac: 83 2b 20 09 sll %o4, 9, %g1 200a2b0: 85 33 60 17 srl %o5, 0x17, %g2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a2b4: a6 10 00 12 mov %l2, %l3 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a2b8: a0 10 80 01 or %g2, %g1, %l0 200a2bc: a3 2b 60 09 sll %o5, 9, %l1 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a2c0: a2 84 40 13 addcc %l1, %l3, %l1 200a2c4: 83 34 60 1e srl %l1, 0x1e, %g1 200a2c8: 87 2c 60 02 sll %l1, 2, %g3 200a2cc: a5 3c a0 1f sra %l2, 0x1f, %l2 200a2d0: a0 44 00 12 addx %l0, %l2, %l0 200a2d4: 85 2c 20 02 sll %l0, 2, %g2 200a2d8: 84 10 40 02 or %g1, %g2, %g2 200a2dc: 83 30 e0 1b srl %g3, 0x1b, %g1 200a2e0: 99 28 a0 05 sll %g2, 5, %o4 200a2e4: 9b 28 e0 05 sll %g3, 5, %o5 200a2e8: 98 10 40 0c or %g1, %o4, %o4 200a2ec: 9a a3 40 03 subcc %o5, %g3, %o5 200a2f0: 98 63 00 02 subx %o4, %g2, %o4 200a2f4: 9a 83 40 11 addcc %o5, %l1, %o5 200a2f8: 83 33 60 1e srl %o5, 0x1e, %g1 200a2fc: 98 43 00 10 addx %o4, %l0, %o4 200a300: 87 2b 60 02 sll %o5, 2, %g3 200a304: 85 2b 20 02 sll %o4, 2, %g2 200a308: 9a 83 40 03 addcc %o5, %g3, %o5 200a30c: 84 10 40 02 or %g1, %g2, %g2 200a310: 83 33 60 1e srl %o5, 0x1e, %g1 200a314: 87 2b 60 02 sll %o5, 2, %g3 200a318: 98 43 00 02 addx %o4, %g2, %o4 200a31c: 9a 83 40 03 addcc %o5, %g3, %o5 200a320: 85 2b 20 02 sll %o4, 2, %g2 200a324: 84 10 40 02 or %g1, %g2, %g2 200a328: 83 33 60 1b srl %o5, 0x1b, %g1 200a32c: 98 43 00 02 addx %o4, %g2, %o4 200a330: 99 2b 20 05 sll %o4, 5, %o4 200a334: 98 10 40 0c or %g1, %o4, %o4 200a338: 93 2b 60 05 sll %o5, 5, %o1 200a33c: 40 00 32 46 call 2016c54 <__udivdi3> 200a340: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 200a344: 94 10 20 00 clr %o2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a348: a0 10 00 08 mov %o0, %l0 200a34c: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 200a350: 96 10 23 e8 mov 0x3e8, %o3 200a354: 40 00 32 40 call 2016c54 <__udivdi3> 200a358: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 200a35c: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a360: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 200a364: 94 10 20 00 clr %o2 200a368: 92 10 00 11 mov %l1, %o1 200a36c: 40 00 33 16 call 2016fc4 <__umoddi3> 200a370: 96 10 23 e8 mov 0x3e8, %o3 200a374: d2 26 c0 00 st %o1, [ %i3 ] 200a378: 81 c7 e0 08 ret 200a37c: 81 e8 00 00 restore 02012974 <_Timespec_From_ticks>: void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 2012974: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 2012978: 03 00 80 95 sethi %hi(0x2025400), %g1 <== NOT EXECUTED 201297c: d2 00 61 c0 ld [ %g1 + 0x1c0 ], %o1 ! 20255c0 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 2012980: 40 00 2e 38 call 201e260 <.umul> <== NOT EXECUTED 2012984: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 2012988: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 201298c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 2012990: 7f ff bb 88 call 20017b0 <.udiv> <== NOT EXECUTED 2012994: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 2012998: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 201299c: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 20129a0: 40 00 2e 6a call 201e348 <.urem> <== NOT EXECUTED 20129a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20129a8: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 20129ac: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 20129b0: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20129b4: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 20129b8: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED 20129bc: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 20129c0: 81 c7 e0 08 ret <== NOT EXECUTED 20129c4: 81 e8 00 00 restore <== NOT EXECUTED 020129c8 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 20129c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20129cc: 02 80 00 0f be 2012a08 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 20129d0: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 20129d4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 20129d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20129dc: 06 80 00 0b bl 2012a08 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 20129e0: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 20129e4: d0 02 20 04 ld [ %o0 + 4 ], %o0 <== NOT EXECUTED 20129e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20129ec: 06 80 00 07 bl 2012a08 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 20129f0: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 <== NOT EXECUTED 20129f4: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <== NOT EXECUTED 20129f8: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 20129fc: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 2012a00: 81 c3 e0 08 retl <== NOT EXECUTED 2012a04: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 2012a08: 81 c3 e0 08 retl <== NOT EXECUTED 2012a0c: 90 10 20 00 clr %o0 <== NOT EXECUTED 02012a10 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 2012a10: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 2012a14: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED 2012a18: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2012a1c: 12 80 00 06 bne 2012a34 <_Timespec_To_ticks+0x24> <== NOT EXECUTED 2012a20: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 2012a24: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 2012a28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012a2c: 02 80 00 13 be 2012a78 <_Timespec_To_ticks+0x68> <== NOT EXECUTED 2012a30: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 2012a34: 03 00 80 95 sethi %hi(0x2025400), %g1 <== NOT EXECUTED 2012a38: e2 00 61 c0 ld [ %g1 + 0x1c0 ], %l1 ! 20255c0 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 2012a3c: 11 00 03 d0 sethi %hi(0xf4000), %o0 <== NOT EXECUTED 2012a40: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2012a44: 7f ff bb 5b call 20017b0 <.udiv> <== NOT EXECUTED 2012a48: 90 12 22 40 or %o0, 0x240, %o0 <== NOT EXECUTED 2012a4c: 40 00 2e 05 call 201e260 <.umul> <== NOT EXECUTED 2012a50: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2012a54: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 2012a58: d0 04 a0 04 ld [ %l2 + 4 ], %o0 <== NOT EXECUTED 2012a5c: 7f ff bb 55 call 20017b0 <.udiv> <== NOT EXECUTED 2012a60: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED 2012a64: 7f ff bb 53 call 20017b0 <.udiv> <== NOT EXECUTED 2012a68: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 2012a6c: b0 82 00 10 addcc %o0, %l0, %i0 <== NOT EXECUTED 2012a70: 22 80 00 02 be,a 2012a78 <_Timespec_To_ticks+0x68> <== NOT EXECUTED 2012a74: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return ticks; return 1; } 2012a78: 81 c7 e0 08 ret <== NOT EXECUTED 2012a7c: 81 e8 00 00 restore <== NOT EXECUTED 0200b8fc <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 200b8fc: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 200b900: 11 00 80 5a sethi %hi(0x2016800), %o0 200b904: 92 10 00 18 mov %i0, %o1 200b908: 7f ff e9 6a call 2005eb0 <_Chain_Append> 200b90c: 90 12 22 b8 or %o0, 0x2b8, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 200b910: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200b914: 80 a0 60 00 cmp %g1, 0 200b918: 02 80 00 06 be 200b930 <_User_extensions_Add_API_set+0x34> 200b91c: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 200b920: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 200b924: 31 00 80 5a sethi %hi(0x2016800), %i0 200b928: 7f ff e9 62 call 2005eb0 <_Chain_Append> 200b92c: 91 ee 20 84 restore %i0, 0x84, %o0 200b930: 81 c7 e0 08 ret <== NOT EXECUTED 200b934: 81 e8 00 00 restore <== NOT EXECUTED 0200d324 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 200d324: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 200d328: 40 00 12 20 call 2011ba8 <_Chain_Extract> 200d32c: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 200d330: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d334: 80 a0 60 00 cmp %g1, 0 200d338: 02 80 00 04 be 200d348 <_User_extensions_Remove_set+0x24> 200d33c: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 200d340: 40 00 12 1a call 2011ba8 <_Chain_Extract> <== NOT EXECUTED 200d344: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 200d348: 81 c7 e0 08 ret 200d34c: 81 e8 00 00 restore 020086ac <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 20086ac: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 20086b0: 03 00 80 5a sethi %hi(0x2016800), %g1 20086b4: e0 00 62 b8 ld [ %g1 + 0x2b8 ], %l0 ! 2016ab8 <_User_extensions_List> 20086b8: 82 10 62 b8 or %g1, 0x2b8, %g1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 20086bc: a4 00 60 04 add %g1, 4, %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 20086c0: 03 00 80 5a sethi %hi(0x2016800), %g1 20086c4: 10 80 00 0d b 20086f8 <_User_extensions_Thread_create+0x4c> 20086c8: a2 10 61 44 or %g1, 0x144, %l1 ! 2016944 <_Thread_Executing> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 20086cc: 80 a0 60 00 cmp %g1, 0 20086d0: 02 80 00 09 be 20086f4 <_User_extensions_Thread_create+0x48> 20086d4: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 20086d8: 9f c0 40 00 call %g1 20086dc: d0 04 40 00 ld [ %l1 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 20086e0: 80 8a 20 ff btst 0xff, %o0 20086e4: 32 80 00 05 bne,a 20086f8 <_User_extensions_Thread_create+0x4c> 20086e8: e0 04 00 00 ld [ %l0 ], %l0 20086ec: 81 c7 e0 08 ret <== NOT EXECUTED 20086f0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 20086f4: e0 04 00 00 ld [ %l0 ], %l0 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 20086f8: 80 a4 00 12 cmp %l0, %l2 20086fc: 32 bf ff f4 bne,a 20086cc <_User_extensions_Thread_create+0x20> 2008700: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 2008704: 81 c7 e0 08 ret 2008708: 91 e8 20 01 restore %g0, 1, %o0 02015f2c <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 2015f2c: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 2015f30: 80 a6 60 00 cmp %i1, 0 2015f34: 02 80 00 31 be 2015ff8 <_Watchdog_Adjust_to_chain+0xcc> 2015f38: 01 00 00 00 nop return; } _ISR_Disable( level ); 2015f3c: 7f ff d5 6f call 200b4f8 2015f40: 01 00 00 00 nop 2015f44: a4 10 00 08 mov %o0, %l2 if ( !_Chain_Is_empty( header ) ) { 2015f48: c2 06 00 00 ld [ %i0 ], %g1 2015f4c: a2 06 20 04 add %i0, 4, %l1 2015f50: 80 a0 40 11 cmp %g1, %l1 2015f54: 02 80 00 27 be 2015ff0 <_Watchdog_Adjust_to_chain+0xc4> 2015f58: 01 00 00 00 nop 2015f5c: a6 06 a0 04 add %i2, 4, %l3 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 2015f60: c4 06 00 00 ld [ %i0 ], %g2 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 2015f64: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0 2015f68: 80 a6 40 10 cmp %i1, %l0 2015f6c: 3a 80 00 05 bcc,a 2015f80 <_Watchdog_Adjust_to_chain+0x54> 2015f70: c0 20 a0 10 clr [ %g2 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 2015f74: 82 24 00 19 sub %l0, %i1, %g1 2015f78: 10 80 00 1e b 2015ff0 <_Watchdog_Adjust_to_chain+0xc4> 2015f7c: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2015f80: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2015f84: 80 a0 80 11 cmp %g2, %l1 2015f88: 32 80 00 04 bne,a 2015f98 <_Watchdog_Adjust_to_chain+0x6c> 2015f8c: c2 00 80 00 ld [ %g2 ], %g1 2015f90: 10 80 00 04 b 2015fa0 <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED 2015f94: 84 10 20 00 clr %g2 <== NOT EXECUTED Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 2015f98: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 2015f9c: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2015fa0: e6 20 80 00 st %l3, [ %g2 ] old_last_node = the_chain->last; 2015fa4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 2015fa8: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2015fac: c2 20 a0 04 st %g1, [ %g2 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2015fb0: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 2015fb4: 7f ff d5 55 call 200b508 2015fb8: 90 10 00 12 mov %l2, %o0 2015fbc: 7f ff d5 4f call 200b4f8 2015fc0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2015fc4: c2 06 00 00 ld [ %i0 ], %g1 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 2015fc8: 80 a0 40 11 cmp %g1, %l1 2015fcc: 02 80 00 09 be 2015ff0 <_Watchdog_Adjust_to_chain+0xc4> 2015fd0: 01 00 00 00 nop 2015fd4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2015fd8: 80 a0 60 00 cmp %g1, 0 2015fdc: 22 bf ff ea be,a 2015f84 <_Watchdog_Adjust_to_chain+0x58> 2015fe0: c4 06 00 00 ld [ %i0 ], %g2 return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 2015fe4: b2 a6 40 10 subcc %i1, %l0, %i1 2015fe8: 32 bf ff df bne,a 2015f64 <_Watchdog_Adjust_to_chain+0x38> 2015fec: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED break; } } } _ISR_Enable( level ); 2015ff0: 7f ff d5 46 call 200b508 2015ff4: 91 e8 00 12 restore %g0, %l2, %o0 2015ff8: 81 c7 e0 08 ret 2015ffc: 81 e8 00 00 restore 020087e4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 20087e4: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 20087e8: 03 00 80 5a sethi %hi(0x2016800), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 20087ec: aa 10 00 18 mov %i0, %l5 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 20087f0: e6 00 61 20 ld [ %g1 + 0x120 ], %l3 _ISR_Disable( level ); 20087f4: 7f ff e5 53 call 2001d40 20087f8: 01 00 00 00 nop 20087fc: b0 10 00 08 mov %o0, %i0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 2008800: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008804: 80 a0 60 00 cmp %g1, 0 2008808: 02 80 00 03 be 2008814 <_Watchdog_Insert+0x30> 200880c: 07 00 80 5a sethi %hi(0x2016800), %g3 _ISR_Enable( level ); 2008810: 30 80 00 39 b,a 20088f4 <_Watchdog_Insert+0x110> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 2008814: c2 00 e1 d0 ld [ %g3 + 0x1d0 ], %g1 ! 20169d0 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008818: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 200881c: 82 00 60 01 inc %g1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008820: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 2008824: c2 20 e1 d0 st %g1, [ %g3 + 0x1d0 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 2008828: 03 00 80 5a sethi %hi(0x2016800), %g1 200882c: a8 10 61 40 or %g1, 0x140, %l4 ! 2016940 <_Watchdog_Sync_level> 2008830: ac 10 00 14 mov %l4, %l6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008834: e4 06 60 0c ld [ %i1 + 0xc ], %l2 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 2008838: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 200883c: 80 a4 a0 00 cmp %l2, 0 2008840: 22 80 00 1c be,a 20088b0 <_Watchdog_Insert+0xcc> 2008844: c4 04 60 04 ld [ %l1 + 4 ], %g2 2008848: c2 04 40 00 ld [ %l1 ], %g1 200884c: 80 a0 60 00 cmp %g1, 0 2008850: 22 80 00 18 be,a 20088b0 <_Watchdog_Insert+0xcc> 2008854: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 2008858: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 200885c: 80 a4 80 10 cmp %l2, %l0 2008860: 1a 80 00 04 bcc 2008870 <_Watchdog_Insert+0x8c> 2008864: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 2008868: 10 80 00 11 b 20088ac <_Watchdog_Insert+0xc8> 200886c: c2 24 60 10 st %g1, [ %l1 + 0x10 ] * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 2008870: 7f ff e5 38 call 2001d50 2008874: 90 10 00 18 mov %i0, %o0 2008878: 7f ff e5 32 call 2001d40 200887c: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 2008880: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008884: 80 a0 60 01 cmp %g1, 1 2008888: 12 80 00 15 bne 20088dc <_Watchdog_Insert+0xf8> 200888c: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 2008890: c2 05 00 00 ld [ %l4 ], %g1 2008894: 80 a0 40 13 cmp %g1, %l3 2008898: 28 bf ff e9 bleu,a 200883c <_Watchdog_Insert+0x58> 200889c: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 20088a0: e6 25 80 00 st %l3, [ %l6 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 20088a4: 10 bf ff e5 b 2008838 <_Watchdog_Insert+0x54> 20088a8: e4 06 60 0c ld [ %i1 + 0xc ], %l2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 20088ac: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 20088b0: 03 00 80 5a sethi %hi(0x2016800), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 20088b4: c6 00 80 00 ld [ %g2 ], %g3 20088b8: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 after_node->next = the_node; 20088bc: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 20088c0: c4 26 60 04 st %g2, [ %i1 + 4 ] 20088c4: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 20088c8: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 20088cc: 82 10 20 02 mov 2, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 20088d0: f2 20 e0 04 st %i1, [ %g3 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 20088d4: c6 26 40 00 st %g3, [ %i1 ] 20088d8: c2 26 60 08 st %g1, [ %i1 + 8 ] _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 20088dc: 03 00 80 5a sethi %hi(0x2016800), %g1 _Watchdog_Sync_count--; 20088e0: 05 00 80 5a sethi %hi(0x2016800), %g2 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 20088e4: e6 20 61 40 st %l3, [ %g1 + 0x140 ] _Watchdog_Sync_count--; 20088e8: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 20088ec: 82 00 7f ff add %g1, -1, %g1 20088f0: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] _ISR_Enable( level ); 20088f4: 7f ff e5 17 call 2001d50 20088f8: 81 e8 00 00 restore 20088fc: 01 00 00 00 nop 0200894c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200894c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2008950: 7f ff e4 fc call 2001d40 2008954: 01 00 00 00 nop previous_state = the_watchdog->state; 2008958: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 200895c: 80 a4 20 01 cmp %l0, 1 2008960: 22 80 00 1e be,a 20089d8 <_Watchdog_Remove+0x8c> 2008964: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 2008968: 0a 80 00 1d bcs 20089dc <_Watchdog_Remove+0x90> 200896c: 03 00 80 5a sethi %hi(0x2016800), %g1 2008970: 80 a4 20 03 cmp %l0, 3 2008974: 18 80 00 1a bgu 20089dc <_Watchdog_Remove+0x90> 2008978: 01 00 00 00 nop 200897c: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2008980: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2008984: c2 00 c0 00 ld [ %g3 ], %g1 2008988: 80 a0 60 00 cmp %g1, 0 200898c: 02 80 00 07 be 20089a8 <_Watchdog_Remove+0x5c> 2008990: 03 00 80 5a sethi %hi(0x2016800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2008994: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 2008998: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200899c: 82 00 40 02 add %g1, %g2, %g1 20089a0: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 20089a4: 03 00 80 5a sethi %hi(0x2016800), %g1 20089a8: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 20169d0 <_Watchdog_Sync_count> 20089ac: 80 a0 60 00 cmp %g1, 0 20089b0: 22 80 00 07 be,a 20089cc <_Watchdog_Remove+0x80> 20089b4: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 20089b8: 03 00 80 5a sethi %hi(0x2016800), %g1 <== NOT EXECUTED 20089bc: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 2016920 <_ISR_Nest_level> <== NOT EXECUTED 20089c0: 03 00 80 5a sethi %hi(0x2016800), %g1 <== NOT EXECUTED 20089c4: c4 20 61 40 st %g2, [ %g1 + 0x140 ] ! 2016940 <_Watchdog_Sync_level> <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 20089c8: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 20089cc: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 20089d0: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 20089d4: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 20089d8: 03 00 80 5a sethi %hi(0x2016800), %g1 20089dc: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 ! 20169d4 <_Watchdog_Ticks_since_boot> 20089e0: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 20089e4: 7f ff e4 db call 2001d50 20089e8: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 20089ec: 81 c7 e0 08 ret 20089f0: 81 e8 00 00 restore 02008b04 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 2008b04: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 2008b08: 80 a6 20 00 cmp %i0, 0 2008b0c: 02 80 00 04 be 2008b1c <_Workspace_Handler_initialization+0x18> 2008b10: 80 8e 20 07 btst 7, %i0 2008b14: 02 80 00 06 be 2008b2c <_Workspace_Handler_initialization+0x28> 2008b18: 03 00 80 5a sethi %hi(0x2016800), %g1 _Internal_error_Occurred( 2008b1c: 90 10 20 00 clr %o0 2008b20: 92 10 20 01 mov 1, %o1 2008b24: 10 80 00 15 b 2008b78 <_Workspace_Handler_initialization+0x74> 2008b28: 94 10 20 02 mov 2, %o2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 2008b2c: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 2008b30: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 2008b34: 80 a0 60 00 cmp %g1, 0 2008b38: 02 80 00 07 be 2008b54 <_Workspace_Handler_initialization+0x50> 2008b3c: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, size ); 2008b40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2008b44: 92 10 20 00 clr %o1 <== NOT EXECUTED 2008b48: 40 00 10 49 call 200cc6c <== NOT EXECUTED 2008b4c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 2008b50: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2008b54: 94 10 00 19 mov %i1, %o2 2008b58: 11 00 80 5a sethi %hi(0x2016800), %o0 2008b5c: 96 10 20 08 mov 8, %o3 2008b60: 7f ff f6 2a call 2006408 <_Heap_Initialize> 2008b64: 90 12 20 a4 or %o0, 0xa4, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 2008b68: 80 a2 20 00 cmp %o0, 0 2008b6c: 12 80 00 05 bne 2008b80 <_Workspace_Handler_initialization+0x7c> 2008b70: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 2008b74: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 2008b78: 7f ff f6 ae call 2006630 <_Internal_error_Occurred> 2008b7c: 01 00 00 00 nop 2008b80: 81 c7 e0 08 ret 2008b84: 81 e8 00 00 restore 02006bac : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 2006bac: 9d e3 bf 98 save %sp, -104, %sp 2006bb0: 92 10 00 19 mov %i1, %o1 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 2006bb4: 80 a6 60 00 cmp %i1, 0 2006bb8: 02 80 00 3f be 2006cb4 2006bbc: a0 10 00 18 mov %i0, %l0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 2006bc0: 80 a6 a0 00 cmp %i2, 0 2006bc4: 02 80 00 3c be 2006cb4 2006bc8: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 2006bcc: c2 06 40 00 ld [ %i1 ], %g1 2006bd0: 80 a0 60 00 cmp %g1, 0 2006bd4: 32 80 00 07 bne,a 2006bf0 2006bd8: c0 26 80 00 clr [ %i2 ] 2006bdc: c2 06 60 04 ld [ %i1 + 4 ], %g1 2006be0: 80 a0 60 00 cmp %g1, 0 2006be4: 02 80 00 34 be 2006cb4 2006be8: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; *registered_major = 0; 2006bec: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006bf0: 03 00 80 69 sethi %hi(0x201a400), %g1 2006bf4: c8 00 63 50 ld [ %g1 + 0x350 ], %g4 ! 201a750 <_IO_Number_of_drivers> 2006bf8: 80 a4 00 04 cmp %l0, %g4 2006bfc: 1a 80 00 31 bcc 2006cc0 2006c00: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 2006c04: 80 a4 20 00 cmp %l0, 0 2006c08: 12 80 00 18 bne 2006c68 2006c0c: 03 00 80 69 sethi %hi(0x201a400), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006c10: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 ! 201a754 <_IO_Driver_address_table> 2006c14: 85 29 20 03 sll %g4, 3, %g2 2006c18: 83 29 20 05 sll %g4, 5, %g1 2006c1c: a0 01 3f ff add %g4, -1, %l0 2006c20: 82 20 40 02 sub %g1, %g2, %g1 2006c24: 82 00 7f e8 add %g1, -24, %g1 2006c28: 10 80 00 0b b 2006c54 2006c2c: 86 00 c0 01 add %g3, %g1, %g3 if ( !_IO_Driver_address_table[major].initialization_entry && 2006c30: 80 a0 60 00 cmp %g1, 0 2006c34: 32 80 00 07 bne,a 2006c50 2006c38: a0 04 3f ff add %l0, -1, %l0 2006c3c: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2006c40: 80 a0 60 00 cmp %g1, 0 2006c44: 02 80 00 09 be 2006c68 2006c48: 03 00 80 69 sethi %hi(0x201a400), %g1 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006c4c: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED 2006c50: 86 00 ff e8 add %g3, -24, %g3 2006c54: 80 a4 20 00 cmp %l0, 0 2006c58: 32 bf ff f6 bne,a 2006c30 2006c5c: c2 00 c0 00 ld [ %g3 ], %g1 2006c60: 81 c7 e0 08 ret 2006c64: 91 e8 20 05 restore %g0, 5, %o0 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 2006c68: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 2006c6c: 85 2c 20 03 sll %l0, 3, %g2 2006c70: 83 2c 20 05 sll %l0, 5, %g1 2006c74: 82 20 40 02 sub %g1, %g2, %g1 2006c78: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 2006c7c: 80 a0 a0 00 cmp %g2, 0 2006c80: 12 80 00 0f bne 2006cbc 2006c84: 90 00 c0 01 add %g3, %g1, %o0 2006c88: c2 02 20 04 ld [ %o0 + 4 ], %g1 2006c8c: 80 a0 60 00 cmp %g1, 0 2006c90: 32 80 00 0c bne,a 2006cc0 2006c94: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 2006c98: 40 00 1b a5 call 200db2c 2006c9c: 94 10 20 18 mov 0x18, %o2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006ca0: b0 10 00 10 mov %l0, %i0 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 2006ca4: e0 26 80 00 st %l0, [ %i2 ] return rtems_io_initialize( major, 0, NULL ); 2006ca8: b2 10 20 00 clr %i1 2006cac: 7f ff ff 4f call 20069e8 2006cb0: 95 e8 20 00 restore %g0, 0, %o2 2006cb4: 81 c7 e0 08 ret 2006cb8: 91 e8 20 09 restore %g0, 9, %o0 2006cbc: b0 10 20 0c mov 0xc, %i0 } 2006cc0: 81 c7 e0 08 ret 2006cc4: 81 e8 00 00 restore 02007f5c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2007f5c: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2007f60: 80 a6 20 00 cmp %i0, 0 2007f64: 02 80 00 1d be 2007fd8 2007f68: 03 00 80 8b sethi %hi(0x2022c00), %g1 return; 2007f6c: a4 10 60 d4 or %g1, 0xd4, %l2 ! 2022cd4 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2007f70: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2007f74: c2 04 80 00 ld [ %l2 ], %g1 2007f78: 80 a0 60 00 cmp %g1, 0 2007f7c: 22 80 00 14 be,a 2007fcc 2007f80: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2007f84: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 2007f88: 80 a4 60 00 cmp %l1, 0 2007f8c: 12 80 00 0b bne 2007fb8 2007f90: a0 10 20 01 mov 1, %l0 for ( i=1 ; i <= information->maximum ; i++ ) { 2007f94: 10 80 00 0e b 2007fcc <== NOT EXECUTED 2007f98: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 2007f9c: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 2007fa0: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 2007fa4: 80 a2 20 00 cmp %o0, 0 2007fa8: 02 80 00 04 be 2007fb8 2007fac: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 2007fb0: 9f c6 00 00 call %i0 2007fb4: 01 00 00 00 nop api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 2007fb8: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 2007fbc: 80 a4 00 01 cmp %l0, %g1 2007fc0: 08 bf ff f7 bleu 2007f9c 2007fc4: 91 2c 20 02 sll %l0, 2, %o0 2007fc8: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2007fcc: 80 a4 80 13 cmp %l2, %l3 2007fd0: 32 bf ff ea bne,a 2007f78 2007fd4: c2 04 80 00 ld [ %l2 ], %g1 2007fd8: 81 c7 e0 08 ret 2007fdc: 81 e8 00 00 restore 0200ea34 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 200ea34: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 200ea38: a2 96 20 00 orcc %i0, 0, %l1 200ea3c: 02 80 00 14 be 200ea8c 200ea40: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 200ea44: 80 a7 20 00 cmp %i4, 0 200ea48: 02 80 00 24 be 200ead8 200ea4c: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 200ea50: 80 88 60 07 btst 7, %g1 200ea54: 12 80 00 0e bne 200ea8c 200ea58: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200ea5c: 05 00 80 c1 sethi %hi(0x2030400), %g2 200ea60: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2030420 <_Thread_Dispatch_disable_level> 200ea64: 82 00 60 01 inc %g1 200ea68: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 200ea6c: 21 00 80 c0 sethi %hi(0x2030000), %l0 200ea70: 40 00 13 b9 call 2013954 <_Objects_Allocate> 200ea74: 90 14 21 94 or %l0, 0x194, %o0 ! 2030194 <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 200ea78: 80 a2 20 00 cmp %o0, 0 200ea7c: 32 80 00 06 bne,a 200ea94 200ea80: c4 02 20 08 ld [ %o0 + 8 ], %g2 _Thread_Enable_dispatch(); 200ea84: 40 00 17 8e call 20148bc <_Thread_Enable_dispatch> 200ea88: b0 10 20 05 mov 5, %i0 200ea8c: 81 c7 e0 08 ret 200ea90: 81 e8 00 00 restore #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ea94: 82 14 21 94 or %l0, 0x194, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200ea98: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ea9c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 200eaa0: 82 06 ff ff add %i3, -1, %g1 200eaa4: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 200eaa8: c4 27 00 00 st %g2, [ %i4 ] 200eaac: 03 00 00 3f sethi %hi(0xfc00), %g1 200eab0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200eab4: 84 08 80 01 and %g2, %g1, %g2 200eab8: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 200eabc: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 200eac0: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 200eac4: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 200eac8: 40 00 17 7d call 20148bc <_Thread_Enable_dispatch> 200eacc: b0 10 20 00 clr %i0 200ead0: 81 c7 e0 08 ret 200ead4: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 200ead8: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 200eadc: 81 c7 e0 08 ret <== NOT EXECUTED 200eae0: 81 e8 00 00 restore <== NOT EXECUTED 02006644 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 2006644: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 2006648: 11 00 80 6c sethi %hi(0x201b000), %o0 200664c: 92 10 00 18 mov %i0, %o1 2006650: 90 12 21 e4 or %o0, 0x1e4, %o0 2006654: 40 00 08 bd call 2008948 <_Objects_Get> 2006658: 94 07 bf f4 add %fp, -12, %o2 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 200665c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006660: 80 a0 60 00 cmp %g1, 0 2006664: 12 80 00 64 bne 20067f4 2006668: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 200666c: 27 00 80 6d sethi %hi(0x201b400), %l3 2006670: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 2006674: c2 04 e0 24 ld [ %l3 + 0x24 ], %g1 2006678: 80 a0 80 01 cmp %g2, %g1 200667c: 02 80 00 06 be 2006694 2006680: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2006684: 40 00 0b 1f call 2009300 <_Thread_Enable_dispatch> 2006688: b0 10 20 17 mov 0x17, %i0 200668c: 81 c7 e0 08 ret 2006690: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 2006694: 12 80 00 0c bne 20066c4 2006698: 01 00 00 00 nop switch ( the_period->state ) { 200669c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20066a0: 80 a0 60 00 cmp %g1, 0 20066a4: 02 80 00 50 be 20067e4 20066a8: b0 10 20 0b mov 0xb, %i0 20066ac: 82 00 7f fd add %g1, -3, %g1 20066b0: 80 a0 60 01 cmp %g1, 1 20066b4: 18 80 00 4c bgu 20067e4 20066b8: b0 10 20 00 clr %i0 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20066bc: 10 80 00 4a b 20067e4 20066c0: b0 10 20 06 mov 6, %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20066c4: 7f ff f1 59 call 2002c28 20066c8: 01 00 00 00 nop 20066cc: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 20066d0: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 20066d4: 80 a4 a0 02 cmp %l2, 2 20066d8: 02 80 00 1a be 2006740 20066dc: 80 a4 a0 04 cmp %l2, 4 20066e0: 02 80 00 34 be 20067b0 20066e4: 80 a4 a0 00 cmp %l2, 0 20066e8: 12 80 00 43 bne 20067f4 20066ec: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 20066f0: 7f ff f1 52 call 2002c38 20066f4: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 20066f8: 7f ff ff 5e call 2006470 <_Rate_monotonic_Initiate_statistics> 20066fc: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006700: 82 10 20 02 mov 2, %g1 2006704: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006708: 03 00 80 1a sethi %hi(0x2006800), %g1 200670c: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 2006ac8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006710: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006714: 92 04 60 10 add %l1, 0x10, %o1 2006718: 11 00 80 6d sethi %hi(0x201b400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200671c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006720: 90 12 20 44 or %o0, 0x44, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006724: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006728: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 200672c: f2 24 60 4c st %i1, [ %l1 + 0x4c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006730: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006734: 40 00 10 4c call 200a864 <_Watchdog_Insert> 2006738: b0 10 20 00 clr %i0 200673c: 30 80 00 2a b,a 20067e4 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006740: 7f ff ff 68 call 20064e0 <_Rate_monotonic_Update_statistics> 2006744: 90 10 00 11 mov %l1, %o0 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 2006748: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 200674c: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 2006750: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006754: 7f ff f1 39 call 2002c38 2006758: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 200675c: c2 04 e0 24 ld [ %l3 + 0x24 ], %g1 2006760: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006764: 90 10 00 01 mov %g1, %o0 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 2006768: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 200676c: 40 00 0d 6f call 2009d28 <_Thread_Set_state> 2006770: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006774: 7f ff f1 2d call 2002c28 2006778: 01 00 00 00 nop local_state = the_period->state; 200677c: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006780: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 2006784: 7f ff f1 2d call 2002c38 2006788: 01 00 00 00 nop /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 200678c: 80 a4 20 03 cmp %l0, 3 2006790: 12 80 00 04 bne 20067a0 2006794: d0 04 e0 24 ld [ %l3 + 0x24 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006798: 40 00 09 c4 call 2008ea8 <_Thread_Clear_state> <== NOT EXECUTED 200679c: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 20067a0: 40 00 0a d8 call 2009300 <_Thread_Enable_dispatch> 20067a4: b0 10 20 00 clr %i0 20067a8: 81 c7 e0 08 ret 20067ac: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 20067b0: 7f ff ff 4c call 20064e0 <_Rate_monotonic_Update_statistics> 20067b4: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 20067b8: 7f ff f1 20 call 2002c38 20067bc: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 20067c0: 82 10 20 02 mov 2, %g1 20067c4: 11 00 80 6d sethi %hi(0x201b400), %o0 20067c8: 92 04 60 10 add %l1, 0x10, %o1 20067cc: 90 12 20 44 or %o0, 0x44, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20067d0: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 20067d4: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20067d8: 40 00 10 23 call 200a864 <_Watchdog_Insert> 20067dc: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20067e0: b0 10 20 06 mov 6, %i0 20067e4: 40 00 0a c7 call 2009300 <_Thread_Enable_dispatch> 20067e8: 01 00 00 00 nop 20067ec: 81 c7 e0 08 ret 20067f0: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20067f4: 81 c7 e0 08 ret 20067f8: 91 e8 20 04 restore %g0, 4, %o0 0200ffdc : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 200ffdc: 9d e3 bf 90 save %sp, -112, %sp 200ffe0: a0 10 00 18 mov %i0, %l0 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 200ffe4: 80 a6 60 00 cmp %i1, 0 200ffe8: 02 80 00 2c be 2010098 200ffec: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 200fff0: 03 00 80 c1 sethi %hi(0x2030400), %g1 200fff4: 40 00 08 f4 call 20123c4 <_API_Mutex_Lock> 200fff8: d0 00 60 dc ld [ %g1 + 0xdc ], %o0 ! 20304dc <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 200fffc: 92 10 00 10 mov %l0, %o1 2010000: 11 00 80 c0 sethi %hi(0x2030000), %o0 2010004: 94 07 bf f0 add %fp, -16, %o2 2010008: 40 00 0f ad call 2013ebc <_Objects_Get_no_protection> 201000c: 90 12 22 54 or %o0, 0x254, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 2010010: c2 07 bf f0 ld [ %fp + -16 ], %g1 2010014: 80 a0 60 00 cmp %g1, 0 2010018: 02 80 00 05 be 201002c 201001c: a0 10 00 08 mov %o0, %l0 2010020: 80 a0 60 01 cmp %g1, 1 2010024: 10 80 00 0f b 2010060 2010028: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 201002c: 92 10 00 19 mov %i1, %o1 2010030: 94 10 00 1a mov %i2, %o2 2010034: 90 02 20 68 add %o0, 0x68, %o0 2010038: 96 07 bf f4 add %fp, -12, %o3 201003c: 40 00 0b e3 call 2012fc8 <_Heap_Extend> 2010040: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010044: 80 a2 20 01 cmp %o0, 1 2010048: 02 80 00 12 be 2010090 201004c: 03 00 80 c1 sethi %hi(0x2030400), %g1 2010050: 0a 80 00 08 bcs 2010070 2010054: c6 07 bf f4 ld [ %fp + -12 ], %g3 2010058: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 201005c: b0 10 20 18 mov 0x18, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010060: 32 80 00 0b bne,a 201008c 2010064: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010068: 10 80 00 0a b 2010090 201006c: 03 00 80 c1 sethi %hi(0x2030400), %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010070: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 2010074: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010078: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 201007c: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010080: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 2010084: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 2010088: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 201008c: 03 00 80 c1 sethi %hi(0x2030400), %g1 2010090: 40 00 08 e3 call 201241c <_API_Mutex_Unlock> 2010094: d0 00 60 dc ld [ %g1 + 0xdc ], %o0 ! 20304dc <_RTEMS_Allocator_Mutex> return return_status; } 2010098: 81 c7 e0 08 ret 201009c: 81 e8 00 00 restore 020103a4 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 20103a4: 9d e3 bf 88 save %sp, -120, %sp uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 20103a8: 80 a6 e0 00 cmp %i3, 0 20103ac: 02 80 00 32 be 2010474 20103b0: 21 00 80 c1 sethi %hi(0x2030400), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 20103b4: 40 00 08 04 call 20123c4 <_API_Mutex_Lock> 20103b8: d0 04 20 dc ld [ %l0 + 0xdc ], %o0 ! 20304dc <_RTEMS_Allocator_Mutex> 20103bc: 92 10 00 18 mov %i0, %o1 20103c0: 11 00 80 c0 sethi %hi(0x2030000), %o0 20103c4: 94 07 bf f0 add %fp, -16, %o2 20103c8: 40 00 0e bd call 2013ebc <_Objects_Get_no_protection> 20103cc: 90 12 22 54 or %o0, 0x254, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20103d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 20103d4: 80 a0 60 00 cmp %g1, 0 20103d8: 02 80 00 0b be 2010404 20103dc: b0 10 00 08 mov %o0, %i0 20103e0: 82 18 60 01 xor %g1, 1, %g1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 20103e4: d0 04 20 dc ld [ %l0 + 0xdc ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 20103e8: 80 a0 00 01 cmp %g0, %g1 20103ec: 82 40 3f ff addx %g0, -1, %g1 20103f0: b0 08 7f eb and %g1, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 20103f4: 40 00 08 0a call 201241c <_API_Mutex_Unlock> 20103f8: b0 06 20 19 add %i0, 0x19, %i0 20103fc: 81 c7 e0 08 ret 2010400: 81 e8 00 00 restore case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 2010404: 94 10 00 1a mov %i2, %o2 2010408: 92 10 00 19 mov %i1, %o1 201040c: 90 02 20 68 add %o0, 0x68, %o0 2010410: 96 07 bf ec add %fp, -20, %o3 2010414: 40 00 0c 6d call 20135c8 <_Heap_Resize_block> 2010418: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 201041c: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 2010420: b4 92 20 00 orcc %o0, 0, %i2 2010424: 12 80 00 0b bne 2010450 2010428: c2 26 c0 00 st %g1, [ %i3 ] 201042c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2010430: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2010434: 02 80 00 08 be 2010454 <== NOT EXECUTED 2010438: 03 00 80 c1 sethi %hi(0x2030400), %g1 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 201043c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2010440: 40 00 1f f6 call 2018418 <_Region_Process_queue> <== NOT EXECUTED 2010444: b0 10 20 00 clr %i0 <== NOT EXECUTED 2010448: 81 c7 e0 08 ret <== NOT EXECUTED 201044c: 81 e8 00 00 restore <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 2010450: 03 00 80 c1 sethi %hi(0x2030400), %g1 2010454: d0 00 60 dc ld [ %g1 + 0xdc ], %o0 ! 20304dc <_RTEMS_Allocator_Mutex> 2010458: 40 00 07 f1 call 201241c <_API_Mutex_Unlock> 201045c: b0 10 20 00 clr %i0 return 2010460: 80 a6 a0 00 cmp %i2, 0 2010464: 02 bf ff e6 be 20103fc 2010468: 80 a6 a0 01 cmp %i2, 1 201046c: 02 bf ff e4 be 20103fc 2010470: b0 10 20 0d mov 0xd, %i0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 2010474: b0 10 20 09 mov 9, %i0 } 2010478: 81 c7 e0 08 ret 201047c: 81 e8 00 00 restore 020051b4 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 20051b4: 9d e3 bf 80 save %sp, -128, %sp register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 20051b8: a4 96 20 00 orcc %i0, 0, %l2 20051bc: 02 80 00 23 be 2005248 20051c0: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 20051c4: 80 a7 20 00 cmp %i4, 0 20051c8: 02 80 00 20 be 2005248 20051cc: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 20051d0: 84 8e a0 c0 andcc %i2, 0xc0, %g2 20051d4: 02 80 00 0d be 2005208 20051d8: a2 8e a0 30 andcc %i2, 0x30, %l1 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 20051dc: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 20051e0: 80 a0 60 10 cmp %g1, 0x10 20051e4: 02 80 00 04 be 20051f4 20051e8: 80 a0 60 20 cmp %g1, 0x20 20051ec: 32 80 00 17 bne,a 2005248 20051f0: b0 10 20 0b mov 0xb, %i0 20051f4: 80 8e a0 04 btst 4, %i2 20051f8: 02 80 00 64 be 2005388 20051fc: 80 a0 a0 c0 cmp %g2, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 2005200: 02 80 00 62 be 2005388 2005204: a2 8e a0 30 andcc %i2, 0x30, %l1 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 2005208: 02 80 00 04 be 2005218 200520c: 80 a6 60 01 cmp %i1, 1 2005210: 18 80 00 0e bgu 2005248 2005214: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005218: 03 00 80 5a sethi %hi(0x2016800), %g1 200521c: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 2016880 <_Thread_Dispatch_disable_level> 2005220: 84 00 a0 01 inc %g2 2005224: c4 20 60 80 st %g2, [ %g1 + 0x80 ] * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 2005228: 11 00 80 59 sethi %hi(0x2016400), %o0 200522c: 40 00 05 30 call 20066ec <_Objects_Allocate> 2005230: 90 12 23 4c or %o0, 0x34c, %o0 ! 201674c <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 2005234: a0 92 20 00 orcc %o0, 0, %l0 2005238: 12 80 00 06 bne 2005250 200523c: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 2005240: 40 00 08 f3 call 200760c <_Thread_Enable_dispatch> 2005244: b0 10 20 05 mov 5, %i0 2005248: 81 c7 e0 08 ret 200524c: 81 e8 00 00 restore * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 2005250: 02 80 00 33 be 200531c 2005254: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 2005258: 80 8e a0 40 btst 0x40, %i2 200525c: 12 80 00 06 bne 2005274 2005260: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 2005264: 80 8e a0 80 btst 0x80, %i2 2005268: 02 80 00 05 be 200527c 200526c: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 2005270: 82 10 20 03 mov 3, %g1 2005274: 10 80 00 05 b 2005288 2005278: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 200527c: 12 bf ff fe bne 2005274 2005280: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 2005284: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 2005288: 80 a4 60 10 cmp %l1, 0x10 200528c: 12 80 00 0f bne 20052c8 2005290: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 2005294: c2 07 bf e8 ld [ %fp + -24 ], %g1 2005298: 80 a0 60 01 cmp %g1, 1 200529c: 08 80 00 07 bleu 20052b8 20052a0: c0 27 bf e0 clr [ %fp + -32 ] 20052a4: 80 a0 60 03 cmp %g1, 3 20052a8: 38 80 00 0b bgu,a 20052d4 20052ac: 82 1e 60 01 xor %i1, 1, %g1 <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 20052b0: 10 80 00 04 b 20052c0 20052b4: 82 10 20 01 mov 1, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 20052b8: 10 80 00 06 b 20052d0 20052bc: c0 2f bf e4 clrb [ %fp + -28 ] break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 20052c0: 10 80 00 04 b 20052d0 20052c4: c2 2f bf e4 stb %g1, [ %fp + -28 ] break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 20052c8: c0 2f bf e4 clrb [ %fp + -28 ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 20052cc: c2 27 bf e0 st %g1, [ %fp + -32 ] the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 20052d0: 82 1e 60 01 xor %i1, 1, %g1 20052d4: 80 a0 00 01 cmp %g0, %g1 } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 20052d8: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 20052dc: 94 60 3f ff subx %g0, -1, %o2 20052e0: 90 04 20 14 add %l0, 0x14, %o0 20052e4: 40 00 03 03 call 2005ef0 <_CORE_mutex_Initialize> 20052e8: 92 07 bf e0 add %fp, -32, %o1 &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 20052ec: 80 a2 20 06 cmp %o0, 6 20052f0: 32 80 00 19 bne,a 2005354 20052f4: c4 04 20 08 ld [ %l0 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 20052f8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20052fc: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED 2005300: 90 12 23 4c or %o0, 0x34c, %o0 ! 201674c <_Semaphore_Information> <== NOT EXECUTED 2005304: 40 00 05 e7 call 2006aa0 <_Objects_Free> <== NOT EXECUTED 2005308: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200530c: 40 00 08 c0 call 200760c <_Thread_Enable_dispatch> <== NOT EXECUTED 2005310: 01 00 00 00 nop <== NOT EXECUTED 2005314: 81 c7 e0 08 ret <== NOT EXECUTED 2005318: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 200531c: 80 8e a0 04 btst 4, %i2 2005320: 22 80 00 04 be,a 2005330 2005324: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 2005328: 82 10 20 01 mov 1, %g1 200532c: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005330: 82 10 3f ff mov -1, %g1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 2005334: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 2005338: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 200533c: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005340: c2 27 bf f0 st %g1, [ %fp + -16 ] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 2005344: 90 04 20 14 add %l0, 0x14, %o0 2005348: 40 00 03 c1 call 200624c <_CORE_semaphore_Initialize> 200534c: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005350: c4 04 20 08 ld [ %l0 + 8 ], %g2 2005354: 03 00 80 59 sethi %hi(0x2016400), %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005358: e4 24 20 0c st %l2, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200535c: c6 00 63 68 ld [ %g1 + 0x368 ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 2005360: c4 27 00 00 st %g2, [ %i4 ] 2005364: 03 00 00 3f sethi %hi(0xfc00), %g1 2005368: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200536c: 84 08 80 01 and %g2, %g1, %g2 2005370: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2005374: b0 10 20 00 clr %i0 2005378: 40 00 08 a5 call 200760c <_Thread_Enable_dispatch> 200537c: e0 20 c0 02 st %l0, [ %g3 + %g2 ] 2005380: 81 c7 e0 08 ret 2005384: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 2005388: b0 10 20 0b mov 0xb, %i0 } 200538c: 81 c7 e0 08 ret 2005390: 81 e8 00 00 restore 02020c98 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 2020c98: 9d e3 bf 90 save %sp, -112, %sp 2020c9c: 11 00 81 67 sethi %hi(0x2059c00), %o0 2020ca0: 92 10 00 18 mov %i0, %o1 2020ca4: 90 12 20 00 mov %o0, %o0 2020ca8: 7f ff a4 51 call 2009dec <_Objects_Get> 2020cac: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 2020cb0: c2 07 bf f4 ld [ %fp + -12 ], %g1 2020cb4: 80 a0 60 00 cmp %g1, 0 2020cb8: 12 80 00 0f bne 2020cf4 2020cbc: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 2020cc0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2020cc4: 80 88 60 30 btst 0x30, %g1 2020cc8: 02 80 00 06 be 2020ce0 2020ccc: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 2020cd0: 92 10 20 00 clr %o1 2020cd4: 7f ff a0 82 call 2008edc <_CORE_mutex_Flush> 2020cd8: 94 10 20 01 mov 1, %o2 2020cdc: 30 80 00 04 b,a 2020cec &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 2020ce0: 92 10 20 00 clr %o1 <== NOT EXECUTED 2020ce4: 7f ff a1 55 call 2009238 <_CORE_semaphore_Flush> <== NOT EXECUTED 2020ce8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 2020cec: 7f ff a6 b2 call 200a7b4 <_Thread_Enable_dispatch> 2020cf0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2020cf4: 81 c7 e0 08 ret 2020cf8: 81 e8 00 00 restore 02014008 : */ void rtems_shutdown_executive( uint32_t result ) { 2014008: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 201400c: 05 00 80 5a sethi %hi(0x2016800), %g2 2014010: c2 00 a2 24 ld [ %g2 + 0x224 ], %g1 ! 2016a24 <_System_state_Current> 2014014: 80 a0 60 04 cmp %g1, 4 2014018: 02 80 00 07 be 2014034 201401c: 82 10 20 04 mov 4, %g1 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 2014020: 13 00 80 59 sethi %hi(0x2016400), %o1 2014024: c2 20 a2 24 st %g1, [ %g2 + 0x224 ] 2014028: 92 12 63 f8 or %o1, 0x3f8, %o1 201402c: 7f ff d3 11 call 2008c70 <_CPU_Context_switch> 2014030: 90 07 bf 70 add %fp, -144, %o0 2014034: 81 c7 e0 08 ret <== NOT EXECUTED 2014038: 81 e8 00 00 restore <== NOT EXECUTED 020113b8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20113b8: 9d e3 bf 90 save %sp, -112, %sp 20113bc: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 20113c0: 80 a6 60 00 cmp %i1, 0 20113c4: 02 80 00 1c be 2011434 20113c8: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 20113cc: 80 a6 a0 00 cmp %i2, 0 20113d0: 02 80 00 19 be 2011434 20113d4: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 20113d8: 11 00 80 c1 sethi %hi(0x2030400), %o0 20113dc: 92 10 00 12 mov %l2, %o1 20113e0: 90 12 23 40 or %o0, 0x340, %o0 20113e4: 40 00 0a c8 call 2013f04 <_Objects_Get> 20113e8: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20113ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 20113f0: a0 10 00 08 mov %o0, %l0 20113f4: 80 a0 60 00 cmp %g1, 0 20113f8: 12 80 00 0f bne 2011434 20113fc: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011400: a2 02 20 10 add %o0, 0x10, %l1 2011404: 40 00 13 59 call 2016168 <_Watchdog_Remove> 2011408: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 201140c: 7f ff e8 3b call 200b4f8 2011410: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 2011414: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011418: 80 a0 60 00 cmp %g1, 0 201141c: 22 80 00 08 be,a 201143c 2011420: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 2011424: 7f ff e8 39 call 200b508 <== NOT EXECUTED 2011428: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 201142c: 40 00 0d 24 call 20148bc <_Thread_Enable_dispatch> <== NOT EXECUTED 2011430: 01 00 00 00 nop <== NOT EXECUTED 2011434: 81 c7 e0 08 ret 2011438: 81 e8 00 00 restore void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 201143c: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2011440: f6 24 20 34 st %i3, [ %l0 + 0x34 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 2011444: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011448: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 201144c: 7f ff e8 2f call 200b508 2011450: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2011454: 92 10 00 11 mov %l1, %o1 2011458: 11 00 80 c1 sethi %hi(0x2030400), %o0 201145c: 90 12 21 04 or %o0, 0x104, %o0 ! 2030504 <_Watchdog_Ticks_chain> 2011460: 40 00 12 e8 call 2016000 <_Watchdog_Insert> 2011464: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 2011468: 40 00 0d 15 call 20148bc <_Thread_Enable_dispatch> 201146c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011470: 81 c7 e0 08 ret 2011474: 81 e8 00 00 restore 0201187c : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 201187c: 9d e3 bf 90 save %sp, -112, %sp */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 2011880: 80 a6 20 00 cmp %i0, 0 2011884: 02 80 00 06 be 201189c 2011888: 82 10 20 00 clr %g1 201188c: 03 00 80 ac sethi %hi(0x202b000), %g1 2011890: c2 08 62 d4 ldub [ %g1 + 0x2d4 ], %g1 ! 202b2d4 2011894: 80 a0 40 18 cmp %g1, %i0 2011898: 82 60 3f ff subx %g0, -1, %g1 * Make sure the requested priority is valid. The if is * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { 201189c: 80 a0 60 00 cmp %g1, 0 20118a0: 12 80 00 06 bne 20118b8 20118a4: a2 10 00 18 mov %i0, %l1 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 20118a8: 80 a6 3f ff cmp %i0, -1 20118ac: 12 80 00 56 bne 2011a04 20118b0: 90 10 20 13 mov 0x13, %o0 20118b4: a2 10 20 00 clr %l1 20118b8: 05 00 80 c1 sethi %hi(0x2030400), %g2 20118bc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2030420 <_Thread_Dispatch_disable_level> 20118c0: 82 00 60 01 inc %g1 20118c4: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20118c8: 31 00 80 af sethi %hi(0x202bc00), %i0 initialized = true; 20118cc: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20118d0: e0 0e 21 94 ldub [ %i0 + 0x194 ], %l0 initialized = true; _Thread_Enable_dispatch(); 20118d4: 40 00 0b fa call 20148bc <_Thread_Enable_dispatch> 20118d8: c2 2e 21 94 stb %g1, [ %i0 + 0x194 ] if ( tmpInitialized ) 20118dc: 80 a4 20 00 cmp %l0, 0 20118e0: 12 80 00 49 bne 2011a04 20118e4: 90 10 20 0e mov 0xe, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20118e8: 05 00 80 c0 sethi %hi(0x2030000), %g2 20118ec: 82 10 a3 34 or %g2, 0x334, %g1 ! 2030334 <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20118f0: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 20118f4: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20118f8: 82 00 60 04 add %g1, 4, %g1 * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 20118fc: 92 10 00 11 mov %l1, %o1 2011900: 94 10 00 19 mov %i1, %o2 2011904: 19 00 00 20 sethi %hi(0x8000), %o4 2011908: c2 20 a3 34 st %g1, [ %g2 + 0x334 ] 201190c: 98 16 80 0c or %i2, %o4, %o4 2011910: 11 15 12 53 sethi %hi(0x54494c00), %o0 2011914: 96 10 21 00 mov 0x100, %o3 2011918: 90 12 21 45 or %o0, 0x145, %o0 201191c: 7f ff fc 77 call 2010af8 2011920: 9a 07 bf f4 add %fp, -12, %o5 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 2011924: 80 a2 20 00 cmp %o0, 0 2011928: 02 80 00 04 be 2011938 201192c: 03 00 80 c0 sethi %hi(0x2030000), %g1 initialized = false; 2011930: 10 80 00 35 b 2011a04 2011934: c0 2e 21 94 clrb [ %i0 + 0x194 ] * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 2011938: d6 07 bf f4 ld [ %fp + -12 ], %o3 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 201193c: 86 10 62 d4 or %g1, 0x2d4, %g3 2011940: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 2011944: 03 00 00 3f sethi %hi(0xfc00), %g1 2011948: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 201194c: 82 0a c0 01 and %o3, %g1, %g1 2011950: 80 a0 40 02 cmp %g1, %g2 2011954: 18 80 00 05 bgu 2011968 2011958: 98 10 20 00 clr %o4 return NULL; return information->local_table[ index ]; 201195c: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 2011960: 83 28 60 02 sll %g1, 2, %g1 2011964: d8 00 80 01 ld [ %g2 + %g1 ], %o4 2011968: 1b 00 80 c0 sethi %hi(0x2030000), %o5 201196c: 82 13 63 28 or %o5, 0x328, %g1 ! 2030328 <_Timer_Seconds_chain> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011970: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2011974: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2011978: 82 00 60 04 add %g1, 4, %g1 201197c: c2 23 63 28 st %g1, [ %o5 + 0x328 ] 2011980: 03 00 80 c1 sethi %hi(0x2030400), %g1 2011984: 09 00 80 c0 sethi %hi(0x2030000), %g4 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2011988: c0 23 20 6c clr [ %o4 + 0x6c ] 201198c: 84 11 23 14 or %g4, 0x314, %g2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011990: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011994: d6 23 20 68 st %o3, [ %o4 + 0x68 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011998: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 201199c: c0 20 a0 04 clr [ %g2 + 4 ] 20119a0: d8 20 63 84 st %o4, [ %g1 + 0x384 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20119a4: 84 00 a0 04 add %g2, 4, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20119a8: 07 00 80 51 sethi %hi(0x2014400), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119ac: 03 00 80 c0 sethi %hi(0x2030000), %g1 the_watchdog->routine = routine; 20119b0: 86 10 e2 f8 or %g3, 0x2f8, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119b4: 82 10 63 40 or %g1, 0x340, %g1 the_watchdog->routine = routine; 20119b8: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 20119bc: c4 21 23 14 st %g2, [ %g4 + 0x314 ] 20119c0: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20119c4: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119c8: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 20119cc: d6 20 60 20 st %o3, [ %g1 + 0x20 ] /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 20119d0: 05 00 80 c1 sethi %hi(0x2030400), %g2 20119d4: 03 00 80 46 sethi %hi(0x2011800), %g1 20119d8: 82 10 62 0c or %g1, 0x20c, %g1 ! 2011a0c <_Timer_Server_schedule_operation_method> /* * Start the timer server */ status = rtems_task_start( 20119dc: 90 10 00 0b mov %o3, %o0 /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 20119e0: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] /* * Start the timer server */ status = rtems_task_start( 20119e4: 13 00 80 46 sethi %hi(0x2011800), %o1 20119e8: 94 10 20 00 clr %o2 20119ec: 7f ff fd 99 call 2011050 20119f0: 92 12 62 bc or %o1, 0x2bc, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 20119f4: 80 a2 20 00 cmp %o0, 0 20119f8: 02 80 00 03 be 2011a04 20119fc: 03 00 80 af sethi %hi(0x202bc00), %g1 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 2011a00: c0 28 61 94 clrb [ %g1 + 0x194 ] ! 202bd94 <== NOT EXECUTED } return status; } 2011a04: 81 c7 e0 08 ret 2011a08: 91 e8 00 08 restore %g0, %o0, %o0 020115f0 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 20115f0: 9d e3 bf 90 save %sp, -112, %sp 20115f4: 11 00 80 c1 sethi %hi(0x2030400), %o0 20115f8: 92 10 00 18 mov %i0, %o1 20115fc: 90 12 23 40 or %o0, 0x340, %o0 2011600: 40 00 0a 41 call 2013f04 <_Objects_Get> 2011604: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011608: c2 07 bf f4 ld [ %fp + -12 ], %g1 201160c: a0 10 00 08 mov %o0, %l0 2011610: 80 a0 60 00 cmp %g1, 0 2011614: 12 80 00 19 bne 2011678 2011618: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 201161c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011620: 80 a0 60 01 cmp %g1, 1 2011624: 22 80 00 0f be,a 2011660 2011628: 31 00 80 c1 sethi %hi(0x2030400), %i0 201162c: 2a 80 00 06 bcs,a 2011644 2011630: a0 02 20 10 add %o0, 0x10, %l0 2011634: 80 a0 60 04 cmp %g1, 4 2011638: 18 80 00 1c bgu 20116a8 201163c: 01 00 00 00 nop 2011640: 30 80 00 16 b,a 2011698 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 2011644: 40 00 12 c9 call 2016168 <_Watchdog_Remove> 2011648: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 201164c: 92 10 00 10 mov %l0, %o1 2011650: 11 00 80 c1 sethi %hi(0x2030400), %o0 2011654: 40 00 12 6b call 2016000 <_Watchdog_Insert> 2011658: 90 12 21 04 or %o0, 0x104, %o0 ! 2030504 <_Watchdog_Ticks_chain> 201165c: 30 80 00 13 b,a 20116a8 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 2011660: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 2011664: 80 a0 60 00 cmp %g1, 0 2011668: 12 80 00 06 bne 2011680 201166c: 01 00 00 00 nop _Thread_Enable_dispatch(); 2011670: 40 00 0c 93 call 20148bc <_Thread_Enable_dispatch> <== NOT EXECUTED 2011674: b0 10 20 0e mov 0xe, %i0 ! e <== NOT EXECUTED 2011678: 81 c7 e0 08 ret 201167c: 81 e8 00 00 restore return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 2011680: 40 00 12 ba call 2016168 <_Watchdog_Remove> 2011684: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 2011688: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 201168c: 9f c0 40 00 call %g1 2011690: 90 10 00 10 mov %l0, %o0 2011694: 30 80 00 05 b,a 20116a8 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 2011698: 40 00 0c 89 call 20148bc <_Thread_Enable_dispatch> 201169c: b0 10 20 0b mov 0xb, %i0 20116a0: 81 c7 e0 08 ret 20116a4: 81 e8 00 00 restore return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 20116a8: 40 00 0c 85 call 20148bc <_Thread_Enable_dispatch> 20116ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20116b0: 81 c7 e0 08 ret 20116b4: 81 e8 00 00 restore 020116b8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20116b8: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20116bc: 03 00 80 c1 sethi %hi(0x2030400), %g1 20116c0: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 2030784 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20116c4: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20116c8: 80 a0 60 00 cmp %g1, 0 20116cc: 02 80 00 1e be 2011744 20116d0: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 20116d4: 80 a6 a0 00 cmp %i2, 0 20116d8: 02 80 00 1b be 2011744 20116dc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 20116e0: 80 a6 60 00 cmp %i1, 0 20116e4: 02 80 00 18 be 2011744 20116e8: b0 10 20 0a mov 0xa, %i0 20116ec: 11 00 80 c1 sethi %hi(0x2030400), %o0 20116f0: 92 10 00 11 mov %l1, %o1 20116f4: 90 12 23 40 or %o0, 0x340, %o0 20116f8: 40 00 0a 03 call 2013f04 <_Objects_Get> 20116fc: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011700: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011704: a0 10 00 08 mov %o0, %l0 2011708: 80 a0 60 00 cmp %g1, 0 201170c: 12 80 00 0e bne 2011744 2011710: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011714: 40 00 12 95 call 2016168 <_Watchdog_Remove> 2011718: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 201171c: 7f ff e7 77 call 200b4f8 2011720: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 2011724: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011728: 80 a0 60 00 cmp %g1, 0 201172c: 02 80 00 08 be 201174c 2011730: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 2011734: 7f ff e7 75 call 200b508 <== NOT EXECUTED 2011738: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 201173c: 40 00 0c 60 call 20148bc <_Thread_Enable_dispatch> <== NOT EXECUTED 2011740: 01 00 00 00 nop <== NOT EXECUTED 2011744: 81 c7 e0 08 ret 2011748: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 201174c: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2011750: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2011754: f6 24 20 34 st %i3, [ %l0 + 0x34 ] * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 2011758: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 201175c: c0 24 20 18 clr [ %l0 + 0x18 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 2011760: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 2011764: 7f ff e7 69 call 200b508 2011768: b0 10 20 00 clr %i0 /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 201176c: 03 00 80 c1 sethi %hi(0x2030400), %g1 2011770: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 2030780 <_Timer_Server_schedule_operation> 2011774: 9f c0 40 00 call %g1 2011778: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 201177c: 40 00 0c 50 call 20148bc <_Thread_Enable_dispatch> 2011780: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011784: 81 c7 e0 08 ret 2011788: 81 e8 00 00 restore