40006c58 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40006c58: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006c5c: 03 10 00 64 sethi %hi(0x40019000), %g1 40006c60: e0 00 61 24 ld [ %g1 + 0x124 ], %l0 ! 40019124 <_API_extensions_List> 40006c64: 82 10 61 24 or %g1, 0x124, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006c68: 10 80 00 08 b 40006c88 <_API_extensions_Run_postdriver+0x30> 40006c6c: 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 ) 40006c70: 80 a0 60 00 cmp %g1, 0 40006c74: 22 80 00 05 be,a 40006c88 <_API_extensions_Run_postdriver+0x30> 40006c78: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40006c7c: 9f c0 40 00 call %g1 40006c80: 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 ) { 40006c84: 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 ) ; 40006c88: 80 a4 00 11 cmp %l0, %l1 40006c8c: 32 bf ff f9 bne,a 40006c70 <_API_extensions_Run_postdriver+0x18> 40006c90: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 40006c94: 81 c7 e0 08 ret 40006c98: 81 e8 00 00 restore 40006c9c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40006c9c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006ca0: 03 10 00 64 sethi %hi(0x40019000), %g1 40006ca4: e0 00 61 24 ld [ %g1 + 0x124 ], %l0 ! 40019124 <_API_extensions_List> 40006ca8: 82 10 61 24 or %g1, 0x124, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006cac: 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 ); 40006cb0: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006cb4: 10 80 00 08 b 40006cd4 <_API_extensions_Run_postswitch+0x38> 40006cb8: a2 10 63 a0 or %g1, 0x3a0, %l1 ! 40018fa0 <_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 ) 40006cbc: 80 a0 60 00 cmp %g1, 0 40006cc0: 22 80 00 05 be,a 40006cd4 <_API_extensions_Run_postswitch+0x38> 40006cc4: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40006cc8: 9f c0 40 00 call %g1 40006ccc: 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 ) { 40006cd0: 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 ) ; 40006cd4: 80 a4 00 12 cmp %l0, %l2 40006cd8: 32 bf ff f9 bne,a 40006cbc <_API_extensions_Run_postswitch+0x20> 40006cdc: 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 ); } } 40006ce0: 81 c7 e0 08 ret 40006ce4: 81 e8 00 00 restore 40006c14 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40006c14: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006c18: 03 10 00 64 sethi %hi(0x40019000), %g1 40006c1c: e0 00 61 24 ld [ %g1 + 0x124 ], %l0 ! 40019124 <_API_extensions_List> 40006c20: 82 10 61 24 or %g1, 0x124, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006c24: 10 80 00 08 b 40006c44 <_API_extensions_Run_predriver+0x30> 40006c28: 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 ) 40006c2c: 80 a0 60 00 cmp %g1, 0 40006c30: 22 80 00 05 be,a 40006c44 <_API_extensions_Run_predriver+0x30> 40006c34: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40006c38: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006c3c: 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 ) { 40006c40: 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 ) ; 40006c44: 80 a4 00 11 cmp %l0, %l1 40006c48: 32 bf ff f9 bne,a 40006c2c <_API_extensions_Run_predriver+0x18> 40006c4c: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 40006c50: 81 c7 e0 08 ret 40006c54: 81 e8 00 00 restore 40013440 <_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 ) { 40013440: 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 ) { 40013444: 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 ) { 40013448: 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 ) { 4001344c: 80 a6 80 01 cmp %i2, %g1 40013450: 18 80 00 17 bgu 400134ac <_CORE_message_queue_Broadcast+0x6c> 40013454: 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 ) { 40013458: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 4001345c: 80 a0 60 00 cmp %g1, 0 40013460: 02 80 00 0a be 40013488 <_CORE_message_queue_Broadcast+0x48> 40013464: a2 10 20 00 clr %l1 *count = 0; 40013468: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 4001346c: 81 c7 e0 08 ret <== NOT EXECUTED 40013470: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40013474: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40013478: 40 00 1e a7 call 4001af14 4001347c: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40013480: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40013484: 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))) { 40013488: 40 00 09 a0 call 40015b08 <_Thread_queue_Dequeue> 4001348c: 90 10 00 12 mov %l2, %o0 40013490: 92 10 00 19 mov %i1, %o1 40013494: a0 10 00 08 mov %o0, %l0 40013498: 80 a2 20 00 cmp %o0, 0 4001349c: 12 bf ff f6 bne 40013474 <_CORE_message_queue_Broadcast+0x34> 400134a0: 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; 400134a4: e2 27 40 00 st %l1, [ %i5 ] 400134a8: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 400134ac: 81 c7 e0 08 ret 400134b0: 81 e8 00 00 restore 4001583c <_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 ) { 4001583c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 40015840: 03 20 00 00 sethi %hi(0x80000000), %g1 40015844: 80 a6 80 01 cmp %i2, %g1 40015848: 02 80 00 15 be 4001589c <_CORE_message_queue_Insert_message+0x60> 4001584c: f4 26 60 08 st %i2, [ %i1 + 8 ] 40015850: 82 00 7c 00 add %g1, -1024, %g1 40015854: 82 10 63 ff or %g1, 0x3ff, %g1 40015858: 80 a6 80 01 cmp %i2, %g1 4001585c: 12 80 00 1f bne 400158d8 <_CORE_message_queue_Insert_message+0x9c> 40015860: a2 06 20 54 add %i0, 0x54, %l1 case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 40015864: 7f ff b3 30 call 40002524 40015868: 01 00 00 00 nop Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4001586c: e2 26 40 00 st %l1, [ %i1 ] if ( the_message_queue->number_of_pending_messages++ == 0 ) 40015870: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 old_last_node = the_chain->last; 40015874: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 the_chain->last = the_node; 40015878: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 4001587c: 80 a0 00 01 cmp %g0, %g1 old_last_node->next = the_node; the_node->previous = old_last_node; 40015880: 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; 40015884: f2 20 80 00 st %i1, [ %g2 ] 40015888: 82 00 60 01 inc %g1 4001588c: 84 60 3f ff subx %g0, -1, %g2 40015890: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 40015894: a0 10 00 02 mov %g2, %l0 notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 40015898: 30 80 00 27 b,a 40015934 <_CORE_message_queue_Insert_message+0xf8> break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 4001589c: 7f ff b3 22 call 40002524 400158a0: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 400158a4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400158a8: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 400158ac: 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; 400158b0: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400158b4: c2 26 60 04 st %g1, [ %i1 + 4 ] 400158b8: 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; 400158bc: f2 20 e0 04 st %i1, [ %g3 + 4 ] 400158c0: 82 60 3f ff subx %g0, -1, %g1 400158c4: 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; 400158c8: c6 26 40 00 st %g3, [ %i1 ] 400158cc: a0 10 00 01 mov %g1, %l0 400158d0: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 400158d4: 30 80 00 18 b,a 40015934 <_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; 400158d8: 10 80 00 06 b 400158f0 <_CORE_message_queue_Insert_message+0xb4> <== NOT EXECUTED 400158dc: 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 ) { 400158e0: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 400158e4: 14 80 00 06 bg 400158fc <_CORE_message_queue_Insert_message+0xc0> <== NOT EXECUTED 400158e8: 01 00 00 00 nop <== NOT EXECUTED the_node = the_node->next; 400158ec: 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 ) ) { 400158f0: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 400158f4: 32 bf ff fb bne,a 400158e0 <_CORE_message_queue_Insert_message+0xa4> <== NOT EXECUTED 400158f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 400158fc: 7f ff b3 0a call 40002524 <== NOT EXECUTED 40015900: 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 ); 40015904: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 40015908: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4001590c: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40015910: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40015914: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 40015918: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 4001591c: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 40015920: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40015924: 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; 40015928: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 4001592c: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 40015930: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 40015934: 7f ff b3 00 call 40002534 40015938: 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 ) 4001593c: 80 8c 20 ff btst 0xff, %l0 40015940: 02 80 00 08 be 40015960 <_CORE_message_queue_Insert_message+0x124> 40015944: 01 00 00 00 nop 40015948: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 4001594c: 80 a0 60 00 cmp %g1, 0 40015950: 02 80 00 04 be 40015960 <_CORE_message_queue_Insert_message+0x124> 40015954: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 40015958: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001595c: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 40015960: 81 c7 e0 08 ret 40015964: 81 e8 00 00 restore 400129f8 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 400129f8: 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; 400129fc: 27 10 00 9e sethi %hi(0x40027800), %l3 40012a00: e2 04 e2 80 ld [ %l3 + 0x280 ], %l1 ! 40027a80 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40012a04: 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; 40012a08: c0 24 60 34 clr [ %l1 + 0x34 ] _ISR_Disable( level ); 40012a0c: 7f ff be c6 call 40002524 40012a10: a0 10 00 18 mov %i0, %l0 40012a14: 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)); 40012a18: 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)) 40012a1c: 82 06 20 54 add %i0, 0x54, %g1 40012a20: 80 a6 40 01 cmp %i1, %g1 40012a24: 02 80 00 24 be 40012ab4 <_CORE_message_queue_Seize+0xbc> 40012a28: 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; 40012a2c: c2 06 40 00 ld [ %i1 ], %g1 the_chain->first = new_first; 40012a30: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 40012a34: 80 a6 60 00 cmp %i1, 0 40012a38: 02 80 00 1f be 40012ab4 <_CORE_message_queue_Seize+0xbc> 40012a3c: c4 20 60 04 st %g2, [ %g1 + 4 ] the_message_queue->number_of_pending_messages -= 1; 40012a40: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012a44: 82 00 7f ff add %g1, -1, %g1 40012a48: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 40012a4c: 7f ff be ba call 40002534 40012a50: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 40012a54: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 40012a58: c4 04 e2 80 ld [ %l3 + 0x280 ], %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; 40012a5c: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 40012a60: c2 06 60 08 ld [ %i1 + 8 ], %g1 40012a64: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40012a68: 92 10 00 11 mov %l1, %o1 40012a6c: 40 00 13 2b call 40017718 40012a70: 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 ); 40012a74: 7f ff ea b9 call 4000d558 <_Thread_queue_Dequeue> 40012a78: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 40012a7c: 80 a2 20 00 cmp %o0, 0 40012a80: 32 80 00 04 bne,a 40012a90 <_CORE_message_queue_Seize+0x98> 40012a84: 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 ); 40012a88: 7f ff e3 df call 4000ba04 <_Chain_Append> 40012a8c: 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; 40012a90: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 40012a94: 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; 40012a98: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40012a9c: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 40012aa0: 40 00 13 1e call 40017718 <== NOT EXECUTED 40012aa4: 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( 40012aa8: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 40012aac: 40 00 0b 64 call 4001583c <_CORE_message_queue_Insert_message> <== NOT EXECUTED 40012ab0: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 40012ab4: 80 8f 20 ff btst 0xff, %i4 40012ab8: 12 80 00 08 bne 40012ad8 <_CORE_message_queue_Seize+0xe0> 40012abc: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 40012ac0: 7f ff be 9d call 40002534 40012ac4: 90 10 00 03 mov %g3, %o0 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 40012ac8: 82 10 20 04 mov 4, %g1 40012acc: 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 ); } 40012ad0: 81 c7 e0 08 ret 40012ad4: 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; 40012ad8: 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; 40012adc: 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; 40012ae0: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 40012ae4: 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; 40012ae8: 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 ); 40012aec: 90 10 00 03 mov %g3, %o0 40012af0: 7f ff be 91 call 40002534 40012af4: 35 10 00 36 sethi %hi(0x4000d800), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40012af8: b0 10 00 10 mov %l0, %i0 40012afc: b2 10 00 1d mov %i5, %i1 40012b00: 7f ff ea fb call 4000d6ec <_Thread_queue_Enqueue_with_handler> 40012b04: 95 ee a2 b8 restore %i2, 0x2b8, %o2 40012b08: 01 00 00 00 nop 40012b0c <_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 ) { 40012b0c: 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 ) { 40012b10: 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 ) { 40012b14: 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 ) { 40012b18: 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 ) { 40012b1c: 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 ) { 40012b20: 18 80 00 3f bgu 40012c1c <_CORE_message_queue_Submit+0x110> 40012b24: 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 ) { 40012b28: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 40012b2c: 80 a0 60 00 cmp %g1, 0 40012b30: 32 80 00 0f bne,a 40012b6c <_CORE_message_queue_Submit+0x60> 40012b34: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 40012b38: 7f ff ea 88 call 4000d558 <_Thread_queue_Dequeue> 40012b3c: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40012b40: a0 92 20 00 orcc %o0, 0, %l0 40012b44: 02 80 00 09 be 40012b68 <_CORE_message_queue_Submit+0x5c> 40012b48: 92 10 00 19 mov %i1, %o1 40012b4c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40012b50: 40 00 12 f2 call 40017718 40012b54: 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; 40012b58: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40012b5c: 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; 40012b60: 10 80 00 15 b 40012bb4 <_CORE_message_queue_Submit+0xa8> 40012b64: 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 < 40012b68: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40012b6c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40012b70: 80 a0 80 01 cmp %g2, %g1 40012b74: 1a 80 00 12 bcc 40012bbc <_CORE_message_queue_Submit+0xb0> 40012b78: 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 *) 40012b7c: 7f ff e3 ae call 4000ba34 <_Chain_Get> 40012b80: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40012b84: a0 92 20 00 orcc %o0, 0, %l0 40012b88: 02 80 00 27 be 40012c24 <_CORE_message_queue_Submit+0x118> 40012b8c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40012b90: 94 10 00 1a mov %i2, %o2 40012b94: 40 00 12 e1 call 40017718 40012b98: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40012b9c: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40012ba0: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40012ba4: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40012ba8: 92 10 00 10 mov %l0, %o1 40012bac: 40 00 0b 24 call 4001583c <_CORE_message_queue_Insert_message> 40012bb0: 94 10 00 1d mov %i5, %o2 40012bb4: 81 c7 e0 08 ret 40012bb8: 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 ) { 40012bbc: 02 80 00 18 be 40012c1c <_CORE_message_queue_Submit+0x110> 40012bc0: 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() ) { 40012bc4: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 40012bc8: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 40027a5c <_ISR_Nest_level> <== NOT EXECUTED 40012bcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012bd0: 32 80 00 13 bne,a 40012c1c <_CORE_message_queue_Submit+0x110> <== NOT EXECUTED 40012bd4: 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; 40012bd8: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED _ISR_Disable( level ); 40012bdc: 7f ff be 52 call 40002524 <== NOT EXECUTED 40012be0: e0 00 62 80 ld [ %g1 + 0x280 ], %l0 ! 40027a80 <_Thread_Executing> <== NOT EXECUTED 40012be4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40012be8: 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; 40012bec: 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; 40012bf0: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 40012bf4: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 40012bf8: 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; 40012bfc: 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 ); 40012c00: 7f ff be 4d call 40002534 <== NOT EXECUTED 40012c04: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40012c08: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 40012c0c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40012c10: 15 10 00 36 sethi %hi(0x4000d800), %o2 <== NOT EXECUTED 40012c14: 7f ff ea b6 call 4000d6ec <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 40012c18: 94 12 a2 b8 or %o2, 0x2b8, %o2 ! 4000dab8 <_Thread_queue_Timeout> <== NOT EXECUTED 40012c1c: 81 c7 e0 08 ret 40012c20: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 40012c24: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 40012c28: 81 c7 e0 08 ret <== NOT EXECUTED 40012c2c: 81 e8 00 00 restore <== NOT EXECUTED 4000bce8 <_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 ) { 4000bce8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000bcec: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000bcf0: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 40018fa0 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000bcf4: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000bcf8: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000bcfc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000bd00: 80 a0 60 00 cmp %g1, 0 4000bd04: 22 80 00 32 be,a 4000bdcc <_CORE_mutex_Seize_interrupt_trylock+0xe4> 4000bd08: c6 06 20 5c ld [ %i0 + 0x5c ], %g3 the_mutex->lock = CORE_MUTEX_LOCKED; 4000bd0c: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000bd10: 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; 4000bd14: 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; 4000bd18: 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; 4000bd1c: c4 26 20 5c st %g2, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000bd20: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000bd24: 80 a0 e0 02 cmp %g3, 2 4000bd28: 02 80 00 05 be 4000bd3c <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000bd2c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000bd30: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000bd34: 32 80 00 06 bne,a 4000bd4c <_CORE_mutex_Seize_interrupt_trylock+0x64> <== NOT EXECUTED 4000bd38: 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++; 4000bd3c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000bd40: 82 00 60 01 inc %g1 4000bd44: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000bd48: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000bd4c: 80 a0 60 03 cmp %g1, 3 4000bd50: 22 80 00 03 be,a 4000bd5c <_CORE_mutex_Seize_interrupt_trylock+0x74> 4000bd54: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 4000bd58: 30 80 00 2c b,a 4000be08 <_CORE_mutex_Seize_interrupt_trylock+0x120> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000bd5c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000bd60: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000bd64: 12 80 00 03 bne 4000bd70 <_CORE_mutex_Seize_interrupt_trylock+0x88> <== NOT EXECUTED 4000bd68: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 4000bd6c: 30 80 00 27 b,a 4000be08 <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4000bd70: 08 80 00 0f bleu 4000bdac <_CORE_mutex_Seize_interrupt_trylock+0xc4> <== NOT EXECUTED 4000bd74: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000bd78: 05 10 00 63 sethi %hi(0x40018c00), %g2 <== NOT EXECUTED 4000bd7c: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 40018ee0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000bd80: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000bd84: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000bd88: 7f ff d7 f8 call 40001d68 <== NOT EXECUTED 4000bd8c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 4000bd90: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 4000bd94: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 4000bd98: 7f ff f0 62 call 40007f20 <_Thread_Change_priority> <== NOT EXECUTED 4000bd9c: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000bda0: 7f ff f1 d3 call 400084ec <_Thread_Enable_dispatch> <== NOT EXECUTED 4000bda4: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000bda8: 30 80 00 1a b,a 4000be10 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000bdac: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000bdb0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000bdb4: 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; 4000bdb8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000bdbc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000bdc0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000bdc4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000bdc8: 30 80 00 10 b,a 4000be08 <_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 ) ) { 4000bdcc: 80 a0 c0 02 cmp %g3, %g2 4000bdd0: 12 80 00 12 bne 4000be18 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000bdd4: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000bdd8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000bddc: 80 a0 60 00 cmp %g1, 0 4000bde0: 22 80 00 07 be,a 4000bdfc <_CORE_mutex_Seize_interrupt_trylock+0x114> 4000bde4: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000bde8: 80 a0 60 01 cmp %g1, 1 4000bdec: 12 80 00 0b bne 4000be18 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000bdf0: 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; 4000bdf4: 10 80 00 05 b 4000be08 <_CORE_mutex_Seize_interrupt_trylock+0x120> 4000bdf8: 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++; 4000bdfc: 82 00 60 01 inc %g1 4000be00: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000be04: 30 80 00 01 b,a 4000be08 <_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 ); 4000be08: 7f ff d7 d8 call 40001d68 4000be0c: b0 10 20 00 clr %i0 4000be10: 81 c7 e0 08 ret 4000be14: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000be18: 81 c7 e0 08 ret 4000be1c: 91 e8 20 01 restore %g0, 1, %o0 40007014 <_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 ) { 40007014: 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 ) { 40007018: 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 ) { 4000701c: 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 ) { 40007020: 80 a0 60 00 cmp %g1, 0 40007024: 02 80 00 07 be 40007040 <_CORE_mutex_Surrender+0x2c> 40007028: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 4000702c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40007030: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 40018fa0 <_Thread_Executing> 40007034: 80 a2 00 01 cmp %o0, %g1 40007038: 12 80 00 52 bne 40007180 <_CORE_mutex_Surrender+0x16c> 4000703c: 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 ) 40007040: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40007044: 80 a0 60 00 cmp %g1, 0 40007048: 02 80 00 4d be 4000717c <_CORE_mutex_Surrender+0x168> 4000704c: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 40007050: 80 a0 60 00 cmp %g1, 0 40007054: 02 80 00 09 be 40007078 <_CORE_mutex_Surrender+0x64> 40007058: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000705c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40007060: 80 a0 60 00 cmp %g1, 0 40007064: 02 80 00 47 be 40007180 <_CORE_mutex_Surrender+0x16c> 40007068: b0 10 20 00 clr %i0 4000706c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40007070: 02 80 00 44 be 40007180 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 40007074: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 40007078: 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 ) || 4000707c: 80 a0 60 02 cmp %g1, 2 40007080: 02 80 00 04 be 40007090 <_CORE_mutex_Surrender+0x7c> 40007084: 80 a0 60 03 cmp %g1, 3 40007088: 32 80 00 07 bne,a 400070a4 <_CORE_mutex_Surrender+0x90> 4000708c: 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--; 40007090: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007094: 82 00 7f ff add %g1, -1, %g1 40007098: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 4000709c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 400070a0: 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 ) || 400070a4: 80 a0 60 02 cmp %g1, 2 400070a8: 02 80 00 05 be 400070bc <_CORE_mutex_Surrender+0xa8> 400070ac: c0 24 20 60 clr [ %l0 + 0x60 ] 400070b0: 80 a0 60 03 cmp %g1, 3 400070b4: 12 80 00 0d bne 400070e8 <_CORE_mutex_Surrender+0xd4> 400070b8: 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 && 400070bc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400070c0: 80 a0 60 00 cmp %g1, 0 400070c4: 12 80 00 09 bne 400070e8 <_CORE_mutex_Surrender+0xd4> 400070c8: 01 00 00 00 nop 400070cc: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 400070d0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 400070d4: 80 a2 40 01 cmp %o1, %g1 400070d8: 02 80 00 04 be 400070e8 <_CORE_mutex_Surrender+0xd4> 400070dc: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 400070e0: 40 00 03 90 call 40007f20 <_Thread_Change_priority> 400070e4: 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 ) ) ) { 400070e8: 40 00 05 dc call 40008858 <_Thread_queue_Dequeue> 400070ec: 90 10 00 10 mov %l0, %o0 400070f0: 86 92 20 00 orcc %o0, 0, %g3 400070f4: 02 80 00 1f be 40007170 <_CORE_mutex_Surrender+0x15c> 400070f8: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400070fc: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 40007100: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007104: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40007108: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 4000710c: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 40007110: 80 a0 a0 02 cmp %g2, 2 40007114: 02 80 00 07 be 40007130 <_CORE_mutex_Surrender+0x11c> 40007118: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 4000711c: 80 a0 a0 03 cmp %g2, 3 40007120: 12 80 00 18 bne 40007180 <_CORE_mutex_Surrender+0x16c> 40007124: 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++; 40007128: 10 80 00 07 b 40007144 <_CORE_mutex_Surrender+0x130> <== NOT EXECUTED 4000712c: 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++; 40007130: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40007134: 82 00 60 01 inc %g1 40007138: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 4000713c: 81 c7 e0 08 ret 40007140: 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 < 40007144: 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++; 40007148: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000714c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 40007150: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 40007154: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 40007158: 3a 80 00 0a bcc,a 40007180 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 4000715c: b0 10 20 00 clr %i0 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 40007160: 40 00 03 70 call 40007f20 <_Thread_Change_priority> <== NOT EXECUTED 40007164: 94 10 20 00 clr %o2 <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007168: 81 c7 e0 08 ret <== NOT EXECUTED 4000716c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007170: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40007174: 81 c7 e0 08 ret 40007178: 91 e8 20 00 restore %g0, 0, %o0 4000717c: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 40007180: 81 c7 e0 08 ret 40007184: 81 e8 00 00 restore 40023234 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 40023234: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 40023238: 7f ff 82 b3 call 40003d04 <== NOT EXECUTED 4002323c: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40023240: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40023244: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40023248: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 4002324c: 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; 40023250: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 40023254: 7f ff 82 b0 call 40003d14 <== NOT EXECUTED 40023258: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4002325c: 01 00 00 00 nop 4000bbdc <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000bbdc: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED 4000bbe0: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1 ! 40018fa4 <_Debug_Level> <== NOT EXECUTED 4000bbe4: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED 4000bbe8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000bbec: 81 c3 e0 08 retl <== NOT EXECUTED 4000bbf0: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40005eb8 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40005eb8: 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 ]; 40005ebc: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40005ec0: 7f ff ef a6 call 40001d58 40005ec4: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40005ec8: b2 10 00 08 mov %o0, %i1 pending_events = api->pending_events; 40005ecc: c8 04 00 00 ld [ %l0 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40005ed0: 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 ) ) { 40005ed4: 86 88 80 04 andcc %g2, %g4, %g3 40005ed8: 12 80 00 03 bne 40005ee4 <_Event_Surrender+0x2c> 40005edc: 03 10 00 63 sethi %hi(0x40018c00), %g1 _ISR_Enable( level ); 40005ee0: 30 80 00 42 b,a 40005fe8 <_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() && 40005ee4: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 40018f7c <_ISR_Nest_level> 40005ee8: 80 a0 60 00 cmp %g1, 0 40005eec: 22 80 00 1e be,a 40005f64 <_Event_Surrender+0xac> 40005ef0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40005ef4: 03 10 00 63 sethi %hi(0x40018c00), %g1 40005ef8: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 40018fa0 <_Thread_Executing> 40005efc: 80 a6 00 01 cmp %i0, %g1 40005f00: 32 80 00 19 bne,a 40005f64 <_Event_Surrender+0xac> 40005f04: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40005f08: 1b 10 00 64 sethi %hi(0x40019000), %o5 40005f0c: c2 03 61 b4 ld [ %o5 + 0x1b4 ], %g1 ! 400191b4 <_Event_Sync_state> 40005f10: 80 a0 60 01 cmp %g1, 1 40005f14: 02 80 00 07 be 40005f30 <_Event_Surrender+0x78> 40005f18: 80 a0 c0 02 cmp %g3, %g2 40005f1c: c2 03 61 b4 ld [ %o5 + 0x1b4 ], %g1 <== NOT EXECUTED 40005f20: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40005f24: 32 80 00 10 bne,a 40005f64 <_Event_Surrender+0xac> <== NOT EXECUTED 40005f28: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED _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) ) { 40005f2c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40005f30: 02 80 00 04 be 40005f40 <_Event_Surrender+0x88> 40005f34: 80 8c 60 02 btst 2, %l1 40005f38: 02 80 00 0a be 40005f60 <_Event_Surrender+0xa8> <== NOT EXECUTED 40005f3c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40005f40: 82 29 00 03 andn %g4, %g3, %g1 40005f44: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f48: 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; 40005f4c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f50: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005f54: 84 10 20 03 mov 3, %g2 40005f58: 03 10 00 64 sethi %hi(0x40019000), %g1 40005f5c: c4 20 61 b4 st %g2, [ %g1 + 0x1b4 ] ! 400191b4 <_Event_Sync_state> } _ISR_Enable( level ); 40005f60: 30 80 00 22 b,a 40005fe8 <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 40005f64: 80 88 61 00 btst 0x100, %g1 40005f68: 02 80 00 20 be 40005fe8 <_Event_Surrender+0x130> 40005f6c: 80 a0 c0 02 cmp %g3, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 40005f70: 02 80 00 04 be 40005f80 <_Event_Surrender+0xc8> 40005f74: 80 8c 60 02 btst 2, %l1 40005f78: 02 80 00 1c be 40005fe8 <_Event_Surrender+0x130> 40005f7c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 40005f80: 82 29 00 03 andn %g4, %g3, %g1 40005f84: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f88: 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; 40005f8c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f90: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 40005f94: 7f ff ef 75 call 40001d68 40005f98: 90 10 00 19 mov %i1, %o0 40005f9c: 7f ff ef 6f call 40001d58 40005fa0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40005fa4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40005fa8: 80 a0 60 02 cmp %g1, 2 40005fac: 02 80 00 06 be 40005fc4 <_Event_Surrender+0x10c> 40005fb0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005fb4: 7f ff ef 6d call 40001d68 40005fb8: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40005fbc: 10 80 00 08 b 40005fdc <_Event_Surrender+0x124> 40005fc0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40005fc4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 40005fc8: 7f ff ef 68 call 40001d68 40005fcc: 90 10 00 19 mov %i1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005fd0: 40 00 0d fa call 400097b8 <_Watchdog_Remove> 40005fd4: 90 06 20 48 add %i0, 0x48, %o0 40005fd8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40005fdc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005fe0: 40 00 08 48 call 40008100 <_Thread_Clear_state> 40005fe4: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40005fe8: 7f ff ef 60 call 40001d68 40005fec: 91 e8 00 19 restore %g0, %i1, %o0 40005ff0: 01 00 00 00 nop 40005ff4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40005ff4: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 40005ff8: 90 10 00 18 mov %i0, %o0 40005ffc: 40 00 09 49 call 40008520 <_Thread_Get> 40006000: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40006004: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006008: 80 a0 60 00 cmp %g1, 0 4000600c: 12 80 00 0f bne 40006048 <_Event_Timeout+0x54> 40006010: 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 ); 40006014: 7f ff ef 51 call 40001d58 40006018: 01 00 00 00 nop 4000601c: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 40006020: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40006024: 80 a0 60 00 cmp %g1, 0 40006028: 12 80 00 0a bne 40006050 <_Event_Timeout+0x5c> 4000602c: 03 10 00 63 sethi %hi(0x40018c00), %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006030: 05 10 00 63 sethi %hi(0x40018c00), %g2 <== NOT EXECUTED 40006034: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 40018ee0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006038: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000603c: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 40006040: 7f ff ef 4a call 40001d68 <== NOT EXECUTED 40006044: 01 00 00 00 nop <== NOT EXECUTED 40006048: 81 c7 e0 08 ret <== NOT EXECUTED 4000604c: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 40006050: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 40006054: 80 a6 00 01 cmp %i0, %g1 40006058: 12 80 00 09 bne 4000607c <_Event_Timeout+0x88> 4000605c: c0 26 20 24 clr [ %i0 + 0x24 ] Thread_blocking_operation_States sync = _Event_Sync_state; 40006060: 05 10 00 64 sethi %hi(0x40019000), %g2 40006064: c2 00 a1 b4 ld [ %g2 + 0x1b4 ], %g1 ! 400191b4 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40006068: 80 a0 60 01 cmp %g1, 1 4000606c: 18 80 00 05 bgu 40006080 <_Event_Timeout+0x8c> 40006070: 82 10 20 06 mov 6, %g1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40006074: 82 10 20 02 mov 2, %g1 40006078: c2 20 a1 b4 st %g1, [ %g2 + 0x1b4 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4000607c: 82 10 20 06 mov 6, %g1 40006080: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 40006084: 7f ff ef 39 call 40001d68 40006088: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000608c: 90 10 00 18 mov %i0, %o0 40006090: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006094: 40 00 08 1b call 40008100 <_Thread_Clear_state> 40006098: 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; 4000609c: 05 10 00 63 sethi %hi(0x40018c00), %g2 400060a0: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 40018ee0 <_Thread_Dispatch_disable_level> 400060a4: 82 00 7f ff add %g1, -1, %g1 400060a8: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] 400060ac: 81 c7 e0 08 ret 400060b0: 81 e8 00 00 restore 4000a1bc <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000a1bc: 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; 4000a1c0: 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); 4000a1c4: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 4000a1c8: 90 10 00 19 mov %i1, %o0 4000a1cc: 40 00 01 5d call 4000a740 <_Heap_Calc_block_size> 4000a1d0: 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; 4000a1d4: 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) 4000a1d8: ba 92 20 00 orcc %o0, 0, %i5 4000a1dc: 02 80 00 67 be 4000a378 <_Heap_Allocate_aligned+0x1bc> 4000a1e0: 90 10 20 00 clr %o0 return NULL; if(alignment == 0) 4000a1e4: 80 a6 a0 00 cmp %i2, 0 4000a1e8: 22 80 00 02 be,a 4000a1f0 <_Heap_Allocate_aligned+0x34> 4000a1ec: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000a1f0: e2 06 20 08 ld [ %i0 + 8 ], %l1 4000a1f4: 10 80 00 59 b 4000a358 <_Heap_Allocate_aligned+0x19c> 4000a1f8: 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); 4000a1fc: 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. */ 4000a200: 80 a4 c0 1d cmp %l3, %i5 4000a204: 2a 80 00 54 bcs,a 4000a354 <_Heap_Allocate_aligned+0x198> 4000a208: e2 04 60 08 ld [ %l1 + 8 ], %l1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000a20c: 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; 4000a210: ae 04 40 13 add %l1, %l3, %l7 aligned_user_addr = block_end - end_to_user_offs; 4000a214: a0 25 c0 19 sub %l7, %i1, %l0 4000a218: 40 00 3c 7d call 4001940c <.urem> 4000a21c: 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)); 4000a220: 92 10 00 14 mov %l4, %o1 4000a224: a4 24 00 08 sub %l0, %o0, %l2 4000a228: 40 00 3c 79 call 4001940c <.urem> 4000a22c: 90 10 00 12 mov %l2, %o0 4000a230: a0 04 60 08 add %l1, 8, %l0 4000a234: 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) { 4000a238: 80 a0 80 10 cmp %g2, %l0 4000a23c: 2a 80 00 46 bcs,a 4000a354 <_Heap_Allocate_aligned+0x198> 4000a240: 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) { 4000a244: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 4000a248: 82 20 80 10 sub %g2, %l0, %g1 4000a24c: 80 a0 40 16 cmp %g1, %l6 4000a250: 1a 80 00 15 bcc 4000a2a4 <_Heap_Allocate_aligned+0xe8> 4000a254: 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) { 4000a258: 82 24 80 10 sub %l2, %l0, %g1 4000a25c: 80 a0 40 14 cmp %g1, %l4 4000a260: 0a 80 00 10 bcs 4000a2a0 <_Heap_Allocate_aligned+0xe4> 4000a264: 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; 4000a268: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000a26c: 40 00 3c 68 call 4001940c <.urem> <== NOT EXECUTED 4000a270: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED *value = r ? v - r + a : v; 4000a274: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 4000a278: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a27c: 12 80 00 03 bne 4000a288 <_Heap_Allocate_aligned+0xcc> <== NOT EXECUTED 4000a280: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 4000a284: 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) { 4000a288: 82 22 00 10 sub %o0, %l0, %g1 <== NOT EXECUTED 4000a28c: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED 4000a290: 3a 80 00 31 bcc,a 4000a354 <_Heap_Allocate_aligned+0x198> <== NOT EXECUTED 4000a294: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 4000a298: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 4000a29c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000a2a0: 80 a4 a0 00 cmp %l2, 0 4000a2a4: 22 80 00 2c be,a 4000a354 <_Heap_Allocate_aligned+0x198> 4000a2a8: 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; 4000a2ac: 82 05 e0 08 add %l7, 8, %g1 4000a2b0: 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; 4000a2b4: 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) { 4000a2b8: 80 a0 80 16 cmp %g2, %l6 4000a2bc: 2a 80 00 08 bcs,a 4000a2dc <_Heap_Allocate_aligned+0x120> 4000a2c0: 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; 4000a2c4: 82 10 a0 01 or %g2, 1, %g1 4000a2c8: 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); 4000a2cc: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 4000a2d0: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 4000a2d4: 10 80 00 09 b 4000a2f8 <_Heap_Allocate_aligned+0x13c> 4000a2d8: e0 24 60 04 st %l0, [ %l1 + 4 ] ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000a2dc: 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; 4000a2e0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 prev->next = next; next->prev = prev; 4000a2e4: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 4000a2e8: 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; 4000a2ec: c6 20 a0 08 st %g3, [ %g2 + 8 ] 4000a2f0: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 4000a2f4: 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 ); 4000a2f8: 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; 4000a2fc: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000a300: 82 10 60 01 or %g1, 1, %g1 4000a304: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 4000a308: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if(stats->min_free_size > stats->free_size) 4000a30c: 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; 4000a310: 82 20 40 10 sub %g1, %l0, %g1 if(stats->min_free_size > stats->free_size) 4000a314: 80 a0 80 01 cmp %g2, %g1 4000a318: 08 80 00 03 bleu 4000a324 <_Heap_Allocate_aligned+0x168> 4000a31c: c2 26 20 30 st %g1, [ %i0 + 0x30 ] stats->min_free_size = stats->free_size; 4000a320: c2 26 20 34 st %g1, [ %i0 + 0x34 ] stats->used_blocks += 1; 4000a324: 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; 4000a328: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 stats->allocs += 1; 4000a32c: 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; 4000a330: 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; 4000a334: 86 00 e0 01 inc %g3 stats->allocs += 1; 4000a338: 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; 4000a33c: 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; 4000a340: 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; 4000a344: 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; 4000a348: 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; 4000a34c: 10 80 00 07 b 4000a368 <_Heap_Allocate_aligned+0x1ac> 4000a350: 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) 4000a354: 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; 4000a358: 80 a4 40 18 cmp %l1, %i0 4000a35c: 32 bf ff a8 bne,a 4000a1fc <_Heap_Allocate_aligned+0x40> 4000a360: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000a364: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 4000a368: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 4000a36c: 80 a0 40 15 cmp %g1, %l5 4000a370: 2a 80 00 02 bcs,a 4000a378 <_Heap_Allocate_aligned+0x1bc> 4000a374: ea 26 20 44 st %l5, [ %i0 + 0x44 ] stats->max_search = search_count; return user_ptr; } 4000a378: 81 c7 e0 08 ret 4000a37c: 91 e8 00 08 restore %g0, %o0, %o0 4002d7b0 <_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; 4002d7b0: 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; 4002d7b4: 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; 4002d7b8: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 4002d7bc: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 4002d7c0: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 4002d7c4: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; 4002d7c8: 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; 4002d7cc: 10 80 00 23 b 4002d858 <_Heap_Get_information+0xa8> 4002d7d0: 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); 4002d7d4: 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 ); 4002d7d8: 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) ) { 4002d7dc: c2 03 60 04 ld [ %o5 + 4 ], %g1 4002d7e0: 80 88 60 01 btst 1, %g1 4002d7e4: 22 80 00 0d be,a 4002d818 <_Heap_Get_information+0x68> 4002d7e8: c2 02 40 00 ld [ %o1 ], %g1 the_info->Used.number++; 4002d7ec: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.total += the_size; 4002d7f0: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 4002d7f4: 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++; 4002d7f8: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 4002d7fc: 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++; 4002d800: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 4002d804: 80 a0 c0 04 cmp %g3, %g4 4002d808: 1a 80 00 13 bcc 4002d854 <_Heap_Get_information+0xa4> 4002d80c: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 4002d810: 10 80 00 11 b 4002d854 <_Heap_Get_information+0xa4> 4002d814: c8 22 60 10 st %g4, [ %o1 + 0x10 ] } else { the_info->Free.number++; the_info->Free.total += the_size; 4002d818: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 4002d81c: 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++; 4002d820: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 4002d824: 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++; 4002d828: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 4002d82c: 80 a0 c0 04 cmp %g3, %g4 4002d830: 1a 80 00 03 bcc 4002d83c <_Heap_Get_information+0x8c> 4002d834: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 4002d838: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 4002d83c: c2 03 40 00 ld [ %o5 ], %g1 4002d840: 80 a1 00 01 cmp %g4, %g1 4002d844: 02 80 00 05 be 4002d858 <_Heap_Get_information+0xa8> 4002d848: 84 10 00 0d mov %o5, %g2 4002d84c: 81 c3 e0 08 retl <== NOT EXECUTED 4002d850: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4002d854: 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 ) { 4002d858: 80 a0 80 0c cmp %g2, %o4 4002d85c: 32 bf ff de bne,a 4002d7d4 <_Heap_Get_information+0x24> 4002d860: 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; 4002d864: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 4002d868: 90 10 20 00 clr %o0 4002d86c: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 4002d870: 81 c3 e0 08 retl 4002d874: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40016948 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40016948: 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; 4001694c: e8 06 20 14 ld [ %i0 + 0x14 ], %l4 uint32_t const page_size = the_heap->page_size; 40016950: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 *old_mem_size = 0; 40016954: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 40016958: 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); 4001695c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 40016960: 7f ff f6 53 call 400142ac <.urem> 40016964: 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 ); 40016968: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 4001696c: 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); 40016970: 82 06 7f f8 add %i1, -8, %g1 40016974: 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)) 40016978: 80 a4 80 04 cmp %l2, %g4 4001697c: 84 60 3f ff subx %g0, -1, %g2 40016980: 80 a0 c0 12 cmp %g3, %l2 40016984: 82 60 3f ff subx %g0, -1, %g1 40016988: 80 88 80 01 btst %g2, %g1 4001698c: 02 80 00 75 be 40016b60 <_Heap_Resize_block+0x218> 40016990: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 40016994: 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); 40016998: 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 ); 4001699c: 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) || 400169a0: 80 a4 40 04 cmp %l1, %g4 400169a4: 84 60 3f ff subx %g0, -1, %g2 400169a8: 80 a0 c0 11 cmp %g3, %l1 400169ac: 82 60 3f ff subx %g0, -1, %g1 400169b0: 80 88 80 01 btst %g2, %g1 400169b4: 02 80 00 6b be 40016b60 <_Heap_Resize_block+0x218> 400169b8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 400169bc: c2 04 60 04 ld [ %l1 + 4 ], %g1 400169c0: 80 88 60 01 btst 1, %g1 400169c4: 02 80 00 67 be 40016b60 <_Heap_Resize_block+0x218> 400169c8: 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); 400169cc: 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) || 400169d0: 84 10 20 01 mov 1, %g2 400169d4: 02 80 00 04 be 400169e4 <_Heap_Resize_block+0x9c> 400169d8: 82 04 40 18 add %l1, %i0, %g1 400169dc: c2 00 60 04 ld [ %g1 + 4 ], %g1 400169e0: 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) 400169e4: 82 24 40 19 sub %l1, %i1, %g1 400169e8: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 400169ec: 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) || 400169f0: 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) { 400169f4: 80 a6 80 01 cmp %i2, %g1 400169f8: 08 80 00 1e bleu 40016a70 <_Heap_Resize_block+0x128> 400169fc: 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 */ 40016a00: 80 a6 60 00 cmp %i1, 0 40016a04: 12 80 00 59 bne 40016b68 <_Heap_Resize_block+0x220> 40016a08: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40016a0c: 92 10 00 16 mov %l6, %o1 40016a10: 7f ff f6 27 call 400142ac <.urem> 40016a14: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40016a18: 80 a2 20 00 cmp %o0, 0 40016a1c: 02 80 00 05 be 40016a30 <_Heap_Resize_block+0xe8> 40016a20: 80 a4 00 14 cmp %l0, %l4 40016a24: 82 04 00 16 add %l0, %l6, %g1 40016a28: a0 20 40 08 sub %g1, %o0, %l0 40016a2c: 80 a4 00 14 cmp %l0, %l4 40016a30: 1a 80 00 03 bcc 40016a3c <_Heap_Resize_block+0xf4> 40016a34: 90 10 00 10 mov %l0, %o0 40016a38: 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) 40016a3c: 80 a2 00 18 cmp %o0, %i0 40016a40: 18 80 00 4a bgu 40016b68 <_Heap_Resize_block+0x220> 40016a44: 94 10 00 08 mov %o0, %o2 return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 40016a48: 92 10 00 11 mov %l1, %o1 40016a4c: 7f ff c2 a2 call 400074d4 <_Heap_Block_allocate> 40016a50: 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; 40016a54: 90 02 00 15 add %o0, %l5, %o0 40016a58: 90 12 00 1b or %o0, %i3, %o0 40016a5c: d0 24 a0 04 st %o0, [ %l2 + 4 ] --stats->used_blocks; 40016a60: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40016a64: 82 00 7f ff add %g1, -1, %g1 40016a68: 10 80 00 39 b 40016b4c <_Heap_Resize_block+0x204> 40016a6c: 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; 40016a70: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40016a74: 92 10 00 16 mov %l6, %o1 40016a78: 7f ff f6 0d call 400142ac <.urem> 40016a7c: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 40016a80: a0 a4 00 08 subcc %l0, %o0, %l0 40016a84: 22 80 00 33 be,a 40016b50 <_Heap_Resize_block+0x208> 40016a88: 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; 40016a8c: 84 25 40 10 sub %l5, %l0, %g2 if (new_block_size < min_block_size) { 40016a90: 80 a0 80 14 cmp %g2, %l4 40016a94: 1a 80 00 07 bcc 40016ab0 <_Heap_Resize_block+0x168> 40016a98: 80 a6 60 00 cmp %i1, 0 uint32_t delta = min_block_size - new_block_size; 40016a9c: 82 25 00 02 sub %l4, %g2, %g1 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 40016aa0: a0 a4 00 01 subcc %l0, %g1, %l0 40016aa4: 02 80 00 2a be 40016b4c <_Heap_Resize_block+0x204> 40016aa8: 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) { 40016aac: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40016ab0: 12 80 00 15 bne 40016b04 <_Heap_Resize_block+0x1bc> 40016ab4: 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; 40016ab8: 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; 40016abc: 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; 40016ac0: c2 24 a0 04 st %g1, [ %l2 + 4 ] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 40016ac4: 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 ); 40016ac8: 84 04 80 02 add %l2, %g2, %g2 next_next_block->prev_size = new_next_block_size; 40016acc: 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; 40016ad0: 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; 40016ad4: 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; 40016ad8: 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; 40016adc: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 40016ae0: c8 20 a0 08 st %g4, [ %g2 + 8 ] 40016ae4: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 40016ae8: da 20 a0 0c st %o5, [ %g2 + 0xc ] 40016aec: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 40016af0: 86 00 ff fc add %g3, -4, %g3 next->prev = prev->next = block; 40016af4: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40016af8: c4 23 60 08 st %g2, [ %o5 + 8 ] 40016afc: 10 80 00 14 b 40016b4c <_Heap_Resize_block+0x204> 40016b00: c6 27 00 00 st %g3, [ %i4 ] } else if (free_block_size >= min_block_size) { 40016b04: 2a 80 00 13 bcs,a 40016b50 <_Heap_Resize_block+0x208> <== NOT EXECUTED 40016b08: 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; 40016b0c: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 40016b10: 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; 40016b14: 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 ); 40016b18: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 40016b1c: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40016b20: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016b24: 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 */ 40016b28: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016b2c: 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 */ 40016b30: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016b34: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 40016b38: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40016b3c: 7f ff d4 f9 call 4000bf20 <_Heap_Free> <== NOT EXECUTED 40016b40: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 40016b44: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 40016b48: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 40016b4c: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 40016b50: 82 00 60 01 inc %g1 40016b54: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 40016b58: 81 c7 e0 08 ret 40016b5c: 91 e8 20 00 restore %g0, 0, %o0 return HEAP_RESIZE_SUCCESSFUL; 40016b60: 81 c7 e0 08 ret 40016b64: 91 e8 20 02 restore %g0, 2, %o0 } 40016b68: 81 c7 e0 08 ret 40016b6c: 91 e8 20 01 restore %g0, 1, %o0 4000f6c4 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4000f6c4: 9d e3 bf 98 save %sp, -104, %sp 4000f6c8: a6 10 00 18 mov %i0, %l3 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f6cc: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 4000f6d0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f6d4: 16 80 00 03 bge 4000f6e0 <_Heap_Walk+0x1c> 4000f6d8: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 source = the_heap->stats.instance; 4000f6dc: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4000f6e0: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000f6e4: 80 88 60 01 btst 1, %g1 4000f6e8: 12 80 00 07 bne 4000f704 <_Heap_Walk+0x40> 4000f6ec: b0 10 20 00 clr %i0 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 4000f6f0: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f6f4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f6f8: 90 12 22 88 or %o0, 0x288, %o0 <== NOT EXECUTED 4000f6fc: 7f ff db a3 call 40006588 <== NOT EXECUTED 4000f700: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000f704: c4 04 00 00 ld [ %l0 ], %g2 4000f708: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1 4000f70c: 80 a0 80 01 cmp %g2, %g1 4000f710: 22 80 00 5e be,a 4000f888 <_Heap_Walk+0x1c4> 4000f714: 03 10 00 6e sethi %hi(0x4001b800), %g1 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 4000f718: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f71c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f720: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED 4000f724: 7f ff db 99 call 40006588 <== NOT EXECUTED 4000f728: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000f72c: 10 80 00 57 b 4000f888 <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000f730: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f734: 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)) { 4000f738: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3 4000f73c: 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 ); 4000f740: a2 04 00 12 add %l0, %l2, %l1 4000f744: 80 a4 40 01 cmp %l1, %g1 4000f748: 84 60 3f ff subx %g0, -1, %g2 4000f74c: 80 a0 c0 11 cmp %g3, %l1 4000f750: 82 60 3f ff subx %g0, -1, %g1 4000f754: 80 88 80 01 btst %g2, %g1 4000f758: 32 80 00 09 bne,a 4000f77c <_Heap_Walk+0xb8> 4000f75c: 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); 4000f760: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000f764: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f768: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f76c: 7f ff db 87 call 40006588 <== NOT EXECUTED 4000f770: 90 12 22 f8 or %o0, 0x2f8, %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", 4000f774: 10 80 00 51 b 4000f8b8 <_Heap_Walk+0x1f4> <== NOT EXECUTED 4000f778: 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)) { 4000f77c: 80 88 60 01 btst 1, %g1 4000f780: 12 80 00 27 bne 4000f81c <_Heap_Walk+0x158> 4000f784: 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) { 4000f788: c2 04 40 00 ld [ %l1 ], %g1 4000f78c: 80 a4 80 01 cmp %l2, %g1 4000f790: 02 80 00 07 be 4000f7ac <_Heap_Walk+0xe8> 4000f794: 80 8d 20 01 btst 1, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f798: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4000f79c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f7a0: 7f ff db 7a call 40006588 <== NOT EXECUTED 4000f7a4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (!prev_used) { 4000f7a8: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED 4000f7ac: 32 80 00 0c bne,a 4000f7dc <_Heap_Walk+0x118> 4000f7b0: c2 04 e0 08 ld [ %l3 + 8 ], %g1 if (do_dump || error) printk("\n"); 4000f7b4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000f7b8: 02 80 00 05 be 4000f7cc <_Heap_Walk+0x108> <== NOT EXECUTED 4000f7bc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000f7c0: 7f ff db 72 call 40006588 <== NOT EXECUTED 4000f7c4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000f7c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000f7cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f7d0: 7f ff db 6e call 40006588 <== NOT EXECUTED 4000f7d4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000f7d8: 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) 4000f7dc: 80 a0 40 10 cmp %g1, %l0 4000f7e0: 02 80 00 0e be 4000f818 <_Heap_Walk+0x154> 4000f7e4: 80 a0 40 13 cmp %g1, %l3 4000f7e8: 32 bf ff fd bne,a 4000f7dc <_Heap_Walk+0x118> 4000f7ec: c2 00 60 08 ld [ %g1 + 8 ], %g1 block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 4000f7f0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000f7f4: 22 80 00 05 be,a 4000f808 <_Heap_Walk+0x144> <== NOT EXECUTED 4000f7f8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000f7fc: 7f ff db 63 call 40006588 <== NOT EXECUTED 4000f800: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000f804: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000f808: 7f ff db 60 call 40006588 <== NOT EXECUTED 4000f80c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000f810: 10 80 00 06 b 4000f828 <_Heap_Walk+0x164> <== NOT EXECUTED 4000f814: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000f818: 80 a6 20 00 cmp %i0, 0 4000f81c: 22 80 00 06 be,a 4000f834 <_Heap_Walk+0x170> 4000f820: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 4000f824: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000f828: 7f ff db 58 call 40006588 <== NOT EXECUTED 4000f82c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000f830: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED 4000f834: 80 a4 80 01 cmp %l2, %g1 4000f838: 3a 80 00 05 bcc,a 4000f84c <_Heap_Walk+0x188> 4000f83c: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1 printk("PASS: %d !block size is too small\n", source); 4000f840: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f844: 10 80 00 09 b 4000f868 <_Heap_Walk+0x1a4> <== NOT EXECUTED 4000f848: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 4001c7b0 <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 4000f84c: 40 00 26 f0 call 4001940c <.urem> 4000f850: 90 10 00 12 mov %l2, %o0 4000f854: 80 a2 20 00 cmp %o0, 0 4000f858: 02 80 00 08 be 4000f878 <_Heap_Walk+0x1b4> 4000f85c: 80 a6 20 00 cmp %i0, 0 printk("PASS: %d !block size is misaligned\n", source); 4000f860: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f864: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 4001c7d8 <== NOT EXECUTED 4000f868: 7f ff db 48 call 40006588 <== NOT EXECUTED 4000f86c: 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", 4000f870: 10 80 00 12 b 4000f8b8 <_Heap_Walk+0x1f4> <== NOT EXECUTED 4000f874: 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) 4000f878: 12 80 00 10 bne 4000f8b8 <_Heap_Walk+0x1f4> 4000f87c: 96 10 00 16 mov %l6, %o3 break; 4000f880: 10 80 00 09 b 4000f8a4 <_Heap_Walk+0x1e0> 4000f884: a0 10 00 11 mov %l1, %l0 error = 1; } } } if (do_dump || error) printk("\n"); 4000f888: aa 10 63 88 or %g1, 0x388, %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); 4000f88c: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f890: b8 10 63 80 or %g1, 0x380, %i4 ! 4001c780 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); 4000f894: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f898: ba 10 63 50 or %g1, 0x350, %i5 ! 4001c750 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); 4000f89c: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f8a0: ae 10 63 20 or %g1, 0x320, %l7 ! 4001c720 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 ) { 4000f8a4: 80 a4 00 16 cmp %l0, %l6 4000f8a8: 32 bf ff a3 bne,a 4000f734 <_Heap_Walk+0x70> 4000f8ac: 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); 4000f8b0: 10 80 00 09 b 4000f8d4 <_Heap_Walk+0x210> 4000f8b4: 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", 4000f8b8: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000f8bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f8c0: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 4000f8c4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4000f8c8: 7f ff db 30 call 40006588 <== NOT EXECUTED 4000f8cc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000f8d0: 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) { 4000f8d4: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3 4000f8d8: 94 08 7f fe and %g1, -2, %o2 4000f8dc: 80 a2 80 0b cmp %o2, %o3 4000f8e0: 02 80 00 06 be 4000f8f8 <_Heap_Walk+0x234> 4000f8e4: 92 10 00 19 mov %i1, %o1 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 4000f8e8: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000f8ec: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000f8f0: 7f ff db 26 call 40006588 <== NOT EXECUTED 4000f8f4: 90 12 20 40 or %o0, 0x40, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 4000f8f8: 81 c7 e0 08 ret 4000f8fc: 81 e8 00 00 restore 4000770c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 4000770c: 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; 40007710: 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 ) 40007714: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 40007718: 03 00 00 3f sethi %hi(0xfc00), %g1 4000771c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007720: a2 08 80 01 and %g2, %g1, %l1 40007724: 80 a4 00 11 cmp %l0, %l1 40007728: 3a 80 00 06 bcc,a 40007740 <_Objects_Extend_information+0x34> 4000772c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 40007730: aa 10 00 11 mov %l1, %l5 40007734: ae 10 20 00 clr %l7 40007738: 10 80 00 13 b 40007784 <_Objects_Extend_information+0x78> 4000773c: ac 10 20 00 clr %l6 block_count = 0; else { block_count = information->maximum / information->allocation_size; 40007740: 90 10 00 10 mov %l0, %o0 40007744: 92 10 00 12 mov %l2, %o1 40007748: 40 00 32 2d call 40013ffc <.udiv> 4000774c: aa 10 00 11 mov %l1, %l5 40007750: ac 10 20 00 clr %l6 40007754: 10 80 00 09 b 40007778 <_Objects_Extend_information+0x6c> 40007758: ae 10 00 08 mov %o0, %l7 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 4000775c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40007760: c2 00 40 02 ld [ %g1 + %g2 ], %g1 40007764: 80 a0 60 00 cmp %g1, 0 40007768: 02 80 00 08 be 40007788 <_Objects_Extend_information+0x7c> 4000776c: 80 a5 40 10 cmp %l5, %l0 break; else index_base += information->allocation_size; 40007770: 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++ ) { 40007774: ac 05 a0 01 inc %l6 40007778: 80 a5 80 17 cmp %l6, %l7 4000777c: 0a bf ff f8 bcs 4000775c <_Objects_Extend_information+0x50> 40007780: 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 ) { 40007784: 80 a5 40 10 cmp %l5, %l0 40007788: 2a 80 00 5d bcs,a 400078fc <_Objects_Extend_information+0x1f0> 4000778c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 40007790: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007794: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 40007798: ba 04 00 01 add %l0, %g1, %i5 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 4000779c: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 400077a0: a0 05 e0 01 add %l7, 1, %l0 400077a4: 82 07 40 11 add %i5, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 400077a8: 02 80 00 0b be 400077d4 <_Objects_Extend_information+0xc8> 400077ac: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 400077b0: 90 02 00 10 add %o0, %l0, %o0 400077b4: 90 00 40 08 add %g1, %o0, %o0 400077b8: 40 00 08 5b call 40009924 <_Workspace_Allocate> 400077bc: 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 ) 400077c0: a4 92 20 00 orcc %o0, 0, %l2 400077c4: 32 80 00 0a bne,a 400077ec <_Objects_Extend_information+0xe0> 400077c8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400077cc: 81 c7 e0 08 ret <== NOT EXECUTED 400077d0: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 400077d4: 90 02 00 10 add %o0, %l0, %o0 400077d8: 90 00 40 08 add %g1, %o0, %o0 400077dc: 40 00 08 59 call 40009940 <_Workspace_Allocate_or_fatal_error> 400077e0: 91 2a 20 02 sll %o0, 2, %o0 400077e4: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 400077e8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 400077ec: 85 2c 20 02 sll %l0, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 400077f0: 80 a0 40 11 cmp %g1, %l1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 400077f4: a8 04 80 02 add %l2, %g2, %l4 400077f8: a6 05 00 02 add %l4, %g2, %l3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 400077fc: 08 80 00 15 bleu 40007850 <_Objects_Extend_information+0x144> 40007800: 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, 40007804: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 40007808: a1 2d e0 02 sll %l7, 2, %l0 4000780c: 90 10 00 12 mov %l2, %o0 40007810: 40 00 18 1d call 4000d884 40007814: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40007818: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000781c: 94 10 00 10 mov %l0, %o2 40007820: 40 00 18 19 call 4000d884 40007824: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40007828: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 4000782c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40007830: 94 04 40 0a add %l1, %o2, %o2 40007834: 90 10 00 13 mov %l3, %o0 40007838: 40 00 18 13 call 4000d884 4000783c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40007840: 10 80 00 08 b 40007860 <_Objects_Extend_information+0x154> 40007844: 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++ ) { 40007848: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 4000784c: 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++ ) { 40007850: 80 a0 80 11 cmp %g2, %l1 40007854: 2a bf ff fd bcs,a 40007848 <_Objects_Extend_information+0x13c> 40007858: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 4000785c: 83 2d e0 02 sll %l7, 2, %g1 inactive_per_block[block_count] = 0; 40007860: c0 25 00 01 clr [ %l4 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007864: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40007868: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4000786c: 83 2d 60 02 sll %l5, 2, %g1 40007870: 86 05 40 02 add %l5, %g2, %g3 40007874: 84 04 c0 01 add %l3, %g1, %g2 40007878: 10 80 00 04 b 40007888 <_Objects_Extend_information+0x17c> 4000787c: 82 10 00 15 mov %l5, %g1 index++ ) { 40007880: 82 00 60 01 inc %g1 40007884: 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 ); 40007888: 80 a0 40 03 cmp %g1, %g3 4000788c: 2a bf ff fd bcs,a 40007880 <_Objects_Extend_information+0x174> 40007890: c0 20 80 00 clr [ %g2 ] index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40007894: 7f ff e9 31 call 40001d58 40007898: 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( 4000789c: c2 06 00 00 ld [ %i0 ], %g1 400078a0: c8 16 20 04 lduh [ %i0 + 4 ], %g4 400078a4: 87 2f 60 10 sll %i5, 0x10, %g3 400078a8: 89 29 20 1b sll %g4, 0x1b, %g4 400078ac: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 400078b0: 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( 400078b4: 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; 400078b8: e8 26 20 30 st %l4, [ %i0 + 0x30 ] information->local_table = local_table; 400078bc: e6 26 20 1c st %l3, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 400078c0: 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; 400078c4: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 400078c8: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 400078cc: 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( 400078d0: 82 10 40 04 or %g1, %g4, %g1 400078d4: 82 10 40 03 or %g1, %g3, %g1 400078d8: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 400078dc: 7f ff e9 23 call 40001d68 400078e0: 01 00 00 00 nop if ( old_tables ) 400078e4: 80 a4 20 00 cmp %l0, 0 400078e8: 22 80 00 05 be,a 400078fc <_Objects_Extend_information+0x1f0> 400078ec: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 _Workspace_Free( old_tables ); 400078f0: 40 00 08 06 call 40009908 <_Workspace_Free> 400078f4: 90 10 00 10 mov %l0, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 400078f8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 400078fc: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40007900: 80 a0 60 00 cmp %g1, 0 40007904: 02 80 00 0f be 40007940 <_Objects_Extend_information+0x234> 40007908: a1 2d a0 02 sll %l6, 2, %l0 information->object_blocks[ block ] = 4000790c: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 40007910: 40 00 31 81 call 40013f14 <.umul> 40007914: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 40007918: 40 00 08 03 call 40009924 <_Workspace_Allocate> 4000791c: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007920: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40007924: d0 24 40 10 st %o0, [ %l1 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007928: c2 00 40 10 ld [ %g1 + %l0 ], %g1 4000792c: 80 a0 60 00 cmp %g1, 0 40007930: 32 80 00 0b bne,a 4000795c <_Objects_Extend_information+0x250> 40007934: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40007938: 81 c7 e0 08 ret <== NOT EXECUTED 4000793c: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 40007940: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 40007944: 40 00 31 74 call 40013f14 <.umul> 40007948: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 4000794c: 40 00 07 fd call 40009940 <_Workspace_Allocate_or_fatal_error> 40007950: 01 00 00 00 nop 40007954: d0 24 40 10 st %o0, [ %l1 + %l0 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007958: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 4000795c: a5 2d a0 02 sll %l6, 2, %l2 40007960: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40007964: d2 00 40 12 ld [ %g1 + %l2 ], %o1 40007968: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 4000796c: 90 07 bf ec add %fp, -20, %o0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007970: 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 ) { 40007974: a8 10 00 08 mov %o0, %l4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007978: 40 00 10 ce call 4000bcb0 <_Chain_Initialize> 4000797c: 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( 40007980: 10 80 00 0d b 400079b4 <_Objects_Extend_information+0x2a8> 40007984: 27 00 00 40 sethi %hi(0x10000), %l3 40007988: c4 16 20 04 lduh [ %i0 + 4 ], %g2 4000798c: 83 28 60 18 sll %g1, 0x18, %g1 40007990: 85 28 a0 1b sll %g2, 0x1b, %g2 40007994: 82 10 40 13 or %g1, %l3, %g1 40007998: 82 10 40 02 or %g1, %g2, %g1 4000799c: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400079a0: 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( 400079a4: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 400079a8: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400079ac: 7f ff fd 14 call 40006dfc <_Chain_Append> 400079b0: 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 ) { 400079b4: 40 00 10 af call 4000bc70 <_Chain_Get> 400079b8: 90 10 00 14 mov %l4, %o0 400079bc: 80 a2 20 00 cmp %o0, 0 400079c0: 32 bf ff f2 bne,a 40007988 <_Objects_Extend_information+0x27c> 400079c4: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400079c8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400079cc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive += information->allocation_size; 400079d0: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400079d4: c2 20 80 12 st %g1, [ %g2 + %l2 ] information->inactive += information->allocation_size; 400079d8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400079dc: 82 00 40 03 add %g1, %g3, %g1 400079e0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400079e4: 81 c7 e0 08 ret 400079e8: 81 e8 00 00 restore 40007a98 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40007a98: 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 ) 40007a9c: 82 06 3f ff add %i0, -1, %g1 40007aa0: 80 a0 60 03 cmp %g1, 3 40007aa4: 38 80 00 1c bgu,a 40007b14 <_Objects_Get_information+0x7c> 40007aa8: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40007aac: 10 80 00 1c b 40007b1c <_Objects_Get_information+0x84> 40007ab0: 80 a6 60 00 cmp %i1, 0 return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40007ab4: 40 00 11 98 call 4000c114 <_Objects_API_maximum_class> 40007ab8: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40007abc: 80 a2 20 00 cmp %o0, 0 40007ac0: 06 80 00 14 bl 40007b10 <_Objects_Get_information+0x78> 40007ac4: 80 a6 40 08 cmp %i1, %o0 40007ac8: 38 80 00 13 bgu,a 40007b14 <_Objects_Get_information+0x7c> 40007acc: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 40007ad0: 85 2e 20 02 sll %i0, 2, %g2 40007ad4: 03 10 00 63 sethi %hi(0x40018c00), %g1 40007ad8: 82 10 62 40 or %g1, 0x240, %g1 ! 40018e40 <_Objects_Information_table> 40007adc: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40007ae0: 80 a0 a0 00 cmp %g2, 0 40007ae4: 02 80 00 0c be 40007b14 <_Objects_Get_information+0x7c> 40007ae8: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40007aec: 83 2e 60 02 sll %i1, 2, %g1 40007af0: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40007af4: 80 a6 20 00 cmp %i0, 0 40007af8: 02 80 00 07 be 40007b14 <_Objects_Get_information+0x7c> 40007afc: 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 ) 40007b00: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007b04: 80 a0 60 00 cmp %g1, 0 40007b08: 12 80 00 03 bne 40007b14 <_Objects_Get_information+0x7c> 40007b0c: 01 00 00 00 nop 40007b10: b0 10 20 00 clr %i0 ! 0 return NULL; #endif return info; } 40007b14: 81 c7 e0 08 ret 40007b18: 81 e8 00 00 restore int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40007b1c: 22 bf ff fe be,a 40007b14 <_Objects_Get_information+0x7c> 40007b20: b0 10 20 00 clr %i0 40007b24: 30 bf ff e4 b,a 40007ab4 <_Objects_Get_information+0x1c> 40007b28 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 40007b28: 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; 40007b2c: 03 00 00 3f sethi %hi(0xfc00), %g1 40007b30: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 40007b34: 7f ff e8 89 call 40001d58 40007b38: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 40007b3c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007b40: 80 a0 40 19 cmp %g1, %i1 40007b44: 0a 80 00 11 bcs 40007b88 <_Objects_Get_isr_disable+0x60> 40007b48: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 40007b4c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40007b50: f0 00 80 01 ld [ %g2 + %g1 ], %i0 40007b54: 80 a6 20 00 cmp %i0, 0 40007b58: 02 80 00 06 be 40007b70 <_Objects_Get_isr_disable+0x48> 40007b5c: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 40007b60: 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; 40007b64: c0 26 80 00 clr [ %i2 ] 40007b68: 81 c7 e0 08 ret 40007b6c: 81 e8 00 00 restore *level_p = level; return the_object; } _ISR_Enable( level ); 40007b70: 7f ff e8 7e call 40001d68 <== NOT EXECUTED 40007b74: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 40007b78: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40007b7c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 40007b80: 81 c7 e0 08 ret <== NOT EXECUTED 40007b84: 81 e8 00 00 restore <== NOT EXECUTED return NULL; } _ISR_Enable( level ); 40007b88: 7f ff e8 78 call 40001d68 40007b8c: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 40007b90: 82 10 20 01 mov 1, %g1 40007b94: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 40007b98: 81 c7 e0 08 ret 40007b9c: 81 e8 00 00 restore 400130ac <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 400130ac: 9d e3 bf 88 save %sp, -120, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 400130b0: 80 a6 60 00 cmp %i1, 0 400130b4: 22 80 00 41 be,a 400131b8 <_Objects_Get_name_as_string+0x10c> 400130b8: b4 10 20 00 clr %i2 return NULL; if ( name == NULL ) 400130bc: 80 a6 a0 00 cmp %i2, 0 400130c0: 22 80 00 3f be,a 400131bc <_Objects_Get_name_as_string+0x110> 400130c4: b0 10 00 1a mov %i2, %i0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 400130c8: b0 96 20 00 orcc %i0, 0, %i0 400130cc: 12 80 00 04 bne 400130dc <_Objects_Get_name_as_string+0x30> 400130d0: 03 10 00 9e sethi %hi(0x40027800), %g1 400130d4: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 ! 40027a80 <_Thread_Executing> 400130d8: f0 00 60 08 ld [ %g1 + 8 ], %i0 information = _Objects_Get_information_id( tmpId ); 400130dc: 7f ff e5 7a call 4000c6c4 <_Objects_Get_information_id> 400130e0: 90 10 00 18 mov %i0, %o0 if ( !information ) 400130e4: a0 92 20 00 orcc %o0, 0, %l0 400130e8: 22 80 00 34 be,a 400131b8 <_Objects_Get_name_as_string+0x10c> 400130ec: b4 10 20 00 clr %i2 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 400130f0: 92 10 00 18 mov %i0, %o1 400130f4: 7f ff e5 bd call 4000c7e8 <_Objects_Get> 400130f8: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 400130fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40013100: 80 a0 60 00 cmp %g1, 0 40013104: 32 80 00 2d bne,a 400131b8 <_Objects_Get_name_as_string+0x10c> 40013108: b4 10 20 00 clr %i2 case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 4001310c: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1 40013110: 80 a0 60 00 cmp %g1, 0 40013114: 22 80 00 07 be,a 40013130 <_Objects_Get_name_as_string+0x84> 40013118: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name.name_p; 4001311c: d0 02 20 0c ld [ %o0 + 0xc ], %o0 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 40013120: 80 a2 20 00 cmp %o0, 0 40013124: 12 80 00 0c bne 40013154 <_Objects_Get_name_as_string+0xa8> 40013128: 86 10 00 1a mov %i2, %g3 4001312c: 30 80 00 1f b,a 400131a8 <_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'; 40013130: 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; 40013134: 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; 40013138: 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; 4001313c: 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'; 40013140: 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; 40013144: 85 30 60 10 srl %g1, 0x10, %g2 lname[ 2 ] = (u32_name >> 8) & 0xff; 40013148: 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; 4001314c: c4 2f bf e9 stb %g2, [ %fp + -23 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 40013150: 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 : '*'; 40013154: 03 10 00 9a sethi %hi(0x40026800), %g1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 40013158: b2 06 7f ff add %i1, -1, %i1 *d = (isprint(*s)) ? *s : '*'; 4001315c: 98 10 61 50 or %g1, 0x150, %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'; 40013160: 86 10 00 1a mov %i2, %g3 40013164: 10 80 00 0a b 4001318c <_Objects_Get_name_as_string+0xe0> 40013168: 84 10 20 00 clr %g2 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint(*s)) ? *s : '*'; 4001316c: c2 03 00 00 ld [ %o4 ], %g1 40013170: c2 48 40 04 ldsb [ %g1 + %g4 ], %g1 40013174: 80 88 60 97 btst 0x97, %g1 40013178: 12 80 00 03 bne 40013184 <_Objects_Get_name_as_string+0xd8> 4001317c: 84 00 a0 01 inc %g2 40013180: 9a 10 20 2a mov 0x2a, %o5 40013184: da 28 c0 00 stb %o5, [ %g3 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 40013188: 86 00 e0 01 inc %g3 4001318c: 80 a0 80 19 cmp %g2, %i1 40013190: 1a 80 00 06 bcc 400131a8 <_Objects_Get_name_as_string+0xfc> 40013194: 01 00 00 00 nop 40013198: c8 4a 00 02 ldsb [ %o0 + %g2 ], %g4 4001319c: 80 a1 20 00 cmp %g4, 0 400131a0: 12 bf ff f3 bne 4001316c <_Objects_Get_name_as_string+0xc0> 400131a4: da 0a 00 02 ldub [ %o0 + %g2 ], %o5 *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 400131a8: 7f ff e7 fb call 4000d194 <_Thread_Enable_dispatch> 400131ac: c0 28 c0 00 clrb [ %g3 ] return name; } return NULL; /* unreachable path */ } 400131b0: 81 c7 e0 08 ret 400131b4: 91 e8 00 1a restore %g0, %i2, %o0 400131b8: b0 10 00 1a mov %i2, %i0 400131bc: 81 c7 e0 08 ret 400131c0: 81 e8 00 00 restore 40015c38 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 40015c38: 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) 40015c3c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40015c40: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 40015c44: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40015c48: 22 80 00 02 be,a 40015c50 <_Objects_Get_next+0x18> <== NOT EXECUTED 40015c4c: 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) 40015c50: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40015c54: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40015c58: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40015c5c: 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); 40015c60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40015c64: 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) 40015c68: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40015c6c: 08 80 00 08 bleu 40015c8c <_Objects_Get_next+0x54> <== NOT EXECUTED 40015c70: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 40015c74: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40015c78: 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; 40015c7c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40015c80: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 40015c84: 10 80 00 09 b 40015ca8 <_Objects_Get_next+0x70> <== NOT EXECUTED 40015c88: 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); 40015c8c: 7f ff da d7 call 4000c7e8 <_Objects_Get> <== NOT EXECUTED 40015c90: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 40015c94: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40015c98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015c9c: 32 bf ff f0 bne,a 40015c5c <_Objects_Get_next+0x24> <== NOT EXECUTED 40015ca0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40015ca4: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40015ca8: 81 c7 e0 08 ret <== NOT EXECUTED 40015cac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40008ff8 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40008ff8: 9d e3 bf 90 save %sp, -112, %sp 40008ffc: 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 ) 40009000: 80 a6 60 00 cmp %i1, 0 40009004: 02 80 00 22 be 4000908c <_Objects_Id_to_name+0x94> 40009008: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4000900c: 80 a2 60 00 cmp %o1, 0 40009010: 12 80 00 06 bne 40009028 <_Objects_Id_to_name+0x30> 40009014: 83 32 60 18 srl %o1, 0x18, %g1 40009018: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000901c: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 4001d130 <_Thread_Executing> 40009020: 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); 40009024: 83 32 60 18 srl %o1, 0x18, %g1 40009028: 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 ) 4000902c: 82 00 bf ff add %g2, -1, %g1 40009030: 80 a0 60 03 cmp %g1, 3 40009034: 38 80 00 16 bgu,a 4000908c <_Objects_Id_to_name+0x94> 40009038: 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 ] ) 4000903c: 10 80 00 18 b 4000909c <_Objects_Id_to_name+0xa4> 40009040: 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 ]; 40009044: 83 28 60 02 sll %g1, 2, %g1 40009048: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 4000904c: 80 a2 20 00 cmp %o0, 0 40009050: 02 80 00 0f be 4000908c <_Objects_Id_to_name+0x94> 40009054: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 40009058: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 4000905c: 80 a0 60 00 cmp %g1, 0 40009060: 12 80 00 0d bne 40009094 <_Objects_Id_to_name+0x9c> 40009064: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 40009068: 7f ff ff c7 call 40008f84 <_Objects_Get> 4000906c: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 40009070: 80 a2 20 00 cmp %o0, 0 40009074: 22 80 00 06 be,a 4000908c <_Objects_Id_to_name+0x94> 40009078: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 4000907c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 40009080: b0 10 20 00 clr %i0 40009084: 40 00 02 44 call 40009994 <_Thread_Enable_dispatch> 40009088: c2 26 40 00 st %g1, [ %i1 ] 4000908c: 81 c7 e0 08 ret 40009090: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 40009094: 81 c7 e0 08 ret <== NOT EXECUTED 40009098: 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 ] ) 4000909c: 03 10 00 73 sethi %hi(0x4001cc00), %g1 400090a0: 82 10 63 d0 or %g1, 0x3d0, %g1 ! 4001cfd0 <_Objects_Information_table> 400090a4: c4 00 40 02 ld [ %g1 + %g2 ], %g2 400090a8: 80 a0 a0 00 cmp %g2, 0 400090ac: 12 bf ff e6 bne 40009044 <_Objects_Id_to_name+0x4c> 400090b0: 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; 400090b4: 81 c7 e0 08 ret <== NOT EXECUTED 400090b8: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 40007d1c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 40007d1c: 9a 10 00 08 mov %o0, %o5 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 40007d20: 80 a2 e0 00 cmp %o3, 0 40007d24: 02 80 00 29 be 40007dc8 <_Objects_Name_to_id_u32+0xac> 40007d28: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 40007d2c: 80 a2 60 00 cmp %o1, 0 40007d30: 22 80 00 26 be,a 40007dc8 <_Objects_Name_to_id_u32+0xac> 40007d34: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007d38: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1 40007d3c: 84 90 60 00 orcc %g1, 0, %g2 40007d40: 22 80 00 22 be,a 40007dc8 <_Objects_Name_to_id_u32+0xac> 40007d44: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40007d48: 80 a2 a0 00 cmp %o2, 0 40007d4c: 02 80 00 19 be 40007db0 <_Objects_Name_to_id_u32+0x94> 40007d50: 83 28 a0 10 sll %g2, 0x10, %g1 40007d54: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40007d58: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40007d5c: 80 a2 80 01 cmp %o2, %g1 40007d60: 02 80 00 13 be 40007dac <_Objects_Name_to_id_u32+0x90> 40007d64: 80 a2 a0 01 cmp %o2, 1 40007d68: 32 80 00 18 bne,a 40007dc8 <_Objects_Name_to_id_u32+0xac> 40007d6c: 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++ ) { 40007d70: 10 80 00 10 b 40007db0 <_Objects_Name_to_id_u32+0x94> 40007d74: 83 28 a0 10 sll %g2, 0x10, %g1 the_object = information->local_table[ index ]; 40007d78: c2 03 60 1c ld [ %o5 + 0x1c ], %g1 40007d7c: c4 00 40 02 ld [ %g1 + %g2 ], %g2 if ( !the_object ) 40007d80: 80 a0 a0 00 cmp %g2, 0 40007d84: 02 80 00 0d be 40007db8 <_Objects_Name_to_id_u32+0x9c> 40007d88: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 40007d8c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40007d90: 80 a2 40 01 cmp %o1, %g1 40007d94: 32 80 00 0a bne,a 40007dbc <_Objects_Name_to_id_u32+0xa0> 40007d98: 80 a0 c0 04 cmp %g3, %g4 *id = the_object->id; 40007d9c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007da0: 90 10 20 00 clr %o0 40007da4: 81 c3 e0 08 retl 40007da8: 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++ ) { 40007dac: 83 28 a0 10 sll %g2, 0x10, %g1 40007db0: 86 10 20 01 mov 1, %g3 40007db4: 89 30 60 10 srl %g1, 0x10, %g4 40007db8: 80 a0 c0 04 cmp %g3, %g4 40007dbc: 08 bf ff ef bleu 40007d78 <_Objects_Name_to_id_u32+0x5c> 40007dc0: 85 28 e0 02 sll %g3, 2, %g2 40007dc4: 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 } 40007dc8: 81 c3 e0 08 retl 40007dcc: 01 00 00 00 nop 40007ce4 <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 40007ce4: 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 ) 40007ce8: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 40007cec: 80 a0 60 00 cmp %g1, 0 40007cf0: 22 80 00 09 be,a 40007d14 <_Objects_Namespace_remove+0x30> 40007cf4: c0 26 60 0c clr [ %i1 + 0xc ] 40007cf8: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 40007cfc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007d00: 22 80 00 05 be,a 40007d14 <_Objects_Namespace_remove+0x30> <== NOT EXECUTED 40007d04: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 40007d08: 40 00 07 00 call 40009908 <_Workspace_Free> <== NOT EXECUTED 40007d0c: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 40007d10: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 40007d14: 81 c7 e0 08 ret 40007d18: 81 e8 00 00 restore 40009a7c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 40009a7c: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 40009a80: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 40009a84: 40 00 1c 84 call 40010c94 40009a88: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 40009a8c: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 40009a90: 80 a0 60 00 cmp %g1, 0 40009a94: 02 80 00 17 be 40009af0 <_Objects_Set_name+0x74> 40009a98: a0 02 20 01 add %o0, 1, %l0 char *d; d = _Workspace_Allocate( length ); 40009a9c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40009aa0: 40 00 07 04 call 4000b6b0 <_Workspace_Allocate> <== NOT EXECUTED 40009aa4: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 40009aa8: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40009aac: 02 80 00 27 be 40009b48 <_Objects_Set_name+0xcc> <== NOT EXECUTED 40009ab0: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 40009ab4: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 40009ab8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40009abc: 02 80 00 06 be 40009ad4 <_Objects_Set_name+0x58> <== NOT EXECUTED 40009ac0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 40009ac4: 40 00 06 f4 call 4000b694 <_Workspace_Free> <== NOT EXECUTED 40009ac8: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 40009acc: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 40009ad0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40009ad4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40009ad8: 40 00 1c 35 call 40010bac <== NOT EXECUTED 40009adc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 40009ae0: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 40009ae4: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 40009ae8: 81 c7 e0 08 ret <== NOT EXECUTED 40009aec: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } else { the_object->name.name_u32 = _Objects_Build_name( 40009af0: 80 a4 20 00 cmp %l0, 0 40009af4: 02 80 00 1a be 40009b5c <_Objects_Set_name+0xe0> 40009af8: 1b 08 00 00 sethi %hi(0x20000000), %o5 40009afc: c2 4e 80 00 ldsb [ %i2 ], %g1 40009b00: 80 a4 20 01 cmp %l0, 1 40009b04: 02 80 00 16 be 40009b5c <_Objects_Set_name+0xe0> 40009b08: 9b 28 60 18 sll %g1, 0x18, %o5 40009b0c: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 40009b10: 80 a4 20 02 cmp %l0, 2 40009b14: 08 80 00 0f bleu 40009b50 <_Objects_Set_name+0xd4> 40009b18: 89 28 60 10 sll %g1, 0x10, %g4 40009b1c: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 40009b20: 80 a4 20 03 cmp %l0, 3 40009b24: 87 28 60 08 sll %g1, 8, %g3 40009b28: 08 80 00 03 bleu 40009b34 <_Objects_Set_name+0xb8> 40009b2c: 84 10 20 20 mov 0x20, %g2 40009b30: c4 4e a0 03 ldsb [ %i2 + 3 ], %g2 40009b34: 82 13 40 04 or %o5, %g4, %g1 40009b38: b0 10 20 01 mov 1, %i0 40009b3c: 82 10 40 03 or %g1, %g3, %g1 40009b40: 82 10 40 02 or %g1, %g2, %g1 40009b44: c2 26 60 0c st %g1, [ %i1 + 0xc ] ); } return TRUE; } 40009b48: 81 c7 e0 08 ret 40009b4c: 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( 40009b50: 84 10 20 20 mov 0x20, %g2 40009b54: 10 bf ff f8 b 40009b34 <_Objects_Set_name+0xb8> 40009b58: 07 00 00 08 sethi %hi(0x2000), %g3 40009b5c: 10 bf ff fd b 40009b50 <_Objects_Set_name+0xd4> 40009b60: 09 00 08 00 sethi %hi(0x200000), %g4 40007dd8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40007dd8: 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; 40007ddc: 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; 40007de0: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40007de4: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40007de8: 03 00 00 3f sethi %hi(0xfc00), %g1 40007dec: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007df0: 92 10 00 10 mov %l0, %o1 40007df4: a2 08 80 01 and %g2, %g1, %l1 40007df8: 40 00 30 81 call 40013ffc <.udiv> 40007dfc: 90 22 00 11 sub %o0, %l1, %o0 40007e00: 10 80 00 2e b 40007eb8 <_Objects_Shrink_information+0xe0> 40007e04: 84 10 20 00 clr %g2 for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40007e08: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007e0c: c2 00 40 12 ld [ %g1 + %l2 ], %g1 40007e10: 80 a0 40 10 cmp %g1, %l0 40007e14: 12 80 00 28 bne 40007eb4 <_Objects_Shrink_information+0xdc> 40007e18: 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; 40007e1c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40007e20: 03 00 00 3f sethi %hi(0xfc00), %g1 40007e24: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 40007e28: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007e2c: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40007e30: 80 a0 80 11 cmp %g2, %l1 40007e34: 2a 80 00 0c bcs,a 40007e64 <_Objects_Shrink_information+0x8c> 40007e38: e0 04 00 00 ld [ %l0 ], %l0 40007e3c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007e40: 82 04 40 01 add %l1, %g1, %g1 40007e44: 80 a0 80 01 cmp %g2, %g1 40007e48: 1a 80 00 06 bcc 40007e60 <_Objects_Shrink_information+0x88> 40007e4c: 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 ); 40007e50: 40 00 0f 7e call 4000bc48 <_Chain_Extract> 40007e54: 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 ) ); 40007e58: 10 80 00 04 b 40007e68 <_Objects_Shrink_information+0x90> 40007e5c: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40007e60: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40007e64: 80 a4 20 00 cmp %l0, 0 40007e68: 22 80 00 07 be,a 40007e84 <_Objects_Shrink_information+0xac> 40007e6c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40007e70: c2 04 00 00 ld [ %l0 ], %g1 40007e74: 80 a0 60 00 cmp %g1, 0 40007e78: 32 bf ff ed bne,a 40007e2c <_Objects_Shrink_information+0x54> 40007e7c: 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 ] ); 40007e80: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40007e84: 40 00 06 a1 call 40009908 <_Workspace_Free> 40007e88: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40007e8c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40007e90: 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; 40007e94: 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; 40007e98: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007e9c: 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; 40007ea0: c0 20 80 12 clr [ %g2 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007ea4: 82 20 40 03 sub %g1, %g3, %g1 40007ea8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40007eac: 81 c7 e0 08 ret 40007eb0: 81 e8 00 00 restore return; } index_base += information->allocation_size; 40007eb4: 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++ ) { 40007eb8: 80 a0 80 08 cmp %g2, %o0 40007ebc: 0a bf ff d3 bcs 40007e08 <_Objects_Shrink_information+0x30> 40007ec0: a5 28 a0 02 sll %g2, 2, %l2 40007ec4: 81 c7 e0 08 ret 40007ec8: 81 e8 00 00 restore 40023948 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 40023948: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 4002394c: 80 a6 20 00 cmp %i0, 0 40023950: 02 80 00 10 be 40023990 <_Protected_heap_Get_information+0x48> 40023954: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 40023958: 02 80 00 0e be 40023990 <_Protected_heap_Get_information+0x48> 4002395c: 23 10 01 71 sethi %hi(0x4005c400), %l1 return false; _RTEMS_Lock_allocator(); 40023960: 7f ff 9d 10 call 4000ada0 <_API_Mutex_Lock> 40023964: d0 04 61 b8 ld [ %l1 + 0x1b8 ], %o0 ! 4005c5b8 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 40023968: 90 10 00 18 mov %i0, %o0 4002396c: 40 00 27 91 call 4002d7b0 <_Heap_Get_information> 40023970: 92 10 00 19 mov %i1, %o1 40023974: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 40023978: 7f ff 9d 20 call 4000adf8 <_API_Mutex_Unlock> 4002397c: d0 04 61 b8 ld [ %l1 + 0x1b8 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 40023980: 80 a0 00 10 cmp %g0, %l0 40023984: 82 60 3f ff subx %g0, -1, %g1 40023988: 81 c7 e0 08 ret 4002398c: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 40023990: 81 c7 e0 08 ret <== NOT EXECUTED 40023994: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007a14 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40007a14: 9d e3 bf 90 save %sp, -112, %sp 40007a18: 11 10 00 76 sethi %hi(0x4001d800), %o0 40007a1c: 92 10 00 18 mov %i0, %o1 40007a20: 90 12 20 4c or %o0, 0x4c, %o0 40007a24: 40 00 07 9c call 40009894 <_Objects_Get> 40007a28: 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 ) { 40007a2c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007a30: 80 a0 60 00 cmp %g1, 0 40007a34: 12 80 00 26 bne 40007acc <_Rate_monotonic_Timeout+0xb8> 40007a38: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40007a3c: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40007a40: 03 00 00 10 sethi %hi(0x4000), %g1 40007a44: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40007a48: 80 88 80 01 btst %g2, %g1 40007a4c: 22 80 00 0c be,a 40007a7c <_Rate_monotonic_Timeout+0x68> 40007a50: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40007a54: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007a58: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007a5c: 80 a0 80 01 cmp %g2, %g1 40007a60: 32 80 00 07 bne,a 40007a7c <_Rate_monotonic_Timeout+0x68> 40007a64: 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 ); 40007a68: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40007a6c: 40 00 08 e2 call 40009df4 <_Thread_Clear_state> 40007a70: 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 ); 40007a74: 10 80 00 08 b 40007a94 <_Rate_monotonic_Timeout+0x80> 40007a78: 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 ) { 40007a7c: 80 a0 60 01 cmp %g1, 1 40007a80: 12 80 00 0e bne 40007ab8 <_Rate_monotonic_Timeout+0xa4> 40007a84: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40007a88: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40007a8c: 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; 40007a90: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40007a94: 7f ff fe 4a call 400073bc <_Rate_monotonic_Initiate_statistics> 40007a98: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007a9c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007aa0: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007aa4: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007aa8: 11 10 00 76 sethi %hi(0x4001d800), %o0 40007aac: 40 00 0f 09 call 4000b6d0 <_Watchdog_Insert> 40007ab0: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 4001daa0 <_Watchdog_Ticks_chain> 40007ab4: 30 80 00 02 b,a 40007abc <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40007ab8: 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; 40007abc: 05 10 00 76 sethi %hi(0x4001d800), %g2 40007ac0: c2 00 a1 c0 ld [ %g2 + 0x1c0 ], %g1 ! 4001d9c0 <_Thread_Dispatch_disable_level> 40007ac4: 82 00 7f ff add %g1, -1, %g1 40007ac8: c2 20 a1 c0 st %g1, [ %g2 + 0x1c0 ] 40007acc: 81 c7 e0 08 ret 40007ad0: 81 e8 00 00 restore 4000828c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 4000828c: 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 ); 40008290: 11 10 00 64 sethi %hi(0x40019000), %o0 40008294: 7f ff fc e9 call 40007638 <_Objects_Allocate> 40008298: 90 12 20 40 or %o0, 0x40, %o0 ! 40019040 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000829c: 05 10 00 63 sethi %hi(0x40018c00), %g2 400082a0: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 40018ee0 <_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(); 400082a4: 07 10 00 64 sethi %hi(0x40019000), %g3 400082a8: 82 00 60 01 inc %g1 400082ac: d0 20 e0 8c st %o0, [ %g3 + 0x8c ] 400082b0: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 400082b4: 03 10 00 63 sethi %hi(0x40018c00), %g1 400082b8: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 40018f78 <_Configuration_Table> 400082bc: d2 00 e0 8c ld [ %g3 + 0x8c ], %o1 400082c0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 400082c4: 03 10 00 60 sethi %hi(0x40018000), %g1 400082c8: d6 00 60 c0 ld [ %g1 + 0xc0 ], %o3 ! 400180c0 400082cc: 03 10 00 5d sethi %hi(0x40017400), %g1 400082d0: 82 10 61 30 or %g1, 0x130, %g1 ! 40017530 400082d4: 80 a2 c0 02 cmp %o3, %g2 400082d8: 1a 80 00 03 bcc 400082e4 <_Thread_Create_idle+0x58> 400082dc: c2 27 bf f4 st %g1, [ %fp + -12 ] 400082e0: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 400082e4: 03 10 00 60 sethi %hi(0x40018000), %g1 400082e8: da 08 60 c4 ldub [ %g1 + 0xc4 ], %o5 ! 400180c4 400082ec: 82 10 20 01 mov 1, %g1 400082f0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400082f4: 82 07 bf f4 add %fp, -12, %g1 400082f8: c0 23 a0 60 clr [ %sp + 0x60 ] 400082fc: c0 23 a0 64 clr [ %sp + 0x64 ] 40008300: c0 23 a0 68 clr [ %sp + 0x68 ] 40008304: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40008308: 94 10 20 00 clr %o2 4000830c: 98 10 20 00 clr %o4 40008310: 11 10 00 64 sethi %hi(0x40019000), %o0 40008314: 40 00 00 af call 400085d0 <_Thread_Initialize> 40008318: 90 12 20 40 or %o0, 0x40, %o0 ! 40019040 <_Thread_Internal_information> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 4000831c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008320: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 40018f78 <_Configuration_Table> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40008324: 07 10 00 63 sethi %hi(0x40018c00), %g3 40008328: f4 00 60 14 ld [ %g1 + 0x14 ], %i2 4000832c: c2 00 e2 e0 ld [ %g3 + 0x2e0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008330: 05 10 00 64 sethi %hi(0x40019000), %g2 40008334: 82 00 7f ff add %g1, -1, %g1 40008338: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2 4000833c: c2 20 e2 e0 st %g1, [ %g3 + 0x2e0 ] 40008340: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008344: c4 20 63 a0 st %g2, [ %g1 + 0x3a0 ] ! 40018fa0 <_Thread_Executing> 40008348: 03 10 00 63 sethi %hi(0x40018c00), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 4000834c: 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 = 40008350: c4 20 63 6c st %g2, [ %g1 + 0x36c ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40008354: b2 10 20 00 clr %i1 40008358: b6 10 20 00 clr %i3 4000835c: 40 00 03 81 call 40009160 <_Thread_Start> 40008360: 99 e8 20 00 restore %g0, 0, %o4 40008364: 01 00 00 00 nop 4000ce7c <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4000ce7c: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000ce80: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 40018fa0 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 4000ce84: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000ce88: 80 a0 60 00 cmp %g1, 0 4000ce8c: 32 80 00 0b bne,a 4000ceb8 <_Thread_Evaluate_mode+0x3c> 4000ce90: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000ce94: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000ce98: c2 00 63 6c ld [ %g1 + 0x36c ], %g1 ! 40018f6c <_Thread_Heir> 4000ce9c: 80 a0 80 01 cmp %g2, %g1 4000cea0: 02 80 00 0b be 4000cecc <_Thread_Evaluate_mode+0x50> 4000cea4: 01 00 00 00 nop 4000cea8: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 4000ceac: 80 a0 60 00 cmp %g1, 0 4000ceb0: 02 80 00 07 be 4000cecc <_Thread_Evaluate_mode+0x50> 4000ceb4: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 4000ceb8: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000cebc: 90 10 20 01 mov 1, %o0 4000cec0: c4 28 63 b0 stb %g2, [ %g1 + 0x3b0 ] 4000cec4: 81 c3 e0 08 retl 4000cec8: 01 00 00 00 nop return TRUE; } return FALSE; } 4000cecc: 81 c3 e0 08 retl 4000ced0: 90 10 20 00 clr %o0 ! 0 40008520 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40008520: 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 ) ) { 40008524: 80 a2 20 00 cmp %o0, 0 40008528: 12 80 00 0a bne 40008550 <_Thread_Get+0x30> 4000852c: 94 10 00 09 mov %o1, %o2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008530: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008534: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 40018ee0 <_Thread_Dispatch_disable_level> 40008538: 84 00 a0 01 inc %g2 4000853c: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ] _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008540: 03 10 00 63 sethi %hi(0x40018c00), %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; 40008544: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40008548: 81 c3 e0 08 retl 4000854c: d0 00 63 a0 ld [ %g1 + 0x3a0 ], %o0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008550: 83 32 20 18 srl %o0, 0x18, %g1 40008554: 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 ) 40008558: 82 00 bf ff add %g2, -1, %g1 4000855c: 80 a0 60 03 cmp %g1, 3 40008560: 08 80 00 16 bleu 400085b8 <_Thread_Get+0x98> 40008564: 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; 40008568: 82 10 20 01 mov 1, %g1 4000856c: 10 80 00 09 b 40008590 <_Thread_Get+0x70> 40008570: c2 22 80 00 st %g1, [ %o2 ] goto done; } api_information = _Objects_Information_table[ the_api ]; 40008574: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008578: 82 10 62 40 or %g1, 0x240, %g1 ! 40018e40 <_Objects_Information_table> 4000857c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 40008580: 80 a0 60 00 cmp %g1, 0 40008584: 32 80 00 05 bne,a 40008598 <_Thread_Get+0x78> 40008588: d0 00 60 04 ld [ %g1 + 4 ], %o0 *location = OBJECTS_ERROR; 4000858c: c6 22 80 00 st %g3, [ %o2 ] 40008590: 81 c3 e0 08 retl 40008594: 90 10 20 00 clr %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { 40008598: 80 a2 20 00 cmp %o0, 0 4000859c: 12 80 00 04 bne 400085ac <_Thread_Get+0x8c> 400085a0: 92 10 00 04 mov %g4, %o1 *location = OBJECTS_ERROR; 400085a4: 81 c3 e0 08 retl <== NOT EXECUTED 400085a8: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400085ac: 82 13 c0 00 mov %o7, %g1 400085b0: 7f ff fd 7c call 40007ba0 <_Objects_Get> 400085b4: 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 :) */ 400085b8: 80 a0 e0 01 cmp %g3, 1 400085bc: 22 bf ff ee be,a 40008574 <_Thread_Get+0x54> 400085c0: 85 28 a0 02 sll %g2, 2, %g2 *location = OBJECTS_ERROR; 400085c4: 10 bf ff ea b 4000856c <_Thread_Get+0x4c> 400085c8: 82 10 20 01 mov 1, %g1 4000ced4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000ced4: 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; 4000ced8: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000cedc: e2 00 63 a0 ld [ %g1 + 0x3a0 ], %l1 ! 40018fa0 <_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(); 4000cee0: 3f 10 00 33 sethi %hi(0x4000cc00), %i7 4000cee4: be 17 e2 d4 or %i7, 0x2d4, %i7 ! 4000ced4 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000cee8: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000ceec: 7f ff d3 9f call 40001d68 4000cef0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000cef4: 05 10 00 62 sethi %hi(0x40018800), %g2 doneConstructors = 1; 4000cef8: 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; 4000cefc: e0 08 a3 98 ldub [ %g2 + 0x398 ], %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 ); 4000cf00: 90 10 00 11 mov %l1, %o0 4000cf04: 7f ff f1 50 call 40009444 <_User_extensions_Thread_begin> 4000cf08: c2 28 a3 98 stb %g1, [ %g2 + 0x398 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000cf0c: 7f ff ed 78 call 400084ec <_Thread_Enable_dispatch> 4000cf10: 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) */ 4000cf14: 80 a4 20 00 cmp %l0, 0 4000cf18: 32 80 00 05 bne,a 4000cf2c <_Thread_Handler+0x58> 4000cf1c: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 { _init (); 4000cf20: 40 00 2c 30 call 40017fe0 <_init> 4000cf24: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000cf28: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000cf2c: 80 a0 60 01 cmp %g1, 1 4000cf30: 22 80 00 0d be,a 4000cf64 <_Thread_Handler+0x90> 4000cf34: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000cf38: 2a 80 00 09 bcs,a 4000cf5c <_Thread_Handler+0x88> 4000cf3c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000cf40: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000cf44: 02 80 00 0d be 4000cf78 <_Thread_Handler+0xa4> <== NOT EXECUTED 4000cf48: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000cf4c: 12 80 00 14 bne 4000cf9c <_Thread_Handler+0xc8> <== NOT EXECUTED 4000cf50: 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 = 4000cf54: 10 80 00 0d b 4000cf88 <_Thread_Handler+0xb4> <== NOT EXECUTED 4000cf58: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000cf5c: 10 80 00 03 b 4000cf68 <_Thread_Handler+0x94> 4000cf60: 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 = 4000cf64: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000cf68: 9f c0 40 00 call %g1 4000cf6c: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000cf70: 10 80 00 0b b 4000cf9c <_Thread_Handler+0xc8> 4000cf74: 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 = 4000cf78: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000cf7c: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000cf80: 10 80 00 04 b 4000cf90 <_Thread_Handler+0xbc> <== NOT EXECUTED 4000cf84: 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 = 4000cf88: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000cf8c: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000cf90: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000cf94: 01 00 00 00 nop <== NOT EXECUTED 4000cf98: 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 ); 4000cf9c: 7f ff f1 3b call 40009488 <_User_extensions_Thread_exitted> 4000cfa0: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000cfa4: 90 10 20 00 clr %o0 4000cfa8: 92 10 20 01 mov 1, %o1 4000cfac: 7f ff e9 74 call 4000757c <_Internal_error_Occurred> 4000cfb0: 94 10 20 06 mov 6, %o2 4000cfb4: 01 00 00 00 nop 400085d0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 400085d0: 9d e3 bf 98 save %sp, -104, %sp 400085d4: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 400085d8: 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 ) { 400085dc: e4 00 40 00 ld [ %g1 ], %l2 400085e0: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 400085e4: 12 80 00 0e bne 4000861c <_Thread_Initialize+0x4c> 400085e8: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 400085ec: 90 10 00 19 mov %i1, %o0 400085f0: 40 00 02 a3 call 4000907c <_Thread_Stack_Allocate> 400085f4: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 400085f8: 80 a2 20 00 cmp %o0, 0 400085fc: 02 80 00 1e be 40008674 <_Thread_Initialize+0xa4> 40008600: 80 a2 00 1b cmp %o0, %i3 40008604: 0a 80 00 1c bcs 40008674 <_Thread_Initialize+0xa4> 40008608: 01 00 00 00 nop return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 4000860c: 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; 40008610: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40008614: 10 80 00 04 b 40008624 <_Thread_Initialize+0x54> 40008618: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 4000861c: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40008620: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008624: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008628: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 40018f80 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 4000862c: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40008630: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40008634: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40008638: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 4000863c: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40008640: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 40008644: c0 26 61 58 clr [ %i1 + 0x158 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008648: 80 a0 60 00 cmp %g1, 0 4000864c: 02 80 00 0c be 4000867c <_Thread_Initialize+0xac> 40008650: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 40008654: 90 00 60 01 add %g1, 1, %o0 40008658: 40 00 04 b3 call 40009924 <_Workspace_Allocate> 4000865c: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40008660: b6 92 20 00 orcc %o0, 0, %i3 40008664: 12 80 00 07 bne 40008680 <_Thread_Initialize+0xb0> 40008668: 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 ); 4000866c: 40 00 02 9c call 400090dc <_Thread_Stack_Free> <== NOT EXECUTED 40008670: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008674: 81 c7 e0 08 ret 40008678: 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 ) { 4000867c: 80 a6 e0 00 cmp %i3, 0 40008680: 02 80 00 0d be 400086b4 <_Thread_Initialize+0xe4> 40008684: f6 26 61 68 st %i3, [ %i1 + 0x168 ] uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008688: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000868c: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 40018f80 <_Thread_Maximum_extensions> 40008690: 86 10 20 00 clr %g3 40008694: 10 80 00 05 b 400086a8 <_Thread_Initialize+0xd8> 40008698: 88 00 60 01 add %g1, 1, %g4 the_thread->extensions[i] = NULL; 4000869c: 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++ ) 400086a0: 86 00 e0 01 inc %g3 the_thread->extensions[i] = NULL; 400086a4: c0 20 80 01 clr [ %g2 + %g1 ] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 400086a8: 80 a0 c0 04 cmp %g3, %g4 400086ac: 2a bf ff fc bcs,a 4000869c <_Thread_Initialize+0xcc> 400086b0: 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; 400086b4: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 400086b8: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 400086bc: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 400086c0: 80 a4 60 02 cmp %l1, 2 400086c4: 12 80 00 05 bne 400086d8 <_Thread_Initialize+0x108> 400086c8: 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; 400086cc: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED 400086d0: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 40018e38 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 400086d4: 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; 400086d8: 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 ); 400086dc: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 400086e0: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 400086e4: 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 ); 400086e8: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 400086ec: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 400086f0: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 400086f4: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 400086f8: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 400086fc: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40008700: 40 00 01 be call 40008df8 <_Thread_Set_priority> 40008704: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40008708: c4 06 60 08 ld [ %i1 + 8 ], %g2 4000870c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008710: 03 00 00 3f sethi %hi(0xfc00), %g1 40008714: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008718: 84 08 80 01 and %g2, %g1, %g2 4000871c: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40008720: 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; 40008724: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40008728: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000872c: 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 ); 40008730: 90 10 00 19 mov %i1, %o0 40008734: 40 00 03 79 call 40009518 <_User_extensions_Thread_create> 40008738: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 4000873c: 80 8a 20 ff btst 0xff, %o0 40008740: 12 80 00 09 bne 40008764 <_Thread_Initialize+0x194> 40008744: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40008748: 02 80 00 05 be 4000875c <_Thread_Initialize+0x18c> <== NOT EXECUTED 4000874c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 40008750: 40 00 04 6e call 40009908 <_Workspace_Free> <== NOT EXECUTED 40008754: 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 ); 40008758: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000875c: 40 00 02 60 call 400090dc <_Thread_Stack_Free> <== NOT EXECUTED 40008760: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40008764: 81 c7 e0 08 ret 40008768: 81 e8 00 00 restore 4000d2b8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000d2b8: 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; 4000d2bc: 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; 4000d2c0: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000d2c4: 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; 4000d2c8: 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; 4000d2cc: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000d2d0: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000d2d4: 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; 4000d2d8: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000d2dc: 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 ) ) { 4000d2e0: 7f ff f1 5a call 40009848 <_Thread_queue_Extract_with_proxy> 4000d2e4: 90 10 00 18 mov %i0, %o0 4000d2e8: 80 8a 20 ff btst 0xff, %o0 4000d2ec: 32 80 00 09 bne,a 4000d310 <_Thread_Reset+0x58> 4000d2f0: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000d2f4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000d2f8: 80 a0 60 02 cmp %g1, 2 4000d2fc: 32 80 00 05 bne,a 4000d310 <_Thread_Reset+0x58> 4000d300: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000d304: 7f ff f4 4f call 4000a440 <_Watchdog_Remove> <== NOT EXECUTED 4000d308: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000d30c: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000d310: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000d314: 80 a0 40 19 cmp %g1, %i1 4000d318: 02 80 00 05 be 4000d32c <_Thread_Reset+0x74> 4000d31c: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000d320: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000d324: 7f ff f1 c4 call 40009a34 <_Thread_Set_priority> 4000d328: 81 e8 00 00 restore 4000d32c: 81 c7 e0 08 ret 4000d330: 81 e8 00 00 restore 4000c59c <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000c59c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000c5a0: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000c5a4: e0 00 63 a0 ld [ %g1 + 0x3a0 ], %l0 ! 40018fa0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000c5a8: 7f ff d5 ec call 40001d58 4000c5ac: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000c5b0: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000c5b4: c4 04 40 00 ld [ %l1 ], %g2 4000c5b8: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000c5bc: 80 a0 80 01 cmp %g2, %g1 4000c5c0: 32 80 00 03 bne,a 4000c5cc <_Thread_Reset_timeslice+0x30> 4000c5c4: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000c5c8: 30 80 00 18 b,a 4000c628 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000c5cc: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000c5d0: 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; 4000c5d4: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000c5d8: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000c5dc: 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; 4000c5e0: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000c5e4: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000c5e8: 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; 4000c5ec: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000c5f0: 7f ff d5 de call 40001d68 4000c5f4: 01 00 00 00 nop 4000c5f8: 7f ff d5 d8 call 40001d58 4000c5fc: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000c600: 05 10 00 63 sethi %hi(0x40018c00), %g2 4000c604: c2 00 a3 6c ld [ %g2 + 0x36c ], %g1 ! 40018f6c <_Thread_Heir> 4000c608: 80 a4 00 01 cmp %l0, %g1 4000c60c: 32 80 00 05 bne,a 4000c620 <_Thread_Reset_timeslice+0x84> 4000c610: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000c614: c2 04 40 00 ld [ %l1 ], %g1 4000c618: c2 20 a3 6c st %g1, [ %g2 + 0x36c ] _Context_Switch_necessary = TRUE; 4000c61c: 84 10 20 01 mov 1, %g2 4000c620: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000c624: c4 28 63 b0 stb %g2, [ %g1 + 0x3b0 ] ! 40018fb0 <_Context_Switch_necessary> _ISR_Enable( level ); 4000c628: 7f ff d5 d0 call 40001d68 4000c62c: 81 e8 00 00 restore 4000c630: 01 00 00 00 nop 4000a7a8 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4000a7a8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000a7ac: 7f ff e0 de call 40002b24 4000a7b0: 01 00 00 00 nop 4000a7b4: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000a7b8: 80 8e 60 ff btst 0xff, %i1 4000a7bc: 22 80 00 04 be,a 4000a7cc <_Thread_Resume+0x24> 4000a7c0: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 4000a7c4: 10 80 00 04 b 4000a7d4 <_Thread_Resume+0x2c> 4000a7c8: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 4000a7cc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000a7d0: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000a7d4: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 4000a7d8: 80 a0 60 00 cmp %g1, 0 4000a7dc: 22 80 00 03 be,a 4000a7e8 <_Thread_Resume+0x40> 4000a7e0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 4000a7e4: 30 80 00 2e b,a 4000a89c <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 4000a7e8: 80 88 60 02 btst 2, %g1 4000a7ec: 02 80 00 2c be 4000a89c <_Thread_Resume+0xf4> 4000a7f0: 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 ) ) { 4000a7f4: 80 a0 60 00 cmp %g1, 0 4000a7f8: 12 80 00 29 bne 4000a89c <_Thread_Resume+0xf4> 4000a7fc: 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; 4000a800: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 4000a804: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 4000a808: 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); 4000a80c: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 4000a810: 82 10 40 02 or %g1, %g2, %g1 4000a814: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000a818: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000a81c: 1b 10 00 95 sethi %hi(0x40025400), %o5 4000a820: c2 26 00 00 st %g1, [ %i0 ] 4000a824: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2 old_last_node = the_chain->last; 4000a828: c2 00 e0 08 ld [ %g3 + 8 ], %g1 4000a82c: c8 13 60 94 lduh [ %o5 + 0x94 ], %g4 the_chain->last = the_node; 4000a830: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000a834: 84 10 80 04 or %g2, %g4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000a838: c2 26 20 04 st %g1, [ %i0 + 4 ] 4000a83c: c4 33 60 94 sth %g2, [ %o5 + 0x94 ] 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; 4000a840: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 4000a844: 7f ff e0 bc call 40002b34 4000a848: 90 10 00 10 mov %l0, %o0 4000a84c: 7f ff e0 b6 call 40002b24 4000a850: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000a854: 07 10 00 95 sethi %hi(0x40025400), %g3 4000a858: c2 00 e0 6c ld [ %g3 + 0x6c ], %g1 ! 4002546c <_Thread_Heir> 4000a85c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000a860: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000a864: 80 a0 80 01 cmp %g2, %g1 4000a868: 1a 80 00 0d bcc 4000a89c <_Thread_Resume+0xf4> 4000a86c: 03 10 00 95 sethi %hi(0x40025400), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000a870: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 400254a0 <_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; 4000a874: f0 20 e0 6c st %i0, [ %g3 + 0x6c ] if ( _Thread_Executing->is_preemptible || 4000a878: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 4000a87c: 80 a0 60 00 cmp %g1, 0 4000a880: 32 80 00 05 bne,a 4000a894 <_Thread_Resume+0xec> 4000a884: 84 10 20 01 mov 1, %g2 4000a888: 80 a0 a0 00 cmp %g2, 0 4000a88c: 12 80 00 04 bne 4000a89c <_Thread_Resume+0xf4> 4000a890: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000a894: 03 10 00 95 sethi %hi(0x40025400), %g1 4000a898: c4 28 60 b0 stb %g2, [ %g1 + 0xb0 ] ! 400254b0 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4000a89c: 7f ff e0 a6 call 40002b34 4000a8a0: 91 e8 00 10 restore %g0, %l0, %o0 4000a8a4: 01 00 00 00 nop 4000907c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 4000907c: 9d e3 bf 98 save %sp, -104, %sp 40009080: 03 10 00 60 sethi %hi(0x40018000), %g1 40009084: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 400180c0 40009088: 80 a6 40 01 cmp %i1, %g1 4000908c: 2a 80 00 02 bcs,a 40009094 <_Thread_Stack_Allocate+0x18> 40009090: 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 ) { 40009094: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009098: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 40018f78 <_Configuration_Table> 4000909c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 400090a0: 80 a0 60 00 cmp %g1, 0 400090a4: 22 80 00 06 be,a 400090bc <_Thread_Stack_Allocate+0x40> 400090a8: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 400090ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400090b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 400090b4: 10 80 00 05 b 400090c8 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED 400090b8: 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 ); 400090bc: 40 00 02 1a call 40009924 <_Workspace_Allocate> 400090c0: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 400090c4: 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 ) 400090c8: 80 a0 00 08 cmp %g0, %o0 400090cc: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 400090d0: b0 0e 40 18 and %i1, %i0, %i0 400090d4: 81 c7 e0 08 ret 400090d8: 81 e8 00 00 restore 400090dc <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 400090dc: 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 ) 400090e0: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 400090e4: 80 a0 60 00 cmp %g1, 0 400090e8: 02 80 00 09 be 4000910c <_Thread_Stack_Free+0x30> 400090ec: 03 10 00 63 sethi %hi(0x40018c00), %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 ) 400090f0: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 40018f78 <_Configuration_Table> 400090f4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 400090f8: 80 a0 60 00 cmp %g1, 0 400090fc: 02 80 00 06 be 40009114 <_Thread_Stack_Free+0x38> 40009100: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 (*_Configuration_Table->stack_free_hook)( 40009104: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009108: 01 00 00 00 nop <== NOT EXECUTED 4000910c: 81 c7 e0 08 ret <== NOT EXECUTED 40009110: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 40009114: 40 00 01 fd call 40009908 <_Workspace_Free> 40009118: 91 e8 00 08 restore %g0, %o0, %o0 4000911c: 01 00 00 00 nop 400091ac <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 400091ac: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 400091b0: 03 10 00 63 sethi %hi(0x40018c00), %g1 400091b4: e0 00 63 a0 ld [ %g1 + 0x3a0 ], %l0 ! 40018fa0 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 400091b8: c2 0c 20 76 ldub [ %l0 + 0x76 ], %g1 400091bc: 80 a0 60 00 cmp %g1, 0 400091c0: 02 80 00 23 be 4000924c <_Thread_Tickle_timeslice+0xa0> 400091c4: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 400091c8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400091cc: 80 a0 60 00 cmp %g1, 0 400091d0: 12 80 00 1f bne 4000924c <_Thread_Tickle_timeslice+0xa0> 400091d4: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 400091d8: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 400091dc: 80 a0 60 01 cmp %g1, 1 400091e0: 0a 80 00 12 bcs 40009228 <_Thread_Tickle_timeslice+0x7c> 400091e4: 80 a0 60 02 cmp %g1, 2 400091e8: 28 80 00 07 bleu,a 40009204 <_Thread_Tickle_timeslice+0x58> 400091ec: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 400091f0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 400091f4: 12 80 00 16 bne 4000924c <_Thread_Tickle_timeslice+0xa0> <== NOT EXECUTED 400091f8: 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 ) 400091fc: 10 80 00 0d b 40009230 <_Thread_Tickle_timeslice+0x84> <== NOT EXECUTED 40009200: 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 ) { 40009204: 82 00 7f ff add %g1, -1, %g1 40009208: 80 a0 60 00 cmp %g1, 0 4000920c: 14 80 00 07 bg 40009228 <_Thread_Tickle_timeslice+0x7c> 40009210: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 40009214: 40 00 0c e2 call 4000c59c <_Thread_Reset_timeslice> 40009218: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4000921c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009220: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 40018e38 <_Thread_Ticks_per_timeslice> 40009224: c2 24 20 78 st %g1, [ %l0 + 0x78 ] 40009228: 81 c7 e0 08 ret 4000922c: 81 e8 00 00 restore } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 40009230: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009234: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009238: 12 bf ff fc bne 40009228 <_Thread_Tickle_timeslice+0x7c> <== NOT EXECUTED 4000923c: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 40009240: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40009244: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009248: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000924c: 81 c7 e0 08 ret 40009250: 81 e8 00 00 restore 40008a80 <_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 ) { 40008a80: 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; 40008a84: 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); 40008a88: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40008a8c: 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); 40008a90: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008a94: 82 06 60 38 add %i1, 0x38, %g1 40008a98: 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 ) ) 40008a9c: 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); 40008aa0: 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; 40008aa4: 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 ]; 40008aa8: 85 28 60 04 sll %g1, 4, %g2 40008aac: 83 28 60 02 sll %g1, 2, %g1 40008ab0: 84 20 80 01 sub %g2, %g1, %g2 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008ab4: 12 80 00 31 bne 40008b78 <_Thread_queue_Enqueue_priority+0xf8> 40008ab8: 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; 40008abc: 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; 40008ac0: 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 ); 40008ac4: 7f ff e4 a5 call 40001d58 40008ac8: 01 00 00 00 nop 40008acc: a6 10 00 08 mov %o0, %l3 search_thread = (Thread_Control *) header->first; 40008ad0: a2 10 3f ff mov -1, %l1 40008ad4: 10 80 00 18 b 40008b34 <_Thread_queue_Enqueue_priority+0xb4> 40008ad8: 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 ) 40008adc: 80 a4 80 11 cmp %l2, %l1 40008ae0: 28 80 00 19 bleu,a 40008b44 <_Thread_queue_Enqueue_priority+0xc4> 40008ae4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 40008ae8: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40008aec: 80 a4 00 14 cmp %l0, %l4 40008af0: 22 80 00 15 be,a 40008b44 <_Thread_queue_Enqueue_priority+0xc4> 40008af4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40008af8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40008afc: 80 a4 80 11 cmp %l2, %l1 40008b00: 28 80 00 11 bleu,a 40008b44 <_Thread_queue_Enqueue_priority+0xc4> 40008b04: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40008b08: 7f ff e4 98 call 40001d68 40008b0c: 90 10 00 13 mov %l3, %o0 40008b10: 7f ff e4 92 call 40001d58 40008b14: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008b18: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008b1c: 80 8d 80 01 btst %l6, %g1 40008b20: 32 80 00 05 bne,a 40008b34 <_Thread_queue_Enqueue_priority+0xb4> 40008b24: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 40008b28: 7f ff e4 90 call 40001d68 <== NOT EXECUTED 40008b2c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008b30: 30 bf ff e5 b,a 40008ac4 <_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 ) ) { 40008b34: 80 a4 00 14 cmp %l0, %l4 40008b38: 32 bf ff e9 bne,a 40008adc <_Thread_queue_Enqueue_priority+0x5c> 40008b3c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008b40: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008b44: 80 a0 60 01 cmp %g1, 1 40008b48: 12 80 00 48 bne 40008c68 <_Thread_queue_Enqueue_priority+0x1e8> 40008b4c: 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 ) 40008b50: 80 a4 80 11 cmp %l2, %l1 40008b54: 02 80 00 3a be 40008c3c <_Thread_queue_Enqueue_priority+0x1bc> 40008b58: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40008b5c: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008b60: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40008b64: 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; 40008b68: 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; 40008b6c: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008b70: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008b74: 30 80 00 39 b,a 40008c58 <_Thread_queue_Enqueue_priority+0x1d8> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008b78: 03 10 00 60 sethi %hi(0x40018000), %g1 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40008b7c: 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; 40008b80: ae 10 60 c4 or %g1, 0xc4, %l7 40008b84: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 40008b88: 7f ff e4 74 call 40001d58 40008b8c: a2 00 60 01 add %g1, 1, %l1 40008b90: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 40008b94: 10 80 00 19 b 40008bf8 <_Thread_queue_Enqueue_priority+0x178> 40008b98: 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 ) 40008b9c: 80 a4 80 11 cmp %l2, %l1 40008ba0: 3a 80 00 1a bcc,a 40008c08 <_Thread_queue_Enqueue_priority+0x188> 40008ba4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40008ba8: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40008bac: 80 a4 00 13 cmp %l0, %l3 40008bb0: 22 80 00 16 be,a 40008c08 <_Thread_queue_Enqueue_priority+0x188> 40008bb4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40008bb8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40008bbc: 80 a4 80 11 cmp %l2, %l1 40008bc0: 3a 80 00 12 bcc,a 40008c08 <_Thread_queue_Enqueue_priority+0x188> 40008bc4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40008bc8: 7f ff e4 68 call 40001d68 40008bcc: 90 10 00 14 mov %l4, %o0 40008bd0: 7f ff e4 62 call 40001d58 40008bd4: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008bd8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008bdc: 80 8d 80 01 btst %l6, %g1 40008be0: 32 80 00 06 bne,a 40008bf8 <_Thread_queue_Enqueue_priority+0x178> 40008be4: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 40008be8: 7f ff e4 60 call 40001d68 <== NOT EXECUTED 40008bec: 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; 40008bf0: 10 bf ff e6 b 40008b88 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 40008bf4: 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 ) ) { 40008bf8: 80 a4 00 13 cmp %l0, %l3 40008bfc: 32 bf ff e8 bne,a 40008b9c <_Thread_queue_Enqueue_priority+0x11c> 40008c00: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008c04: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008c08: 80 a0 60 01 cmp %g1, 1 40008c0c: 12 80 00 17 bne 40008c68 <_Thread_queue_Enqueue_priority+0x1e8> 40008c10: 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 ) 40008c14: 80 a4 80 11 cmp %l2, %l1 40008c18: 02 80 00 09 be 40008c3c <_Thread_queue_Enqueue_priority+0x1bc> 40008c1c: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40008c20: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40008c24: 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; 40008c28: 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; 40008c2c: 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; 40008c30: 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; 40008c34: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008c38: 30 80 00 08 b,a 40008c58 <_Thread_queue_Enqueue_priority+0x1d8> 40008c3c: 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; 40008c40: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008c44: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40008c48: 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; 40008c4c: 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; 40008c50: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40008c54: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008c58: 7f ff e4 44 call 40001d68 40008c5c: b0 10 20 01 mov 1, %i0 40008c60: 81 c7 e0 08 ret 40008c64: 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; 40008c68: 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; 40008c6c: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 40008c70: 81 c7 e0 08 ret <== NOT EXECUTED 40008c74: 81 e8 00 00 restore <== NOT EXECUTED 4000cfb8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000cfb8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000cfbc: 7f ff d3 67 call 40001d58 4000cfc0: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000cfc4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000cfc8: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000cfcc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000cfd0: 80 88 80 01 btst %g2, %g1 4000cfd4: 32 80 00 04 bne,a 4000cfe4 <_Thread_queue_Extract_fifo+0x2c> 4000cfd8: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 4000cfdc: 7f ff d3 63 call 40001d68 <== NOT EXECUTED 4000cfe0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000cfe4: 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 ) ) { 4000cfe8: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000cfec: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000cff0: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000cff4: 80 a0 e0 02 cmp %g3, 2 4000cff8: 02 80 00 06 be 4000d010 <_Thread_queue_Extract_fifo+0x58> 4000cffc: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000d000: 7f ff d3 5a call 40001d68 4000d004: 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 ); 4000d008: 10 80 00 0a b 4000d030 <_Thread_queue_Extract_fifo+0x78> 4000d00c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000d010: 82 10 20 03 mov 3, %g1 4000d014: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000d018: 7f ff d3 54 call 40001d68 4000d01c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000d020: 7f ff f1 e6 call 400097b8 <_Watchdog_Remove> 4000d024: 90 06 60 48 add %i1, 0x48, %o0 4000d028: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000d02c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000d030: 7f ff ec 34 call 40008100 <_Thread_Clear_state> 4000d034: 81 e8 00 00 restore 4000d038: 01 00 00 00 nop 4000c318 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000c318: 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 ); 4000c31c: 7f ff d6 8f call 40001d58 4000c320: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000c324: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000c328: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000c32c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000c330: 80 88 80 01 btst %g2, %g1 4000c334: 32 80 00 03 bne,a 4000c340 <_Thread_queue_Extract_priority_helper+0x28> 4000c338: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 4000c33c: 30 80 00 1c b,a 4000c3ac <_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 ) ) { 4000c340: 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; 4000c344: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000c348: 80 a0 c0 01 cmp %g3, %g1 4000c34c: 02 80 00 13 be 4000c398 <_Thread_queue_Extract_priority_helper+0x80> 4000c350: 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; 4000c354: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000c358: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000c35c: 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; 4000c360: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000c364: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000c368: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000c36c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000c370: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000c374: 80 a0 80 01 cmp %g2, %g1 4000c378: 02 80 00 0a be 4000c3a0 <_Thread_queue_Extract_priority_helper+0x88> 4000c37c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000c380: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000c384: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000c388: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000c38c: 82 00 e0 3c add %g3, 0x3c, %g1 4000c390: 10 80 00 04 b 4000c3a0 <_Thread_queue_Extract_priority_helper+0x88> 4000c394: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000c398: 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; 4000c39c: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000c3a0: 80 8e a0 ff btst 0xff, %i2 4000c3a4: 22 80 00 04 be,a 4000c3b4 <_Thread_queue_Extract_priority_helper+0x9c> 4000c3a8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 4000c3ac: 7f ff d6 6f call 40001d68 4000c3b0: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000c3b4: 80 a0 60 02 cmp %g1, 2 4000c3b8: 02 80 00 06 be 4000c3d0 <_Thread_queue_Extract_priority_helper+0xb8> 4000c3bc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000c3c0: 7f ff d6 6a call 40001d68 4000c3c4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000c3c8: 10 80 00 08 b 4000c3e8 <_Thread_queue_Extract_priority_helper+0xd0> 4000c3cc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c3d0: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000c3d4: 7f ff d6 65 call 40001d68 <== NOT EXECUTED 4000c3d8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000c3dc: 7f ff f4 f7 call 400097b8 <_Watchdog_Remove> <== NOT EXECUTED 4000c3e0: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 4000c3e4: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 4000c3e8: 7f ff ef 46 call 40008100 <_Thread_Clear_state> 4000c3ec: 81 e8 00 00 restore 4000c3f0: 01 00 00 00 nop 4000c3f4 <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000c3f4: 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 && 4000c3f8: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 4000c3fc: 80 a0 e0 00 cmp %g3, 0 4000c400: 02 80 00 0f be 4000c43c <_Thread_queue_Process_timeout+0x48> 4000c404: 92 10 00 08 mov %o0, %o1 4000c408: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000c40c: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 40018fa0 <_Thread_Executing> 4000c410: 80 a2 00 01 cmp %o0, %g1 4000c414: 32 80 00 0b bne,a 4000c440 <_Thread_queue_Process_timeout+0x4c> 4000c418: 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 ) { 4000c41c: 80 a0 e0 03 cmp %g3, 3 4000c420: 02 80 00 0d be 4000c454 <_Thread_queue_Process_timeout+0x60> 4000c424: 01 00 00 00 nop the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000c428: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4000c42c: c2 22 20 34 st %g1, [ %o0 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000c430: 82 10 20 02 mov 2, %g1 4000c434: 81 c3 e0 08 retl 4000c438: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000c43c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000c440: 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; 4000c444: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000c448: 82 13 c0 00 mov %o7, %g1 4000c44c: 7f ff ff a8 call 4000c2ec <_Thread_queue_Extract> 4000c450: 9e 10 40 00 mov %g1, %o7 4000c454: 81 c3 e0 08 retl <== NOT EXECUTED 4000c458: 01 00 00 00 nop 4000afa0 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000afa0: 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; 4000afa4: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000afa8: 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; 4000afac: 91 38 60 1f sra %g1, 0x1f, %o0 4000afb0: 92 10 00 01 mov %g1, %o1 4000afb4: 83 30 60 1d srl %g1, 0x1d, %g1 4000afb8: 87 2a 60 03 sll %o1, 3, %g3 4000afbc: 85 2a 20 03 sll %o0, 3, %g2 4000afc0: 84 10 40 02 or %g1, %g2, %g2 4000afc4: 83 30 e0 1b srl %g3, 0x1b, %g1 4000afc8: 99 28 a0 05 sll %g2, 5, %o4 4000afcc: 9b 28 e0 05 sll %g3, 5, %o5 4000afd0: 98 10 40 0c or %g1, %o4, %o4 4000afd4: 9a a3 40 03 subcc %o5, %g3, %o5 4000afd8: 83 33 60 1a srl %o5, 0x1a, %g1 4000afdc: 98 63 00 02 subx %o4, %g2, %o4 4000afe0: 97 2b 60 06 sll %o5, 6, %o3 4000afe4: 95 2b 20 06 sll %o4, 6, %o2 4000afe8: 96 a2 c0 0d subcc %o3, %o5, %o3 4000afec: 94 10 40 0a or %g1, %o2, %o2 4000aff0: 94 62 80 0c subx %o2, %o4, %o2 4000aff4: 96 82 c0 09 addcc %o3, %o1, %o3 4000aff8: 94 42 80 08 addx %o2, %o0, %o2 4000affc: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b000: 85 2a a0 02 sll %o2, 2, %g2 4000b004: 84 10 40 02 or %g1, %g2, %g2 4000b008: 87 2a e0 02 sll %o3, 2, %g3 4000b00c: 96 82 c0 03 addcc %o3, %g3, %o3 4000b010: 94 42 80 02 addx %o2, %g2, %o2 4000b014: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b018: 85 2a a0 02 sll %o2, 2, %g2 4000b01c: 84 10 40 02 or %g1, %g2, %g2 4000b020: 87 2a e0 02 sll %o3, 2, %g3 4000b024: 96 82 c0 03 addcc %o3, %g3, %o3 4000b028: 94 42 80 02 addx %o2, %g2, %o2 4000b02c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b030: 85 2a a0 02 sll %o2, 2, %g2 4000b034: 84 10 40 02 or %g1, %g2, %g2 4000b038: 87 2a e0 02 sll %o3, 2, %g3 4000b03c: 96 82 c0 03 addcc %o3, %g3, %o3 4000b040: 94 42 80 02 addx %o2, %g2, %o2 4000b044: 85 32 e0 17 srl %o3, 0x17, %g2 4000b048: 83 2a a0 09 sll %o2, 9, %g1 4000b04c: 9b 2a e0 09 sll %o3, 9, %o5 4000b050: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000b054: 96 83 40 0f addcc %o5, %o7, %o3 4000b058: 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; 4000b05c: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000b060: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000b064: 80 92 80 0b orcc %o2, %o3, %g0 4000b068: 12 80 00 06 bne 4000b080 <_Timespec_Divide+0xe0> 4000b06c: d0 06 00 00 ld [ %i0 ], %o0 *ival_percentage = 0; 4000b070: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000b074: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000b078: 81 c7 e0 08 ret <== NOT EXECUTED 4000b07c: 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; 4000b080: 92 10 00 08 mov %o0, %o1 4000b084: 83 32 60 1d srl %o1, 0x1d, %g1 4000b088: 9b 2a 60 03 sll %o1, 3, %o5 4000b08c: 91 3a 20 1f sra %o0, 0x1f, %o0 4000b090: 99 2a 20 03 sll %o0, 3, %o4 4000b094: 98 10 40 0c or %g1, %o4, %o4 4000b098: 83 33 60 1b srl %o5, 0x1b, %g1 4000b09c: 85 2b 20 05 sll %o4, 5, %g2 4000b0a0: 87 2b 60 05 sll %o5, 5, %g3 4000b0a4: 84 10 40 02 or %g1, %g2, %g2 4000b0a8: 86 a0 c0 0d subcc %g3, %o5, %g3 4000b0ac: 83 30 e0 1a srl %g3, 0x1a, %g1 4000b0b0: 84 60 80 0c subx %g2, %o4, %g2 4000b0b4: 9b 28 e0 06 sll %g3, 6, %o5 4000b0b8: 99 28 a0 06 sll %g2, 6, %o4 4000b0bc: 9a a3 40 03 subcc %o5, %g3, %o5 4000b0c0: 98 10 40 0c or %g1, %o4, %o4 4000b0c4: 98 63 00 02 subx %o4, %g2, %o4 4000b0c8: 9a 83 40 09 addcc %o5, %o1, %o5 4000b0cc: 83 33 60 1e srl %o5, 0x1e, %g1 4000b0d0: 98 43 00 08 addx %o4, %o0, %o4 4000b0d4: 87 2b 60 02 sll %o5, 2, %g3 4000b0d8: 85 2b 20 02 sll %o4, 2, %g2 4000b0dc: 9a 83 40 03 addcc %o5, %g3, %o5 4000b0e0: 84 10 40 02 or %g1, %g2, %g2 4000b0e4: 83 33 60 1e srl %o5, 0x1e, %g1 4000b0e8: 98 43 00 02 addx %o4, %g2, %o4 4000b0ec: 87 2b 60 02 sll %o5, 2, %g3 4000b0f0: 85 2b 20 02 sll %o4, 2, %g2 4000b0f4: 9a 83 40 03 addcc %o5, %g3, %o5 4000b0f8: 84 10 40 02 or %g1, %g2, %g2 4000b0fc: 83 33 60 1e srl %o5, 0x1e, %g1 4000b100: 98 43 00 02 addx %o4, %g2, %o4 4000b104: 87 2b 60 02 sll %o5, 2, %g3 4000b108: 85 2b 20 02 sll %o4, 2, %g2 4000b10c: 9a 83 40 03 addcc %o5, %g3, %o5 4000b110: 84 10 40 02 or %g1, %g2, %g2 4000b114: 98 43 00 02 addx %o4, %g2, %o4 4000b118: 83 2b 20 09 sll %o4, 9, %g1 4000b11c: 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; 4000b120: 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; 4000b124: a0 10 80 01 or %g2, %g1, %l0 4000b128: 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; 4000b12c: a2 84 40 13 addcc %l1, %l3, %l1 4000b130: 83 34 60 1e srl %l1, 0x1e, %g1 4000b134: 87 2c 60 02 sll %l1, 2, %g3 4000b138: a5 3c a0 1f sra %l2, 0x1f, %l2 4000b13c: a0 44 00 12 addx %l0, %l2, %l0 4000b140: 85 2c 20 02 sll %l0, 2, %g2 4000b144: 84 10 40 02 or %g1, %g2, %g2 4000b148: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b14c: 99 28 a0 05 sll %g2, 5, %o4 4000b150: 9b 28 e0 05 sll %g3, 5, %o5 4000b154: 98 10 40 0c or %g1, %o4, %o4 4000b158: 9a a3 40 03 subcc %o5, %g3, %o5 4000b15c: 98 63 00 02 subx %o4, %g2, %o4 4000b160: 9a 83 40 11 addcc %o5, %l1, %o5 4000b164: 83 33 60 1e srl %o5, 0x1e, %g1 4000b168: 98 43 00 10 addx %o4, %l0, %o4 4000b16c: 87 2b 60 02 sll %o5, 2, %g3 4000b170: 85 2b 20 02 sll %o4, 2, %g2 4000b174: 9a 83 40 03 addcc %o5, %g3, %o5 4000b178: 84 10 40 02 or %g1, %g2, %g2 4000b17c: 83 33 60 1e srl %o5, 0x1e, %g1 4000b180: 87 2b 60 02 sll %o5, 2, %g3 4000b184: 98 43 00 02 addx %o4, %g2, %o4 4000b188: 9a 83 40 03 addcc %o5, %g3, %o5 4000b18c: 85 2b 20 02 sll %o4, 2, %g2 4000b190: 84 10 40 02 or %g1, %g2, %g2 4000b194: 83 33 60 1b srl %o5, 0x1b, %g1 4000b198: 98 43 00 02 addx %o4, %g2, %o4 4000b19c: 99 2b 20 05 sll %o4, 5, %o4 4000b1a0: 98 10 40 0c or %g1, %o4, %o4 4000b1a4: 93 2b 60 05 sll %o5, 5, %o1 4000b1a8: 40 00 32 ef call 40017d64 <__udivdi3> 4000b1ac: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000b1b0: 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; 4000b1b4: a0 10 00 08 mov %o0, %l0 4000b1b8: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000b1bc: 96 10 23 e8 mov 0x3e8, %o3 4000b1c0: 40 00 32 e9 call 40017d64 <__udivdi3> 4000b1c4: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000b1c8: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000b1cc: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000b1d0: 94 10 20 00 clr %o2 4000b1d4: 92 10 00 11 mov %l1, %o1 4000b1d8: 40 00 33 bf call 400180d4 <__umoddi3> 4000b1dc: 96 10 23 e8 mov 0x3e8, %o3 4000b1e0: d2 26 c0 00 st %o1, [ %i3 ] 4000b1e4: 81 c7 e0 08 ret 4000b1e8: 81 e8 00 00 restore 400136ac <_Timespec_From_ticks>: void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 400136ac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 400136b0: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 400136b4: d2 00 63 60 ld [ %g1 + 0x360 ], %o1 ! 40027b60 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 400136b8: 40 00 2f 2e call 4001f370 <.umul> <== NOT EXECUTED 400136bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 400136c0: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 400136c4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 400136c8: 7f ff b8 3a call 400017b0 <.udiv> <== NOT EXECUTED 400136cc: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 400136d0: 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; 400136d4: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 400136d8: 40 00 2f 60 call 4001f458 <.urem> <== NOT EXECUTED 400136dc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400136e0: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 400136e4: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 400136e8: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 400136ec: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 400136f0: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED 400136f4: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 400136f8: 81 c7 e0 08 ret <== NOT EXECUTED 400136fc: 81 e8 00 00 restore <== NOT EXECUTED 40013700 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 40013700: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013704: 02 80 00 0f be 40013740 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40013708: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 4001370c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40013710: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40013714: 06 80 00 0b bl 40013740 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40013718: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 4001371c: d0 02 20 04 ld [ %o0 + 4 ], %o0 <== NOT EXECUTED 40013720: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013724: 06 80 00 07 bl 40013740 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40013728: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 <== NOT EXECUTED 4001372c: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <== NOT EXECUTED 40013730: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40013734: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40013738: 81 c3 e0 08 retl <== NOT EXECUTED 4001373c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 40013740: 81 c3 e0 08 retl <== NOT EXECUTED 40013744: 90 10 20 00 clr %o0 <== NOT EXECUTED 40013748 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 40013748: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 4001374c: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED 40013750: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40013754: 12 80 00 06 bne 4001376c <_Timespec_To_ticks+0x24> <== NOT EXECUTED 40013758: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 4001375c: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40013760: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40013764: 02 80 00 13 be 400137b0 <_Timespec_To_ticks+0x68> <== NOT EXECUTED 40013768: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 4001376c: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 40013770: e2 00 63 60 ld [ %g1 + 0x360 ], %l1 ! 40027b60 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40013774: 11 00 03 d0 sethi %hi(0xf4000), %o0 <== NOT EXECUTED 40013778: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001377c: 7f ff b8 0d call 400017b0 <.udiv> <== NOT EXECUTED 40013780: 90 12 22 40 or %o0, 0x240, %o0 <== NOT EXECUTED 40013784: 40 00 2e fb call 4001f370 <.umul> <== NOT EXECUTED 40013788: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001378c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 40013790: d0 04 a0 04 ld [ %l2 + 4 ], %o0 <== NOT EXECUTED 40013794: 7f ff b8 07 call 400017b0 <.udiv> <== NOT EXECUTED 40013798: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED 4001379c: 7f ff b8 05 call 400017b0 <.udiv> <== NOT EXECUTED 400137a0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 400137a4: b0 82 00 10 addcc %o0, %l0, %i0 <== NOT EXECUTED 400137a8: 22 80 00 02 be,a 400137b0 <_Timespec_To_ticks+0x68> <== NOT EXECUTED 400137ac: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return ticks; return 1; } 400137b0: 81 c7 e0 08 ret <== NOT EXECUTED 400137b4: 81 e8 00 00 restore <== NOT EXECUTED 4000c634 <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 4000c634: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4000c638: 11 10 00 64 sethi %hi(0x40019000), %o0 4000c63c: 92 10 00 18 mov %i0, %o1 4000c640: 7f ff e9 ef call 40006dfc <_Chain_Append> 4000c644: 90 12 21 18 or %o0, 0x118, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4000c648: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000c64c: 80 a0 60 00 cmp %g1, 0 4000c650: 02 80 00 06 be 4000c668 <_User_extensions_Add_API_set+0x34> 4000c654: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 4000c658: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 4000c65c: 31 10 00 63 sethi %hi(0x40018c00), %i0 4000c660: 7f ff e9 e7 call 40006dfc <_Chain_Append> 4000c664: 91 ee 22 e4 restore %i0, 0x2e4, %o0 4000c668: 81 c7 e0 08 ret <== NOT EXECUTED 4000c66c: 81 e8 00 00 restore <== NOT EXECUTED 4000e190 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000e190: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 4000e194: 40 00 11 dc call 40012904 <_Chain_Extract> 4000e198: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000e19c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000e1a0: 80 a0 60 00 cmp %g1, 0 4000e1a4: 02 80 00 04 be 4000e1b4 <_User_extensions_Remove_set+0x24> 4000e1a8: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 4000e1ac: 40 00 11 d6 call 40012904 <_Chain_Extract> <== NOT EXECUTED 4000e1b0: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000e1b4: 81 c7 e0 08 ret 4000e1b8: 81 e8 00 00 restore 40009518 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40009518: 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 ; 4000951c: 03 10 00 64 sethi %hi(0x40019000), %g1 40009520: e0 00 61 18 ld [ %g1 + 0x118 ], %l0 ! 40019118 <_User_extensions_List> 40009524: 82 10 61 18 or %g1, 0x118, %g1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40009528: 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)( 4000952c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009530: 10 80 00 0d b 40009564 <_User_extensions_Thread_create+0x4c> 40009534: a2 10 63 a0 or %g1, 0x3a0, %l1 ! 40018fa0 <_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 ) { 40009538: 80 a0 60 00 cmp %g1, 0 4000953c: 02 80 00 09 be 40009560 <_User_extensions_Thread_create+0x48> 40009540: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40009544: 9f c0 40 00 call %g1 40009548: d0 04 40 00 ld [ %l1 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 4000954c: 80 8a 20 ff btst 0xff, %o0 40009550: 32 80 00 05 bne,a 40009564 <_User_extensions_Thread_create+0x4c> 40009554: e0 04 00 00 ld [ %l0 ], %l0 40009558: 81 c7 e0 08 ret <== NOT EXECUTED 4000955c: 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 ) { 40009560: 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 ) ; 40009564: 80 a4 00 12 cmp %l0, %l2 40009568: 32 bf ff f4 bne,a 40009538 <_User_extensions_Thread_create+0x20> 4000956c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40009570: 81 c7 e0 08 ret 40009574: 91 e8 20 01 restore %g0, 1, %o0 40016d74 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 40016d74: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 40016d78: 80 a6 60 00 cmp %i1, 0 40016d7c: 02 80 00 31 be 40016e40 <_Watchdog_Adjust_to_chain+0xcc> 40016d80: 01 00 00 00 nop return; } _ISR_Disable( level ); 40016d84: 7f ff d1 e3 call 4000b510 40016d88: 01 00 00 00 nop 40016d8c: a4 10 00 08 mov %o0, %l2 if ( !_Chain_Is_empty( header ) ) { 40016d90: c2 06 00 00 ld [ %i0 ], %g1 40016d94: a2 06 20 04 add %i0, 4, %l1 40016d98: 80 a0 40 11 cmp %g1, %l1 40016d9c: 02 80 00 27 be 40016e38 <_Watchdog_Adjust_to_chain+0xc4> 40016da0: 01 00 00 00 nop 40016da4: a6 06 a0 04 add %i2, 4, %l3 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 40016da8: c4 06 00 00 ld [ %i0 ], %g2 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 40016dac: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0 40016db0: 80 a6 40 10 cmp %i1, %l0 40016db4: 3a 80 00 05 bcc,a 40016dc8 <_Watchdog_Adjust_to_chain+0x54> 40016db8: c0 20 a0 10 clr [ %g2 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 40016dbc: 82 24 00 19 sub %l0, %i1, %g1 40016dc0: 10 80 00 1e b 40016e38 <_Watchdog_Adjust_to_chain+0xc4> 40016dc4: 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)); 40016dc8: 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)) 40016dcc: 80 a0 80 11 cmp %g2, %l1 40016dd0: 32 80 00 04 bne,a 40016de0 <_Watchdog_Adjust_to_chain+0x6c> 40016dd4: c2 00 80 00 ld [ %g2 ], %g1 40016dd8: 10 80 00 04 b 40016de8 <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED 40016ddc: 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; 40016de0: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 40016de4: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40016de8: e6 20 80 00 st %l3, [ %g2 ] old_last_node = the_chain->last; 40016dec: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 40016df0: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40016df4: 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; 40016df8: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 40016dfc: 7f ff d1 c9 call 4000b520 40016e00: 90 10 00 12 mov %l2, %o0 40016e04: 7f ff d1 c3 call 4000b510 40016e08: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40016e0c: c2 06 00 00 ld [ %i0 ], %g1 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40016e10: 80 a0 40 11 cmp %g1, %l1 40016e14: 02 80 00 09 be 40016e38 <_Watchdog_Adjust_to_chain+0xc4> 40016e18: 01 00 00 00 nop 40016e1c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40016e20: 80 a0 60 00 cmp %g1, 0 40016e24: 22 bf ff ea be,a 40016dcc <_Watchdog_Adjust_to_chain+0x58> 40016e28: c4 06 00 00 ld [ %i0 ], %g2 return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 40016e2c: b2 a6 40 10 subcc %i1, %l0, %i1 40016e30: 32 bf ff df bne,a 40016dac <_Watchdog_Adjust_to_chain+0x38> 40016e34: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED break; } } } _ISR_Enable( level ); 40016e38: 7f ff d1 ba call 4000b520 40016e3c: 91 e8 00 12 restore %g0, %l2, %o0 40016e40: 81 c7 e0 08 ret 40016e44: 81 e8 00 00 restore 40009650 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009650: 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; 40009654: 03 10 00 63 sethi %hi(0x40018c00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009658: 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; 4000965c: e6 00 63 7c ld [ %g1 + 0x37c ], %l3 _ISR_Disable( level ); 40009660: 7f ff e1 be call 40001d58 40009664: 01 00 00 00 nop 40009668: 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 ) { 4000966c: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009670: 80 a0 60 00 cmp %g1, 0 40009674: 02 80 00 03 be 40009680 <_Watchdog_Insert+0x30> 40009678: 07 10 00 64 sethi %hi(0x40019000), %g3 _ISR_Enable( level ); 4000967c: 30 80 00 39 b,a 40009760 <_Watchdog_Insert+0x110> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40009680: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 ! 40019030 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009684: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40009688: 82 00 60 01 inc %g1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4000968c: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 40009690: c2 20 e0 30 st %g1, [ %g3 + 0x30 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009694: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009698: a8 10 63 9c or %g1, 0x39c, %l4 ! 40018f9c <_Watchdog_Sync_level> 4000969c: ac 10 00 14 mov %l4, %l6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 400096a0: 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 ; 400096a4: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 400096a8: 80 a4 a0 00 cmp %l2, 0 400096ac: 22 80 00 1c be,a 4000971c <_Watchdog_Insert+0xcc> 400096b0: c4 04 60 04 ld [ %l1 + 4 ], %g2 400096b4: c2 04 40 00 ld [ %l1 ], %g1 400096b8: 80 a0 60 00 cmp %g1, 0 400096bc: 22 80 00 18 be,a 4000971c <_Watchdog_Insert+0xcc> 400096c0: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 400096c4: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 400096c8: 80 a4 80 10 cmp %l2, %l0 400096cc: 1a 80 00 04 bcc 400096dc <_Watchdog_Insert+0x8c> 400096d0: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 400096d4: 10 80 00 11 b 40009718 <_Watchdog_Insert+0xc8> 400096d8: 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 ); 400096dc: 7f ff e1 a3 call 40001d68 400096e0: 90 10 00 18 mov %i0, %o0 400096e4: 7f ff e1 9d call 40001d58 400096e8: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 400096ec: c2 06 60 08 ld [ %i1 + 8 ], %g1 400096f0: 80 a0 60 01 cmp %g1, 1 400096f4: 12 80 00 15 bne 40009748 <_Watchdog_Insert+0xf8> 400096f8: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 400096fc: c2 05 00 00 ld [ %l4 ], %g1 40009700: 80 a0 40 13 cmp %g1, %l3 40009704: 28 bf ff e9 bleu,a 400096a8 <_Watchdog_Insert+0x58> 40009708: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 4000970c: e6 25 80 00 st %l3, [ %l6 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40009710: 10 bf ff e5 b 400096a4 <_Watchdog_Insert+0x54> 40009714: 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 ); 40009718: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000971c: 03 10 00 64 sethi %hi(0x40019000), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40009720: c6 00 80 00 ld [ %g2 ], %g3 40009724: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 after_node->next = the_node; 40009728: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4000972c: c4 26 60 04 st %g2, [ %i1 + 4 ] 40009730: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40009734: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40009738: 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; 4000973c: 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; 40009740: c6 26 40 00 st %g3, [ %i1 ] 40009744: 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; 40009748: 03 10 00 63 sethi %hi(0x40018c00), %g1 _Watchdog_Sync_count--; 4000974c: 05 10 00 64 sethi %hi(0x40019000), %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; 40009750: e6 20 63 9c st %l3, [ %g1 + 0x39c ] _Watchdog_Sync_count--; 40009754: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40009758: 82 00 7f ff add %g1, -1, %g1 4000975c: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] _ISR_Enable( level ); 40009760: 7f ff e1 82 call 40001d68 40009764: 81 e8 00 00 restore 40009768: 01 00 00 00 nop 400097b8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 400097b8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 400097bc: 7f ff e1 67 call 40001d58 400097c0: 01 00 00 00 nop previous_state = the_watchdog->state; 400097c4: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 400097c8: 80 a4 20 01 cmp %l0, 1 400097cc: 22 80 00 1e be,a 40009844 <_Watchdog_Remove+0x8c> 400097d0: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 400097d4: 0a 80 00 1d bcs 40009848 <_Watchdog_Remove+0x90> 400097d8: 03 10 00 64 sethi %hi(0x40019000), %g1 400097dc: 80 a4 20 03 cmp %l0, 3 400097e0: 18 80 00 1a bgu 40009848 <_Watchdog_Remove+0x90> 400097e4: 01 00 00 00 nop 400097e8: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 400097ec: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 400097f0: c2 00 c0 00 ld [ %g3 ], %g1 400097f4: 80 a0 60 00 cmp %g1, 0 400097f8: 02 80 00 07 be 40009814 <_Watchdog_Remove+0x5c> 400097fc: 03 10 00 64 sethi %hi(0x40019000), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 40009800: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 40009804: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 40009808: 82 00 40 02 add %g1, %g2, %g1 4000980c: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 40009810: 03 10 00 64 sethi %hi(0x40019000), %g1 40009814: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 40019030 <_Watchdog_Sync_count> 40009818: 80 a0 60 00 cmp %g1, 0 4000981c: 22 80 00 07 be,a 40009838 <_Watchdog_Remove+0x80> 40009820: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 40009824: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009828: c4 00 63 7c ld [ %g1 + 0x37c ], %g2 ! 40018f7c <_ISR_Nest_level> 4000982c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009830: c4 20 63 9c st %g2, [ %g1 + 0x39c ] ! 40018f9c <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40009834: c4 06 00 00 ld [ %i0 ], %g2 previous = the_node->previous; 40009838: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 4000983c: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40009840: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40009844: 03 10 00 64 sethi %hi(0x40019000), %g1 40009848: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 ! 40019034 <_Watchdog_Ticks_since_boot> 4000984c: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 40009850: 7f ff e1 46 call 40001d68 40009854: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 40009858: 81 c7 e0 08 ret 4000985c: 81 e8 00 00 restore 40009970 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 40009970: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 40009974: 80 a6 20 00 cmp %i0, 0 40009978: 02 80 00 04 be 40009988 <_Workspace_Handler_initialization+0x18> 4000997c: 80 8e 20 07 btst 7, %i0 40009980: 02 80 00 06 be 40009998 <_Workspace_Handler_initialization+0x28> 40009984: 03 10 00 63 sethi %hi(0x40018c00), %g1 _Internal_error_Occurred( 40009988: 90 10 20 00 clr %o0 4000998c: 92 10 20 01 mov 1, %o1 40009990: 10 80 00 15 b 400099e4 <_Workspace_Handler_initialization+0x74> 40009994: 94 10 20 02 mov 2, %o2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 40009998: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 4000999c: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 400099a0: 80 a0 60 00 cmp %g1, 0 400099a4: 02 80 00 07 be 400099c0 <_Workspace_Handler_initialization+0x50> 400099a8: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, size ); 400099ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400099b0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400099b4: 40 00 0f ed call 4000d968 <== NOT EXECUTED 400099b8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 400099bc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400099c0: 94 10 00 19 mov %i1, %o2 400099c4: 11 10 00 63 sethi %hi(0x40018c00), %o0 400099c8: 96 10 20 08 mov 8, %o3 400099cc: 7f ff f6 62 call 40007354 <_Heap_Initialize> 400099d0: 90 12 23 04 or %o0, 0x304, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 400099d4: 80 a2 20 00 cmp %o0, 0 400099d8: 12 80 00 05 bne 400099ec <_Workspace_Handler_initialization+0x7c> 400099dc: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 400099e0: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 400099e4: 7f ff f6 e6 call 4000757c <_Internal_error_Occurred> 400099e8: 01 00 00 00 nop 400099ec: 81 c7 e0 08 ret 400099f0: 81 e8 00 00 restore 40007af8 : 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 ) { 40007af8: 9d e3 bf 98 save %sp, -104, %sp 40007afc: 92 10 00 19 mov %i1, %o1 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40007b00: 80 a6 60 00 cmp %i1, 0 40007b04: 02 80 00 3f be 40007c00 40007b08: a0 10 00 18 mov %i0, %l0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40007b0c: 80 a6 a0 00 cmp %i2, 0 40007b10: 02 80 00 3c be 40007c00 40007b14: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40007b18: c2 06 40 00 ld [ %i1 ], %g1 40007b1c: 80 a0 60 00 cmp %g1, 0 40007b20: 32 80 00 07 bne,a 40007b3c 40007b24: c0 26 80 00 clr [ %i2 ] 40007b28: c2 06 60 04 ld [ %i1 + 4 ], %g1 40007b2c: 80 a0 60 00 cmp %g1, 0 40007b30: 02 80 00 34 be 40007c00 40007b34: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40007b38: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40007b3c: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40007b40: c8 00 61 a0 ld [ %g1 + 0x1a0 ], %g4 ! 4001cda0 <_IO_Number_of_drivers> 40007b44: 80 a4 00 04 cmp %l0, %g4 40007b48: 1a 80 00 31 bcc 40007c0c 40007b4c: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40007b50: 80 a4 20 00 cmp %l0, 0 40007b54: 12 80 00 18 bne 40007bb4 40007b58: 03 10 00 73 sethi %hi(0x4001cc00), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007b5c: c6 00 61 a4 ld [ %g1 + 0x1a4 ], %g3 ! 4001cda4 <_IO_Driver_address_table> 40007b60: 85 29 20 03 sll %g4, 3, %g2 40007b64: 83 29 20 05 sll %g4, 5, %g1 40007b68: a0 01 3f ff add %g4, -1, %l0 40007b6c: 82 20 40 02 sub %g1, %g2, %g1 40007b70: 82 00 7f e8 add %g1, -24, %g1 40007b74: 10 80 00 0b b 40007ba0 40007b78: 86 00 c0 01 add %g3, %g1, %g3 if ( !_IO_Driver_address_table[major].initialization_entry && 40007b7c: 80 a0 60 00 cmp %g1, 0 40007b80: 32 80 00 07 bne,a 40007b9c 40007b84: a0 04 3f ff add %l0, -1, %l0 40007b88: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40007b8c: 80 a0 60 00 cmp %g1, 0 40007b90: 02 80 00 09 be 40007bb4 40007b94: 03 10 00 73 sethi %hi(0x4001cc00), %g1 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007b98: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED 40007b9c: 86 00 ff e8 add %g3, -24, %g3 40007ba0: 80 a4 20 00 cmp %l0, 0 40007ba4: 32 bf ff f6 bne,a 40007b7c 40007ba8: c2 00 c0 00 ld [ %g3 ], %g1 40007bac: 81 c7 e0 08 ret 40007bb0: 91 e8 20 05 restore %g0, 5, %o0 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40007bb4: c6 00 61 a4 ld [ %g1 + 0x1a4 ], %g3 40007bb8: 85 2c 20 03 sll %l0, 3, %g2 40007bbc: 83 2c 20 05 sll %l0, 5, %g1 40007bc0: 82 20 40 02 sub %g1, %g2, %g1 40007bc4: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 40007bc8: 80 a0 a0 00 cmp %g2, 0 40007bcc: 12 80 00 0f bne 40007c08 40007bd0: 90 00 c0 01 add %g3, %g1, %o0 40007bd4: c2 02 20 04 ld [ %o0 + 4 ], %g1 40007bd8: 80 a0 60 00 cmp %g1, 0 40007bdc: 32 80 00 0c bne,a 40007c0c 40007be0: 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; 40007be4: 40 00 1b 11 call 4000e828 40007be8: 94 10 20 18 mov 0x18, %o2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40007bec: 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; 40007bf0: e0 26 80 00 st %l0, [ %i2 ] return rtems_io_initialize( major, 0, NULL ); 40007bf4: b2 10 20 00 clr %i1 40007bf8: 7f ff ff 4f call 40007934 40007bfc: 95 e8 20 00 restore %g0, 0, %o2 40007c00: 81 c7 e0 08 ret 40007c04: 91 e8 20 09 restore %g0, 9, %o0 40007c08: b0 10 20 0c mov 0xc, %i0 } 40007c0c: 81 c7 e0 08 ret 40007c10: 81 e8 00 00 restore 40008ea8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40008ea8: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40008eac: 80 a6 20 00 cmp %i0, 0 40008eb0: 02 80 00 1d be 40008f24 40008eb4: 03 10 00 94 sethi %hi(0x40025000), %g1 return; 40008eb8: a4 10 63 44 or %g1, 0x344, %l2 ! 40025344 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008ebc: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40008ec0: c2 04 80 00 ld [ %l2 ], %g1 40008ec4: 80 a0 60 00 cmp %g1, 0 40008ec8: 22 80 00 14 be,a 40008f18 40008ecc: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40008ed0: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40008ed4: 80 a4 60 00 cmp %l1, 0 40008ed8: 12 80 00 0b bne 40008f04 40008edc: a0 10 20 01 mov 1, %l0 for ( i=1 ; i <= information->maximum ; i++ ) { 40008ee0: 10 80 00 0e b 40008f18 <== NOT EXECUTED 40008ee4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40008ee8: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 40008eec: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 40008ef0: 80 a2 20 00 cmp %o0, 0 40008ef4: 02 80 00 04 be 40008f04 40008ef8: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40008efc: 9f c6 00 00 call %i0 40008f00: 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++ ) { 40008f04: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40008f08: 80 a4 00 01 cmp %l0, %g1 40008f0c: 08 bf ff f7 bleu 40008ee8 40008f10: 91 2c 20 02 sll %l0, 2, %o0 40008f14: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008f18: 80 a4 80 13 cmp %l2, %l3 40008f1c: 32 bf ff ea bne,a 40008ec4 40008f20: c2 04 80 00 ld [ %l2 ], %g1 40008f24: 81 c7 e0 08 ret 40008f28: 81 e8 00 00 restore 4000f980 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 4000f980: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 4000f984: a2 96 20 00 orcc %i0, 0, %l1 4000f988: 02 80 00 14 be 4000f9d8 4000f98c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000f990: 80 a7 20 00 cmp %i4, 0 4000f994: 02 80 00 24 be 4000fa24 4000f998: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 4000f99c: 80 88 60 07 btst 7, %g1 4000f9a0: 12 80 00 0e bne 4000f9d8 4000f9a4: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f9a8: 05 10 00 ca sethi %hi(0x40032800), %g2 4000f9ac: c2 00 a2 60 ld [ %g2 + 0x260 ], %g1 ! 40032a60 <_Thread_Dispatch_disable_level> 4000f9b0: 82 00 60 01 inc %g1 4000f9b4: c2 20 a2 60 st %g1, [ %g2 + 0x260 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 4000f9b8: 21 10 00 c9 sethi %hi(0x40032400), %l0 4000f9bc: 40 00 13 b9 call 400148a0 <_Objects_Allocate> 4000f9c0: 90 14 23 dc or %l0, 0x3dc, %o0 ! 400327dc <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 4000f9c4: 80 a2 20 00 cmp %o0, 0 4000f9c8: 32 80 00 06 bne,a 4000f9e0 4000f9cc: c4 02 20 08 ld [ %o0 + 8 ], %g2 _Thread_Enable_dispatch(); 4000f9d0: 40 00 17 73 call 4001579c <_Thread_Enable_dispatch> 4000f9d4: b0 10 20 05 mov 5, %i0 4000f9d8: 81 c7 e0 08 ret 4000f9dc: 81 e8 00 00 restore #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000f9e0: 82 14 23 dc or %l0, 0x3dc, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000f9e4: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000f9e8: 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; 4000f9ec: 82 06 ff ff add %i3, -1, %g1 4000f9f0: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 4000f9f4: c4 27 00 00 st %g2, [ %i4 ] 4000f9f8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000f9fc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000fa00: 84 08 80 01 and %g2, %g1, %g2 4000fa04: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 4000fa08: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 4000fa0c: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 4000fa10: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 4000fa14: 40 00 17 62 call 4001579c <_Thread_Enable_dispatch> 4000fa18: b0 10 20 00 clr %i0 4000fa1c: 81 c7 e0 08 ret 4000fa20: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 4000fa24: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 4000fa28: 81 c7 e0 08 ret <== NOT EXECUTED 4000fa2c: 81 e8 00 00 restore <== NOT EXECUTED 40007590 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40007590: 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 *) 40007594: 11 10 00 76 sethi %hi(0x4001d800), %o0 40007598: 92 10 00 18 mov %i0, %o1 4000759c: 90 12 20 4c or %o0, 0x4c, %o0 400075a0: 40 00 08 bd call 40009894 <_Objects_Get> 400075a4: 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 ) { 400075a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400075ac: 80 a0 60 00 cmp %g1, 0 400075b0: 12 80 00 64 bne 40007740 400075b4: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 400075b8: 27 10 00 76 sethi %hi(0x4001d800), %l3 400075bc: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 400075c0: c2 04 e2 80 ld [ %l3 + 0x280 ], %g1 400075c4: 80 a0 80 01 cmp %g2, %g1 400075c8: 02 80 00 06 be 400075e0 400075cc: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 400075d0: 40 00 0b 04 call 4000a1e0 <_Thread_Enable_dispatch> 400075d4: b0 10 20 17 mov 0x17, %i0 400075d8: 81 c7 e0 08 ret 400075dc: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 400075e0: 12 80 00 0c bne 40007610 400075e4: 01 00 00 00 nop switch ( the_period->state ) { 400075e8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400075ec: 80 a0 60 00 cmp %g1, 0 400075f0: 02 80 00 50 be 40007730 400075f4: b0 10 20 0b mov 0xb, %i0 400075f8: 82 00 7f fd add %g1, -3, %g1 400075fc: 80 a0 60 01 cmp %g1, 1 40007600: 18 80 00 4c bgu 40007730 40007604: 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(); 40007608: 10 80 00 4a b 40007730 4000760c: b0 10 20 06 mov 6, %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007610: 7f ff ed 8c call 40002c40 40007614: 01 00 00 00 nop 40007618: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 4000761c: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 40007620: 80 a4 a0 02 cmp %l2, 2 40007624: 02 80 00 1a be 4000768c 40007628: 80 a4 a0 04 cmp %l2, 4 4000762c: 02 80 00 34 be 400076fc 40007630: 80 a4 a0 00 cmp %l2, 0 40007634: 12 80 00 43 bne 40007740 40007638: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 4000763c: 7f ff ed 85 call 40002c50 40007640: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40007644: 7f ff ff 5e call 400073bc <_Rate_monotonic_Initiate_statistics> 40007648: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000764c: 82 10 20 02 mov 2, %g1 40007650: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007654: 03 10 00 1e sethi %hi(0x40007800), %g1 40007658: 82 10 62 14 or %g1, 0x214, %g1 ! 40007a14 <_Rate_monotonic_Timeout> the_watchdog->id = id; 4000765c: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007660: 92 04 60 10 add %l1, 0x10, %o1 40007664: 11 10 00 76 sethi %hi(0x4001d800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007668: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000766c: 90 12 22 a0 or %o0, 0x2a0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007670: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007674: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007678: f2 24 60 4c st %i1, [ %l1 + 0x4c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000767c: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007680: 40 00 10 14 call 4000b6d0 <_Watchdog_Insert> 40007684: b0 10 20 00 clr %i0 40007688: 30 80 00 2a b,a 40007730 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 4000768c: 7f ff ff 68 call 4000742c <_Rate_monotonic_Update_statistics> 40007690: 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; 40007694: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007698: 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; 4000769c: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 400076a0: 7f ff ed 6c call 40002c50 400076a4: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 400076a8: c2 04 e2 80 ld [ %l3 + 0x280 ], %g1 400076ac: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 400076b0: 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; 400076b4: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 400076b8: 40 00 0d 3d call 4000abac <_Thread_Set_state> 400076bc: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 400076c0: 7f ff ed 60 call 40002c40 400076c4: 01 00 00 00 nop local_state = the_period->state; 400076c8: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 400076cc: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 400076d0: 7f ff ed 60 call 40002c50 400076d4: 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 ) 400076d8: 80 a4 20 03 cmp %l0, 3 400076dc: 12 80 00 04 bne 400076ec 400076e0: d0 04 e2 80 ld [ %l3 + 0x280 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 400076e4: 40 00 09 c4 call 40009df4 <_Thread_Clear_state> <== NOT EXECUTED 400076e8: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 400076ec: 40 00 0a bd call 4000a1e0 <_Thread_Enable_dispatch> 400076f0: b0 10 20 00 clr %i0 400076f4: 81 c7 e0 08 ret 400076f8: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 400076fc: 7f ff ff 4c call 4000742c <_Rate_monotonic_Update_statistics> 40007700: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40007704: 7f ff ed 53 call 40002c50 40007708: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000770c: 82 10 20 02 mov 2, %g1 40007710: 11 10 00 76 sethi %hi(0x4001d800), %o0 40007714: 92 04 60 10 add %l1, 0x10, %o1 40007718: 90 12 22 a0 or %o0, 0x2a0, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000771c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40007720: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007724: 40 00 0f eb call 4000b6d0 <_Watchdog_Insert> 40007728: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4000772c: b0 10 20 06 mov 6, %i0 40007730: 40 00 0a ac call 4000a1e0 <_Thread_Enable_dispatch> 40007734: 01 00 00 00 nop 40007738: 81 c7 e0 08 ret 4000773c: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007740: 81 c7 e0 08 ret 40007744: 91 e8 20 04 restore %g0, 4, %o0 40010f28 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40010f28: 9d e3 bf 90 save %sp, -112, %sp 40010f2c: 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 ) 40010f30: 80 a6 60 00 cmp %i1, 0 40010f34: 02 80 00 2c be 40010fe4 40010f38: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010f3c: 03 10 00 ca sethi %hi(0x40032800), %g1 40010f40: 40 00 08 f4 call 40013310 <_API_Mutex_Lock> 40010f44: d0 00 63 18 ld [ %g1 + 0x318 ], %o0 ! 40032b18 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010f48: 92 10 00 10 mov %l0, %o1 40010f4c: 11 10 00 ca sethi %hi(0x40032800), %o0 40010f50: 94 07 bf f0 add %fp, -16, %o2 40010f54: 40 00 0f ad call 40014e08 <_Objects_Get_no_protection> 40010f58: 90 12 20 9c or %o0, 0x9c, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010f5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40010f60: 80 a0 60 00 cmp %g1, 0 40010f64: 02 80 00 05 be 40010f78 40010f68: a0 10 00 08 mov %o0, %l0 40010f6c: 80 a0 60 01 cmp %g1, 1 40010f70: 10 80 00 0f b 40010fac 40010f74: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40010f78: 92 10 00 19 mov %i1, %o1 40010f7c: 94 10 00 1a mov %i2, %o2 40010f80: 90 02 20 68 add %o0, 0x68, %o0 40010f84: 96 07 bf f4 add %fp, -12, %o3 40010f88: 40 00 0b e3 call 40013f14 <_Heap_Extend> 40010f8c: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 40010f90: 80 a2 20 01 cmp %o0, 1 40010f94: 02 80 00 12 be 40010fdc 40010f98: 03 10 00 ca sethi %hi(0x40032800), %g1 40010f9c: 0a 80 00 08 bcs 40010fbc 40010fa0: c6 07 bf f4 ld [ %fp + -12 ], %g3 40010fa4: 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; 40010fa8: b0 10 20 18 mov 0x18, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 40010fac: 32 80 00 0b bne,a 40010fd8 40010fb0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010fb4: 10 80 00 0a b 40010fdc 40010fb8: 03 10 00 ca sethi %hi(0x40032800), %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010fbc: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 40010fc0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010fc4: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40010fc8: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010fcc: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 40010fd0: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40010fd4: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010fd8: 03 10 00 ca sethi %hi(0x40032800), %g1 40010fdc: 40 00 08 e3 call 40013368 <_API_Mutex_Unlock> 40010fe0: d0 00 63 18 ld [ %g1 + 0x318 ], %o0 ! 40032b18 <_RTEMS_Allocator_Mutex> return return_status; } 40010fe4: 81 c7 e0 08 ret 40010fe8: 81 e8 00 00 restore 400112f0 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400112f0: 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 ) 400112f4: 80 a6 e0 00 cmp %i3, 0 400112f8: 02 80 00 32 be 400113c0 400112fc: 21 10 00 ca sethi %hi(0x40032800), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 40011300: 40 00 08 04 call 40013310 <_API_Mutex_Lock> 40011304: d0 04 23 18 ld [ %l0 + 0x318 ], %o0 ! 40032b18 <_RTEMS_Allocator_Mutex> 40011308: 92 10 00 18 mov %i0, %o1 4001130c: 11 10 00 ca sethi %hi(0x40032800), %o0 40011310: 94 07 bf f0 add %fp, -16, %o2 40011314: 40 00 0e bd call 40014e08 <_Objects_Get_no_protection> 40011318: 90 12 20 9c or %o0, 0x9c, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001131c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40011320: 80 a0 60 00 cmp %g1, 0 40011324: 02 80 00 0b be 40011350 40011328: b0 10 00 08 mov %o0, %i0 4001132c: 82 18 60 01 xor %g1, 1, %g1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011330: d0 04 23 18 ld [ %l0 + 0x318 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011334: 80 a0 00 01 cmp %g0, %g1 40011338: 82 40 3f ff addx %g0, -1, %g1 4001133c: b0 08 7f eb and %g1, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011340: 40 00 08 0a call 40013368 <_API_Mutex_Unlock> 40011344: b0 06 20 19 add %i0, 0x19, %i0 40011348: 81 c7 e0 08 ret 4001134c: 81 e8 00 00 restore case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40011350: 94 10 00 1a mov %i2, %o2 40011354: 92 10 00 19 mov %i1, %o1 40011358: 90 02 20 68 add %o0, 0x68, %o0 4001135c: 96 07 bf ec add %fp, -20, %o3 40011360: 40 00 0c 6d call 40014514 <_Heap_Resize_block> 40011364: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40011368: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 4001136c: b4 92 20 00 orcc %o0, 0, %i2 40011370: 12 80 00 0b bne 4001139c 40011374: c2 26 c0 00 st %g1, [ %i3 ] 40011378: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001137c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011380: 02 80 00 08 be 400113a0 <== NOT EXECUTED 40011384: 03 10 00 ca sethi %hi(0x40032800), %g1 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 40011388: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001138c: 40 00 1f 71 call 40019150 <_Region_Process_queue> <== NOT EXECUTED 40011390: b0 10 20 00 clr %i0 <== NOT EXECUTED 40011394: 81 c7 e0 08 ret <== NOT EXECUTED 40011398: 81 e8 00 00 restore <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 4001139c: 03 10 00 ca sethi %hi(0x40032800), %g1 400113a0: d0 00 63 18 ld [ %g1 + 0x318 ], %o0 ! 40032b18 <_RTEMS_Allocator_Mutex> 400113a4: 40 00 07 f1 call 40013368 <_API_Mutex_Unlock> 400113a8: b0 10 20 00 clr %i0 return 400113ac: 80 a6 a0 00 cmp %i2, 0 400113b0: 02 bf ff e6 be 40011348 400113b4: 80 a6 a0 01 cmp %i2, 1 400113b8: 02 bf ff e4 be 40011348 400113bc: b0 10 20 0d mov 0xd, %i0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 400113c0: b0 10 20 09 mov 9, %i0 } 400113c4: 81 c7 e0 08 ret 400113c8: 81 e8 00 00 restore 40006100 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40006100: 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 ) ) 40006104: a4 96 20 00 orcc %i0, 0, %l2 40006108: 02 80 00 23 be 40006194 4000610c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40006110: 80 a7 20 00 cmp %i4, 0 40006114: 02 80 00 20 be 40006194 40006118: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4000611c: 84 8e a0 c0 andcc %i2, 0xc0, %g2 40006120: 02 80 00 0d be 40006154 40006124: 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); 40006128: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4000612c: 80 a0 60 10 cmp %g1, 0x10 40006130: 02 80 00 04 be 40006140 40006134: 80 a0 60 20 cmp %g1, 0x20 40006138: 32 80 00 17 bne,a 40006194 4000613c: b0 10 20 0b mov 0xb, %i0 40006140: 80 8e a0 04 btst 4, %i2 40006144: 02 80 00 64 be 400062d4 40006148: 80 a0 a0 c0 cmp %g2, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4000614c: 02 80 00 62 be 400062d4 40006150: 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 ) ) 40006154: 02 80 00 04 be 40006164 40006158: 80 a6 60 01 cmp %i1, 1 4000615c: 18 80 00 0e bgu 40006194 40006160: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006164: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006168: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 40018ee0 <_Thread_Dispatch_disable_level> 4000616c: 84 00 a0 01 inc %g2 40006170: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ] * 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 ); 40006174: 11 10 00 63 sethi %hi(0x40018c00), %o0 40006178: 40 00 05 30 call 40007638 <_Objects_Allocate> 4000617c: 90 12 21 a4 or %o0, 0x1a4, %o0 ! 40018da4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40006180: a0 92 20 00 orcc %o0, 0, %l0 40006184: 12 80 00 06 bne 4000619c 40006188: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 4000618c: 40 00 08 d8 call 400084ec <_Thread_Enable_dispatch> 40006190: b0 10 20 05 mov 5, %i0 40006194: 81 c7 e0 08 ret 40006198: 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 ) ) { 4000619c: 02 80 00 33 be 40006268 400061a0: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 400061a4: 80 8e a0 40 btst 0x40, %i2 400061a8: 12 80 00 06 bne 400061c0 400061ac: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 400061b0: 80 8e a0 80 btst 0x80, %i2 400061b4: 02 80 00 05 be 400061c8 400061b8: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 400061bc: 82 10 20 03 mov 3, %g1 400061c0: 10 80 00 05 b 400061d4 400061c4: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 400061c8: 12 bf ff fe bne 400061c0 400061cc: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 400061d0: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 400061d4: 80 a4 60 10 cmp %l1, 0x10 400061d8: 12 80 00 0f bne 40006214 400061dc: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 400061e0: c2 07 bf e8 ld [ %fp + -24 ], %g1 400061e4: 80 a0 60 01 cmp %g1, 1 400061e8: 08 80 00 07 bleu 40006204 400061ec: c0 27 bf e0 clr [ %fp + -32 ] 400061f0: 80 a0 60 03 cmp %g1, 3 400061f4: 38 80 00 0b bgu,a 40006220 400061f8: 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; 400061fc: 10 80 00 04 b 4000620c 40006200: 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; 40006204: 10 80 00 06 b 4000621c 40006208: 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; 4000620c: 10 80 00 04 b 4000621c 40006210: 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; 40006214: 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; 40006218: 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( 4000621c: 82 1e 60 01 xor %i1, 1, %g1 40006220: 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; 40006224: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40006228: 94 60 3f ff subx %g0, -1, %o2 4000622c: 90 04 20 14 add %l0, 0x14, %o0 40006230: 40 00 03 03 call 40006e3c <_CORE_mutex_Initialize> 40006234: 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 ) { 40006238: 80 a2 20 06 cmp %o0, 6 4000623c: 32 80 00 19 bne,a 400062a0 40006240: 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 ); 40006244: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40006248: 11 10 00 63 sethi %hi(0x40018c00), %o0 <== NOT EXECUTED 4000624c: 90 12 21 a4 or %o0, 0x1a4, %o0 ! 40018da4 <_Semaphore_Information> <== NOT EXECUTED 40006250: 40 00 05 e7 call 400079ec <_Objects_Free> <== NOT EXECUTED 40006254: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40006258: 40 00 08 a5 call 400084ec <_Thread_Enable_dispatch> <== NOT EXECUTED 4000625c: 01 00 00 00 nop <== NOT EXECUTED 40006260: 81 c7 e0 08 ret <== NOT EXECUTED 40006264: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 40006268: 80 8e a0 04 btst 4, %i2 4000626c: 22 80 00 04 be,a 4000627c 40006270: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 40006274: 82 10 20 01 mov 1, %g1 40006278: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4000627c: 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; 40006280: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 40006284: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 40006288: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4000628c: 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( 40006290: 90 04 20 14 add %l0, 0x14, %o0 40006294: 40 00 03 c1 call 40007198 <_CORE_semaphore_Initialize> 40006298: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000629c: c4 04 20 08 ld [ %l0 + 8 ], %g2 400062a0: 03 10 00 63 sethi %hi(0x40018c00), %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 400062a4: e4 24 20 0c st %l2, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400062a8: c6 00 61 c0 ld [ %g1 + 0x1c0 ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 400062ac: c4 27 00 00 st %g2, [ %i4 ] 400062b0: 03 00 00 3f sethi %hi(0xfc00), %g1 400062b4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400062b8: 84 08 80 01 and %g2, %g1, %g2 400062bc: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 400062c0: b0 10 20 00 clr %i0 400062c4: 40 00 08 8a call 400084ec <_Thread_Enable_dispatch> 400062c8: e0 20 c0 02 st %l0, [ %g3 + %g2 ] 400062cc: 81 c7 e0 08 ret 400062d0: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 400062d4: b0 10 20 0b mov 0xb, %i0 } 400062d8: 81 c7 e0 08 ret 400062dc: 81 e8 00 00 restore 40022a78 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40022a78: 9d e3 bf 90 save %sp, -112, %sp 40022a7c: 11 10 01 70 sethi %hi(0x4005c000), %o0 40022a80: 92 10 00 18 mov %i0, %o1 40022a84: 90 12 23 c8 or %o0, 0x3c8, %o0 40022a88: 7f ff a4 c8 call 4000bda8 <_Objects_Get> 40022a8c: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40022a90: c2 07 bf f4 ld [ %fp + -12 ], %g1 40022a94: 80 a0 60 00 cmp %g1, 0 40022a98: 12 80 00 0f bne 40022ad4 40022a9c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40022aa0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40022aa4: 80 88 60 30 btst 0x30, %g1 40022aa8: 02 80 00 06 be 40022ac0 40022aac: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 40022ab0: 92 10 20 00 clr %o1 40022ab4: 7f ff a0 f9 call 4000ae98 <_CORE_mutex_Flush> 40022ab8: 94 10 20 01 mov 1, %o2 40022abc: 30 80 00 04 b,a 40022acc &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40022ac0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40022ac4: 7f ff a1 cc call 4000b1f4 <_CORE_semaphore_Flush> <== NOT EXECUTED 40022ac8: 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(); 40022acc: 7f ff a7 0e call 4000c704 <_Thread_Enable_dispatch> 40022ad0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40022ad4: 81 c7 e0 08 ret 40022ad8: 81 e8 00 00 restore 40016680 : */ void rtems_shutdown_executive( uint32_t result ) { 40016680: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 40016684: 05 10 00 64 sethi %hi(0x40019000), %g2 40016688: c2 00 a0 84 ld [ %g2 + 0x84 ], %g1 ! 40019084 <_System_state_Current> 4001668c: 80 a0 60 04 cmp %g1, 4 40016690: 02 80 00 07 be 400166ac 40016694: 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 ); 40016698: 13 10 00 63 sethi %hi(0x40018c00), %o1 4001669c: c2 20 a0 84 st %g1, [ %g2 + 0x84 ] 400166a0: 92 12 62 58 or %o1, 0x258, %o1 400166a4: 7f ff cc d4 call 400099f4 <_CPU_Context_switch> 400166a8: 90 07 bf 70 add %fp, -144, %o0 400166ac: 81 c7 e0 08 ret <== NOT EXECUTED 400166b0: 81 e8 00 00 restore <== NOT EXECUTED 40012304 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012304: 9d e3 bf 90 save %sp, -112, %sp 40012308: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 4001230c: 80 a6 60 00 cmp %i1, 0 40012310: 02 80 00 1c be 40012380 40012314: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40012318: 80 a6 a0 00 cmp %i2, 0 4001231c: 02 80 00 19 be 40012380 40012320: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40012324: 11 10 00 cb sethi %hi(0x40032c00), %o0 40012328: 92 10 00 12 mov %l2, %o1 4001232c: 90 12 21 80 or %o0, 0x180, %o0 40012330: 40 00 0a c8 call 40014e50 <_Objects_Get> 40012334: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012338: c2 07 bf f4 ld [ %fp + -12 ], %g1 4001233c: a0 10 00 08 mov %o0, %l0 40012340: 80 a0 60 00 cmp %g1, 0 40012344: 12 80 00 0f bne 40012380 40012348: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 4001234c: a2 02 20 10 add %o0, 0x10, %l1 40012350: 40 00 13 18 call 40016fb0 <_Watchdog_Remove> 40012354: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40012358: 7f ff e4 6e call 4000b510 4001235c: 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 ) { 40012360: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012364: 80 a0 60 00 cmp %g1, 0 40012368: 22 80 00 08 be,a 40012388 4001236c: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 40012370: 7f ff e4 6c call 4000b520 <== NOT EXECUTED 40012374: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012378: 40 00 0d 09 call 4001579c <_Thread_Enable_dispatch> <== NOT EXECUTED 4001237c: 01 00 00 00 nop <== NOT EXECUTED 40012380: 81 c7 e0 08 ret 40012384: 81 e8 00 00 restore void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40012388: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 4001238c: 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; 40012390: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012394: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 40012398: 7f ff e4 62 call 4000b520 4001239c: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400123a0: 92 10 00 11 mov %l1, %o1 400123a4: 11 10 00 ca sethi %hi(0x40032800), %o0 400123a8: 90 12 23 40 or %o0, 0x340, %o0 ! 40032b40 <_Watchdog_Ticks_chain> 400123ac: 40 00 12 a7 call 40016e48 <_Watchdog_Insert> 400123b0: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 400123b4: 40 00 0c fa call 4001579c <_Thread_Enable_dispatch> 400123b8: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400123bc: 81 c7 e0 08 ret 400123c0: 81 e8 00 00 restore 400127c8 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 400127c8: 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 ) && 400127cc: 80 a6 20 00 cmp %i0, 0 400127d0: 02 80 00 06 be 400127e8 400127d4: 82 10 20 00 clr %g1 400127d8: 03 10 00 b6 sethi %hi(0x4002d800), %g1 400127dc: c2 08 60 a4 ldub [ %g1 + 0xa4 ], %g1 ! 4002d8a4 400127e0: 80 a0 40 18 cmp %g1, %i0 400127e4: 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 ) ) { 400127e8: 80 a0 60 00 cmp %g1, 0 400127ec: 12 80 00 06 bne 40012804 400127f0: a2 10 00 18 mov %i0, %l1 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 400127f4: 80 a6 3f ff cmp %i0, -1 400127f8: 12 80 00 56 bne 40012950 400127fc: 90 10 20 13 mov 0x13, %o0 40012800: a2 10 20 00 clr %l1 40012804: 05 10 00 ca sethi %hi(0x40032800), %g2 40012808: c2 00 a2 60 ld [ %g2 + 0x260 ], %g1 ! 40032a60 <_Thread_Dispatch_disable_level> 4001280c: 82 00 60 01 inc %g1 40012810: c2 20 a2 60 st %g1, [ %g2 + 0x260 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012814: 31 10 00 b8 sethi %hi(0x4002e000), %i0 initialized = true; 40012818: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 4001281c: e0 0e 23 84 ldub [ %i0 + 0x384 ], %l0 initialized = true; _Thread_Enable_dispatch(); 40012820: 40 00 0b df call 4001579c <_Thread_Enable_dispatch> 40012824: c2 2e 23 84 stb %g1, [ %i0 + 0x384 ] if ( tmpInitialized ) 40012828: 80 a4 20 00 cmp %l0, 0 4001282c: 12 80 00 49 bne 40012950 40012830: 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); 40012834: 05 10 00 ca sethi %hi(0x40032800), %g2 40012838: 82 10 a1 7c or %g2, 0x17c, %g1 ! 4003297c <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001283c: 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; 40012840: 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); 40012844: 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( 40012848: 92 10 00 11 mov %l1, %o1 4001284c: 94 10 00 19 mov %i1, %o2 40012850: 19 00 00 20 sethi %hi(0x8000), %o4 40012854: c2 20 a1 7c st %g1, [ %g2 + 0x17c ] 40012858: 98 16 80 0c or %i2, %o4, %o4 4001285c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40012860: 96 10 21 00 mov 0x100, %o3 40012864: 90 12 21 45 or %o0, 0x145, %o0 40012868: 7f ff fc 77 call 40011a44 4001286c: 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) { 40012870: 80 a2 20 00 cmp %o0, 0 40012874: 02 80 00 04 be 40012884 40012878: 03 10 00 ca sethi %hi(0x40032800), %g1 initialized = false; 4001287c: 10 80 00 35 b 40012950 40012880: c0 2e 23 84 clrb [ %i0 + 0x384 ] * 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( 40012884: 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 ) 40012888: 86 10 61 1c or %g1, 0x11c, %g3 4001288c: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40012890: 03 00 00 3f sethi %hi(0xfc00), %g1 40012894: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40012898: 82 0a c0 01 and %o3, %g1, %g1 4001289c: 80 a0 40 02 cmp %g1, %g2 400128a0: 18 80 00 05 bgu 400128b4 400128a4: 98 10 20 00 clr %o4 return NULL; return information->local_table[ index ]; 400128a8: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 400128ac: 83 28 60 02 sll %g1, 2, %g1 400128b0: d8 00 80 01 ld [ %g2 + %g1 ], %o4 400128b4: 1b 10 00 ca sethi %hi(0x40032800), %o5 400128b8: 82 13 61 70 or %o5, 0x170, %g1 ! 40032970 <_Timer_Seconds_chain> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400128bc: 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; 400128c0: 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); 400128c4: 82 00 60 04 add %g1, 4, %g1 400128c8: c2 23 61 70 st %g1, [ %o5 + 0x170 ] 400128cc: 03 10 00 cb sethi %hi(0x40032c00), %g1 400128d0: 09 10 00 ca sethi %hi(0x40032800), %g4 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400128d4: c0 23 20 6c clr [ %o4 + 0x6c ] 400128d8: 84 11 21 5c or %g4, 0x15c, %g2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400128dc: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 400128e0: d6 23 20 68 st %o3, [ %o4 + 0x68 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400128e4: 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; 400128e8: c0 20 a0 04 clr [ %g2 + 4 ] 400128ec: d8 20 61 c4 st %o4, [ %g1 + 0x1c4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400128f0: 84 00 a0 04 add %g2, 4, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400128f4: 07 10 00 55 sethi %hi(0x40015400), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400128f8: 03 10 00 ca sethi %hi(0x40032800), %g1 the_watchdog->routine = routine; 400128fc: 86 10 e2 18 or %g3, 0x218, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012900: 82 10 61 88 or %g1, 0x188, %g1 the_watchdog->routine = routine; 40012904: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40012908: c4 21 21 5c st %g2, [ %g4 + 0x15c ] 4001290c: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40012910: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012914: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012918: 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; 4001291c: 05 10 00 cb sethi %hi(0x40032c00), %g2 40012920: 03 10 00 4a sethi %hi(0x40012800), %g1 40012924: 82 10 61 58 or %g1, 0x158, %g1 ! 40012958 <_Timer_Server_schedule_operation_method> /* * Start the timer server */ status = rtems_task_start( 40012928: 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; 4001292c: c2 20 a1 c0 st %g1, [ %g2 + 0x1c0 ] /* * Start the timer server */ status = rtems_task_start( 40012930: 13 10 00 4a sethi %hi(0x40012800), %o1 40012934: 94 10 20 00 clr %o2 40012938: 7f ff fd 99 call 40011f9c 4001293c: 92 12 62 08 or %o1, 0x208, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40012940: 80 a2 20 00 cmp %o0, 0 40012944: 02 80 00 03 be 40012950 40012948: 03 10 00 b8 sethi %hi(0x4002e000), %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; 4001294c: c0 28 63 84 clrb [ %g1 + 0x384 ] ! 4002e384 <== NOT EXECUTED } return status; } 40012950: 81 c7 e0 08 ret 40012954: 91 e8 00 08 restore %g0, %o0, %o0 4001253c : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 4001253c: 9d e3 bf 90 save %sp, -112, %sp 40012540: 11 10 00 cb sethi %hi(0x40032c00), %o0 40012544: 92 10 00 18 mov %i0, %o1 40012548: 90 12 21 80 or %o0, 0x180, %o0 4001254c: 40 00 0a 41 call 40014e50 <_Objects_Get> 40012550: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012554: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012558: a0 10 00 08 mov %o0, %l0 4001255c: 80 a0 60 00 cmp %g1, 0 40012560: 12 80 00 19 bne 400125c4 40012564: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40012568: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 4001256c: 80 a0 60 01 cmp %g1, 1 40012570: 22 80 00 0f be,a 400125ac 40012574: 31 10 00 cb sethi %hi(0x40032c00), %i0 40012578: 2a 80 00 06 bcs,a 40012590 4001257c: a0 02 20 10 add %o0, 0x10, %l0 40012580: 80 a0 60 04 cmp %g1, 4 40012584: 18 80 00 1c bgu 400125f4 40012588: 01 00 00 00 nop 4001258c: 30 80 00 16 b,a 400125e4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 40012590: 40 00 12 88 call 40016fb0 <_Watchdog_Remove> 40012594: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 40012598: 92 10 00 10 mov %l0, %o1 4001259c: 11 10 00 ca sethi %hi(0x40032800), %o0 400125a0: 40 00 12 2a call 40016e48 <_Watchdog_Insert> 400125a4: 90 12 23 40 or %o0, 0x340, %o0 ! 40032b40 <_Watchdog_Ticks_chain> 400125a8: 30 80 00 13 b,a 400125f4 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 400125ac: c2 06 21 c0 ld [ %i0 + 0x1c0 ], %g1 400125b0: 80 a0 60 00 cmp %g1, 0 400125b4: 12 80 00 06 bne 400125cc 400125b8: 01 00 00 00 nop _Thread_Enable_dispatch(); 400125bc: 40 00 0c 78 call 4001579c <_Thread_Enable_dispatch> <== NOT EXECUTED 400125c0: b0 10 20 0e mov 0xe, %i0 ! e <== NOT EXECUTED 400125c4: 81 c7 e0 08 ret 400125c8: 81 e8 00 00 restore return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400125cc: 40 00 12 79 call 40016fb0 <_Watchdog_Remove> 400125d0: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 400125d4: c2 06 21 c0 ld [ %i0 + 0x1c0 ], %g1 400125d8: 9f c0 40 00 call %g1 400125dc: 90 10 00 10 mov %l0, %o0 400125e0: 30 80 00 05 b,a 400125f4 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 400125e4: 40 00 0c 6e call 4001579c <_Thread_Enable_dispatch> 400125e8: b0 10 20 0b mov 0xb, %i0 400125ec: 81 c7 e0 08 ret 400125f0: 81 e8 00 00 restore return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400125f4: 40 00 0c 6a call 4001579c <_Thread_Enable_dispatch> 400125f8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400125fc: 81 c7 e0 08 ret 40012600: 81 e8 00 00 restore 40012604 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012604: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012608: 03 10 00 cb sethi %hi(0x40032c00), %g1 4001260c: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 40032dc4 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012610: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012614: 80 a0 60 00 cmp %g1, 0 40012618: 02 80 00 1e be 40012690 4001261c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40012620: 80 a6 a0 00 cmp %i2, 0 40012624: 02 80 00 1b be 40012690 40012628: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001262c: 80 a6 60 00 cmp %i1, 0 40012630: 02 80 00 18 be 40012690 40012634: b0 10 20 0a mov 0xa, %i0 40012638: 11 10 00 cb sethi %hi(0x40032c00), %o0 4001263c: 92 10 00 11 mov %l1, %o1 40012640: 90 12 21 80 or %o0, 0x180, %o0 40012644: 40 00 0a 03 call 40014e50 <_Objects_Get> 40012648: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001264c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012650: a0 10 00 08 mov %o0, %l0 40012654: 80 a0 60 00 cmp %g1, 0 40012658: 12 80 00 0e bne 40012690 4001265c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012660: 40 00 12 54 call 40016fb0 <_Watchdog_Remove> 40012664: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40012668: 7f ff e3 aa call 4000b510 4001266c: 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 ) { 40012670: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012674: 80 a0 60 00 cmp %g1, 0 40012678: 02 80 00 08 be 40012698 4001267c: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 40012680: 7f ff e3 a8 call 4000b520 <== NOT EXECUTED 40012684: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012688: 40 00 0c 45 call 4001579c <_Thread_Enable_dispatch> <== NOT EXECUTED 4001268c: 01 00 00 00 nop <== NOT EXECUTED 40012690: 81 c7 e0 08 ret 40012694: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012698: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 4001269c: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400126a0: 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; 400126a4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400126a8: 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; 400126ac: 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 ); 400126b0: 7f ff e3 9c call 4000b520 400126b4: 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 ); 400126b8: 03 10 00 cb sethi %hi(0x40032c00), %g1 400126bc: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 40032dc0 <_Timer_Server_schedule_operation> 400126c0: 9f c0 40 00 call %g1 400126c4: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400126c8: 40 00 0c 35 call 4001579c <_Thread_Enable_dispatch> 400126cc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400126d0: 81 c7 e0 08 ret 400126d4: 81 e8 00 00 restore