40006068 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40006068: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4000606c: 03 10 00 62 sethi %hi(0x40018800), %g1 40006070: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 40018a64 <_API_extensions_List> 40006074: 82 10 62 64 or %g1, 0x264, %g1 40006078: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 4000607c: 80 a4 00 11 cmp %l0, %l1 40006080: 02 80 00 0c be 400060b0 <_API_extensions_Run_postdriver+0x48> 40006084: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40006088: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000608c: 80 a0 60 00 cmp %g1, 0 40006090: 22 80 00 05 be,a 400060a4 <_API_extensions_Run_postdriver+0x3c> 40006094: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40006098: 9f c0 40 00 call %g1 4000609c: 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 ) { 400060a0: 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 ) ; 400060a4: 80 a4 00 11 cmp %l0, %l1 400060a8: 32 bf ff f9 bne,a 4000608c <_API_extensions_Run_postdriver+0x24> 400060ac: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 400060b0: 81 c7 e0 08 ret 400060b4: 81 e8 00 00 restore 400060b8 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 400060b8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400060bc: 03 10 00 62 sethi %hi(0x40018800), %g1 400060c0: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 40018a64 <_API_extensions_List> 400060c4: 82 10 62 64 or %g1, 0x264, %g1 400060c8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400060cc: 80 a4 00 11 cmp %l0, %l1 400060d0: 02 80 00 0d be 40006104 <_API_extensions_Run_postswitch+0x4c> 400060d4: 03 10 00 62 sethi %hi(0x40018800), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 400060d8: a4 10 60 e0 or %g1, 0xe0, %l2 ! 400188e0 <_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 ) 400060dc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400060e0: 80 a0 60 00 cmp %g1, 0 400060e4: 22 80 00 05 be,a 400060f8 <_API_extensions_Run_postswitch+0x40> 400060e8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 400060ec: 9f c0 40 00 call %g1 400060f0: d0 04 80 00 ld [ %l2 ], %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 ) { 400060f4: 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 ) ; 400060f8: 80 a4 00 11 cmp %l0, %l1 400060fc: 32 bf ff f9 bne,a 400060e0 <_API_extensions_Run_postswitch+0x28> 40006100: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 40006104: 81 c7 e0 08 ret 40006108: 81 e8 00 00 restore 40006018 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40006018: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4000601c: 03 10 00 62 sethi %hi(0x40018800), %g1 40006020: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 40018a64 <_API_extensions_List> 40006024: 82 10 62 64 or %g1, 0x264, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40006028: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 4000602c: 80 a4 00 11 cmp %l0, %l1 40006030: 02 80 00 0c be 40006060 <_API_extensions_Run_predriver+0x48> 40006034: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 40006038: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000603c: 80 a0 60 00 cmp %g1, 0 40006040: 22 80 00 05 be,a 40006054 <_API_extensions_Run_predriver+0x3c> 40006044: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40006048: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000604c: 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 ) { 40006050: 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 ) ; 40006054: 80 a4 00 11 cmp %l0, %l1 40006058: 32 bf ff f9 bne,a 4000603c <_API_extensions_Run_predriver+0x24> 4000605c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40006060: 81 c7 e0 08 ret 40006064: 81 e8 00 00 restore 40012604 <_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 ) { 40012604: 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 ) { 40012608: 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 ) { 4001260c: 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 ) { 40012610: 80 a0 40 1a cmp %g1, %i2 40012614: 0a 80 00 17 bcs 40012670 <_CORE_message_queue_Broadcast+0x6c> 40012618: 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 ) { 4001261c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40012620: 80 a0 60 00 cmp %g1, 0 40012624: 02 80 00 0a be 4001264c <_CORE_message_queue_Broadcast+0x48> 40012628: a2 10 20 00 clr %l1 *count = 0; 4001262c: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 40012630: 81 c7 e0 08 ret <== NOT EXECUTED 40012634: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40012638: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 4001263c: 40 00 20 30 call 4001a6fc 40012640: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40012644: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40012648: 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))) { 4001264c: 40 00 0a 05 call 40014e60 <_Thread_queue_Dequeue> 40012650: 90 10 00 12 mov %l2, %o0 40012654: 92 10 00 19 mov %i1, %o1 40012658: a0 10 00 08 mov %o0, %l0 4001265c: 80 a2 20 00 cmp %o0, 0 40012660: 12 bf ff f6 bne 40012638 <_CORE_message_queue_Broadcast+0x34> 40012664: 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; 40012668: e2 27 40 00 st %l1, [ %i5 ] 4001266c: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40012670: 81 c7 e0 08 ret 40012674: 81 e8 00 00 restore 400170cc <_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 ) { 400170cc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 400170d0: 03 20 00 00 sethi %hi(0x80000000), %g1 400170d4: 80 a6 80 01 cmp %i2, %g1 400170d8: 02 80 00 41 be 400171dc <_CORE_message_queue_Insert_message+0x110> 400170dc: f4 26 60 08 st %i2, [ %i1 + 8 ] 400170e0: 82 00 7c 00 add %g1, -1024, %g1 400170e4: 82 10 63 ff or %g1, 0x3ff, %g1 400170e8: 80 a6 80 01 cmp %i2, %g1 400170ec: 02 80 00 2a be 40017194 <_CORE_message_queue_Insert_message+0xc8> 400170f0: 84 06 20 54 add %i0, 0x54, %g2 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; 400170f4: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 400170f8: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 400170fc: 32 80 00 22 bne,a 40017184 <_CORE_message_queue_Insert_message+0xb8> <== NOT EXECUTED 40017100: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40017104: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 40017108: 7f ff ad 12 call 40002550 <== NOT EXECUTED 4001710c: 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 ); 40017110: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 40017114: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40017118: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4001711c: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40017120: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 40017124: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40017128: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 4001712c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40017130: 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; 40017134: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 40017138: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 4001713c: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 40017140: 7f ff ad 08 call 40002560 <== NOT EXECUTED 40017144: 01 00 00 00 nop <== NOT EXECUTED * 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 ) 40017148: 80 8c 20 ff btst 0xff, %l0 <== NOT EXECUTED 4001714c: 02 80 00 08 be 4001716c <_CORE_message_queue_Insert_message+0xa0> 40017150: 01 00 00 00 nop 40017154: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 40017158: 80 a0 60 00 cmp %g1, 0 4001715c: 02 80 00 04 be 4001716c <_CORE_message_queue_Insert_message+0xa0> 40017160: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 40017164: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017168: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 4001716c: 81 c7 e0 08 ret 40017170: 81 e8 00 00 restore 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 ) ) { 40017174: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 40017178: 22 bf ff e4 be,a 40017108 <_CORE_message_queue_Insert_message+0x3c> <== NOT EXECUTED 4001717c: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 40017180: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40017184: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 40017188: 36 bf ff fb bge,a 40017174 <_CORE_message_queue_Insert_message+0xa8> <== NOT EXECUTED 4001718c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 40017190: 30 bf ff de b,a 40017108 <_CORE_message_queue_Insert_message+0x3c> <== NOT EXECUTED the_message->priority = submit_type; switch ( submit_type ) { case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 40017194: 7f ff ac ef call 40002550 40017198: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 4001719c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400171a0: 82 06 20 54 add %i0, 0x54, %g1 400171a4: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 400171a8: c6 06 20 58 ld [ %i0 + 0x58 ], %g3 the_chain->last = the_node; 400171ac: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 400171b0: 80 a0 00 02 cmp %g0, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 400171b4: c6 26 60 04 st %g3, [ %i1 + 4 ] 400171b8: 82 60 3f ff subx %g0, -1, %g1 400171bc: 84 00 a0 01 inc %g2 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; 400171c0: f2 20 c0 00 st %i1, [ %g3 ] 400171c4: a0 10 00 01 mov %g1, %l0 400171c8: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 400171cc: 7f ff ac e5 call 40002560 400171d0: 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 ) 400171d4: 10 bf ff de b 4001714c <_CORE_message_queue_Insert_message+0x80> 400171d8: 80 8c 20 ff btst 0xff, %l0 notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 400171dc: 7f ff ac dd call 40002550 400171e0: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 400171e4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400171e8: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 400171ec: 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; 400171f0: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400171f4: c2 26 60 04 st %g1, [ %i1 + 4 ] 400171f8: 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; 400171fc: f2 20 e0 04 st %i1, [ %g3 + 4 ] 40017200: 82 60 3f ff subx %g0, -1, %g1 40017204: 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; 40017208: c6 26 40 00 st %g3, [ %i1 ] 4001720c: a0 10 00 01 mov %g1, %l0 40017210: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 40017214: 7f ff ac d3 call 40002560 40017218: 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 ) 4001721c: 10 bf ff cc b 4001714c <_CORE_message_queue_Insert_message+0x80> 40017220: 80 8c 20 ff btst 0xff, %l0 40013e58 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40013e58: 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; 40013e5c: 27 10 00 a4 sethi %hi(0x40029000), %l3 40013e60: e2 04 e3 80 ld [ %l3 + 0x380 ], %l1 ! 40029380 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40013e64: a4 10 00 19 mov %i1, %l2 Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 40013e68: 7f ff b9 ba call 40002550 40013e6c: c0 24 60 34 clr [ %l1 + 0x34 ] */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40013e70: 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)) 40013e74: 82 06 20 54 add %i0, 0x54, %g1 40013e78: 80 a6 40 01 cmp %i1, %g1 40013e7c: 02 80 00 21 be 40013f00 <_CORE_message_queue_Seize+0xa8> 40013e80: 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; 40013e84: c6 06 40 00 ld [ %i1 ], %g3 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 40013e88: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_chain->first = new_first; 40013e8c: c6 26 20 50 st %g3, [ %i0 + 0x50 ] 40013e90: 82 00 7f ff add %g1, -1, %g1 40013e94: c2 26 20 48 st %g1, [ %i0 + 0x48 ] new_first->previous = _Chain_Head(the_chain); 40013e98: c4 20 e0 04 st %g2, [ %g3 + 4 ] _ISR_Enable( level ); 40013e9c: 7f ff b9 b1 call 40002560 40013ea0: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 40013ea4: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 40013ea8: c4 04 e3 80 ld [ %l3 + 0x380 ], %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; 40013eac: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 40013eb0: c2 06 60 08 ld [ %i1 + 8 ], %g1 40013eb4: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40013eb8: 92 10 00 11 mov %l1, %o1 40013ebc: 40 00 14 7f call 400190b8 40013ec0: 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 ); 40013ec4: 7f ff e9 5c call 4000e434 <_Thread_queue_Dequeue> 40013ec8: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 40013ecc: 80 a2 20 00 cmp %o0, 0 40013ed0: 02 80 00 1f be 40013f4c <_CORE_message_queue_Seize+0xf4> 40013ed4: 01 00 00 00 nop * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; the_message->Contents.size = (size_t) the_thread->Wait.option; 40013ed8: d4 02 20 30 ld [ %o0 + 0x30 ], %o2 <== 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; 40013edc: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 40013ee0: 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; 40013ee4: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED 40013ee8: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 40013eec: 40 00 14 73 call 400190b8 <== NOT EXECUTED 40013ef0: 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( 40013ef4: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 40013ef8: 40 00 0c 75 call 400170cc <_CORE_message_queue_Insert_message> <== NOT EXECUTED 40013efc: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 40013f00: 80 8f 20 ff btst 0xff, %i4 40013f04: 02 80 00 0c be 40013f34 <_CORE_message_queue_Seize+0xdc> 40013f08: 82 10 20 01 mov 1, %g1 40013f0c: c2 26 20 30 st %g1, [ %i0 + 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; 40013f10: f6 24 60 28 st %i3, [ %l1 + 0x28 ] 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; 40013f14: f0 24 60 44 st %i0, [ %l1 + 0x44 ] executing->Wait.id = id; 40013f18: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 40013f1c: f4 24 60 2c st %i2, [ %l1 + 0x2c ] executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 40013f20: 7f ff b9 90 call 40002560 40013f24: 35 10 00 3a sethi %hi(0x4000e800), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40013f28: b2 10 00 1d mov %i5, %i1 40013f2c: 7f ff e9 a6 call 4000e5c4 <_Thread_queue_Enqueue_with_handler> 40013f30: 95 ee a2 1c restore %i2, 0x21c, %o2 ); return; } if ( !wait ) { _ISR_Enable( level ); 40013f34: 7f ff b9 8b call 40002560 40013f38: 01 00 00 00 nop executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 40013f3c: 82 10 20 04 mov 4, %g1 ! 4 40013f40: 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 ); } 40013f44: 81 c7 e0 08 ret 40013f48: 81 e8 00 00 restore 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 ); 40013f4c: 7f ff e2 25 call 4000c7e0 <_Chain_Append> 40013f50: 91 ee 20 68 restore %i0, 0x68, %o0 40013f54: 01 00 00 00 nop 40013f58 <_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 ) { 40013f58: 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 ) { 40013f5c: 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 ) { 40013f60: 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 ) { 40013f64: 80 a0 40 1a cmp %g1, %i2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 40013f68: 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 ) { 40013f6c: 0a 80 00 22 bcs 40013ff4 <_CORE_message_queue_Submit+0x9c> 40013f70: 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 ) { 40013f74: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40013f78: 80 a0 a0 00 cmp %g2, 0 40013f7c: 02 80 00 22 be 40014004 <_CORE_message_queue_Submit+0xac> 40013f80: 01 00 00 00 nop /* * 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 < 40013f84: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40013f88: 80 a0 40 02 cmp %g1, %g2 40013f8c: 18 80 00 2b bgu 40014038 <_CORE_message_queue_Submit+0xe0> 40013f90: 80 a4 a0 00 cmp %l2, 0 * 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 ) { 40013f94: 02 80 00 18 be 40013ff4 <_CORE_message_queue_Submit+0x9c> 40013f98: 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() ) { 40013f9c: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED 40013fa0: c4 00 63 5c ld [ %g1 + 0x35c ], %g2 ! 4002935c <_ISR_Nest_level> <== NOT EXECUTED 40013fa4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013fa8: 32 80 00 13 bne,a 40013ff4 <_CORE_message_queue_Submit+0x9c> <== NOT EXECUTED 40013fac: 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; 40013fb0: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED _ISR_Disable( level ); 40013fb4: 7f ff b9 67 call 40002550 <== NOT EXECUTED 40013fb8: e0 00 63 80 ld [ %g1 + 0x380 ], %l0 ! 40029380 <_Thread_Executing> <== NOT EXECUTED 40013fbc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40013fc0: 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; 40013fc4: 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; 40013fc8: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 40013fcc: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 40013fd0: 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; 40013fd4: 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 ); 40013fd8: 7f ff b9 62 call 40002560 <== NOT EXECUTED 40013fdc: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40013fe0: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 40013fe4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40013fe8: 15 10 00 3a sethi %hi(0x4000e800), %o2 <== NOT EXECUTED 40013fec: 7f ff e9 76 call 4000e5c4 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 40013ff0: 94 12 a2 1c or %o2, 0x21c, %o2 ! 4000ea1c <_Thread_queue_Timeout> <== NOT EXECUTED 40013ff4: 81 c7 e0 08 ret 40013ff8: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 40013ffc: 81 c7 e0 08 ret <== NOT EXECUTED 40014000: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 40014004: 7f ff e9 0c call 4000e434 <_Thread_queue_Dequeue> 40014008: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 4001400c: a0 92 20 00 orcc %o0, 0, %l0 40014010: 02 80 00 1b be 4001407c <_CORE_message_queue_Submit+0x124> 40014014: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40014018: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 4001401c: 40 00 14 27 call 400190b8 40014020: 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; 40014024: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40014028: 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; 4001402c: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40014030: 81 c7 e0 08 ret 40014034: 91 e8 20 00 restore %g0, 0, %o0 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 *) 40014038: 7f ff e1 f6 call 4000c810 <_Chain_Get> 4001403c: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40014040: a0 92 20 00 orcc %o0, 0, %l0 40014044: 02 bf ff ee be 40013ffc <_CORE_message_queue_Submit+0xa4> 40014048: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4001404c: 94 10 00 1a mov %i2, %o2 40014050: 40 00 14 1a call 400190b8 40014054: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40014058: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4001405c: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40014060: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40014064: 92 10 00 10 mov %l0, %o1 40014068: 94 10 00 1d mov %i5, %o2 4001406c: 40 00 0c 18 call 400170cc <_CORE_message_queue_Insert_message> 40014070: b0 10 20 00 clr %i0 40014074: 81 c7 e0 08 ret 40014078: 81 e8 00 00 restore * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 4001407c: 10 bf ff c2 b 40013f84 <_CORE_message_queue_Submit+0x2c> 40014080: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4000b544 <_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 ) { 4000b544: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000b548: 03 10 00 62 sethi %hi(0x40018800), %g1 4000b54c: c6 00 60 e0 ld [ %g1 + 0xe0 ], %g3 ! 400188e0 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000b550: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000b554: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000b558: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000b55c: 80 a0 60 00 cmp %g1, 0 4000b560: 22 80 00 12 be,a 4000b5a8 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000b564: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 4000b568: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b56c: c2 00 e0 08 ld [ %g3 + 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; 4000b570: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b574: 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; 4000b578: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000b57c: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000b580: 80 a0 a0 02 cmp %g2, 2 4000b584: 02 80 00 0e be 4000b5bc <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000b588: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000b58c: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 4000b590: 22 80 00 0d be,a 4000b5c4 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== NOT EXECUTED 4000b594: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 4000b598: 7f ff d9 e6 call 40001d30 4000b59c: b0 10 20 00 clr %i0 4000b5a0: 81 c7 e0 08 ret 4000b5a4: 81 e8 00 00 restore /* * 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 ) ) { 4000b5a8: 80 a0 c0 01 cmp %g3, %g1 4000b5ac: 22 80 00 2a be,a 4000b654 <_CORE_mutex_Seize_interrupt_trylock+0x110> 4000b5b0: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000b5b4: 81 c7 e0 08 ret 4000b5b8: 91 e8 20 01 restore %g0, 1, %o0 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b5bc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000b5c0: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b5c4: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000b5c8: 12 bf ff f4 bne 4000b598 <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000b5cc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000b5d0: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 <== NOT EXECUTED current = executing->current_priority; 4000b5d4: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000b5d8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000b5dc: 02 80 00 2f be 4000b698 <_CORE_mutex_Seize_interrupt_trylock+0x154> <== NOT EXECUTED 4000b5e0: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000b5e4: 1a 80 00 11 bcc 4000b628 <_CORE_mutex_Seize_interrupt_trylock+0xe4> <== NOT EXECUTED 4000b5e8: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b5ec: 05 10 00 62 sethi %hi(0x40018800), %g2 <== NOT EXECUTED 4000b5f0: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000b5f4: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000b5f8: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000b5fc: 7f ff d9 cd call 40001d30 <== NOT EXECUTED 4000b600: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 4000b604: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 4000b608: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 4000b60c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000b610: 7f ff ef 82 call 40007418 <_Thread_Change_priority> <== NOT EXECUTED 4000b614: b0 10 20 00 clr %i0 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000b618: 7f ff f0 fa call 40007a00 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000b61c: 01 00 00 00 nop <== NOT EXECUTED 4000b620: 81 c7 e0 08 ret <== NOT EXECUTED 4000b624: 81 e8 00 00 restore <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000b628: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4000b62c: 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; 4000b630: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000b634: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000b638: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4000b63c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b640: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000b644: 7f ff d9 bb call 40001d30 <== NOT EXECUTED 4000b648: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b64c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b650: 81 e8 00 00 restore <== 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000b654: 80 a0 60 00 cmp %g1, 0 4000b658: 22 80 00 0a be,a 4000b680 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 4000b65c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000b660: 80 a0 60 01 cmp %g1, 1 4000b664: 12 bf ff d4 bne 4000b5b4 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000b668: 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; 4000b66c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 4000b670: 7f ff d9 b0 call 40001d30 4000b674: b0 10 20 00 clr %i0 4000b678: 81 c7 e0 08 ret 4000b67c: 81 e8 00 00 restore * 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++; 4000b680: 82 00 60 01 inc %g1 4000b684: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000b688: 7f ff d9 aa call 40001d30 4000b68c: b0 10 20 00 clr %i0 4000b690: 81 c7 e0 08 ret 4000b694: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000b698: 7f ff d9 a6 call 40001d30 <== NOT EXECUTED 4000b69c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b6a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b6a4: 81 e8 00 00 restore <== NOT EXECUTED 40006488 <_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 ) { 40006488: 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 ) { 4000648c: 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 ) { 40006490: 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 ) { 40006494: 80 a0 60 00 cmp %g1, 0 40006498: 02 80 00 07 be 400064b4 <_CORE_mutex_Surrender+0x2c> 4000649c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 400064a0: 03 10 00 62 sethi %hi(0x40018800), %g1 400064a4: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 400064a8: 80 a2 00 02 cmp %o0, %g2 400064ac: 12 80 00 2e bne 40006564 <_CORE_mutex_Surrender+0xdc> 400064b0: 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 ) 400064b4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400064b8: 80 a0 60 00 cmp %g1, 0 400064bc: 02 80 00 22 be 40006544 <_CORE_mutex_Surrender+0xbc> 400064c0: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 400064c4: 80 a0 60 00 cmp %g1, 0 400064c8: 12 80 00 21 bne 4000654c <_CORE_mutex_Surrender+0xc4> 400064cc: c2 24 20 54 st %g1, [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400064d0: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400064d4: 80 a0 a0 02 cmp %g2, 2 400064d8: 02 80 00 31 be 4000659c <_CORE_mutex_Surrender+0x114> 400064dc: 80 a0 a0 03 cmp %g2, 3 400064e0: 22 80 00 30 be,a 400065a0 <_CORE_mutex_Surrender+0x118> 400064e4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 400064e8: 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 ) || 400064ec: 80 a0 a0 02 cmp %g2, 2 400064f0: 02 80 00 1f be 4000656c <_CORE_mutex_Surrender+0xe4> 400064f4: c0 24 20 60 clr [ %l0 + 0x60 ] 400064f8: 80 a0 a0 03 cmp %g2, 3 400064fc: 22 80 00 1d be,a 40006570 <_CORE_mutex_Surrender+0xe8> 40006500: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED /* * 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 ) ) ) { 40006504: 40 00 06 1a call 40007d6c <_Thread_queue_Dequeue> 40006508: 90 10 00 10 mov %l0, %o0 4000650c: 86 92 20 00 orcc %o0, 0, %g3 40006510: 02 80 00 37 be 400065ec <_CORE_mutex_Surrender+0x164> 40006514: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40006518: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 4000651c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40006520: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40006524: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 40006528: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 4000652c: 80 a0 a0 02 cmp %g2, 2 40006530: 02 80 00 2a be 400065d8 <_CORE_mutex_Surrender+0x150> 40006534: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 40006538: 80 a0 a0 03 cmp %g2, 3 4000653c: 22 80 00 1c be,a 400065ac <_CORE_mutex_Surrender+0x124> 40006540: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006544: 81 c7 e0 08 ret 40006548: 91 e8 20 00 restore %g0, 0, %o0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000654c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40006550: 80 a0 60 00 cmp %g1, 0 40006554: 02 bf ff fc be 40006544 <_CORE_mutex_Surrender+0xbc> 40006558: 80 a0 60 01 cmp %g1, 1 4000655c: 12 bf ff dd bne 400064d0 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 40006560: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006564: 81 c7 e0 08 ret 40006568: 81 e8 00 00 restore _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 && 4000656c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006570: 80 a0 60 00 cmp %g1, 0 40006574: 12 bf ff e4 bne 40006504 <_CORE_mutex_Surrender+0x7c> 40006578: 01 00 00 00 nop 4000657c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40006580: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40006584: 80 a2 40 01 cmp %o1, %g1 40006588: 02 bf ff df be 40006504 <_CORE_mutex_Surrender+0x7c> 4000658c: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40006590: 40 00 03 a2 call 40007418 <_Thread_Change_priority> 40006594: 94 10 20 01 mov 1, %o2 ! 1 40006598: 30 bf ff db b,a 40006504 <_CORE_mutex_Surrender+0x7c> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 4000659c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400065a0: 82 00 7f ff add %g1, -1, %g1 400065a4: 10 bf ff d1 b 400064e8 <_CORE_mutex_Surrender+0x60> 400065a8: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #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 < 400065ac: 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++; 400065b0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400065b4: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 400065b8: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 400065bc: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 400065c0: 1a bf ff e1 bcc 40006544 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED 400065c4: 94 10 20 00 clr %o2 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 400065c8: 40 00 03 94 call 40007418 <_Thread_Change_priority> <== NOT EXECUTED 400065cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400065d0: 81 c7 e0 08 ret <== NOT EXECUTED 400065d4: 81 e8 00 00 restore <== 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++; 400065d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400065dc: 82 00 60 01 inc %g1 400065e0: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 400065e4: 81 c7 e0 08 ret 400065e8: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 400065ec: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 400065f0: 81 c7 e0 08 ret 400065f4: 91 e8 20 00 restore %g0, 0, %o0 40024ba8 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 40024ba8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 40024bac: 7f ff 7c 6a call 40003d54 <== NOT EXECUTED 40024bb0: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40024bb4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40024bb8: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40024bbc: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40024bc0: 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; 40024bc4: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 40024bc8: 7f ff 7c 67 call 40003d64 <== NOT EXECUTED 40024bcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40024bd0: 01 00 00 00 nop 4000b404 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000b404: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 4000b408: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 400188e4 <_Debug_Level> <== NOT EXECUTED 4000b40c: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 4000b410: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000b414: 81 c3 e0 08 retl <== NOT EXECUTED 4000b418: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40005260 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40005260: 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 ]; 40005264: f2 06 21 5c ld [ %i0 + 0x15c ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40005268: 7f ff f2 ae call 40001d20 4000526c: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40005270: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 40005274: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40005278: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4000527c: 9a 88 c0 04 andcc %g3, %g4, %o5 40005280: 02 80 00 28 be 40005320 <_Event_Surrender+0xc0> 40005284: 03 10 00 62 sethi %hi(0x40018800), %g1 /* * 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() && 40005288: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 400188bc <_ISR_Nest_level> 4000528c: 80 a0 a0 00 cmp %g2, 0 40005290: 22 80 00 08 be,a 400052b0 <_Event_Surrender+0x50> 40005294: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40005298: 03 10 00 62 sethi %hi(0x40018800), %g1 4000529c: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 400052a0: 80 a6 00 02 cmp %i0, %g2 400052a4: 02 80 00 2a be 4000534c <_Event_Surrender+0xec> 400052a8: 19 10 00 62 sethi %hi(0x40018800), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400052ac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400052b0: 80 88 61 00 btst 0x100, %g1 400052b4: 02 80 00 19 be 40005318 <_Event_Surrender+0xb8> 400052b8: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400052bc: 02 80 00 04 be 400052cc <_Event_Surrender+0x6c> 400052c0: 80 8c 60 02 btst 2, %l1 400052c4: 02 80 00 15 be 40005318 <_Event_Surrender+0xb8> 400052c8: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400052cc: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400052d0: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 /* * 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 ); 400052d4: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 400052d8: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400052dc: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400052e0: 7f ff f2 94 call 40001d30 400052e4: 90 10 00 10 mov %l0, %o0 400052e8: 7f ff f2 8e call 40001d20 400052ec: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400052f0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400052f4: 80 a0 60 02 cmp %g1, 2 400052f8: 02 80 00 0c be 40005328 <_Event_Surrender+0xc8> 400052fc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005300: 90 10 00 10 mov %l0, %o0 40005304: 7f ff f2 8b call 40001d30 40005308: 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 ); 4000530c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005310: 40 00 08 bf call 4000760c <_Thread_Clear_state> 40005314: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40005318: 7f ff f2 86 call 40001d30 <== NOT EXECUTED 4000531c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 40005320: 7f ff f2 84 call 40001d30 40005324: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40005328: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000532c: 7f ff f2 81 call 40001d30 40005330: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005334: 40 00 0e b0 call 40008df4 <_Watchdog_Remove> 40005338: 90 06 20 48 add %i0, 0x48, %o0 4000533c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40005340: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005344: 40 00 08 b2 call 4000760c <_Thread_Clear_state> 40005348: 81 e8 00 00 restore /* * 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() && 4000534c: c2 03 22 f4 ld [ %o4 + 0x2f4 ], %g1 40005350: 80 a0 60 01 cmp %g1, 1 40005354: 02 80 00 07 be 40005370 <_Event_Surrender+0x110> 40005358: 80 a0 c0 0d cmp %g3, %o5 4000535c: c2 03 22 f4 ld [ %o4 + 0x2f4 ], %g1 40005360: 80 a0 60 02 cmp %g1, 2 40005364: 32 bf ff d3 bne,a 400052b0 <_Event_Surrender+0x50> 40005368: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4000536c: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 40005370: 02 80 00 04 be 40005380 <_Event_Surrender+0x120> 40005374: 80 8c 60 02 btst 2, %l1 40005378: 02 80 00 09 be 4000539c <_Event_Surrender+0x13c> <== NOT EXECUTED 4000537c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40005380: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005384: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 if ( _ISR_Is_in_progress() && _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 ); 40005388: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 4000538c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005390: 82 10 20 03 mov 3, %g1 ((_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; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005394: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005398: c2 23 22 f4 st %g1, [ %o4 + 0x2f4 ] } _ISR_Enable( level ); 4000539c: 7f ff f2 65 call 40001d30 400053a0: 91 e8 00 10 restore %g0, %l0, %o0 400053a4: 01 00 00 00 nop 400053a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400053a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400053ac: 90 10 00 18 mov %i0, %o0 400053b0: 40 00 09 a2 call 40007a38 <_Thread_Get> 400053b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 400053b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400053bc: 80 a0 60 00 cmp %g1, 0 400053c0: 12 80 00 19 bne 40005424 <_Event_Timeout+0x7c> 400053c4: 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 ); 400053c8: 7f ff f2 56 call 40001d20 400053cc: 01 00 00 00 nop 400053d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 400053d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400053d8: 80 a0 60 00 cmp %g1, 0 400053dc: 02 80 00 14 be 4000542c <_Event_Timeout+0x84> 400053e0: 03 10 00 62 sethi %hi(0x40018800), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400053e4: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 400053e8: 80 a6 00 02 cmp %i0, %g2 400053ec: 02 80 00 18 be 4000544c <_Event_Timeout+0xa4> 400053f0: c0 26 20 24 clr [ %i0 + 0x24 ] (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 400053f4: 82 10 20 06 mov 6, %g1 400053f8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400053fc: 7f ff f2 4d call 40001d30 40005400: 90 10 00 03 mov %g3, %o0 40005404: 90 10 00 18 mov %i0, %o0 40005408: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000540c: 40 00 08 80 call 4000760c <_Thread_Clear_state> 40005410: 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; 40005414: 05 10 00 62 sethi %hi(0x40018800), %g2 40005418: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> 4000541c: 82 00 7f ff add %g1, -1, %g1 40005420: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] 40005424: 81 c7 e0 08 ret 40005428: 81 e8 00 00 restore 4000542c: 05 10 00 62 sethi %hi(0x40018800), %g2 <== NOT EXECUTED 40005430: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40005434: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40005438: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4000543c: 7f ff f2 3d call 40001d30 <== NOT EXECUTED 40005440: 01 00 00 00 nop <== NOT EXECUTED 40005444: 81 c7 e0 08 ret <== NOT EXECUTED 40005448: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4000544c: 05 10 00 62 sethi %hi(0x40018800), %g2 40005450: c2 00 a2 f4 ld [ %g2 + 0x2f4 ], %g1 ! 40018af4 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40005454: 80 a0 60 01 cmp %g1, 1 40005458: 38 bf ff e8 bgu,a 400053f8 <_Event_Timeout+0x50> 4000545c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40005460: 82 10 20 02 mov 2, %g1 40005464: c2 20 a2 f4 st %g1, [ %g2 + 0x2f4 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 40005468: 10 bf ff e4 b 400053f8 <_Event_Timeout+0x50> 4000546c: 82 10 20 06 mov 6, %g1 4000970c <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000970c: 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; 40009710: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 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); 40009714: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40009718: 90 10 00 19 mov %i1, %o0 4000971c: 92 10 00 16 mov %l6, %o1 40009720: 40 00 01 82 call 40009d28 <_Heap_Calc_block_size> 40009724: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 40009728: ae 92 20 00 orcc %o0, 0, %l7 4000972c: 02 80 00 69 be 400098d0 <_Heap_Allocate_aligned+0x1c4> 40009730: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 40009734: 80 a6 a0 00 cmp %i2, 0 40009738: 22 80 00 02 be,a 40009740 <_Heap_Allocate_aligned+0x34> 4000973c: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 40009740: e2 05 60 08 ld [ %l5 + 8 ], %l1 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; 40009744: 80 a5 40 11 cmp %l5, %l1 40009748: 02 80 00 62 be 400098d0 <_Heap_Allocate_aligned+0x1c4> 4000974c: a8 10 20 00 clr %l4 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40009750: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 40009754: 92 10 00 1a mov %i2, %o1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40009758: a4 08 7f fe and %g1, -2, %l2 /* 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; 4000975c: a6 04 40 12 add %l1, %l2, %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. */ 40009760: 80 a5 c0 12 cmp %l7, %l2 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; aligned_user_addr = block_end - end_to_user_offs; 40009764: a0 24 c0 19 sub %l3, %i1, %l0 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. */ 40009768: 18 80 00 22 bgu 400097f0 <_Heap_Allocate_aligned+0xe4> 4000976c: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 40009770: 40 00 3e 07 call 40018f8c <.urem> 40009774: 01 00 00 00 nop _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 40009778: 92 10 00 16 mov %l6, %o1 4000977c: b0 24 00 08 sub %l0, %o0, %i0 40009780: 40 00 3e 03 call 40018f8c <.urem> 40009784: 90 10 00 18 mov %i0, %o0 40009788: a0 04 60 08 add %l1, 8, %l0 4000978c: 84 26 00 08 sub %i0, %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) { 40009790: 80 a4 00 02 cmp %l0, %g2 40009794: 38 80 00 18 bgu,a 400097f4 <_Heap_Allocate_aligned+0xe8> 40009798: 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) { 4000979c: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 400097a0: 82 20 80 10 sub %g2, %l0, %g1 400097a4: 80 a0 40 1d cmp %g1, %i5 400097a8: 1a 80 00 1e bcc 40009820 <_Heap_Allocate_aligned+0x114> 400097ac: 80 a6 20 00 cmp %i0, 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) { 400097b0: 82 26 00 10 sub %i0, %l0, %g1 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 400097b4: 90 10 00 10 mov %l0, %o0 400097b8: 92 10 00 1a mov %i2, %o1 400097bc: 80 a5 80 01 cmp %l6, %g1 400097c0: 18 80 00 17 bgu 4000981c <_Heap_Allocate_aligned+0x110> 400097c4: 84 10 00 10 mov %l0, %g2 400097c8: 40 00 3d f1 call 40018f8c <.urem> 400097cc: 01 00 00 00 nop /* 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) { 400097d0: 84 10 00 10 mov %l0, %g2 *value = r ? v - r + a : v; 400097d4: 88 92 20 00 orcc %o0, 0, %g4 400097d8: 86 10 20 00 clr %g3 400097dc: 12 80 00 35 bne 400098b0 <_Heap_Allocate_aligned+0x1a4> 400097e0: 90 10 00 10 mov %l0, %o0 400097e4: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 400097e8: 38 80 00 0d bgu,a 4000981c <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 400097ec: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED /* 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) 400097f0: e2 04 60 08 ld [ %l1 + 8 ], %l1 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; 400097f4: 80 a5 40 11 cmp %l5, %l1 400097f8: 12 bf ff d6 bne 40009750 <_Heap_Allocate_aligned+0x44> 400097fc: a8 05 20 01 inc %l4 40009800: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 40009804: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 40009808: 80 a0 40 14 cmp %g1, %l4 4000980c: 2a 80 00 02 bcs,a 40009814 <_Heap_Allocate_aligned+0x108> 40009810: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 40009814: 81 c7 e0 08 ret 40009818: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000981c: 80 a6 20 00 cmp %i0, 0 40009820: 22 bf ff f5 be,a 400097f4 <_Heap_Allocate_aligned+0xe8> 40009824: 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; 40009828: 82 04 e0 08 add %l3, 8, %g1 4000982c: 88 20 40 02 sub %g1, %g2, %g4 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; 40009830: 84 24 80 04 sub %l2, %g4, %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) { 40009834: 80 a0 80 1d cmp %g2, %i5 40009838: 2a 80 00 29 bcs,a 400098dc <_Heap_Allocate_aligned+0x1d0> 4000983c: 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; 40009840: 82 10 a0 01 or %g2, 1, %g1 40009844: 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); 40009848: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 4000984c: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 40009850: c8 24 60 04 st %g4, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40009854: 84 04 40 04 add %l1, %g4, %g2 _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 40009858: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000985c: 82 10 60 01 or %g1, 1, %g1 40009860: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 40009864: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 40009868: c2 05 60 34 ld [ %l5 + 0x34 ], %g1 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; 4000986c: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 40009870: 80 a0 c0 01 cmp %g3, %g1 40009874: 1a 80 00 03 bcc 40009880 <_Heap_Allocate_aligned+0x174> 40009878: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 4000987c: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 40009880: c2 05 60 40 ld [ %l5 + 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; 40009884: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 40009888: c4 05 60 48 ld [ %l5 + 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; 4000988c: 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; 40009890: 86 00 e0 01 inc %g3 stats->allocs += 1; 40009894: 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; 40009898: 86 00 c0 14 add %g3, %l4, %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; 4000989c: c2 25 60 40 st %g1, [ %l5 + 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; 400098a0: c4 25 60 48 st %g2, [ %l5 + 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; 400098a4: c6 25 60 4c st %g3, [ %l5 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 400098a8: 10 bf ff d7 b 40009804 <_Heap_Allocate_aligned+0xf8> 400098ac: 90 10 00 18 mov %i0, %o0 ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; *value = r ? v - r + a : v; 400098b0: 82 04 00 1a add %l0, %i2, %g1 400098b4: 90 20 40 04 sub %g1, %g4, %o0 400098b8: 86 22 00 10 sub %o0, %l0, %g3 /* 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) { 400098bc: 80 a5 80 03 cmp %l6, %g3 400098c0: 28 bf ff cd bleu,a 400097f4 <_Heap_Allocate_aligned+0xe8> 400098c4: e2 04 60 08 ld [ %l1 + 8 ], %l1 400098c8: 10 bf ff d5 b 4000981c <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 400098cc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 400098d0: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 400098d4: 81 c7 e0 08 ret <== NOT EXECUTED 400098d8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 400098dc: 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; 400098e0: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 400098e4: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 400098e8: 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; 400098ec: c6 20 a0 08 st %g3, [ %g2 + 8 ] 400098f0: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 400098f4: 10 bf ff d8 b 40009854 <_Heap_Allocate_aligned+0x148> 400098f8: 88 10 00 12 mov %l2, %g4 4002fd9c <_Heap_Get_information>: Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 4002fd9c: d6 02 20 24 ld [ %o0 + 0x24 ], %o3 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 4002fda0: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 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; 4002fda4: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 4002fda8: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 4002fdac: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 4002fdb0: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 4002fdb4: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 4002fdb8: 80 a0 40 0b cmp %g1, %o3 4002fdbc: 02 80 00 26 be 4002fe54 <_Heap_Get_information+0xb8> 4002fdc0: c0 22 60 10 clr [ %o1 + 0x10 ] 4002fdc4: 10 80 00 0e b 4002fdfc <_Heap_Get_information+0x60> 4002fdc8: d8 00 60 04 ld [ %g1 + 4 ], %o4 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++; the_info->Used.total += the_size; 4002fdcc: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 4002fdd0: 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++; 4002fdd4: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 4002fdd8: 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++; 4002fddc: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 4002fde0: 80 a0 c0 04 cmp %g3, %g4 4002fde4: 1a 80 00 03 bcc 4002fdf0 <_Heap_Get_information+0x54> 4002fde8: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 4002fdec: c8 22 60 10 st %g4, [ %o1 + 0x10 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 4002fdf0: 80 a2 c0 0d cmp %o3, %o5 4002fdf4: 02 80 00 18 be 4002fe54 <_Heap_Get_information+0xb8> 4002fdf8: 82 10 00 0d mov %o5, %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4002fdfc: 88 0b 3f fe and %o4, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4002fe00: 9a 00 40 04 add %g1, %g4, %o5 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4002fe04: d8 03 60 04 ld [ %o5 + 4 ], %o4 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) ) { 4002fe08: 80 8b 20 01 btst 1, %o4 4002fe0c: 32 bf ff f0 bne,a 4002fdcc <_Heap_Get_information+0x30> 4002fe10: c2 02 60 0c ld [ %o1 + 0xc ], %g1 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++; 4002fe14: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 4002fe18: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 4002fe1c: 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++; 4002fe20: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 4002fe24: 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++; 4002fe28: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 4002fe2c: 80 a0 c0 04 cmp %g3, %g4 4002fe30: 1a 80 00 03 bcc 4002fe3c <_Heap_Get_information+0xa0> 4002fe34: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 4002fe38: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 4002fe3c: c2 03 40 00 ld [ %o5 ], %g1 4002fe40: 80 a0 40 04 cmp %g1, %g4 4002fe44: 02 bf ff ec be 4002fdf4 <_Heap_Get_information+0x58> 4002fe48: 80 a2 c0 0d cmp %o3, %o5 4002fe4c: 81 c3 e0 08 retl <== NOT EXECUTED 4002fe50: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED } /* 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; 4002fe54: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 4002fe58: 90 10 20 00 clr %o0 4002fe5c: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 4002fe60: 81 c3 e0 08 retl 4002fe64: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40016394 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40016394: 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; 40016398: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 4001639c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 400163a0: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 400163a4: 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); 400163a8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 400163ac: 7f ff f6 34 call 40013c7c <.urem> 400163b0: 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 ); 400163b4: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 400163b8: 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); 400163bc: 82 06 7f f8 add %i1, -8, %g1 400163c0: a2 20 40 08 sub %g1, %o0, %l1 _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)) 400163c4: 80 a4 40 04 cmp %l1, %g4 400163c8: 84 60 3f ff subx %g0, -1, %g2 400163cc: 80 a0 c0 11 cmp %g3, %l1 400163d0: 82 60 3f ff subx %g0, -1, %g1 400163d4: 80 88 80 01 btst %g2, %g1 400163d8: 02 80 00 2f be 40016494 <_Heap_Resize_block+0x100> 400163dc: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400163e0: da 04 60 04 ld [ %l1 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400163e4: b0 0b 7f fe and %o5, -2, %i0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400163e8: a4 04 40 18 add %l1, %i0, %l2 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) || 400163ec: 80 a4 80 04 cmp %l2, %g4 400163f0: 84 60 3f ff subx %g0, -1, %g2 400163f4: 80 a0 c0 12 cmp %g3, %l2 400163f8: 82 60 3f ff subx %g0, -1, %g1 400163fc: 80 88 80 01 btst %g2, %g1 40016400: 02 80 00 25 be 40016494 <_Heap_Resize_block+0x100> 40016404: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40016408: c2 04 a0 04 ld [ %l2 + 4 ], %g1 4001640c: 80 88 60 01 btst 1, %g1 40016410: 02 80 00 21 be 40016494 <_Heap_Resize_block+0x100> 40016414: ae 08 7f fe and %g1, -2, %l7 !_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) || 40016418: 80 a0 c0 12 cmp %g3, %l2 4001641c: a8 10 20 01 mov 1, %l4 40016420: 02 80 00 04 be 40016430 <_Heap_Resize_block+0x9c> 40016424: 82 04 80 17 add %l2, %l7, %g1 40016428: c2 00 60 04 ld [ %g1 + 4 ], %g1 4001642c: a8 08 60 01 and %g1, 1, %l4 _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) 40016430: 82 24 80 19 sub %l2, %i1, %g1 40016434: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 40016438: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 4001643c: 80 a0 40 1a cmp %g1, %i2 40016440: 1a 80 00 17 bcc 4001649c <_Heap_Resize_block+0x108> 40016444: 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 */ 40016448: 80 8d 20 ff btst 0xff, %l4 4001644c: 12 80 00 10 bne 4001648c <_Heap_Resize_block+0xf8> 40016450: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40016454: 92 10 00 15 mov %l5, %o1 40016458: 7f ff f6 09 call 40013c7c <.urem> 4001645c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40016460: 80 a2 20 00 cmp %o0, 0 40016464: 02 80 00 05 be 40016478 <_Heap_Resize_block+0xe4> 40016468: 80 a4 00 16 cmp %l0, %l6 4001646c: 82 04 00 15 add %l0, %l5, %g1 40016470: a0 20 40 08 sub %g1, %o0, %l0 40016474: 80 a4 00 16 cmp %l0, %l6 40016478: 0a 80 00 2e bcs 40016530 <_Heap_Resize_block+0x19c> 4001647c: 90 10 00 10 mov %l0, %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) 40016480: 80 a5 c0 08 cmp %l7, %o0 40016484: 1a 80 00 32 bcc 4001654c <_Heap_Resize_block+0x1b8> 40016488: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 4001648c: 81 c7 e0 08 ret 40016490: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 40016494: 81 c7 e0 08 ret 40016498: 91 e8 20 02 restore %g0, 2, %o0 --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4001649c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 400164a0: 92 10 00 15 mov %l5, %o1 400164a4: 7f ff f5 f6 call 40013c7c <.urem> 400164a8: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 400164ac: a0 a4 00 08 subcc %l0, %o0, %l0 400164b0: 22 80 00 1c be,a 40016520 <_Heap_Resize_block+0x18c> 400164b4: 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; 400164b8: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 400164bc: 80 a5 80 02 cmp %l6, %g2 400164c0: 18 80 00 1e bgu 40016538 <_Heap_Resize_block+0x1a4> 400164c4: 82 25 80 02 sub %l6, %g2, %g1 _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) { 400164c8: 80 8d 20 ff btst 0xff, %l4 400164cc: 12 80 00 2a bne 40016574 <_Heap_Resize_block+0x1e0> 400164d0: 80 a5 80 10 cmp %l6, %l0 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; 400164d4: 82 10 80 1b or %g2, %i3, %g1 400164d8: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400164dc: 86 04 40 02 add %l1, %g2, %g3 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 400164e0: d8 04 a0 0c ld [ %l2 + 0xc ], %o4 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; 400164e4: 88 04 00 17 add %l0, %l7, %g4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 400164e8: da 04 a0 08 ld [ %l2 + 8 ], %o5 _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; next_next_block->prev_size = new_next_block_size; 400164ec: c8 24 80 17 st %g4, [ %l2 + %l7 ] _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; 400164f0: 84 11 20 01 or %g4, 1, %g2 400164f4: c4 20 e0 04 st %g2, [ %g3 + 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; 400164f8: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 400164fc: da 20 e0 08 st %o5, [ %g3 + 8 ] 40016500: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 40016504: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 40016508: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4001650c: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 40016510: c6 23 60 0c st %g3, [ %o5 + 0xc ] 40016514: c6 23 20 08 st %g3, [ %o4 + 8 ] 40016518: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 4001651c: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 40016520: 82 00 60 01 inc %g1 40016524: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 40016528: 81 c7 e0 08 ret 4001652c: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 40016530: 10 bf ff d4 b 40016480 <_Heap_Resize_block+0xec> 40016534: 90 10 00 16 mov %l6, %o0 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 40016538: a0 a4 00 01 subcc %l0, %g1, %l0 4001653c: 12 bf ff e3 bne 400164c8 <_Heap_Resize_block+0x134> 40016540: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 40016544: 10 bf ff f7 b 40016520 <_Heap_Resize_block+0x18c> 40016548: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 _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) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 4001654c: 92 10 00 12 mov %l2, %o1 40016550: 7f ff c1 01 call 40006954 <_Heap_Block_allocate> 40016554: 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; 40016558: 90 02 00 18 add %o0, %i0, %o0 4001655c: 90 12 00 1b or %o0, %i3, %o0 40016560: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 40016564: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40016568: 82 00 7f ff add %g1, -1, %g1 4001656c: 10 bf ff ec b 4001651c <_Heap_Resize_block+0x188> 40016570: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] 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; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 40016574: 38 bf ff eb bgu,a 40016520 <_Heap_Resize_block+0x18c> <== NOT EXECUTED 40016578: 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; 4001657c: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40016580: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 40016584: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 40016588: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 4001658c: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40016590: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016594: 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 */ 40016598: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4001659c: 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 */ 400165a0: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 400165a4: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 400165a8: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 400165ac: 7f ff d4 9a call 4000b814 <_Heap_Free> <== NOT EXECUTED 400165b0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 400165b4: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 400165b8: 10 bf ff d9 b 4001651c <_Heap_Resize_block+0x188> <== NOT EXECUTED 400165bc: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 4000f118 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4000f118: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f11c: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 4000f120: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f124: 06 80 00 8c bl 4000f354 <_Heap_Walk+0x23c> 4000f128: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4000f12c: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000f130: 80 88 60 01 btst 1, %g1 4000f134: 02 80 00 81 be 4000f338 <_Heap_Walk+0x220> 4000f138: a6 10 20 00 clr %l3 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000f13c: c4 04 40 00 ld [ %l1 ], %g2 4000f140: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000f144: 80 a0 80 01 cmp %g2, %g1 4000f148: 02 80 00 08 be 4000f168 <_Heap_Walk+0x50> 4000f14c: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 4000f150: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000f154: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f158: 90 12 22 f0 or %o0, 0x2f0, %o0 <== NOT EXECUTED 4000f15c: 7f ff d9 d5 call 400058b0 <== NOT EXECUTED 4000f160: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 4000f164: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 4000f168: 22 80 00 63 be,a 4000f2f4 <_Heap_Walk+0x1dc> 4000f16c: a2 10 00 16 mov %l6, %l1 <== NOT EXECUTED 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)) { 4000f170: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f174: c8 04 60 04 ld [ %l1 + 4 ], %g4 4000f178: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000f17c: a4 09 3f fe and %g4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000f180: a0 04 40 12 add %l1, %l2, %l0 4000f184: 80 a4 00 01 cmp %l0, %g1 4000f188: 84 60 3f ff subx %g0, -1, %g2 4000f18c: 80 a0 c0 10 cmp %g3, %l0 4000f190: 82 60 3f ff subx %g0, -1, %g1 4000f194: 80 88 80 01 btst %g2, %g1 4000f198: 02 80 00 77 be 4000f374 <_Heap_Walk+0x25c> 4000f19c: 03 10 00 70 sethi %hi(0x4001c000), %g1 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); 4000f1a0: 05 10 00 70 sethi %hi(0x4001c000), %g2 { /* Check if 'the_block' is in the free block list */ 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"); 4000f1a4: ba 10 63 20 or %g1, 0x320, %i5 printk("PASS: %d !the_block not in the free list", source); 4000f1a8: ae 10 a3 b0 or %g2, 0x3b0, %l7 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); 4000f1ac: 03 10 00 70 sethi %hi(0x4001c000), %g1 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); 4000f1b0: 05 10 00 70 sethi %hi(0x4001c000), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000f1b4: a8 09 20 01 and %g4, 1, %l4 error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 4000f1b8: b8 10 63 80 or %g1, 0x380, %i4 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); 4000f1bc: b6 10 a3 50 or %g2, 0x350, %i3 4000f1c0: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 4000f1c4: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000f1c8: 80 88 60 01 btst 1, %g1 4000f1cc: 12 80 00 20 bne 4000f24c <_Heap_Walk+0x134> 4000f1d0: 80 a4 e0 00 cmp %l3, 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) { 4000f1d4: c2 04 00 00 ld [ %l0 ], %g1 4000f1d8: 80 a0 40 12 cmp %g1, %l2 4000f1dc: 02 80 00 07 be 4000f1f8 <_Heap_Walk+0xe0> 4000f1e0: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f1e4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000f1e8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f1ec: 7f ff d9 b1 call 400058b0 <== NOT EXECUTED 4000f1f0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 4000f1f4: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 4000f1f8: 32 80 00 0a bne,a 4000f220 <_Heap_Walk+0x108> 4000f1fc: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 4000f200: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 4000f204: 12 80 00 49 bne 4000f328 <_Heap_Walk+0x210> <== NOT EXECUTED 4000f208: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000f20c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000f210: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f214: 7f ff d9 a7 call 400058b0 <== NOT EXECUTED 4000f218: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000f21c: c2 06 20 08 ld [ %i0 + 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) 4000f220: 80 a0 40 11 cmp %g1, %l1 4000f224: 02 80 00 0a be 4000f24c <_Heap_Walk+0x134> 4000f228: 80 a4 e0 00 cmp %l3, 0 4000f22c: 80 a6 00 01 cmp %i0, %g1 4000f230: 02 80 00 58 be 4000f390 <_Heap_Walk+0x278> 4000f234: 80 a0 40 11 cmp %g1, %l1 block = block->next; 4000f238: c2 00 60 08 ld [ %g1 + 8 ], %g1 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) 4000f23c: 80 a0 40 11 cmp %g1, %l1 4000f240: 12 bf ff fc bne 4000f230 <_Heap_Walk+0x118> 4000f244: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 4000f248: 80 a4 e0 00 cmp %l3, 0 4000f24c: 32 80 00 58 bne,a 4000f3ac <_Heap_Walk+0x294> 4000f250: 27 10 00 70 sethi %hi(0x4001c000), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000f254: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000f258: 80 a0 40 12 cmp %g1, %l2 4000f25c: 18 80 00 40 bgu 4000f35c <_Heap_Walk+0x244> 4000f260: 11 10 00 70 sethi %hi(0x4001c000), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 4000f264: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4000f268: 40 00 27 49 call 40018f8c <.urem> 4000f26c: 90 10 00 12 mov %l2, %o0 4000f270: 80 a2 20 00 cmp %o0, 0 4000f274: 12 80 00 15 bne 4000f2c8 <_Heap_Walk+0x1b0> 4000f278: 80 a4 e0 00 cmp %l3, 0 printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 4000f27c: 12 80 00 17 bne 4000f2d8 <_Heap_Walk+0x1c0> 4000f280: 80 a5 80 10 cmp %l6, %l0 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 ) { 4000f284: 02 80 00 1c be 4000f2f4 <_Heap_Walk+0x1dc> 4000f288: a2 10 00 16 mov %l6, %l1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f28c: c8 04 20 04 ld [ %l0 + 4 ], %g4 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)) { 4000f290: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000f294: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000f298: a4 09 3f fe and %g4, -2, %l2 4000f29c: a0 04 00 12 add %l0, %l2, %l0 4000f2a0: 80 a4 00 01 cmp %l0, %g1 4000f2a4: 84 60 3f ff subx %g0, -1, %g2 4000f2a8: 80 a0 c0 10 cmp %g3, %l0 4000f2ac: 82 60 3f ff subx %g0, -1, %g1 4000f2b0: 80 88 80 01 btst %g2, %g1 4000f2b4: 02 80 00 2f be 4000f370 <_Heap_Walk+0x258> 4000f2b8: a8 09 20 01 and %g4, 1, %l4 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000f2bc: a2 10 00 15 mov %l5, %l1 4000f2c0: 10 bf ff c1 b 4000f1c4 <_Heap_Walk+0xac> 4000f2c4: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); 4000f2c8: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f2cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f2d0: 7f ff d9 78 call 400058b0 <== NOT EXECUTED 4000f2d4: 90 12 20 08 or %o0, 8, %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", 4000f2d8: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 4000f2dc: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f2e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f2e4: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 4000f2e8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000f2ec: 7f ff d9 71 call 400058b0 <== NOT EXECUTED 4000f2f0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 4000f2f4: d6 06 20 10 ld [ %i0 + 0x10 ], %o3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f2f8: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000f2fc: 94 08 7f fe and %g1, -2, %o2 4000f300: 80 a2 c0 0a cmp %o3, %o2 4000f304: 02 80 00 07 be 4000f320 <_Heap_Walk+0x208> 4000f308: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 4000f30c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f310: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f314: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000f318: 7f ff d9 66 call 400058b0 <== NOT EXECUTED 4000f31c: 90 12 20 70 or %o0, 0x70, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 4000f320: 81 c7 e0 08 ret 4000f324: 81 e8 00 00 restore if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); 4000f328: 7f ff d9 62 call 400058b0 <== NOT EXECUTED 4000f32c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000f330: 10 bf ff b8 b 4000f210 <_Heap_Walk+0xf8> <== NOT EXECUTED 4000f334: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 4000f338: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000f33c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f340: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED 4000f344: 7f ff d9 5b call 400058b0 <== NOT EXECUTED 4000f348: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000f34c: 10 bf ff 7d b 4000f140 <_Heap_Walk+0x28> <== NOT EXECUTED 4000f350: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 4000f354: 10 bf ff 76 b 4000f12c <_Heap_Walk+0x14> <== NOT EXECUTED 4000f358: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED } if (do_dump || error) printk("\n"); if (the_size < the_heap->min_block_size) { printk("PASS: %d !block size is too small\n", source); 4000f35c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f360: 7f ff d9 54 call 400058b0 <== NOT EXECUTED 4000f364: 90 12 23 e0 or %o0, 0x3e0, %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", 4000f368: 10 bf ff dd b 4000f2dc <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000f36c: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000f370: a2 10 00 15 mov %l5, %l1 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 4000f374: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4000f378: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000f37c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f380: 7f ff d9 4c call 400058b0 <== NOT EXECUTED 4000f384: 90 12 23 28 or %o0, 0x328, %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", 4000f388: 10 bf ff d5 b 4000f2dc <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000f38c: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { 4000f390: 02 bf ff ae be 4000f248 <_Heap_Walk+0x130> <== NOT EXECUTED 4000f394: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 4000f398: 12 80 00 0a bne 4000f3c0 <_Heap_Walk+0x2a8> <== NOT EXECUTED 4000f39c: 27 10 00 70 sethi %hi(0x4001c000), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000f3a0: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4000f3a4: 7f ff d9 43 call 400058b0 <== NOT EXECUTED 4000f3a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000f3ac: 90 14 e3 20 or %l3, 0x320, %o0 <== NOT EXECUTED 4000f3b0: 7f ff d9 40 call 400058b0 <== NOT EXECUTED 4000f3b4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000f3b8: 10 bf ff a8 b 4000f258 <_Heap_Walk+0x140> <== NOT EXECUTED 4000f3bc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ 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"); 4000f3c0: 7f ff d9 3c call 400058b0 <== NOT EXECUTED 4000f3c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000f3c8: 10 bf ff f7 b 4000f3a4 <_Heap_Walk+0x28c> <== NOT EXECUTED 4000f3cc: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40006ac4 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006ac4: 9d e3 bf 98 save %sp, -104, %sp * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 40006ac8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006acc: a0 10 00 18 mov %i0, %l0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 40006ad0: 80 a0 60 00 cmp %g1, 0 40006ad4: 02 80 00 1d be 40006b48 <_Objects_Allocate+0x84> 40006ad8: b0 10 20 00 clr %i0 /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006adc: a2 04 20 20 add %l0, 0x20, %l1 40006ae0: 40 00 12 6e call 4000b498 <_Chain_Get> 40006ae4: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40006ae8: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40006aec: 80 a0 60 00 cmp %g1, 0 40006af0: 02 80 00 16 be 40006b48 <_Objects_Allocate+0x84> 40006af4: b0 10 00 08 mov %o0, %i0 /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 40006af8: 80 a2 20 00 cmp %o0, 0 40006afc: 02 80 00 15 be 40006b50 <_Objects_Allocate+0x8c> 40006b00: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40006b04: c4 06 20 08 ld [ %i0 + 8 ], %g2 40006b08: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b0c: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40006b10: 03 00 00 3f sethi %hi(0xfc00), %g1 40006b14: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006b18: 84 08 80 01 and %g2, %g1, %g2 40006b1c: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b20: 40 00 33 ab call 400139cc <.udiv> 40006b24: 90 20 80 08 sub %g2, %o0, %o0 40006b28: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 40006b2c: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40006b30: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b34: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 40006b38: 82 00 7f ff add %g1, -1, %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b3c: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 40006b40: c2 34 20 2c sth %g1, [ %l0 + 0x2c ] block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b44: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 40006b48: 81 c7 e0 08 ret 40006b4c: 81 e8 00 00 restore * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 40006b50: 40 00 00 14 call 40006ba0 <_Objects_Extend_information> 40006b54: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006b58: 40 00 12 50 call 4000b498 <_Chain_Get> 40006b5c: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40006b60: b0 92 20 00 orcc %o0, 0, %i0 40006b64: 32 bf ff e9 bne,a 40006b08 <_Objects_Allocate+0x44> 40006b68: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 40006b6c: 81 c7 e0 08 ret <== NOT EXECUTED 40006b70: 81 e8 00 00 restore <== NOT EXECUTED 40006ba0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40006ba0: 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; 40006ba4: 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 ) 40006ba8: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40006bac: 03 00 00 3f sethi %hi(0xfc00), %g1 40006bb0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006bb4: a8 08 80 01 and %g2, %g1, %l4 40006bb8: 80 a5 40 14 cmp %l5, %l4 40006bbc: 1a 80 00 79 bcc 40006da0 <_Objects_Extend_information+0x200> 40006bc0: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40006bc4: a6 10 00 14 mov %l4, %l3 40006bc8: a4 10 20 00 clr %l2 40006bcc: a2 10 20 00 clr %l1 40006bd0: ac 10 20 01 mov 1, %l6 40006bd4: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40006bd8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006bdc: 80 a0 60 00 cmp %g1, 0 40006be0: 12 80 00 8d bne 40006e14 <_Objects_Extend_information+0x274> 40006be4: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40006be8: 90 02 00 14 add %o0, %l4, %o0 40006bec: 90 02 00 1d add %o0, %i5, %o0 40006bf0: 40 00 08 f0 call 40008fb0 <_Workspace_Allocate_or_fatal_error> 40006bf4: 91 2a 20 02 sll %o0, 2, %o0 40006bf8: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006bfc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40006c00: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006c04: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40006c08: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006c0c: 18 80 00 94 bgu 40006e5c <_Objects_Extend_information+0x2bc> 40006c10: a0 05 80 02 add %l6, %g2, %l0 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006c14: 80 a5 20 00 cmp %l4, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006c18: 84 10 20 00 clr %g2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006c1c: 02 80 00 08 be 40006c3c <_Objects_Extend_information+0x9c> 40006c20: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 40006c24: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006c28: 84 00 a0 01 inc %g2 40006c2c: 80 a0 80 14 cmp %g2, %l4 40006c30: 0a bf ff fd bcs 40006c24 <_Objects_Extend_information+0x84> 40006c34: c0 24 00 01 clr [ %l0 + %g1 ] 40006c38: ab 2c a0 02 sll %l2, 2, %l5 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006c3c: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006c40: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006c44: 86 04 c0 01 add %l3, %g1, %g3 40006c48: 80 a4 c0 03 cmp %l3, %g3 40006c4c: 1a 80 00 0a bcc 40006c74 <_Objects_Extend_information+0xd4> 40006c50: c0 25 c0 15 clr [ %l7 + %l5 ] 40006c54: 83 2c e0 02 sll %l3, 2, %g1 40006c58: 84 04 00 01 add %l0, %g1, %g2 40006c5c: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 40006c60: c0 20 80 00 clr [ %g2 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 40006c64: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006c68: 80 a0 40 03 cmp %g1, %g3 40006c6c: 0a bf ff fd bcs 40006c60 <_Objects_Extend_information+0xc0> 40006c70: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40006c74: 7f ff ec 2b call 40001d20 40006c78: 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( 40006c7c: c2 06 00 00 ld [ %i0 ], %g1 40006c80: c8 16 20 04 lduh [ %i0 + 4 ], %g4 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 40006c84: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006c88: 89 29 20 1b sll %g4, 0x1b, %g4 40006c8c: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40006c90: 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( 40006c94: 87 30 e0 10 srl %g3, 0x10, %g3 40006c98: 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; 40006c9c: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006ca0: 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; 40006ca4: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40006ca8: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40006cac: ee 26 20 34 st %l7, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006cb0: 82 10 40 04 or %g1, %g4, %g1 40006cb4: 82 10 40 03 or %g1, %g3, %g1 40006cb8: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40006cbc: 7f ff ec 1d call 40001d30 40006cc0: 01 00 00 00 nop if ( old_tables ) 40006cc4: 80 a4 20 00 cmp %l0, 0 40006cc8: 22 80 00 05 be,a 40006cdc <_Objects_Extend_information+0x13c> 40006ccc: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 40006cd0: 40 00 08 aa call 40008f78 <_Workspace_Free> 40006cd4: 90 10 00 10 mov %l0, %o0 40006cd8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40006cdc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006ce0: 80 a0 60 00 cmp %g1, 0 40006ce4: 02 80 00 55 be 40006e38 <_Objects_Extend_information+0x298> 40006ce8: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 40006cec: 90 10 00 10 mov %l0, %o0 40006cf0: 40 00 32 fd call 400138e4 <.umul> 40006cf4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40006cf8: 40 00 08 a7 call 40008f94 <_Workspace_Allocate> 40006cfc: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006d00: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40006d04: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006d08: d2 00 40 14 ld [ %g1 + %l4 ], %o1 40006d0c: 80 a2 60 00 cmp %o1, 0 40006d10: 02 80 00 64 be 40006ea0 <_Objects_Extend_information+0x300> 40006d14: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006d18: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40006d1c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006d20: a0 10 00 13 mov %l3, %l0 40006d24: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006d28: a6 07 bf ec add %fp, -20, %l3 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006d2c: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006d30: 40 00 11 ed call 4000b4e4 <_Chain_Initialize> 40006d34: 90 10 00 13 mov %l3, %o0 40006d38: 30 80 00 0c b,a 40006d68 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006d3c: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40006d40: 83 28 60 18 sll %g1, 0x18, %g1 40006d44: 85 28 a0 1b sll %g2, 0x1b, %g2 40006d48: 82 10 40 12 or %g1, %l2, %g1 40006d4c: 82 10 40 02 or %g1, %g2, %g1 40006d50: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006d54: 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( 40006d58: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40006d5c: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006d60: 7f ff fd 2f call 4000621c <_Chain_Append> 40006d64: 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 ) { 40006d68: 40 00 11 cc call 4000b498 <_Chain_Get> 40006d6c: 90 10 00 13 mov %l3, %o0 40006d70: 80 a2 20 00 cmp %o0, 0 40006d74: 32 bf ff f2 bne,a 40006d3c <_Objects_Extend_information+0x19c> 40006d78: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006d7c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40006d80: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 40006d84: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006d88: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 40006d8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006d90: 82 00 40 04 add %g1, %g4, %g1 40006d94: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006d98: 81 c7 e0 08 ret 40006d9c: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006da0: 90 10 00 15 mov %l5, %o0 40006da4: 40 00 33 0a call 400139cc <.udiv> 40006da8: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40006dac: a4 92 20 00 orcc %o0, 0, %l2 40006db0: 02 80 00 3e be 40006ea8 <_Objects_Extend_information+0x308> 40006db4: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 40006db8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 40006dbc: c2 00 80 00 ld [ %g2 ], %g1 40006dc0: 80 a0 60 00 cmp %g1, 0 40006dc4: 12 80 00 08 bne 40006de4 <_Objects_Extend_information+0x244> 40006dc8: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006dcc: 10 80 00 0c b 40006dfc <_Objects_Extend_information+0x25c> <== NOT EXECUTED 40006dd0: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40006dd4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40006dd8: 80 a0 60 00 cmp %g1, 0 40006ddc: 02 80 00 08 be 40006dfc <_Objects_Extend_information+0x25c> 40006de0: 80 a4 c0 15 cmp %l3, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006de4: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40006de8: a6 04 c0 10 add %l3, %l0, %l3 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006dec: 80 a4 80 11 cmp %l2, %l1 40006df0: 18 bf ff f9 bgu 40006dd4 <_Objects_Extend_information+0x234> 40006df4: 83 2c 60 02 sll %l1, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006df8: 80 a4 c0 15 cmp %l3, %l5 40006dfc: 2a bf ff b9 bcs,a 40006ce0 <_Objects_Extend_information+0x140> 40006e00: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006e04: ac 04 a0 01 add %l2, 1, %l6 40006e08: 83 2d a0 01 sll %l6, 1, %g1 40006e0c: 10 bf ff 73 b 40006bd8 <_Objects_Extend_information+0x38> 40006e10: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 40006e14: 90 02 00 14 add %o0, %l4, %o0 40006e18: 90 02 00 1d add %o0, %i5, %o0 40006e1c: 40 00 08 5e call 40008f94 <_Workspace_Allocate> 40006e20: 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 ) 40006e24: ae 92 20 00 orcc %o0, 0, %l7 40006e28: 32 bf ff 76 bne,a 40006c00 <_Objects_Extend_information+0x60> 40006e2c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006e30: 81 c7 e0 08 ret <== NOT EXECUTED 40006e34: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 40006e38: 90 10 00 10 mov %l0, %o0 40006e3c: 40 00 32 aa call 400138e4 <.umul> 40006e40: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40006e44: 40 00 08 5b call 40008fb0 <_Workspace_Allocate_or_fatal_error> 40006e48: a9 2c 60 02 sll %l1, 2, %l4 40006e4c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006e50: d0 24 00 14 st %o0, [ %l0 + %l4 ] 40006e54: 10 bf ff b1 b 40006d18 <_Objects_Extend_information+0x178> 40006e58: d2 00 40 14 ld [ %g1 + %l4 ], %o1 /* * 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, 40006e5c: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 40006e60: ab 2c a0 02 sll %l2, 2, %l5 40006e64: 90 10 00 17 mov %l7, %o0 40006e68: 40 00 18 fb call 4000d254 40006e6c: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40006e70: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40006e74: 94 10 00 15 mov %l5, %o2 40006e78: 40 00 18 f7 call 4000d254 40006e7c: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006e80: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40006e84: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40006e88: 94 05 00 0a add %l4, %o2, %o2 40006e8c: 90 10 00 10 mov %l0, %o0 40006e90: 40 00 18 f1 call 4000d254 40006e94: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006e98: 10 bf ff 6a b 40006c40 <_Objects_Extend_information+0xa0> 40006e9c: c0 25 80 15 clr [ %l6 + %l5 ] 40006ea0: 81 c7 e0 08 ret <== NOT EXECUTED 40006ea4: 81 e8 00 00 restore <== NOT EXECUTED if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006ea8: 10 bf ff d4 b 40006df8 <_Objects_Extend_information+0x258> <== NOT EXECUTED 40006eac: a2 10 20 00 clr %l1 <== NOT EXECUTED 40006f60 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40006f60: 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 ) 40006f64: 82 06 3f ff add %i0, -1, %g1 40006f68: 80 a0 60 03 cmp %g1, 3 40006f6c: 38 80 00 1e bgu,a 40006fe4 <_Objects_Get_information+0x84> 40006f70: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40006f74: 80 a6 60 00 cmp %i1, 0 40006f78: 12 80 00 04 bne 40006f88 <_Objects_Get_information+0x28> 40006f7c: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 40006f80: 81 c7 e0 08 ret 40006f84: 91 e8 20 00 restore %g0, 0, %o0 return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40006f88: 40 00 12 9f call 4000ba04 <_Objects_API_maximum_class> 40006f8c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40006f90: 80 a2 20 00 cmp %o0, 0 40006f94: 06 bf ff fb bl 40006f80 <_Objects_Get_information+0x20> 40006f98: 80 a2 00 19 cmp %o0, %i1 40006f9c: 2a 80 00 12 bcs,a 40006fe4 <_Objects_Get_information+0x84> 40006fa0: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 40006fa4: 85 2e 20 02 sll %i0, 2, %g2 40006fa8: 03 10 00 61 sethi %hi(0x40018400), %g1 40006fac: 82 10 63 80 or %g1, 0x380, %g1 ! 40018780 <_Objects_Information_table> 40006fb0: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40006fb4: 80 a0 a0 00 cmp %g2, 0 40006fb8: 02 80 00 0b be 40006fe4 <_Objects_Get_information+0x84> 40006fbc: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40006fc0: 83 2e 60 02 sll %i1, 2, %g1 40006fc4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40006fc8: 80 a6 20 00 cmp %i0, 0 40006fcc: 02 80 00 06 be 40006fe4 <_Objects_Get_information+0x84> 40006fd0: 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 ) 40006fd4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006fd8: 80 a0 60 00 cmp %g1, 0 40006fdc: 22 80 00 02 be,a 40006fe4 <_Objects_Get_information+0x84> 40006fe0: b0 10 20 00 clr %i0 return NULL; #endif return info; } 40006fe4: 81 c7 e0 08 ret 40006fe8: 81 e8 00 00 restore 40006fec <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 40006fec: 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; 40006ff0: 03 00 00 3f sethi %hi(0xfc00), %g1 40006ff4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 40006ff8: 7f ff eb 4a call 40001d20 40006ffc: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 40007000: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007004: 80 a6 40 01 cmp %i1, %g1 40007008: 18 80 00 0b bgu 40007034 <_Objects_Get_isr_disable+0x48> 4000700c: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 40007010: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40007014: f0 00 80 01 ld [ %g2 + %g1 ], %i0 40007018: 80 a6 20 00 cmp %i0, 0 4000701c: 02 80 00 0c be 4000704c <_Objects_Get_isr_disable+0x60> 40007020: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 40007024: 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; 40007028: c0 26 80 00 clr [ %i2 ] 4000702c: 81 c7 e0 08 ret 40007030: 81 e8 00 00 restore } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 40007034: 7f ff eb 3f call 40001d30 40007038: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 4000703c: 82 10 20 01 mov 1, %g1 40007040: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 40007044: 81 c7 e0 08 ret 40007048: 81 e8 00 00 restore if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 4000704c: 7f ff eb 39 call 40001d30 <== NOT EXECUTED 40007050: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 40007054: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40007058: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 4000705c: 81 c7 e0 08 ret <== NOT EXECUTED 40007060: 81 e8 00 00 restore <== NOT EXECUTED 400174f8 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 400174f8: 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) 400174fc: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40017500: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 40017504: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40017508: 22 80 00 02 be,a 40017510 <_Objects_Get_next+0x18> <== NOT EXECUTED 4001750c: 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) 40017510: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40017514: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40017518: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 4001751c: 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); 40017520: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40017524: 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) 40017528: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001752c: 0a 80 00 0b bcs 40017558 <_Objects_Get_next+0x60> <== NOT EXECUTED 40017530: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 40017534: 7f ff d8 50 call 4000d674 <_Objects_Get> <== NOT EXECUTED 40017538: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 4001753c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40017540: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017544: 32 bf ff f6 bne,a 4001751c <_Objects_Get_next+0x24> <== NOT EXECUTED 40017548: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 4001754c: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40017550: 81 c7 e0 08 ret <== NOT EXECUTED 40017554: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 40017558: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001755c: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40017560: 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; 40017564: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40017568: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 4001756c: 81 c7 e0 08 ret <== NOT EXECUTED 40017570: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40008364 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40008364: 9d e3 bf 90 save %sp, -112, %sp 40008368: 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 ) 4000836c: 80 a6 60 00 cmp %i1, 0 40008370: 02 80 00 24 be 40008400 <_Objects_Id_to_name+0x9c> 40008374: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40008378: 80 a2 60 00 cmp %o1, 0 4000837c: 02 80 00 26 be 40008414 <_Objects_Id_to_name+0xb0> 40008380: 03 10 00 72 sethi %hi(0x4001c800), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008384: 83 32 60 18 srl %o1, 0x18, %g1 40008388: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4000838c: 84 00 7f ff add %g1, -1, %g2 40008390: 80 a0 a0 03 cmp %g2, 3 40008394: 38 80 00 1b bgu,a 40008400 <_Objects_Id_to_name+0x9c> 40008398: 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 ] ) 4000839c: 85 28 60 02 sll %g1, 2, %g2 400083a0: 03 10 00 71 sethi %hi(0x4001c400), %g1 400083a4: 82 10 63 c0 or %g1, 0x3c0, %g1 ! 4001c7c0 <_Objects_Information_table> 400083a8: c4 00 40 02 ld [ %g1 + %g2 ], %g2 400083ac: 80 a0 a0 00 cmp %g2, 0 400083b0: 02 80 00 16 be 40008408 <_Objects_Id_to_name+0xa4> 400083b4: 83 32 60 1b srl %o1, 0x1b, %g1 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 400083b8: 83 28 60 02 sll %g1, 2, %g1 400083bc: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 400083c0: 80 a2 20 00 cmp %o0, 0 400083c4: 02 80 00 0f be 40008400 <_Objects_Id_to_name+0x9c> 400083c8: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 400083cc: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 400083d0: 80 a0 60 00 cmp %g1, 0 400083d4: 12 80 00 0e bne 4000840c <_Objects_Id_to_name+0xa8> 400083d8: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 400083dc: 7f ff ff c5 call 400082f0 <_Objects_Get> 400083e0: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 400083e4: 80 a2 20 00 cmp %o0, 0 400083e8: 22 80 00 06 be,a 40008400 <_Objects_Id_to_name+0x9c> 400083ec: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 400083f0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 400083f4: b0 10 20 00 clr %i0 400083f8: 40 00 02 5b call 40008d64 <_Thread_Enable_dispatch> 400083fc: c2 26 40 00 st %g1, [ %i1 ] 40008400: 81 c7 e0 08 ret 40008404: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 40008408: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 4000840c: 81 c7 e0 08 ret <== NOT EXECUTED 40008410: 81 e8 00 00 restore <== NOT EXECUTED Objects_Locations ignored_location; if ( !name ) return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40008414: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 40008418: d2 00 a0 08 ld [ %g2 + 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); 4000841c: 83 32 60 18 srl %o1, 0x18, %g1 40008420: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40008424: 84 00 7f ff add %g1, -1, %g2 40008428: 80 a0 a0 03 cmp %g2, 3 4000842c: 38 bf ff f5 bgu,a 40008400 <_Objects_Id_to_name+0x9c> 40008430: b0 10 20 03 mov 3, %i0 <== 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 ] ) 40008434: 10 bf ff db b 400083a0 <_Objects_Id_to_name+0x3c> 40008438: 85 28 60 02 sll %g1, 2, %g2 400071e4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 400071e4: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 400071e8: 80 a2 e0 00 cmp %o3, 0 400071ec: 02 80 00 20 be 4000726c <_Objects_Name_to_id_u32+0x88> 400071f0: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 400071f4: 80 a2 60 00 cmp %o1, 0 400071f8: 22 80 00 1d be,a 4000726c <_Objects_Name_to_id_u32+0x88> 400071fc: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007200: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 40007204: 85 28 60 10 sll %g1, 0x10, %g2 40007208: 80 a0 a0 00 cmp %g2, 0 4000720c: 22 80 00 18 be,a 4000726c <_Objects_Name_to_id_u32+0x88> 40007210: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40007214: 80 a2 a0 00 cmp %o2, 0 40007218: 12 80 00 17 bne 40007274 <_Objects_Name_to_id_u32+0x90> 4000721c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40007220: 89 30 a0 10 srl %g2, 0x10, %g4 40007224: 80 a1 20 00 cmp %g4, 0 40007228: 02 80 00 11 be 4000726c <_Objects_Name_to_id_u32+0x88> 4000722c: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007230: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 40007234: 86 10 20 01 mov 1, %g3 if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 40007238: 83 28 e0 02 sll %g3, 2, %g1 4000723c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 40007240: 80 a0 a0 00 cmp %g2, 0 40007244: 02 80 00 06 be 4000725c <_Objects_Name_to_id_u32+0x78> 40007248: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 4000724c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40007250: 80 a0 40 09 cmp %g1, %o1 40007254: 22 80 00 0f be,a 40007290 <_Objects_Name_to_id_u32+0xac> 40007258: c2 00 a0 08 ld [ %g2 + 8 ], %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 4000725c: 80 a0 c0 04 cmp %g3, %g4 40007260: 08 bf ff f7 bleu 4000723c <_Objects_Name_to_id_u32+0x58> 40007264: 83 28 e0 02 sll %g3, 2, %g1 40007268: 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 } 4000726c: 81 c3 e0 08 retl 40007270: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007274: 82 10 63 ff or %g1, 0x3ff, %g1 40007278: 80 a2 80 01 cmp %o2, %g1 4000727c: 02 bf ff e9 be 40007220 <_Objects_Name_to_id_u32+0x3c> 40007280: 80 a2 a0 01 cmp %o2, 1 40007284: 02 bf ff e7 be 40007220 <_Objects_Name_to_id_u32+0x3c> 40007288: 90 10 20 01 mov 1, %o0 4000728c: 30 bf ff f8 b,a 4000726c <_Objects_Name_to_id_u32+0x88> the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 40007290: 90 10 20 00 clr %o0 40007294: 81 c3 e0 08 retl 40007298: c2 22 c0 00 st %g1, [ %o3 ] 400071ac <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 400071ac: 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 ) 400071b0: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 400071b4: 80 a0 60 00 cmp %g1, 0 400071b8: 22 80 00 09 be,a 400071dc <_Objects_Namespace_remove+0x30> 400071bc: c0 26 60 0c clr [ %i1 + 0xc ] 400071c0: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 400071c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400071c8: 22 80 00 05 be,a 400071dc <_Objects_Namespace_remove+0x30> <== NOT EXECUTED 400071cc: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 400071d0: 40 00 07 6a call 40008f78 <_Workspace_Free> <== NOT EXECUTED 400071d4: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 400071d8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 400071dc: 81 c7 e0 08 ret 400071e0: 81 e8 00 00 restore 40008edc <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 40008edc: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 40008ee0: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 40008ee4: 40 00 1d c8 call 40010604 40008ee8: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 40008eec: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 40008ef0: 80 a0 60 00 cmp %g1, 0 40008ef4: 12 80 00 21 bne 40008f78 <_Objects_Set_name+0x9c> 40008ef8: a0 02 20 01 add %o0, 1, %l0 strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 40008efc: 03 08 08 08 sethi %hi(0x20202000), %g1 40008f00: 80 a4 20 00 cmp %l0, 0 40008f04: 02 80 00 19 be 40008f68 <_Objects_Set_name+0x8c> 40008f08: 82 10 60 20 or %g1, 0x20, %g1 40008f0c: c4 4e 80 00 ldsb [ %i2 ], %g2 40008f10: 03 00 08 08 sethi %hi(0x202000), %g1 40008f14: 87 28 a0 18 sll %g2, 0x18, %g3 40008f18: 82 10 60 20 or %g1, 0x20, %g1 40008f1c: 80 a4 20 01 cmp %l0, 1 40008f20: 02 80 00 12 be 40008f68 <_Objects_Set_name+0x8c> 40008f24: 82 10 c0 01 or %g3, %g1, %g1 40008f28: c4 4e a0 01 ldsb [ %i2 + 1 ], %g2 40008f2c: 03 00 00 08 sethi %hi(0x2000), %g1 40008f30: 85 28 a0 10 sll %g2, 0x10, %g2 40008f34: 82 10 60 20 or %g1, 0x20, %g1 40008f38: 84 10 80 03 or %g2, %g3, %g2 40008f3c: 80 a4 20 02 cmp %l0, 2 40008f40: 02 80 00 0a be 40008f68 <_Objects_Set_name+0x8c> 40008f44: 82 10 80 01 or %g2, %g1, %g1 40008f48: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 40008f4c: 80 a4 20 03 cmp %l0, 3 40008f50: 83 28 60 08 sll %g1, 8, %g1 40008f54: 84 10 80 01 or %g2, %g1, %g2 40008f58: 02 80 00 04 be 40008f68 <_Objects_Set_name+0x8c> 40008f5c: 82 10 a0 20 or %g2, 0x20, %g1 40008f60: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 40008f64: 82 10 80 01 or %g2, %g1, %g1 40008f68: c2 26 60 0c st %g1, [ %i1 + 0xc ] 40008f6c: b0 10 20 01 mov 1, %i0 ); } return TRUE; } 40008f70: 81 c7 e0 08 ret 40008f74: 81 e8 00 00 restore length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 40008f78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40008f7c: 40 00 07 50 call 4000acbc <_Workspace_Allocate> <== NOT EXECUTED 40008f80: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 40008f84: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40008f88: 02 bf ff fa be 40008f70 <_Objects_Set_name+0x94> <== NOT EXECUTED 40008f8c: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 40008f90: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 40008f94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008f98: 02 80 00 06 be 40008fb0 <_Objects_Set_name+0xd4> <== NOT EXECUTED 40008f9c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 40008fa0: 40 00 07 40 call 4000aca0 <_Workspace_Free> <== NOT EXECUTED 40008fa4: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 40008fa8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 40008fac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40008fb0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008fb4: 40 00 1d 5a call 4001051c <== NOT EXECUTED 40008fb8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 40008fbc: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 40008fc0: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 40008fc4: 81 c7 e0 08 ret <== NOT EXECUTED 40008fc8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 400072a4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 400072a4: 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; 400072a8: 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; 400072ac: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 400072b0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 400072b4: 03 00 00 3f sethi %hi(0xfc00), %g1 400072b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400072bc: 92 10 00 10 mov %l0, %o1 400072c0: a4 08 80 01 and %g2, %g1, %l2 400072c4: 40 00 31 c2 call 400139cc <.udiv> 400072c8: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 400072cc: 80 a2 20 00 cmp %o0, 0 400072d0: 02 80 00 12 be 40007318 <_Objects_Shrink_information+0x74> 400072d4: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400072d8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400072dc: c2 00 c0 00 ld [ %g3 ], %g1 400072e0: 80 a4 00 01 cmp %l0, %g1 400072e4: 12 80 00 09 bne 40007308 <_Objects_Shrink_information+0x64> 400072e8: a2 10 20 04 mov 4, %l1 400072ec: 10 80 00 0d b 40007320 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 400072f0: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400072f4: a4 04 80 10 add %l2, %l0, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400072f8: 80 a4 00 01 cmp %l0, %g1 400072fc: 02 80 00 09 be 40007320 <_Objects_Shrink_information+0x7c> 40007300: 82 04 60 04 add %l1, 4, %g1 40007304: a2 10 00 01 mov %g1, %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++ ) { 40007308: 84 00 a0 01 inc %g2 4000730c: 80 a2 00 02 cmp %o0, %g2 40007310: 38 bf ff f9 bgu,a 400072f4 <_Objects_Shrink_information+0x50> 40007314: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 40007318: 81 c7 e0 08 ret 4000731c: 81 e8 00 00 restore 40007320: 03 00 00 3f sethi %hi(0xfc00), %g1 /* * 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; 40007324: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40007328: 10 80 00 0f b 40007364 <_Objects_Shrink_information+0xc0> 4000732c: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40007330: 82 04 80 01 add %l2, %g1, %g1 40007334: 80 a0 40 03 cmp %g1, %g3 40007338: 08 80 00 10 bleu 40007378 <_Objects_Shrink_information+0xd4> 4000733c: 90 10 00 02 mov %g2, %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 ); 40007340: 40 00 10 4c call 4000b470 <_Chain_Extract> 40007344: e0 00 80 00 ld [ %g2 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40007348: 80 a4 20 00 cmp %l0, 0 4000734c: 22 80 00 10 be,a 4000738c <_Objects_Shrink_information+0xe8> 40007350: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40007354: c2 04 00 00 ld [ %l0 ], %g1 40007358: 80 a0 60 00 cmp %g1, 0 4000735c: 02 80 00 0b be 40007388 <_Objects_Shrink_information+0xe4> 40007360: 84 10 00 10 mov %l0, %g2 40007364: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007368: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 4000736c: 80 a0 c0 12 cmp %g3, %l2 40007370: 3a bf ff f0 bcc,a 40007330 <_Objects_Shrink_information+0x8c> 40007374: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40007378: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 4000737c: 80 a4 20 00 cmp %l0, 0 40007380: 32 bf ff f6 bne,a 40007358 <_Objects_Shrink_information+0xb4> 40007384: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40007388: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 4000738c: 40 00 06 fb call 40008f78 <_Workspace_Free> 40007390: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40007394: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40007398: 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; 4000739c: c0 20 80 11 clr [ %g2 + %l1 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 400073a0: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400073a4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 400073a8: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400073ac: 82 20 40 02 sub %g1, %g2, %g1 400073b0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400073b4: 81 c7 e0 08 ret 400073b8: 81 e8 00 00 restore 400253a0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 400253a0: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 400253a4: 80 a6 20 00 cmp %i0, 0 400253a8: 02 80 00 10 be 400253e8 <_Protected_heap_Get_information+0x48> 400253ac: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 400253b0: 02 80 00 0e be 400253e8 <_Protected_heap_Get_information+0x48> 400253b4: 23 10 01 7b sethi %hi(0x4005ec00), %l1 return false; _RTEMS_Lock_allocator(); 400253b8: 7f ff 94 2a call 4000a460 <_API_Mutex_Lock> 400253bc: d0 04 60 38 ld [ %l1 + 0x38 ], %o0 ! 4005ec38 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 400253c0: 90 10 00 18 mov %i0, %o0 400253c4: 40 00 2a 76 call 4002fd9c <_Heap_Get_information> 400253c8: 92 10 00 19 mov %i1, %o1 400253cc: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 400253d0: 7f ff 94 3a call 4000a4b8 <_API_Mutex_Unlock> 400253d4: d0 04 60 38 ld [ %l1 + 0x38 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 400253d8: 80 a0 00 10 cmp %g0, %l0 400253dc: 82 60 3f ff subx %g0, -1, %g1 400253e0: 81 c7 e0 08 ret 400253e4: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 400253e8: 81 c7 e0 08 ret <== NOT EXECUTED 400253ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000b220 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000b220: 9d e3 bf 90 save %sp, -112, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4000b224: f0 06 21 5c ld [ %i0 + 0x15c ], %i0 if ( !api ) 4000b228: 80 a6 20 00 cmp %i0, 0 4000b22c: 02 80 00 1f be 4000b2a8 <_RTEMS_tasks_Post_switch_extension+0x88> 4000b230: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000b234: 7f ff da bb call 40001d20 4000b238: 01 00 00 00 nop signal_set = asr->signals_posted; 4000b23c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 asr->signals_posted = 0; 4000b240: c0 26 20 14 clr [ %i0 + 0x14 ] _ISR_Enable( level ); 4000b244: 7f ff da bb call 40001d30 4000b248: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000b24c: 80 a4 a0 00 cmp %l2, 0 4000b250: 32 80 00 04 bne,a 4000b260 <_RTEMS_tasks_Post_switch_extension+0x40> 4000b254: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000b258: 81 c7 e0 08 ret <== NOT EXECUTED 4000b25c: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b260: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b264: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b268: a2 07 bf f4 add %fp, -12, %l1 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b26c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b270: 94 10 00 11 mov %l1, %o2 4000b274: 21 00 00 3f sethi %hi(0xfc00), %l0 4000b278: 40 00 04 8a call 4000c4a0 4000b27c: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000b280: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000b284: 9f c0 40 00 call %g1 4000b288: 90 10 00 12 mov %l2, %o0 asr->nest_level -= 1; 4000b28c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b290: d0 07 bf f4 ld [ %fp + -12 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b294: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b298: 92 14 23 ff or %l0, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b29c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b2a0: 40 00 04 80 call 4000c4a0 4000b2a4: 94 10 00 11 mov %l1, %o2 4000b2a8: 81 c7 e0 08 ret 4000b2ac: 81 e8 00 00 restore 40006db8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40006db8: 9d e3 bf 90 save %sp, -112, %sp 40006dbc: 11 10 00 74 sethi %hi(0x4001d000), %o0 40006dc0: 92 10 00 18 mov %i0, %o1 40006dc4: 90 12 21 74 or %o0, 0x174, %o0 40006dc8: 40 00 07 f3 call 40008d94 <_Objects_Get> 40006dcc: 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 ) { 40006dd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006dd4: 80 a0 60 00 cmp %g1, 0 40006dd8: 12 80 00 11 bne 40006e1c <_Rate_monotonic_Timeout+0x64> 40006ddc: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40006de0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006de4: 03 00 00 10 sethi %hi(0x4000), %g1 40006de8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40006dec: 80 88 80 01 btst %g2, %g1 40006df0: 32 80 00 0d bne,a 40006e24 <_Rate_monotonic_Timeout+0x6c> 40006df4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 _Thread_Unblock( the_thread ); _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 ) { 40006df8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40006dfc: 80 a0 60 01 cmp %g1, 1 40006e00: 02 80 00 12 be 40006e48 <_Rate_monotonic_Timeout+0x90> 40006e04: 82 10 20 04 mov 4, %g1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40006e08: 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; 40006e0c: 05 10 00 74 sethi %hi(0x4001d000), %g2 40006e10: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 4001d2f0 <_Thread_Dispatch_disable_level> 40006e14: 82 00 7f ff add %g1, -1, %g1 40006e18: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 40006e1c: 81 c7 e0 08 ret 40006e20: 81 e8 00 00 restore the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006e24: c2 06 20 08 ld [ %i0 + 8 ], %g1 40006e28: 80 a0 80 01 cmp %g2, %g1 40006e2c: 32 bf ff f4 bne,a 40006dfc <_Rate_monotonic_Timeout+0x44> 40006e30: 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 ); 40006e34: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006e38: 40 00 09 41 call 4000933c <_Thread_Clear_state> 40006e3c: 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 ); 40006e40: 10 80 00 05 b 40006e54 <_Rate_monotonic_Timeout+0x9c> 40006e44: 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 ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006e48: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006e4c: 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; 40006e50: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006e54: 7f ff fe 2e call 4000670c <_Rate_monotonic_Initiate_statistics> 40006e58: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006e5c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006e60: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006e64: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006e68: 11 10 00 74 sethi %hi(0x4001d000), %o0 40006e6c: 40 00 0f a8 call 4000ad0c <_Watchdog_Insert> 40006e70: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 4001d3d0 <_Watchdog_Ticks_chain> 40006e74: 30 bf ff e6 b,a 40006e0c <_Rate_monotonic_Timeout+0x54> 4000779c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 4000779c: 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 ); 400077a0: 35 10 00 62 sethi %hi(0x40018800), %i2 400077a4: 7f ff fc c8 call 40006ac4 <_Objects_Allocate> 400077a8: 90 16 a1 80 or %i2, 0x180, %o0 ! 40018980 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400077ac: 37 10 00 62 sethi %hi(0x40018800), %i3 400077b0: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 ! 40018820 <_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(); 400077b4: 39 10 00 62 sethi %hi(0x40018800), %i4 400077b8: 82 00 60 01 inc %g1 400077bc: d0 27 21 cc st %o0, [ %i4 + 0x1cc ] 400077c0: c2 26 e0 20 st %g1, [ %i3 + 0x20 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 400077c4: 33 10 00 62 sethi %hi(0x40018800), %i1 400077c8: c2 06 60 b8 ld [ %i1 + 0xb8 ], %g1 ! 400188b8 <_Configuration_Table> 400077cc: 05 10 00 5e sethi %hi(0x40017800), %g2 400077d0: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 400077d4: d6 00 a3 50 ld [ %g2 + 0x350 ], %o3 400077d8: 03 10 00 5b sethi %hi(0x40016c00), %g1 400077dc: 82 10 63 b0 or %g1, 0x3b0, %g1 ! 40016fb0 <_Status_Object_name_errors_to_status+0x18> 400077e0: c2 27 bf f4 st %g1, [ %fp + -12 ] 400077e4: 80 a2 c0 03 cmp %o3, %g3 400077e8: 1a 80 00 03 bcc 400077f4 <_Thread_Create_idle+0x58> 400077ec: d2 07 21 cc ld [ %i4 + 0x1cc ], %o1 400077f0: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 400077f4: 03 10 00 5e sethi %hi(0x40017800), %g1 400077f8: da 08 63 54 ldub [ %g1 + 0x354 ], %o5 ! 40017b54 400077fc: 84 07 bf f4 add %fp, -12, %g2 40007800: 82 10 20 01 mov 1, %g1 40007804: c0 23 a0 60 clr [ %sp + 0x60 ] 40007808: c0 23 a0 64 clr [ %sp + 0x64 ] 4000780c: c0 23 a0 68 clr [ %sp + 0x68 ] 40007810: 90 16 a1 80 or %i2, 0x180, %o0 40007814: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40007818: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 4000781c: 94 10 20 00 clr %o2 40007820: 40 00 00 b2 call 40007ae8 <_Thread_Initialize> 40007824: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 40007828: c4 06 60 b8 ld [ %i1 + 0xb8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000782c: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40007830: c6 07 21 cc ld [ %i4 + 0x1cc ], %g3 40007834: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40007838: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 4000783c: c2 26 e0 20 st %g1, [ %i3 + 0x20 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40007840: 05 10 00 62 sethi %hi(0x40018800), %g2 40007844: 03 10 00 62 sethi %hi(0x40018800), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40007848: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000784c: c6 20 a0 e0 st %g3, [ %g2 + 0xe0 ] 40007850: c6 20 60 ac st %g3, [ %g1 + 0xac ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40007854: b2 10 20 00 clr %i1 40007858: b6 10 20 00 clr %i3 4000785c: 40 00 03 ab call 40008708 <_Thread_Start> 40007860: 99 e8 20 00 restore %g0, 0, %o4 40007864: 01 00 00 00 nop 40007a38 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40007a38: 86 10 00 08 mov %o0, %g3 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 ) ) { 40007a3c: 80 a2 20 00 cmp %o0, 0 40007a40: 02 80 00 1d be 40007ab4 <_Thread_Get+0x7c> 40007a44: 94 10 00 09 mov %o1, %o2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007a48: 83 32 20 18 srl %o0, 0x18, %g1 40007a4c: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40007a50: 84 00 7f ff add %g1, -1, %g2 40007a54: 80 a0 a0 03 cmp %g2, 3 40007a58: 38 80 00 14 bgu,a 40007aa8 <_Thread_Get+0x70> 40007a5c: 82 10 20 01 mov 1, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007a60: 89 32 20 1b srl %o0, 0x1b, %g4 40007a64: 80 a1 20 01 cmp %g4, 1 40007a68: 12 80 00 0f bne 40007aa4 <_Thread_Get+0x6c> 40007a6c: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 40007a70: 03 10 00 61 sethi %hi(0x40018400), %g1 40007a74: 82 10 63 80 or %g1, 0x380, %g1 ! 40018780 <_Objects_Information_table> 40007a78: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 40007a7c: 80 a0 60 00 cmp %g1, 0 40007a80: 22 80 00 17 be,a 40007adc <_Thread_Get+0xa4> 40007a84: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 40007a88: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40007a8c: 80 a2 20 00 cmp %o0, 0 40007a90: 02 80 00 11 be 40007ad4 <_Thread_Get+0x9c> 40007a94: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007a98: 82 13 c0 00 mov %o7, %g1 40007a9c: 7f ff fd 72 call 40007064 <_Objects_Get> 40007aa0: 9e 10 40 00 mov %g1, %o7 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 40007aa4: 82 10 20 01 mov 1, %g1 40007aa8: 90 10 20 00 clr %o0 40007aac: 81 c3 e0 08 retl 40007ab0: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007ab4: 03 10 00 62 sethi %hi(0x40018800), %g1 40007ab8: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 40018820 <_Thread_Dispatch_disable_level> 40007abc: 84 00 a0 01 inc %g2 40007ac0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007ac4: 03 10 00 62 sethi %hi(0x40018800), %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; 40007ac8: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40007acc: 81 c3 e0 08 retl 40007ad0: d0 00 60 e0 ld [ %g1 + 0xe0 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 40007ad4: 81 c3 e0 08 retl <== NOT EXECUTED 40007ad8: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 40007adc: 81 c3 e0 08 retl 40007ae0: 90 10 20 00 clr %o0 4000c854 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000c854: 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; 4000c858: 03 10 00 62 sethi %hi(0x40018800), %g1 4000c85c: e2 00 60 e0 ld [ %g1 + 0xe0 ], %l1 ! 400188e0 <_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(); 4000c860: 3f 10 00 32 sethi %hi(0x4000c800), %i7 4000c864: be 17 e0 54 or %i7, 0x54, %i7 ! 4000c854 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000c868: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000c86c: 7f ff d5 31 call 40001d30 4000c870: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000c874: 05 10 00 61 sethi %hi(0x40018400), %g2 doneConstructors = 1; 4000c878: 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; 4000c87c: e0 08 a2 14 ldub [ %g2 + 0x214 ], %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 ); 4000c880: 90 10 00 11 mov %l1, %o0 4000c884: 7f ff f0 5f call 40008a00 <_User_extensions_Thread_begin> 4000c888: c2 28 a2 14 stb %g1, [ %g2 + 0x214 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000c88c: 7f ff ec 5d call 40007a00 <_Thread_Enable_dispatch> 4000c890: 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) */ 4000c894: 80 a4 20 00 cmp %l0, 0 4000c898: 02 80 00 1e be 4000c910 <_Thread_Handler+0xbc> 4000c89c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000c8a0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000c8a4: 80 a0 60 01 cmp %g1, 1 4000c8a8: 22 80 00 21 be,a 4000c92c <_Thread_Handler+0xd8> 4000c8ac: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c8b0: 80 a0 60 01 cmp %g1, 1 4000c8b4: 1a 80 00 0c bcc 4000c8e4 <_Thread_Handler+0x90> 4000c8b8: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000c8bc: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000c8c0: 9f c0 40 00 call %g1 4000c8c4: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 4000c8c8: d0 24 60 28 st %o0, [ %l1 + 0x28 ] * 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 ); 4000c8cc: 7f ff f0 61 call 40008a50 <_User_extensions_Thread_exitted> 4000c8d0: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000c8d4: 90 10 20 00 clr %o0 4000c8d8: 92 10 20 01 mov 1, %o1 4000c8dc: 7f ff e8 4a call 40006a04 <_Internal_error_Occurred> 4000c8e0: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000c8e4: 22 80 00 16 be,a 4000c93c <_Thread_Handler+0xe8> <== NOT EXECUTED 4000c8e8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c8ec: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000c8f0: 12 bf ff f7 bne 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c8f4: 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 = 4000c8f8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c8fc: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000c900: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c904: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000c908: 10 bf ff f1 b 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c90c: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED * 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) */ { _init (); 4000c910: 40 00 2c 56 call 40017a68 <_init> 4000c914: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000c918: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000c91c: 80 a0 60 01 cmp %g1, 1 4000c920: 12 bf ff e5 bne 4000c8b4 <_Thread_Handler+0x60> 4000c924: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000c928: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c92c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c930: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000c934: 10 bf ff e6 b 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c938: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000c93c: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000c940: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c944: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED 4000c948: 10 bf ff e1 b 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c94c: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED 40007ae8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40007ae8: 9d e3 bf 98 save %sp, -104, %sp 40007aec: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007af0: 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 ) { 40007af4: e6 00 40 00 ld [ %g1 ], %l3 40007af8: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007afc: 02 80 00 51 be 40007c40 <_Thread_Initialize+0x158> 40007b00: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 40007b04: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40007b08: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007b0c: 21 10 00 62 sethi %hi(0x40018800), %l0 40007b10: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 ! 400188c0 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40007b14: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40007b18: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007b1c: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40007b20: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40007b24: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40007b28: c0 26 60 6c clr [ %i1 + 0x6c ] 40007b2c: 80 a0 60 00 cmp %g1, 0 40007b30: 12 80 00 32 bne 40007bf8 <_Thread_Initialize+0x110> 40007b34: c0 26 61 58 clr [ %i1 + 0x158 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 40007b38: c0 26 61 68 clr [ %i1 + 0x168 ] 40007b3c: b6 10 20 00 clr %i3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007b40: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40007b44: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007b48: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 40007b4c: 80 a4 a0 02 cmp %l2, 2 40007b50: 12 80 00 05 bne 40007b64 <_Thread_Initialize+0x7c> 40007b54: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40007b58: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40007b5c: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 40018778 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40007b60: c4 26 60 78 st %g2, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40007b64: 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 ); 40007b68: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40007b6c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40007b70: 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 ); 40007b74: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40007b78: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 40007b7c: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40007b80: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40007b84: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40007b88: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40007b8c: 40 00 02 02 call 40008394 <_Thread_Set_priority> 40007b90: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007b94: c4 06 60 08 ld [ %i1 + 8 ], %g2 40007b98: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40007b9c: 03 00 00 3f sethi %hi(0xfc00), %g1 40007ba0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007ba4: 84 08 80 01 and %g2, %g1, %g2 40007ba8: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40007bac: e6 26 60 0c st %l3, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 40007bb0: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40007bb4: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007bb8: 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 ); 40007bbc: 90 10 00 19 mov %i1, %o0 40007bc0: 40 00 03 cc call 40008af0 <_User_extensions_Thread_create> 40007bc4: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 40007bc8: 80 8a 20 ff btst 0xff, %o0 40007bcc: 12 80 00 09 bne 40007bf0 <_Thread_Initialize+0x108> 40007bd0: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40007bd4: 02 80 00 05 be 40007be8 <_Thread_Initialize+0x100> <== NOT EXECUTED 40007bd8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 40007bdc: 40 00 04 e7 call 40008f78 <_Workspace_Free> <== NOT EXECUTED 40007be0: 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 ); 40007be4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007be8: 40 00 02 a7 call 40008684 <_Thread_Stack_Free> <== NOT EXECUTED 40007bec: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40007bf0: 81 c7 e0 08 ret 40007bf4: 81 e8 00 00 restore /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 40007bf8: 90 00 60 01 add %g1, 1, %o0 40007bfc: 40 00 04 e6 call 40008f94 <_Workspace_Allocate> 40007c00: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40007c04: b6 92 20 00 orcc %o0, 0, %i3 40007c08: 02 80 00 19 be 40007c6c <_Thread_Initialize+0x184> 40007c0c: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007c10: 88 80 60 01 addcc %g1, 1, %g4 40007c14: 02 bf ff cb be 40007b40 <_Thread_Initialize+0x58> 40007c18: f6 26 61 68 st %i3, [ %i1 + 0x168 ] 40007c1c: 84 10 20 00 clr %g2 40007c20: 86 10 00 1b mov %i3, %g3 the_thread->extensions[i] = NULL; 40007c24: 83 28 a0 02 sll %g2, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007c28: 84 00 a0 01 inc %g2 40007c2c: 80 a0 80 04 cmp %g2, %g4 40007c30: 0a bf ff fd bcs 40007c24 <_Thread_Initialize+0x13c> 40007c34: c0 20 c0 01 clr [ %g3 + %g1 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007c38: 10 bf ff c3 b 40007b44 <_Thread_Initialize+0x5c> 40007c3c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40007c40: 90 10 00 19 mov %i1, %o0 40007c44: 40 00 02 74 call 40008614 <_Thread_Stack_Allocate> 40007c48: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40007c4c: 80 a2 20 00 cmp %o0, 0 40007c50: 02 80 00 09 be 40007c74 <_Thread_Initialize+0x18c> 40007c54: 80 a6 c0 08 cmp %i3, %o0 40007c58: 18 80 00 07 bgu 40007c74 <_Thread_Initialize+0x18c> 40007c5c: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40007c60: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40007c64: 10 bf ff aa b 40007b0c <_Thread_Initialize+0x24> 40007c68: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40007c6c: 40 00 02 86 call 40008684 <_Thread_Stack_Free> <== NOT EXECUTED 40007c70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007c74: 81 c7 e0 08 ret 40007c78: 91 e8 20 00 restore %g0, 0, %o0 4000cbb4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000cbb4: 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; 4000cbb8: 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; 4000cbbc: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000cbc0: 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; 4000cbc4: 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; 4000cbc8: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000cbcc: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000cbd0: 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; 4000cbd4: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000cbd8: 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 ) ) { 4000cbdc: 7f ff f0 74 call 40008dac <_Thread_queue_Extract_with_proxy> 4000cbe0: 90 10 00 18 mov %i0, %o0 4000cbe4: 80 8a 20 ff btst 0xff, %o0 4000cbe8: 32 80 00 07 bne,a 4000cc04 <_Thread_Reset+0x50> 4000cbec: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000cbf0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000cbf4: 80 a0 60 02 cmp %g1, 2 4000cbf8: 02 80 00 0c be 4000cc28 <_Thread_Reset+0x74> 4000cbfc: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000cc00: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 4000cc04: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000cc08: 80 a0 40 19 cmp %g1, %i1 4000cc0c: 02 80 00 05 be 4000cc20 <_Thread_Reset+0x6c> 4000cc10: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000cc14: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000cc18: 7f ff f0 e4 call 40008fa8 <_Thread_Set_priority> 4000cc1c: 81 e8 00 00 restore 4000cc20: 81 c7 e0 08 ret 4000cc24: 81 e8 00 00 restore the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4000cc28: 7f ff f3 8d call 40009a5c <_Watchdog_Remove> <== NOT EXECUTED 4000cc2c: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000cc30: 10 bf ff f5 b 4000cc04 <_Thread_Reset+0x50> <== NOT EXECUTED 4000cc34: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000be88 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000be88: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000be8c: 03 10 00 62 sethi %hi(0x40018800), %g1 4000be90: e0 00 60 e0 ld [ %g1 + 0xe0 ], %l0 ! 400188e0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000be94: 7f ff d7 a3 call 40001d20 4000be98: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000be9c: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000bea0: c4 04 40 00 ld [ %l1 ], %g2 4000bea4: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000bea8: 80 a0 80 01 cmp %g2, %g1 4000beac: 02 80 00 18 be 4000bf0c <_Thread_Reset_timeslice+0x84> 4000beb0: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000beb4: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000beb8: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000bebc: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000bec0: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000bec4: 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; 4000bec8: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000becc: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000bed0: 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; 4000bed4: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000bed8: 7f ff d7 96 call 40001d30 4000bedc: 01 00 00 00 nop 4000bee0: 7f ff d7 90 call 40001d20 4000bee4: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000bee8: 07 10 00 62 sethi %hi(0x40018800), %g3 4000beec: c2 00 e0 ac ld [ %g3 + 0xac ], %g1 ! 400188ac <_Thread_Heir> 4000bef0: 80 a4 00 01 cmp %l0, %g1 4000bef4: 02 80 00 08 be 4000bf14 <_Thread_Reset_timeslice+0x8c> 4000bef8: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 4000befc: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 4000bf00: c4 28 60 f0 stb %g2, [ %g1 + 0xf0 ] ! 400188f0 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000bf04: 7f ff d7 8b call 40001d30 <== NOT EXECUTED 4000bf08: 81 e8 00 00 restore <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000bf0c: 7f ff d7 89 call 40001d30 4000bf10: 81 e8 00 00 restore _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4000bf14: c2 04 40 00 ld [ %l1 ], %g1 4000bf18: c2 20 e0 ac st %g1, [ %g3 + 0xac ] _Context_Switch_necessary = TRUE; 4000bf1c: 03 10 00 62 sethi %hi(0x40018800), %g1 4000bf20: c4 28 60 f0 stb %g2, [ %g1 + 0xf0 ] ! 400188f0 <_Context_Switch_necessary> _ISR_Enable( level ); 4000bf24: 7f ff d7 83 call 40001d30 4000bf28: 81 e8 00 00 restore 4000bf2c: 01 00 00 00 nop 40009cdc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 40009cdc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 40009ce0: 7f ff e3 2d call 40002994 40009ce4: 01 00 00 00 nop 40009ce8: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 40009cec: 80 8e 60 ff btst 0xff, %i1 40009cf0: 22 80 00 0d be,a 40009d24 <_Thread_Resume+0x48> 40009cf4: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 40009cf8: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 40009cfc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 40009d00: 80 88 60 02 btst 2, %g1 40009d04: 02 80 00 06 be 40009d1c <_Thread_Resume+0x40> 40009d08: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 40009d0c: 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 ) ) { 40009d10: 80 a0 60 00 cmp %g1, 0 40009d14: 02 80 00 0a be 40009d3c <_Thread_Resume+0x60> 40009d18: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 40009d1c: 7f ff e3 22 call 400029a4 40009d20: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 40009d24: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 40009d28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d2c: 02 bf ff f4 be 40009cfc <_Thread_Resume+0x20> <== NOT EXECUTED 40009d30: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 40009d34: 7f ff e3 1c call 400029a4 <== NOT EXECUTED 40009d38: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40009d3c: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 40009d40: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 40009d44: c2 11 00 00 lduh [ %g4 ], %g1 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 40009d48: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 40009d4c: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 40009d50: 1b 10 00 93 sethi %hi(0x40024c00), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40009d54: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009d58: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 40009d5c: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 40009d60: c2 26 00 00 st %g1, [ %i0 ] 40009d64: c4 13 61 44 lduh [ %o5 + 0x144 ], %g2 old_last_node = the_chain->last; 40009d68: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 40009d6c: f0 20 e0 08 st %i0, [ %g3 + 8 ] 40009d70: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 40009d74: c8 26 20 04 st %g4, [ %i0 + 4 ] 40009d78: c4 33 61 44 sth %g2, [ %o5 + 0x144 ] 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; 40009d7c: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 40009d80: 7f ff e3 09 call 400029a4 40009d84: 90 10 00 10 mov %l0, %o0 40009d88: 7f ff e3 03 call 40002994 40009d8c: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 40009d90: 09 10 00 93 sethi %hi(0x40024c00), %g4 40009d94: c4 01 21 1c ld [ %g4 + 0x11c ], %g2 ! 40024d1c <_Thread_Heir> 40009d98: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 40009d9c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40009da0: 80 a0 c0 01 cmp %g3, %g1 40009da4: 1a bf ff de bcc 40009d1c <_Thread_Resume+0x40> 40009da8: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 40009dac: 03 10 00 93 sethi %hi(0x40024c00), %g1 40009db0: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 40024d50 <_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; 40009db4: f0 21 21 1c st %i0, [ %g4 + 0x11c ] if ( _Thread_Executing->is_preemptible || 40009db8: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 40009dbc: 80 a0 60 00 cmp %g1, 0 40009dc0: 02 80 00 06 be 40009dd8 <_Thread_Resume+0xfc> 40009dc4: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 40009dc8: 84 10 20 01 mov 1, %g2 40009dcc: 03 10 00 93 sethi %hi(0x40024c00), %g1 40009dd0: c4 28 61 60 stb %g2, [ %g1 + 0x160 ] ! 40024d60 <_Context_Switch_necessary> 40009dd4: 30 bf ff d2 b,a 40009d1c <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 40009dd8: 12 bf ff d1 bne 40009d1c <_Thread_Resume+0x40> 40009ddc: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 40009de0: 10 bf ff fc b 40009dd0 <_Thread_Resume+0xf4> <== NOT EXECUTED 40009de4: 03 10 00 93 sethi %hi(0x40024c00), %g1 <== NOT EXECUTED 40008614 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 40008614: 9d e3 bf 98 save %sp, -104, %sp 40008618: 03 10 00 5e sethi %hi(0x40017800), %g1 4000861c: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 40017b50 40008620: 80 a6 40 01 cmp %i1, %g1 40008624: 2a 80 00 02 bcs,a 4000862c <_Thread_Stack_Allocate+0x18> 40008628: 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 ) { 4000862c: 03 10 00 62 sethi %hi(0x40018800), %g1 40008630: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400188b8 <_Configuration_Table> 40008634: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 40008638: 80 a0 60 00 cmp %g1, 0 4000863c: 22 80 00 0a be,a 40008664 <_Thread_Stack_Allocate+0x50> 40008640: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 40008644: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008648: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000864c: d0 26 20 cc st %o0, [ %i0 + 0xcc ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 40008650: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40008654: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40008658: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 4000865c: 81 c7 e0 08 ret <== NOT EXECUTED 40008660: 81 e8 00 00 restore <== 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 ); 40008664: 40 00 02 4c call 40008f94 <_Workspace_Allocate> 40008668: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000866c: 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 ) 40008670: 80 a0 00 08 cmp %g0, %o0 40008674: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40008678: b0 0e 40 18 and %i1, %i0, %i0 4000867c: 81 c7 e0 08 ret 40008680: 81 e8 00 00 restore 40008684 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 40008684: 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 ) 40008688: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 4000868c: 80 a0 60 00 cmp %g1, 0 40008690: 02 80 00 09 be 400086b4 <_Thread_Stack_Free+0x30> 40008694: 03 10 00 62 sethi %hi(0x40018800), %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 ) 40008698: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400188b8 <_Configuration_Table> 4000869c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 400086a0: 80 a0 60 00 cmp %g1, 0 400086a4: 22 80 00 06 be,a 400086bc <_Thread_Stack_Free+0x38> 400086a8: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 400086ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400086b0: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400086b4: 81 c7 e0 08 ret <== NOT EXECUTED 400086b8: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 400086bc: 40 00 02 2f call 40008f78 <_Workspace_Free> 400086c0: 81 e8 00 00 restore 400086c4: 01 00 00 00 nop 40008754 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 40008754: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 40008758: 03 10 00 62 sethi %hi(0x40018800), %g1 4000875c: e0 00 60 e0 ld [ %g1 + 0xe0 ], %l0 ! 400188e0 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 40008760: c4 0c 20 76 ldub [ %l0 + 0x76 ], %g2 40008764: 80 a0 a0 00 cmp %g2, 0 40008768: 02 80 00 23 be 400087f4 <_Thread_Tickle_timeslice+0xa0> 4000876c: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 40008770: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008774: 80 a0 60 00 cmp %g1, 0 40008778: 12 80 00 1f bne 400087f4 <_Thread_Tickle_timeslice+0xa0> 4000877c: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 40008780: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40008784: 80 a0 60 01 cmp %g1, 1 40008788: 0a 80 00 07 bcs 400087a4 <_Thread_Tickle_timeslice+0x50> 4000878c: 80 a0 60 02 cmp %g1, 2 40008790: 28 80 00 10 bleu,a 400087d0 <_Thread_Tickle_timeslice+0x7c> 40008794: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 40008798: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000879c: 22 80 00 04 be,a 400087ac <_Thread_Tickle_timeslice+0x58> <== NOT EXECUTED 400087a0: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED 400087a4: 81 c7 e0 08 ret 400087a8: 81 e8 00 00 restore executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 400087ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400087b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400087b4: 12 bf ff fc bne 400087a4 <_Thread_Tickle_timeslice+0x50> <== NOT EXECUTED 400087b8: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 400087bc: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 400087c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400087c4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400087c8: 81 c7 e0 08 ret <== NOT EXECUTED 400087cc: 81 e8 00 00 restore <== 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 ) { 400087d0: 82 00 7f ff add %g1, -1, %g1 400087d4: 80 a0 60 00 cmp %g1, 0 400087d8: 14 bf ff f3 bg 400087a4 <_Thread_Tickle_timeslice+0x50> 400087dc: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 400087e0: 40 00 0d aa call 4000be88 <_Thread_Reset_timeslice> 400087e4: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 400087e8: 03 10 00 61 sethi %hi(0x40018400), %g1 400087ec: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 40018778 <_Thread_Ticks_per_timeslice> 400087f0: c4 24 20 78 st %g2, [ %l0 + 0x78 ] 400087f4: 81 c7 e0 08 ret 400087f8: 81 e8 00 00 restore 40007f94 <_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 ) { 40007f94: 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; 40007f98: 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); 40007f9c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40007fa0: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007fa4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 40007fa8: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 40007fac: c4 26 60 40 st %g2, [ %i1 + 0x40 ] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 40007fb0: ac 10 00 18 mov %i0, %l6 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; if ( _Thread_queue_Is_reverse_search( priority ) ) 40007fb4: 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); 40007fb8: 83 34 a0 06 srl %l2, 6, %g1 40007fbc: 12 80 00 30 bne 4000807c <_Thread_queue_Enqueue_priority+0xe8> 40007fc0: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40007fc4: 85 28 60 04 sll %g1, 4, %g2 40007fc8: 83 28 60 02 sll %g1, 2, %g1 40007fcc: 82 20 80 01 sub %g2, %g1, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 40007fd0: b0 10 00 01 mov %g1, %i0 40007fd4: 82 05 80 01 add %l6, %g1, %g1 40007fd8: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40007fdc: 7f ff e7 51 call 40001d20 40007fe0: 01 00 00 00 nop 40007fe4: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 40007fe8: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40007fec: 80 a4 00 13 cmp %l0, %l3 40007ff0: 32 80 00 18 bne,a 40008050 <_Thread_queue_Enqueue_priority+0xbc> 40007ff4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 40007ff8: 10 80 00 81 b 400081fc <_Thread_queue_Enqueue_priority+0x268> 40007ffc: a2 10 3f ff mov -1, %l1 if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40008000: 80 a4 00 13 cmp %l0, %l3 40008004: 02 80 00 17 be 40008060 <_Thread_queue_Enqueue_priority+0xcc> 40008008: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 4000800c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40008010: 80 a4 80 11 cmp %l2, %l1 40008014: 28 80 00 14 bleu,a 40008064 <_Thread_queue_Enqueue_priority+0xd0> 40008018: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 4000801c: 7f ff e7 45 call 40001d30 40008020: 90 10 00 14 mov %l4, %o0 40008024: 7f ff e7 3f call 40001d20 40008028: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000802c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008030: 80 8d 40 01 btst %l5, %g1 40008034: 02 80 00 6b be 400081e0 <_Thread_queue_Enqueue_priority+0x24c> 40008038: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 4000803c: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 40008040: 80 a4 00 13 cmp %l0, %l3 40008044: 02 80 00 07 be 40008060 <_Thread_queue_Enqueue_priority+0xcc> 40008048: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 4000804c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40008050: 80 a4 80 11 cmp %l2, %l1 40008054: 38 bf ff eb bgu,a 40008000 <_Thread_queue_Enqueue_priority+0x6c> 40008058: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 4000805c: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008060: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 40008064: 80 a6 20 01 cmp %i0, 1 40008068: 02 80 00 47 be 40008184 <_Thread_queue_Enqueue_priority+0x1f0> 4000806c: 80 a4 80 11 cmp %l2, %l1 * 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; 40008070: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 40008074: 81 c7 e0 08 ret <== NOT EXECUTED 40008078: 81 e8 00 00 restore <== NOT EXECUTED the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4000807c: 85 28 60 04 sll %g1, 4, %g2 40008080: 83 28 60 02 sll %g1, 2, %g1 40008084: 82 20 80 01 sub %g2, %g1, %g1 40008088: 05 10 00 5e sethi %hi(0x40017800), %g2 4000808c: a6 06 00 01 add %i0, %g1, %l3 40008090: ae 10 a3 54 or %g2, 0x354, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40008094: b0 10 00 13 mov %l3, %i0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008098: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 4000809c: 7f ff e7 21 call 40001d20 400080a0: a2 00 60 01 add %g1, 1, %l1 400080a4: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 400080a8: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 400080ac: 80 a4 c0 10 cmp %l3, %l0 400080b0: 22 80 00 25 be,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 400080b4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 400080b8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 400080bc: 80 a4 80 11 cmp %l2, %l1 400080c0: 3a 80 00 21 bcc,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 400080c4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 400080c8: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400080cc: 80 a4 c0 10 cmp %l3, %l0 400080d0: 32 80 00 19 bne,a 40008134 <_Thread_queue_Enqueue_priority+0x1a0> 400080d4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400080d8: 10 80 00 1b b 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 400080dc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 400080e0: 7f ff e7 14 call 40001d30 400080e4: 90 10 00 14 mov %l4, %o0 400080e8: 7f ff e7 0e call 40001d20 400080ec: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400080f0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400080f4: 80 8d 40 01 btst %l5, %g1 400080f8: 02 80 00 3d be 400081ec <_Thread_queue_Enqueue_priority+0x258> 400080fc: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 40008100: e0 04 20 04 ld [ %l0 + 4 ], %l0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40008104: 80 a4 00 13 cmp %l0, %l3 40008108: 22 80 00 0f be,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 4000810c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 40008110: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40008114: 80 a4 80 11 cmp %l2, %l1 40008118: 3a 80 00 0b bcc,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 4000811c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40008120: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40008124: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 40008128: 22 80 00 07 be,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 4000812c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 40008130: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 40008134: 80 a4 80 11 cmp %l2, %l1 40008138: 0a bf ff ea bcs 400080e0 <_Thread_queue_Enqueue_priority+0x14c> 4000813c: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008140: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 40008144: 80 a6 20 01 cmp %i0, 1 40008148: 12 bf ff ca bne 40008070 <_Thread_queue_Enqueue_priority+0xdc> 4000814c: 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 ) 40008150: 80 a4 80 11 cmp %l2, %l1 40008154: 02 80 00 18 be 400081b4 <_Thread_queue_Enqueue_priority+0x220> 40008158: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4000815c: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40008160: 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; 40008164: 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; 40008168: ec 26 60 44 st %l6, [ %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; 4000816c: 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; 40008170: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008174: 7f ff e6 ef call 40001d30 40008178: 01 00 00 00 nop 4000817c: 81 c7 e0 08 ret 40008180: 81 e8 00 00 restore THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40008184: 02 80 00 0c be 400081b4 <_Thread_queue_Enqueue_priority+0x220> 40008188: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 4000818c: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008190: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40008194: 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; 40008198: ec 26 60 44 st %l6, [ %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; 4000819c: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 400081a0: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400081a4: 7f ff e6 e3 call 40001d30 400081a8: 90 10 00 14 mov %l4, %o0 400081ac: 81 c7 e0 08 ret 400081b0: 81 e8 00 00 restore 400081b4: 82 04 20 3c add %l0, 0x3c, %g1 _ISR_Enable( level ); 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; 400081b8: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 400081bc: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 400081c0: 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; 400081c4: ec 26 60 44 st %l6, [ %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; 400081c8: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 400081cc: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400081d0: 7f ff e6 d8 call 40001d30 400081d4: b0 10 20 01 mov 1, %i0 400081d8: 81 c7 e0 08 ret 400081dc: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 400081e0: 7f ff e6 d4 call 40001d30 <== NOT EXECUTED 400081e4: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 400081e8: 30 bf ff 7d b,a 40007fdc <_Thread_queue_Enqueue_priority+0x48> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 400081ec: 7f ff e6 d1 call 40001d30 <== NOT EXECUTED 400081f0: 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; 400081f4: 10 bf ff aa b 4000809c <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 400081f8: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400081fc: 10 bf ff 9a b 40008064 <_Thread_queue_Enqueue_priority+0xd0> 40008200: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 4000c950 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000c950: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000c954: 7f ff d4 f3 call 40001d20 4000c958: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000c95c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000c960: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000c964: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000c968: 80 88 80 01 btst %g2, %g1 4000c96c: 02 80 00 19 be 4000c9d0 <_Thread_queue_Extract_fifo+0x80> 4000c970: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000c974: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000c978: 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 ) ) { 4000c97c: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000c980: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000c984: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000c988: 80 a0 e0 02 cmp %g3, 2 4000c98c: 02 80 00 07 be 4000c9a8 <_Thread_queue_Extract_fifo+0x58> 4000c990: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000c994: 7f ff d4 e7 call 40001d30 4000c998: 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 ); 4000c99c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c9a0: 7f ff eb 1b call 4000760c <_Thread_Clear_state> 4000c9a4: 81 e8 00 00 restore 4000c9a8: 82 10 20 03 mov 3, %g1 4000c9ac: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000c9b0: 7f ff d4 e0 call 40001d30 4000c9b4: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000c9b8: 7f ff f1 0f call 40008df4 <_Watchdog_Remove> 4000c9bc: 90 06 60 48 add %i1, 0x48, %o0 4000c9c0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000c9c4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c9c8: 7f ff eb 11 call 4000760c <_Thread_Clear_state> 4000c9cc: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000c9d0: 7f ff d4 d8 call 40001d30 <== NOT EXECUTED 4000c9d4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c9d8: 01 00 00 00 nop 4000bc10 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000bc10: 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 ); 4000bc14: 7f ff d8 43 call 40001d20 4000bc18: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000bc1c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000bc20: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000bc24: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000bc28: 80 88 80 01 btst %g2, %g1 4000bc2c: 02 80 00 23 be 4000bcb8 <_Thread_queue_Extract_priority_helper+0xa8> 4000bc30: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bc34: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000bc38: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000bc3c: 80 a0 c0 01 cmp %g3, %g1 4000bc40: 02 80 00 2a be 4000bce8 <_Thread_queue_Extract_priority_helper+0xd8> 4000bc44: 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; 4000bc48: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000bc4c: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000bc50: 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; 4000bc54: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000bc58: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000bc5c: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000bc60: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000bc64: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000bc68: 80 a0 80 01 cmp %g2, %g1 4000bc6c: 02 80 00 07 be 4000bc88 <_Thread_queue_Extract_priority_helper+0x78> 4000bc70: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000bc74: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000bc78: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000bc7c: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000bc80: 82 00 e0 3c add %g3, 0x3c, %g1 4000bc84: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000bc88: 80 8e a0 ff btst 0xff, %i2 4000bc8c: 12 80 00 0d bne 4000bcc0 <_Thread_queue_Extract_priority_helper+0xb0> 4000bc90: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000bc94: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000bc98: 80 a0 60 02 cmp %g1, 2 4000bc9c: 02 80 00 0b be 4000bcc8 <_Thread_queue_Extract_priority_helper+0xb8> 4000bca0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000bca4: 7f ff d8 23 call 40001d30 4000bca8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000bcac: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000bcb0: 7f ff ee 57 call 4000760c <_Thread_Clear_state> 4000bcb4: 81 e8 00 00 restore Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000bcb8: 7f ff d8 1e call 40001d30 <== NOT EXECUTED 4000bcbc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4000bcc0: 7f ff d8 1c call 40001d30 4000bcc4: 91 e8 00 08 restore %g0, %o0, %o0 4000bcc8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000bccc: 7f ff d8 19 call 40001d30 <== NOT EXECUTED 4000bcd0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000bcd4: 7f ff f4 48 call 40008df4 <_Watchdog_Remove> <== NOT EXECUTED 4000bcd8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 4000bcdc: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 4000bce0: 7f ff ee 4b call 4000760c <_Thread_Clear_state> <== NOT EXECUTED 4000bce4: 81 e8 00 00 restore <== NOT EXECUTED new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000bce8: 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; 4000bcec: 10 bf ff e7 b 4000bc88 <_Thread_queue_Extract_priority_helper+0x78> 4000bcf0: c4 20 40 00 st %g2, [ %g1 ] 4000bcf4 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4000bcf4: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000bcf8: d0 02 20 44 ld [ %o0 + 0x44 ], %o0 * 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 && 4000bcfc: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000bd00: 80 a0 e0 00 cmp %g3, 0 4000bd04: 02 80 00 06 be 4000bd1c <_Thread_queue_Process_timeout+0x28> 4000bd08: 03 10 00 62 sethi %hi(0x40018800), %g1 4000bd0c: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 4000bd10: 80 a2 40 02 cmp %o1, %g2 4000bd14: 02 80 00 07 be 4000bd30 <_Thread_queue_Process_timeout+0x3c> 4000bd18: 80 a0 e0 03 cmp %g3, 3 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; 4000bd1c: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000bd20: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000bd24: 82 13 c0 00 mov %o7, %g1 4000bd28: 7f ff ff af call 4000bbe4 <_Thread_queue_Extract> 4000bd2c: 9e 10 40 00 mov %g1, %o7 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4000bd30: 02 80 00 06 be 4000bd48 <_Thread_queue_Process_timeout+0x54> 4000bd34: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000bd38: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000bd3c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000bd40: 81 c3 e0 08 retl 4000bd44: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 4000bd48: 81 c3 e0 08 retl <== NOT EXECUTED 4000bd4c: 01 00 00 00 nop 400082d4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 400082d4: 9d e3 bf 90 save %sp, -112, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 400082d8: 80 a6 20 00 cmp %i0, 0 400082dc: 02 80 00 13 be 40008328 <_Thread_queue_Requeue+0x54> 400082e0: 01 00 00 00 nop /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 400082e4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 400082e8: 80 a4 20 01 cmp %l0, 1 400082ec: 02 80 00 04 be 400082fc <_Thread_queue_Requeue+0x28> 400082f0: 01 00 00 00 nop 400082f4: 81 c7 e0 08 ret <== NOT EXECUTED 400082f8: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 400082fc: 7f ff e6 89 call 40001d20 40008300: 01 00 00 00 nop 40008304: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40008308: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000830c: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008310: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40008314: 80 88 80 01 btst %g2, %g1 40008318: 12 80 00 06 bne 40008330 <_Thread_queue_Requeue+0x5c> 4000831c: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 40008320: 7f ff e6 84 call 40001d30 40008324: 90 10 00 11 mov %l1, %o0 40008328: 81 c7 e0 08 ret 4000832c: 81 e8 00 00 restore ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 40008330: 92 10 00 19 mov %i1, %o1 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; 40008334: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 40008338: 40 00 0e 36 call 4000bc10 <_Thread_queue_Extract_priority_helper> 4000833c: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40008340: 90 10 00 18 mov %i0, %o0 40008344: 92 10 00 19 mov %i1, %o1 40008348: 7f ff ff 13 call 40007f94 <_Thread_queue_Enqueue_priority> 4000834c: 94 07 bf f4 add %fp, -12, %o2 40008350: 30 bf ff f4 b,a 40008320 <_Thread_queue_Requeue+0x4c> 40011aac <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 40011aac: 9d e3 bf 98 save %sp, -104, %sp 40011ab0: 03 10 00 c8 sethi %hi(0x40032000), %g1 break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40011ab4: 05 10 00 c8 sethi %hi(0x40032000), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011ab8: a0 10 60 bc or %g1, 0xbc, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40011abc: 03 10 00 c8 sethi %hi(0x40032000), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40011ac0: a4 10 a0 b0 or %g2, 0xb0, %l2 the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40011ac4: a2 10 60 9c or %g1, 0x9c, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011ac8: 40 00 02 a4 call 40012558 <_Chain_Get> 40011acc: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40011ad0: 80 a2 20 00 cmp %o0, 0 40011ad4: 02 80 00 0f be 40011b10 <_Timer_Server_process_insertions+0x64> 40011ad8: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40011adc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40011ae0: 80 a0 60 01 cmp %g1, 1 40011ae4: 02 80 00 12 be 40011b2c <_Timer_Server_process_insertions+0x80> 40011ae8: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40011aec: 02 80 00 0b be 40011b18 <_Timer_Server_process_insertions+0x6c> 40011af0: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011af4: 7f ff ff ee call 40011aac <_Timer_Server_process_insertions> <== NOT EXECUTED 40011af8: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011afc: 40 00 02 97 call 40012558 <_Chain_Get> 40011b00: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40011b04: 80 a2 20 00 cmp %o0, 0 40011b08: 32 bf ff f6 bne,a 40011ae0 <_Timer_Server_process_insertions+0x34> 40011b0c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 40011b10: 81 c7 e0 08 ret 40011b14: 81 e8 00 00 restore break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40011b18: 40 00 11 ea call 400162c0 <_Watchdog_Insert> 40011b1c: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011b20: 7f ff ff e3 call 40011aac <_Timer_Server_process_insertions> 40011b24: 01 00 00 00 nop 40011b28: 30 bf ff f5 b,a 40011afc <_Timer_Server_process_insertions+0x50> the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40011b2c: 92 02 20 10 add %o0, 0x10, %o1 40011b30: 40 00 11 e4 call 400162c0 <_Watchdog_Insert> 40011b34: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011b38: 7f ff ff dd call 40011aac <_Timer_Server_process_insertions> 40011b3c: 01 00 00 00 nop 40011b40: 30 bf ff ef b,a 40011afc <_Timer_Server_process_insertions+0x50> 4000a4f8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000a4f8: 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; 4000a4fc: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000a500: 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; 4000a504: 91 38 60 1f sra %g1, 0x1f, %o0 4000a508: 92 10 00 01 mov %g1, %o1 4000a50c: 83 30 60 1d srl %g1, 0x1d, %g1 4000a510: 87 2a 60 03 sll %o1, 3, %g3 4000a514: 85 2a 20 03 sll %o0, 3, %g2 4000a518: 84 10 40 02 or %g1, %g2, %g2 4000a51c: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a520: 99 28 a0 05 sll %g2, 5, %o4 4000a524: 9b 28 e0 05 sll %g3, 5, %o5 4000a528: 98 10 40 0c or %g1, %o4, %o4 4000a52c: 9a a3 40 03 subcc %o5, %g3, %o5 4000a530: 83 33 60 1a srl %o5, 0x1a, %g1 4000a534: 98 63 00 02 subx %o4, %g2, %o4 4000a538: 97 2b 60 06 sll %o5, 6, %o3 4000a53c: 95 2b 20 06 sll %o4, 6, %o2 4000a540: 96 a2 c0 0d subcc %o3, %o5, %o3 4000a544: 94 10 40 0a or %g1, %o2, %o2 4000a548: 94 62 80 0c subx %o2, %o4, %o2 4000a54c: 96 82 c0 09 addcc %o3, %o1, %o3 4000a550: 94 42 80 08 addx %o2, %o0, %o2 4000a554: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a558: 85 2a a0 02 sll %o2, 2, %g2 4000a55c: 84 10 40 02 or %g1, %g2, %g2 4000a560: 87 2a e0 02 sll %o3, 2, %g3 4000a564: 96 82 c0 03 addcc %o3, %g3, %o3 4000a568: 94 42 80 02 addx %o2, %g2, %o2 4000a56c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a570: 85 2a a0 02 sll %o2, 2, %g2 4000a574: 84 10 40 02 or %g1, %g2, %g2 4000a578: 87 2a e0 02 sll %o3, 2, %g3 4000a57c: 96 82 c0 03 addcc %o3, %g3, %o3 4000a580: 94 42 80 02 addx %o2, %g2, %o2 4000a584: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a588: 85 2a a0 02 sll %o2, 2, %g2 4000a58c: 84 10 40 02 or %g1, %g2, %g2 4000a590: 87 2a e0 02 sll %o3, 2, %g3 4000a594: 96 82 c0 03 addcc %o3, %g3, %o3 4000a598: 94 42 80 02 addx %o2, %g2, %o2 4000a59c: 85 32 e0 17 srl %o3, 0x17, %g2 4000a5a0: 83 2a a0 09 sll %o2, 9, %g1 4000a5a4: 9b 2a e0 09 sll %o3, 9, %o5 4000a5a8: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000a5ac: 96 83 40 0f addcc %o5, %o7, %o3 4000a5b0: 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; 4000a5b4: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000a5b8: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000a5bc: 80 92 80 0b orcc %o2, %o3, %g0 4000a5c0: 02 80 00 5d be 4000a734 <_Timespec_Divide+0x23c> 4000a5c4: d0 06 00 00 ld [ %i0 ], %o0 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000a5c8: 92 10 00 08 mov %o0, %o1 4000a5cc: 83 32 60 1d srl %o1, 0x1d, %g1 4000a5d0: 9b 2a 60 03 sll %o1, 3, %o5 4000a5d4: 91 3a 20 1f sra %o0, 0x1f, %o0 4000a5d8: 99 2a 20 03 sll %o0, 3, %o4 4000a5dc: 98 10 40 0c or %g1, %o4, %o4 4000a5e0: 83 33 60 1b srl %o5, 0x1b, %g1 4000a5e4: 85 2b 20 05 sll %o4, 5, %g2 4000a5e8: 87 2b 60 05 sll %o5, 5, %g3 4000a5ec: 84 10 40 02 or %g1, %g2, %g2 4000a5f0: 86 a0 c0 0d subcc %g3, %o5, %g3 4000a5f4: 83 30 e0 1a srl %g3, 0x1a, %g1 4000a5f8: 84 60 80 0c subx %g2, %o4, %g2 4000a5fc: 9b 28 e0 06 sll %g3, 6, %o5 4000a600: 99 28 a0 06 sll %g2, 6, %o4 4000a604: 9a a3 40 03 subcc %o5, %g3, %o5 4000a608: 98 10 40 0c or %g1, %o4, %o4 4000a60c: 98 63 00 02 subx %o4, %g2, %o4 4000a610: 9a 83 40 09 addcc %o5, %o1, %o5 4000a614: 83 33 60 1e srl %o5, 0x1e, %g1 4000a618: 98 43 00 08 addx %o4, %o0, %o4 4000a61c: 87 2b 60 02 sll %o5, 2, %g3 4000a620: 85 2b 20 02 sll %o4, 2, %g2 4000a624: 9a 83 40 03 addcc %o5, %g3, %o5 4000a628: 84 10 40 02 or %g1, %g2, %g2 4000a62c: 83 33 60 1e srl %o5, 0x1e, %g1 4000a630: 98 43 00 02 addx %o4, %g2, %o4 4000a634: 87 2b 60 02 sll %o5, 2, %g3 4000a638: 85 2b 20 02 sll %o4, 2, %g2 4000a63c: 9a 83 40 03 addcc %o5, %g3, %o5 4000a640: 84 10 40 02 or %g1, %g2, %g2 4000a644: 83 33 60 1e srl %o5, 0x1e, %g1 4000a648: 98 43 00 02 addx %o4, %g2, %o4 4000a64c: 87 2b 60 02 sll %o5, 2, %g3 4000a650: 85 2b 20 02 sll %o4, 2, %g2 4000a654: 9a 83 40 03 addcc %o5, %g3, %o5 4000a658: 84 10 40 02 or %g1, %g2, %g2 4000a65c: 98 43 00 02 addx %o4, %g2, %o4 4000a660: 83 2b 20 09 sll %o4, 9, %g1 4000a664: 89 33 60 17 srl %o5, 0x17, %g4 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000a668: 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; 4000a66c: a0 11 00 01 or %g4, %g1, %l0 4000a670: 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; 4000a674: a2 84 40 13 addcc %l1, %l3, %l1 4000a678: 83 34 60 1e srl %l1, 0x1e, %g1 4000a67c: 87 2c 60 02 sll %l1, 2, %g3 4000a680: a5 3c a0 1f sra %l2, 0x1f, %l2 4000a684: a0 44 00 12 addx %l0, %l2, %l0 4000a688: 85 2c 20 02 sll %l0, 2, %g2 4000a68c: 84 10 40 02 or %g1, %g2, %g2 4000a690: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a694: 99 28 a0 05 sll %g2, 5, %o4 4000a698: 9b 28 e0 05 sll %g3, 5, %o5 4000a69c: 98 10 40 0c or %g1, %o4, %o4 4000a6a0: 9a a3 40 03 subcc %o5, %g3, %o5 4000a6a4: 98 63 00 02 subx %o4, %g2, %o4 4000a6a8: 9a 83 40 11 addcc %o5, %l1, %o5 4000a6ac: 83 33 60 1e srl %o5, 0x1e, %g1 4000a6b0: 98 43 00 10 addx %o4, %l0, %o4 4000a6b4: 87 2b 60 02 sll %o5, 2, %g3 4000a6b8: 85 2b 20 02 sll %o4, 2, %g2 4000a6bc: 9a 83 40 03 addcc %o5, %g3, %o5 4000a6c0: 84 10 40 02 or %g1, %g2, %g2 4000a6c4: 83 33 60 1e srl %o5, 0x1e, %g1 4000a6c8: 87 2b 60 02 sll %o5, 2, %g3 4000a6cc: 98 43 00 02 addx %o4, %g2, %o4 4000a6d0: 9a 83 40 03 addcc %o5, %g3, %o5 4000a6d4: 85 2b 20 02 sll %o4, 2, %g2 4000a6d8: 84 10 40 02 or %g1, %g2, %g2 4000a6dc: 83 33 60 1b srl %o5, 0x1b, %g1 4000a6e0: 98 43 00 02 addx %o4, %g2, %o4 4000a6e4: 99 2b 20 05 sll %o4, 5, %o4 4000a6e8: 98 10 40 0c or %g1, %o4, %o4 4000a6ec: 93 2b 60 05 sll %o5, 5, %o1 4000a6f0: 40 00 33 f4 call 400176c0 <__udivdi3> 4000a6f4: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000a6f8: 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; 4000a6fc: a0 10 00 08 mov %o0, %l0 4000a700: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000a704: 96 10 23 e8 mov 0x3e8, %o3 4000a708: 40 00 33 ee call 400176c0 <__udivdi3> 4000a70c: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000a710: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000a714: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000a718: 94 10 20 00 clr %o2 4000a71c: 92 10 00 11 mov %l1, %o1 4000a720: 40 00 34 c4 call 40017a30 <__umoddi3> 4000a724: 96 10 23 e8 mov 0x3e8, %o3 4000a728: d2 26 c0 00 st %o1, [ %i3 ] 4000a72c: 81 c7 e0 08 ret 4000a730: 81 e8 00 00 restore left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 4000a734: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000a738: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000a73c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a740: 81 e8 00 00 restore <== NOT EXECUTED 40014bb8 <_Timespec_From_ticks>: void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 40014bb8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40014bbc: 03 10 00 a5 sethi %hi(0x40029400), %g1 <== NOT EXECUTED 40014bc0: d2 00 60 60 ld [ %g1 + 0x60 ], %o1 ! 40029460 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40014bc4: 40 00 30 53 call 40020d10 <.umul> <== NOT EXECUTED 40014bc8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40014bcc: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40014bd0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40014bd4: 7f ff b3 10 call 40001814 <.udiv> <== NOT EXECUTED 40014bd8: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40014bdc: 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; 40014be0: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40014be4: 40 00 30 85 call 40020df8 <.urem> <== NOT EXECUTED 40014be8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40014bec: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 40014bf0: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 40014bf4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40014bf8: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40014bfc: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED 40014c00: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 40014c04: 81 c7 e0 08 ret <== NOT EXECUTED 40014c08: 81 e8 00 00 restore <== NOT EXECUTED 40014c0c <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 40014c0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014c10: 02 80 00 0f be 40014c4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40014c14: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 40014c18: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40014c1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014c20: 06 80 00 0b bl 40014c4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40014c24: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 40014c28: d0 02 20 04 ld [ %o0 + 4 ], %o0 <== NOT EXECUTED 40014c2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014c30: 06 80 00 07 bl 40014c4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40014c34: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 <== NOT EXECUTED 40014c38: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <== NOT EXECUTED 40014c3c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40014c40: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 40014c44: 81 c3 e0 08 retl <== NOT EXECUTED 40014c48: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 40014c4c: 81 c3 e0 08 retl <== NOT EXECUTED 40014c50: 90 10 20 00 clr %o0 <== NOT EXECUTED 40014c54 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 40014c54: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 40014c58: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED 40014c5c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40014c60: 02 80 00 15 be 40014cb4 <_Timespec_To_ticks+0x60> <== NOT EXECUTED 40014c64: e4 06 20 04 ld [ %i0 + 4 ], %l2 <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 40014c68: 03 10 00 a5 sethi %hi(0x40029400), %g1 <== NOT EXECUTED 40014c6c: e2 00 60 60 ld [ %g1 + 0x60 ], %l1 ! 40029460 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40014c70: 11 00 03 d0 sethi %hi(0xf4000), %o0 <== NOT EXECUTED 40014c74: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40014c78: 7f ff b2 e7 call 40001814 <.udiv> <== NOT EXECUTED 40014c7c: 90 12 22 40 or %o0, 0x240, %o0 <== NOT EXECUTED 40014c80: 40 00 30 24 call 40020d10 <.umul> <== NOT EXECUTED 40014c84: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 40014c88: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 40014c8c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 40014c90: 7f ff b2 e1 call 40001814 <.udiv> <== NOT EXECUTED 40014c94: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40014c98: 7f ff b2 df call 40001814 <.udiv> <== NOT EXECUTED 40014c9c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 40014ca0: b0 82 00 10 addcc %o0, %l0, %i0 <== NOT EXECUTED 40014ca4: 22 80 00 02 be,a 40014cac <_Timespec_To_ticks+0x58> <== NOT EXECUTED 40014ca8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return ticks; return 1; } 40014cac: 81 c7 e0 08 ret <== NOT EXECUTED 40014cb0: 81 e8 00 00 restore <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 40014cb4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40014cb8: 12 bf ff ec bne 40014c68 <_Timespec_To_ticks+0x14> <== NOT EXECUTED 40014cbc: b0 10 20 00 clr %i0 <== NOT EXECUTED if (ticks) return ticks; return 1; } 40014cc0: 81 c7 e0 08 ret <== NOT EXECUTED 40014cc4: 81 e8 00 00 restore <== NOT EXECUTED 4000bf30 <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 4000bf30: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4000bf34: 11 10 00 62 sethi %hi(0x40018800), %o0 4000bf38: 92 10 00 18 mov %i0, %o1 4000bf3c: 7f ff e8 b8 call 4000621c <_Chain_Append> 4000bf40: 90 12 22 58 or %o0, 0x258, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4000bf44: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000bf48: 80 a0 60 00 cmp %g1, 0 4000bf4c: 02 80 00 06 be 4000bf64 <_User_extensions_Add_API_set+0x34> 4000bf50: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 4000bf54: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 4000bf58: 31 10 00 62 sethi %hi(0x40018800), %i0 4000bf5c: 7f ff e8 b0 call 4000621c <_Chain_Append> 4000bf60: 91 ee 20 24 restore %i0, 0x24, %o0 4000bf64: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf68: 81 e8 00 00 restore <== NOT EXECUTED 4000f114 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000f114: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 4000f118: 40 00 13 09 call 40013d3c <_Chain_Extract> 4000f11c: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000f120: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f124: 80 a0 60 00 cmp %g1, 0 4000f128: 02 80 00 04 be 4000f138 <_User_extensions_Remove_set+0x24> 4000f12c: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 4000f130: 40 00 13 03 call 40013d3c <_Chain_Extract> <== NOT EXECUTED 4000f134: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000f138: 81 c7 e0 08 ret 4000f13c: 81 e8 00 00 restore 40008af0 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40008af0: 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 ; 40008af4: 03 10 00 62 sethi %hi(0x40018800), %g1 40008af8: e0 00 62 58 ld [ %g1 + 0x258 ], %l0 ! 40018a58 <_User_extensions_List> 40008afc: 82 10 62 58 or %g1, 0x258, %g1 40008b00: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40008b04: 80 a4 00 11 cmp %l0, %l1 40008b08: 02 80 00 10 be 40008b48 <_User_extensions_Thread_create+0x58> 40008b0c: 03 10 00 62 sethi %hi(0x40018800), %g1 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)( 40008b10: a4 10 60 e0 or %g1, 0xe0, %l2 ! 400188e0 <_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 ) { 40008b14: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40008b18: 80 a0 60 00 cmp %g1, 0 40008b1c: 02 80 00 07 be 40008b38 <_User_extensions_Thread_create+0x48> 40008b20: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40008b24: 9f c0 40 00 call %g1 40008b28: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40008b2c: 80 8a 20 ff btst 0xff, %o0 40008b30: 02 80 00 08 be 40008b50 <_User_extensions_Thread_create+0x60> 40008b34: 01 00 00 00 nop 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 ) { 40008b38: 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 ) ; 40008b3c: 80 a4 00 11 cmp %l0, %l1 40008b40: 32 bf ff f6 bne,a 40008b18 <_User_extensions_Thread_create+0x28> 40008b44: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40008b48: 81 c7 e0 08 ret 40008b4c: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 40008b50: 81 c7 e0 08 ret <== NOT EXECUTED 40008b54: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000aacc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000aacc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000aad0: 7f ff df b1 call 40002994 4000aad4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000aad8: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000aadc: a0 06 20 04 add %i0, 4, %l0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000aae0: 80 a0 80 10 cmp %g2, %l0 4000aae4: 02 80 00 1f be 4000ab60 <_Watchdog_Adjust+0x94> 4000aae8: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000aaec: 12 80 00 1f bne 4000ab68 <_Watchdog_Adjust+0x9c> 4000aaf0: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000aaf4: 80 a6 a0 00 cmp %i2, 0 4000aaf8: 02 80 00 1a be 4000ab60 <_Watchdog_Adjust+0x94> 4000aafc: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000ab00: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000ab04: 80 a6 80 19 cmp %i2, %i1 4000ab08: 1a 80 00 0b bcc 4000ab34 <_Watchdog_Adjust+0x68> 4000ab0c: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 4000ab10: 10 80 00 1d b 4000ab84 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000ab14: 82 26 40 1a sub %i1, %i2, %g1 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000ab18: b4 a6 80 19 subcc %i2, %i1, %i2 4000ab1c: 02 80 00 11 be 4000ab60 <_Watchdog_Adjust+0x94> 4000ab20: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000ab24: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000ab28: 80 a6 40 1a cmp %i1, %i2 4000ab2c: 18 80 00 16 bgu 4000ab84 <_Watchdog_Adjust+0xb8> 4000ab30: 82 26 40 1a sub %i1, %i2, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4000ab34: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 4000ab38: 7f ff df 9b call 400029a4 4000ab3c: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000ab40: 40 00 00 b4 call 4000ae10 <_Watchdog_Tickle> 4000ab44: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000ab48: 7f ff df 93 call 40002994 4000ab4c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000ab50: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 4000ab54: 80 a4 00 01 cmp %l0, %g1 4000ab58: 12 bf ff f0 bne 4000ab18 <_Watchdog_Adjust+0x4c> 4000ab5c: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 4000ab60: 7f ff df 91 call 400029a4 4000ab64: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000ab68: 12 bf ff fe bne 4000ab60 <_Watchdog_Adjust+0x94> 4000ab6c: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000ab70: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000ab74: 82 00 40 1a add %g1, %i2, %g1 4000ab78: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 4000ab7c: 7f ff df 8a call 400029a4 4000ab80: 91 e8 00 08 restore %g0, %o0, %o0 _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 4000ab84: 10 bf ff f7 b 4000ab60 <_Watchdog_Adjust+0x94> 4000ab88: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 400161f0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 400161f0: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 400161f4: a2 96 60 00 orcc %i1, 0, %l1 400161f8: 12 80 00 04 bne 40016208 <_Watchdog_Adjust_to_chain+0x18> 400161fc: 01 00 00 00 nop 40016200: 81 c7 e0 08 ret 40016204: 81 e8 00 00 restore return; } _ISR_Disable( level ); 40016208: 7f ff d3 ea call 4000b1b0 4001620c: 01 00 00 00 nop 40016210: a6 10 00 08 mov %o0, %l3 40016214: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40016218: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 4001621c: 80 a0 80 10 cmp %g2, %l0 40016220: 02 80 00 25 be 400162b4 <_Watchdog_Adjust_to_chain+0xc4> 40016224: a4 06 a0 04 add %i2, 4, %l2 40016228: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 4001622c: 80 a6 40 11 cmp %i1, %l1 40016230: 18 80 00 20 bgu 400162b0 <_Watchdog_Adjust_to_chain+0xc0> 40016234: 82 26 40 11 sub %i1, %l1, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 40016238: 10 80 00 15 b 4001628c <_Watchdog_Adjust_to_chain+0x9c> 4001623c: c0 20 a0 10 clr [ %g2 + 0x10 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 40016240: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 40016244: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40016248: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 4001624c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 40016250: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40016254: 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; 40016258: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 4001625c: 7f ff d3 d9 call 4000b1c0 40016260: 90 10 00 13 mov %l3, %o0 40016264: 7f ff d3 d3 call 4000b1b0 40016268: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001626c: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40016270: 80 a4 00 02 cmp %l0, %g2 40016274: 02 80 00 10 be 400162b4 <_Watchdog_Adjust_to_chain+0xc4> 40016278: 01 00 00 00 nop 4001627c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40016280: 80 a0 60 00 cmp %g1, 0 40016284: 32 80 00 07 bne,a 400162a0 <_Watchdog_Adjust_to_chain+0xb0> 40016288: a2 a4 40 19 subcc %l1, %i1, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4001628c: 80 a4 00 02 cmp %l0, %g2 40016290: 32 bf ff ec bne,a 40016240 <_Watchdog_Adjust_to_chain+0x50> 40016294: c2 00 80 00 ld [ %g2 ], %g1 40016298: 10 bf ff ec b 40016248 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 4001629c: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 400162a0: 02 80 00 05 be 400162b4 <_Watchdog_Adjust_to_chain+0xc4> 400162a4: 01 00 00 00 nop 400162a8: 10 bf ff e1 b 4001622c <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 400162ac: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 400162b0: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 400162b4: 7f ff d3 c3 call 4000b1c0 400162b8: 91 e8 00 13 restore %g0, %l3, %o0 400162bc: 01 00 00 00 nop 40008c48 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40008c48: 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; 40008c4c: 03 10 00 62 sethi %hi(0x40018800), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40008c50: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 40008c54: e6 00 60 bc ld [ %g1 + 0xbc ], %l3 _ISR_Disable( level ); 40008c58: 7f ff e4 32 call 40001d20 40008c5c: 01 00 00 00 nop 40008c60: 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 ) { 40008c64: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008c68: 80 a0 60 00 cmp %g1, 0 40008c6c: 12 80 00 4a bne 40008d94 <_Watchdog_Insert+0x14c> 40008c70: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40008c74: 2b 10 00 62 sethi %hi(0x40018800), %l5 40008c78: c2 05 61 70 ld [ %l5 + 0x170 ], %g1 ! 40018970 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008c7c: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40008c80: 82 00 60 01 inc %g1 40008c84: 2f 10 00 62 sethi %hi(0x40018800), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008c88: c4 26 60 08 st %g2, [ %i1 + 8 ] 40008c8c: a8 15 e0 dc or %l7, 0xdc, %l4 _Watchdog_Sync_count++; 40008c90: c2 25 61 70 st %g1, [ %l5 + 0x170 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40008c94: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40008c98: 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 ; 40008c9c: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40008ca0: 80 a4 a0 00 cmp %l2, 0 40008ca4: 02 80 00 2b be 40008d50 <_Watchdog_Insert+0x108> 40008ca8: 03 10 00 62 sethi %hi(0x40018800), %g1 40008cac: c2 04 40 00 ld [ %l1 ], %g1 40008cb0: 80 a0 60 00 cmp %g1, 0 40008cb4: 02 80 00 27 be 40008d50 <_Watchdog_Insert+0x108> 40008cb8: 03 10 00 62 sethi %hi(0x40018800), %g1 break; if ( delta_interval < after->delta_interval ) { 40008cbc: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40008cc0: 80 a4 80 10 cmp %l2, %l0 40008cc4: 1a 80 00 13 bcc 40008d10 <_Watchdog_Insert+0xc8> 40008cc8: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40008ccc: 10 80 00 20 b 40008d4c <_Watchdog_Insert+0x104> 40008cd0: c2 24 60 10 st %g1, [ %l1 + 0x10 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40008cd4: c2 05 00 00 ld [ %l4 ], %g1 40008cd8: 80 a4 c0 01 cmp %l3, %g1 40008cdc: 0a 80 00 30 bcs 40008d9c <_Watchdog_Insert+0x154> 40008ce0: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40008ce4: a4 a4 80 10 subcc %l2, %l0, %l2 40008ce8: 02 80 00 19 be 40008d4c <_Watchdog_Insert+0x104> 40008cec: e2 04 40 00 ld [ %l1 ], %l1 40008cf0: c2 04 40 00 ld [ %l1 ], %g1 40008cf4: 80 a0 60 00 cmp %g1, 0 40008cf8: 02 80 00 16 be 40008d50 <_Watchdog_Insert+0x108> 40008cfc: 03 10 00 62 sethi %hi(0x40018800), %g1 break; if ( delta_interval < after->delta_interval ) { 40008d00: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40008d04: 80 a4 00 12 cmp %l0, %l2 40008d08: 18 80 00 10 bgu 40008d48 <_Watchdog_Insert+0x100> 40008d0c: 82 24 00 12 sub %l0, %l2, %g1 * 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 ); 40008d10: 7f ff e4 08 call 40001d30 40008d14: 90 10 00 18 mov %i0, %o0 40008d18: 7f ff e4 02 call 40001d20 40008d1c: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40008d20: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008d24: 80 a0 60 01 cmp %g1, 1 40008d28: 02 bf ff eb be 40008cd4 <_Watchdog_Insert+0x8c> 40008d2c: 01 00 00 00 nop _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; 40008d30: e6 25 e0 dc st %l3, [ %l7 + 0xdc ] <== NOT EXECUTED _Watchdog_Sync_count--; 40008d34: c2 05 61 70 ld [ %l5 + 0x170 ], %g1 <== NOT EXECUTED 40008d38: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008d3c: c2 25 61 70 st %g1, [ %l5 + 0x170 ] <== NOT EXECUTED _ISR_Enable( level ); 40008d40: 7f ff e3 fc call 40001d30 <== NOT EXECUTED 40008d44: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 40008d48: c2 24 60 10 st %g1, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40008d4c: 03 10 00 62 sethi %hi(0x40018800), %g1 40008d50: c6 00 61 74 ld [ %g1 + 0x174 ], %g3 ! 40018974 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 40008d54: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40008d58: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40008d5c: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40008d60: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40008d64: c8 00 80 00 ld [ %g2 ], %g4 _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; 40008d68: e6 25 e0 dc st %l3, [ %l7 + 0xdc ] 40008d6c: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 40008d70: c2 05 61 70 ld [ %l5 + 0x170 ], %g1 after_node->next = the_node; 40008d74: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40008d78: c4 26 60 04 st %g2, [ %i1 + 4 ] 40008d7c: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 40008d80: f2 21 20 04 st %i1, [ %g4 + 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; 40008d84: c8 26 40 00 st %g4, [ %i1 ] 40008d88: c2 25 61 70 st %g1, [ %l5 + 0x170 ] _ISR_Enable( level ); 40008d8c: 7f ff e3 e9 call 40001d30 40008d90: 81 e8 00 00 restore * 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 ) { _ISR_Enable( level ); 40008d94: 7f ff e3 e7 call 40001d30 <== NOT EXECUTED 40008d98: 81 e8 00 00 restore <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 40008d9c: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40008da0: 10 bf ff bf b 40008c9c <_Watchdog_Insert+0x54> 40008da4: e4 06 60 0c ld [ %i1 + 0xc ], %l2 40008df4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 40008df4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 40008df8: 7f ff e3 ca call 40001d20 40008dfc: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 40008e00: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 40008e04: 80 a6 20 01 cmp %i0, 1 40008e08: 02 80 00 2a be 40008eb0 <_Watchdog_Remove+0xbc> 40008e0c: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e10: 1a 80 00 09 bcc 40008e34 <_Watchdog_Remove+0x40> 40008e14: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008e18: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e1c: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 40018974 <_Watchdog_Ticks_since_boot> 40008e20: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 40008e24: 7f ff e3 c3 call 40001d30 40008e28: 01 00 00 00 nop return( previous_state ); } 40008e2c: 81 c7 e0 08 ret 40008e30: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 40008e34: 18 bf ff fa bgu 40008e1c <_Watchdog_Remove+0x28> 40008e38: 03 10 00 62 sethi %hi(0x40018800), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 40008e3c: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 40008e40: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 40008e44: c2 01 00 00 ld [ %g4 ], %g1 40008e48: 80 a0 60 00 cmp %g1, 0 40008e4c: 02 80 00 07 be 40008e68 <_Watchdog_Remove+0x74> 40008e50: 03 10 00 62 sethi %hi(0x40018800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 40008e54: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 40008e58: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008e5c: 82 00 40 02 add %g1, %g2, %g1 40008e60: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 40008e64: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e68: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40018970 <_Watchdog_Sync_count> 40008e6c: 80 a0 a0 00 cmp %g2, 0 40008e70: 22 80 00 07 be,a 40008e8c <_Watchdog_Remove+0x98> 40008e74: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 40008e78: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 40008e7c: c6 00 60 bc ld [ %g1 + 0xbc ], %g3 ! 400188bc <_ISR_Nest_level> <== NOT EXECUTED 40008e80: 05 10 00 62 sethi %hi(0x40018800), %g2 <== NOT EXECUTED 40008e84: c6 20 a0 dc st %g3, [ %g2 + 0xdc ] ! 400188dc <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 40008e88: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 40008e8c: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008e90: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008e94: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e98: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 40018974 <_Watchdog_Ticks_since_boot> 40008e9c: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 40008ea0: 7f ff e3 a4 call 40001d30 40008ea4: 01 00 00 00 nop return( previous_state ); } 40008ea8: 81 c7 e0 08 ret 40008eac: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008eb0: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 40008eb4: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008eb8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 40008ebc: 7f ff e3 9d call 40001d30 <== NOT EXECUTED 40008ec0: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 40008ec4: 81 c7 e0 08 ret <== NOT EXECUTED 40008ec8: 81 e8 00 00 restore <== NOT EXECUTED 40008fe4 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 40008fe4: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 40008fe8: 80 a6 20 00 cmp %i0, 0 40008fec: 02 80 00 15 be 40009040 <_Workspace_Handler_initialization+0x5c> 40008ff0: 80 8e 20 07 btst 7, %i0 40008ff4: 12 80 00 14 bne 40009044 <_Workspace_Handler_initialization+0x60> 40008ff8: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 40008ffc: 03 10 00 62 sethi %hi(0x40018800), %g1 40009000: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400188b8 <_Configuration_Table> 40009004: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 40009008: 80 a0 e0 00 cmp %g3, 0 4000900c: 32 80 00 11 bne,a 40009050 <_Workspace_Handler_initialization+0x6c> 40009010: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 40009014: 92 10 00 18 mov %i0, %o1 40009018: 94 10 00 19 mov %i1, %o2 4000901c: 11 10 00 62 sethi %hi(0x40018800), %o0 40009020: 96 10 20 08 mov 8, %o3 40009024: 7f ff f5 eb call 400067d0 <_Heap_Initialize> 40009028: 90 12 20 44 or %o0, 0x44, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000902c: 80 a2 20 00 cmp %o0, 0 40009030: 02 80 00 0d be 40009064 <_Workspace_Handler_initialization+0x80> 40009034: 92 10 20 01 mov 1, %o1 40009038: 81 c7 e0 08 ret 4000903c: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 40009040: 90 10 20 00 clr %o0 40009044: 92 10 20 01 mov 1, %o1 40009048: 7f ff f6 6f call 40006a04 <_Internal_error_Occurred> 4000904c: 94 10 20 02 mov 2, %o2 TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 40009050: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009054: 40 00 10 b9 call 4000d338 <== NOT EXECUTED 40009058: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 4000905c: 10 bf ff ef b 40009018 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 40009060: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 40009064: 7f ff f6 68 call 40006a04 <_Internal_error_Occurred> <== NOT EXECUTED 40009068: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 4000906c: 01 00 00 00 nop 40006e74 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40006e74: 9a 92 60 00 orcc %o1, 0, %o5 40006e78: 02 80 00 4d be 40006fac 40006e7c: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40006e80: 02 80 00 4c be 40006fb0 40006e84: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006e88: c2 03 40 00 ld [ %o5 ], %g1 40006e8c: 80 a0 60 00 cmp %g1, 0 40006e90: 22 80 00 44 be,a 40006fa0 40006e94: c2 03 60 04 ld [ %o5 + 4 ], %g1 *registered_major = 0; /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006e98: 03 10 00 71 sethi %hi(0x4001c400), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40006e9c: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006ea0: c8 00 62 70 ld [ %g1 + 0x270 ], %g4 40006ea4: 80 a1 00 08 cmp %g4, %o0 40006ea8: 08 80 00 39 bleu 40006f8c 40006eac: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40006eb0: 80 a2 20 00 cmp %o0, 0 40006eb4: 12 80 00 29 bne 40006f58 40006eb8: 03 10 00 71 sethi %hi(0x4001c400), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40006ebc: 90 81 3f ff addcc %g4, -1, %o0 40006ec0: 02 80 00 35 be 40006f94 40006ec4: 05 10 00 71 sethi %hi(0x4001c400), %g2 40006ec8: c6 00 a2 74 ld [ %g2 + 0x274 ], %g3 ! 4001c674 <_IO_Driver_address_table> 40006ecc: 85 29 20 03 sll %g4, 3, %g2 40006ed0: 83 29 20 05 sll %g4, 5, %g1 40006ed4: 82 20 40 02 sub %g1, %g2, %g1 40006ed8: 82 00 7f e8 add %g1, -24, %g1 40006edc: 10 80 00 05 b 40006ef0 40006ee0: 84 00 c0 01 add %g3, %g1, %g2 40006ee4: 90 82 3f ff addcc %o0, -1, %o0 40006ee8: 02 80 00 2b be 40006f94 40006eec: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 40006ef0: c2 00 80 00 ld [ %g2 ], %g1 40006ef4: 80 a0 60 00 cmp %g1, 0 40006ef8: 12 bf ff fb bne 40006ee4 40006efc: 88 10 00 02 mov %g2, %g4 40006f00: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40006f04: 80 a0 60 00 cmp %g1, 0 40006f08: 32 bf ff f8 bne,a 40006ee8 40006f0c: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f10: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 40006f14: d0 22 80 00 st %o0, [ %o2 ] if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f18: c2 21 00 00 st %g1, [ %g4 ] 40006f1c: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f20: 92 10 20 00 clr %o1 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f24: c4 21 20 04 st %g2, [ %g4 + 4 ] 40006f28: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f2c: 94 10 20 00 clr %o2 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f30: c2 21 20 08 st %g1, [ %g4 + 8 ] 40006f34: c4 03 60 0c ld [ %o5 + 0xc ], %g2 40006f38: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40006f3c: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 40006f40: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 40006f44: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 40006f48: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f4c: 82 13 c0 00 mov %o7, %g1 40006f50: 7f ff ff 48 call 40006c70 40006f54: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40006f58: c8 00 62 74 ld [ %g1 + 0x274 ], %g4 40006f5c: 85 2a 20 03 sll %o0, 3, %g2 40006f60: 83 2a 20 05 sll %o0, 5, %g1 40006f64: 82 20 40 02 sub %g1, %g2, %g1 40006f68: c6 01 00 01 ld [ %g4 + %g1 ], %g3 40006f6c: 80 a0 e0 00 cmp %g3, 0 40006f70: 12 80 00 06 bne 40006f88 40006f74: 88 01 00 01 add %g4, %g1, %g4 40006f78: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 40006f7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006f80: 22 bf ff e5 be,a 40006f14 <== NOT EXECUTED 40006f84: c2 03 40 00 ld [ %o5 ], %g1 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f88: 82 10 20 0c mov 0xc, %g1 } 40006f8c: 81 c3 e0 08 retl 40006f90: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f94: 82 10 20 05 mov 5, %g1 } 40006f98: 81 c3 e0 08 retl 40006f9c: 90 10 00 01 mov %g1, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006fa0: 80 a0 60 00 cmp %g1, 0 40006fa4: 12 bf ff be bne 40006e9c 40006fa8: 03 10 00 71 sethi %hi(0x4001c400), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006fac: 82 10 20 09 mov 9, %g1 } 40006fb0: 81 c3 e0 08 retl 40006fb4: 90 10 00 01 mov %g1, %o0 400082a0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 400082a0: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 400082a4: 80 a6 20 00 cmp %i0, 0 400082a8: 02 80 00 23 be 40008334 400082ac: 03 10 00 92 sethi %hi(0x40024800), %g1 return; 400082b0: a4 10 63 f4 or %g1, 0x3f4, %l2 ! 40024bf4 <_Objects_Information_table+0x4> 400082b4: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 400082b8: c2 04 80 00 ld [ %l2 ], %g1 400082bc: 80 a0 60 00 cmp %g1, 0 400082c0: 22 80 00 1a be,a 40008328 400082c4: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 400082c8: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 400082cc: 80 a4 60 00 cmp %l1, 0 400082d0: 22 80 00 16 be,a 40008328 400082d4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 400082d8: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 400082dc: 86 90 60 00 orcc %g1, 0, %g3 400082e0: 22 80 00 12 be,a 40008328 400082e4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 400082e8: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 400082ec: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400082f0: 83 2c 20 02 sll %l0, 2, %g1 400082f4: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 400082f8: 80 a2 20 00 cmp %o0, 0 400082fc: 02 80 00 05 be 40008310 40008300: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40008304: 9f c6 00 00 call %i0 40008308: 01 00 00 00 nop 4000830c: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 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++ ) { 40008310: 83 28 e0 10 sll %g3, 0x10, %g1 40008314: 83 30 60 10 srl %g1, 0x10, %g1 40008318: 80 a0 40 10 cmp %g1, %l0 4000831c: 3a bf ff f5 bcc,a 400082f0 40008320: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40008324: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008328: 80 a4 80 13 cmp %l2, %l3 4000832c: 32 bf ff e4 bne,a 400082bc 40008330: c2 04 80 00 ld [ %l2 ], %g1 40008334: 81 c7 e0 08 ret 40008338: 81 e8 00 00 restore 400068e4 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 400068e4: 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 *) 400068e8: 11 10 00 74 sethi %hi(0x4001d000), %o0 400068ec: 92 10 00 18 mov %i0, %o1 400068f0: 90 12 21 74 or %o0, 0x174, %o0 400068f4: 40 00 09 28 call 40008d94 <_Objects_Get> 400068f8: 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 ) { 400068fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006900: 80 a0 60 00 cmp %g1, 0 40006904: 02 80 00 04 be 40006914 40006908: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4000690c: 81 c7 e0 08 ret 40006910: 91 e8 20 04 restore %g0, 4, %o0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40006914: 25 10 00 74 sethi %hi(0x4001d000), %l2 40006918: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 4000691c: c2 04 a3 b0 ld [ %l2 + 0x3b0 ], %g1 40006920: 80 a0 80 01 cmp %g2, %g1 40006924: 02 80 00 06 be 4000693c 40006928: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 4000692c: 40 00 0b 81 call 40009730 <_Thread_Enable_dispatch> 40006930: b0 10 20 17 mov 0x17, %i0 40006934: 81 c7 e0 08 ret 40006938: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 4000693c: 12 80 00 0f bne 40006978 40006940: 01 00 00 00 nop switch ( the_period->state ) { 40006944: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40006948: 80 a0 60 00 cmp %g1, 0 4000694c: 02 80 00 07 be 40006968 40006950: b0 10 20 0b mov 0xb, %i0 40006954: 82 00 7f fd add %g1, -3, %g1 40006958: 80 a0 60 01 cmp %g1, 1 4000695c: 18 80 00 03 bgu 40006968 40006960: b0 10 20 00 clr %i0 40006964: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40006968: 40 00 0b 72 call 40009730 <_Thread_Enable_dispatch> 4000696c: 01 00 00 00 nop 40006970: 81 c7 e0 08 ret 40006974: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40006978: 7f ff f0 77 call 40002b54 4000697c: 01 00 00 00 nop 40006980: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40006984: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40006988: 80 a4 e0 02 cmp %l3, 2 4000698c: 02 80 00 1a be 400069f4 40006990: 80 a4 e0 04 cmp %l3, 4 40006994: 02 80 00 32 be 40006a5c 40006998: 80 a4 e0 00 cmp %l3, 0 4000699c: 12 bf ff dc bne 4000690c 400069a0: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 400069a4: 7f ff f0 70 call 40002b64 400069a8: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 400069ac: 7f ff ff 58 call 4000670c <_Rate_monotonic_Initiate_statistics> 400069b0: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 400069b4: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400069b8: 03 10 00 1b sethi %hi(0x40006c00), %g1 400069bc: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 40006db8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 400069c0: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069c4: 92 04 60 10 add %l1, 0x10, %o1 400069c8: 11 10 00 74 sethi %hi(0x4001d000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400069cc: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069d0: 90 12 23 d0 or %o0, 0x3d0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400069d4: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400069d8: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 400069dc: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 400069e0: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400069e4: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069e8: 40 00 10 c9 call 4000ad0c <_Watchdog_Insert> 400069ec: b0 10 20 00 clr %i0 400069f0: 30 bf ff de b,a 40006968 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 400069f4: 7f ff ff 62 call 4000677c <_Rate_monotonic_Update_statistics> 400069f8: 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; 400069fc: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40006a00: 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; 40006a04: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40006a08: 7f ff f0 57 call 40002b64 40006a0c: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40006a10: c2 04 a3 b0 ld [ %l2 + 0x3b0 ], %g1 40006a14: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006a18: 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; 40006a1c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006a20: 40 00 0d d9 call 4000a184 <_Thread_Set_state> 40006a24: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40006a28: 7f ff f0 4b call 40002b54 40006a2c: 01 00 00 00 nop local_state = the_period->state; 40006a30: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006a34: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40006a38: 7f ff f0 4b call 40002b64 40006a3c: 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 ) 40006a40: 80 a4 20 03 cmp %l0, 3 40006a44: 02 80 00 17 be 40006aa0 40006a48: d0 04 a3 b0 ld [ %l2 + 0x3b0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 40006a4c: 40 00 0b 39 call 40009730 <_Thread_Enable_dispatch> 40006a50: b0 10 20 00 clr %i0 40006a54: 81 c7 e0 08 ret 40006a58: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40006a5c: 7f ff ff 48 call 4000677c <_Rate_monotonic_Update_statistics> 40006a60: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40006a64: 7f ff f0 40 call 40002b64 40006a68: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006a6c: 82 10 20 02 mov 2, %g1 40006a70: 92 04 60 10 add %l1, 0x10, %o1 40006a74: 11 10 00 74 sethi %hi(0x4001d000), %o0 40006a78: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 4001d3d0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006a7c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40006a80: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40006a84: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006a88: 40 00 10 a1 call 4000ad0c <_Watchdog_Insert> 40006a8c: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40006a90: 40 00 0b 28 call 40009730 <_Thread_Enable_dispatch> 40006a94: 01 00 00 00 nop 40006a98: 81 c7 e0 08 ret 40006a9c: 81 e8 00 00 restore /* * 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 ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006aa0: 40 00 0a 27 call 4000933c <_Thread_Clear_state> <== NOT EXECUTED 40006aa4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40006aa8: 30 bf ff e9 b,a 40006a4c <== NOT EXECUTED 40023fe0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40023fe0: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 40023fe4: 80 a6 60 00 cmp %i1, 0 40023fe8: 02 80 00 4a be 40024110 40023fec: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40023ff0: 13 10 01 1b sethi %hi(0x40046c00), %o1 40023ff4: 9f c6 40 00 call %i1 40023ff8: 92 12 63 68 or %o1, 0x368, %o1 ! 40046f68 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40023ffc: 90 10 00 18 mov %i0, %o0 40024000: 13 10 01 1b sethi %hi(0x40046c00), %o1 40024004: 9f c6 40 00 call %i1 40024008: 92 12 63 88 or %o1, 0x388, %o1 ! 40046f88 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 4002400c: 90 10 00 18 mov %i0, %o0 40024010: 13 10 01 1b sethi %hi(0x40046c00), %o1 40024014: 9f c6 40 00 call %i1 40024018: 92 12 63 b0 or %o1, 0x3b0, %o1 ! 40046fb0 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 4002401c: 90 10 00 18 mov %i0, %o0 40024020: 13 10 01 1b sethi %hi(0x40046c00), %o1 40024024: 9f c6 40 00 call %i1 40024028: 92 12 63 d8 or %o1, 0x3d8, %o1 ! 40046fd8 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 4002402c: 90 10 00 18 mov %i0, %o0 40024030: 13 10 01 1c sethi %hi(0x40047000), %o1 40024034: 9f c6 40 00 call %i1 40024038: 92 12 60 28 or %o1, 0x28, %o1 ! 40047028 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 4002403c: 03 10 01 7c sethi %hi(0x4005f000), %g1 40024040: a6 10 61 00 or %g1, 0x100, %l3 ! 4005f100 <_Rate_monotonic_Information> 40024044: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40024048: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 4002404c: 80 a4 80 01 cmp %l2, %g1 40024050: 18 80 00 30 bgu 40024110 40024054: 03 10 01 1c sethi %hi(0x40047000), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40024058: 05 10 01 1d sethi %hi(0x40047400), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 4002405c: b6 10 60 78 or %g1, 0x78, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40024060: b8 10 a0 80 or %g2, 0x80, %i4 40024064: a8 07 bf 98 add %fp, -104, %l4 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40024068: ae 07 bf d0 add %fp, -48, %l7 4002406c: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40024070: ba 07 bf b0 add %fp, -80, %i5 40024074: aa 07 bf e8 add %fp, -24, %l5 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40024078: 10 80 00 06 b 40024090 4002407c: b4 07 bf c8 add %fp, -56, %i2 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 40024080: a4 04 a0 01 inc %l2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40024084: 80 a0 40 12 cmp %g1, %l2 40024088: 0a 80 00 22 bcs 40024110 4002408c: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40024090: 90 10 00 12 mov %l2, %o0 40024094: 40 00 2d e2 call 4002f81c 40024098: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 4002409c: 80 a2 20 00 cmp %o0, 0 400240a0: 32 bf ff f8 bne,a 40024080 400240a4: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400240a8: 92 10 00 17 mov %l7, %o1 400240ac: 40 00 2d f1 call 4002f870 400240b0: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 400240b4: d0 07 bf d0 ld [ %fp + -48 ], %o0 400240b8: 80 a2 20 00 cmp %o0, 0 400240bc: 12 80 00 4b bne 400241e8 400240c0: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400240c4: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 400240c8: 94 10 00 12 mov %l2, %o2 400240cc: 92 10 00 1b mov %i3, %o1 400240d0: 96 10 00 16 mov %l6, %o3 400240d4: 9f c6 40 00 call %i1 400240d8: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400240dc: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 400240e0: 94 10 00 15 mov %l5, %o2 400240e4: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400240e8: 80 a0 60 00 cmp %g1, 0 400240ec: 12 80 00 0b bne 40024118 400240f0: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 400240f4: 9f c6 40 00 call %i1 400240f8: 90 10 00 18 mov %i0, %o0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 400240fc: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 40024100: a4 04 a0 01 inc %l2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40024104: 80 a0 40 12 cmp %g1, %l2 40024108: 1a bf ff e3 bcc 40024094 4002410c: 90 10 00 12 mov %l2, %o0 40024110: 81 c7 e0 08 ret 40024114: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40024118: 40 00 05 fd call 4002590c <_Timespec_Divide_by_integer> 4002411c: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40024120: d0 07 bf a4 ld [ %fp + -92 ], %o0 40024124: 40 00 77 75 call 40041ef8 <.div> 40024128: 92 10 23 e8 mov 0x3e8, %o1 4002412c: a2 10 00 08 mov %o0, %l1 40024130: d0 07 bf ac ld [ %fp + -84 ], %o0 40024134: 40 00 77 71 call 40041ef8 <.div> 40024138: 92 10 23 e8 mov 0x3e8, %o1 4002413c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40024140: a0 10 00 08 mov %o0, %l0 40024144: d0 07 bf ec ld [ %fp + -20 ], %o0 40024148: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4002414c: 40 00 77 6b call 40041ef8 <.div> 40024150: 92 10 23 e8 mov 0x3e8, %o1 40024154: d8 07 bf a8 ld [ %fp + -88 ], %o4 40024158: d4 07 bf a0 ld [ %fp + -96 ], %o2 4002415c: 96 10 00 11 mov %l1, %o3 40024160: 9a 10 00 10 mov %l0, %o5 40024164: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40024168: 13 10 01 1c sethi %hi(0x40047000), %o1 4002416c: 90 10 00 18 mov %i0, %o0 40024170: 9f c6 40 00 call %i1 40024174: 92 12 60 90 or %o1, 0x90, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40024178: d2 07 bf 98 ld [ %fp + -104 ], %o1 4002417c: 94 10 00 15 mov %l5, %o2 40024180: 40 00 05 e3 call 4002590c <_Timespec_Divide_by_integer> 40024184: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40024188: d0 07 bf bc ld [ %fp + -68 ], %o0 4002418c: 40 00 77 5b call 40041ef8 <.div> 40024190: 92 10 23 e8 mov 0x3e8, %o1 40024194: a2 10 00 08 mov %o0, %l1 40024198: d0 07 bf c4 ld [ %fp + -60 ], %o0 4002419c: 40 00 77 57 call 40041ef8 <.div> 400241a0: 92 10 23 e8 mov 0x3e8, %o1 400241a4: c2 07 bf e8 ld [ %fp + -24 ], %g1 400241a8: a0 10 00 08 mov %o0, %l0 400241ac: d0 07 bf ec ld [ %fp + -20 ], %o0 400241b0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400241b4: 40 00 77 51 call 40041ef8 <.div> 400241b8: 92 10 23 e8 mov 0x3e8, %o1 400241bc: d4 07 bf b8 ld [ %fp + -72 ], %o2 400241c0: d8 07 bf c0 ld [ %fp + -64 ], %o4 400241c4: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 400241c8: 96 10 00 11 mov %l1, %o3 400241cc: 9a 10 00 10 mov %l0, %o5 400241d0: 90 10 00 18 mov %i0, %o0 400241d4: 13 10 01 1c sethi %hi(0x40047000), %o1 400241d8: 9f c6 40 00 call %i1 400241dc: 92 12 60 b0 or %o1, 0xb0, %o1 ! 400470b0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 400241e0: 10 bf ff a8 b 40024080 400241e4: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 400241e8: 94 10 00 16 mov %l6, %o2 400241ec: 7f ff 95 7b call 400097d8 400241f0: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400241f4: 10 bf ff b5 b 400240c8 400241f8: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40010040 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40010040: 9d e3 bf 90 save %sp, -112, %sp 40010044: 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 ) 40010048: 80 a6 60 00 cmp %i1, 0 4001004c: 02 80 00 28 be 400100ec 40010050: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010054: 23 10 00 c8 sethi %hi(0x40032000), %l1 40010058: 40 00 09 12 call 400124a0 <_API_Mutex_Lock> 4001005c: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 ! 40032258 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010060: 92 10 00 10 mov %l0, %o1 40010064: 11 10 00 c7 sethi %hi(0x40031c00), %o0 40010068: 94 07 bf f0 add %fp, -16, %o2 4001006c: 40 00 10 29 call 40014110 <_Objects_Get_no_protection> 40010070: 90 12 23 dc or %o0, 0x3dc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010074: c2 07 bf f0 ld [ %fp + -16 ], %g1 40010078: 80 a0 60 00 cmp %g1, 0 4001007c: 12 80 00 16 bne 400100d4 40010080: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40010084: 92 10 00 19 mov %i1, %o1 40010088: 94 10 00 1a mov %i2, %o2 4001008c: 90 02 20 68 add %o0, 0x68, %o0 40010090: 96 07 bf f4 add %fp, -12, %o3 40010094: 40 00 0c 48 call 400131b4 <_Heap_Extend> 40010098: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4001009c: 80 a2 20 01 cmp %o0, 1 400100a0: 02 80 00 11 be 400100e4 400100a4: 01 00 00 00 nop 400100a8: 1a 80 00 13 bcc 400100f4 400100ac: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100b0: c6 07 bf f4 ld [ %fp + -12 ], %g3 400100b4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 400100b8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100bc: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 400100c0: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100c4: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 400100c8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 400100cc: 10 80 00 06 b 400100e4 400100d0: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 400100d4: 80 a0 60 01 cmp %g1, 1 400100d8: 02 80 00 03 be 400100e4 400100dc: b0 10 20 04 mov 4, %i0 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 400100e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 400100e4: 40 00 09 05 call 400124f8 <_API_Mutex_Unlock> 400100e8: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 return return_status; } 400100ec: 81 c7 e0 08 ret 400100f0: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 400100f4: 12 bf ff fb bne 400100e0 400100f8: b0 10 20 18 mov 0x18, %i0 400100fc: 30 bf ff fa b,a 400100e4 400103fc : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400103fc: 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 ) 40010400: 80 a6 e0 00 cmp %i3, 0 40010404: 02 80 00 2e be 400104bc 40010408: 21 10 00 c8 sethi %hi(0x40032000), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4001040c: 40 00 08 25 call 400124a0 <_API_Mutex_Lock> 40010410: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 ! 40032258 <_RTEMS_Allocator_Mutex> 40010414: 92 10 00 18 mov %i0, %o1 40010418: 11 10 00 c7 sethi %hi(0x40031c00), %o0 4001041c: 94 07 bf f0 add %fp, -16, %o2 40010420: 40 00 0f 3c call 40014110 <_Objects_Get_no_protection> 40010424: 90 12 23 dc or %o0, 0x3dc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010428: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001042c: 80 a0 60 00 cmp %g1, 0 40010430: 12 80 00 14 bne 40010480 40010434: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40010438: 94 10 00 1a mov %i2, %o2 4001043c: 92 10 00 19 mov %i1, %o1 40010440: 90 02 20 68 add %o0, 0x68, %o0 40010444: 96 07 bf ec add %fp, -20, %o3 40010448: 40 00 0c e5 call 400137dc <_Heap_Resize_block> 4001044c: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40010450: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 40010454: b4 92 20 00 orcc %o0, 0, %i2 40010458: 12 80 00 13 bne 400104a4 4001045c: c2 26 c0 00 st %g1, [ %i3 ] 40010460: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40010464: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010468: 12 80 00 17 bne 400104c4 <== NOT EXECUTED 4001046c: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 40010470: 40 00 08 22 call 400124f8 <_API_Mutex_Unlock> <== NOT EXECUTED 40010474: b0 10 20 00 clr %i0 <== NOT EXECUTED 40010478: 81 c7 e0 08 ret <== NOT EXECUTED 4001047c: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010480: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40010484: 82 18 60 01 xor %g1, 1, %g1 40010488: 80 a0 00 01 cmp %g0, %g1 4001048c: 84 40 3f ff addx %g0, -1, %g2 40010490: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010494: 40 00 08 19 call 400124f8 <_API_Mutex_Unlock> 40010498: b0 06 20 19 add %i0, 0x19, %i0 4001049c: 81 c7 e0 08 ret 400104a0: 81 e8 00 00 restore _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 400104a4: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 400104a8: 40 00 08 14 call 400124f8 <_API_Mutex_Unlock> 400104ac: b0 10 20 0d mov 0xd, %i0 return 400104b0: 80 a6 a0 01 cmp %i2, 1 400104b4: 02 80 00 07 be 400104d0 400104b8: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 400104bc: 81 c7 e0 08 ret 400104c0: 91 e8 20 09 restore %g0, 9, %o0 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 400104c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400104c8: 40 00 20 d2 call 40018810 <_Region_Process_queue> <== NOT EXECUTED 400104cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400104d0: 81 c7 e0 08 ret <== NOT EXECUTED 400104d4: 81 e8 00 00 restore <== NOT EXECUTED 400054bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 400054bc: 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 ) ) 400054c0: a4 96 20 00 orcc %i0, 0, %l2 400054c4: 02 80 00 33 be 40005590 400054c8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400054cc: 80 a7 20 00 cmp %i4, 0 400054d0: 02 80 00 30 be 40005590 400054d4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 400054d8: 82 8e a0 c0 andcc %i2, 0xc0, %g1 400054dc: 12 80 00 2f bne 40005598 400054e0: a0 0e a0 30 and %i2, 0x30, %l0 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 400054e4: 80 a4 20 00 cmp %l0, 0 400054e8: 02 80 00 04 be 400054f8 400054ec: 80 a6 60 01 cmp %i1, 1 400054f0: 18 80 00 28 bgu 40005590 400054f4: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400054f8: 05 10 00 62 sethi %hi(0x40018800), %g2 400054fc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> 40005500: 82 00 60 01 inc %g1 40005504: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] * 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 ); 40005508: 31 10 00 61 sethi %hi(0x40018400), %i0 4000550c: 40 00 05 6e call 40006ac4 <_Objects_Allocate> 40005510: 90 16 22 e4 or %i0, 0x2e4, %o0 ! 400186e4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40005514: a2 92 20 00 orcc %o0, 0, %l1 40005518: 02 80 00 4e be 40005650 4000551c: 80 a4 20 00 cmp %l0, 0 * 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 ) ) { 40005520: 02 80 00 2c be 400055d0 40005524: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40005528: 80 8e a0 40 btst 0x40, %i2 4000552c: 02 80 00 44 be 4000563c 40005530: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40005534: 82 10 20 02 mov 2, %g1 40005538: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 4000553c: 80 a4 20 10 cmp %l0, 0x10 40005540: 02 80 00 48 be 40005660 40005544: 82 10 20 02 mov 2, %g1 the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40005548: 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; 4000554c: 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( 40005550: 82 1e 60 01 xor %i1, 1, %g1 40005554: 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; 40005558: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 4000555c: 94 60 3f ff subx %g0, -1, %o2 40005560: 90 04 60 14 add %l1, 0x14, %o0 40005564: 40 00 03 3e call 4000625c <_CORE_mutex_Initialize> 40005568: 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 ) { 4000556c: 80 a2 20 06 cmp %o0, 6 40005570: 32 80 00 26 bne,a 40005608 40005574: c4 04 60 08 ld [ %l1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40005578: 90 16 22 e4 or %i0, 0x2e4, %o0 <== NOT EXECUTED 4000557c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40005580: 40 00 06 4c call 40006eb0 <_Objects_Free> <== NOT EXECUTED 40005584: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40005588: 40 00 09 1e call 40007a00 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000558c: 01 00 00 00 nop <== NOT EXECUTED 40005590: 81 c7 e0 08 ret 40005594: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40005598: 80 a4 20 10 cmp %l0, 0x10 4000559c: 02 80 00 06 be 400055b4 400055a0: 80 a4 20 20 cmp %l0, 0x20 400055a4: 02 80 00 05 be 400055b8 400055a8: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400055ac: 81 c7 e0 08 ret 400055b0: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 400055b4: 80 8e a0 04 btst 4, %i2 400055b8: 02 bf ff fd be 400055ac 400055bc: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 400055c0: 12 bf ff ca bne 400054e8 400055c4: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 400055c8: 81 c7 e0 08 ret 400055cc: 91 e8 20 0b restore %g0, 0xb, %o0 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 400055d0: 80 8e a0 04 btst 4, %i2 400055d4: 22 80 00 04 be,a 400055e4 400055d8: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400055dc: 82 10 20 01 mov 1, %g1 400055e0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400055e4: 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; 400055e8: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400055ec: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400055f0: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400055f4: 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( 400055f8: 90 04 60 14 add %l1, 0x14, %o0 400055fc: 40 00 04 03 call 40006608 <_CORE_semaphore_Initialize> 40005600: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005604: c4 04 60 08 ld [ %l1 + 8 ], %g2 40005608: 82 16 22 e4 or %i0, 0x2e4, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000560c: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005610: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40005614: c4 27 00 00 st %g2, [ %i4 ] 40005618: 03 00 00 3f sethi %hi(0xfc00), %g1 4000561c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005620: 84 08 80 01 and %g2, %g1, %g2 40005624: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40005628: b0 10 20 00 clr %i0 4000562c: 40 00 08 f5 call 40007a00 <_Thread_Enable_dispatch> 40005630: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 40005634: 81 c7 e0 08 ret 40005638: 81 e8 00 00 restore if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4000563c: 02 80 00 0f be 40005678 40005640: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40005644: 82 10 20 03 mov 3, %g1 40005648: 10 bf ff bd b 4000553c 4000564c: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40005650: 40 00 08 ec call 40007a00 <_Thread_Enable_dispatch> 40005654: b0 10 20 05 mov 5, %i0 40005658: 81 c7 e0 08 ret 4000565c: 81 e8 00 00 restore if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40005660: c2 07 bf e8 ld [ %fp + -24 ], %g1 40005664: 80 a0 60 01 cmp %g1, 1 40005668: 18 80 00 09 bgu 4000568c 4000566c: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40005670: 10 bf ff b8 b 40005550 40005674: c0 2f bf e4 clrb [ %fp + -28 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 40005678: 22 bf ff b1 be,a 4000553c 4000567c: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40005680: 82 10 20 01 mov 1, %g1 40005684: 10 bf ff ae b 4000553c 40005688: c2 27 bf e8 st %g1, [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4000568c: 80 a0 60 03 cmp %g1, 3 40005690: 18 bf ff b1 bgu 40005554 40005694: 82 1e 60 01 xor %i1, 1, %g1 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; 40005698: 82 10 20 01 mov 1, %g1 4000569c: 10 bf ff ad b 40005550 400056a0: c2 2f bf e4 stb %g1, [ %fp + -28 ] 40024364 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40024364: 9d e3 bf 90 save %sp, -112, %sp 40024368: 11 10 01 7a sethi %hi(0x4005e800), %o0 4002436c: 92 10 00 18 mov %i0, %o1 40024370: 90 12 22 50 or %o0, 0x250, %o0 40024374: 7f ff 9c 75 call 4000b548 <_Objects_Get> 40024378: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4002437c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40024380: 80 a0 60 00 cmp %g1, 0 40024384: 12 80 00 0b bne 400243b0 40024388: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4002438c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40024390: 80 88 60 30 btst 0x30, %g1 40024394: 12 80 00 09 bne 400243b8 40024398: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 4002439c: 92 10 20 00 clr %o1 <== NOT EXECUTED 400243a0: 7f ff 99 5c call 4000a910 <_CORE_semaphore_Flush> <== NOT EXECUTED 400243a4: 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(); 400243a8: 7f ff 9e d2 call 4000bef0 <_Thread_Enable_dispatch> 400243ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400243b0: 81 c7 e0 08 ret 400243b4: 81 e8 00 00 restore the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 400243b8: 92 10 20 00 clr %o1 400243bc: 7f ff 98 6a call 4000a564 <_CORE_mutex_Flush> 400243c0: 94 10 20 01 mov 1, %o2 400243c4: 30 bf ff f9 b,a 400243a8 400160c4 : */ void rtems_shutdown_executive( uint32_t result ) { 400160c4: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 400160c8: 05 10 00 62 sethi %hi(0x40018800), %g2 400160cc: c2 00 a1 c4 ld [ %g2 + 0x1c4 ], %g1 ! 400189c4 <_System_state_Current> 400160d0: 80 a0 60 04 cmp %g1, 4 400160d4: 02 80 00 07 be 400160f0 400160d8: 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 ); 400160dc: 13 10 00 61 sethi %hi(0x40018400), %o1 400160e0: c2 20 a1 c4 st %g1, [ %g2 + 0x1c4 ] 400160e4: 92 12 63 98 or %o1, 0x398, %o1 400160e8: 7f ff cb e2 call 40009070 <_CPU_Context_switch> 400160ec: 90 07 bf 70 add %fp, -144, %o0 400160f0: 81 c7 e0 08 ret <== NOT EXECUTED 400160f4: 81 e8 00 00 restore <== NOT EXECUTED 400077bc : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400077bc: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400077c0: 03 10 00 78 sethi %hi(0x4001e000), %g1 400077c4: c4 00 60 c8 ld [ %g1 + 0xc8 ], %g2 ! 4001e0c8 <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400077c8: 90 10 00 18 mov %i0, %o0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400077cc: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 400077d0: c4 08 60 04 ldub [ %g1 + 4 ], %g2 400077d4: 80 a0 a0 00 cmp %g2, 0 400077d8: 02 80 00 1c be 40007848 400077dc: b0 10 20 16 mov 0x16, %i0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 400077e0: 80 a6 60 0f cmp %i1, 0xf 400077e4: 18 80 00 19 bgu 40007848 400077e8: b0 10 20 0a mov 0xa, %i0 400077ec: 03 10 00 78 sethi %hi(0x4001e000), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 400077f0: 80 a2 20 00 cmp %o0, 0 400077f4: 02 80 00 17 be 40007850 400077f8: 86 10 60 f0 or %g1, 0xf0, %g3 400077fc: 03 10 00 78 sethi %hi(0x4001e000), %g1 40007800: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001e0f0 <_Thread_Executing> 40007804: 86 10 60 f0 or %g1, 0xf0, %g3 40007808: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4000780c: 80 a2 00 01 cmp %o0, %g1 40007810: 22 80 00 11 be,a 40007854 40007814: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 40007818: 40 00 08 44 call 40009928 <_Thread_Get> 4000781c: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40007820: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007824: 80 a0 60 00 cmp %g1, 0 40007828: 12 80 00 08 bne 40007848 4000782c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007830: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 40007834: 82 06 60 08 add %i1, 8, %g1 40007838: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 4000783c: b0 10 20 00 clr %i0 40007840: 40 00 08 2c call 400098f0 <_Thread_Enable_dispatch> 40007844: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007848: 81 c7 e0 08 ret 4000784c: 81 e8 00 00 restore */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007850: c2 00 c0 00 ld [ %g3 ], %g1 40007854: 84 06 60 08 add %i1, 8, %g2 40007858: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 4000785c: 85 28 a0 02 sll %g2, 2, %g2 40007860: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 40007864: 81 c7 e0 08 ret 40007868: 91 e8 20 00 restore %g0, 0, %o0 4001142c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4001142c: 9d e3 bf 90 save %sp, -112, %sp 40011430: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40011434: 80 a6 60 00 cmp %i1, 0 40011438: 02 80 00 26 be 400114d0 4001143c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40011440: 80 a6 a0 00 cmp %i2, 0 40011444: 02 80 00 23 be 400114d0 40011448: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 4001144c: 11 10 00 c9 sethi %hi(0x40032400), %o0 40011450: 92 10 00 12 mov %l2, %o1 40011454: 90 12 20 c0 or %o0, 0xc0, %o0 40011458: 40 00 0b 40 call 40014158 <_Objects_Get> 4001145c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40011460: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011464: a0 10 00 08 mov %o0, %l0 40011468: 80 a0 60 00 cmp %g1, 0 4001146c: 12 80 00 19 bne 400114d0 40011470: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40011474: a2 02 20 10 add %o0, 0x10, %l1 40011478: 40 00 13 fd call 4001646c <_Watchdog_Remove> 4001147c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40011480: 7f ff e7 4c call 4000b1b0 40011484: 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 ) { 40011488: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001148c: 80 a0 60 00 cmp %g1, 0 40011490: 12 80 00 12 bne 400114d8 40011494: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40011498: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 4001149c: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400114a0: 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; 400114a4: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400114a8: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 400114ac: 7f ff e7 45 call 4000b1c0 400114b0: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400114b4: 92 10 00 11 mov %l1, %o1 400114b8: 11 10 00 c8 sethi %hi(0x40032000), %o0 400114bc: 90 12 22 80 or %o0, 0x280, %o0 ! 40032280 <_Watchdog_Ticks_chain> 400114c0: 40 00 13 80 call 400162c0 <_Watchdog_Insert> 400114c4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 400114c8: 40 00 0d 8b call 40014af4 <_Thread_Enable_dispatch> 400114cc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400114d0: 81 c7 e0 08 ret 400114d4: 81 e8 00 00 restore * 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 ) { _ISR_Enable( level ); 400114d8: 7f ff e7 3a call 4000b1c0 <== NOT EXECUTED 400114dc: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400114e0: 40 00 0d 85 call 40014af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400114e4: 01 00 00 00 nop <== NOT EXECUTED 400114e8: 81 c7 e0 08 ret <== NOT EXECUTED 400114ec: 81 e8 00 00 restore <== NOT EXECUTED 400118e4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 400118e4: 9d e3 bf 90 save %sp, -112, %sp 400118e8: 92 96 20 00 orcc %i0, 0, %o1 400118ec: 12 80 00 05 bne 40011900 400118f0: 03 10 00 b4 sethi %hi(0x4002d000), %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; 400118f4: 90 10 20 13 mov 0x13, %o0 } return status; } 400118f8: 81 c7 e0 08 ret 400118fc: 91 e8 00 08 restore %g0, %o0, %o0 40011900: c4 08 61 44 ldub [ %g1 + 0x144 ], %g2 40011904: 80 a2 40 02 cmp %o1, %g2 40011908: 18 80 00 56 bgu 40011a60 4001190c: 80 a2 7f ff cmp %o1, -1 40011910: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 40011914: 05 10 00 c8 sethi %hi(0x40032000), %g2 40011918: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 400321a0 <_Thread_Dispatch_disable_level> 4001191c: 82 00 60 01 inc %g1 40011920: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40011924: 23 10 00 b7 sethi %hi(0x4002dc00), %l1 initialized = true; 40011928: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 4001192c: e0 0c 60 10 ldub [ %l1 + 0x10 ], %l0 initialized = true; _Thread_Enable_dispatch(); 40011930: 40 00 0c 71 call 40014af4 <_Thread_Enable_dispatch> 40011934: c2 2c 60 10 stb %g1, [ %l1 + 0x10 ] if ( tmpInitialized ) 40011938: 80 a4 20 00 cmp %l0, 0 4001193c: 12 bf ff ef bne 400118f8 40011940: 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); 40011944: 05 10 00 c8 sethi %hi(0x40032000), %g2 40011948: 82 10 a0 bc or %g2, 0xbc, %g1 ! 400320bc <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001194c: 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; 40011950: 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); 40011954: 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( 40011958: 92 10 00 18 mov %i0, %o1 4001195c: 94 10 00 19 mov %i1, %o2 40011960: 19 00 00 20 sethi %hi(0x8000), %o4 40011964: c2 20 a0 bc st %g1, [ %g2 + 0xbc ] 40011968: 98 16 80 0c or %i2, %o4, %o4 4001196c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40011970: 96 10 21 00 mov 0x100, %o3 40011974: 90 12 21 45 or %o0, 0x145, %o0 40011978: 7f ff fc 78 call 40010b58 4001197c: 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) { 40011980: 80 a2 20 00 cmp %o0, 0 40011984: 12 80 00 34 bne 40011a54 40011988: 03 10 00 c8 sethi %hi(0x40032000), %g1 * 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( 4001198c: 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 ) 40011990: 86 10 60 5c or %g1, 0x5c, %g3 40011994: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40011998: 03 00 00 3f sethi %hi(0xfc00), %g1 4001199c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400119a0: 82 0a c0 01 and %o3, %g1, %g1 400119a4: 80 a0 40 02 cmp %g1, %g2 400119a8: 18 80 00 05 bgu 400119bc 400119ac: 98 10 20 00 clr %o4 400119b0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 400119b4: 83 28 60 02 sll %g1, 2, %g1 400119b8: d8 00 80 01 ld [ %g2 + %g1 ], %o4 400119bc: 09 10 00 c8 sethi %hi(0x40032000), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400119c0: 1b 10 00 c8 sethi %hi(0x40032000), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400119c4: 84 11 20 9c or %g4, 0x9c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400119c8: 82 13 60 b0 or %o5, 0xb0, %g1 400119cc: 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; 400119d0: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 400119d4: 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; 400119d8: 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); 400119dc: 84 00 a0 04 add %g2, 4, %g2 400119e0: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400119e4: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400119e8: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 400119ec: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 400119f0: c4 21 20 9c st %g2, [ %g4 + 0x9c ] 400119f4: c2 23 60 b0 st %g1, [ %o5 + 0xb0 ] 400119f8: 05 10 00 c9 sethi %hi(0x40032400), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400119fc: 07 10 00 52 sethi %hi(0x40014800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a00: 03 10 00 c8 sethi %hi(0x40032000), %g1 the_watchdog->routine = routine; 40011a04: 86 10 e1 5c or %g3, 0x15c, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a08: 82 10 60 c8 or %g1, 0xc8, %g1 the_watchdog->routine = routine; 40011a0c: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40011a10: d8 20 a1 04 st %o4, [ %g2 + 0x104 ] 40011a14: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40011a18: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a1c: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40011a20: 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; 40011a24: 05 10 00 46 sethi %hi(0x40011800), %g2 40011a28: 03 10 00 c9 sethi %hi(0x40032400), %g1 40011a2c: 84 10 a2 70 or %g2, 0x270, %g2 /* * Start the timer server */ status = rtems_task_start( 40011a30: 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; 40011a34: c4 20 61 00 st %g2, [ %g1 + 0x100 ] /* * Start the timer server */ status = rtems_task_start( 40011a38: 13 10 00 46 sethi %hi(0x40011800), %o1 40011a3c: 94 10 20 00 clr %o2 40011a40: 7f ff fd 9e call 400110b8 40011a44: 92 12 63 44 or %o1, 0x344, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40011a48: 80 a2 20 00 cmp %o0, 0 40011a4c: 02 bf ff ab be 400118f8 40011a50: 01 00 00 00 nop * 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; 40011a54: c0 2c 60 10 clrb [ %l1 + 0x10 ] } return status; } 40011a58: 81 c7 e0 08 ret 40011a5c: 91 e8 00 08 restore %g0, %o0, %o0 * 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 ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 40011a60: 02 bf ff ad be 40011914 40011a64: b0 10 20 00 clr %i0 * 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; 40011a68: 10 bf ff a4 b 400118f8 40011a6c: 90 10 20 13 mov 0x13, %o0 40011664 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 40011664: 9d e3 bf 90 save %sp, -112, %sp 40011668: 11 10 00 c9 sethi %hi(0x40032400), %o0 4001166c: 92 10 00 18 mov %i0, %o1 40011670: 90 12 20 c0 or %o0, 0xc0, %o0 40011674: 40 00 0a b9 call 40014158 <_Objects_Get> 40011678: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001167c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011680: a0 10 00 08 mov %o0, %l0 40011684: 80 a0 60 00 cmp %g1, 0 40011688: 12 80 00 11 bne 400116cc 4001168c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40011690: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40011694: 80 a0 60 01 cmp %g1, 1 40011698: 22 80 00 15 be,a 400116ec 4001169c: 31 10 00 c9 sethi %hi(0x40032400), %i0 400116a0: 1a 80 00 0d bcc 400116d4 400116a4: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400116a8: a0 02 20 10 add %o0, 0x10, %l0 400116ac: 40 00 13 70 call 4001646c <_Watchdog_Remove> 400116b0: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400116b4: 11 10 00 c8 sethi %hi(0x40032000), %o0 400116b8: 92 10 00 10 mov %l0, %o1 400116bc: 40 00 13 01 call 400162c0 <_Watchdog_Insert> 400116c0: 90 12 22 80 or %o0, 0x280, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400116c4: 40 00 0d 0c call 40014af4 <_Thread_Enable_dispatch> 400116c8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400116cc: 81 c7 e0 08 ret 400116d0: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400116d4: 18 bf ff fc bgu 400116c4 400116d8: 01 00 00 00 nop (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 400116dc: 40 00 0d 06 call 40014af4 <_Thread_Enable_dispatch> 400116e0: b0 10 20 0b mov 0xb, %i0 ! b 400116e4: 81 c7 e0 08 ret 400116e8: 81 e8 00 00 restore case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 400116ec: c2 06 21 00 ld [ %i0 + 0x100 ], %g1 400116f0: 80 a0 60 00 cmp %g1, 0 400116f4: 02 80 00 08 be 40011714 400116f8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400116fc: 40 00 13 5c call 4001646c <_Watchdog_Remove> 40011700: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40011704: c2 06 21 00 ld [ %i0 + 0x100 ], %g1 40011708: 9f c0 40 00 call %g1 4001170c: 90 10 00 10 mov %l0, %o0 40011710: 30 bf ff ed b,a 400116c4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 40011714: 40 00 0c f8 call 40014af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40011718: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 4001171c: 81 c7 e0 08 ret <== NOT EXECUTED 40011720: 81 e8 00 00 restore <== NOT EXECUTED 40011724 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011724: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011728: 03 10 00 c9 sethi %hi(0x40032400), %g1 4001172c: c4 00 61 04 ld [ %g1 + 0x104 ], %g2 ! 40032504 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011730: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011734: 80 a0 a0 00 cmp %g2, 0 40011738: 02 80 00 28 be 400117d8 4001173c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40011740: 80 a6 a0 00 cmp %i2, 0 40011744: 02 80 00 25 be 400117d8 40011748: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001174c: 80 a6 60 00 cmp %i1, 0 40011750: 02 80 00 22 be 400117d8 40011754: b0 10 20 0a mov 0xa, %i0 40011758: 11 10 00 c9 sethi %hi(0x40032400), %o0 4001175c: 92 10 00 11 mov %l1, %o1 40011760: 90 12 20 c0 or %o0, 0xc0, %o0 40011764: 40 00 0a 7d call 40014158 <_Objects_Get> 40011768: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001176c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011770: a0 10 00 08 mov %o0, %l0 40011774: 80 a0 60 00 cmp %g1, 0 40011778: 12 80 00 18 bne 400117d8 4001177c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40011780: 40 00 13 3b call 4001646c <_Watchdog_Remove> 40011784: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40011788: 7f ff e6 8a call 4000b1b0 4001178c: 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 ) { 40011790: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40011794: 80 a0 60 00 cmp %g1, 0 40011798: 12 80 00 12 bne 400117e0 4001179c: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400117a0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400117a4: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400117a8: 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; 400117ac: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400117b0: 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; 400117b4: 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 ); 400117b8: 7f ff e6 82 call 4000b1c0 400117bc: 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 ); 400117c0: 03 10 00 c9 sethi %hi(0x40032400), %g1 400117c4: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 40032500 <_Timer_Server_schedule_operation> 400117c8: 9f c0 80 00 call %g2 400117cc: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400117d0: 40 00 0c c9 call 40014af4 <_Thread_Enable_dispatch> 400117d4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400117d8: 81 c7 e0 08 ret 400117dc: 81 e8 00 00 restore * 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 ) { _ISR_Enable( level ); 400117e0: 7f ff e6 78 call 4000b1c0 <== NOT EXECUTED 400117e4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400117e8: 40 00 0c c3 call 40014af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400117ec: 01 00 00 00 nop <== NOT EXECUTED 400117f0: 81 c7 e0 08 ret <== NOT EXECUTED 400117f4: 81 e8 00 00 restore <== NOT EXECUTED