40005ca8 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40005ca8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40005cac: 03 10 00 60 sethi %hi(0x40018000), %g1 40005cb0: e0 00 60 74 ld [ %g1 + 0x74 ], %l0 ! 40018074 <_API_extensions_List> 40005cb4: 82 10 60 74 or %g1, 0x74, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40005cb8: 10 80 00 08 b 40005cd8 <_API_extensions_Run_postdriver+0x30> 40005cbc: 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 ) 40005cc0: 80 a0 60 00 cmp %g1, 0 40005cc4: 22 80 00 05 be,a 40005cd8 <_API_extensions_Run_postdriver+0x30> 40005cc8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40005ccc: 9f c0 40 00 call %g1 40005cd0: 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 ) { 40005cd4: 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 ) ; 40005cd8: 80 a4 00 11 cmp %l0, %l1 40005cdc: 32 bf ff f9 bne,a 40005cc0 <_API_extensions_Run_postdriver+0x18> 40005ce0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 40005ce4: 81 c7 e0 08 ret 40005ce8: 81 e8 00 00 restore 40005cec <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40005cec: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40005cf0: 03 10 00 60 sethi %hi(0x40018000), %g1 40005cf4: e0 00 60 74 ld [ %g1 + 0x74 ], %l0 ! 40018074 <_API_extensions_List> 40005cf8: 82 10 60 74 or %g1, 0x74, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40005cfc: 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 ); 40005d00: 03 10 00 5f sethi %hi(0x40017c00), %g1 40005d04: 10 80 00 08 b 40005d24 <_API_extensions_Run_postswitch+0x38> 40005d08: a2 10 62 f0 or %g1, 0x2f0, %l1 ! 40017ef0 <_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 ) 40005d0c: 80 a0 60 00 cmp %g1, 0 40005d10: 22 80 00 05 be,a 40005d24 <_API_extensions_Run_postswitch+0x38> 40005d14: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40005d18: 9f c0 40 00 call %g1 40005d1c: 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 ) { 40005d20: 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 ) ; 40005d24: 80 a4 00 12 cmp %l0, %l2 40005d28: 32 bf ff f9 bne,a 40005d0c <_API_extensions_Run_postswitch+0x20> 40005d2c: 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 ); } } 40005d30: 81 c7 e0 08 ret 40005d34: 81 e8 00 00 restore 40005c64 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40005c64: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40005c68: 03 10 00 60 sethi %hi(0x40018000), %g1 40005c6c: e0 00 60 74 ld [ %g1 + 0x74 ], %l0 ! 40018074 <_API_extensions_List> 40005c70: 82 10 60 74 or %g1, 0x74, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40005c74: 10 80 00 08 b 40005c94 <_API_extensions_Run_predriver+0x30> 40005c78: 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 ) 40005c7c: 80 a0 60 00 cmp %g1, 0 40005c80: 22 80 00 05 be,a 40005c94 <_API_extensions_Run_predriver+0x30> 40005c84: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40005c88: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005c8c: 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 ) { 40005c90: 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 ) ; 40005c94: 80 a4 00 11 cmp %l0, %l1 40005c98: 32 bf ff f9 bne,a 40005c7c <_API_extensions_Run_predriver+0x18> 40005c9c: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 40005ca0: 81 c7 e0 08 ret 40005ca4: 81 e8 00 00 restore 40012490 <_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 ) { 40012490: 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 ) { 40012494: 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 ) { 40012498: 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 ) { 4001249c: 80 a6 80 01 cmp %i2, %g1 400124a0: 18 80 00 17 bgu 400124fc <_CORE_message_queue_Broadcast+0x6c> 400124a4: 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 ) { 400124a8: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 400124ac: 80 a0 60 00 cmp %g1, 0 400124b0: 02 80 00 0a be 400124d8 <_CORE_message_queue_Broadcast+0x48> 400124b4: a2 10 20 00 clr %l1 *count = 0; 400124b8: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 400124bc: 81 c7 e0 08 ret <== NOT EXECUTED 400124c0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 400124c4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 400124c8: 40 00 1e a7 call 40019f64 400124cc: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 400124d0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 400124d4: 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))) { 400124d8: 40 00 09 a0 call 40014b58 <_Thread_queue_Dequeue> 400124dc: 90 10 00 12 mov %l2, %o0 400124e0: 92 10 00 19 mov %i1, %o1 400124e4: a0 10 00 08 mov %o0, %l0 400124e8: 80 a2 20 00 cmp %o0, 0 400124ec: 12 bf ff f6 bne 400124c4 <_CORE_message_queue_Broadcast+0x34> 400124f0: 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; 400124f4: e2 27 40 00 st %l1, [ %i5 ] 400124f8: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 400124fc: 81 c7 e0 08 ret 40012500: 81 e8 00 00 restore 4001488c <_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 ) { 4001488c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 40014890: 03 20 00 00 sethi %hi(0x80000000), %g1 40014894: 80 a6 80 01 cmp %i2, %g1 40014898: 02 80 00 15 be 400148ec <_CORE_message_queue_Insert_message+0x60> 4001489c: f4 26 60 08 st %i2, [ %i1 + 8 ] 400148a0: 82 00 7c 00 add %g1, -1024, %g1 400148a4: 82 10 63 ff or %g1, 0x3ff, %g1 400148a8: 80 a6 80 01 cmp %i2, %g1 400148ac: 12 80 00 1f bne 40014928 <_CORE_message_queue_Insert_message+0x9c> 400148b0: a2 06 20 54 add %i0, 0x54, %l1 case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 400148b4: 7f ff b6 fd call 400024a8 400148b8: 01 00 00 00 nop Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400148bc: e2 26 40 00 st %l1, [ %i1 ] if ( the_message_queue->number_of_pending_messages++ == 0 ) 400148c0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 old_last_node = the_chain->last; 400148c4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 the_chain->last = the_node; 400148c8: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 400148cc: 80 a0 00 01 cmp %g0, %g1 old_last_node->next = the_node; the_node->previous = old_last_node; 400148d0: 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; 400148d4: f2 20 80 00 st %i1, [ %g2 ] 400148d8: 82 00 60 01 inc %g1 400148dc: 84 60 3f ff subx %g0, -1, %g2 400148e0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 400148e4: a0 10 00 02 mov %g2, %l0 notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 400148e8: 30 80 00 27 b,a 40014984 <_CORE_message_queue_Insert_message+0xf8> break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 400148ec: 7f ff b6 ef call 400024a8 400148f0: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 400148f4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400148f8: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 400148fc: 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; 40014900: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40014904: c2 26 60 04 st %g1, [ %i1 + 4 ] 40014908: 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; 4001490c: f2 20 e0 04 st %i1, [ %g3 + 4 ] 40014910: 82 60 3f ff subx %g0, -1, %g1 40014914: 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; 40014918: c6 26 40 00 st %g3, [ %i1 ] 4001491c: a0 10 00 01 mov %g1, %l0 40014920: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 40014924: 30 80 00 18 b,a 40014984 <_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; 40014928: 10 80 00 06 b 40014940 <_CORE_message_queue_Insert_message+0xb4> <== NOT EXECUTED 4001492c: 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 ) { 40014930: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 40014934: 14 80 00 06 bg 4001494c <_CORE_message_queue_Insert_message+0xc0> <== NOT EXECUTED 40014938: 01 00 00 00 nop <== NOT EXECUTED the_node = the_node->next; 4001493c: 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 ) ) { 40014940: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 40014944: 32 bf ff fb bne,a 40014930 <_CORE_message_queue_Insert_message+0xa4> <== NOT EXECUTED 40014948: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 4001494c: 7f ff b6 d7 call 400024a8 <== NOT EXECUTED 40014950: 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 ); 40014954: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 40014958: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4001495c: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40014960: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40014964: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 40014968: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 4001496c: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 40014970: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40014974: 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; 40014978: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 4001497c: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 40014980: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 40014984: 7f ff b6 cd call 400024b8 40014988: 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 ) 4001498c: 80 8c 20 ff btst 0xff, %l0 40014990: 02 80 00 08 be 400149b0 <_CORE_message_queue_Insert_message+0x124> 40014994: 01 00 00 00 nop 40014998: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 4001499c: 80 a0 60 00 cmp %g1, 0 400149a0: 02 80 00 04 be 400149b0 <_CORE_message_queue_Insert_message+0x124> 400149a4: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 400149a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400149ac: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 400149b0: 81 c7 e0 08 ret 400149b4: 81 e8 00 00 restore 40011a48 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40011a48: 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; 40011a4c: 27 10 00 9a sethi %hi(0x40026800), %l3 40011a50: e2 04 e1 c0 ld [ %l3 + 0x1c0 ], %l1 ! 400269c0 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40011a54: 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; 40011a58: c0 24 60 34 clr [ %l1 + 0x34 ] _ISR_Disable( level ); 40011a5c: 7f ff c2 93 call 400024a8 40011a60: a0 10 00 18 mov %i0, %l0 40011a64: 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)); 40011a68: 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)) 40011a6c: 82 06 20 54 add %i0, 0x54, %g1 40011a70: 80 a6 40 01 cmp %i1, %g1 40011a74: 02 80 00 24 be 40011b04 <_CORE_message_queue_Seize+0xbc> 40011a78: 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; 40011a7c: c2 06 40 00 ld [ %i1 ], %g1 the_chain->first = new_first; 40011a80: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 40011a84: 80 a6 60 00 cmp %i1, 0 40011a88: 02 80 00 1f be 40011b04 <_CORE_message_queue_Seize+0xbc> 40011a8c: c4 20 60 04 st %g2, [ %g1 + 4 ] the_message_queue->number_of_pending_messages -= 1; 40011a90: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40011a94: 82 00 7f ff add %g1, -1, %g1 40011a98: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 40011a9c: 7f ff c2 87 call 400024b8 40011aa0: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 40011aa4: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 40011aa8: c4 04 e1 c0 ld [ %l3 + 0x1c0 ], %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; 40011aac: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 40011ab0: c2 06 60 08 ld [ %i1 + 8 ], %g1 40011ab4: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40011ab8: 92 10 00 11 mov %l1, %o1 40011abc: 40 00 13 2b call 40016768 40011ac0: 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 ); 40011ac4: 7f ff ea b9 call 4000c5a8 <_Thread_queue_Dequeue> 40011ac8: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 40011acc: 80 a2 20 00 cmp %o0, 0 40011ad0: 32 80 00 04 bne,a 40011ae0 <_CORE_message_queue_Seize+0x98> 40011ad4: 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 ); 40011ad8: 7f ff e3 df call 4000aa54 <_Chain_Append> 40011adc: 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; 40011ae0: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 40011ae4: 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; 40011ae8: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40011aec: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 40011af0: 40 00 13 1e call 40016768 <== NOT EXECUTED 40011af4: 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( 40011af8: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 40011afc: 40 00 0b 64 call 4001488c <_CORE_message_queue_Insert_message> <== NOT EXECUTED 40011b00: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 40011b04: 80 8f 20 ff btst 0xff, %i4 40011b08: 12 80 00 08 bne 40011b28 <_CORE_message_queue_Seize+0xe0> 40011b0c: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 40011b10: 7f ff c2 6a call 400024b8 40011b14: 90 10 00 03 mov %g3, %o0 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 40011b18: 82 10 20 04 mov 4, %g1 40011b1c: 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 ); } 40011b20: 81 c7 e0 08 ret 40011b24: 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; 40011b28: 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; 40011b2c: 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; 40011b30: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 40011b34: 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; 40011b38: 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 ); 40011b3c: 90 10 00 03 mov %g3, %o0 40011b40: 7f ff c2 5e call 400024b8 40011b44: 35 10 00 32 sethi %hi(0x4000c800), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40011b48: b0 10 00 10 mov %l0, %i0 40011b4c: b2 10 00 1d mov %i5, %i1 40011b50: 7f ff ea fb call 4000c73c <_Thread_queue_Enqueue_with_handler> 40011b54: 95 ee a3 08 restore %i2, 0x308, %o2 40011b58: 01 00 00 00 nop 40011b5c <_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 ) { 40011b5c: 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 ) { 40011b60: 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 ) { 40011b64: 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 ) { 40011b68: 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 ) { 40011b6c: 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 ) { 40011b70: 18 80 00 3f bgu 40011c6c <_CORE_message_queue_Submit+0x110> 40011b74: 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 ) { 40011b78: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 40011b7c: 80 a0 60 00 cmp %g1, 0 40011b80: 32 80 00 0f bne,a 40011bbc <_CORE_message_queue_Submit+0x60> 40011b84: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 40011b88: 7f ff ea 88 call 4000c5a8 <_Thread_queue_Dequeue> 40011b8c: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40011b90: a0 92 20 00 orcc %o0, 0, %l0 40011b94: 02 80 00 09 be 40011bb8 <_CORE_message_queue_Submit+0x5c> 40011b98: 92 10 00 19 mov %i1, %o1 40011b9c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40011ba0: 40 00 12 f2 call 40016768 40011ba4: 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; 40011ba8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40011bac: 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; 40011bb0: 10 80 00 15 b 40011c04 <_CORE_message_queue_Submit+0xa8> 40011bb4: 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 < 40011bb8: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40011bbc: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40011bc0: 80 a0 80 01 cmp %g2, %g1 40011bc4: 1a 80 00 12 bcc 40011c0c <_CORE_message_queue_Submit+0xb0> 40011bc8: 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 *) 40011bcc: 7f ff e3 ae call 4000aa84 <_Chain_Get> 40011bd0: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40011bd4: a0 92 20 00 orcc %o0, 0, %l0 40011bd8: 02 80 00 27 be 40011c74 <_CORE_message_queue_Submit+0x118> 40011bdc: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40011be0: 94 10 00 1a mov %i2, %o2 40011be4: 40 00 12 e1 call 40016768 40011be8: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40011bec: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40011bf0: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40011bf4: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40011bf8: 92 10 00 10 mov %l0, %o1 40011bfc: 40 00 0b 24 call 4001488c <_CORE_message_queue_Insert_message> 40011c00: 94 10 00 1d mov %i5, %o2 40011c04: 81 c7 e0 08 ret 40011c08: 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 ) { 40011c0c: 02 80 00 18 be 40011c6c <_CORE_message_queue_Submit+0x110> 40011c10: 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() ) { 40011c14: 03 10 00 9a sethi %hi(0x40026800), %g1 <== NOT EXECUTED 40011c18: c2 00 61 9c ld [ %g1 + 0x19c ], %g1 ! 4002699c <_ISR_Nest_level> <== NOT EXECUTED 40011c1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011c20: 32 80 00 13 bne,a 40011c6c <_CORE_message_queue_Submit+0x110> <== NOT EXECUTED 40011c24: 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; 40011c28: 03 10 00 9a sethi %hi(0x40026800), %g1 <== NOT EXECUTED _ISR_Disable( level ); 40011c2c: 7f ff c2 1f call 400024a8 <== NOT EXECUTED 40011c30: e0 00 61 c0 ld [ %g1 + 0x1c0 ], %l0 ! 400269c0 <_Thread_Executing> <== NOT EXECUTED 40011c34: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40011c38: 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; 40011c3c: 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; 40011c40: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 40011c44: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 40011c48: 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; 40011c4c: 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 ); 40011c50: 7f ff c2 1a call 400024b8 <== NOT EXECUTED 40011c54: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40011c58: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 40011c5c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011c60: 15 10 00 32 sethi %hi(0x4000c800), %o2 <== NOT EXECUTED 40011c64: 7f ff ea b6 call 4000c73c <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 40011c68: 94 12 a3 08 or %o2, 0x308, %o2 ! 4000cb08 <_Thread_queue_Timeout> <== NOT EXECUTED 40011c6c: 81 c7 e0 08 ret 40011c70: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 40011c74: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 40011c78: 81 c7 e0 08 ret <== NOT EXECUTED 40011c7c: 81 e8 00 00 restore <== NOT EXECUTED 4000ad38 <_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 ) { 4000ad38: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000ad3c: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000ad40: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40017ef0 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000ad44: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000ad48: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000ad4c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000ad50: 80 a0 60 00 cmp %g1, 0 4000ad54: 22 80 00 32 be,a 4000ae1c <_CORE_mutex_Seize_interrupt_trylock+0xe4> 4000ad58: c6 06 20 5c ld [ %i0 + 0x5c ], %g3 the_mutex->lock = CORE_MUTEX_LOCKED; 4000ad5c: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000ad60: 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; 4000ad64: 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; 4000ad68: 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; 4000ad6c: c4 26 20 5c st %g2, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000ad70: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000ad74: 80 a0 e0 02 cmp %g3, 2 4000ad78: 02 80 00 05 be 4000ad8c <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000ad7c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000ad80: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000ad84: 32 80 00 06 bne,a 4000ad9c <_CORE_mutex_Seize_interrupt_trylock+0x64> <== NOT EXECUTED 4000ad88: 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++; 4000ad8c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000ad90: 82 00 60 01 inc %g1 4000ad94: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000ad98: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000ad9c: 80 a0 60 03 cmp %g1, 3 4000ada0: 22 80 00 03 be,a 4000adac <_CORE_mutex_Seize_interrupt_trylock+0x74> 4000ada4: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 4000ada8: 30 80 00 2c b,a 4000ae58 <_CORE_mutex_Seize_interrupt_trylock+0x120> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000adac: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000adb0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000adb4: 12 80 00 03 bne 4000adc0 <_CORE_mutex_Seize_interrupt_trylock+0x88> <== NOT EXECUTED 4000adb8: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 4000adbc: 30 80 00 27 b,a 4000ae58 <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4000adc0: 08 80 00 0f bleu 4000adfc <_CORE_mutex_Seize_interrupt_trylock+0xc4> <== NOT EXECUTED 4000adc4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000adc8: 05 10 00 5f sethi %hi(0x40017c00), %g2 <== NOT EXECUTED 4000adcc: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 40017e30 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000add0: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000add4: c2 20 a2 30 st %g1, [ %g2 + 0x230 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000add8: 7f ff db c5 call 40001cec <== NOT EXECUTED 4000addc: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 4000ade0: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 4000ade4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 4000ade8: 7f ff f0 62 call 40006f70 <_Thread_Change_priority> <== NOT EXECUTED 4000adec: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000adf0: 7f ff f1 d3 call 4000753c <_Thread_Enable_dispatch> <== NOT EXECUTED 4000adf4: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000adf8: 30 80 00 1a b,a 4000ae60 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000adfc: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000ae00: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000ae04: 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; 4000ae08: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000ae0c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000ae10: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000ae14: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000ae18: 30 80 00 10 b,a 4000ae58 <_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 ) ) { 4000ae1c: 80 a0 c0 02 cmp %g3, %g2 4000ae20: 12 80 00 12 bne 4000ae68 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000ae24: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000ae28: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000ae2c: 80 a0 60 00 cmp %g1, 0 4000ae30: 22 80 00 07 be,a 4000ae4c <_CORE_mutex_Seize_interrupt_trylock+0x114> 4000ae34: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000ae38: 80 a0 60 01 cmp %g1, 1 4000ae3c: 12 80 00 0b bne 4000ae68 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000ae40: 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; 4000ae44: 10 80 00 05 b 4000ae58 <_CORE_mutex_Seize_interrupt_trylock+0x120> 4000ae48: 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++; 4000ae4c: 82 00 60 01 inc %g1 4000ae50: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000ae54: 30 80 00 01 b,a 4000ae58 <_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 ); 4000ae58: 7f ff db a5 call 40001cec 4000ae5c: b0 10 20 00 clr %i0 4000ae60: 81 c7 e0 08 ret 4000ae64: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000ae68: 81 c7 e0 08 ret 4000ae6c: 91 e8 20 01 restore %g0, 1, %o0 40006064 <_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 ) { 40006064: 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 ) { 40006068: 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 ) { 4000606c: 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 ) { 40006070: 80 a0 60 00 cmp %g1, 0 40006074: 02 80 00 07 be 40006090 <_CORE_mutex_Surrender+0x2c> 40006078: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 4000607c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40006080: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40017ef0 <_Thread_Executing> 40006084: 80 a2 00 01 cmp %o0, %g1 40006088: 12 80 00 52 bne 400061d0 <_CORE_mutex_Surrender+0x16c> 4000608c: 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 ) 40006090: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40006094: 80 a0 60 00 cmp %g1, 0 40006098: 02 80 00 4d be 400061cc <_CORE_mutex_Surrender+0x168> 4000609c: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 400060a0: 80 a0 60 00 cmp %g1, 0 400060a4: 02 80 00 09 be 400060c8 <_CORE_mutex_Surrender+0x64> 400060a8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400060ac: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 400060b0: 80 a0 60 00 cmp %g1, 0 400060b4: 02 80 00 47 be 400061d0 <_CORE_mutex_Surrender+0x16c> 400060b8: b0 10 20 00 clr %i0 400060bc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400060c0: 02 80 00 44 be 400061d0 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 400060c4: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 400060c8: 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 ) || 400060cc: 80 a0 60 02 cmp %g1, 2 400060d0: 02 80 00 04 be 400060e0 <_CORE_mutex_Surrender+0x7c> 400060d4: 80 a0 60 03 cmp %g1, 3 400060d8: 32 80 00 07 bne,a 400060f4 <_CORE_mutex_Surrender+0x90> 400060dc: 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--; 400060e0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400060e4: 82 00 7f ff add %g1, -1, %g1 400060e8: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 400060ec: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 400060f0: 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 ) || 400060f4: 80 a0 60 02 cmp %g1, 2 400060f8: 02 80 00 05 be 4000610c <_CORE_mutex_Surrender+0xa8> 400060fc: c0 24 20 60 clr [ %l0 + 0x60 ] 40006100: 80 a0 60 03 cmp %g1, 3 40006104: 12 80 00 0d bne 40006138 <_CORE_mutex_Surrender+0xd4> 40006108: 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 && 4000610c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006110: 80 a0 60 00 cmp %g1, 0 40006114: 12 80 00 09 bne 40006138 <_CORE_mutex_Surrender+0xd4> 40006118: 01 00 00 00 nop 4000611c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40006120: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40006124: 80 a2 40 01 cmp %o1, %g1 40006128: 02 80 00 04 be 40006138 <_CORE_mutex_Surrender+0xd4> 4000612c: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40006130: 40 00 03 90 call 40006f70 <_Thread_Change_priority> 40006134: 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 ) ) ) { 40006138: 40 00 05 dc call 400078a8 <_Thread_queue_Dequeue> 4000613c: 90 10 00 10 mov %l0, %o0 40006140: 86 92 20 00 orcc %o0, 0, %g3 40006144: 02 80 00 1f be 400061c0 <_CORE_mutex_Surrender+0x15c> 40006148: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 4000614c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 40006150: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40006154: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40006158: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 4000615c: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 40006160: 80 a0 a0 02 cmp %g2, 2 40006164: 02 80 00 07 be 40006180 <_CORE_mutex_Surrender+0x11c> 40006168: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 4000616c: 80 a0 a0 03 cmp %g2, 3 40006170: 12 80 00 18 bne 400061d0 <_CORE_mutex_Surrender+0x16c> 40006174: 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++; 40006178: 10 80 00 07 b 40006194 <_CORE_mutex_Surrender+0x130> <== NOT EXECUTED 4000617c: 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++; 40006180: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40006184: 82 00 60 01 inc %g1 40006188: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 4000618c: 81 c7 e0 08 ret 40006190: 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 < 40006194: 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++; 40006198: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000619c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 400061a0: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 400061a4: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 400061a8: 3a 80 00 0a bcc,a 400061d0 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 400061ac: b0 10 20 00 clr %i0 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 400061b0: 40 00 03 70 call 40006f70 <_Thread_Change_priority> <== NOT EXECUTED 400061b4: 94 10 20 00 clr %o2 <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 400061b8: 81 c7 e0 08 ret <== NOT EXECUTED 400061bc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400061c0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 400061c4: 81 c7 e0 08 ret 400061c8: 91 e8 20 00 restore %g0, 0, %o0 400061cc: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 400061d0: 81 c7 e0 08 ret 400061d4: 81 e8 00 00 restore 40022284 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 40022284: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 40022288: 7f ff 86 80 call 40003c88 <== NOT EXECUTED 4002228c: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40022290: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40022294: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40022298: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 4002229c: 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; 400222a0: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 400222a4: 7f ff 86 7d call 40003c98 <== NOT EXECUTED 400222a8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400222ac: 01 00 00 00 nop 4000ac2c <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000ac2c: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 4000ac30: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1 ! 40017ef4 <_Debug_Level> <== NOT EXECUTED 4000ac34: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED 4000ac38: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000ac3c: 81 c3 e0 08 retl <== NOT EXECUTED 4000ac40: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40004f08 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40004f08: 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 ]; 40004f0c: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40004f10: 7f ff f3 73 call 40001cdc 40004f14: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40004f18: b2 10 00 08 mov %o0, %i1 pending_events = api->pending_events; 40004f1c: c8 04 00 00 ld [ %l0 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40004f20: 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 ) ) { 40004f24: 86 88 80 04 andcc %g2, %g4, %g3 40004f28: 12 80 00 03 bne 40004f34 <_Event_Surrender+0x2c> 40004f2c: 03 10 00 5f sethi %hi(0x40017c00), %g1 _ISR_Enable( level ); 40004f30: 30 80 00 42 b,a 40005038 <_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() && 40004f34: c2 00 62 cc ld [ %g1 + 0x2cc ], %g1 ! 40017ecc <_ISR_Nest_level> 40004f38: 80 a0 60 00 cmp %g1, 0 40004f3c: 22 80 00 1e be,a 40004fb4 <_Event_Surrender+0xac> 40004f40: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40004f44: 03 10 00 5f sethi %hi(0x40017c00), %g1 40004f48: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40017ef0 <_Thread_Executing> 40004f4c: 80 a6 00 01 cmp %i0, %g1 40004f50: 32 80 00 19 bne,a 40004fb4 <_Event_Surrender+0xac> 40004f54: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40004f58: 1b 10 00 60 sethi %hi(0x40018000), %o5 40004f5c: c2 03 61 04 ld [ %o5 + 0x104 ], %g1 ! 40018104 <_Event_Sync_state> 40004f60: 80 a0 60 01 cmp %g1, 1 40004f64: 02 80 00 07 be 40004f80 <_Event_Surrender+0x78> 40004f68: 80 a0 c0 02 cmp %g3, %g2 40004f6c: c2 03 61 04 ld [ %o5 + 0x104 ], %g1 40004f70: 80 a0 60 02 cmp %g1, 2 40004f74: 32 80 00 10 bne,a 40004fb4 <_Event_Surrender+0xac> 40004f78: 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) ) { 40004f7c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40004f80: 02 80 00 04 be 40004f90 <_Event_Surrender+0x88> 40004f84: 80 8c 60 02 btst 2, %l1 40004f88: 02 80 00 0a be 40004fb0 <_Event_Surrender+0xa8> <== NOT EXECUTED 40004f8c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40004f90: 82 29 00 03 andn %g4, %g3, %g1 40004f94: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004f98: 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; 40004f9c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004fa0: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40004fa4: 84 10 20 03 mov 3, %g2 40004fa8: 03 10 00 60 sethi %hi(0x40018000), %g1 40004fac: c4 20 61 04 st %g2, [ %g1 + 0x104 ] ! 40018104 <_Event_Sync_state> } _ISR_Enable( level ); 40004fb0: 30 80 00 22 b,a 40005038 <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 40004fb4: 80 88 61 00 btst 0x100, %g1 40004fb8: 02 80 00 20 be 40005038 <_Event_Surrender+0x130> 40004fbc: 80 a0 c0 02 cmp %g3, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 40004fc0: 02 80 00 04 be 40004fd0 <_Event_Surrender+0xc8> 40004fc4: 80 8c 60 02 btst 2, %l1 40004fc8: 02 80 00 1c be 40005038 <_Event_Surrender+0x130> 40004fcc: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 40004fd0: 82 29 00 03 andn %g4, %g3, %g1 40004fd4: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004fd8: 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; 40004fdc: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004fe0: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 40004fe4: 7f ff f3 42 call 40001cec 40004fe8: 90 10 00 19 mov %i1, %o0 40004fec: 7f ff f3 3c call 40001cdc 40004ff0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40004ff4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40004ff8: 80 a0 60 02 cmp %g1, 2 40004ffc: 02 80 00 06 be 40005014 <_Event_Surrender+0x10c> 40005000: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005004: 7f ff f3 3a call 40001cec 40005008: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000500c: 10 80 00 08 b 4000502c <_Event_Surrender+0x124> 40005010: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40005014: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 40005018: 7f ff f3 35 call 40001cec 4000501c: 90 10 00 19 mov %i1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005020: 40 00 0d fa call 40008808 <_Watchdog_Remove> 40005024: 90 06 20 48 add %i0, 0x48, %o0 40005028: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000502c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005030: 40 00 08 48 call 40007150 <_Thread_Clear_state> 40005034: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40005038: 7f ff f3 2d call 40001cec 4000503c: 91 e8 00 19 restore %g0, %i1, %o0 40005040: 01 00 00 00 nop 40005044 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40005044: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 40005048: 90 10 00 18 mov %i0, %o0 4000504c: 40 00 09 49 call 40007570 <_Thread_Get> 40005050: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40005054: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005058: 80 a0 60 00 cmp %g1, 0 4000505c: 12 80 00 0f bne 40005098 <_Event_Timeout+0x54> 40005060: 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 ); 40005064: 7f ff f3 1e call 40001cdc 40005068: 01 00 00 00 nop 4000506c: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 40005070: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40005074: 80 a0 60 00 cmp %g1, 0 40005078: 12 80 00 0a bne 400050a0 <_Event_Timeout+0x5c> 4000507c: 03 10 00 5f sethi %hi(0x40017c00), %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40005080: 05 10 00 5f sethi %hi(0x40017c00), %g2 <== NOT EXECUTED 40005084: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 40017e30 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40005088: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000508c: c2 20 a2 30 st %g1, [ %g2 + 0x230 ] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 40005090: 7f ff f3 17 call 40001cec <== NOT EXECUTED 40005094: 01 00 00 00 nop <== NOT EXECUTED 40005098: 81 c7 e0 08 ret <== NOT EXECUTED 4000509c: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400050a0: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 400050a4: 80 a6 00 01 cmp %i0, %g1 400050a8: 12 80 00 09 bne 400050cc <_Event_Timeout+0x88> 400050ac: c0 26 20 24 clr [ %i0 + 0x24 ] Thread_blocking_operation_States sync = _Event_Sync_state; 400050b0: 05 10 00 60 sethi %hi(0x40018000), %g2 400050b4: c2 00 a1 04 ld [ %g2 + 0x104 ], %g1 ! 40018104 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 400050b8: 80 a0 60 01 cmp %g1, 1 400050bc: 18 80 00 05 bgu 400050d0 <_Event_Timeout+0x8c> 400050c0: 82 10 20 06 mov 6, %g1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 400050c4: 82 10 20 02 mov 2, %g1 400050c8: c2 20 a1 04 st %g1, [ %g2 + 0x104 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 400050cc: 82 10 20 06 mov 6, %g1 400050d0: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400050d4: 7f ff f3 06 call 40001cec 400050d8: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400050dc: 90 10 00 18 mov %i0, %o0 400050e0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400050e4: 40 00 08 1b call 40007150 <_Thread_Clear_state> 400050e8: 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; 400050ec: 05 10 00 5f sethi %hi(0x40017c00), %g2 400050f0: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 40017e30 <_Thread_Dispatch_disable_level> 400050f4: 82 00 7f ff add %g1, -1, %g1 400050f8: c2 20 a2 30 st %g1, [ %g2 + 0x230 ] 400050fc: 81 c7 e0 08 ret 40005100: 81 e8 00 00 restore 4000920c <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000920c: 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; 40009210: 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); 40009214: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40009218: 90 10 00 19 mov %i1, %o0 4000921c: 40 00 01 5d call 40009790 <_Heap_Calc_block_size> 40009220: 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; 40009224: 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) 40009228: ba 92 20 00 orcc %o0, 0, %i5 4000922c: 02 80 00 67 be 400093c8 <_Heap_Allocate_aligned+0x1bc> 40009230: 90 10 20 00 clr %o0 return NULL; if(alignment == 0) 40009234: 80 a6 a0 00 cmp %i2, 0 40009238: 22 80 00 02 be,a 40009240 <_Heap_Allocate_aligned+0x34> 4000923c: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 40009240: e2 06 20 08 ld [ %i0 + 8 ], %l1 40009244: 10 80 00 59 b 400093a8 <_Heap_Allocate_aligned+0x19c> 40009248: 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); 4000924c: 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. */ 40009250: 80 a4 c0 1d cmp %l3, %i5 40009254: 2a 80 00 54 bcs,a 400093a4 <_Heap_Allocate_aligned+0x198> 40009258: e2 04 60 08 ld [ %l1 + 8 ], %l1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000925c: 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; 40009260: ae 04 40 13 add %l1, %l3, %l7 aligned_user_addr = block_end - end_to_user_offs; 40009264: a0 25 c0 19 sub %l7, %i1, %l0 40009268: 40 00 3c 7d call 4001845c <.urem> 4000926c: 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)); 40009270: 92 10 00 14 mov %l4, %o1 40009274: a4 24 00 08 sub %l0, %o0, %l2 40009278: 40 00 3c 79 call 4001845c <.urem> 4000927c: 90 10 00 12 mov %l2, %o0 40009280: a0 04 60 08 add %l1, 8, %l0 40009284: 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) { 40009288: 80 a0 80 10 cmp %g2, %l0 4000928c: 2a 80 00 46 bcs,a 400093a4 <_Heap_Allocate_aligned+0x198> 40009290: 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) { 40009294: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 40009298: 82 20 80 10 sub %g2, %l0, %g1 4000929c: 80 a0 40 16 cmp %g1, %l6 400092a0: 1a 80 00 15 bcc 400092f4 <_Heap_Allocate_aligned+0xe8> 400092a4: 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) { 400092a8: 82 24 80 10 sub %l2, %l0, %g1 400092ac: 80 a0 40 14 cmp %g1, %l4 400092b0: 0a 80 00 10 bcs 400092f0 <_Heap_Allocate_aligned+0xe4> 400092b4: 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; 400092b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400092bc: 40 00 3c 68 call 4001845c <.urem> <== NOT EXECUTED 400092c0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED *value = r ? v - r + a : v; 400092c4: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 400092c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400092cc: 12 80 00 03 bne 400092d8 <_Heap_Allocate_aligned+0xcc> <== NOT EXECUTED 400092d0: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 400092d4: 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) { 400092d8: 82 22 00 10 sub %o0, %l0, %g1 <== NOT EXECUTED 400092dc: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED 400092e0: 3a 80 00 31 bcc,a 400093a4 <_Heap_Allocate_aligned+0x198> <== NOT EXECUTED 400092e4: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 400092e8: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 400092ec: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 400092f0: 80 a4 a0 00 cmp %l2, 0 400092f4: 22 80 00 2c be,a 400093a4 <_Heap_Allocate_aligned+0x198> 400092f8: 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; 400092fc: 82 05 e0 08 add %l7, 8, %g1 40009300: 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; 40009304: 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) { 40009308: 80 a0 80 16 cmp %g2, %l6 4000930c: 2a 80 00 08 bcs,a 4000932c <_Heap_Allocate_aligned+0x120> 40009310: 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; 40009314: 82 10 a0 01 or %g2, 1, %g1 40009318: 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); 4000931c: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 40009320: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 40009324: 10 80 00 09 b 40009348 <_Heap_Allocate_aligned+0x13c> 40009328: e0 24 60 04 st %l0, [ %l1 + 4 ] ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000932c: 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; 40009330: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 prev->next = next; next->prev = prev; 40009334: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 40009338: 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; 4000933c: c6 20 a0 08 st %g3, [ %g2 + 8 ] 40009340: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 40009344: 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 ); 40009348: 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; 4000934c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40009350: 82 10 60 01 or %g1, 1, %g1 40009354: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 40009358: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if(stats->min_free_size > stats->free_size) 4000935c: 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; 40009360: 82 20 40 10 sub %g1, %l0, %g1 if(stats->min_free_size > stats->free_size) 40009364: 80 a0 80 01 cmp %g2, %g1 40009368: 08 80 00 03 bleu 40009374 <_Heap_Allocate_aligned+0x168> 4000936c: c2 26 20 30 st %g1, [ %i0 + 0x30 ] stats->min_free_size = stats->free_size; 40009370: c2 26 20 34 st %g1, [ %i0 + 0x34 ] stats->used_blocks += 1; 40009374: 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; 40009378: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 stats->allocs += 1; 4000937c: 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; 40009380: 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; 40009384: 86 00 e0 01 inc %g3 stats->allocs += 1; 40009388: 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; 4000938c: 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; 40009390: 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; 40009394: 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; 40009398: 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; 4000939c: 10 80 00 07 b 400093b8 <_Heap_Allocate_aligned+0x1ac> 400093a0: 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) 400093a4: 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; 400093a8: 80 a4 40 18 cmp %l1, %i0 400093ac: 32 bf ff a8 bne,a 4000924c <_Heap_Allocate_aligned+0x40> 400093b0: c2 04 60 04 ld [ %l1 + 4 ], %g1 400093b4: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 400093b8: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 400093bc: 80 a0 40 15 cmp %g1, %l5 400093c0: 2a 80 00 02 bcs,a 400093c8 <_Heap_Allocate_aligned+0x1bc> 400093c4: ea 26 20 44 st %l5, [ %i0 + 0x44 ] stats->max_search = search_count; return user_ptr; } 400093c8: 81 c7 e0 08 ret 400093cc: 91 e8 00 08 restore %g0, %o0, %o0 4002c800 <_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; 4002c800: 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; 4002c804: 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; 4002c808: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 4002c80c: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 4002c810: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 4002c814: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; 4002c818: 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; 4002c81c: 10 80 00 23 b 4002c8a8 <_Heap_Get_information+0xa8> 4002c820: 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); 4002c824: 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 ); 4002c828: 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) ) { 4002c82c: c2 03 60 04 ld [ %o5 + 4 ], %g1 4002c830: 80 88 60 01 btst 1, %g1 4002c834: 22 80 00 0d be,a 4002c868 <_Heap_Get_information+0x68> 4002c838: c2 02 40 00 ld [ %o1 ], %g1 the_info->Used.number++; 4002c83c: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.total += the_size; 4002c840: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 4002c844: 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++; 4002c848: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 4002c84c: 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++; 4002c850: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 4002c854: 80 a0 c0 04 cmp %g3, %g4 4002c858: 1a 80 00 13 bcc 4002c8a4 <_Heap_Get_information+0xa4> 4002c85c: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 4002c860: 10 80 00 11 b 4002c8a4 <_Heap_Get_information+0xa4> 4002c864: c8 22 60 10 st %g4, [ %o1 + 0x10 ] } else { the_info->Free.number++; the_info->Free.total += the_size; 4002c868: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 4002c86c: 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++; 4002c870: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 4002c874: 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++; 4002c878: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 4002c87c: 80 a0 c0 04 cmp %g3, %g4 4002c880: 1a 80 00 03 bcc 4002c88c <_Heap_Get_information+0x8c> 4002c884: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 4002c888: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 4002c88c: c2 03 40 00 ld [ %o5 ], %g1 4002c890: 80 a1 00 01 cmp %g4, %g1 4002c894: 02 80 00 05 be 4002c8a8 <_Heap_Get_information+0xa8> 4002c898: 84 10 00 0d mov %o5, %g2 4002c89c: 81 c3 e0 08 retl <== NOT EXECUTED 4002c8a0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4002c8a4: 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 ) { 4002c8a8: 80 a0 80 0c cmp %g2, %o4 4002c8ac: 32 bf ff de bne,a 4002c824 <_Heap_Get_information+0x24> 4002c8b0: 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; 4002c8b4: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 4002c8b8: 90 10 20 00 clr %o0 4002c8bc: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 4002c8c0: 81 c3 e0 08 retl 4002c8c4: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40015998 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40015998: 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; 4001599c: e8 06 20 14 ld [ %i0 + 0x14 ], %l4 uint32_t const page_size = the_heap->page_size; 400159a0: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 *old_mem_size = 0; 400159a4: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 400159a8: 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); 400159ac: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 400159b0: 7f ff f6 53 call 400132fc <.urem> 400159b4: 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 ); 400159b8: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 400159bc: 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); 400159c0: 82 06 7f f8 add %i1, -8, %g1 400159c4: 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)) 400159c8: 80 a4 80 04 cmp %l2, %g4 400159cc: 84 60 3f ff subx %g0, -1, %g2 400159d0: 80 a0 c0 12 cmp %g3, %l2 400159d4: 82 60 3f ff subx %g0, -1, %g1 400159d8: 80 88 80 01 btst %g2, %g1 400159dc: 02 80 00 75 be 40015bb0 <_Heap_Resize_block+0x218> 400159e0: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400159e4: 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); 400159e8: 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 ); 400159ec: 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) || 400159f0: 80 a4 40 04 cmp %l1, %g4 400159f4: 84 60 3f ff subx %g0, -1, %g2 400159f8: 80 a0 c0 11 cmp %g3, %l1 400159fc: 82 60 3f ff subx %g0, -1, %g1 40015a00: 80 88 80 01 btst %g2, %g1 40015a04: 02 80 00 6b be 40015bb0 <_Heap_Resize_block+0x218> 40015a08: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40015a0c: c2 04 60 04 ld [ %l1 + 4 ], %g1 40015a10: 80 88 60 01 btst 1, %g1 40015a14: 02 80 00 67 be 40015bb0 <_Heap_Resize_block+0x218> 40015a18: 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); 40015a1c: 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) || 40015a20: 84 10 20 01 mov 1, %g2 40015a24: 02 80 00 04 be 40015a34 <_Heap_Resize_block+0x9c> 40015a28: 82 04 40 18 add %l1, %i0, %g1 40015a2c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40015a30: 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) 40015a34: 82 24 40 19 sub %l1, %i1, %g1 40015a38: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 40015a3c: 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) || 40015a40: 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) { 40015a44: 80 a6 80 01 cmp %i2, %g1 40015a48: 08 80 00 1e bleu 40015ac0 <_Heap_Resize_block+0x128> 40015a4c: 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 */ 40015a50: 80 a6 60 00 cmp %i1, 0 40015a54: 12 80 00 59 bne 40015bb8 <_Heap_Resize_block+0x220> 40015a58: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40015a5c: 92 10 00 16 mov %l6, %o1 40015a60: 7f ff f6 27 call 400132fc <.urem> 40015a64: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40015a68: 80 a2 20 00 cmp %o0, 0 40015a6c: 02 80 00 05 be 40015a80 <_Heap_Resize_block+0xe8> 40015a70: 80 a4 00 14 cmp %l0, %l4 40015a74: 82 04 00 16 add %l0, %l6, %g1 40015a78: a0 20 40 08 sub %g1, %o0, %l0 40015a7c: 80 a4 00 14 cmp %l0, %l4 40015a80: 1a 80 00 03 bcc 40015a8c <_Heap_Resize_block+0xf4> 40015a84: 90 10 00 10 mov %l0, %o0 40015a88: 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) 40015a8c: 80 a2 00 18 cmp %o0, %i0 40015a90: 18 80 00 4a bgu 40015bb8 <_Heap_Resize_block+0x220> 40015a94: 94 10 00 08 mov %o0, %o2 return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 40015a98: 92 10 00 11 mov %l1, %o1 40015a9c: 7f ff c2 a2 call 40006524 <_Heap_Block_allocate> 40015aa0: 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; 40015aa4: 90 02 00 15 add %o0, %l5, %o0 40015aa8: 90 12 00 1b or %o0, %i3, %o0 40015aac: d0 24 a0 04 st %o0, [ %l2 + 4 ] --stats->used_blocks; 40015ab0: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40015ab4: 82 00 7f ff add %g1, -1, %g1 40015ab8: 10 80 00 39 b 40015b9c <_Heap_Resize_block+0x204> 40015abc: 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; 40015ac0: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40015ac4: 92 10 00 16 mov %l6, %o1 40015ac8: 7f ff f6 0d call 400132fc <.urem> 40015acc: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 40015ad0: a0 a4 00 08 subcc %l0, %o0, %l0 40015ad4: 22 80 00 33 be,a 40015ba0 <_Heap_Resize_block+0x208> 40015ad8: 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; 40015adc: 84 25 40 10 sub %l5, %l0, %g2 if (new_block_size < min_block_size) { 40015ae0: 80 a0 80 14 cmp %g2, %l4 40015ae4: 1a 80 00 07 bcc 40015b00 <_Heap_Resize_block+0x168> 40015ae8: 80 a6 60 00 cmp %i1, 0 uint32_t delta = min_block_size - new_block_size; 40015aec: 82 25 00 02 sub %l4, %g2, %g1 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 40015af0: a0 a4 00 01 subcc %l0, %g1, %l0 40015af4: 02 80 00 2a be 40015b9c <_Heap_Resize_block+0x204> 40015af8: 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) { 40015afc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40015b00: 12 80 00 15 bne 40015b54 <_Heap_Resize_block+0x1bc> 40015b04: 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; 40015b08: 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; 40015b0c: 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; 40015b10: c2 24 a0 04 st %g1, [ %l2 + 4 ] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 40015b14: 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 ); 40015b18: 84 04 80 02 add %l2, %g2, %g2 next_next_block->prev_size = new_next_block_size; 40015b1c: 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; 40015b20: 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; 40015b24: 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; 40015b28: 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; 40015b2c: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 40015b30: c8 20 a0 08 st %g4, [ %g2 + 8 ] 40015b34: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 40015b38: da 20 a0 0c st %o5, [ %g2 + 0xc ] 40015b3c: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 40015b40: 86 00 ff fc add %g3, -4, %g3 next->prev = prev->next = block; 40015b44: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40015b48: c4 23 60 08 st %g2, [ %o5 + 8 ] 40015b4c: 10 80 00 14 b 40015b9c <_Heap_Resize_block+0x204> 40015b50: c6 27 00 00 st %g3, [ %i4 ] } else if (free_block_size >= min_block_size) { 40015b54: 2a 80 00 13 bcs,a 40015ba0 <_Heap_Resize_block+0x208> <== NOT EXECUTED 40015b58: 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; 40015b5c: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 40015b60: 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; 40015b64: 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 ); 40015b68: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 40015b6c: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40015b70: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40015b74: 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 */ 40015b78: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40015b7c: 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 */ 40015b80: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40015b84: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 40015b88: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40015b8c: 7f ff d4 f9 call 4000af70 <_Heap_Free> <== NOT EXECUTED 40015b90: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 40015b94: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 40015b98: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 40015b9c: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 40015ba0: 82 00 60 01 inc %g1 40015ba4: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 40015ba8: 81 c7 e0 08 ret 40015bac: 91 e8 20 00 restore %g0, 0, %o0 return HEAP_RESIZE_SUCCESSFUL; 40015bb0: 81 c7 e0 08 ret 40015bb4: 91 e8 20 02 restore %g0, 2, %o0 } 40015bb8: 81 c7 e0 08 ret 40015bbc: 91 e8 20 01 restore %g0, 1, %o0 4000e714 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4000e714: 9d e3 bf 98 save %sp, -104, %sp 4000e718: a6 10 00 18 mov %i0, %l3 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000e71c: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 4000e720: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000e724: 16 80 00 03 bge 4000e730 <_Heap_Walk+0x1c> 4000e728: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 source = the_heap->stats.instance; 4000e72c: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4000e730: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000e734: 80 88 60 01 btst 1, %g1 4000e738: 12 80 00 07 bne 4000e754 <_Heap_Walk+0x40> 4000e73c: b0 10 20 00 clr %i0 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 4000e740: 11 10 00 6d sethi %hi(0x4001b400), %o0 <== NOT EXECUTED 4000e744: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000e748: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED 4000e74c: 7f ff db a3 call 400055d8 <== NOT EXECUTED 4000e750: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000e754: c4 04 00 00 ld [ %l0 ], %g2 4000e758: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1 4000e75c: 80 a0 80 01 cmp %g2, %g1 4000e760: 22 80 00 5e be,a 4000e8d8 <_Heap_Walk+0x1c4> 4000e764: 03 10 00 6d sethi %hi(0x4001b400), %g1 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 4000e768: 11 10 00 6d sethi %hi(0x4001b400), %o0 <== NOT EXECUTED 4000e76c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000e770: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 4000e774: 7f ff db 99 call 400055d8 <== NOT EXECUTED 4000e778: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000e77c: 10 80 00 57 b 4000e8d8 <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000e780: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000e784: 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)) { 4000e788: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3 4000e78c: 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 ); 4000e790: a2 04 00 12 add %l0, %l2, %l1 4000e794: 80 a4 40 01 cmp %l1, %g1 4000e798: 84 60 3f ff subx %g0, -1, %g2 4000e79c: 80 a0 c0 11 cmp %g3, %l1 4000e7a0: 82 60 3f ff subx %g0, -1, %g1 4000e7a4: 80 88 80 01 btst %g2, %g1 4000e7a8: 32 80 00 09 bne,a 4000e7cc <_Heap_Walk+0xb8> 4000e7ac: 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); 4000e7b0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000e7b4: 11 10 00 6d sethi %hi(0x4001b400), %o0 <== NOT EXECUTED 4000e7b8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000e7bc: 7f ff db 87 call 400055d8 <== NOT EXECUTED 4000e7c0: 90 12 23 88 or %o0, 0x388, %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", 4000e7c4: 10 80 00 51 b 4000e908 <_Heap_Walk+0x1f4> <== NOT EXECUTED 4000e7c8: 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)) { 4000e7cc: 80 88 60 01 btst 1, %g1 4000e7d0: 12 80 00 27 bne 4000e86c <_Heap_Walk+0x158> 4000e7d4: 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) { 4000e7d8: c2 04 40 00 ld [ %l1 ], %g1 4000e7dc: 80 a4 80 01 cmp %l2, %g1 4000e7e0: 02 80 00 07 be 4000e7fc <_Heap_Walk+0xe8> 4000e7e4: 80 8d 20 01 btst 1, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000e7e8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4000e7ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000e7f0: 7f ff db 7a call 400055d8 <== NOT EXECUTED 4000e7f4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (!prev_used) { 4000e7f8: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED 4000e7fc: 32 80 00 0c bne,a 4000e82c <_Heap_Walk+0x118> 4000e800: c2 04 e0 08 ld [ %l3 + 8 ], %g1 if (do_dump || error) printk("\n"); 4000e804: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000e808: 02 80 00 05 be 4000e81c <_Heap_Walk+0x108> <== NOT EXECUTED 4000e80c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000e810: 7f ff db 72 call 400055d8 <== NOT EXECUTED 4000e814: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000e818: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000e81c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000e820: 7f ff db 6e call 400055d8 <== NOT EXECUTED 4000e824: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000e828: 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) 4000e82c: 80 a0 40 10 cmp %g1, %l0 4000e830: 02 80 00 0e be 4000e868 <_Heap_Walk+0x154> 4000e834: 80 a0 40 13 cmp %g1, %l3 4000e838: 32 bf ff fd bne,a 4000e82c <_Heap_Walk+0x118> 4000e83c: c2 00 60 08 ld [ %g1 + 8 ], %g1 block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 4000e840: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000e844: 22 80 00 05 be,a 4000e858 <_Heap_Walk+0x144> <== NOT EXECUTED 4000e848: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000e84c: 7f ff db 63 call 400055d8 <== NOT EXECUTED 4000e850: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000e854: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000e858: 7f ff db 60 call 400055d8 <== NOT EXECUTED 4000e85c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000e860: 10 80 00 06 b 4000e878 <_Heap_Walk+0x164> <== NOT EXECUTED 4000e864: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000e868: 80 a6 20 00 cmp %i0, 0 4000e86c: 22 80 00 06 be,a 4000e884 <_Heap_Walk+0x170> 4000e870: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 4000e874: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000e878: 7f ff db 58 call 400055d8 <== NOT EXECUTED 4000e87c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000e880: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED 4000e884: 80 a4 80 01 cmp %l2, %g1 4000e888: 3a 80 00 05 bcc,a 4000e89c <_Heap_Walk+0x188> 4000e88c: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1 printk("PASS: %d !block size is too small\n", source); 4000e890: 11 10 00 6e sethi %hi(0x4001b800), %o0 <== NOT EXECUTED 4000e894: 10 80 00 09 b 4000e8b8 <_Heap_Walk+0x1a4> <== NOT EXECUTED 4000e898: 90 12 20 40 or %o0, 0x40, %o0 ! 4001b840 <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 4000e89c: 40 00 26 f0 call 4001845c <.urem> 4000e8a0: 90 10 00 12 mov %l2, %o0 4000e8a4: 80 a2 20 00 cmp %o0, 0 4000e8a8: 02 80 00 08 be 4000e8c8 <_Heap_Walk+0x1b4> 4000e8ac: 80 a6 20 00 cmp %i0, 0 printk("PASS: %d !block size is misaligned\n", source); 4000e8b0: 11 10 00 6e sethi %hi(0x4001b800), %o0 <== NOT EXECUTED 4000e8b4: 90 12 20 68 or %o0, 0x68, %o0 ! 4001b868 <== NOT EXECUTED 4000e8b8: 7f ff db 48 call 400055d8 <== NOT EXECUTED 4000e8bc: 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", 4000e8c0: 10 80 00 12 b 4000e908 <_Heap_Walk+0x1f4> <== NOT EXECUTED 4000e8c4: 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) 4000e8c8: 12 80 00 10 bne 4000e908 <_Heap_Walk+0x1f4> 4000e8cc: 96 10 00 16 mov %l6, %o3 break; 4000e8d0: 10 80 00 09 b 4000e8f4 <_Heap_Walk+0x1e0> 4000e8d4: a0 10 00 11 mov %l1, %l0 error = 1; } } } if (do_dump || error) printk("\n"); 4000e8d8: aa 10 63 80 or %g1, 0x380, %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); 4000e8dc: 03 10 00 6e sethi %hi(0x4001b800), %g1 4000e8e0: b8 10 60 10 or %g1, 0x10, %i4 ! 4001b810 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); 4000e8e4: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000e8e8: ba 10 63 e0 or %g1, 0x3e0, %i5 ! 4001b7e0 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); 4000e8ec: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000e8f0: ae 10 63 b0 or %g1, 0x3b0, %l7 ! 4001b7b0 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 ) { 4000e8f4: 80 a4 00 16 cmp %l0, %l6 4000e8f8: 32 bf ff a3 bne,a 4000e784 <_Heap_Walk+0x70> 4000e8fc: 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); 4000e900: 10 80 00 09 b 4000e924 <_Heap_Walk+0x210> 4000e904: 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", 4000e908: 11 10 00 6e sethi %hi(0x4001b800), %o0 <== NOT EXECUTED 4000e90c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000e910: 90 12 20 90 or %o0, 0x90, %o0 <== NOT EXECUTED 4000e914: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4000e918: 7f ff db 30 call 400055d8 <== NOT EXECUTED 4000e91c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000e920: 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) { 4000e924: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3 4000e928: 94 08 7f fe and %g1, -2, %o2 4000e92c: 80 a2 80 0b cmp %o2, %o3 4000e930: 02 80 00 06 be 4000e948 <_Heap_Walk+0x234> 4000e934: 92 10 00 19 mov %i1, %o1 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 4000e938: 11 10 00 6e sethi %hi(0x4001b800), %o0 <== NOT EXECUTED 4000e93c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000e940: 7f ff db 26 call 400055d8 <== NOT EXECUTED 4000e944: 90 12 20 d0 or %o0, 0xd0, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 4000e948: 81 c7 e0 08 ret 4000e94c: 81 e8 00 00 restore 4000675c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 4000675c: 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; 40006760: 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 ) 40006764: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 40006768: 03 00 00 3f sethi %hi(0xfc00), %g1 4000676c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006770: a2 08 80 01 and %g2, %g1, %l1 40006774: 80 a4 00 11 cmp %l0, %l1 40006778: 3a 80 00 06 bcc,a 40006790 <_Objects_Extend_information+0x34> 4000677c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 40006780: aa 10 00 11 mov %l1, %l5 40006784: ae 10 20 00 clr %l7 40006788: 10 80 00 13 b 400067d4 <_Objects_Extend_information+0x78> 4000678c: ac 10 20 00 clr %l6 block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006790: 90 10 00 10 mov %l0, %o0 40006794: 92 10 00 12 mov %l2, %o1 40006798: 40 00 32 2d call 4001304c <.udiv> 4000679c: aa 10 00 11 mov %l1, %l5 400067a0: ac 10 20 00 clr %l6 400067a4: 10 80 00 09 b 400067c8 <_Objects_Extend_information+0x6c> 400067a8: ae 10 00 08 mov %o0, %l7 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 400067ac: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400067b0: c2 00 40 02 ld [ %g1 + %g2 ], %g1 400067b4: 80 a0 60 00 cmp %g1, 0 400067b8: 02 80 00 08 be 400067d8 <_Objects_Extend_information+0x7c> 400067bc: 80 a5 40 10 cmp %l5, %l0 break; else index_base += information->allocation_size; 400067c0: 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++ ) { 400067c4: ac 05 a0 01 inc %l6 400067c8: 80 a5 80 17 cmp %l6, %l7 400067cc: 0a bf ff f8 bcs 400067ac <_Objects_Extend_information+0x50> 400067d0: 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 ) { 400067d4: 80 a5 40 10 cmp %l5, %l0 400067d8: 2a 80 00 5d bcs,a 4000694c <_Objects_Extend_information+0x1f0> 400067dc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 400067e0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 400067e4: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 400067e8: ba 04 00 01 add %l0, %g1, %i5 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 400067ec: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 400067f0: a0 05 e0 01 add %l7, 1, %l0 400067f4: 82 07 40 11 add %i5, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 400067f8: 02 80 00 0b be 40006824 <_Objects_Extend_information+0xc8> 400067fc: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 40006800: 90 02 00 10 add %o0, %l0, %o0 40006804: 90 00 40 08 add %g1, %o0, %o0 40006808: 40 00 08 5b call 40008974 <_Workspace_Allocate> 4000680c: 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 ) 40006810: a4 92 20 00 orcc %o0, 0, %l2 40006814: 32 80 00 0a bne,a 4000683c <_Objects_Extend_information+0xe0> 40006818: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 4000681c: 81 c7 e0 08 ret <== NOT EXECUTED 40006820: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 40006824: 90 02 00 10 add %o0, %l0, %o0 40006828: 90 00 40 08 add %g1, %o0, %o0 4000682c: 40 00 08 59 call 40008990 <_Workspace_Allocate_or_fatal_error> 40006830: 91 2a 20 02 sll %o0, 2, %o0 40006834: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006838: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 4000683c: 85 2c 20 02 sll %l0, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006840: 80 a0 40 11 cmp %g1, %l1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40006844: a8 04 80 02 add %l2, %g2, %l4 40006848: a6 05 00 02 add %l4, %g2, %l3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 4000684c: 08 80 00 15 bleu 400068a0 <_Objects_Extend_information+0x144> 40006850: 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, 40006854: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 40006858: a1 2d e0 02 sll %l7, 2, %l0 4000685c: 90 10 00 12 mov %l2, %o0 40006860: 40 00 18 1d call 4000c8d4 40006864: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40006868: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000686c: 94 10 00 10 mov %l0, %o2 40006870: 40 00 18 19 call 4000c8d4 40006874: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006878: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 4000687c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40006880: 94 04 40 0a add %l1, %o2, %o2 40006884: 90 10 00 13 mov %l3, %o0 40006888: 40 00 18 13 call 4000c8d4 4000688c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40006890: 10 80 00 08 b 400068b0 <_Objects_Extend_information+0x154> 40006894: 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++ ) { 40006898: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 4000689c: 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++ ) { 400068a0: 80 a0 80 11 cmp %g2, %l1 400068a4: 2a bf ff fd bcs,a 40006898 <_Objects_Extend_information+0x13c> 400068a8: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 400068ac: 83 2d e0 02 sll %l7, 2, %g1 inactive_per_block[block_count] = 0; 400068b0: c0 25 00 01 clr [ %l4 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 400068b4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 400068b8: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 400068bc: 83 2d 60 02 sll %l5, 2, %g1 400068c0: 86 05 40 02 add %l5, %g2, %g3 400068c4: 84 04 c0 01 add %l3, %g1, %g2 400068c8: 10 80 00 04 b 400068d8 <_Objects_Extend_information+0x17c> 400068cc: 82 10 00 15 mov %l5, %g1 index++ ) { 400068d0: 82 00 60 01 inc %g1 400068d4: 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 ); 400068d8: 80 a0 40 03 cmp %g1, %g3 400068dc: 2a bf ff fd bcs,a 400068d0 <_Objects_Extend_information+0x174> 400068e0: c0 20 80 00 clr [ %g2 ] index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 400068e4: 7f ff ec fe call 40001cdc 400068e8: 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( 400068ec: c2 06 00 00 ld [ %i0 ], %g1 400068f0: c8 16 20 04 lduh [ %i0 + 4 ], %g4 400068f4: 87 2f 60 10 sll %i5, 0x10, %g3 400068f8: 89 29 20 1b sll %g4, 0x1b, %g4 400068fc: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40006900: 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( 40006904: 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; 40006908: e8 26 20 30 st %l4, [ %i0 + 0x30 ] information->local_table = local_table; 4000690c: e6 26 20 1c st %l3, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006910: 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; 40006914: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40006918: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 4000691c: 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( 40006920: 82 10 40 04 or %g1, %g4, %g1 40006924: 82 10 40 03 or %g1, %g3, %g1 40006928: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 4000692c: 7f ff ec f0 call 40001cec 40006930: 01 00 00 00 nop if ( old_tables ) 40006934: 80 a4 20 00 cmp %l0, 0 40006938: 22 80 00 05 be,a 4000694c <_Objects_Extend_information+0x1f0> 4000693c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 _Workspace_Free( old_tables ); 40006940: 40 00 08 06 call 40008958 <_Workspace_Free> 40006944: 90 10 00 10 mov %l0, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40006948: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 4000694c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40006950: 80 a0 60 00 cmp %g1, 0 40006954: 02 80 00 0f be 40006990 <_Objects_Extend_information+0x234> 40006958: a1 2d a0 02 sll %l6, 2, %l0 information->object_blocks[ block ] = 4000695c: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 40006960: 40 00 31 81 call 40012f64 <.umul> 40006964: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 40006968: 40 00 08 03 call 40008974 <_Workspace_Allocate> 4000696c: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006970: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40006974: d0 24 40 10 st %o0, [ %l1 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006978: c2 00 40 10 ld [ %g1 + %l0 ], %g1 4000697c: 80 a0 60 00 cmp %g1, 0 40006980: 32 80 00 0b bne,a 400069ac <_Objects_Extend_information+0x250> 40006984: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006988: 81 c7 e0 08 ret <== NOT EXECUTED 4000698c: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 40006990: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 40006994: 40 00 31 74 call 40012f64 <.umul> 40006998: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 4000699c: 40 00 07 fd call 40008990 <_Workspace_Allocate_or_fatal_error> 400069a0: 01 00 00 00 nop 400069a4: d0 24 40 10 st %o0, [ %l1 + %l0 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400069a8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400069ac: a5 2d a0 02 sll %l6, 2, %l2 400069b0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 400069b4: d2 00 40 12 ld [ %g1 + %l2 ], %o1 400069b8: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 400069bc: 90 07 bf ec add %fp, -20, %o0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400069c0: 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 ) { 400069c4: a8 10 00 08 mov %o0, %l4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400069c8: 40 00 10 ce call 4000ad00 <_Chain_Initialize> 400069cc: 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( 400069d0: 10 80 00 0d b 40006a04 <_Objects_Extend_information+0x2a8> 400069d4: 27 00 00 40 sethi %hi(0x10000), %l3 400069d8: c4 16 20 04 lduh [ %i0 + 4 ], %g2 400069dc: 83 28 60 18 sll %g1, 0x18, %g1 400069e0: 85 28 a0 1b sll %g2, 0x1b, %g2 400069e4: 82 10 40 13 or %g1, %l3, %g1 400069e8: 82 10 40 02 or %g1, %g2, %g1 400069ec: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400069f0: 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( 400069f4: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 400069f8: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400069fc: 7f ff fd 14 call 40005e4c <_Chain_Append> 40006a00: 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 ) { 40006a04: 40 00 10 af call 4000acc0 <_Chain_Get> 40006a08: 90 10 00 14 mov %l4, %o0 40006a0c: 80 a2 20 00 cmp %o0, 0 40006a10: 32 bf ff f2 bne,a 400069d8 <_Objects_Extend_information+0x27c> 40006a14: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006a18: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006a1c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive += information->allocation_size; 40006a20: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006a24: c2 20 80 12 st %g1, [ %g2 + %l2 ] information->inactive += information->allocation_size; 40006a28: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006a2c: 82 00 40 03 add %g1, %g3, %g1 40006a30: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006a34: 81 c7 e0 08 ret 40006a38: 81 e8 00 00 restore 40006ae8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40006ae8: 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 ) 40006aec: 82 06 3f ff add %i0, -1, %g1 40006af0: 80 a0 60 03 cmp %g1, 3 40006af4: 38 80 00 1c bgu,a 40006b64 <_Objects_Get_information+0x7c> 40006af8: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40006afc: 10 80 00 1c b 40006b6c <_Objects_Get_information+0x84> 40006b00: 80 a6 60 00 cmp %i1, 0 return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40006b04: 40 00 11 98 call 4000b164 <_Objects_API_maximum_class> 40006b08: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40006b0c: 80 a2 20 00 cmp %o0, 0 40006b10: 06 80 00 14 bl 40006b60 <_Objects_Get_information+0x78> 40006b14: 80 a6 40 08 cmp %i1, %o0 40006b18: 38 80 00 13 bgu,a 40006b64 <_Objects_Get_information+0x7c> 40006b1c: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 40006b20: 85 2e 20 02 sll %i0, 2, %g2 40006b24: 03 10 00 5f sethi %hi(0x40017c00), %g1 40006b28: 82 10 61 90 or %g1, 0x190, %g1 ! 40017d90 <_Objects_Information_table> 40006b2c: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40006b30: 80 a0 a0 00 cmp %g2, 0 40006b34: 02 80 00 0c be 40006b64 <_Objects_Get_information+0x7c> 40006b38: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40006b3c: 83 2e 60 02 sll %i1, 2, %g1 40006b40: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40006b44: 80 a6 20 00 cmp %i0, 0 40006b48: 02 80 00 07 be 40006b64 <_Objects_Get_information+0x7c> 40006b4c: 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 ) 40006b50: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006b54: 80 a0 60 00 cmp %g1, 0 40006b58: 12 80 00 03 bne 40006b64 <_Objects_Get_information+0x7c> 40006b5c: 01 00 00 00 nop 40006b60: b0 10 20 00 clr %i0 ! 0 return NULL; #endif return info; } 40006b64: 81 c7 e0 08 ret 40006b68: 81 e8 00 00 restore int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40006b6c: 22 bf ff fe be,a 40006b64 <_Objects_Get_information+0x7c> 40006b70: b0 10 20 00 clr %i0 40006b74: 30 bf ff e4 b,a 40006b04 <_Objects_Get_information+0x1c> 40006b78 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 40006b78: 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; 40006b7c: 03 00 00 3f sethi %hi(0xfc00), %g1 40006b80: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 40006b84: 7f ff ec 56 call 40001cdc 40006b88: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 40006b8c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006b90: 80 a0 40 19 cmp %g1, %i1 40006b94: 0a 80 00 11 bcs 40006bd8 <_Objects_Get_isr_disable+0x60> 40006b98: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 40006b9c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40006ba0: f0 00 80 01 ld [ %g2 + %g1 ], %i0 40006ba4: 80 a6 20 00 cmp %i0, 0 40006ba8: 02 80 00 06 be 40006bc0 <_Objects_Get_isr_disable+0x48> 40006bac: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 40006bb0: 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; 40006bb4: c0 26 80 00 clr [ %i2 ] 40006bb8: 81 c7 e0 08 ret 40006bbc: 81 e8 00 00 restore *level_p = level; return the_object; } _ISR_Enable( level ); 40006bc0: 7f ff ec 4b call 40001cec <== NOT EXECUTED 40006bc4: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 40006bc8: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40006bcc: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 40006bd0: 81 c7 e0 08 ret <== NOT EXECUTED 40006bd4: 81 e8 00 00 restore <== NOT EXECUTED return NULL; } _ISR_Enable( level ); 40006bd8: 7f ff ec 45 call 40001cec 40006bdc: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 40006be0: 82 10 20 01 mov 1, %g1 40006be4: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 40006be8: 81 c7 e0 08 ret 40006bec: 81 e8 00 00 restore 400120fc <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 400120fc: 9d e3 bf 88 save %sp, -120, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 40012100: 80 a6 60 00 cmp %i1, 0 40012104: 22 80 00 41 be,a 40012208 <_Objects_Get_name_as_string+0x10c> 40012108: b4 10 20 00 clr %i2 return NULL; if ( name == NULL ) 4001210c: 80 a6 a0 00 cmp %i2, 0 40012110: 22 80 00 3f be,a 4001220c <_Objects_Get_name_as_string+0x110> 40012114: b0 10 00 1a mov %i2, %i0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40012118: b0 96 20 00 orcc %i0, 0, %i0 4001211c: 12 80 00 04 bne 4001212c <_Objects_Get_name_as_string+0x30> 40012120: 03 10 00 9a sethi %hi(0x40026800), %g1 40012124: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 400269c0 <_Thread_Executing> 40012128: f0 00 60 08 ld [ %g1 + 8 ], %i0 information = _Objects_Get_information_id( tmpId ); 4001212c: 7f ff e5 7a call 4000b714 <_Objects_Get_information_id> 40012130: 90 10 00 18 mov %i0, %o0 if ( !information ) 40012134: a0 92 20 00 orcc %o0, 0, %l0 40012138: 22 80 00 34 be,a 40012208 <_Objects_Get_name_as_string+0x10c> 4001213c: b4 10 20 00 clr %i2 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 40012140: 92 10 00 18 mov %i0, %o1 40012144: 7f ff e5 bd call 4000b838 <_Objects_Get> 40012148: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 4001214c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012150: 80 a0 60 00 cmp %g1, 0 40012154: 32 80 00 2d bne,a 40012208 <_Objects_Get_name_as_string+0x10c> 40012158: b4 10 20 00 clr %i2 case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 4001215c: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1 40012160: 80 a0 60 00 cmp %g1, 0 40012164: 22 80 00 07 be,a 40012180 <_Objects_Get_name_as_string+0x84> 40012168: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name.name_p; 4001216c: d0 02 20 0c ld [ %o0 + 0xc ], %o0 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 40012170: 80 a2 20 00 cmp %o0, 0 40012174: 12 80 00 0c bne 400121a4 <_Objects_Get_name_as_string+0xa8> 40012178: 86 10 00 1a mov %i2, %g3 4001217c: 30 80 00 1f b,a 400121f8 <_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'; 40012180: 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; 40012184: 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; 40012188: 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; 4001218c: 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'; 40012190: 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; 40012194: 85 30 60 10 srl %g1, 0x10, %g2 lname[ 2 ] = (u32_name >> 8) & 0xff; 40012198: 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; 4001219c: c4 2f bf e9 stb %g2, [ %fp + -23 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 400121a0: 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 : '*'; 400121a4: 03 10 00 96 sethi %hi(0x40025800), %g1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 400121a8: b2 06 7f ff add %i1, -1, %i1 *d = (isprint(*s)) ? *s : '*'; 400121ac: 98 10 61 e0 or %g1, 0x1e0, %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'; 400121b0: 86 10 00 1a mov %i2, %g3 400121b4: 10 80 00 0a b 400121dc <_Objects_Get_name_as_string+0xe0> 400121b8: 84 10 20 00 clr %g2 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint(*s)) ? *s : '*'; 400121bc: c2 03 00 00 ld [ %o4 ], %g1 400121c0: c2 48 40 04 ldsb [ %g1 + %g4 ], %g1 400121c4: 80 88 60 97 btst 0x97, %g1 400121c8: 12 80 00 03 bne 400121d4 <_Objects_Get_name_as_string+0xd8> 400121cc: 84 00 a0 01 inc %g2 400121d0: 9a 10 20 2a mov 0x2a, %o5 400121d4: da 28 c0 00 stb %o5, [ %g3 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 400121d8: 86 00 e0 01 inc %g3 400121dc: 80 a0 80 19 cmp %g2, %i1 400121e0: 1a 80 00 06 bcc 400121f8 <_Objects_Get_name_as_string+0xfc> 400121e4: 01 00 00 00 nop 400121e8: c8 4a 00 02 ldsb [ %o0 + %g2 ], %g4 400121ec: 80 a1 20 00 cmp %g4, 0 400121f0: 12 bf ff f3 bne 400121bc <_Objects_Get_name_as_string+0xc0> 400121f4: da 0a 00 02 ldub [ %o0 + %g2 ], %o5 *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 400121f8: 7f ff e7 fb call 4000c1e4 <_Thread_Enable_dispatch> 400121fc: c0 28 c0 00 clrb [ %g3 ] return name; } return NULL; /* unreachable path */ } 40012200: 81 c7 e0 08 ret 40012204: 91 e8 00 1a restore %g0, %i2, %o0 40012208: b0 10 00 1a mov %i2, %i0 4001220c: 81 c7 e0 08 ret 40012210: 81 e8 00 00 restore 40014c88 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 40014c88: 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) 40014c8c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40014c90: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 40014c94: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40014c98: 22 80 00 02 be,a 40014ca0 <_Objects_Get_next+0x18> <== NOT EXECUTED 40014c9c: 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) 40014ca0: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40014ca4: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40014ca8: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40014cac: 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); 40014cb0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40014cb4: 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) 40014cb8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40014cbc: 08 80 00 08 bleu 40014cdc <_Objects_Get_next+0x54> <== NOT EXECUTED 40014cc0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 40014cc4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40014cc8: 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; 40014ccc: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40014cd0: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 40014cd4: 10 80 00 09 b 40014cf8 <_Objects_Get_next+0x70> <== NOT EXECUTED 40014cd8: 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); 40014cdc: 7f ff da d7 call 4000b838 <_Objects_Get> <== NOT EXECUTED 40014ce0: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 40014ce4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40014ce8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014cec: 32 bf ff f0 bne,a 40014cac <_Objects_Get_next+0x24> <== NOT EXECUTED 40014cf0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40014cf4: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40014cf8: 81 c7 e0 08 ret <== NOT EXECUTED 40014cfc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40008048 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40008048: 9d e3 bf 90 save %sp, -112, %sp 4000804c: 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 ) 40008050: 80 a6 60 00 cmp %i1, 0 40008054: 02 80 00 22 be 400080dc <_Objects_Id_to_name+0x94> 40008058: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4000805c: 80 a2 60 00 cmp %o1, 0 40008060: 12 80 00 06 bne 40008078 <_Objects_Id_to_name+0x30> 40008064: 83 32 60 18 srl %o1, 0x18, %g1 40008068: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000806c: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 4001c070 <_Thread_Executing> 40008070: 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); 40008074: 83 32 60 18 srl %o1, 0x18, %g1 40008078: 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 ) 4000807c: 82 00 bf ff add %g2, -1, %g1 40008080: 80 a0 60 03 cmp %g1, 3 40008084: 38 80 00 16 bgu,a 400080dc <_Objects_Id_to_name+0x94> 40008088: 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 ] ) 4000808c: 10 80 00 18 b 400080ec <_Objects_Id_to_name+0xa4> 40008090: 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 ]; 40008094: 83 28 60 02 sll %g1, 2, %g1 40008098: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 4000809c: 80 a2 20 00 cmp %o0, 0 400080a0: 02 80 00 0f be 400080dc <_Objects_Id_to_name+0x94> 400080a4: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 400080a8: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 400080ac: 80 a0 60 00 cmp %g1, 0 400080b0: 12 80 00 0d bne 400080e4 <_Objects_Id_to_name+0x9c> 400080b4: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 400080b8: 7f ff ff c7 call 40007fd4 <_Objects_Get> 400080bc: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 400080c0: 80 a2 20 00 cmp %o0, 0 400080c4: 22 80 00 06 be,a 400080dc <_Objects_Id_to_name+0x94> 400080c8: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 400080cc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 400080d0: b0 10 20 00 clr %i0 400080d4: 40 00 02 44 call 400089e4 <_Thread_Enable_dispatch> 400080d8: c2 26 40 00 st %g1, [ %i1 ] 400080dc: 81 c7 e0 08 ret 400080e0: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 400080e4: 81 c7 e0 08 ret <== NOT EXECUTED 400080e8: 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 ] ) 400080ec: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400080f0: 82 10 63 10 or %g1, 0x310, %g1 ! 4001bf10 <_Objects_Information_table> 400080f4: c4 00 40 02 ld [ %g1 + %g2 ], %g2 400080f8: 80 a0 a0 00 cmp %g2, 0 400080fc: 12 bf ff e6 bne 40008094 <_Objects_Id_to_name+0x4c> 40008100: 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; 40008104: 81 c7 e0 08 ret <== NOT EXECUTED 40008108: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 40006d6c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 40006d6c: 9a 10 00 08 mov %o0, %o5 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 40006d70: 80 a2 e0 00 cmp %o3, 0 40006d74: 02 80 00 29 be 40006e18 <_Objects_Name_to_id_u32+0xac> 40006d78: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 40006d7c: 80 a2 60 00 cmp %o1, 0 40006d80: 22 80 00 26 be,a 40006e18 <_Objects_Name_to_id_u32+0xac> 40006d84: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40006d88: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1 40006d8c: 84 90 60 00 orcc %g1, 0, %g2 40006d90: 22 80 00 22 be,a 40006e18 <_Objects_Name_to_id_u32+0xac> 40006d94: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40006d98: 80 a2 a0 00 cmp %o2, 0 40006d9c: 02 80 00 19 be 40006e00 <_Objects_Name_to_id_u32+0x94> 40006da0: 83 28 a0 10 sll %g2, 0x10, %g1 40006da4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40006da8: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40006dac: 80 a2 80 01 cmp %o2, %g1 40006db0: 02 80 00 13 be 40006dfc <_Objects_Name_to_id_u32+0x90> 40006db4: 80 a2 a0 01 cmp %o2, 1 40006db8: 32 80 00 18 bne,a 40006e18 <_Objects_Name_to_id_u32+0xac> 40006dbc: 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++ ) { 40006dc0: 10 80 00 10 b 40006e00 <_Objects_Name_to_id_u32+0x94> 40006dc4: 83 28 a0 10 sll %g2, 0x10, %g1 the_object = information->local_table[ index ]; 40006dc8: c2 03 60 1c ld [ %o5 + 0x1c ], %g1 40006dcc: c4 00 40 02 ld [ %g1 + %g2 ], %g2 if ( !the_object ) 40006dd0: 80 a0 a0 00 cmp %g2, 0 40006dd4: 02 80 00 0d be 40006e08 <_Objects_Name_to_id_u32+0x9c> 40006dd8: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 40006ddc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40006de0: 80 a2 40 01 cmp %o1, %g1 40006de4: 32 80 00 0a bne,a 40006e0c <_Objects_Name_to_id_u32+0xa0> 40006de8: 80 a0 c0 04 cmp %g3, %g4 *id = the_object->id; 40006dec: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40006df0: 90 10 20 00 clr %o0 40006df4: 81 c3 e0 08 retl 40006df8: 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++ ) { 40006dfc: 83 28 a0 10 sll %g2, 0x10, %g1 40006e00: 86 10 20 01 mov 1, %g3 40006e04: 89 30 60 10 srl %g1, 0x10, %g4 40006e08: 80 a0 c0 04 cmp %g3, %g4 40006e0c: 08 bf ff ef bleu 40006dc8 <_Objects_Name_to_id_u32+0x5c> 40006e10: 85 28 e0 02 sll %g3, 2, %g2 40006e14: 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 } 40006e18: 81 c3 e0 08 retl 40006e1c: 01 00 00 00 nop 40006d34 <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 40006d34: 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 ) 40006d38: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 40006d3c: 80 a0 60 00 cmp %g1, 0 40006d40: 22 80 00 09 be,a 40006d64 <_Objects_Namespace_remove+0x30> 40006d44: c0 26 60 0c clr [ %i1 + 0xc ] 40006d48: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 40006d4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006d50: 22 80 00 05 be,a 40006d64 <_Objects_Namespace_remove+0x30> <== NOT EXECUTED 40006d54: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 40006d58: 40 00 07 00 call 40008958 <_Workspace_Free> <== NOT EXECUTED 40006d5c: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 40006d60: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 40006d64: 81 c7 e0 08 ret 40006d68: 81 e8 00 00 restore 40008acc <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 40008acc: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 40008ad0: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 40008ad4: 40 00 1c 84 call 4000fce4 40008ad8: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 40008adc: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 40008ae0: 80 a0 60 00 cmp %g1, 0 40008ae4: 02 80 00 17 be 40008b40 <_Objects_Set_name+0x74> 40008ae8: a0 02 20 01 add %o0, 1, %l0 char *d; d = _Workspace_Allocate( length ); 40008aec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40008af0: 40 00 07 04 call 4000a700 <_Workspace_Allocate> <== NOT EXECUTED 40008af4: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 40008af8: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40008afc: 02 80 00 27 be 40008b98 <_Objects_Set_name+0xcc> <== NOT EXECUTED 40008b00: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 40008b04: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 40008b08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008b0c: 02 80 00 06 be 40008b24 <_Objects_Set_name+0x58> <== NOT EXECUTED 40008b10: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 40008b14: 40 00 06 f4 call 4000a6e4 <_Workspace_Free> <== NOT EXECUTED 40008b18: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 40008b1c: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 40008b20: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40008b24: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008b28: 40 00 1c 35 call 4000fbfc <== NOT EXECUTED 40008b2c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 40008b30: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 40008b34: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 40008b38: 81 c7 e0 08 ret <== NOT EXECUTED 40008b3c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } else { the_object->name.name_u32 = _Objects_Build_name( 40008b40: 80 a4 20 00 cmp %l0, 0 40008b44: 02 80 00 1a be 40008bac <_Objects_Set_name+0xe0> 40008b48: 1b 08 00 00 sethi %hi(0x20000000), %o5 40008b4c: c2 4e 80 00 ldsb [ %i2 ], %g1 40008b50: 80 a4 20 01 cmp %l0, 1 40008b54: 02 80 00 16 be 40008bac <_Objects_Set_name+0xe0> 40008b58: 9b 28 60 18 sll %g1, 0x18, %o5 40008b5c: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 40008b60: 80 a4 20 02 cmp %l0, 2 40008b64: 08 80 00 0f bleu 40008ba0 <_Objects_Set_name+0xd4> 40008b68: 89 28 60 10 sll %g1, 0x10, %g4 40008b6c: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 40008b70: 80 a4 20 03 cmp %l0, 3 40008b74: 87 28 60 08 sll %g1, 8, %g3 40008b78: 08 80 00 03 bleu 40008b84 <_Objects_Set_name+0xb8> 40008b7c: 84 10 20 20 mov 0x20, %g2 40008b80: c4 4e a0 03 ldsb [ %i2 + 3 ], %g2 40008b84: 82 13 40 04 or %o5, %g4, %g1 40008b88: b0 10 20 01 mov 1, %i0 40008b8c: 82 10 40 03 or %g1, %g3, %g1 40008b90: 82 10 40 02 or %g1, %g2, %g1 40008b94: c2 26 60 0c st %g1, [ %i1 + 0xc ] ); } return TRUE; } 40008b98: 81 c7 e0 08 ret 40008b9c: 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( 40008ba0: 84 10 20 20 mov 0x20, %g2 40008ba4: 10 bf ff f8 b 40008b84 <_Objects_Set_name+0xb8> 40008ba8: 07 00 00 08 sethi %hi(0x2000), %g3 40008bac: 10 bf ff fd b 40008ba0 <_Objects_Set_name+0xd4> 40008bb0: 09 00 08 00 sethi %hi(0x200000), %g4 40006e28 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40006e28: 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; 40006e2c: 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; 40006e30: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40006e34: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40006e38: 03 00 00 3f sethi %hi(0xfc00), %g1 40006e3c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006e40: 92 10 00 10 mov %l0, %o1 40006e44: a2 08 80 01 and %g2, %g1, %l1 40006e48: 40 00 30 81 call 4001304c <.udiv> 40006e4c: 90 22 00 11 sub %o0, %l1, %o0 40006e50: 10 80 00 2e b 40006f08 <_Objects_Shrink_information+0xe0> 40006e54: 84 10 20 00 clr %g2 for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40006e58: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40006e5c: c2 00 40 12 ld [ %g1 + %l2 ], %g1 40006e60: 80 a0 40 10 cmp %g1, %l0 40006e64: 12 80 00 28 bne 40006f04 <_Objects_Shrink_information+0xdc> 40006e68: 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; 40006e6c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40006e70: 03 00 00 3f sethi %hi(0xfc00), %g1 40006e74: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 40006e78: c2 04 20 08 ld [ %l0 + 8 ], %g1 40006e7c: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40006e80: 80 a0 80 11 cmp %g2, %l1 40006e84: 2a 80 00 0c bcs,a 40006eb4 <_Objects_Shrink_information+0x8c> 40006e88: e0 04 00 00 ld [ %l0 ], %l0 40006e8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006e90: 82 04 40 01 add %l1, %g1, %g1 40006e94: 80 a0 80 01 cmp %g2, %g1 40006e98: 1a 80 00 06 bcc 40006eb0 <_Objects_Shrink_information+0x88> 40006e9c: 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 ); 40006ea0: 40 00 0f 7e call 4000ac98 <_Chain_Extract> 40006ea4: 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 ) ); 40006ea8: 10 80 00 04 b 40006eb8 <_Objects_Shrink_information+0x90> 40006eac: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40006eb0: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40006eb4: 80 a4 20 00 cmp %l0, 0 40006eb8: 22 80 00 07 be,a 40006ed4 <_Objects_Shrink_information+0xac> 40006ebc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40006ec0: c2 04 00 00 ld [ %l0 ], %g1 40006ec4: 80 a0 60 00 cmp %g1, 0 40006ec8: 32 bf ff ed bne,a 40006e7c <_Objects_Shrink_information+0x54> 40006ecc: 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 ] ); 40006ed0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006ed4: 40 00 06 a1 call 40008958 <_Workspace_Free> 40006ed8: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40006edc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40006ee0: 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; 40006ee4: 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; 40006ee8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40006eec: 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; 40006ef0: c0 20 80 12 clr [ %g2 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40006ef4: 82 20 40 03 sub %g1, %g3, %g1 40006ef8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006efc: 81 c7 e0 08 ret 40006f00: 81 e8 00 00 restore return; } index_base += information->allocation_size; 40006f04: 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++ ) { 40006f08: 80 a0 80 08 cmp %g2, %o0 40006f0c: 0a bf ff d3 bcs 40006e58 <_Objects_Shrink_information+0x30> 40006f10: a5 28 a0 02 sll %g2, 2, %l2 40006f14: 81 c7 e0 08 ret 40006f18: 81 e8 00 00 restore 40022998 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 40022998: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 4002299c: 80 a6 20 00 cmp %i0, 0 400229a0: 02 80 00 10 be 400229e0 <_Protected_heap_Get_information+0x48> 400229a4: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 400229a8: 02 80 00 0e be 400229e0 <_Protected_heap_Get_information+0x48> 400229ac: 23 10 01 6d sethi %hi(0x4005b400), %l1 return false; _RTEMS_Lock_allocator(); 400229b0: 7f ff 9d 10 call 40009df0 <_API_Mutex_Lock> 400229b4: d0 04 60 e8 ld [ %l1 + 0xe8 ], %o0 ! 4005b4e8 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 400229b8: 90 10 00 18 mov %i0, %o0 400229bc: 40 00 27 91 call 4002c800 <_Heap_Get_information> 400229c0: 92 10 00 19 mov %i1, %o1 400229c4: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 400229c8: 7f ff 9d 20 call 40009e48 <_API_Mutex_Unlock> 400229cc: d0 04 60 e8 ld [ %l1 + 0xe8 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 400229d0: 80 a0 00 10 cmp %g0, %l0 400229d4: 82 60 3f ff subx %g0, -1, %g1 400229d8: 81 c7 e0 08 ret 400229dc: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 400229e0: 81 c7 e0 08 ret <== NOT EXECUTED 400229e4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40006a64 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40006a64: 9d e3 bf 90 save %sp, -112, %sp 40006a68: 11 10 00 71 sethi %hi(0x4001c400), %o0 40006a6c: 92 10 00 18 mov %i0, %o1 40006a70: 90 12 23 84 or %o0, 0x384, %o0 40006a74: 40 00 07 9c call 400088e4 <_Objects_Get> 40006a78: 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 ) { 40006a7c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006a80: 80 a0 60 00 cmp %g1, 0 40006a84: 12 80 00 26 bne 40006b1c <_Rate_monotonic_Timeout+0xb8> 40006a88: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40006a8c: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006a90: 03 00 00 10 sethi %hi(0x4000), %g1 40006a94: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40006a98: 80 88 80 01 btst %g2, %g1 40006a9c: 22 80 00 0c be,a 40006acc <_Rate_monotonic_Timeout+0x68> 40006aa0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40006aa4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006aa8: c2 06 20 08 ld [ %i0 + 8 ], %g1 40006aac: 80 a0 80 01 cmp %g2, %g1 40006ab0: 32 80 00 07 bne,a 40006acc <_Rate_monotonic_Timeout+0x68> 40006ab4: 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 ); 40006ab8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006abc: 40 00 08 e2 call 40008e44 <_Thread_Clear_state> 40006ac0: 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 ); 40006ac4: 10 80 00 08 b 40006ae4 <_Rate_monotonic_Timeout+0x80> 40006ac8: 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 ) { 40006acc: 80 a0 60 01 cmp %g1, 1 40006ad0: 12 80 00 0e bne 40006b08 <_Rate_monotonic_Timeout+0xa4> 40006ad4: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006ad8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006adc: 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; 40006ae0: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006ae4: 7f ff fe 4a call 4000640c <_Rate_monotonic_Initiate_statistics> 40006ae8: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006aec: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006af0: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006af4: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006af8: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006afc: 40 00 0f 09 call 4000a720 <_Watchdog_Insert> 40006b00: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 4001c9e0 <_Watchdog_Ticks_chain> 40006b04: 30 80 00 02 b,a 40006b0c <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40006b08: 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; 40006b0c: 05 10 00 72 sethi %hi(0x4001c800), %g2 40006b10: c2 00 a1 00 ld [ %g2 + 0x100 ], %g1 ! 4001c900 <_Thread_Dispatch_disable_level> 40006b14: 82 00 7f ff add %g1, -1, %g1 40006b18: c2 20 a1 00 st %g1, [ %g2 + 0x100 ] 40006b1c: 81 c7 e0 08 ret 40006b20: 81 e8 00 00 restore 400072dc <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 400072dc: 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 ); 400072e0: 11 10 00 5f sethi %hi(0x40017c00), %o0 400072e4: 7f ff fc e9 call 40006688 <_Objects_Allocate> 400072e8: 90 12 23 90 or %o0, 0x390, %o0 ! 40017f90 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400072ec: 05 10 00 5f sethi %hi(0x40017c00), %g2 400072f0: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 40017e30 <_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(); 400072f4: 07 10 00 5f sethi %hi(0x40017c00), %g3 400072f8: 82 00 60 01 inc %g1 400072fc: d0 20 e3 dc st %o0, [ %g3 + 0x3dc ] 40007300: c2 20 a2 30 st %g1, [ %g2 + 0x230 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 40007304: 03 10 00 5f sethi %hi(0x40017c00), %g1 40007308: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 ! 40017ec8 <_Configuration_Table> 4000730c: d2 00 e3 dc ld [ %g3 + 0x3dc ], %o1 40007310: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40007314: 03 10 00 5c sethi %hi(0x40017000), %g1 40007318: d6 00 61 60 ld [ %g1 + 0x160 ], %o3 ! 40017160 4000731c: 03 10 00 59 sethi %hi(0x40016400), %g1 40007320: 82 10 61 c0 or %g1, 0x1c0, %g1 ! 400165c0 40007324: 80 a2 c0 02 cmp %o3, %g2 40007328: 1a 80 00 03 bcc 40007334 <_Thread_Create_idle+0x58> 4000732c: c2 27 bf f4 st %g1, [ %fp + -12 ] 40007330: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40007334: 03 10 00 5c sethi %hi(0x40017000), %g1 40007338: da 08 61 64 ldub [ %g1 + 0x164 ], %o5 ! 40017164 4000733c: 82 10 20 01 mov 1, %g1 40007340: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40007344: 82 07 bf f4 add %fp, -12, %g1 40007348: c0 23 a0 60 clr [ %sp + 0x60 ] 4000734c: c0 23 a0 64 clr [ %sp + 0x64 ] 40007350: c0 23 a0 68 clr [ %sp + 0x68 ] 40007354: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007358: 94 10 20 00 clr %o2 4000735c: 98 10 20 00 clr %o4 40007360: 11 10 00 5f sethi %hi(0x40017c00), %o0 40007364: 40 00 00 af call 40007620 <_Thread_Initialize> 40007368: 90 12 23 90 or %o0, 0x390, %o0 ! 40017f90 <_Thread_Internal_information> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 4000736c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40007370: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 ! 40017ec8 <_Configuration_Table> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40007374: 07 10 00 5f sethi %hi(0x40017c00), %g3 40007378: f4 00 60 14 ld [ %g1 + 0x14 ], %i2 4000737c: c2 00 e2 30 ld [ %g3 + 0x230 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40007380: 05 10 00 5f sethi %hi(0x40017c00), %g2 40007384: 82 00 7f ff add %g1, -1, %g1 40007388: c4 00 a3 dc ld [ %g2 + 0x3dc ], %g2 4000738c: c2 20 e2 30 st %g1, [ %g3 + 0x230 ] 40007390: 03 10 00 5f sethi %hi(0x40017c00), %g1 40007394: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] ! 40017ef0 <_Thread_Executing> 40007398: 03 10 00 5f sethi %hi(0x40017c00), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 4000739c: 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 = 400073a0: c4 20 62 bc st %g2, [ %g1 + 0x2bc ] _Thread_Executing = _Thread_Idle; _Thread_Start( 400073a4: b2 10 20 00 clr %i1 400073a8: b6 10 20 00 clr %i3 400073ac: 40 00 03 81 call 400081b0 <_Thread_Start> 400073b0: 99 e8 20 00 restore %g0, 0, %o4 400073b4: 01 00 00 00 nop 4000becc <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4000becc: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000bed0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40017ef0 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 4000bed4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000bed8: 80 a0 60 00 cmp %g1, 0 4000bedc: 32 80 00 0b bne,a 4000bf08 <_Thread_Evaluate_mode+0x3c> 4000bee0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000bee4: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000bee8: c2 00 62 bc ld [ %g1 + 0x2bc ], %g1 ! 40017ebc <_Thread_Heir> 4000beec: 80 a0 80 01 cmp %g2, %g1 4000bef0: 02 80 00 0b be 4000bf1c <_Thread_Evaluate_mode+0x50> 4000bef4: 01 00 00 00 nop 4000bef8: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 4000befc: 80 a0 60 00 cmp %g1, 0 4000bf00: 02 80 00 07 be 4000bf1c <_Thread_Evaluate_mode+0x50> 4000bf04: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 4000bf08: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000bf0c: 90 10 20 01 mov 1, %o0 4000bf10: c4 28 63 00 stb %g2, [ %g1 + 0x300 ] 4000bf14: 81 c3 e0 08 retl 4000bf18: 01 00 00 00 nop return TRUE; } return FALSE; } 4000bf1c: 81 c3 e0 08 retl 4000bf20: 90 10 20 00 clr %o0 ! 0 40007570 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40007570: 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 ) ) { 40007574: 80 a2 20 00 cmp %o0, 0 40007578: 12 80 00 0a bne 400075a0 <_Thread_Get+0x30> 4000757c: 94 10 00 09 mov %o1, %o2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007580: 03 10 00 5f sethi %hi(0x40017c00), %g1 40007584: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40017e30 <_Thread_Dispatch_disable_level> 40007588: 84 00 a0 01 inc %g2 4000758c: c4 20 62 30 st %g2, [ %g1 + 0x230 ] _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007590: 03 10 00 5f sethi %hi(0x40017c00), %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; 40007594: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40007598: 81 c3 e0 08 retl 4000759c: d0 00 62 f0 ld [ %g1 + 0x2f0 ], %o0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400075a0: 83 32 20 18 srl %o0, 0x18, %g1 400075a4: 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 ) 400075a8: 82 00 bf ff add %g2, -1, %g1 400075ac: 80 a0 60 03 cmp %g1, 3 400075b0: 08 80 00 16 bleu 40007608 <_Thread_Get+0x98> 400075b4: 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; 400075b8: 82 10 20 01 mov 1, %g1 400075bc: 10 80 00 09 b 400075e0 <_Thread_Get+0x70> 400075c0: c2 22 80 00 st %g1, [ %o2 ] goto done; } api_information = _Objects_Information_table[ the_api ]; 400075c4: 03 10 00 5f sethi %hi(0x40017c00), %g1 400075c8: 82 10 61 90 or %g1, 0x190, %g1 ! 40017d90 <_Objects_Information_table> 400075cc: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 400075d0: 80 a0 60 00 cmp %g1, 0 400075d4: 32 80 00 05 bne,a 400075e8 <_Thread_Get+0x78> 400075d8: d0 00 60 04 ld [ %g1 + 4 ], %o0 *location = OBJECTS_ERROR; 400075dc: c6 22 80 00 st %g3, [ %o2 ] 400075e0: 81 c3 e0 08 retl 400075e4: 90 10 20 00 clr %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { 400075e8: 80 a2 20 00 cmp %o0, 0 400075ec: 12 80 00 04 bne 400075fc <_Thread_Get+0x8c> 400075f0: 92 10 00 04 mov %g4, %o1 *location = OBJECTS_ERROR; 400075f4: 81 c3 e0 08 retl <== NOT EXECUTED 400075f8: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400075fc: 82 13 c0 00 mov %o7, %g1 40007600: 7f ff fd 7c call 40006bf0 <_Objects_Get> 40007604: 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 :) */ 40007608: 80 a0 e0 01 cmp %g3, 1 4000760c: 22 bf ff ee be,a 400075c4 <_Thread_Get+0x54> 40007610: 85 28 a0 02 sll %g2, 2, %g2 *location = OBJECTS_ERROR; 40007614: 10 bf ff ea b 400075bc <_Thread_Get+0x4c> 40007618: 82 10 20 01 mov 1, %g1 4000bf24 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000bf24: 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; 4000bf28: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000bf2c: e2 00 62 f0 ld [ %g1 + 0x2f0 ], %l1 ! 40017ef0 <_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(); 4000bf30: 3f 10 00 2f sethi %hi(0x4000bc00), %i7 4000bf34: be 17 e3 24 or %i7, 0x324, %i7 ! 4000bf24 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000bf38: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000bf3c: 7f ff d7 6c call 40001cec 4000bf40: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000bf44: 05 10 00 5f sethi %hi(0x40017c00), %g2 doneConstructors = 1; 4000bf48: 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; 4000bf4c: e0 08 a0 24 ldub [ %g2 + 0x24 ], %l0 * 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 ); 4000bf50: 90 10 00 11 mov %l1, %o0 4000bf54: 7f ff f1 50 call 40008494 <_User_extensions_Thread_begin> 4000bf58: c2 28 a0 24 stb %g1, [ %g2 + 0x24 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000bf5c: 7f ff ed 78 call 4000753c <_Thread_Enable_dispatch> 4000bf60: a1 2c 20 18 sll %l0, 0x18, %l0 /* * _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) */ 4000bf64: 80 a4 20 00 cmp %l0, 0 4000bf68: 32 80 00 05 bne,a 4000bf7c <_Thread_Handler+0x58> 4000bf6c: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 { _init (); 4000bf70: 40 00 2c 42 call 40017078 <_init> 4000bf74: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000bf78: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000bf7c: 80 a0 60 01 cmp %g1, 1 4000bf80: 22 80 00 0d be,a 4000bfb4 <_Thread_Handler+0x90> 4000bf84: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000bf88: 2a 80 00 09 bcs,a 4000bfac <_Thread_Handler+0x88> 4000bf8c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000bf90: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000bf94: 02 80 00 0d be 4000bfc8 <_Thread_Handler+0xa4> <== NOT EXECUTED 4000bf98: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000bf9c: 12 80 00 14 bne 4000bfec <_Thread_Handler+0xc8> <== NOT EXECUTED 4000bfa0: 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 = 4000bfa4: 10 80 00 0d b 4000bfd8 <_Thread_Handler+0xb4> <== NOT EXECUTED 4000bfa8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000bfac: 10 80 00 03 b 4000bfb8 <_Thread_Handler+0x94> 4000bfb0: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000bfb4: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000bfb8: 9f c0 40 00 call %g1 4000bfbc: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000bfc0: 10 80 00 0b b 4000bfec <_Thread_Handler+0xc8> 4000bfc4: d0 24 60 28 st %o0, [ %l1 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000bfc8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000bfcc: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000bfd0: 10 80 00 04 b 4000bfe0 <_Thread_Handler+0xbc> <== NOT EXECUTED 4000bfd4: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000bfd8: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000bfdc: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000bfe0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000bfe4: 01 00 00 00 nop <== NOT EXECUTED 4000bfe8: d0 24 60 28 st %o0, [ %l1 + 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 ); 4000bfec: 7f ff f1 3b call 400084d8 <_User_extensions_Thread_exitted> 4000bff0: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000bff4: 90 10 20 00 clr %o0 4000bff8: 92 10 20 01 mov 1, %o1 4000bffc: 7f ff e9 74 call 400065cc <_Internal_error_Occurred> 4000c000: 94 10 20 06 mov 6, %o2 4000c004: 01 00 00 00 nop 40007620 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40007620: 9d e3 bf 98 save %sp, -104, %sp 40007624: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007628: 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 ) { 4000762c: e4 00 40 00 ld [ %g1 ], %l2 40007630: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007634: 12 80 00 0e bne 4000766c <_Thread_Initialize+0x4c> 40007638: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 4000763c: 90 10 00 19 mov %i1, %o0 40007640: 40 00 02 a3 call 400080cc <_Thread_Stack_Allocate> 40007644: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40007648: 80 a2 20 00 cmp %o0, 0 4000764c: 02 80 00 1e be 400076c4 <_Thread_Initialize+0xa4> 40007650: 80 a2 00 1b cmp %o0, %i3 40007654: 0a 80 00 1c bcs 400076c4 <_Thread_Initialize+0xa4> 40007658: 01 00 00 00 nop return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 4000765c: 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; 40007660: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40007664: 10 80 00 04 b 40007674 <_Thread_Initialize+0x54> 40007668: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 4000766c: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40007670: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007674: 03 10 00 5f sethi %hi(0x40017c00), %g1 40007678: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 40017ed0 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 4000767c: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40007680: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007684: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40007688: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 4000768c: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40007690: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 40007694: c0 26 61 58 clr [ %i1 + 0x158 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007698: 80 a0 60 00 cmp %g1, 0 4000769c: 02 80 00 0c be 400076cc <_Thread_Initialize+0xac> 400076a0: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 400076a4: 90 00 60 01 add %g1, 1, %o0 400076a8: 40 00 04 b3 call 40008974 <_Workspace_Allocate> 400076ac: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 400076b0: b6 92 20 00 orcc %o0, 0, %i3 400076b4: 12 80 00 07 bne 400076d0 <_Thread_Initialize+0xb0> 400076b8: 80 a6 e0 00 cmp %i3, 0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 400076bc: 40 00 02 9c call 4000812c <_Thread_Stack_Free> <== NOT EXECUTED 400076c0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400076c4: 81 c7 e0 08 ret 400076c8: 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 ) { 400076cc: 80 a6 e0 00 cmp %i3, 0 400076d0: 02 80 00 0d be 40007704 <_Thread_Initialize+0xe4> 400076d4: f6 26 61 68 st %i3, [ %i1 + 0x168 ] uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 400076d8: 03 10 00 5f sethi %hi(0x40017c00), %g1 400076dc: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 40017ed0 <_Thread_Maximum_extensions> 400076e0: 86 10 20 00 clr %g3 400076e4: 10 80 00 05 b 400076f8 <_Thread_Initialize+0xd8> 400076e8: 88 00 60 01 add %g1, 1, %g4 the_thread->extensions[i] = NULL; 400076ec: 83 28 e0 02 sll %g3, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 400076f0: 86 00 e0 01 inc %g3 the_thread->extensions[i] = NULL; 400076f4: c0 20 80 01 clr [ %g2 + %g1 ] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 400076f8: 80 a0 c0 04 cmp %g3, %g4 400076fc: 2a bf ff fc bcs,a 400076ec <_Thread_Initialize+0xcc> 40007700: c4 06 61 68 ld [ %i1 + 0x168 ], %g2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007704: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40007708: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 4000770c: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 40007710: 80 a4 60 02 cmp %l1, 2 40007714: 12 80 00 05 bne 40007728 <_Thread_Initialize+0x108> 40007718: e2 26 60 b0 st %l1, [ %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; 4000771c: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 40007720: c2 00 61 88 ld [ %g1 + 0x188 ], %g1 ! 40017d88 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40007724: 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; 40007728: 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 ); 4000772c: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40007730: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40007734: 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 ); 40007738: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 4000773c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 40007740: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40007744: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40007748: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 4000774c: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40007750: 40 00 01 be call 40007e48 <_Thread_Set_priority> 40007754: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007758: c4 06 60 08 ld [ %i1 + 8 ], %g2 4000775c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40007760: 03 00 00 3f sethi %hi(0xfc00), %g1 40007764: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007768: 84 08 80 01 and %g2, %g1, %g2 4000776c: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40007770: e4 26 60 0c st %l2, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 40007774: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40007778: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000777c: 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 ); 40007780: 90 10 00 19 mov %i1, %o0 40007784: 40 00 03 79 call 40008568 <_User_extensions_Thread_create> 40007788: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 4000778c: 80 8a 20 ff btst 0xff, %o0 40007790: 12 80 00 09 bne 400077b4 <_Thread_Initialize+0x194> 40007794: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40007798: 02 80 00 05 be 400077ac <_Thread_Initialize+0x18c> <== NOT EXECUTED 4000779c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 400077a0: 40 00 04 6e call 40008958 <_Workspace_Free> <== NOT EXECUTED 400077a4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 400077a8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400077ac: 40 00 02 60 call 4000812c <_Thread_Stack_Free> <== NOT EXECUTED 400077b0: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 400077b4: 81 c7 e0 08 ret 400077b8: 81 e8 00 00 restore 4000c308 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000c308: 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; 4000c30c: 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; 4000c310: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000c314: 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; 4000c318: 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; 4000c31c: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000c320: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000c324: 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; 4000c328: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000c32c: 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 ) ) { 4000c330: 7f ff f1 5a call 40008898 <_Thread_queue_Extract_with_proxy> 4000c334: 90 10 00 18 mov %i0, %o0 4000c338: 80 8a 20 ff btst 0xff, %o0 4000c33c: 32 80 00 09 bne,a 4000c360 <_Thread_Reset+0x58> 4000c340: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000c344: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000c348: 80 a0 60 02 cmp %g1, 2 4000c34c: 32 80 00 05 bne,a 4000c360 <_Thread_Reset+0x58> 4000c350: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000c354: 7f ff f4 4f call 40009490 <_Watchdog_Remove> <== NOT EXECUTED 4000c358: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000c35c: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000c360: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000c364: 80 a0 40 19 cmp %g1, %i1 4000c368: 02 80 00 05 be 4000c37c <_Thread_Reset+0x74> 4000c36c: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000c370: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000c374: 7f ff f1 c4 call 40008a84 <_Thread_Set_priority> 4000c378: 81 e8 00 00 restore 4000c37c: 81 c7 e0 08 ret 4000c380: 81 e8 00 00 restore 4000b5ec <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000b5ec: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000b5f0: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000b5f4: e0 00 62 f0 ld [ %g1 + 0x2f0 ], %l0 ! 40017ef0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000b5f8: 7f ff d9 b9 call 40001cdc 4000b5fc: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000b600: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000b604: c4 04 40 00 ld [ %l1 ], %g2 4000b608: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000b60c: 80 a0 80 01 cmp %g2, %g1 4000b610: 32 80 00 03 bne,a 4000b61c <_Thread_Reset_timeslice+0x30> 4000b614: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000b618: 30 80 00 18 b,a 4000b678 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000b61c: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b620: 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; 4000b624: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b628: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000b62c: 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; 4000b630: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000b634: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000b638: 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; 4000b63c: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000b640: 7f ff d9 ab call 40001cec 4000b644: 01 00 00 00 nop 4000b648: 7f ff d9 a5 call 40001cdc 4000b64c: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000b650: 05 10 00 5f sethi %hi(0x40017c00), %g2 4000b654: c2 00 a2 bc ld [ %g2 + 0x2bc ], %g1 ! 40017ebc <_Thread_Heir> 4000b658: 80 a4 00 01 cmp %l0, %g1 4000b65c: 32 80 00 05 bne,a 4000b670 <_Thread_Reset_timeslice+0x84> 4000b660: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000b664: c2 04 40 00 ld [ %l1 ], %g1 4000b668: c2 20 a2 bc st %g1, [ %g2 + 0x2bc ] _Context_Switch_necessary = TRUE; 4000b66c: 84 10 20 01 mov 1, %g2 4000b670: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000b674: c4 28 63 00 stb %g2, [ %g1 + 0x300 ] ! 40017f00 <_Context_Switch_necessary> _ISR_Enable( level ); 4000b678: 7f ff d9 9d call 40001cec 4000b67c: 81 e8 00 00 restore 4000b680: 01 00 00 00 nop 400097f8 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 400097f8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 400097fc: 7f ff e4 ab call 40002aa8 40009800: 01 00 00 00 nop 40009804: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 40009808: 80 8e 60 ff btst 0xff, %i1 4000980c: 22 80 00 04 be,a 4000981c <_Thread_Resume+0x24> 40009810: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 40009814: 10 80 00 04 b 40009824 <_Thread_Resume+0x2c> 40009818: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 4000981c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009820: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 40009824: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 40009828: 80 a0 60 00 cmp %g1, 0 4000982c: 22 80 00 03 be,a 40009838 <_Thread_Resume+0x40> 40009830: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 40009834: 30 80 00 2e b,a 400098ec <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 40009838: 80 88 60 02 btst 2, %g1 4000983c: 02 80 00 2c be 400098ec <_Thread_Resume+0xf4> 40009840: 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 ) ) { 40009844: 80 a0 60 00 cmp %g1, 0 40009848: 12 80 00 29 bne 400098ec <_Thread_Resume+0xf4> 4000984c: 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; 40009850: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 40009854: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 40009858: 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); 4000985c: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 40009860: 82 10 40 02 or %g1, %g2, %g1 40009864: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009868: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000986c: 1b 10 00 90 sethi %hi(0x40024000), %o5 40009870: c2 26 00 00 st %g1, [ %i0 ] 40009874: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2 old_last_node = the_chain->last; 40009878: c2 00 e0 08 ld [ %g3 + 8 ], %g1 4000987c: c8 13 63 c4 lduh [ %o5 + 0x3c4 ], %g4 the_chain->last = the_node; 40009880: f0 20 e0 08 st %i0, [ %g3 + 8 ] 40009884: 84 10 80 04 or %g2, %g4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 40009888: c2 26 20 04 st %g1, [ %i0 + 4 ] 4000988c: c4 33 63 c4 sth %g2, [ %o5 + 0x3c4 ] 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; 40009890: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 40009894: 7f ff e4 89 call 40002ab8 40009898: 90 10 00 10 mov %l0, %o0 4000989c: 7f ff e4 83 call 40002aa8 400098a0: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 400098a4: 07 10 00 90 sethi %hi(0x40024000), %g3 400098a8: c2 00 e3 9c ld [ %g3 + 0x39c ], %g1 ! 4002439c <_Thread_Heir> 400098ac: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 400098b0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 400098b4: 80 a0 80 01 cmp %g2, %g1 400098b8: 1a 80 00 0d bcc 400098ec <_Thread_Resume+0xf4> 400098bc: 03 10 00 90 sethi %hi(0x40024000), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 400098c0: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 400243d0 <_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; 400098c4: f0 20 e3 9c st %i0, [ %g3 + 0x39c ] if ( _Thread_Executing->is_preemptible || 400098c8: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 400098cc: 80 a0 60 00 cmp %g1, 0 400098d0: 32 80 00 05 bne,a 400098e4 <_Thread_Resume+0xec> 400098d4: 84 10 20 01 mov 1, %g2 400098d8: 80 a0 a0 00 cmp %g2, 0 400098dc: 12 80 00 04 bne 400098ec <_Thread_Resume+0xf4> 400098e0: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 400098e4: 03 10 00 90 sethi %hi(0x40024000), %g1 400098e8: c4 28 63 e0 stb %g2, [ %g1 + 0x3e0 ] ! 400243e0 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 400098ec: 7f ff e4 73 call 40002ab8 400098f0: 91 e8 00 10 restore %g0, %l0, %o0 400098f4: 01 00 00 00 nop 400080cc <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 400080cc: 9d e3 bf 98 save %sp, -104, %sp 400080d0: 03 10 00 5c sethi %hi(0x40017000), %g1 400080d4: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 40017160 400080d8: 80 a6 40 01 cmp %i1, %g1 400080dc: 2a 80 00 02 bcs,a 400080e4 <_Thread_Stack_Allocate+0x18> 400080e0: 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 ) { 400080e4: 03 10 00 5f sethi %hi(0x40017c00), %g1 400080e8: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 ! 40017ec8 <_Configuration_Table> 400080ec: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 400080f0: 80 a0 60 00 cmp %g1, 0 400080f4: 22 80 00 06 be,a 4000810c <_Thread_Stack_Allocate+0x40> 400080f8: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 400080fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008100: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 40008104: 10 80 00 05 b 40008118 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED 40008108: d0 26 20 cc st %o0, [ %i0 + 0xcc ] <== 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 ); 4000810c: 40 00 02 1a call 40008974 <_Workspace_Allocate> 40008110: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 40008114: d0 26 20 cc st %o0, [ %i0 + 0xcc ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 40008118: 80 a0 00 08 cmp %g0, %o0 4000811c: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40008120: b0 0e 40 18 and %i1, %i0, %i0 40008124: 81 c7 e0 08 ret 40008128: 81 e8 00 00 restore 4000812c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000812c: 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 ) 40008130: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 40008134: 80 a0 60 00 cmp %g1, 0 40008138: 02 80 00 09 be 4000815c <_Thread_Stack_Free+0x30> 4000813c: 03 10 00 5f sethi %hi(0x40017c00), %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 ) 40008140: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 ! 40017ec8 <_Configuration_Table> 40008144: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 40008148: 80 a0 60 00 cmp %g1, 0 4000814c: 02 80 00 06 be 40008164 <_Thread_Stack_Free+0x38> 40008150: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 (*_Configuration_Table->stack_free_hook)( 40008154: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008158: 01 00 00 00 nop <== NOT EXECUTED 4000815c: 81 c7 e0 08 ret <== NOT EXECUTED 40008160: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 40008164: 40 00 01 fd call 40008958 <_Workspace_Free> 40008168: 91 e8 00 08 restore %g0, %o0, %o0 4000816c: 01 00 00 00 nop 400081fc <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 400081fc: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 40008200: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008204: e0 00 62 f0 ld [ %g1 + 0x2f0 ], %l0 ! 40017ef0 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 40008208: c2 0c 20 76 ldub [ %l0 + 0x76 ], %g1 4000820c: 80 a0 60 00 cmp %g1, 0 40008210: 02 80 00 23 be 4000829c <_Thread_Tickle_timeslice+0xa0> 40008214: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 40008218: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000821c: 80 a0 60 00 cmp %g1, 0 40008220: 12 80 00 1f bne 4000829c <_Thread_Tickle_timeslice+0xa0> 40008224: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 40008228: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 4000822c: 80 a0 60 01 cmp %g1, 1 40008230: 0a 80 00 12 bcs 40008278 <_Thread_Tickle_timeslice+0x7c> 40008234: 80 a0 60 02 cmp %g1, 2 40008238: 28 80 00 07 bleu,a 40008254 <_Thread_Tickle_timeslice+0x58> 4000823c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 40008240: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40008244: 12 80 00 16 bne 4000829c <_Thread_Tickle_timeslice+0xa0> <== NOT EXECUTED 40008248: 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 ) 4000824c: 10 80 00 0d b 40008280 <_Thread_Tickle_timeslice+0x84> <== NOT EXECUTED 40008250: 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 ) { 40008254: 82 00 7f ff add %g1, -1, %g1 40008258: 80 a0 60 00 cmp %g1, 0 4000825c: 14 80 00 07 bg 40008278 <_Thread_Tickle_timeslice+0x7c> 40008260: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 40008264: 40 00 0c e2 call 4000b5ec <_Thread_Reset_timeslice> 40008268: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4000826c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008270: c2 00 61 88 ld [ %g1 + 0x188 ], %g1 ! 40017d88 <_Thread_Ticks_per_timeslice> 40008274: c2 24 20 78 st %g1, [ %l0 + 0x78 ] 40008278: 81 c7 e0 08 ret 4000827c: 81 e8 00 00 restore } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 40008280: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008284: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008288: 12 bf ff fc bne 40008278 <_Thread_Tickle_timeslice+0x7c> <== NOT EXECUTED 4000828c: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 40008290: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40008294: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008298: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000829c: 81 c7 e0 08 ret 400082a0: 81 e8 00 00 restore 40007ad0 <_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 ) { 40007ad0: 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; 40007ad4: 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); 40007ad8: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40007adc: 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); 40007ae0: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40007ae4: 82 06 60 38 add %i1, 0x38, %g1 40007ae8: 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 ) ) 40007aec: 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); 40007af0: 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; 40007af4: 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 ]; 40007af8: 85 28 60 04 sll %g1, 4, %g2 40007afc: 83 28 60 02 sll %g1, 2, %g1 40007b00: 84 20 80 01 sub %g2, %g1, %g2 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40007b04: 12 80 00 31 bne 40007bc8 <_Thread_queue_Enqueue_priority+0xf8> 40007b08: 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; 40007b0c: 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; 40007b10: 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 ); 40007b14: 7f ff e8 72 call 40001cdc 40007b18: 01 00 00 00 nop 40007b1c: a6 10 00 08 mov %o0, %l3 search_thread = (Thread_Control *) header->first; 40007b20: a2 10 3f ff mov -1, %l1 40007b24: 10 80 00 18 b 40007b84 <_Thread_queue_Enqueue_priority+0xb4> 40007b28: 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 ) 40007b2c: 80 a4 80 11 cmp %l2, %l1 40007b30: 28 80 00 19 bleu,a 40007b94 <_Thread_queue_Enqueue_priority+0xc4> 40007b34: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 40007b38: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40007b3c: 80 a4 00 14 cmp %l0, %l4 40007b40: 22 80 00 15 be,a 40007b94 <_Thread_queue_Enqueue_priority+0xc4> 40007b44: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40007b48: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40007b4c: 80 a4 80 11 cmp %l2, %l1 40007b50: 28 80 00 11 bleu,a 40007b94 <_Thread_queue_Enqueue_priority+0xc4> 40007b54: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40007b58: 7f ff e8 65 call 40001cec 40007b5c: 90 10 00 13 mov %l3, %o0 40007b60: 7f ff e8 5f call 40001cdc 40007b64: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007b68: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007b6c: 80 8d 80 01 btst %l6, %g1 40007b70: 32 80 00 05 bne,a 40007b84 <_Thread_queue_Enqueue_priority+0xb4> 40007b74: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 40007b78: 7f ff e8 5d call 40001cec <== NOT EXECUTED 40007b7c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40007b80: 30 bf ff e5 b,a 40007b14 <_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 ) ) { 40007b84: 80 a4 00 14 cmp %l0, %l4 40007b88: 32 bf ff e9 bne,a 40007b2c <_Thread_queue_Enqueue_priority+0x5c> 40007b8c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40007b90: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007b94: 80 a0 60 01 cmp %g1, 1 40007b98: 12 80 00 48 bne 40007cb8 <_Thread_queue_Enqueue_priority+0x1e8> 40007b9c: 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 ) 40007ba0: 80 a4 80 11 cmp %l2, %l1 40007ba4: 02 80 00 3a be 40007c8c <_Thread_queue_Enqueue_priority+0x1bc> 40007ba8: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40007bac: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007bb0: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40007bb4: 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; 40007bb8: 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; 40007bbc: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40007bc0: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007bc4: 30 80 00 39 b,a 40007ca8 <_Thread_queue_Enqueue_priority+0x1d8> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40007bc8: 03 10 00 5c sethi %hi(0x40017000), %g1 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40007bcc: 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; 40007bd0: ae 10 61 64 or %g1, 0x164, %l7 40007bd4: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 40007bd8: 7f ff e8 41 call 40001cdc 40007bdc: a2 00 60 01 add %g1, 1, %l1 40007be0: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 40007be4: 10 80 00 19 b 40007c48 <_Thread_queue_Enqueue_priority+0x178> 40007be8: 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 ) 40007bec: 80 a4 80 11 cmp %l2, %l1 40007bf0: 3a 80 00 1a bcc,a 40007c58 <_Thread_queue_Enqueue_priority+0x188> 40007bf4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40007bf8: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40007bfc: 80 a4 00 13 cmp %l0, %l3 40007c00: 22 80 00 16 be,a 40007c58 <_Thread_queue_Enqueue_priority+0x188> 40007c04: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40007c08: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40007c0c: 80 a4 80 11 cmp %l2, %l1 40007c10: 3a 80 00 12 bcc,a 40007c58 <_Thread_queue_Enqueue_priority+0x188> 40007c14: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40007c18: 7f ff e8 35 call 40001cec 40007c1c: 90 10 00 14 mov %l4, %o0 40007c20: 7f ff e8 2f call 40001cdc 40007c24: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007c28: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007c2c: 80 8d 80 01 btst %l6, %g1 40007c30: 32 80 00 06 bne,a 40007c48 <_Thread_queue_Enqueue_priority+0x178> 40007c34: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 40007c38: 7f ff e8 2d call 40001cec <== NOT EXECUTED 40007c3c: 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; 40007c40: 10 bf ff e6 b 40007bd8 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 40007c44: 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 ) ) { 40007c48: 80 a4 00 13 cmp %l0, %l3 40007c4c: 32 bf ff e8 bne,a 40007bec <_Thread_queue_Enqueue_priority+0x11c> 40007c50: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40007c54: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007c58: 80 a0 60 01 cmp %g1, 1 40007c5c: 12 80 00 17 bne 40007cb8 <_Thread_queue_Enqueue_priority+0x1e8> 40007c60: 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 ) 40007c64: 80 a4 80 11 cmp %l2, %l1 40007c68: 02 80 00 09 be 40007c8c <_Thread_queue_Enqueue_priority+0x1bc> 40007c6c: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40007c70: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40007c74: 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; 40007c78: 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; 40007c7c: 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; 40007c80: 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; 40007c84: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007c88: 30 80 00 08 b,a 40007ca8 <_Thread_queue_Enqueue_priority+0x1d8> 40007c8c: 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; 40007c90: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007c94: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40007c98: 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; 40007c9c: 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; 40007ca0: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40007ca4: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007ca8: 7f ff e8 11 call 40001cec 40007cac: b0 10 20 01 mov 1, %i0 40007cb0: 81 c7 e0 08 ret 40007cb4: 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; 40007cb8: 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; 40007cbc: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 40007cc0: 81 c7 e0 08 ret <== NOT EXECUTED 40007cc4: 81 e8 00 00 restore <== NOT EXECUTED 4000c008 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000c008: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000c00c: 7f ff d7 34 call 40001cdc 4000c010: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000c014: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000c018: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000c01c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000c020: 80 88 80 01 btst %g2, %g1 4000c024: 32 80 00 04 bne,a 4000c034 <_Thread_queue_Extract_fifo+0x2c> 4000c028: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 4000c02c: 7f ff d7 30 call 40001cec <== NOT EXECUTED 4000c030: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000c034: 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 ) ) { 4000c038: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000c03c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000c040: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000c044: 80 a0 e0 02 cmp %g3, 2 4000c048: 02 80 00 06 be 4000c060 <_Thread_queue_Extract_fifo+0x58> 4000c04c: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000c050: 7f ff d7 27 call 40001cec 4000c054: 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 ); 4000c058: 10 80 00 0a b 4000c080 <_Thread_queue_Extract_fifo+0x78> 4000c05c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c060: 82 10 20 03 mov 3, %g1 4000c064: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000c068: 7f ff d7 21 call 40001cec 4000c06c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000c070: 7f ff f1 e6 call 40008808 <_Watchdog_Remove> 4000c074: 90 06 60 48 add %i1, 0x48, %o0 4000c078: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000c07c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c080: 7f ff ec 34 call 40007150 <_Thread_Clear_state> 4000c084: 81 e8 00 00 restore 4000c088: 01 00 00 00 nop 4000b368 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000b368: 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 ); 4000b36c: 7f ff da 5c call 40001cdc 4000b370: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000b374: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000b378: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000b37c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000b380: 80 88 80 01 btst %g2, %g1 4000b384: 32 80 00 03 bne,a 4000b390 <_Thread_queue_Extract_priority_helper+0x28> 4000b388: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 4000b38c: 30 80 00 1c b,a 4000b3fc <_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 ) ) { 4000b390: 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; 4000b394: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000b398: 80 a0 c0 01 cmp %g3, %g1 4000b39c: 02 80 00 13 be 4000b3e8 <_Thread_queue_Extract_priority_helper+0x80> 4000b3a0: 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; 4000b3a4: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000b3a8: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000b3ac: 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; 4000b3b0: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000b3b4: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000b3b8: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000b3bc: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000b3c0: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000b3c4: 80 a0 80 01 cmp %g2, %g1 4000b3c8: 02 80 00 0a be 4000b3f0 <_Thread_queue_Extract_priority_helper+0x88> 4000b3cc: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000b3d0: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000b3d4: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000b3d8: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000b3dc: 82 00 e0 3c add %g3, 0x3c, %g1 4000b3e0: 10 80 00 04 b 4000b3f0 <_Thread_queue_Extract_priority_helper+0x88> 4000b3e4: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000b3e8: 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; 4000b3ec: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000b3f0: 80 8e a0 ff btst 0xff, %i2 4000b3f4: 22 80 00 04 be,a 4000b404 <_Thread_queue_Extract_priority_helper+0x9c> 4000b3f8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 4000b3fc: 7f ff da 3c call 40001cec 4000b400: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000b404: 80 a0 60 02 cmp %g1, 2 4000b408: 02 80 00 06 be 4000b420 <_Thread_queue_Extract_priority_helper+0xb8> 4000b40c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000b410: 7f ff da 37 call 40001cec 4000b414: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000b418: 10 80 00 08 b 4000b438 <_Thread_queue_Extract_priority_helper+0xd0> 4000b41c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000b420: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000b424: 7f ff da 32 call 40001cec <== NOT EXECUTED 4000b428: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000b42c: 7f ff f4 f7 call 40008808 <_Watchdog_Remove> <== NOT EXECUTED 4000b430: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 4000b434: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 4000b438: 7f ff ef 46 call 40007150 <_Thread_Clear_state> 4000b43c: 81 e8 00 00 restore 4000b440: 01 00 00 00 nop 4000b444 <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000b444: 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 && 4000b448: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 4000b44c: 80 a0 e0 00 cmp %g3, 0 4000b450: 02 80 00 0f be 4000b48c <_Thread_queue_Process_timeout+0x48> 4000b454: 92 10 00 08 mov %o0, %o1 4000b458: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000b45c: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40017ef0 <_Thread_Executing> 4000b460: 80 a2 00 01 cmp %o0, %g1 4000b464: 32 80 00 0b bne,a 4000b490 <_Thread_queue_Process_timeout+0x4c> 4000b468: 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 ) { 4000b46c: 80 a0 e0 03 cmp %g3, 3 4000b470: 02 80 00 0d be 4000b4a4 <_Thread_queue_Process_timeout+0x60> 4000b474: 01 00 00 00 nop the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000b478: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4000b47c: c2 22 20 34 st %g1, [ %o0 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000b480: 82 10 20 02 mov 2, %g1 4000b484: 81 c3 e0 08 retl 4000b488: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000b48c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000b490: 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; 4000b494: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000b498: 82 13 c0 00 mov %o7, %g1 4000b49c: 7f ff ff a8 call 4000b33c <_Thread_queue_Extract> 4000b4a0: 9e 10 40 00 mov %g1, %o7 4000b4a4: 81 c3 e0 08 retl <== NOT EXECUTED 4000b4a8: 01 00 00 00 nop 40009ff0 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 40009ff0: 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; 40009ff4: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 40009ff8: 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; 40009ffc: 91 38 60 1f sra %g1, 0x1f, %o0 4000a000: 92 10 00 01 mov %g1, %o1 4000a004: 83 30 60 1d srl %g1, 0x1d, %g1 4000a008: 87 2a 60 03 sll %o1, 3, %g3 4000a00c: 85 2a 20 03 sll %o0, 3, %g2 4000a010: 84 10 40 02 or %g1, %g2, %g2 4000a014: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a018: 99 28 a0 05 sll %g2, 5, %o4 4000a01c: 9b 28 e0 05 sll %g3, 5, %o5 4000a020: 98 10 40 0c or %g1, %o4, %o4 4000a024: 9a a3 40 03 subcc %o5, %g3, %o5 4000a028: 83 33 60 1a srl %o5, 0x1a, %g1 4000a02c: 98 63 00 02 subx %o4, %g2, %o4 4000a030: 97 2b 60 06 sll %o5, 6, %o3 4000a034: 95 2b 20 06 sll %o4, 6, %o2 4000a038: 96 a2 c0 0d subcc %o3, %o5, %o3 4000a03c: 94 10 40 0a or %g1, %o2, %o2 4000a040: 94 62 80 0c subx %o2, %o4, %o2 4000a044: 96 82 c0 09 addcc %o3, %o1, %o3 4000a048: 94 42 80 08 addx %o2, %o0, %o2 4000a04c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a050: 85 2a a0 02 sll %o2, 2, %g2 4000a054: 84 10 40 02 or %g1, %g2, %g2 4000a058: 87 2a e0 02 sll %o3, 2, %g3 4000a05c: 96 82 c0 03 addcc %o3, %g3, %o3 4000a060: 94 42 80 02 addx %o2, %g2, %o2 4000a064: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a068: 85 2a a0 02 sll %o2, 2, %g2 4000a06c: 84 10 40 02 or %g1, %g2, %g2 4000a070: 87 2a e0 02 sll %o3, 2, %g3 4000a074: 96 82 c0 03 addcc %o3, %g3, %o3 4000a078: 94 42 80 02 addx %o2, %g2, %o2 4000a07c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a080: 85 2a a0 02 sll %o2, 2, %g2 4000a084: 84 10 40 02 or %g1, %g2, %g2 4000a088: 87 2a e0 02 sll %o3, 2, %g3 4000a08c: 96 82 c0 03 addcc %o3, %g3, %o3 4000a090: 94 42 80 02 addx %o2, %g2, %o2 4000a094: 85 32 e0 17 srl %o3, 0x17, %g2 4000a098: 83 2a a0 09 sll %o2, 9, %g1 4000a09c: 9b 2a e0 09 sll %o3, 9, %o5 4000a0a0: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000a0a4: 96 83 40 0f addcc %o5, %o7, %o3 4000a0a8: 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; 4000a0ac: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000a0b0: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000a0b4: 80 92 80 0b orcc %o2, %o3, %g0 4000a0b8: 12 80 00 06 bne 4000a0d0 <_Timespec_Divide+0xe0> 4000a0bc: d0 06 00 00 ld [ %i0 ], %o0 *ival_percentage = 0; 4000a0c0: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000a0c4: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000a0c8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a0cc: 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; 4000a0d0: 92 10 00 08 mov %o0, %o1 4000a0d4: 83 32 60 1d srl %o1, 0x1d, %g1 4000a0d8: 9b 2a 60 03 sll %o1, 3, %o5 4000a0dc: 91 3a 20 1f sra %o0, 0x1f, %o0 4000a0e0: 99 2a 20 03 sll %o0, 3, %o4 4000a0e4: 98 10 40 0c or %g1, %o4, %o4 4000a0e8: 83 33 60 1b srl %o5, 0x1b, %g1 4000a0ec: 85 2b 20 05 sll %o4, 5, %g2 4000a0f0: 87 2b 60 05 sll %o5, 5, %g3 4000a0f4: 84 10 40 02 or %g1, %g2, %g2 4000a0f8: 86 a0 c0 0d subcc %g3, %o5, %g3 4000a0fc: 83 30 e0 1a srl %g3, 0x1a, %g1 4000a100: 84 60 80 0c subx %g2, %o4, %g2 4000a104: 9b 28 e0 06 sll %g3, 6, %o5 4000a108: 99 28 a0 06 sll %g2, 6, %o4 4000a10c: 9a a3 40 03 subcc %o5, %g3, %o5 4000a110: 98 10 40 0c or %g1, %o4, %o4 4000a114: 98 63 00 02 subx %o4, %g2, %o4 4000a118: 9a 83 40 09 addcc %o5, %o1, %o5 4000a11c: 83 33 60 1e srl %o5, 0x1e, %g1 4000a120: 98 43 00 08 addx %o4, %o0, %o4 4000a124: 87 2b 60 02 sll %o5, 2, %g3 4000a128: 85 2b 20 02 sll %o4, 2, %g2 4000a12c: 9a 83 40 03 addcc %o5, %g3, %o5 4000a130: 84 10 40 02 or %g1, %g2, %g2 4000a134: 83 33 60 1e srl %o5, 0x1e, %g1 4000a138: 98 43 00 02 addx %o4, %g2, %o4 4000a13c: 87 2b 60 02 sll %o5, 2, %g3 4000a140: 85 2b 20 02 sll %o4, 2, %g2 4000a144: 9a 83 40 03 addcc %o5, %g3, %o5 4000a148: 84 10 40 02 or %g1, %g2, %g2 4000a14c: 83 33 60 1e srl %o5, 0x1e, %g1 4000a150: 98 43 00 02 addx %o4, %g2, %o4 4000a154: 87 2b 60 02 sll %o5, 2, %g3 4000a158: 85 2b 20 02 sll %o4, 2, %g2 4000a15c: 9a 83 40 03 addcc %o5, %g3, %o5 4000a160: 84 10 40 02 or %g1, %g2, %g2 4000a164: 98 43 00 02 addx %o4, %g2, %o4 4000a168: 83 2b 20 09 sll %o4, 9, %g1 4000a16c: 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; 4000a170: 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; 4000a174: a0 10 80 01 or %g2, %g1, %l0 4000a178: 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; 4000a17c: a2 84 40 13 addcc %l1, %l3, %l1 4000a180: 83 34 60 1e srl %l1, 0x1e, %g1 4000a184: 87 2c 60 02 sll %l1, 2, %g3 4000a188: a5 3c a0 1f sra %l2, 0x1f, %l2 4000a18c: a0 44 00 12 addx %l0, %l2, %l0 4000a190: 85 2c 20 02 sll %l0, 2, %g2 4000a194: 84 10 40 02 or %g1, %g2, %g2 4000a198: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a19c: 99 28 a0 05 sll %g2, 5, %o4 4000a1a0: 9b 28 e0 05 sll %g3, 5, %o5 4000a1a4: 98 10 40 0c or %g1, %o4, %o4 4000a1a8: 9a a3 40 03 subcc %o5, %g3, %o5 4000a1ac: 98 63 00 02 subx %o4, %g2, %o4 4000a1b0: 9a 83 40 11 addcc %o5, %l1, %o5 4000a1b4: 83 33 60 1e srl %o5, 0x1e, %g1 4000a1b8: 98 43 00 10 addx %o4, %l0, %o4 4000a1bc: 87 2b 60 02 sll %o5, 2, %g3 4000a1c0: 85 2b 20 02 sll %o4, 2, %g2 4000a1c4: 9a 83 40 03 addcc %o5, %g3, %o5 4000a1c8: 84 10 40 02 or %g1, %g2, %g2 4000a1cc: 83 33 60 1e srl %o5, 0x1e, %g1 4000a1d0: 87 2b 60 02 sll %o5, 2, %g3 4000a1d4: 98 43 00 02 addx %o4, %g2, %o4 4000a1d8: 9a 83 40 03 addcc %o5, %g3, %o5 4000a1dc: 85 2b 20 02 sll %o4, 2, %g2 4000a1e0: 84 10 40 02 or %g1, %g2, %g2 4000a1e4: 83 33 60 1b srl %o5, 0x1b, %g1 4000a1e8: 98 43 00 02 addx %o4, %g2, %o4 4000a1ec: 99 2b 20 05 sll %o4, 5, %o4 4000a1f0: 98 10 40 0c or %g1, %o4, %o4 4000a1f4: 93 2b 60 05 sll %o5, 5, %o1 4000a1f8: 40 00 32 ef call 40016db4 <__udivdi3> 4000a1fc: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000a200: 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; 4000a204: a0 10 00 08 mov %o0, %l0 4000a208: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000a20c: 96 10 23 e8 mov 0x3e8, %o3 4000a210: 40 00 32 e9 call 40016db4 <__udivdi3> 4000a214: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000a218: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000a21c: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000a220: 94 10 20 00 clr %o2 4000a224: 92 10 00 11 mov %l1, %o1 4000a228: 40 00 33 bf call 40017124 <__umoddi3> 4000a22c: 96 10 23 e8 mov 0x3e8, %o3 4000a230: d2 26 c0 00 st %o1, [ %i3 ] 4000a234: 81 c7 e0 08 ret 4000a238: 81 e8 00 00 restore 400126fc <_Timespec_From_ticks>: void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 400126fc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40012700: 03 10 00 9a sethi %hi(0x40026800), %g1 <== NOT EXECUTED 40012704: d2 00 62 a0 ld [ %g1 + 0x2a0 ], %o1 ! 40026aa0 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40012708: 40 00 2f 2e call 4001e3c0 <.umul> <== NOT EXECUTED 4001270c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40012710: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40012714: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40012718: 7f ff bc 26 call 400017b0 <.udiv> <== NOT EXECUTED 4001271c: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40012720: 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; 40012724: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40012728: 40 00 2f 60 call 4001e4a8 <.urem> <== NOT EXECUTED 4001272c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40012730: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 40012734: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 40012738: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4001273c: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40012740: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED 40012744: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 40012748: 81 c7 e0 08 ret <== NOT EXECUTED 4001274c: 81 e8 00 00 restore <== NOT EXECUTED 40012750 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 40012750: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012754: 02 80 00 0f be 40012790 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40012758: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 4001275c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40012760: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012764: 06 80 00 0b bl 40012790 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40012768: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 4001276c: d0 02 20 04 ld [ %o0 + 4 ], %o0 <== NOT EXECUTED 40012770: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012774: 06 80 00 07 bl 40012790 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40012778: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 <== NOT EXECUTED 4001277c: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <== NOT EXECUTED 40012780: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40012784: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40012788: 81 c3 e0 08 retl <== NOT EXECUTED 4001278c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 40012790: 81 c3 e0 08 retl <== NOT EXECUTED 40012794: 90 10 20 00 clr %o0 <== NOT EXECUTED 40012798 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 40012798: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 4001279c: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED 400127a0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400127a4: 12 80 00 06 bne 400127bc <_Timespec_To_ticks+0x24> <== NOT EXECUTED 400127a8: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 400127ac: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 400127b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400127b4: 02 80 00 13 be 40012800 <_Timespec_To_ticks+0x68> <== NOT EXECUTED 400127b8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 400127bc: 03 10 00 9a sethi %hi(0x40026800), %g1 <== NOT EXECUTED 400127c0: e2 00 62 a0 ld [ %g1 + 0x2a0 ], %l1 ! 40026aa0 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 400127c4: 11 00 03 d0 sethi %hi(0xf4000), %o0 <== NOT EXECUTED 400127c8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 400127cc: 7f ff bb f9 call 400017b0 <.udiv> <== NOT EXECUTED 400127d0: 90 12 22 40 or %o0, 0x240, %o0 <== NOT EXECUTED 400127d4: 40 00 2e fb call 4001e3c0 <.umul> <== NOT EXECUTED 400127d8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400127dc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 400127e0: d0 04 a0 04 ld [ %l2 + 4 ], %o0 <== NOT EXECUTED 400127e4: 7f ff bb f3 call 400017b0 <.udiv> <== NOT EXECUTED 400127e8: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED 400127ec: 7f ff bb f1 call 400017b0 <.udiv> <== NOT EXECUTED 400127f0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 400127f4: b0 82 00 10 addcc %o0, %l0, %i0 <== NOT EXECUTED 400127f8: 22 80 00 02 be,a 40012800 <_Timespec_To_ticks+0x68> <== NOT EXECUTED 400127fc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return ticks; return 1; } 40012800: 81 c7 e0 08 ret <== NOT EXECUTED 40012804: 81 e8 00 00 restore <== NOT EXECUTED 4000b684 <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 4000b684: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4000b688: 11 10 00 60 sethi %hi(0x40018000), %o0 4000b68c: 92 10 00 18 mov %i0, %o1 4000b690: 7f ff e9 ef call 40005e4c <_Chain_Append> 4000b694: 90 12 20 68 or %o0, 0x68, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4000b698: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000b69c: 80 a0 60 00 cmp %g1, 0 4000b6a0: 02 80 00 06 be 4000b6b8 <_User_extensions_Add_API_set+0x34> 4000b6a4: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 4000b6a8: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 4000b6ac: 31 10 00 5f sethi %hi(0x40017c00), %i0 4000b6b0: 7f ff e9 e7 call 40005e4c <_Chain_Append> 4000b6b4: 91 ee 22 34 restore %i0, 0x234, %o0 4000b6b8: 81 c7 e0 08 ret <== NOT EXECUTED 4000b6bc: 81 e8 00 00 restore <== NOT EXECUTED 4000d1e0 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000d1e0: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 4000d1e4: 40 00 11 dc call 40011954 <_Chain_Extract> 4000d1e8: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000d1ec: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000d1f0: 80 a0 60 00 cmp %g1, 0 4000d1f4: 02 80 00 04 be 4000d204 <_User_extensions_Remove_set+0x24> 4000d1f8: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 4000d1fc: 40 00 11 d6 call 40011954 <_Chain_Extract> <== NOT EXECUTED 4000d200: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000d204: 81 c7 e0 08 ret 4000d208: 81 e8 00 00 restore 40008568 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40008568: 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 ; 4000856c: 03 10 00 60 sethi %hi(0x40018000), %g1 40008570: e0 00 60 68 ld [ %g1 + 0x68 ], %l0 ! 40018068 <_User_extensions_List> 40008574: 82 10 60 68 or %g1, 0x68, %g1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40008578: 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)( 4000857c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008580: 10 80 00 0d b 400085b4 <_User_extensions_Thread_create+0x4c> 40008584: a2 10 62 f0 or %g1, 0x2f0, %l1 ! 40017ef0 <_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 ) { 40008588: 80 a0 60 00 cmp %g1, 0 4000858c: 02 80 00 09 be 400085b0 <_User_extensions_Thread_create+0x48> 40008590: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40008594: 9f c0 40 00 call %g1 40008598: d0 04 40 00 ld [ %l1 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 4000859c: 80 8a 20 ff btst 0xff, %o0 400085a0: 32 80 00 05 bne,a 400085b4 <_User_extensions_Thread_create+0x4c> 400085a4: e0 04 00 00 ld [ %l0 ], %l0 400085a8: 81 c7 e0 08 ret <== NOT EXECUTED 400085ac: 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 ) { 400085b0: 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 ) ; 400085b4: 80 a4 00 12 cmp %l0, %l2 400085b8: 32 bf ff f4 bne,a 40008588 <_User_extensions_Thread_create+0x20> 400085bc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 400085c0: 81 c7 e0 08 ret 400085c4: 91 e8 20 01 restore %g0, 1, %o0 40015dc4 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 40015dc4: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 40015dc8: 80 a6 60 00 cmp %i1, 0 40015dcc: 02 80 00 31 be 40015e90 <_Watchdog_Adjust_to_chain+0xcc> 40015dd0: 01 00 00 00 nop return; } _ISR_Disable( level ); 40015dd4: 7f ff d5 b0 call 4000b494 40015dd8: 01 00 00 00 nop 40015ddc: a4 10 00 08 mov %o0, %l2 if ( !_Chain_Is_empty( header ) ) { 40015de0: c2 06 00 00 ld [ %i0 ], %g1 40015de4: a2 06 20 04 add %i0, 4, %l1 40015de8: 80 a0 40 11 cmp %g1, %l1 40015dec: 02 80 00 27 be 40015e88 <_Watchdog_Adjust_to_chain+0xc4> 40015df0: 01 00 00 00 nop 40015df4: a6 06 a0 04 add %i2, 4, %l3 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 40015df8: c4 06 00 00 ld [ %i0 ], %g2 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 40015dfc: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0 40015e00: 80 a6 40 10 cmp %i1, %l0 40015e04: 3a 80 00 05 bcc,a 40015e18 <_Watchdog_Adjust_to_chain+0x54> 40015e08: c0 20 a0 10 clr [ %g2 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 40015e0c: 82 24 00 19 sub %l0, %i1, %g1 40015e10: 10 80 00 1e b 40015e88 <_Watchdog_Adjust_to_chain+0xc4> 40015e14: 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)); 40015e18: 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)) 40015e1c: 80 a0 80 11 cmp %g2, %l1 40015e20: 32 80 00 04 bne,a 40015e30 <_Watchdog_Adjust_to_chain+0x6c> 40015e24: c2 00 80 00 ld [ %g2 ], %g1 40015e28: 10 80 00 04 b 40015e38 <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED 40015e2c: 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; 40015e30: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 40015e34: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40015e38: e6 20 80 00 st %l3, [ %g2 ] old_last_node = the_chain->last; 40015e3c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 40015e40: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40015e44: 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; 40015e48: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 40015e4c: 7f ff d5 96 call 4000b4a4 40015e50: 90 10 00 12 mov %l2, %o0 40015e54: 7f ff d5 90 call 4000b494 40015e58: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40015e5c: c2 06 00 00 ld [ %i0 ], %g1 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40015e60: 80 a0 40 11 cmp %g1, %l1 40015e64: 02 80 00 09 be 40015e88 <_Watchdog_Adjust_to_chain+0xc4> 40015e68: 01 00 00 00 nop 40015e6c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40015e70: 80 a0 60 00 cmp %g1, 0 40015e74: 22 bf ff ea be,a 40015e1c <_Watchdog_Adjust_to_chain+0x58> 40015e78: c4 06 00 00 ld [ %i0 ], %g2 return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 40015e7c: b2 a6 40 10 subcc %i1, %l0, %i1 40015e80: 32 bf ff df bne,a 40015dfc <_Watchdog_Adjust_to_chain+0x38> 40015e84: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED break; } } } _ISR_Enable( level ); 40015e88: 7f ff d5 87 call 4000b4a4 40015e8c: 91 e8 00 12 restore %g0, %l2, %o0 40015e90: 81 c7 e0 08 ret 40015e94: 81 e8 00 00 restore 400086a0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 400086a0: 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; 400086a4: 03 10 00 5f sethi %hi(0x40017c00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 400086a8: 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; 400086ac: e6 00 62 cc ld [ %g1 + 0x2cc ], %l3 _ISR_Disable( level ); 400086b0: 7f ff e5 8b call 40001cdc 400086b4: 01 00 00 00 nop 400086b8: 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 ) { 400086bc: c2 06 60 08 ld [ %i1 + 8 ], %g1 400086c0: 80 a0 60 00 cmp %g1, 0 400086c4: 02 80 00 03 be 400086d0 <_Watchdog_Insert+0x30> 400086c8: 07 10 00 5f sethi %hi(0x40017c00), %g3 _ISR_Enable( level ); 400086cc: 30 80 00 39 b,a 400087b0 <_Watchdog_Insert+0x110> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 400086d0: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 40017f80 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 400086d4: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 400086d8: 82 00 60 01 inc %g1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 400086dc: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 400086e0: c2 20 e3 80 st %g1, [ %g3 + 0x380 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 400086e4: 03 10 00 5f sethi %hi(0x40017c00), %g1 400086e8: a8 10 62 ec or %g1, 0x2ec, %l4 ! 40017eec <_Watchdog_Sync_level> 400086ec: ac 10 00 14 mov %l4, %l6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 400086f0: 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 ; 400086f4: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 400086f8: 80 a4 a0 00 cmp %l2, 0 400086fc: 22 80 00 1c be,a 4000876c <_Watchdog_Insert+0xcc> 40008700: c4 04 60 04 ld [ %l1 + 4 ], %g2 40008704: c2 04 40 00 ld [ %l1 ], %g1 40008708: 80 a0 60 00 cmp %g1, 0 4000870c: 22 80 00 18 be,a 4000876c <_Watchdog_Insert+0xcc> 40008710: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 40008714: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40008718: 80 a4 80 10 cmp %l2, %l0 4000871c: 1a 80 00 04 bcc 4000872c <_Watchdog_Insert+0x8c> 40008720: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40008724: 10 80 00 11 b 40008768 <_Watchdog_Insert+0xc8> 40008728: 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 ); 4000872c: 7f ff e5 70 call 40001cec 40008730: 90 10 00 18 mov %i0, %o0 40008734: 7f ff e5 6a call 40001cdc 40008738: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4000873c: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008740: 80 a0 60 01 cmp %g1, 1 40008744: 12 80 00 15 bne 40008798 <_Watchdog_Insert+0xf8> 40008748: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4000874c: c2 05 00 00 ld [ %l4 ], %g1 40008750: 80 a0 40 13 cmp %g1, %l3 40008754: 28 bf ff e9 bleu,a 400086f8 <_Watchdog_Insert+0x58> 40008758: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 4000875c: e6 25 80 00 st %l3, [ %l6 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40008760: 10 bf ff e5 b 400086f4 <_Watchdog_Insert+0x54> 40008764: 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 ); 40008768: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000876c: 03 10 00 5f sethi %hi(0x40017c00), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40008770: c6 00 80 00 ld [ %g2 ], %g3 40008774: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 after_node->next = the_node; 40008778: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4000877c: c4 26 60 04 st %g2, [ %i1 + 4 ] 40008780: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40008784: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40008788: 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; 4000878c: 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; 40008790: c6 26 40 00 st %g3, [ %i1 ] 40008794: 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; 40008798: 03 10 00 5f sethi %hi(0x40017c00), %g1 _Watchdog_Sync_count--; 4000879c: 05 10 00 5f sethi %hi(0x40017c00), %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; 400087a0: e6 20 62 ec st %l3, [ %g1 + 0x2ec ] _Watchdog_Sync_count--; 400087a4: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 400087a8: 82 00 7f ff add %g1, -1, %g1 400087ac: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] _ISR_Enable( level ); 400087b0: 7f ff e5 4f call 40001cec 400087b4: 81 e8 00 00 restore 400087b8: 01 00 00 00 nop 40008808 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 40008808: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000880c: 7f ff e5 34 call 40001cdc 40008810: 01 00 00 00 nop previous_state = the_watchdog->state; 40008814: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 40008818: 80 a4 20 01 cmp %l0, 1 4000881c: 22 80 00 1e be,a 40008894 <_Watchdog_Remove+0x8c> 40008820: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 40008824: 0a 80 00 1d bcs 40008898 <_Watchdog_Remove+0x90> 40008828: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000882c: 80 a4 20 03 cmp %l0, 3 40008830: 18 80 00 1a bgu 40008898 <_Watchdog_Remove+0x90> 40008834: 01 00 00 00 nop 40008838: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000883c: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 40008840: c2 00 c0 00 ld [ %g3 ], %g1 40008844: 80 a0 60 00 cmp %g1, 0 40008848: 02 80 00 07 be 40008864 <_Watchdog_Remove+0x5c> 4000884c: 03 10 00 5f sethi %hi(0x40017c00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 40008850: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 40008854: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 40008858: 82 00 40 02 add %g1, %g2, %g1 4000885c: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 40008860: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008864: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 40017f80 <_Watchdog_Sync_count> 40008868: 80 a0 60 00 cmp %g1, 0 4000886c: 22 80 00 07 be,a 40008888 <_Watchdog_Remove+0x80> 40008870: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 40008874: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008878: c4 00 62 cc ld [ %g1 + 0x2cc ], %g2 ! 40017ecc <_ISR_Nest_level> 4000887c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008880: c4 20 62 ec st %g2, [ %g1 + 0x2ec ] ! 40017eec <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40008884: c4 06 00 00 ld [ %i0 ], %g2 previous = the_node->previous; 40008888: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 4000888c: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008890: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008894: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008898: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 40017f84 <_Watchdog_Ticks_since_boot> 4000889c: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 400088a0: 7f ff e5 13 call 40001cec 400088a4: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 400088a8: 81 c7 e0 08 ret 400088ac: 81 e8 00 00 restore 400089c0 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 400089c0: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 400089c4: 80 a6 20 00 cmp %i0, 0 400089c8: 02 80 00 04 be 400089d8 <_Workspace_Handler_initialization+0x18> 400089cc: 80 8e 20 07 btst 7, %i0 400089d0: 02 80 00 06 be 400089e8 <_Workspace_Handler_initialization+0x28> 400089d4: 03 10 00 5f sethi %hi(0x40017c00), %g1 _Internal_error_Occurred( 400089d8: 90 10 20 00 clr %o0 400089dc: 92 10 20 01 mov 1, %o1 400089e0: 10 80 00 15 b 40008a34 <_Workspace_Handler_initialization+0x74> 400089e4: 94 10 20 02 mov 2, %o2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 400089e8: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 400089ec: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 400089f0: 80 a0 60 00 cmp %g1, 0 400089f4: 02 80 00 07 be 40008a10 <_Workspace_Handler_initialization+0x50> 400089f8: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, size ); 400089fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008a00: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008a04: 40 00 0f ed call 4000c9b8 <== NOT EXECUTED 40008a08: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 40008a0c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008a10: 94 10 00 19 mov %i1, %o2 40008a14: 11 10 00 5f sethi %hi(0x40017c00), %o0 40008a18: 96 10 20 08 mov 8, %o3 40008a1c: 7f ff f6 62 call 400063a4 <_Heap_Initialize> 40008a20: 90 12 22 54 or %o0, 0x254, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 40008a24: 80 a2 20 00 cmp %o0, 0 40008a28: 12 80 00 05 bne 40008a3c <_Workspace_Handler_initialization+0x7c> 40008a2c: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 40008a30: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 40008a34: 7f ff f6 e6 call 400065cc <_Internal_error_Occurred> 40008a38: 01 00 00 00 nop 40008a3c: 81 c7 e0 08 ret 40008a40: 81 e8 00 00 restore 40006b48 : 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 ) { 40006b48: 9d e3 bf 98 save %sp, -104, %sp 40006b4c: 92 10 00 19 mov %i1, %o1 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40006b50: 80 a6 60 00 cmp %i1, 0 40006b54: 02 80 00 3f be 40006c50 40006b58: a0 10 00 18 mov %i0, %l0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40006b5c: 80 a6 a0 00 cmp %i2, 0 40006b60: 02 80 00 3c be 40006c50 40006b64: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006b68: c2 06 40 00 ld [ %i1 ], %g1 40006b6c: 80 a0 60 00 cmp %g1, 0 40006b70: 32 80 00 07 bne,a 40006b8c 40006b74: c0 26 80 00 clr [ %i2 ] 40006b78: c2 06 60 04 ld [ %i1 + 4 ], %g1 40006b7c: 80 a0 60 00 cmp %g1, 0 40006b80: 02 80 00 34 be 40006c50 40006b84: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40006b88: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006b8c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006b90: c8 00 60 e0 ld [ %g1 + 0xe0 ], %g4 ! 4001bce0 <_IO_Number_of_drivers> 40006b94: 80 a4 00 04 cmp %l0, %g4 40006b98: 1a 80 00 31 bcc 40006c5c 40006b9c: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40006ba0: 80 a4 20 00 cmp %l0, 0 40006ba4: 12 80 00 18 bne 40006c04 40006ba8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40006bac: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 ! 4001bce4 <_IO_Driver_address_table> 40006bb0: 85 29 20 03 sll %g4, 3, %g2 40006bb4: 83 29 20 05 sll %g4, 5, %g1 40006bb8: a0 01 3f ff add %g4, -1, %l0 40006bbc: 82 20 40 02 sub %g1, %g2, %g1 40006bc0: 82 00 7f e8 add %g1, -24, %g1 40006bc4: 10 80 00 0b b 40006bf0 40006bc8: 86 00 c0 01 add %g3, %g1, %g3 if ( !_IO_Driver_address_table[major].initialization_entry && 40006bcc: 80 a0 60 00 cmp %g1, 0 40006bd0: 32 80 00 07 bne,a 40006bec 40006bd4: a0 04 3f ff add %l0, -1, %l0 40006bd8: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40006bdc: 80 a0 60 00 cmp %g1, 0 40006be0: 02 80 00 09 be 40006c04 40006be4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40006be8: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED 40006bec: 86 00 ff e8 add %g3, -24, %g3 40006bf0: 80 a4 20 00 cmp %l0, 0 40006bf4: 32 bf ff f6 bne,a 40006bcc 40006bf8: c2 00 c0 00 ld [ %g3 ], %g1 40006bfc: 81 c7 e0 08 ret 40006c00: 91 e8 20 05 restore %g0, 5, %o0 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40006c04: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 40006c08: 85 2c 20 03 sll %l0, 3, %g2 40006c0c: 83 2c 20 05 sll %l0, 5, %g1 40006c10: 82 20 40 02 sub %g1, %g2, %g1 40006c14: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 40006c18: 80 a0 a0 00 cmp %g2, 0 40006c1c: 12 80 00 0f bne 40006c58 40006c20: 90 00 c0 01 add %g3, %g1, %o0 40006c24: c2 02 20 04 ld [ %o0 + 4 ], %g1 40006c28: 80 a0 60 00 cmp %g1, 0 40006c2c: 32 80 00 0c bne,a 40006c5c 40006c30: 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; 40006c34: 40 00 1b 11 call 4000d878 40006c38: 94 10 20 18 mov 0x18, %o2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006c3c: 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; 40006c40: e0 26 80 00 st %l0, [ %i2 ] return rtems_io_initialize( major, 0, NULL ); 40006c44: b2 10 20 00 clr %i1 40006c48: 7f ff ff 4f call 40006984 40006c4c: 95 e8 20 00 restore %g0, 0, %o2 40006c50: 81 c7 e0 08 ret 40006c54: 91 e8 20 09 restore %g0, 9, %o0 40006c58: b0 10 20 0c mov 0xc, %i0 } 40006c5c: 81 c7 e0 08 ret 40006c60: 81 e8 00 00 restore 40007ef8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40007ef8: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40007efc: 80 a6 20 00 cmp %i0, 0 40007f00: 02 80 00 1d be 40007f74 40007f04: 03 10 00 90 sethi %hi(0x40024000), %g1 return; 40007f08: a4 10 62 74 or %g1, 0x274, %l2 ! 40024274 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40007f0c: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40007f10: c2 04 80 00 ld [ %l2 ], %g1 40007f14: 80 a0 60 00 cmp %g1, 0 40007f18: 22 80 00 14 be,a 40007f68 40007f1c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40007f20: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40007f24: 80 a4 60 00 cmp %l1, 0 40007f28: 12 80 00 0b bne 40007f54 40007f2c: a0 10 20 01 mov 1, %l0 for ( i=1 ; i <= information->maximum ; i++ ) { 40007f30: 10 80 00 0e b 40007f68 <== NOT EXECUTED 40007f34: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40007f38: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 40007f3c: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 40007f40: 80 a2 20 00 cmp %o0, 0 40007f44: 02 80 00 04 be 40007f54 40007f48: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40007f4c: 9f c6 00 00 call %i0 40007f50: 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++ ) { 40007f54: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40007f58: 80 a4 00 01 cmp %l0, %g1 40007f5c: 08 bf ff f7 bleu 40007f38 40007f60: 91 2c 20 02 sll %l0, 2, %o0 40007f64: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40007f68: 80 a4 80 13 cmp %l2, %l3 40007f6c: 32 bf ff ea bne,a 40007f14 40007f70: c2 04 80 00 ld [ %l2 ], %g1 40007f74: 81 c7 e0 08 ret 40007f78: 81 e8 00 00 restore 4000e9d0 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 4000e9d0: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 4000e9d4: a2 96 20 00 orcc %i0, 0, %l1 4000e9d8: 02 80 00 14 be 4000ea28 4000e9dc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000e9e0: 80 a7 20 00 cmp %i4, 0 4000e9e4: 02 80 00 24 be 4000ea74 4000e9e8: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 4000e9ec: 80 88 60 07 btst 7, %g1 4000e9f0: 12 80 00 0e bne 4000ea28 4000e9f4: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e9f8: 05 10 00 c6 sethi %hi(0x40031800), %g2 4000e9fc: c2 00 a1 90 ld [ %g2 + 0x190 ], %g1 ! 40031990 <_Thread_Dispatch_disable_level> 4000ea00: 82 00 60 01 inc %g1 4000ea04: c2 20 a1 90 st %g1, [ %g2 + 0x190 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 4000ea08: 21 10 00 c5 sethi %hi(0x40031400), %l0 4000ea0c: 40 00 13 b9 call 400138f0 <_Objects_Allocate> 4000ea10: 90 14 23 0c or %l0, 0x30c, %o0 ! 4003170c <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 4000ea14: 80 a2 20 00 cmp %o0, 0 4000ea18: 32 80 00 06 bne,a 4000ea30 4000ea1c: c4 02 20 08 ld [ %o0 + 8 ], %g2 _Thread_Enable_dispatch(); 4000ea20: 40 00 17 73 call 400147ec <_Thread_Enable_dispatch> 4000ea24: b0 10 20 05 mov 5, %i0 4000ea28: 81 c7 e0 08 ret 4000ea2c: 81 e8 00 00 restore #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000ea30: 82 14 23 0c or %l0, 0x30c, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000ea34: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000ea38: 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; 4000ea3c: 82 06 ff ff add %i3, -1, %g1 4000ea40: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 4000ea44: c4 27 00 00 st %g2, [ %i4 ] 4000ea48: 03 00 00 3f sethi %hi(0xfc00), %g1 4000ea4c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000ea50: 84 08 80 01 and %g2, %g1, %g2 4000ea54: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 4000ea58: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 4000ea5c: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 4000ea60: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 4000ea64: 40 00 17 62 call 400147ec <_Thread_Enable_dispatch> 4000ea68: b0 10 20 00 clr %i0 4000ea6c: 81 c7 e0 08 ret 4000ea70: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 4000ea74: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 4000ea78: 81 c7 e0 08 ret <== NOT EXECUTED 4000ea7c: 81 e8 00 00 restore <== NOT EXECUTED 400065e0 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 400065e0: 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 *) 400065e4: 11 10 00 71 sethi %hi(0x4001c400), %o0 400065e8: 92 10 00 18 mov %i0, %o1 400065ec: 90 12 23 84 or %o0, 0x384, %o0 400065f0: 40 00 08 bd call 400088e4 <_Objects_Get> 400065f4: 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 ) { 400065f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065fc: 80 a0 60 00 cmp %g1, 0 40006600: 12 80 00 64 bne 40006790 40006604: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40006608: 27 10 00 72 sethi %hi(0x4001c800), %l3 4000660c: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40006610: c2 04 e1 c0 ld [ %l3 + 0x1c0 ], %g1 40006614: 80 a0 80 01 cmp %g2, %g1 40006618: 02 80 00 06 be 40006630 4000661c: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 40006620: 40 00 0b 04 call 40009230 <_Thread_Enable_dispatch> 40006624: b0 10 20 17 mov 0x17, %i0 40006628: 81 c7 e0 08 ret 4000662c: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40006630: 12 80 00 0c bne 40006660 40006634: 01 00 00 00 nop switch ( the_period->state ) { 40006638: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 4000663c: 80 a0 60 00 cmp %g1, 0 40006640: 02 80 00 50 be 40006780 40006644: b0 10 20 0b mov 0xb, %i0 40006648: 82 00 7f fd add %g1, -3, %g1 4000664c: 80 a0 60 01 cmp %g1, 1 40006650: 18 80 00 4c bgu 40006780 40006654: 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(); 40006658: 10 80 00 4a b 40006780 4000665c: b0 10 20 06 mov 6, %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40006660: 7f ff f1 59 call 40002bc4 40006664: 01 00 00 00 nop 40006668: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 4000666c: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 40006670: 80 a4 a0 02 cmp %l2, 2 40006674: 02 80 00 1a be 400066dc 40006678: 80 a4 a0 04 cmp %l2, 4 4000667c: 02 80 00 34 be 4000674c 40006680: 80 a4 a0 00 cmp %l2, 0 40006684: 12 80 00 43 bne 40006790 40006688: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 4000668c: 7f ff f1 52 call 40002bd4 40006690: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40006694: 7f ff ff 5e call 4000640c <_Rate_monotonic_Initiate_statistics> 40006698: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000669c: 82 10 20 02 mov 2, %g1 400066a0: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400066a4: 03 10 00 1a sethi %hi(0x40006800), %g1 400066a8: 82 10 62 64 or %g1, 0x264, %g1 ! 40006a64 <_Rate_monotonic_Timeout> the_watchdog->id = id; 400066ac: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066b0: 92 04 60 10 add %l1, 0x10, %o1 400066b4: 11 10 00 72 sethi %hi(0x4001c800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400066b8: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066bc: 90 12 21 e0 or %o0, 0x1e0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400066c0: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400066c4: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 400066c8: f2 24 60 4c st %i1, [ %l1 + 0x4c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400066cc: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066d0: 40 00 10 14 call 4000a720 <_Watchdog_Insert> 400066d4: b0 10 20 00 clr %i0 400066d8: 30 80 00 2a b,a 40006780 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 400066dc: 7f ff ff 68 call 4000647c <_Rate_monotonic_Update_statistics> 400066e0: 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; 400066e4: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 400066e8: 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; 400066ec: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 400066f0: 7f ff f1 39 call 40002bd4 400066f4: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 400066f8: c2 04 e1 c0 ld [ %l3 + 0x1c0 ], %g1 400066fc: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006700: 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; 40006704: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006708: 40 00 0d 3d call 40009bfc <_Thread_Set_state> 4000670c: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40006710: 7f ff f1 2d call 40002bc4 40006714: 01 00 00 00 nop local_state = the_period->state; 40006718: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000671c: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 40006720: 7f ff f1 2d call 40002bd4 40006724: 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 ) 40006728: 80 a4 20 03 cmp %l0, 3 4000672c: 12 80 00 04 bne 4000673c 40006730: d0 04 e1 c0 ld [ %l3 + 0x1c0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006734: 40 00 09 c4 call 40008e44 <_Thread_Clear_state> <== NOT EXECUTED 40006738: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 4000673c: 40 00 0a bd call 40009230 <_Thread_Enable_dispatch> 40006740: b0 10 20 00 clr %i0 40006744: 81 c7 e0 08 ret 40006748: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 4000674c: 7f ff ff 4c call 4000647c <_Rate_monotonic_Update_statistics> 40006750: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40006754: 7f ff f1 20 call 40002bd4 40006758: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000675c: 82 10 20 02 mov 2, %g1 40006760: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006764: 92 04 60 10 add %l1, 0x10, %o1 40006768: 90 12 21 e0 or %o0, 0x1e0, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000676c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40006770: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006774: 40 00 0f eb call 4000a720 <_Watchdog_Insert> 40006778: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4000677c: b0 10 20 06 mov 6, %i0 40006780: 40 00 0a ac call 40009230 <_Thread_Enable_dispatch> 40006784: 01 00 00 00 nop 40006788: 81 c7 e0 08 ret 4000678c: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40006790: 81 c7 e0 08 ret 40006794: 91 e8 20 04 restore %g0, 4, %o0 4000ff78 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 4000ff78: 9d e3 bf 90 save %sp, -112, %sp 4000ff7c: 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 ) 4000ff80: 80 a6 60 00 cmp %i1, 0 4000ff84: 02 80 00 2c be 40010034 4000ff88: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4000ff8c: 03 10 00 c6 sethi %hi(0x40031800), %g1 4000ff90: 40 00 08 f4 call 40012360 <_API_Mutex_Lock> 4000ff94: d0 00 62 48 ld [ %g1 + 0x248 ], %o0 ! 40031a48 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4000ff98: 92 10 00 10 mov %l0, %o1 4000ff9c: 11 10 00 c5 sethi %hi(0x40031400), %o0 4000ffa0: 94 07 bf f0 add %fp, -16, %o2 4000ffa4: 40 00 0f ad call 40013e58 <_Objects_Get_no_protection> 4000ffa8: 90 12 23 cc or %o0, 0x3cc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4000ffac: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000ffb0: 80 a0 60 00 cmp %g1, 0 4000ffb4: 02 80 00 05 be 4000ffc8 4000ffb8: a0 10 00 08 mov %o0, %l0 4000ffbc: 80 a0 60 01 cmp %g1, 1 4000ffc0: 10 80 00 0f b 4000fffc 4000ffc4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 4000ffc8: 92 10 00 19 mov %i1, %o1 4000ffcc: 94 10 00 1a mov %i2, %o2 4000ffd0: 90 02 20 68 add %o0, 0x68, %o0 4000ffd4: 96 07 bf f4 add %fp, -12, %o3 4000ffd8: 40 00 0b e3 call 40012f64 <_Heap_Extend> 4000ffdc: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4000ffe0: 80 a2 20 01 cmp %o0, 1 4000ffe4: 02 80 00 12 be 4001002c 4000ffe8: 03 10 00 c6 sethi %hi(0x40031800), %g1 4000ffec: 0a 80 00 08 bcs 4001000c 4000fff0: c6 07 bf f4 ld [ %fp + -12 ], %g3 4000fff4: 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; 4000fff8: b0 10 20 18 mov 0x18, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4000fffc: 32 80 00 0b bne,a 40010028 40010000: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010004: 10 80 00 0a b 4001002c 40010008: 03 10 00 c6 sethi %hi(0x40031800), %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 4001000c: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 40010010: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010014: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40010018: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 4001001c: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 40010020: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40010024: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010028: 03 10 00 c6 sethi %hi(0x40031800), %g1 4001002c: 40 00 08 e3 call 400123b8 <_API_Mutex_Unlock> 40010030: d0 00 62 48 ld [ %g1 + 0x248 ], %o0 ! 40031a48 <_RTEMS_Allocator_Mutex> return return_status; } 40010034: 81 c7 e0 08 ret 40010038: 81 e8 00 00 restore 40010340 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 40010340: 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 ) 40010344: 80 a6 e0 00 cmp %i3, 0 40010348: 02 80 00 32 be 40010410 4001034c: 21 10 00 c6 sethi %hi(0x40031800), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 40010350: 40 00 08 04 call 40012360 <_API_Mutex_Lock> 40010354: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 ! 40031a48 <_RTEMS_Allocator_Mutex> 40010358: 92 10 00 18 mov %i0, %o1 4001035c: 11 10 00 c5 sethi %hi(0x40031400), %o0 40010360: 94 07 bf f0 add %fp, -16, %o2 40010364: 40 00 0e bd call 40013e58 <_Objects_Get_no_protection> 40010368: 90 12 23 cc or %o0, 0x3cc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001036c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40010370: 80 a0 60 00 cmp %g1, 0 40010374: 02 80 00 0b be 400103a0 40010378: b0 10 00 08 mov %o0, %i0 4001037c: 82 18 60 01 xor %g1, 1, %g1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010380: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40010384: 80 a0 00 01 cmp %g0, %g1 40010388: 82 40 3f ff addx %g0, -1, %g1 4001038c: b0 08 7f eb and %g1, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010390: 40 00 08 0a call 400123b8 <_API_Mutex_Unlock> 40010394: b0 06 20 19 add %i0, 0x19, %i0 40010398: 81 c7 e0 08 ret 4001039c: 81 e8 00 00 restore case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 400103a0: 94 10 00 1a mov %i2, %o2 400103a4: 92 10 00 19 mov %i1, %o1 400103a8: 90 02 20 68 add %o0, 0x68, %o0 400103ac: 96 07 bf ec add %fp, -20, %o3 400103b0: 40 00 0c 6d call 40013564 <_Heap_Resize_block> 400103b4: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 400103b8: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 400103bc: b4 92 20 00 orcc %o0, 0, %i2 400103c0: 12 80 00 0b bne 400103ec 400103c4: c2 26 c0 00 st %g1, [ %i3 ] 400103c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400103cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400103d0: 02 80 00 08 be 400103f0 <== NOT EXECUTED 400103d4: 03 10 00 c6 sethi %hi(0x40031800), %g1 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 400103d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400103dc: 40 00 1f 71 call 400181a0 <_Region_Process_queue> <== NOT EXECUTED 400103e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400103e4: 81 c7 e0 08 ret <== NOT EXECUTED 400103e8: 81 e8 00 00 restore <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 400103ec: 03 10 00 c6 sethi %hi(0x40031800), %g1 400103f0: d0 00 62 48 ld [ %g1 + 0x248 ], %o0 ! 40031a48 <_RTEMS_Allocator_Mutex> 400103f4: 40 00 07 f1 call 400123b8 <_API_Mutex_Unlock> 400103f8: b0 10 20 00 clr %i0 return 400103fc: 80 a6 a0 00 cmp %i2, 0 40010400: 02 bf ff e6 be 40010398 40010404: 80 a6 a0 01 cmp %i2, 1 40010408: 02 bf ff e4 be 40010398 4001040c: b0 10 20 0d mov 0xd, %i0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 40010410: b0 10 20 09 mov 9, %i0 } 40010414: 81 c7 e0 08 ret 40010418: 81 e8 00 00 restore 40005150 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40005150: 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 ) ) 40005154: a4 96 20 00 orcc %i0, 0, %l2 40005158: 02 80 00 23 be 400051e4 4000515c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40005160: 80 a7 20 00 cmp %i4, 0 40005164: 02 80 00 20 be 400051e4 40005168: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4000516c: 84 8e a0 c0 andcc %i2, 0xc0, %g2 40005170: 02 80 00 0d be 400051a4 40005174: 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); 40005178: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4000517c: 80 a0 60 10 cmp %g1, 0x10 40005180: 02 80 00 04 be 40005190 40005184: 80 a0 60 20 cmp %g1, 0x20 40005188: 32 80 00 17 bne,a 400051e4 4000518c: b0 10 20 0b mov 0xb, %i0 40005190: 80 8e a0 04 btst 4, %i2 40005194: 02 80 00 64 be 40005324 40005198: 80 a0 a0 c0 cmp %g2, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4000519c: 02 80 00 62 be 40005324 400051a0: 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 ) ) 400051a4: 02 80 00 04 be 400051b4 400051a8: 80 a6 60 01 cmp %i1, 1 400051ac: 18 80 00 0e bgu 400051e4 400051b0: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400051b4: 03 10 00 5f sethi %hi(0x40017c00), %g1 400051b8: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40017e30 <_Thread_Dispatch_disable_level> 400051bc: 84 00 a0 01 inc %g2 400051c0: c4 20 62 30 st %g2, [ %g1 + 0x230 ] * 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 ); 400051c4: 11 10 00 5f sethi %hi(0x40017c00), %o0 400051c8: 40 00 05 30 call 40006688 <_Objects_Allocate> 400051cc: 90 12 20 f4 or %o0, 0xf4, %o0 ! 40017cf4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 400051d0: a0 92 20 00 orcc %o0, 0, %l0 400051d4: 12 80 00 06 bne 400051ec 400051d8: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 400051dc: 40 00 08 d8 call 4000753c <_Thread_Enable_dispatch> 400051e0: b0 10 20 05 mov 5, %i0 400051e4: 81 c7 e0 08 ret 400051e8: 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 ) ) { 400051ec: 02 80 00 33 be 400052b8 400051f0: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 400051f4: 80 8e a0 40 btst 0x40, %i2 400051f8: 12 80 00 06 bne 40005210 400051fc: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 40005200: 80 8e a0 80 btst 0x80, %i2 40005204: 02 80 00 05 be 40005218 40005208: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 4000520c: 82 10 20 03 mov 3, %g1 40005210: 10 80 00 05 b 40005224 40005214: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 40005218: 12 bf ff fe bne 40005210 4000521c: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 40005220: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 40005224: 80 a4 60 10 cmp %l1, 0x10 40005228: 12 80 00 0f bne 40005264 4000522c: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40005230: c2 07 bf e8 ld [ %fp + -24 ], %g1 40005234: 80 a0 60 01 cmp %g1, 1 40005238: 08 80 00 07 bleu 40005254 4000523c: c0 27 bf e0 clr [ %fp + -32 ] 40005240: 80 a0 60 03 cmp %g1, 3 40005244: 38 80 00 0b bgu,a 40005270 40005248: 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; 4000524c: 10 80 00 04 b 4000525c 40005250: 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; 40005254: 10 80 00 06 b 4000526c 40005258: 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; 4000525c: 10 80 00 04 b 4000526c 40005260: 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; 40005264: 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; 40005268: 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( 4000526c: 82 1e 60 01 xor %i1, 1, %g1 40005270: 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; 40005274: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40005278: 94 60 3f ff subx %g0, -1, %o2 4000527c: 90 04 20 14 add %l0, 0x14, %o0 40005280: 40 00 03 03 call 40005e8c <_CORE_mutex_Initialize> 40005284: 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 ) { 40005288: 80 a2 20 06 cmp %o0, 6 4000528c: 32 80 00 19 bne,a 400052f0 40005290: 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 ); 40005294: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40005298: 11 10 00 5f sethi %hi(0x40017c00), %o0 <== NOT EXECUTED 4000529c: 90 12 20 f4 or %o0, 0xf4, %o0 ! 40017cf4 <_Semaphore_Information> <== NOT EXECUTED 400052a0: 40 00 05 e7 call 40006a3c <_Objects_Free> <== NOT EXECUTED 400052a4: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 400052a8: 40 00 08 a5 call 4000753c <_Thread_Enable_dispatch> <== NOT EXECUTED 400052ac: 01 00 00 00 nop <== NOT EXECUTED 400052b0: 81 c7 e0 08 ret <== NOT EXECUTED 400052b4: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 400052b8: 80 8e a0 04 btst 4, %i2 400052bc: 22 80 00 04 be,a 400052cc 400052c0: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400052c4: 82 10 20 01 mov 1, %g1 400052c8: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400052cc: 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; 400052d0: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400052d4: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400052d8: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400052dc: 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( 400052e0: 90 04 20 14 add %l0, 0x14, %o0 400052e4: 40 00 03 c1 call 400061e8 <_CORE_semaphore_Initialize> 400052e8: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400052ec: c4 04 20 08 ld [ %l0 + 8 ], %g2 400052f0: 03 10 00 5f sethi %hi(0x40017c00), %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 400052f4: e4 24 20 0c st %l2, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400052f8: c6 00 61 10 ld [ %g1 + 0x110 ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 400052fc: c4 27 00 00 st %g2, [ %i4 ] 40005300: 03 00 00 3f sethi %hi(0xfc00), %g1 40005304: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005308: 84 08 80 01 and %g2, %g1, %g2 4000530c: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40005310: b0 10 20 00 clr %i0 40005314: 40 00 08 8a call 4000753c <_Thread_Enable_dispatch> 40005318: e0 20 c0 02 st %l0, [ %g3 + %g2 ] 4000531c: 81 c7 e0 08 ret 40005320: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 40005324: b0 10 20 0b mov 0xb, %i0 } 40005328: 81 c7 e0 08 ret 4000532c: 81 e8 00 00 restore 40021ac8 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40021ac8: 9d e3 bf 90 save %sp, -112, %sp 40021acc: 11 10 01 6c sethi %hi(0x4005b000), %o0 40021ad0: 92 10 00 18 mov %i0, %o1 40021ad4: 90 12 23 00 or %o0, 0x300, %o0 40021ad8: 7f ff a4 c8 call 4000adf8 <_Objects_Get> 40021adc: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40021ae0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40021ae4: 80 a0 60 00 cmp %g1, 0 40021ae8: 12 80 00 0f bne 40021b24 40021aec: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40021af0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40021af4: 80 88 60 30 btst 0x30, %g1 40021af8: 02 80 00 06 be 40021b10 40021afc: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 40021b00: 92 10 20 00 clr %o1 40021b04: 7f ff a0 f9 call 40009ee8 <_CORE_mutex_Flush> 40021b08: 94 10 20 01 mov 1, %o2 40021b0c: 30 80 00 04 b,a 40021b1c &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40021b10: 92 10 20 00 clr %o1 <== NOT EXECUTED 40021b14: 7f ff a1 cc call 4000a244 <_CORE_semaphore_Flush> <== NOT EXECUTED 40021b18: 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(); 40021b1c: 7f ff a7 0e call 4000b754 <_Thread_Enable_dispatch> 40021b20: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40021b24: 81 c7 e0 08 ret 40021b28: 81 e8 00 00 restore 400156d0 : */ void rtems_shutdown_executive( uint32_t result ) { 400156d0: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 400156d4: 05 10 00 5f sethi %hi(0x40017c00), %g2 400156d8: c2 00 a3 d4 ld [ %g2 + 0x3d4 ], %g1 ! 40017fd4 <_System_state_Current> 400156dc: 80 a0 60 04 cmp %g1, 4 400156e0: 02 80 00 07 be 400156fc 400156e4: 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 ); 400156e8: 13 10 00 5f sethi %hi(0x40017c00), %o1 400156ec: c2 20 a3 d4 st %g1, [ %g2 + 0x3d4 ] 400156f0: 92 12 61 a8 or %o1, 0x1a8, %o1 400156f4: 7f ff cc d4 call 40008a44 <_CPU_Context_switch> 400156f8: 90 07 bf 70 add %fp, -144, %o0 400156fc: 81 c7 e0 08 ret <== NOT EXECUTED 40015700: 81 e8 00 00 restore <== NOT EXECUTED 40011354 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011354: 9d e3 bf 90 save %sp, -112, %sp 40011358: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 4001135c: 80 a6 60 00 cmp %i1, 0 40011360: 02 80 00 1c be 400113d0 40011364: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40011368: 80 a6 a0 00 cmp %i2, 0 4001136c: 02 80 00 19 be 400113d0 40011370: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40011374: 11 10 00 c7 sethi %hi(0x40031c00), %o0 40011378: 92 10 00 12 mov %l2, %o1 4001137c: 90 12 20 b0 or %o0, 0xb0, %o0 40011380: 40 00 0a c8 call 40013ea0 <_Objects_Get> 40011384: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40011388: c2 07 bf f4 ld [ %fp + -12 ], %g1 4001138c: a0 10 00 08 mov %o0, %l0 40011390: 80 a0 60 00 cmp %g1, 0 40011394: 12 80 00 0f bne 400113d0 40011398: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 4001139c: a2 02 20 10 add %o0, 0x10, %l1 400113a0: 40 00 13 18 call 40016000 <_Watchdog_Remove> 400113a4: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 400113a8: 7f ff e8 3b call 4000b494 400113ac: 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 ) { 400113b0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 400113b4: 80 a0 60 00 cmp %g1, 0 400113b8: 22 80 00 08 be,a 400113d8 400113bc: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 400113c0: 7f ff e8 39 call 4000b4a4 <== NOT EXECUTED 400113c4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400113c8: 40 00 0d 09 call 400147ec <_Thread_Enable_dispatch> <== NOT EXECUTED 400113cc: 01 00 00 00 nop <== NOT EXECUTED 400113d0: 81 c7 e0 08 ret 400113d4: 81 e8 00 00 restore void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 400113d8: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400113dc: 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; 400113e0: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400113e4: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 400113e8: 7f ff e8 2f call 4000b4a4 400113ec: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400113f0: 92 10 00 11 mov %l1, %o1 400113f4: 11 10 00 c6 sethi %hi(0x40031800), %o0 400113f8: 90 12 22 70 or %o0, 0x270, %o0 ! 40031a70 <_Watchdog_Ticks_chain> 400113fc: 40 00 12 a7 call 40015e98 <_Watchdog_Insert> 40011400: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 40011404: 40 00 0c fa call 400147ec <_Thread_Enable_dispatch> 40011408: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4001140c: 81 c7 e0 08 ret 40011410: 81 e8 00 00 restore 40011818 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 40011818: 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 ) && 4001181c: 80 a6 20 00 cmp %i0, 0 40011820: 02 80 00 06 be 40011838 40011824: 82 10 20 00 clr %g1 40011828: 03 10 00 b2 sethi %hi(0x4002c800), %g1 4001182c: c2 08 61 34 ldub [ %g1 + 0x134 ], %g1 ! 4002c934 40011830: 80 a0 40 18 cmp %g1, %i0 40011834: 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 ) ) { 40011838: 80 a0 60 00 cmp %g1, 0 4001183c: 12 80 00 06 bne 40011854 40011840: a2 10 00 18 mov %i0, %l1 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 40011844: 80 a6 3f ff cmp %i0, -1 40011848: 12 80 00 56 bne 400119a0 4001184c: 90 10 20 13 mov 0x13, %o0 40011850: a2 10 20 00 clr %l1 40011854: 05 10 00 c6 sethi %hi(0x40031800), %g2 40011858: c2 00 a1 90 ld [ %g2 + 0x190 ], %g1 ! 40031990 <_Thread_Dispatch_disable_level> 4001185c: 82 00 60 01 inc %g1 40011860: c2 20 a1 90 st %g1, [ %g2 + 0x190 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40011864: 31 10 00 b5 sethi %hi(0x4002d400), %i0 initialized = true; 40011868: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 4001186c: e0 0e 20 00 ldub [ %i0 ], %l0 initialized = true; _Thread_Enable_dispatch(); 40011870: 40 00 0b df call 400147ec <_Thread_Enable_dispatch> 40011874: c2 2e 20 00 stb %g1, [ %i0 ] if ( tmpInitialized ) 40011878: 80 a4 20 00 cmp %l0, 0 4001187c: 12 80 00 49 bne 400119a0 40011880: 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); 40011884: 05 10 00 c6 sethi %hi(0x40031800), %g2 40011888: 82 10 a0 ac or %g2, 0xac, %g1 ! 400318ac <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001188c: 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; 40011890: 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); 40011894: 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( 40011898: 92 10 00 11 mov %l1, %o1 4001189c: 94 10 00 19 mov %i1, %o2 400118a0: 19 00 00 20 sethi %hi(0x8000), %o4 400118a4: c2 20 a0 ac st %g1, [ %g2 + 0xac ] 400118a8: 98 16 80 0c or %i2, %o4, %o4 400118ac: 11 15 12 53 sethi %hi(0x54494c00), %o0 400118b0: 96 10 21 00 mov 0x100, %o3 400118b4: 90 12 21 45 or %o0, 0x145, %o0 400118b8: 7f ff fc 77 call 40010a94 400118bc: 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) { 400118c0: 80 a2 20 00 cmp %o0, 0 400118c4: 02 80 00 04 be 400118d4 400118c8: 03 10 00 c6 sethi %hi(0x40031800), %g1 initialized = false; 400118cc: 10 80 00 35 b 400119a0 400118d0: c0 2e 20 00 clrb [ %i0 ] * 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( 400118d4: 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 ) 400118d8: 86 10 60 4c or %g1, 0x4c, %g3 400118dc: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 400118e0: 03 00 00 3f sethi %hi(0xfc00), %g1 400118e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400118e8: 82 0a c0 01 and %o3, %g1, %g1 400118ec: 80 a0 40 02 cmp %g1, %g2 400118f0: 18 80 00 05 bgu 40011904 400118f4: 98 10 20 00 clr %o4 return NULL; return information->local_table[ index ]; 400118f8: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 400118fc: 83 28 60 02 sll %g1, 2, %g1 40011900: d8 00 80 01 ld [ %g2 + %g1 ], %o4 40011904: 1b 10 00 c6 sethi %hi(0x40031800), %o5 40011908: 82 13 60 a0 or %o5, 0xa0, %g1 ! 400318a0 <_Timer_Seconds_chain> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001190c: 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; 40011910: 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); 40011914: 82 00 60 04 add %g1, 4, %g1 40011918: c2 23 60 a0 st %g1, [ %o5 + 0xa0 ] 4001191c: 03 10 00 c7 sethi %hi(0x40031c00), %g1 40011920: 09 10 00 c6 sethi %hi(0x40031800), %g4 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40011924: c0 23 20 6c clr [ %o4 + 0x6c ] 40011928: 84 11 20 8c or %g4, 0x8c, %g2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4001192c: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 40011930: d6 23 20 68 st %o3, [ %o4 + 0x68 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40011934: 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; 40011938: c0 20 a0 04 clr [ %g2 + 4 ] 4001193c: d8 20 60 f4 st %o4, [ %g1 + 0xf4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40011940: 84 00 a0 04 add %g2, 4, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40011944: 07 10 00 51 sethi %hi(0x40014400), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011948: 03 10 00 c6 sethi %hi(0x40031800), %g1 the_watchdog->routine = routine; 4001194c: 86 10 e2 68 or %g3, 0x268, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011950: 82 10 60 b8 or %g1, 0xb8, %g1 the_watchdog->routine = routine; 40011954: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40011958: c4 21 20 8c st %g2, [ %g4 + 0x8c ] 4001195c: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40011960: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011964: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40011968: 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; 4001196c: 05 10 00 c7 sethi %hi(0x40031c00), %g2 40011970: 03 10 00 46 sethi %hi(0x40011800), %g1 40011974: 82 10 61 a8 or %g1, 0x1a8, %g1 ! 400119a8 <_Timer_Server_schedule_operation_method> /* * Start the timer server */ status = rtems_task_start( 40011978: 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; 4001197c: c2 20 a0 f0 st %g1, [ %g2 + 0xf0 ] /* * Start the timer server */ status = rtems_task_start( 40011980: 13 10 00 46 sethi %hi(0x40011800), %o1 40011984: 94 10 20 00 clr %o2 40011988: 7f ff fd 99 call 40010fec 4001198c: 92 12 62 58 or %o1, 0x258, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40011990: 80 a2 20 00 cmp %o0, 0 40011994: 02 80 00 03 be 400119a0 40011998: 03 10 00 b5 sethi %hi(0x4002d400), %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; 4001199c: c0 28 60 00 clrb [ %g1 ] <== NOT EXECUTED } return status; } 400119a0: 81 c7 e0 08 ret 400119a4: 91 e8 00 08 restore %g0, %o0, %o0 4001158c : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 4001158c: 9d e3 bf 90 save %sp, -112, %sp 40011590: 11 10 00 c7 sethi %hi(0x40031c00), %o0 40011594: 92 10 00 18 mov %i0, %o1 40011598: 90 12 20 b0 or %o0, 0xb0, %o0 4001159c: 40 00 0a 41 call 40013ea0 <_Objects_Get> 400115a0: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400115a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400115a8: a0 10 00 08 mov %o0, %l0 400115ac: 80 a0 60 00 cmp %g1, 0 400115b0: 12 80 00 19 bne 40011614 400115b4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400115b8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400115bc: 80 a0 60 01 cmp %g1, 1 400115c0: 22 80 00 0f be,a 400115fc 400115c4: 31 10 00 c7 sethi %hi(0x40031c00), %i0 400115c8: 2a 80 00 06 bcs,a 400115e0 400115cc: a0 02 20 10 add %o0, 0x10, %l0 400115d0: 80 a0 60 04 cmp %g1, 4 400115d4: 18 80 00 1c bgu 40011644 400115d8: 01 00 00 00 nop 400115dc: 30 80 00 16 b,a 40011634 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400115e0: 40 00 12 88 call 40016000 <_Watchdog_Remove> 400115e4: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400115e8: 92 10 00 10 mov %l0, %o1 400115ec: 11 10 00 c6 sethi %hi(0x40031800), %o0 400115f0: 40 00 12 2a call 40015e98 <_Watchdog_Insert> 400115f4: 90 12 22 70 or %o0, 0x270, %o0 ! 40031a70 <_Watchdog_Ticks_chain> 400115f8: 30 80 00 13 b,a 40011644 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 400115fc: c2 06 20 f0 ld [ %i0 + 0xf0 ], %g1 40011600: 80 a0 60 00 cmp %g1, 0 40011604: 12 80 00 06 bne 4001161c 40011608: 01 00 00 00 nop _Thread_Enable_dispatch(); 4001160c: 40 00 0c 78 call 400147ec <_Thread_Enable_dispatch> <== NOT EXECUTED 40011610: b0 10 20 0e mov 0xe, %i0 ! e <== NOT EXECUTED 40011614: 81 c7 e0 08 ret 40011618: 81 e8 00 00 restore return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 4001161c: 40 00 12 79 call 40016000 <_Watchdog_Remove> 40011620: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40011624: c2 06 20 f0 ld [ %i0 + 0xf0 ], %g1 40011628: 9f c0 40 00 call %g1 4001162c: 90 10 00 10 mov %l0, %o0 40011630: 30 80 00 05 b,a 40011644 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 40011634: 40 00 0c 6e call 400147ec <_Thread_Enable_dispatch> 40011638: b0 10 20 0b mov 0xb, %i0 4001163c: 81 c7 e0 08 ret 40011640: 81 e8 00 00 restore return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 40011644: 40 00 0c 6a call 400147ec <_Thread_Enable_dispatch> 40011648: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4001164c: 81 c7 e0 08 ret 40011650: 81 e8 00 00 restore 40011654 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011654: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011658: 03 10 00 c7 sethi %hi(0x40031c00), %g1 4001165c: c2 00 60 f4 ld [ %g1 + 0xf4 ], %g1 ! 40031cf4 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011660: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011664: 80 a0 60 00 cmp %g1, 0 40011668: 02 80 00 1e be 400116e0 4001166c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40011670: 80 a6 a0 00 cmp %i2, 0 40011674: 02 80 00 1b be 400116e0 40011678: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001167c: 80 a6 60 00 cmp %i1, 0 40011680: 02 80 00 18 be 400116e0 40011684: b0 10 20 0a mov 0xa, %i0 40011688: 11 10 00 c7 sethi %hi(0x40031c00), %o0 4001168c: 92 10 00 11 mov %l1, %o1 40011690: 90 12 20 b0 or %o0, 0xb0, %o0 40011694: 40 00 0a 03 call 40013ea0 <_Objects_Get> 40011698: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001169c: c2 07 bf f4 ld [ %fp + -12 ], %g1 400116a0: a0 10 00 08 mov %o0, %l0 400116a4: 80 a0 60 00 cmp %g1, 0 400116a8: 12 80 00 0e bne 400116e0 400116ac: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 400116b0: 40 00 12 54 call 40016000 <_Watchdog_Remove> 400116b4: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 400116b8: 7f ff e7 77 call 4000b494 400116bc: 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 ) { 400116c0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 400116c4: 80 a0 60 00 cmp %g1, 0 400116c8: 02 80 00 08 be 400116e8 400116cc: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 400116d0: 7f ff e7 75 call 4000b4a4 <== NOT EXECUTED 400116d4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400116d8: 40 00 0c 45 call 400147ec <_Thread_Enable_dispatch> <== NOT EXECUTED 400116dc: 01 00 00 00 nop <== NOT EXECUTED 400116e0: 81 c7 e0 08 ret 400116e4: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400116e8: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400116ec: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400116f0: 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; 400116f4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400116f8: 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; 400116fc: 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 ); 40011700: 7f ff e7 69 call 4000b4a4 40011704: 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 ); 40011708: 03 10 00 c7 sethi %hi(0x40031c00), %g1 4001170c: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 ! 40031cf0 <_Timer_Server_schedule_operation> 40011710: 9f c0 40 00 call %g1 40011714: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 40011718: 40 00 0c 35 call 400147ec <_Thread_Enable_dispatch> 4001171c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40011720: 81 c7 e0 08 ret 40011724: 81 e8 00 00 restore