40007268 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40007268: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4000726c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007270: e0 00 61 54 ld [ %g1 + 0x154 ], %l0 ! 40019d54 <_API_extensions_List> 40007274: 82 10 61 54 or %g1, 0x154, %g1 40007278: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 4000727c: 80 a4 00 11 cmp %l0, %l1 40007280: 02 80 00 0c be 400072b0 <_API_extensions_Run_postdriver+0x48> 40007284: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40007288: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000728c: 80 a0 60 00 cmp %g1, 0 40007290: 22 80 00 05 be,a 400072a4 <_API_extensions_Run_postdriver+0x3c> 40007294: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40007298: 9f c0 40 00 call %g1 4000729c: 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 ) { 400072a0: 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 ) ; 400072a4: 80 a4 00 11 cmp %l0, %l1 400072a8: 32 bf ff f9 bne,a 4000728c <_API_extensions_Run_postdriver+0x24> 400072ac: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 400072b0: 81 c7 e0 08 ret 400072b4: 81 e8 00 00 restore 400072b8 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 400072b8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400072bc: 03 10 00 67 sethi %hi(0x40019c00), %g1 400072c0: e0 00 61 54 ld [ %g1 + 0x154 ], %l0 ! 40019d54 <_API_extensions_List> 400072c4: 82 10 61 54 or %g1, 0x154, %g1 400072c8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400072cc: 80 a4 00 11 cmp %l0, %l1 400072d0: 02 80 00 0d be 40007304 <_API_extensions_Run_postswitch+0x4c> 400072d4: 03 10 00 66 sethi %hi(0x40019800), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 400072d8: a4 10 63 d0 or %g1, 0x3d0, %l2 ! 40019bd0 <_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 ) 400072dc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400072e0: 80 a0 60 00 cmp %g1, 0 400072e4: 22 80 00 05 be,a 400072f8 <_API_extensions_Run_postswitch+0x40> 400072e8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 400072ec: 9f c0 40 00 call %g1 400072f0: 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 ) { 400072f4: 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 ) ; 400072f8: 80 a4 00 11 cmp %l0, %l1 400072fc: 32 bf ff f9 bne,a 400072e0 <_API_extensions_Run_postswitch+0x28> 40007300: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 40007304: 81 c7 e0 08 ret 40007308: 81 e8 00 00 restore 40007218 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40007218: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4000721c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007220: e0 00 61 54 ld [ %g1 + 0x154 ], %l0 ! 40019d54 <_API_extensions_List> 40007224: 82 10 61 54 or %g1, 0x154, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40007228: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 4000722c: 80 a4 00 11 cmp %l0, %l1 40007230: 02 80 00 0c be 40007260 <_API_extensions_Run_predriver+0x48> 40007234: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 40007238: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000723c: 80 a0 60 00 cmp %g1, 0 40007240: 22 80 00 05 be,a 40007254 <_API_extensions_Run_predriver+0x3c> 40007244: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40007248: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000724c: 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 ) { 40007250: 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 ) ; 40007254: 80 a4 00 11 cmp %l0, %l1 40007258: 32 bf ff f9 bne,a 4000723c <_API_extensions_Run_predriver+0x24> 4000725c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40007260: 81 c7 e0 08 ret 40007264: 81 e8 00 00 restore 40013804 <_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 ) { 40013804: 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 ) { 40013808: 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 ) { 4001380c: 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 ) { 40013810: 80 a0 40 1a cmp %g1, %i2 40013814: 0a 80 00 17 bcs 40013870 <_CORE_message_queue_Broadcast+0x6c> 40013818: 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 ) { 4001381c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40013820: 80 a0 60 00 cmp %g1, 0 40013824: 02 80 00 0a be 4001384c <_CORE_message_queue_Broadcast+0x48> 40013828: a2 10 20 00 clr %l1 *count = 0; 4001382c: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 40013830: 81 c7 e0 08 ret <== NOT EXECUTED 40013834: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40013838: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 4001383c: 40 00 20 30 call 4001b8fc 40013840: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40013844: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40013848: 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))) { 4001384c: 40 00 0a 05 call 40016060 <_Thread_queue_Dequeue> 40013850: 90 10 00 12 mov %l2, %o0 40013854: 92 10 00 19 mov %i1, %o1 40013858: a0 10 00 08 mov %o0, %l0 4001385c: 80 a2 20 00 cmp %o0, 0 40013860: 12 bf ff f6 bne 40013838 <_CORE_message_queue_Broadcast+0x34> 40013864: 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; 40013868: e2 27 40 00 st %l1, [ %i5 ] 4001386c: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40013870: 81 c7 e0 08 ret 40013874: 81 e8 00 00 restore 400182cc <_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 ) { 400182cc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 400182d0: 03 20 00 00 sethi %hi(0x80000000), %g1 400182d4: 80 a6 80 01 cmp %i2, %g1 400182d8: 02 80 00 41 be 400183dc <_CORE_message_queue_Insert_message+0x110> 400182dc: f4 26 60 08 st %i2, [ %i1 + 8 ] 400182e0: 82 00 7c 00 add %g1, -1024, %g1 400182e4: 82 10 63 ff or %g1, 0x3ff, %g1 400182e8: 80 a6 80 01 cmp %i2, %g1 400182ec: 02 80 00 2a be 40018394 <_CORE_message_queue_Insert_message+0xc8> 400182f0: 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; 400182f4: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 400182f8: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 400182fc: 32 80 00 22 bne,a 40018384 <_CORE_message_queue_Insert_message+0xb8> <== NOT EXECUTED 40018300: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40018304: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 40018308: 7f ff a8 d4 call 40002658 <== NOT EXECUTED 4001830c: 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 ); 40018310: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 40018314: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40018318: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4001831c: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40018320: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 40018324: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40018328: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 4001832c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40018330: 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; 40018334: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 40018338: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 4001833c: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 40018340: 7f ff a8 ca call 40002668 <== NOT EXECUTED 40018344: 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 ) 40018348: 80 8c 20 ff btst 0xff, %l0 <== NOT EXECUTED 4001834c: 02 80 00 08 be 4001836c <_CORE_message_queue_Insert_message+0xa0> 40018350: 01 00 00 00 nop 40018354: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 40018358: 80 a0 60 00 cmp %g1, 0 4001835c: 02 80 00 04 be 4001836c <_CORE_message_queue_Insert_message+0xa0> 40018360: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 40018364: 9f c0 40 00 call %g1 <== NOT EXECUTED 40018368: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 4001836c: 81 c7 e0 08 ret 40018370: 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 ) ) { 40018374: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 40018378: 22 bf ff e4 be,a 40018308 <_CORE_message_queue_Insert_message+0x3c> <== NOT EXECUTED 4001837c: 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 ) { 40018380: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40018384: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 40018388: 36 bf ff fb bge,a 40018374 <_CORE_message_queue_Insert_message+0xa8> <== NOT EXECUTED 4001838c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 40018390: 30 bf ff de b,a 40018308 <_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 ); 40018394: 7f ff a8 b1 call 40002658 40018398: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 4001839c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400183a0: 82 06 20 54 add %i0, 0x54, %g1 400183a4: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 400183a8: c6 06 20 58 ld [ %i0 + 0x58 ], %g3 the_chain->last = the_node; 400183ac: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 400183b0: 80 a0 00 02 cmp %g0, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 400183b4: c6 26 60 04 st %g3, [ %i1 + 4 ] 400183b8: 82 60 3f ff subx %g0, -1, %g1 400183bc: 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; 400183c0: f2 20 c0 00 st %i1, [ %g3 ] 400183c4: a0 10 00 01 mov %g1, %l0 400183c8: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 400183cc: 7f ff a8 a7 call 40002668 400183d0: 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 ) 400183d4: 10 bf ff de b 4001834c <_CORE_message_queue_Insert_message+0x80> 400183d8: 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 ); 400183dc: 7f ff a8 9f call 40002658 400183e0: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 400183e4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400183e8: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 400183ec: 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; 400183f0: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400183f4: c2 26 60 04 st %g1, [ %i1 + 4 ] 400183f8: 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; 400183fc: f2 20 e0 04 st %i1, [ %g3 + 4 ] 40018400: 82 60 3f ff subx %g0, -1, %g1 40018404: 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; 40018408: c6 26 40 00 st %g3, [ %i1 ] 4001840c: a0 10 00 01 mov %g1, %l0 40018410: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 40018414: 7f ff a8 95 call 40002668 40018418: 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 ) 4001841c: 10 bf ff cc b 4001834c <_CORE_message_queue_Insert_message+0x80> 40018420: 80 8c 20 ff btst 0xff, %l0 40015058 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40015058: 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; 4001505c: 27 10 00 a9 sethi %hi(0x4002a400), %l3 40015060: e2 04 e2 80 ld [ %l3 + 0x280 ], %l1 ! 4002a680 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40015064: 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 ); 40015068: 7f ff b5 7c call 40002658 4001506c: 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)); 40015070: 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)) 40015074: 82 06 20 54 add %i0, 0x54, %g1 40015078: 80 a6 40 01 cmp %i1, %g1 4001507c: 02 80 00 21 be 40015100 <_CORE_message_queue_Seize+0xa8> 40015080: 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; 40015084: 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; 40015088: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_chain->first = new_first; 4001508c: c6 26 20 50 st %g3, [ %i0 + 0x50 ] 40015090: 82 00 7f ff add %g1, -1, %g1 40015094: c2 26 20 48 st %g1, [ %i0 + 0x48 ] new_first->previous = _Chain_Head(the_chain); 40015098: c4 20 e0 04 st %g2, [ %g3 + 4 ] _ISR_Enable( level ); 4001509c: 7f ff b5 73 call 40002668 400150a0: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 400150a4: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 400150a8: c4 04 e2 80 ld [ %l3 + 0x280 ], %g2 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 400150ac: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 400150b0: c2 06 60 08 ld [ %i1 + 8 ], %g1 400150b4: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 400150b8: 92 10 00 11 mov %l1, %o1 400150bc: 40 00 14 7f call 4001a2b8 400150c0: 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 ); 400150c4: 7f ff e9 5c call 4000f634 <_Thread_queue_Dequeue> 400150c8: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 400150cc: 80 a2 20 00 cmp %o0, 0 400150d0: 02 80 00 1f be 4001514c <_CORE_message_queue_Seize+0xf4> 400150d4: 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; 400150d8: 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; 400150dc: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 400150e0: 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; 400150e4: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED 400150e8: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 400150ec: 40 00 14 73 call 4001a2b8 <== NOT EXECUTED 400150f0: 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( 400150f4: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 400150f8: 40 00 0c 75 call 400182cc <_CORE_message_queue_Insert_message> <== NOT EXECUTED 400150fc: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 40015100: 80 8f 20 ff btst 0xff, %i4 40015104: 02 80 00 0c be 40015134 <_CORE_message_queue_Seize+0xdc> 40015108: 82 10 20 01 mov 1, %g1 4001510c: 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; 40015110: 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; 40015114: f0 24 60 44 st %i0, [ %l1 + 0x44 ] executing->Wait.id = id; 40015118: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 4001511c: 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 ); 40015120: 7f ff b5 52 call 40002668 40015124: 35 10 00 3f sethi %hi(0x4000fc00), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40015128: b2 10 00 1d mov %i5, %i1 4001512c: 7f ff e9 a6 call 4000f7c4 <_Thread_queue_Enqueue_with_handler> 40015130: 95 ee a0 1c restore %i2, 0x1c, %o2 ); return; } if ( !wait ) { _ISR_Enable( level ); 40015134: 7f ff b5 4d call 40002668 40015138: 01 00 00 00 nop executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4001513c: 82 10 20 04 mov 4, %g1 ! 4 40015140: 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 ); } 40015144: 81 c7 e0 08 ret 40015148: 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 ); 4001514c: 7f ff e2 25 call 4000d9e0 <_Chain_Append> 40015150: 91 ee 20 68 restore %i0, 0x68, %o0 40015154: 01 00 00 00 nop 40015158 <_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 ) { 40015158: 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 ) { 4001515c: 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 ) { 40015160: 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 ) { 40015164: 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 ) { 40015168: 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 ) { 4001516c: 0a 80 00 22 bcs 400151f4 <_CORE_message_queue_Submit+0x9c> 40015170: 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 ) { 40015174: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40015178: 80 a0 a0 00 cmp %g2, 0 4001517c: 02 80 00 22 be 40015204 <_CORE_message_queue_Submit+0xac> 40015180: 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 < 40015184: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40015188: 80 a0 40 02 cmp %g1, %g2 4001518c: 18 80 00 2b bgu 40015238 <_CORE_message_queue_Submit+0xe0> 40015190: 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 ) { 40015194: 02 80 00 18 be 400151f4 <_CORE_message_queue_Submit+0x9c> 40015198: 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() ) { 4001519c: 03 10 00 a9 sethi %hi(0x4002a400), %g1 <== NOT EXECUTED 400151a0: c4 00 62 5c ld [ %g1 + 0x25c ], %g2 ! 4002a65c <_ISR_Nest_level> <== NOT EXECUTED 400151a4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400151a8: 32 80 00 13 bne,a 400151f4 <_CORE_message_queue_Submit+0x9c> <== NOT EXECUTED 400151ac: 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; 400151b0: 03 10 00 a9 sethi %hi(0x4002a400), %g1 <== NOT EXECUTED _ISR_Disable( level ); 400151b4: 7f ff b5 29 call 40002658 <== NOT EXECUTED 400151b8: e0 00 62 80 ld [ %g1 + 0x280 ], %l0 ! 4002a680 <_Thread_Executing> <== NOT EXECUTED 400151bc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400151c0: 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; 400151c4: 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; 400151c8: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 400151cc: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 400151d0: 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; 400151d4: 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 ); 400151d8: 7f ff b5 24 call 40002668 <== NOT EXECUTED 400151dc: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 400151e0: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 400151e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400151e8: 15 10 00 3f sethi %hi(0x4000fc00), %o2 <== NOT EXECUTED 400151ec: 7f ff e9 76 call 4000f7c4 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 400151f0: 94 12 a0 1c or %o2, 0x1c, %o2 ! 4000fc1c <_Thread_queue_Timeout> <== NOT EXECUTED 400151f4: 81 c7 e0 08 ret 400151f8: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 400151fc: 81 c7 e0 08 ret <== NOT EXECUTED 40015200: 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 ); 40015204: 7f ff e9 0c call 4000f634 <_Thread_queue_Dequeue> 40015208: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 4001520c: a0 92 20 00 orcc %o0, 0, %l0 40015210: 02 80 00 1b be 4001527c <_CORE_message_queue_Submit+0x124> 40015214: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015218: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 4001521c: 40 00 14 27 call 4001a2b8 40015220: 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; 40015224: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40015228: 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; 4001522c: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40015230: 81 c7 e0 08 ret 40015234: 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 *) 40015238: 7f ff e1 f6 call 4000da10 <_Chain_Get> 4001523c: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40015240: a0 92 20 00 orcc %o0, 0, %l0 40015244: 02 bf ff ee be 400151fc <_CORE_message_queue_Submit+0xa4> 40015248: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4001524c: 94 10 00 1a mov %i2, %o2 40015250: 40 00 14 1a call 4001a2b8 40015254: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40015258: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4001525c: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40015260: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40015264: 92 10 00 10 mov %l0, %o1 40015268: 94 10 00 1d mov %i5, %o2 4001526c: 40 00 0c 18 call 400182cc <_CORE_message_queue_Insert_message> 40015270: b0 10 20 00 clr %i0 40015274: 81 c7 e0 08 ret 40015278: 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 ) { 4001527c: 10 bf ff c2 b 40015184 <_CORE_message_queue_Submit+0x2c> 40015280: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4000c744 <_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 ) { 4000c744: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000c748: 03 10 00 66 sethi %hi(0x40019800), %g1 4000c74c: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 ! 40019bd0 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000c750: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000c754: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000c758: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000c75c: 80 a0 60 00 cmp %g1, 0 4000c760: 22 80 00 12 be,a 4000c7a8 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000c764: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 4000c768: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000c76c: 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; 4000c770: 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; 4000c774: 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; 4000c778: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000c77c: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000c780: 80 a0 a0 02 cmp %g2, 2 4000c784: 02 80 00 0e be 4000c7bc <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000c788: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000c78c: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 4000c790: 22 80 00 0d be,a 4000c7c4 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== NOT EXECUTED 4000c794: 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 ); 4000c798: 7f ff d5 a8 call 40001e38 4000c79c: b0 10 20 00 clr %i0 4000c7a0: 81 c7 e0 08 ret 4000c7a4: 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 ) ) { 4000c7a8: 80 a0 c0 01 cmp %g3, %g1 4000c7ac: 22 80 00 2a be,a 4000c854 <_CORE_mutex_Seize_interrupt_trylock+0x110> 4000c7b0: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000c7b4: 81 c7 e0 08 ret 4000c7b8: 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++; 4000c7bc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000c7c0: 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++; 4000c7c4: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000c7c8: 12 bf ff f4 bne 4000c798 <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000c7cc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000c7d0: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 <== NOT EXECUTED current = executing->current_priority; 4000c7d4: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000c7d8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000c7dc: 02 80 00 2f be 4000c898 <_CORE_mutex_Seize_interrupt_trylock+0x154> <== NOT EXECUTED 4000c7e0: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000c7e4: 1a 80 00 11 bcc 4000c828 <_CORE_mutex_Seize_interrupt_trylock+0xe4> <== NOT EXECUTED 4000c7e8: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c7ec: 05 10 00 66 sethi %hi(0x40019800), %g2 <== NOT EXECUTED 4000c7f0: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 40019b10 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000c7f4: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000c7f8: c2 20 a3 10 st %g1, [ %g2 + 0x310 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000c7fc: 7f ff d5 8f call 40001e38 <== NOT EXECUTED 4000c800: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 4000c804: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 4000c808: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 4000c80c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c810: 7f ff ef 82 call 40008618 <_Thread_Change_priority> <== NOT EXECUTED 4000c814: b0 10 20 00 clr %i0 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000c818: 7f ff f0 fa call 40008c00 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000c81c: 01 00 00 00 nop <== NOT EXECUTED 4000c820: 81 c7 e0 08 ret <== NOT EXECUTED 4000c824: 81 e8 00 00 restore <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000c828: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4000c82c: 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; 4000c830: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000c834: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000c838: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4000c83c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c840: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000c844: 7f ff d5 7d call 40001e38 <== NOT EXECUTED 4000c848: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000c84c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c850: 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 ) { 4000c854: 80 a0 60 00 cmp %g1, 0 4000c858: 22 80 00 0a be,a 4000c880 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 4000c85c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000c860: 80 a0 60 01 cmp %g1, 1 4000c864: 12 bf ff d4 bne 4000c7b4 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000c868: 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; 4000c86c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 4000c870: 7f ff d5 72 call 40001e38 4000c874: b0 10 20 00 clr %i0 4000c878: 81 c7 e0 08 ret 4000c87c: 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++; 4000c880: 82 00 60 01 inc %g1 4000c884: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000c888: 7f ff d5 6c call 40001e38 4000c88c: b0 10 20 00 clr %i0 4000c890: 81 c7 e0 08 ret 4000c894: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000c898: 7f ff d5 68 call 40001e38 <== NOT EXECUTED 4000c89c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000c8a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c8a4: 81 e8 00 00 restore <== NOT EXECUTED 40007688 <_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 ) { 40007688: 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 ) { 4000768c: 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 ) { 40007690: 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 ) { 40007694: 80 a0 60 00 cmp %g1, 0 40007698: 02 80 00 07 be 400076b4 <_CORE_mutex_Surrender+0x2c> 4000769c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 400076a0: 03 10 00 66 sethi %hi(0x40019800), %g1 400076a4: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 40019bd0 <_Thread_Executing> 400076a8: 80 a2 00 02 cmp %o0, %g2 400076ac: 12 80 00 2e bne 40007764 <_CORE_mutex_Surrender+0xdc> 400076b0: 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 ) 400076b4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400076b8: 80 a0 60 00 cmp %g1, 0 400076bc: 02 80 00 22 be 40007744 <_CORE_mutex_Surrender+0xbc> 400076c0: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 400076c4: 80 a0 60 00 cmp %g1, 0 400076c8: 12 80 00 21 bne 4000774c <_CORE_mutex_Surrender+0xc4> 400076cc: 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; 400076d0: 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 ) || 400076d4: 80 a0 a0 02 cmp %g2, 2 400076d8: 02 80 00 31 be 4000779c <_CORE_mutex_Surrender+0x114> 400076dc: 80 a0 a0 03 cmp %g2, 3 400076e0: 22 80 00 30 be,a 400077a0 <_CORE_mutex_Surrender+0x118> 400076e4: 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; 400076e8: 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 ) || 400076ec: 80 a0 a0 02 cmp %g2, 2 400076f0: 02 80 00 1f be 4000776c <_CORE_mutex_Surrender+0xe4> 400076f4: c0 24 20 60 clr [ %l0 + 0x60 ] 400076f8: 80 a0 a0 03 cmp %g2, 3 400076fc: 22 80 00 1d be,a 40007770 <_CORE_mutex_Surrender+0xe8> 40007700: 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 ) ) ) { 40007704: 40 00 06 1a call 40008f6c <_Thread_queue_Dequeue> 40007708: 90 10 00 10 mov %l0, %o0 4000770c: 86 92 20 00 orcc %o0, 0, %g3 40007710: 02 80 00 37 be 400077ec <_CORE_mutex_Surrender+0x164> 40007714: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007718: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 4000771c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007720: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40007724: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 40007728: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 4000772c: 80 a0 a0 02 cmp %g2, 2 40007730: 02 80 00 2a be 400077d8 <_CORE_mutex_Surrender+0x150> 40007734: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 40007738: 80 a0 a0 03 cmp %g2, 3 4000773c: 22 80 00 1c be,a 400077ac <_CORE_mutex_Surrender+0x124> 40007740: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40007744: 81 c7 e0 08 ret 40007748: 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 ) { 4000774c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40007750: 80 a0 60 00 cmp %g1, 0 40007754: 02 bf ff fc be 40007744 <_CORE_mutex_Surrender+0xbc> 40007758: 80 a0 60 01 cmp %g1, 1 4000775c: 12 bf ff dd bne 400076d0 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 40007760: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40007764: 81 c7 e0 08 ret 40007768: 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 && 4000776c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007770: 80 a0 60 00 cmp %g1, 0 40007774: 12 bf ff e4 bne 40007704 <_CORE_mutex_Surrender+0x7c> 40007778: 01 00 00 00 nop 4000777c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40007780: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40007784: 80 a2 40 01 cmp %o1, %g1 40007788: 02 bf ff df be 40007704 <_CORE_mutex_Surrender+0x7c> 4000778c: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40007790: 40 00 03 a2 call 40008618 <_Thread_Change_priority> 40007794: 94 10 20 01 mov 1, %o2 ! 1 40007798: 30 bf ff db b,a 40007704 <_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--; 4000779c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400077a0: 82 00 7f ff add %g1, -1, %g1 400077a4: 10 bf ff d1 b 400076e8 <_CORE_mutex_Surrender+0x60> 400077a8: 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 < 400077ac: 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++; 400077b0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400077b4: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 400077b8: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 400077bc: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 400077c0: 1a bf ff e1 bcc 40007744 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED 400077c4: 94 10 20 00 clr %o2 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 400077c8: 40 00 03 94 call 40008618 <_Thread_Change_priority> <== NOT EXECUTED 400077cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400077d0: 81 c7 e0 08 ret <== NOT EXECUTED 400077d4: 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++; 400077d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400077dc: 82 00 60 01 inc %g1 400077e0: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 400077e4: 81 c7 e0 08 ret 400077e8: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 400077ec: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 400077f0: 81 c7 e0 08 ret 400077f4: 91 e8 20 00 restore %g0, 0, %o0 40025da8 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 40025da8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 40025dac: 7f ff 78 2c call 40003e5c <== NOT EXECUTED 40025db0: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40025db4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40025db8: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40025dbc: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40025dc0: 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; 40025dc4: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 40025dc8: 7f ff 78 29 call 40003e6c <== NOT EXECUTED 40025dcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40025dd0: 01 00 00 00 nop 4000c604 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000c604: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000c608: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 40019bd4 <_Debug_Level> <== NOT EXECUTED 4000c60c: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 4000c610: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000c614: 81 c3 e0 08 retl <== NOT EXECUTED 4000c618: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40006460 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40006460: 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 ]; 40006464: f2 06 21 5c ld [ %i0 + 0x15c ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40006468: 7f ff ee 70 call 40001e28 4000646c: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40006470: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 40006474: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40006478: 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 ) ) { 4000647c: 9a 88 c0 04 andcc %g3, %g4, %o5 40006480: 02 80 00 28 be 40006520 <_Event_Surrender+0xc0> 40006484: 03 10 00 66 sethi %hi(0x40019800), %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() && 40006488: c4 00 63 ac ld [ %g1 + 0x3ac ], %g2 ! 40019bac <_ISR_Nest_level> 4000648c: 80 a0 a0 00 cmp %g2, 0 40006490: 22 80 00 08 be,a 400064b0 <_Event_Surrender+0x50> 40006494: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40006498: 03 10 00 66 sethi %hi(0x40019800), %g1 4000649c: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 40019bd0 <_Thread_Executing> 400064a0: 80 a6 00 02 cmp %i0, %g2 400064a4: 02 80 00 2a be 4000654c <_Event_Surrender+0xec> 400064a8: 19 10 00 67 sethi %hi(0x40019c00), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400064ac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400064b0: 80 88 61 00 btst 0x100, %g1 400064b4: 02 80 00 19 be 40006518 <_Event_Surrender+0xb8> 400064b8: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400064bc: 02 80 00 04 be 400064cc <_Event_Surrender+0x6c> 400064c0: 80 8c 60 02 btst 2, %l1 400064c4: 02 80 00 15 be 40006518 <_Event_Surrender+0xb8> 400064c8: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400064cc: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400064d0: 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 ); 400064d4: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 400064d8: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400064dc: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400064e0: 7f ff ee 56 call 40001e38 400064e4: 90 10 00 10 mov %l0, %o0 400064e8: 7f ff ee 50 call 40001e28 400064ec: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400064f0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400064f4: 80 a0 60 02 cmp %g1, 2 400064f8: 02 80 00 0c be 40006528 <_Event_Surrender+0xc8> 400064fc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40006500: 90 10 00 10 mov %l0, %o0 40006504: 7f ff ee 4d call 40001e38 40006508: 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 ); 4000650c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006510: 40 00 08 bf call 4000880c <_Thread_Clear_state> 40006514: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40006518: 7f ff ee 48 call 40001e38 <== NOT EXECUTED 4000651c: 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 ); 40006520: 7f ff ee 46 call 40001e38 40006524: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40006528: 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 ); 4000652c: 7f ff ee 43 call 40001e38 40006530: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40006534: 40 00 0e b0 call 40009ff4 <_Watchdog_Remove> 40006538: 90 06 20 48 add %i0, 0x48, %o0 4000653c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40006540: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006544: 40 00 08 b2 call 4000880c <_Thread_Clear_state> 40006548: 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() && 4000654c: c2 03 21 e4 ld [ %o4 + 0x1e4 ], %g1 40006550: 80 a0 60 01 cmp %g1, 1 40006554: 02 80 00 07 be 40006570 <_Event_Surrender+0x110> 40006558: 80 a0 c0 0d cmp %g3, %o5 4000655c: c2 03 21 e4 ld [ %o4 + 0x1e4 ], %g1 40006560: 80 a0 60 02 cmp %g1, 2 40006564: 32 bf ff d3 bne,a 400064b0 <_Event_Surrender+0x50> 40006568: 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) ) { 4000656c: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 40006570: 02 80 00 04 be 40006580 <_Event_Surrender+0x120> 40006574: 80 8c 60 02 btst 2, %l1 40006578: 02 80 00 09 be 4000659c <_Event_Surrender+0x13c> <== NOT EXECUTED 4000657c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40006580: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40006584: 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 ); 40006588: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 4000658c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40006590: 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; 40006594: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40006598: c2 23 21 e4 st %g1, [ %o4 + 0x1e4 ] } _ISR_Enable( level ); 4000659c: 7f ff ee 27 call 40001e38 400065a0: 91 e8 00 10 restore %g0, %l0, %o0 400065a4: 01 00 00 00 nop 400065a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400065a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400065ac: 90 10 00 18 mov %i0, %o0 400065b0: 40 00 09 a2 call 40008c38 <_Thread_Get> 400065b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 400065b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065bc: 80 a0 60 00 cmp %g1, 0 400065c0: 12 80 00 19 bne 40006624 <_Event_Timeout+0x7c> 400065c4: 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 ); 400065c8: 7f ff ee 18 call 40001e28 400065cc: 01 00 00 00 nop 400065d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 400065d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400065d8: 80 a0 60 00 cmp %g1, 0 400065dc: 02 80 00 14 be 4000662c <_Event_Timeout+0x84> 400065e0: 03 10 00 66 sethi %hi(0x40019800), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400065e4: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 40019bd0 <_Thread_Executing> 400065e8: 80 a6 00 02 cmp %i0, %g2 400065ec: 02 80 00 18 be 4000664c <_Event_Timeout+0xa4> 400065f0: 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; 400065f4: 82 10 20 06 mov 6, %g1 400065f8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400065fc: 7f ff ee 0f call 40001e38 40006600: 90 10 00 03 mov %g3, %o0 40006604: 90 10 00 18 mov %i0, %o0 40006608: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000660c: 40 00 08 80 call 4000880c <_Thread_Clear_state> 40006610: 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; 40006614: 05 10 00 66 sethi %hi(0x40019800), %g2 40006618: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 40019b10 <_Thread_Dispatch_disable_level> 4000661c: 82 00 7f ff add %g1, -1, %g1 40006620: c2 20 a3 10 st %g1, [ %g2 + 0x310 ] 40006624: 81 c7 e0 08 ret 40006628: 81 e8 00 00 restore 4000662c: 05 10 00 66 sethi %hi(0x40019800), %g2 <== NOT EXECUTED 40006630: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 40019b10 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006634: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006638: c2 20 a3 10 st %g1, [ %g2 + 0x310 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4000663c: 7f ff ed ff call 40001e38 <== NOT EXECUTED 40006640: 01 00 00 00 nop <== NOT EXECUTED 40006644: 81 c7 e0 08 ret <== NOT EXECUTED 40006648: 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; 4000664c: 05 10 00 67 sethi %hi(0x40019c00), %g2 40006650: c2 00 a1 e4 ld [ %g2 + 0x1e4 ], %g1 ! 40019de4 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40006654: 80 a0 60 01 cmp %g1, 1 40006658: 38 bf ff e8 bgu,a 400065f8 <_Event_Timeout+0x50> 4000665c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40006660: 82 10 20 02 mov 2, %g1 40006664: c2 20 a1 e4 st %g1, [ %g2 + 0x1e4 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 40006668: 10 bf ff e4 b 400065f8 <_Event_Timeout+0x50> 4000666c: 82 10 20 06 mov 6, %g1 4000a90c <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000a90c: 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; 4000a910: 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); 4000a914: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 4000a918: 90 10 00 19 mov %i1, %o0 4000a91c: 92 10 00 16 mov %l6, %o1 4000a920: 40 00 01 82 call 4000af28 <_Heap_Calc_block_size> 4000a924: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 4000a928: ae 92 20 00 orcc %o0, 0, %l7 4000a92c: 02 80 00 69 be 4000aad0 <_Heap_Allocate_aligned+0x1c4> 4000a930: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 4000a934: 80 a6 a0 00 cmp %i2, 0 4000a938: 22 80 00 02 be,a 4000a940 <_Heap_Allocate_aligned+0x34> 4000a93c: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000a940: 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; 4000a944: 80 a5 40 11 cmp %l5, %l1 4000a948: 02 80 00 62 be 4000aad0 <_Heap_Allocate_aligned+0x1c4> 4000a94c: 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); 4000a950: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000a954: 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); 4000a958: 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; 4000a95c: 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. */ 4000a960: 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; 4000a964: 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. */ 4000a968: 18 80 00 22 bgu 4000a9f0 <_Heap_Allocate_aligned+0xe4> 4000a96c: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000a970: 40 00 3e 07 call 4001a18c <.urem> 4000a974: 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)); 4000a978: 92 10 00 16 mov %l6, %o1 4000a97c: b0 24 00 08 sub %l0, %o0, %i0 4000a980: 40 00 3e 03 call 4001a18c <.urem> 4000a984: 90 10 00 18 mov %i0, %o0 4000a988: a0 04 60 08 add %l1, 8, %l0 4000a98c: 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) { 4000a990: 80 a4 00 02 cmp %l0, %g2 4000a994: 38 80 00 18 bgu,a 4000a9f4 <_Heap_Allocate_aligned+0xe8> 4000a998: 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) { 4000a99c: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 4000a9a0: 82 20 80 10 sub %g2, %l0, %g1 4000a9a4: 80 a0 40 1d cmp %g1, %i5 4000a9a8: 1a 80 00 1e bcc 4000aa20 <_Heap_Allocate_aligned+0x114> 4000a9ac: 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) { 4000a9b0: 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; 4000a9b4: 90 10 00 10 mov %l0, %o0 4000a9b8: 92 10 00 1a mov %i2, %o1 4000a9bc: 80 a5 80 01 cmp %l6, %g1 4000a9c0: 18 80 00 17 bgu 4000aa1c <_Heap_Allocate_aligned+0x110> 4000a9c4: 84 10 00 10 mov %l0, %g2 4000a9c8: 40 00 3d f1 call 4001a18c <.urem> <== NOT EXECUTED 4000a9cc: 01 00 00 00 nop <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 4000a9d0: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED *value = r ? v - r + a : v; 4000a9d4: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 4000a9d8: 86 10 20 00 clr %g3 <== NOT EXECUTED 4000a9dc: 12 80 00 35 bne 4000aab0 <_Heap_Allocate_aligned+0x1a4> <== NOT EXECUTED 4000a9e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000a9e4: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 4000a9e8: 38 80 00 0d bgu,a 4000aa1c <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 4000a9ec: 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) 4000a9f0: 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; 4000a9f4: 80 a5 40 11 cmp %l5, %l1 4000a9f8: 12 bf ff d6 bne 4000a950 <_Heap_Allocate_aligned+0x44> 4000a9fc: a8 05 20 01 inc %l4 4000aa00: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 4000aa04: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 4000aa08: 80 a0 40 14 cmp %g1, %l4 4000aa0c: 2a 80 00 02 bcs,a 4000aa14 <_Heap_Allocate_aligned+0x108> 4000aa10: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 4000aa14: 81 c7 e0 08 ret 4000aa18: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000aa1c: 80 a6 20 00 cmp %i0, 0 4000aa20: 22 bf ff f5 be,a 4000a9f4 <_Heap_Allocate_aligned+0xe8> 4000aa24: 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; 4000aa28: 82 04 e0 08 add %l3, 8, %g1 4000aa2c: 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; 4000aa30: 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) { 4000aa34: 80 a0 80 1d cmp %g2, %i5 4000aa38: 2a 80 00 29 bcs,a 4000aadc <_Heap_Allocate_aligned+0x1d0> 4000aa3c: 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; 4000aa40: 82 10 a0 01 or %g2, 1, %g1 4000aa44: 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); 4000aa48: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 4000aa4c: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 4000aa50: 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 ); 4000aa54: 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; 4000aa58: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000aa5c: 82 10 60 01 or %g1, 1, %g1 4000aa60: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 4000aa64: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 4000aa68: 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; 4000aa6c: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 4000aa70: 80 a0 c0 01 cmp %g3, %g1 4000aa74: 1a 80 00 03 bcc 4000aa80 <_Heap_Allocate_aligned+0x174> 4000aa78: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 4000aa7c: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 4000aa80: 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; 4000aa84: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 4000aa88: 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; 4000aa8c: 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; 4000aa90: 86 00 e0 01 inc %g3 stats->allocs += 1; 4000aa94: 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; 4000aa98: 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; 4000aa9c: 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; 4000aaa0: 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; 4000aaa4: 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; 4000aaa8: 10 bf ff d7 b 4000aa04 <_Heap_Allocate_aligned+0xf8> 4000aaac: 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; 4000aab0: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 4000aab4: 90 20 40 04 sub %g1, %g4, %o0 <== NOT EXECUTED 4000aab8: 86 22 00 10 sub %o0, %l0, %g3 <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 4000aabc: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 4000aac0: 28 bf ff cd bleu,a 4000a9f4 <_Heap_Allocate_aligned+0xe8> <== NOT EXECUTED 4000aac4: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 4000aac8: 10 bf ff d5 b 4000aa1c <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 4000aacc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 4000aad0: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 4000aad4: 81 c7 e0 08 ret <== NOT EXECUTED 4000aad8: 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; 4000aadc: 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; 4000aae0: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 4000aae4: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 4000aae8: 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; 4000aaec: c6 20 a0 08 st %g3, [ %g2 + 8 ] 4000aaf0: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 4000aaf4: 10 bf ff d8 b 4000aa54 <_Heap_Allocate_aligned+0x148> 4000aaf8: 88 10 00 12 mov %l2, %g4 40030f9c <_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; 40030f9c: 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; 40030fa0: 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; 40030fa4: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 40030fa8: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 40030fac: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 40030fb0: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 40030fb4: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 40030fb8: 80 a0 40 0b cmp %g1, %o3 40030fbc: 02 80 00 26 be 40031054 <_Heap_Get_information+0xb8> 40030fc0: c0 22 60 10 clr [ %o1 + 0x10 ] 40030fc4: 10 80 00 0e b 40030ffc <_Heap_Get_information+0x60> 40030fc8: 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; 40030fcc: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 40030fd0: 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++; 40030fd4: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 40030fd8: 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++; 40030fdc: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 40030fe0: 80 a0 c0 04 cmp %g3, %g4 40030fe4: 1a 80 00 03 bcc 40030ff0 <_Heap_Get_information+0x54> 40030fe8: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 40030fec: 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 ) { 40030ff0: 80 a2 c0 0d cmp %o3, %o5 40030ff4: 02 80 00 18 be 40031054 <_Heap_Get_information+0xb8> 40030ff8: 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); 40030ffc: 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 ); 40031000: 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); 40031004: 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) ) { 40031008: 80 8b 20 01 btst 1, %o4 4003100c: 32 bf ff f0 bne,a 40030fcc <_Heap_Get_information+0x30> 40031010: 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++; 40031014: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 40031018: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 4003101c: 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++; 40031020: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 40031024: 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++; 40031028: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 4003102c: 80 a0 c0 04 cmp %g3, %g4 40031030: 1a 80 00 03 bcc 4003103c <_Heap_Get_information+0xa0> 40031034: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 40031038: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 4003103c: c2 03 40 00 ld [ %o5 ], %g1 40031040: 80 a0 40 04 cmp %g1, %g4 40031044: 02 bf ff ec be 40030ff4 <_Heap_Get_information+0x58> 40031048: 80 a2 c0 0d cmp %o3, %o5 4003104c: 81 c3 e0 08 retl <== NOT EXECUTED 40031050: 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; 40031054: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 40031058: 90 10 20 00 clr %o0 4003105c: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 40031060: 81 c3 e0 08 retl 40031064: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40017594 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40017594: 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; 40017598: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 4001759c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 400175a0: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 400175a4: 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); 400175a8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 400175ac: 7f ff f6 34 call 40014e7c <.urem> 400175b0: 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 ); 400175b4: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 400175b8: 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); 400175bc: 82 06 7f f8 add %i1, -8, %g1 400175c0: 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)) 400175c4: 80 a4 40 04 cmp %l1, %g4 400175c8: 84 60 3f ff subx %g0, -1, %g2 400175cc: 80 a0 c0 11 cmp %g3, %l1 400175d0: 82 60 3f ff subx %g0, -1, %g1 400175d4: 80 88 80 01 btst %g2, %g1 400175d8: 02 80 00 2f be 40017694 <_Heap_Resize_block+0x100> 400175dc: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400175e0: 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); 400175e4: 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 ); 400175e8: 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) || 400175ec: 80 a4 80 04 cmp %l2, %g4 400175f0: 84 60 3f ff subx %g0, -1, %g2 400175f4: 80 a0 c0 12 cmp %g3, %l2 400175f8: 82 60 3f ff subx %g0, -1, %g1 400175fc: 80 88 80 01 btst %g2, %g1 40017600: 02 80 00 25 be 40017694 <_Heap_Resize_block+0x100> 40017604: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40017608: c2 04 a0 04 ld [ %l2 + 4 ], %g1 4001760c: 80 88 60 01 btst 1, %g1 40017610: 02 80 00 21 be 40017694 <_Heap_Resize_block+0x100> 40017614: 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) || 40017618: 80 a0 c0 12 cmp %g3, %l2 4001761c: a8 10 20 01 mov 1, %l4 40017620: 02 80 00 04 be 40017630 <_Heap_Resize_block+0x9c> 40017624: 82 04 80 17 add %l2, %l7, %g1 40017628: c2 00 60 04 ld [ %g1 + 4 ], %g1 4001762c: 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) 40017630: 82 24 80 19 sub %l2, %i1, %g1 40017634: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 40017638: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 4001763c: 80 a0 40 1a cmp %g1, %i2 40017640: 1a 80 00 17 bcc 4001769c <_Heap_Resize_block+0x108> 40017644: 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 */ 40017648: 80 8d 20 ff btst 0xff, %l4 4001764c: 12 80 00 10 bne 4001768c <_Heap_Resize_block+0xf8> 40017650: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40017654: 92 10 00 15 mov %l5, %o1 40017658: 7f ff f6 09 call 40014e7c <.urem> 4001765c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40017660: 80 a2 20 00 cmp %o0, 0 40017664: 02 80 00 05 be 40017678 <_Heap_Resize_block+0xe4> 40017668: 80 a4 00 16 cmp %l0, %l6 4001766c: 82 04 00 15 add %l0, %l5, %g1 40017670: a0 20 40 08 sub %g1, %o0, %l0 40017674: 80 a4 00 16 cmp %l0, %l6 40017678: 0a 80 00 2e bcs 40017730 <_Heap_Resize_block+0x19c> 4001767c: 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) 40017680: 80 a5 c0 08 cmp %l7, %o0 40017684: 1a 80 00 32 bcc 4001774c <_Heap_Resize_block+0x1b8> 40017688: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 4001768c: 81 c7 e0 08 ret 40017690: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 40017694: 81 c7 e0 08 ret 40017698: 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; 4001769c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 400176a0: 92 10 00 15 mov %l5, %o1 400176a4: 7f ff f5 f6 call 40014e7c <.urem> 400176a8: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 400176ac: a0 a4 00 08 subcc %l0, %o0, %l0 400176b0: 22 80 00 1c be,a 40017720 <_Heap_Resize_block+0x18c> 400176b4: 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; 400176b8: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 400176bc: 80 a5 80 02 cmp %l6, %g2 400176c0: 18 80 00 1e bgu 40017738 <_Heap_Resize_block+0x1a4> 400176c4: 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) { 400176c8: 80 8d 20 ff btst 0xff, %l4 400176cc: 12 80 00 2a bne 40017774 <_Heap_Resize_block+0x1e0> 400176d0: 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; 400176d4: 82 10 80 1b or %g2, %i3, %g1 400176d8: 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 ); 400176dc: 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; 400176e0: 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; 400176e4: 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; 400176e8: 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; 400176ec: 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; 400176f0: 84 11 20 01 or %g4, 1, %g2 400176f4: 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; 400176f8: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 400176fc: da 20 e0 08 st %o5, [ %g3 + 8 ] 40017700: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 40017704: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 40017708: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4001770c: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 40017710: c6 23 60 0c st %g3, [ %o5 + 0xc ] 40017714: c6 23 20 08 st %g3, [ %o4 + 8 ] 40017718: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 4001771c: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 40017720: 82 00 60 01 inc %g1 40017724: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 40017728: 81 c7 e0 08 ret 4001772c: 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; 40017730: 10 bf ff d4 b 40017680 <_Heap_Resize_block+0xec> 40017734: 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) { 40017738: a0 a4 00 01 subcc %l0, %g1, %l0 4001773c: 12 bf ff e3 bne 400176c8 <_Heap_Resize_block+0x134> 40017740: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 40017744: 10 bf ff f7 b 40017720 <_Heap_Resize_block+0x18c> 40017748: 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 = 4001774c: 92 10 00 12 mov %l2, %o1 40017750: 7f ff c1 01 call 40007b54 <_Heap_Block_allocate> 40017754: 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; 40017758: 90 02 00 18 add %o0, %i0, %o0 4001775c: 90 12 00 1b or %o0, %i3, %o0 40017760: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 40017764: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40017768: 82 00 7f ff add %g1, -1, %g1 4001776c: 10 bf ff ec b 4001771c <_Heap_Resize_block+0x188> 40017770: 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) { 40017774: 38 bf ff eb bgu,a 40017720 <_Heap_Resize_block+0x18c> <== NOT EXECUTED 40017778: 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; 4001777c: 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 ); 40017780: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 40017784: 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; 40017788: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 4001778c: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40017790: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40017794: 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 */ 40017798: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4001779c: 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 */ 400177a0: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 400177a4: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 400177a8: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 400177ac: 7f ff d4 9a call 4000ca14 <_Heap_Free> <== NOT EXECUTED 400177b0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 400177b4: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 400177b8: 10 bf ff d9 b 4001771c <_Heap_Resize_block+0x188> <== NOT EXECUTED 400177bc: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 40010318 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 40010318: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4001031c: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 40010320: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 40010324: 06 80 00 8c bl 40010554 <_Heap_Walk+0x23c> 40010328: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4001032c: c2 04 60 04 ld [ %l1 + 4 ], %g1 40010330: 80 88 60 01 btst 1, %g1 40010334: 02 80 00 81 be 40010538 <_Heap_Walk+0x220> 40010338: 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) { 4001033c: c4 04 40 00 ld [ %l1 ], %g2 40010340: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40010344: 80 a0 80 01 cmp %g2, %g1 40010348: 02 80 00 08 be 40010368 <_Heap_Walk+0x50> 4001034c: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 40010350: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 40010354: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010358: 90 12 20 a0 or %o0, 0xa0, %o0 <== NOT EXECUTED 4001035c: 7f ff d9 d5 call 40006ab0 <== NOT EXECUTED 40010360: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 40010364: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 40010368: 22 80 00 63 be,a 400104f4 <_Heap_Walk+0x1dc> 4001036c: 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)) { 40010370: 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); 40010374: c8 04 60 04 ld [ %l1 + 4 ], %g4 40010378: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4001037c: 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 ); 40010380: a0 04 40 12 add %l1, %l2, %l0 40010384: 80 a4 00 01 cmp %l0, %g1 40010388: 84 60 3f ff subx %g0, -1, %g2 4001038c: 80 a0 c0 10 cmp %g3, %l0 40010390: 82 60 3f ff subx %g0, -1, %g1 40010394: 80 88 80 01 btst %g2, %g1 40010398: 02 80 00 77 be 40010574 <_Heap_Walk+0x25c> 4001039c: 03 10 00 72 sethi %hi(0x4001c800), %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); 400103a0: 05 10 00 75 sethi %hi(0x4001d400), %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"); 400103a4: ba 10 61 78 or %g1, 0x178, %i5 printk("PASS: %d !the_block not in the free list", source); 400103a8: ae 10 a1 60 or %g2, 0x160, %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); 400103ac: 03 10 00 75 sethi %hi(0x4001d400), %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); 400103b0: 05 10 00 75 sethi %hi(0x4001d400), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 400103b4: 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); 400103b8: b8 10 61 30 or %g1, 0x130, %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); 400103bc: b6 10 a1 00 or %g2, 0x100, %i3 400103c0: 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)) { 400103c4: c2 04 20 04 ld [ %l0 + 4 ], %g1 400103c8: 80 88 60 01 btst 1, %g1 400103cc: 12 80 00 20 bne 4001044c <_Heap_Walk+0x134> 400103d0: 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) { 400103d4: c2 04 00 00 ld [ %l0 ], %g1 400103d8: 80 a0 40 12 cmp %g1, %l2 400103dc: 02 80 00 07 be 400103f8 <_Heap_Walk+0xe0> 400103e0: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 400103e4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 400103e8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400103ec: 7f ff d9 b1 call 40006ab0 <== NOT EXECUTED 400103f0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 400103f4: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 400103f8: 32 80 00 0a bne,a 40010420 <_Heap_Walk+0x108> 400103fc: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 40010400: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40010404: 12 80 00 49 bne 40010528 <_Heap_Walk+0x210> <== NOT EXECUTED 40010408: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4001040c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40010410: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010414: 7f ff d9 a7 call 40006ab0 <== NOT EXECUTED 40010418: 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; 4001041c: 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) 40010420: 80 a0 40 11 cmp %g1, %l1 40010424: 02 80 00 0a be 4001044c <_Heap_Walk+0x134> 40010428: 80 a4 e0 00 cmp %l3, 0 4001042c: 80 a6 00 01 cmp %i0, %g1 40010430: 02 80 00 58 be 40010590 <_Heap_Walk+0x278> 40010434: 80 a0 40 11 cmp %g1, %l1 block = block->next; 40010438: 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) 4001043c: 80 a0 40 11 cmp %g1, %l1 40010440: 12 bf ff fc bne 40010430 <_Heap_Walk+0x118> 40010444: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 40010448: 80 a4 e0 00 cmp %l3, 0 4001044c: 32 80 00 58 bne,a 400105ac <_Heap_Walk+0x294> 40010450: 27 10 00 72 sethi %hi(0x4001c800), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 40010454: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40010458: 80 a0 40 12 cmp %g1, %l2 4001045c: 18 80 00 40 bgu 4001055c <_Heap_Walk+0x244> 40010460: 11 10 00 75 sethi %hi(0x4001d400), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 40010464: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 40010468: 40 00 27 49 call 4001a18c <.urem> 4001046c: 90 10 00 12 mov %l2, %o0 40010470: 80 a2 20 00 cmp %o0, 0 40010474: 12 80 00 15 bne 400104c8 <_Heap_Walk+0x1b0> 40010478: 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) 4001047c: 12 80 00 17 bne 400104d8 <_Heap_Walk+0x1c0> 40010480: 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 ) { 40010484: 02 80 00 1c be 400104f4 <_Heap_Walk+0x1dc> 40010488: 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); 4001048c: 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)) { 40010490: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40010494: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 40010498: a4 09 3f fe and %g4, -2, %l2 4001049c: a0 04 00 12 add %l0, %l2, %l0 400104a0: 80 a4 00 01 cmp %l0, %g1 400104a4: 84 60 3f ff subx %g0, -1, %g2 400104a8: 80 a0 c0 10 cmp %g3, %l0 400104ac: 82 60 3f ff subx %g0, -1, %g1 400104b0: 80 88 80 01 btst %g2, %g1 400104b4: 02 80 00 2f be 40010570 <_Heap_Walk+0x258> 400104b8: 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); 400104bc: a2 10 00 15 mov %l5, %l1 400104c0: 10 bf ff c1 b 400103c4 <_Heap_Walk+0xac> 400104c4: 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); 400104c8: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 400104cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400104d0: 7f ff d9 78 call 40006ab0 <== NOT EXECUTED 400104d4: 90 12 21 b8 or %o0, 0x1b8, %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", 400104d8: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 400104dc: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 400104e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400104e4: 90 12 21 e0 or %o0, 0x1e0, %o0 <== NOT EXECUTED 400104e8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 400104ec: 7f ff d9 71 call 40006ab0 <== NOT EXECUTED 400104f0: 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) { 400104f4: 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); 400104f8: c2 04 60 04 ld [ %l1 + 4 ], %g1 400104fc: 94 08 7f fe and %g1, -2, %o2 40010500: 80 a2 c0 0a cmp %o3, %o2 40010504: 02 80 00 07 be 40010520 <_Heap_Walk+0x208> 40010508: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 4001050c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010510: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 40010514: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40010518: 7f ff d9 66 call 40006ab0 <== NOT EXECUTED 4001051c: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 40010520: 81 c7 e0 08 ret 40010524: 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"); 40010528: 7f ff d9 62 call 40006ab0 <== NOT EXECUTED 4001052c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 40010530: 10 bf ff b8 b 40010410 <_Heap_Walk+0xf8> <== NOT EXECUTED 40010534: 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); 40010538: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 4001053c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010540: 90 12 20 68 or %o0, 0x68, %o0 <== NOT EXECUTED 40010544: 7f ff d9 5b call 40006ab0 <== NOT EXECUTED 40010548: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4001054c: 10 bf ff 7d b 40010340 <_Heap_Walk+0x28> <== NOT EXECUTED 40010550: 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; 40010554: 10 bf ff 76 b 4001032c <_Heap_Walk+0x14> <== NOT EXECUTED 40010558: 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); 4001055c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010560: 7f ff d9 54 call 40006ab0 <== NOT EXECUTED 40010564: 90 12 21 90 or %o0, 0x190, %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", 40010568: 10 bf ff dd b 400104dc <_Heap_Walk+0x1c4> <== NOT EXECUTED 4001056c: 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); 40010570: 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); 40010574: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40010578: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 4001057c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010580: 7f ff d9 4c call 40006ab0 <== NOT EXECUTED 40010584: 90 12 20 d8 or %o0, 0xd8, %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", 40010588: 10 bf ff d5 b 400104dc <_Heap_Walk+0x1c4> <== NOT EXECUTED 4001058c: 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) { 40010590: 02 bf ff ae be 40010448 <_Heap_Walk+0x130> <== NOT EXECUTED 40010594: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 40010598: 12 80 00 0a bne 400105c0 <_Heap_Walk+0x2a8> <== NOT EXECUTED 4001059c: 27 10 00 72 sethi %hi(0x4001c800), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 400105a0: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 400105a4: 7f ff d9 43 call 40006ab0 <== NOT EXECUTED 400105a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 400105ac: 90 14 e1 78 or %l3, 0x178, %o0 <== NOT EXECUTED 400105b0: 7f ff d9 40 call 40006ab0 <== NOT EXECUTED 400105b4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 400105b8: 10 bf ff a8 b 40010458 <_Heap_Walk+0x140> <== NOT EXECUTED 400105bc: 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"); 400105c0: 7f ff d9 3c call 40006ab0 <== NOT EXECUTED 400105c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 400105c8: 10 bf ff f7 b 400105a4 <_Heap_Walk+0x28c> <== NOT EXECUTED 400105cc: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40007cc4 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007cc4: 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 ) 40007cc8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007ccc: 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 ) 40007cd0: 80 a0 60 00 cmp %g1, 0 40007cd4: 02 80 00 1d be 40007d48 <_Objects_Allocate+0x84> 40007cd8: 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 ); 40007cdc: a2 04 20 20 add %l0, 0x20, %l1 40007ce0: 40 00 12 6e call 4000c698 <_Chain_Get> 40007ce4: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40007ce8: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40007cec: 80 a0 60 00 cmp %g1, 0 40007cf0: 02 80 00 16 be 40007d48 <_Objects_Allocate+0x84> 40007cf4: 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 ) { 40007cf8: 80 a2 20 00 cmp %o0, 0 40007cfc: 02 80 00 15 be 40007d50 <_Objects_Allocate+0x8c> 40007d00: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40007d04: c4 06 20 08 ld [ %i0 + 8 ], %g2 40007d08: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007d0c: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40007d10: 03 00 00 3f sethi %hi(0xfc00), %g1 40007d14: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007d18: 84 08 80 01 and %g2, %g1, %g2 40007d1c: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007d20: 40 00 33 ab call 40014bcc <.udiv> 40007d24: 90 20 80 08 sub %g2, %o0, %o0 40007d28: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 40007d2c: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40007d30: 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 ]--; 40007d34: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 40007d38: 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 ]--; 40007d3c: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 40007d40: 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 ]--; 40007d44: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 40007d48: 81 c7 e0 08 ret 40007d4c: 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 ); 40007d50: 40 00 00 14 call 40007da0 <_Objects_Extend_information> 40007d54: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40007d58: 40 00 12 50 call 4000c698 <_Chain_Get> 40007d5c: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40007d60: b0 92 20 00 orcc %o0, 0, %i0 40007d64: 32 bf ff e9 bne,a 40007d08 <_Objects_Allocate+0x44> 40007d68: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 40007d6c: 81 c7 e0 08 ret <== NOT EXECUTED 40007d70: 81 e8 00 00 restore <== NOT EXECUTED 40007da0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40007da0: 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; 40007da4: 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 ) 40007da8: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40007dac: 03 00 00 3f sethi %hi(0xfc00), %g1 40007db0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007db4: a8 08 80 01 and %g2, %g1, %l4 40007db8: 80 a5 40 14 cmp %l5, %l4 40007dbc: 1a 80 00 79 bcc 40007fa0 <_Objects_Extend_information+0x200> 40007dc0: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40007dc4: a6 10 00 14 mov %l4, %l3 40007dc8: a4 10 20 00 clr %l2 40007dcc: a2 10 20 00 clr %l1 40007dd0: ac 10 20 01 mov 1, %l6 40007dd4: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007dd8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40007ddc: 80 a0 60 00 cmp %g1, 0 40007de0: 12 80 00 8d bne 40008014 <_Objects_Extend_information+0x274> 40007de4: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40007de8: 90 02 00 14 add %o0, %l4, %o0 40007dec: 90 02 00 1d add %o0, %i5, %o0 40007df0: 40 00 08 f0 call 4000a1b0 <_Workspace_Allocate_or_fatal_error> 40007df4: 91 2a 20 02 sll %o0, 2, %o0 40007df8: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007dfc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007e00: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007e04: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007e08: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007e0c: 18 80 00 94 bgu 4000805c <_Objects_Extend_information+0x2bc> 40007e10: 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++ ) { 40007e14: 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, 40007e18: 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++ ) { 40007e1c: 02 80 00 08 be 40007e3c <_Objects_Extend_information+0x9c> 40007e20: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 40007e24: 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++ ) { 40007e28: 84 00 a0 01 inc %g2 40007e2c: 80 a0 80 14 cmp %g2, %l4 40007e30: 0a bf ff fd bcs 40007e24 <_Objects_Extend_information+0x84> 40007e34: c0 24 00 01 clr [ %l0 + %g1 ] 40007e38: 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; 40007e3c: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007e40: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007e44: 86 04 c0 01 add %l3, %g1, %g3 40007e48: 80 a4 c0 03 cmp %l3, %g3 40007e4c: 1a 80 00 0a bcc 40007e74 <_Objects_Extend_information+0xd4> 40007e50: c0 25 c0 15 clr [ %l7 + %l5 ] 40007e54: 83 2c e0 02 sll %l3, 2, %g1 40007e58: 84 04 00 01 add %l0, %g1, %g2 40007e5c: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 40007e60: 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++ ) { 40007e64: 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 ); 40007e68: 80 a0 40 03 cmp %g1, %g3 40007e6c: 0a bf ff fd bcs 40007e60 <_Objects_Extend_information+0xc0> 40007e70: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40007e74: 7f ff e7 ed call 40001e28 40007e78: 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( 40007e7c: c2 06 00 00 ld [ %i0 ], %g1 40007e80: 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; 40007e84: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007e88: 89 29 20 1b sll %g4, 0x1b, %g4 40007e8c: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40007e90: 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( 40007e94: 87 30 e0 10 srl %g3, 0x10, %g3 40007e98: 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; 40007e9c: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007ea0: 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; 40007ea4: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40007ea8: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40007eac: 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( 40007eb0: 82 10 40 04 or %g1, %g4, %g1 40007eb4: 82 10 40 03 or %g1, %g3, %g1 40007eb8: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007ebc: 7f ff e7 df call 40001e38 40007ec0: 01 00 00 00 nop if ( old_tables ) 40007ec4: 80 a4 20 00 cmp %l0, 0 40007ec8: 22 80 00 05 be,a 40007edc <_Objects_Extend_information+0x13c> 40007ecc: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 40007ed0: 40 00 08 aa call 4000a178 <_Workspace_Free> 40007ed4: 90 10 00 10 mov %l0, %o0 40007ed8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40007edc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40007ee0: 80 a0 60 00 cmp %g1, 0 40007ee4: 02 80 00 55 be 40008038 <_Objects_Extend_information+0x298> 40007ee8: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 40007eec: 90 10 00 10 mov %l0, %o0 40007ef0: 40 00 32 fd call 40014ae4 <.umul> 40007ef4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40007ef8: 40 00 08 a7 call 4000a194 <_Workspace_Allocate> 40007efc: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007f00: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40007f04: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007f08: d2 00 40 14 ld [ %g1 + %l4 ], %o1 40007f0c: 80 a2 60 00 cmp %o1, 0 40007f10: 02 80 00 64 be 400080a0 <_Objects_Extend_information+0x300> 40007f14: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007f18: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40007f1c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007f20: a0 10 00 13 mov %l3, %l0 40007f24: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007f28: 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( 40007f2c: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007f30: 40 00 11 ed call 4000c6e4 <_Chain_Initialize> 40007f34: 90 10 00 13 mov %l3, %o0 40007f38: 30 80 00 0c b,a 40007f68 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007f3c: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40007f40: 83 28 60 18 sll %g1, 0x18, %g1 40007f44: 85 28 a0 1b sll %g2, 0x1b, %g2 40007f48: 82 10 40 12 or %g1, %l2, %g1 40007f4c: 82 10 40 02 or %g1, %g2, %g1 40007f50: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007f54: 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( 40007f58: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40007f5c: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007f60: 7f ff fd 2f call 4000741c <_Chain_Append> 40007f64: 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 ) { 40007f68: 40 00 11 cc call 4000c698 <_Chain_Get> 40007f6c: 90 10 00 13 mov %l3, %o0 40007f70: 80 a2 20 00 cmp %o0, 0 40007f74: 32 bf ff f2 bne,a 40007f3c <_Objects_Extend_information+0x19c> 40007f78: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007f7c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40007f80: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 40007f84: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007f88: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 40007f8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007f90: 82 00 40 04 add %g1, %g4, %g1 40007f94: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40007f98: 81 c7 e0 08 ret 40007f9c: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40007fa0: 90 10 00 15 mov %l5, %o0 40007fa4: 40 00 33 0a call 40014bcc <.udiv> 40007fa8: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40007fac: a4 92 20 00 orcc %o0, 0, %l2 40007fb0: 02 80 00 3e be 400080a8 <_Objects_Extend_information+0x308> 40007fb4: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 40007fb8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 40007fbc: c2 00 80 00 ld [ %g2 ], %g1 40007fc0: 80 a0 60 00 cmp %g1, 0 40007fc4: 12 80 00 08 bne 40007fe4 <_Objects_Extend_information+0x244> 40007fc8: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40007fcc: 10 80 00 0c b 40007ffc <_Objects_Extend_information+0x25c> <== NOT EXECUTED 40007fd0: 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 ) 40007fd4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40007fd8: 80 a0 60 00 cmp %g1, 0 40007fdc: 02 80 00 08 be 40007ffc <_Objects_Extend_information+0x25c> 40007fe0: 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++ ) { 40007fe4: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40007fe8: 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++ ) { 40007fec: 80 a4 80 11 cmp %l2, %l1 40007ff0: 18 bf ff f9 bgu 40007fd4 <_Objects_Extend_information+0x234> 40007ff4: 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 ) { 40007ff8: 80 a4 c0 15 cmp %l3, %l5 40007ffc: 2a bf ff b9 bcs,a 40007ee0 <_Objects_Extend_information+0x140> 40008000: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40008004: ac 04 a0 01 add %l2, 1, %l6 40008008: 83 2d a0 01 sll %l6, 1, %g1 4000800c: 10 bf ff 73 b 40007dd8 <_Objects_Extend_information+0x38> 40008010: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 40008014: 90 02 00 14 add %o0, %l4, %o0 40008018: 90 02 00 1d add %o0, %i5, %o0 4000801c: 40 00 08 5e call 4000a194 <_Workspace_Allocate> 40008020: 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 ) 40008024: ae 92 20 00 orcc %o0, 0, %l7 40008028: 32 bf ff 76 bne,a 40007e00 <_Objects_Extend_information+0x60> 4000802c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008030: 81 c7 e0 08 ret <== NOT EXECUTED 40008034: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 40008038: 90 10 00 10 mov %l0, %o0 4000803c: 40 00 32 aa call 40014ae4 <.umul> 40008040: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40008044: 40 00 08 5b call 4000a1b0 <_Workspace_Allocate_or_fatal_error> 40008048: a9 2c 60 02 sll %l1, 2, %l4 4000804c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40008050: d0 24 00 14 st %o0, [ %l0 + %l4 ] 40008054: 10 bf ff b1 b 40007f18 <_Objects_Extend_information+0x178> 40008058: 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, 4000805c: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 40008060: ab 2c a0 02 sll %l2, 2, %l5 40008064: 90 10 00 17 mov %l7, %o0 40008068: 40 00 18 fb call 4000e454 4000806c: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008070: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40008074: 94 10 00 15 mov %l5, %o2 40008078: 40 00 18 f7 call 4000e454 4000807c: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40008080: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40008084: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40008088: 94 05 00 0a add %l4, %o2, %o2 4000808c: 90 10 00 10 mov %l0, %o0 40008090: 40 00 18 f1 call 4000e454 40008094: 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; 40008098: 10 bf ff 6a b 40007e40 <_Objects_Extend_information+0xa0> 4000809c: c0 25 80 15 clr [ %l6 + %l5 ] 400080a0: 81 c7 e0 08 ret <== NOT EXECUTED 400080a4: 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++ ) { 400080a8: 10 bf ff d4 b 40007ff8 <_Objects_Extend_information+0x258> <== NOT EXECUTED 400080ac: a2 10 20 00 clr %l1 <== NOT EXECUTED 40008160 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40008160: 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 ) 40008164: 82 06 3f ff add %i0, -1, %g1 40008168: 80 a0 60 03 cmp %g1, 3 4000816c: 38 80 00 1e bgu,a 400081e4 <_Objects_Get_information+0x84> 40008170: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40008174: 80 a6 60 00 cmp %i1, 0 40008178: 12 80 00 04 bne 40008188 <_Objects_Get_information+0x28> 4000817c: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 40008180: 81 c7 e0 08 ret 40008184: 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 ); 40008188: 40 00 12 9f call 4000cc04 <_Objects_API_maximum_class> 4000818c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40008190: 80 a2 20 00 cmp %o0, 0 40008194: 06 bf ff fb bl 40008180 <_Objects_Get_information+0x20> 40008198: 80 a2 00 19 cmp %o0, %i1 4000819c: 2a 80 00 12 bcs,a 400081e4 <_Objects_Get_information+0x84> 400081a0: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 400081a4: 85 2e 20 02 sll %i0, 2, %g2 400081a8: 03 10 00 66 sethi %hi(0x40019800), %g1 400081ac: 82 10 62 70 or %g1, 0x270, %g1 ! 40019a70 <_Objects_Information_table> 400081b0: c4 00 40 02 ld [ %g1 + %g2 ], %g2 400081b4: 80 a0 a0 00 cmp %g2, 0 400081b8: 02 80 00 0b be 400081e4 <_Objects_Get_information+0x84> 400081bc: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 400081c0: 83 2e 60 02 sll %i1, 2, %g1 400081c4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 400081c8: 80 a6 20 00 cmp %i0, 0 400081cc: 02 80 00 06 be 400081e4 <_Objects_Get_information+0x84> 400081d0: 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 ) 400081d4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400081d8: 80 a0 60 00 cmp %g1, 0 400081dc: 22 80 00 02 be,a 400081e4 <_Objects_Get_information+0x84> 400081e0: b0 10 20 00 clr %i0 return NULL; #endif return info; } 400081e4: 81 c7 e0 08 ret 400081e8: 81 e8 00 00 restore 400081ec <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 400081ec: 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; 400081f0: 03 00 00 3f sethi %hi(0xfc00), %g1 400081f4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 400081f8: 7f ff e7 0c call 40001e28 400081fc: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 40008200: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008204: 80 a6 40 01 cmp %i1, %g1 40008208: 18 80 00 0b bgu 40008234 <_Objects_Get_isr_disable+0x48> 4000820c: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 40008210: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40008214: f0 00 80 01 ld [ %g2 + %g1 ], %i0 40008218: 80 a6 20 00 cmp %i0, 0 4000821c: 02 80 00 0c be 4000824c <_Objects_Get_isr_disable+0x60> 40008220: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 40008224: 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; 40008228: c0 26 80 00 clr [ %i2 ] 4000822c: 81 c7 e0 08 ret 40008230: 81 e8 00 00 restore } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 40008234: 7f ff e7 01 call 40001e38 40008238: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 4000823c: 82 10 20 01 mov 1, %g1 40008240: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 40008244: 81 c7 e0 08 ret 40008248: 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 ); 4000824c: 7f ff e6 fb call 40001e38 <== NOT EXECUTED 40008250: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 40008254: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40008258: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 4000825c: 81 c7 e0 08 ret <== NOT EXECUTED 40008260: 81 e8 00 00 restore <== NOT EXECUTED 400186f8 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 400186f8: 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) 400186fc: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40018700: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 40018704: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40018708: 22 80 00 02 be,a 40018710 <_Objects_Get_next+0x18> <== NOT EXECUTED 4001870c: 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) 40018710: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40018714: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40018718: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 4001871c: 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); 40018720: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40018724: 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) 40018728: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001872c: 0a 80 00 0b bcs 40018758 <_Objects_Get_next+0x60> <== NOT EXECUTED 40018730: 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); 40018734: 7f ff d8 50 call 4000e874 <_Objects_Get> <== NOT EXECUTED 40018738: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 4001873c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40018740: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018744: 32 bf ff f6 bne,a 4001871c <_Objects_Get_next+0x24> <== NOT EXECUTED 40018748: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 4001874c: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40018750: 81 c7 e0 08 ret <== NOT EXECUTED 40018754: 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; 40018758: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001875c: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40018760: 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; 40018764: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40018768: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 4001876c: 81 c7 e0 08 ret <== NOT EXECUTED 40018770: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40009564 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40009564: 9d e3 bf 90 save %sp, -112, %sp 40009568: 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 ) 4000956c: 80 a6 60 00 cmp %i1, 0 40009570: 02 80 00 24 be 40009600 <_Objects_Id_to_name+0x9c> 40009574: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40009578: 80 a2 60 00 cmp %o1, 0 4000957c: 02 80 00 26 be 40009614 <_Objects_Id_to_name+0xb0> 40009580: 03 10 00 77 sethi %hi(0x4001dc00), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40009584: 83 32 60 18 srl %o1, 0x18, %g1 40009588: 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 ) 4000958c: 84 00 7f ff add %g1, -1, %g2 40009590: 80 a0 a0 03 cmp %g2, 3 40009594: 38 80 00 1b bgu,a 40009600 <_Objects_Id_to_name+0x9c> 40009598: 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 ] ) 4000959c: 85 28 60 02 sll %g1, 2, %g2 400095a0: 03 10 00 76 sethi %hi(0x4001d800), %g1 400095a4: 82 10 62 c0 or %g1, 0x2c0, %g1 ! 4001dac0 <_Objects_Information_table> 400095a8: c4 00 40 02 ld [ %g1 + %g2 ], %g2 400095ac: 80 a0 a0 00 cmp %g2, 0 400095b0: 02 80 00 16 be 40009608 <_Objects_Id_to_name+0xa4> 400095b4: 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 ]; 400095b8: 83 28 60 02 sll %g1, 2, %g1 400095bc: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 400095c0: 80 a2 20 00 cmp %o0, 0 400095c4: 02 80 00 0f be 40009600 <_Objects_Id_to_name+0x9c> 400095c8: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 400095cc: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 400095d0: 80 a0 60 00 cmp %g1, 0 400095d4: 12 80 00 0e bne 4000960c <_Objects_Id_to_name+0xa8> 400095d8: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 400095dc: 7f ff ff c5 call 400094f0 <_Objects_Get> 400095e0: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 400095e4: 80 a2 20 00 cmp %o0, 0 400095e8: 22 80 00 06 be,a 40009600 <_Objects_Id_to_name+0x9c> 400095ec: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 400095f0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 400095f4: b0 10 20 00 clr %i0 400095f8: 40 00 02 5b call 40009f64 <_Thread_Enable_dispatch> 400095fc: c2 26 40 00 st %g1, [ %i1 ] 40009600: 81 c7 e0 08 ret 40009604: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 40009608: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 4000960c: 81 c7 e0 08 ret <== NOT EXECUTED 40009610: 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; 40009614: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 40009618: 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); 4000961c: 83 32 60 18 srl %o1, 0x18, %g1 40009620: 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 ) 40009624: 84 00 7f ff add %g1, -1, %g2 40009628: 80 a0 a0 03 cmp %g2, 3 4000962c: 38 bf ff f5 bgu,a 40009600 <_Objects_Id_to_name+0x9c> 40009630: 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 ] ) 40009634: 10 bf ff db b 400095a0 <_Objects_Id_to_name+0x3c> 40009638: 85 28 60 02 sll %g1, 2, %g2 400083e4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 400083e4: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 400083e8: 80 a2 e0 00 cmp %o3, 0 400083ec: 02 80 00 20 be 4000846c <_Objects_Name_to_id_u32+0x88> 400083f0: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 400083f4: 80 a2 60 00 cmp %o1, 0 400083f8: 22 80 00 1d be,a 4000846c <_Objects_Name_to_id_u32+0x88> 400083fc: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40008400: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 40008404: 85 28 60 10 sll %g1, 0x10, %g2 40008408: 80 a0 a0 00 cmp %g2, 0 4000840c: 22 80 00 18 be,a 4000846c <_Objects_Name_to_id_u32+0x88> 40008410: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40008414: 80 a2 a0 00 cmp %o2, 0 40008418: 12 80 00 17 bne 40008474 <_Objects_Name_to_id_u32+0x90> 4000841c: 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++ ) { 40008420: 89 30 a0 10 srl %g2, 0x10, %g4 40008424: 80 a1 20 00 cmp %g4, 0 40008428: 02 80 00 11 be 4000846c <_Objects_Name_to_id_u32+0x88> 4000842c: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40008430: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 40008434: 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 ]; 40008438: 83 28 e0 02 sll %g3, 2, %g1 4000843c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 40008440: 80 a0 a0 00 cmp %g2, 0 40008444: 02 80 00 06 be 4000845c <_Objects_Name_to_id_u32+0x78> 40008448: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 4000844c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40008450: 80 a0 40 09 cmp %g1, %o1 40008454: 22 80 00 0f be,a 40008490 <_Objects_Name_to_id_u32+0xac> 40008458: 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++ ) { 4000845c: 80 a0 c0 04 cmp %g3, %g4 40008460: 08 bf ff f7 bleu 4000843c <_Objects_Name_to_id_u32+0x58> 40008464: 83 28 e0 02 sll %g3, 2, %g1 40008468: 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 } 4000846c: 81 c3 e0 08 retl 40008470: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40008474: 82 10 63 ff or %g1, 0x3ff, %g1 40008478: 80 a2 80 01 cmp %o2, %g1 4000847c: 02 bf ff e9 be 40008420 <_Objects_Name_to_id_u32+0x3c> 40008480: 80 a2 a0 01 cmp %o2, 1 40008484: 02 bf ff e7 be 40008420 <_Objects_Name_to_id_u32+0x3c> 40008488: 90 10 20 01 mov 1, %o0 4000848c: 30 bf ff f8 b,a 4000846c <_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; 40008490: 90 10 20 00 clr %o0 40008494: 81 c3 e0 08 retl 40008498: c2 22 c0 00 st %g1, [ %o3 ] 400083ac <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 400083ac: 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 ) 400083b0: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 400083b4: 80 a0 60 00 cmp %g1, 0 400083b8: 22 80 00 09 be,a 400083dc <_Objects_Namespace_remove+0x30> 400083bc: c0 26 60 0c clr [ %i1 + 0xc ] 400083c0: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 400083c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400083c8: 22 80 00 05 be,a 400083dc <_Objects_Namespace_remove+0x30> <== NOT EXECUTED 400083cc: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 400083d0: 40 00 07 6a call 4000a178 <_Workspace_Free> <== NOT EXECUTED 400083d4: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 400083d8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 400083dc: 81 c7 e0 08 ret 400083e0: 81 e8 00 00 restore 4000a0dc <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4000a0dc: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 4000a0e0: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 4000a0e4: 40 00 1d c8 call 40011804 4000a0e8: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 4000a0ec: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 4000a0f0: 80 a0 60 00 cmp %g1, 0 4000a0f4: 12 80 00 21 bne 4000a178 <_Objects_Set_name+0x9c> 4000a0f8: 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( 4000a0fc: 03 08 08 08 sethi %hi(0x20202000), %g1 4000a100: 80 a4 20 00 cmp %l0, 0 4000a104: 02 80 00 19 be 4000a168 <_Objects_Set_name+0x8c> 4000a108: 82 10 60 20 or %g1, 0x20, %g1 4000a10c: c4 4e 80 00 ldsb [ %i2 ], %g2 4000a110: 03 00 08 08 sethi %hi(0x202000), %g1 4000a114: 87 28 a0 18 sll %g2, 0x18, %g3 4000a118: 82 10 60 20 or %g1, 0x20, %g1 4000a11c: 80 a4 20 01 cmp %l0, 1 4000a120: 02 80 00 12 be 4000a168 <_Objects_Set_name+0x8c> 4000a124: 82 10 c0 01 or %g3, %g1, %g1 4000a128: c4 4e a0 01 ldsb [ %i2 + 1 ], %g2 4000a12c: 03 00 00 08 sethi %hi(0x2000), %g1 4000a130: 85 28 a0 10 sll %g2, 0x10, %g2 4000a134: 82 10 60 20 or %g1, 0x20, %g1 4000a138: 84 10 80 03 or %g2, %g3, %g2 4000a13c: 80 a4 20 02 cmp %l0, 2 4000a140: 02 80 00 0a be 4000a168 <_Objects_Set_name+0x8c> 4000a144: 82 10 80 01 or %g2, %g1, %g1 4000a148: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 4000a14c: 80 a4 20 03 cmp %l0, 3 4000a150: 83 28 60 08 sll %g1, 8, %g1 4000a154: 84 10 80 01 or %g2, %g1, %g2 4000a158: 02 80 00 04 be 4000a168 <_Objects_Set_name+0x8c> 4000a15c: 82 10 a0 20 or %g2, 0x20, %g1 4000a160: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 4000a164: 82 10 80 01 or %g2, %g1, %g1 4000a168: c2 26 60 0c st %g1, [ %i1 + 0xc ] 4000a16c: b0 10 20 01 mov 1, %i0 ); } return TRUE; } 4000a170: 81 c7 e0 08 ret 4000a174: 81 e8 00 00 restore length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 4000a178: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000a17c: 40 00 07 50 call 4000bebc <_Workspace_Allocate> <== NOT EXECUTED 4000a180: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 4000a184: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000a188: 02 bf ff fa be 4000a170 <_Objects_Set_name+0x94> <== NOT EXECUTED 4000a18c: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 4000a190: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 4000a194: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a198: 02 80 00 06 be 4000a1b0 <_Objects_Set_name+0xd4> <== NOT EXECUTED 4000a19c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 4000a1a0: 40 00 07 40 call 4000bea0 <_Workspace_Free> <== NOT EXECUTED 4000a1a4: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 4000a1a8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 4000a1ac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4000a1b0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000a1b4: 40 00 1d 5a call 4001171c <== NOT EXECUTED 4000a1b8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 4000a1bc: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 4000a1c0: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 4000a1c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a1c8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 400084a4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 400084a4: 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; 400084a8: 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; 400084ac: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 400084b0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 400084b4: 03 00 00 3f sethi %hi(0xfc00), %g1 400084b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400084bc: 92 10 00 10 mov %l0, %o1 400084c0: a4 08 80 01 and %g2, %g1, %l2 400084c4: 40 00 31 c2 call 40014bcc <.udiv> 400084c8: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 400084cc: 80 a2 20 00 cmp %o0, 0 400084d0: 02 80 00 12 be 40008518 <_Objects_Shrink_information+0x74> 400084d4: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400084d8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400084dc: c2 00 c0 00 ld [ %g3 ], %g1 400084e0: 80 a4 00 01 cmp %l0, %g1 400084e4: 12 80 00 09 bne 40008508 <_Objects_Shrink_information+0x64> 400084e8: a2 10 20 04 mov 4, %l1 400084ec: 10 80 00 0d b 40008520 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 400084f0: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400084f4: 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 ) { 400084f8: 80 a4 00 01 cmp %l0, %g1 400084fc: 02 80 00 09 be 40008520 <_Objects_Shrink_information+0x7c> 40008500: 82 04 60 04 add %l1, 4, %g1 40008504: 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++ ) { 40008508: 84 00 a0 01 inc %g2 4000850c: 80 a2 00 02 cmp %o0, %g2 40008510: 38 bf ff f9 bgu,a 400084f4 <_Objects_Shrink_information+0x50> 40008514: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 40008518: 81 c7 e0 08 ret 4000851c: 81 e8 00 00 restore 40008520: 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; 40008524: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40008528: 10 80 00 0f b 40008564 <_Objects_Shrink_information+0xc0> 4000852c: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40008530: 82 04 80 01 add %l2, %g1, %g1 40008534: 80 a0 40 03 cmp %g1, %g3 40008538: 08 80 00 10 bleu 40008578 <_Objects_Shrink_information+0xd4> 4000853c: 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 ); 40008540: 40 00 10 4c call 4000c670 <_Chain_Extract> 40008544: 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 ) ); 40008548: 80 a4 20 00 cmp %l0, 0 4000854c: 22 80 00 10 be,a 4000858c <_Objects_Shrink_information+0xe8> 40008550: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40008554: c2 04 00 00 ld [ %l0 ], %g1 40008558: 80 a0 60 00 cmp %g1, 0 4000855c: 02 80 00 0b be 40008588 <_Objects_Shrink_information+0xe4> 40008560: 84 10 00 10 mov %l0, %g2 40008564: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008568: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 4000856c: 80 a0 c0 12 cmp %g3, %l2 40008570: 3a bf ff f0 bcc,a 40008530 <_Objects_Shrink_information+0x8c> 40008574: 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; 40008578: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 4000857c: 80 a4 20 00 cmp %l0, 0 40008580: 32 bf ff f6 bne,a 40008558 <_Objects_Shrink_information+0xb4> 40008584: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40008588: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 4000858c: 40 00 06 fb call 4000a178 <_Workspace_Free> 40008590: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40008594: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40008598: 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; 4000859c: 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; 400085a0: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400085a4: 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; 400085a8: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400085ac: 82 20 40 02 sub %g1, %g2, %g1 400085b0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400085b4: 81 c7 e0 08 ret 400085b8: 81 e8 00 00 restore 400265a0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 400265a0: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 400265a4: 80 a6 20 00 cmp %i0, 0 400265a8: 02 80 00 10 be 400265e8 <_Protected_heap_Get_information+0x48> 400265ac: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 400265b0: 02 80 00 0e be 400265e8 <_Protected_heap_Get_information+0x48> 400265b4: 23 10 01 7f sethi %hi(0x4005fc00), %l1 return false; _RTEMS_Lock_allocator(); 400265b8: 7f ff 94 2a call 4000b660 <_API_Mutex_Lock> 400265bc: d0 04 63 48 ld [ %l1 + 0x348 ], %o0 ! 4005ff48 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 400265c0: 90 10 00 18 mov %i0, %o0 400265c4: 40 00 2a 76 call 40030f9c <_Heap_Get_information> 400265c8: 92 10 00 19 mov %i1, %o1 400265cc: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 400265d0: 7f ff 94 3a call 4000b6b8 <_API_Mutex_Unlock> 400265d4: d0 04 63 48 ld [ %l1 + 0x348 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 400265d8: 80 a0 00 10 cmp %g0, %l0 400265dc: 82 60 3f ff subx %g0, -1, %g1 400265e0: 81 c7 e0 08 ret 400265e4: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 400265e8: 81 c7 e0 08 ret <== NOT EXECUTED 400265ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000c420 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000c420: 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 ]; 4000c424: f0 06 21 5c ld [ %i0 + 0x15c ], %i0 if ( !api ) 4000c428: 80 a6 20 00 cmp %i0, 0 4000c42c: 02 80 00 1f be 4000c4a8 <_RTEMS_tasks_Post_switch_extension+0x88> 4000c430: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000c434: 7f ff d6 7d call 40001e28 4000c438: 01 00 00 00 nop signal_set = asr->signals_posted; 4000c43c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 asr->signals_posted = 0; 4000c440: c0 26 20 14 clr [ %i0 + 0x14 ] _ISR_Enable( level ); 4000c444: 7f ff d6 7d call 40001e38 4000c448: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000c44c: 80 a4 a0 00 cmp %l2, 0 4000c450: 32 80 00 04 bne,a 4000c460 <_RTEMS_tasks_Post_switch_extension+0x40> 4000c454: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000c458: 81 c7 e0 08 ret <== NOT EXECUTED 4000c45c: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c460: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c464: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c468: a2 07 bf f4 add %fp, -12, %l1 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c46c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c470: 94 10 00 11 mov %l1, %o2 4000c474: 21 00 00 3f sethi %hi(0xfc00), %l0 4000c478: 40 00 04 8a call 4000d6a0 4000c47c: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000c480: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000c484: 9f c0 40 00 call %g1 4000c488: 90 10 00 12 mov %l2, %o0 asr->nest_level -= 1; 4000c48c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c490: 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; 4000c494: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c498: 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; 4000c49c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c4a0: 40 00 04 80 call 4000d6a0 4000c4a4: 94 10 00 11 mov %l1, %o2 4000c4a8: 81 c7 e0 08 ret 4000c4ac: 81 e8 00 00 restore 40007fb8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40007fb8: 9d e3 bf 90 save %sp, -112, %sp 40007fbc: 11 10 00 79 sethi %hi(0x4001e400), %o0 40007fc0: 92 10 00 18 mov %i0, %o1 40007fc4: 90 12 20 7c or %o0, 0x7c, %o0 40007fc8: 40 00 07 f3 call 40009f94 <_Objects_Get> 40007fcc: 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 ) { 40007fd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007fd4: 80 a0 60 00 cmp %g1, 0 40007fd8: 12 80 00 11 bne 4000801c <_Rate_monotonic_Timeout+0x64> 40007fdc: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40007fe0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40007fe4: 03 00 00 10 sethi %hi(0x4000), %g1 40007fe8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40007fec: 80 88 80 01 btst %g2, %g1 40007ff0: 32 80 00 0d bne,a 40008024 <_Rate_monotonic_Timeout+0x6c> 40007ff4: 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 ) { 40007ff8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40007ffc: 80 a0 60 01 cmp %g1, 1 40008000: 02 80 00 12 be 40008048 <_Rate_monotonic_Timeout+0x90> 40008004: 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; 40008008: 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; 4000800c: 05 10 00 79 sethi %hi(0x4001e400), %g2 40008010: c2 00 a1 f0 ld [ %g2 + 0x1f0 ], %g1 ! 4001e5f0 <_Thread_Dispatch_disable_level> 40008014: 82 00 7f ff add %g1, -1, %g1 40008018: c2 20 a1 f0 st %g1, [ %g2 + 0x1f0 ] 4000801c: 81 c7 e0 08 ret 40008020: 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 ) && 40008024: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008028: 80 a0 80 01 cmp %g2, %g1 4000802c: 32 bf ff f4 bne,a 40007ffc <_Rate_monotonic_Timeout+0x44> 40008030: 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 ); 40008034: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40008038: 40 00 09 41 call 4000a53c <_Thread_Clear_state> 4000803c: 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 ); 40008040: 10 80 00 05 b 40008054 <_Rate_monotonic_Timeout+0x9c> 40008044: 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; 40008048: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 4000804c: 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; 40008050: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40008054: 7f ff fe 2e call 4000790c <_Rate_monotonic_Initiate_statistics> 40008058: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000805c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008060: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008064: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008068: 11 10 00 79 sethi %hi(0x4001e400), %o0 4000806c: 40 00 0f a8 call 4000bf0c <_Watchdog_Insert> 40008070: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 4001e6d0 <_Watchdog_Ticks_chain> 40008074: 30 bf ff e6 b,a 4000800c <_Rate_monotonic_Timeout+0x54> 4000899c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 4000899c: 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 ); 400089a0: 35 10 00 67 sethi %hi(0x40019c00), %i2 400089a4: 7f ff fc c8 call 40007cc4 <_Objects_Allocate> 400089a8: 90 16 a0 70 or %i2, 0x70, %o0 ! 40019c70 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400089ac: 37 10 00 66 sethi %hi(0x40019800), %i3 400089b0: c2 06 e3 10 ld [ %i3 + 0x310 ], %g1 ! 40019b10 <_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(); 400089b4: 39 10 00 67 sethi %hi(0x40019c00), %i4 400089b8: 82 00 60 01 inc %g1 400089bc: d0 27 20 bc st %o0, [ %i4 + 0xbc ] 400089c0: c2 26 e3 10 st %g1, [ %i3 + 0x310 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 400089c4: 33 10 00 66 sethi %hi(0x40019800), %i1 400089c8: c2 06 63 a8 ld [ %i1 + 0x3a8 ], %g1 ! 40019ba8 <_Configuration_Table> 400089cc: 05 10 00 63 sethi %hi(0x40018c00), %g2 400089d0: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 400089d4: d6 00 a0 f0 ld [ %g2 + 0xf0 ], %o3 400089d8: 03 10 00 60 sethi %hi(0x40018000), %g1 400089dc: 82 10 61 60 or %g1, 0x160, %g1 ! 40018160 <_Status_Object_name_errors_to_status+0x18> 400089e0: c2 27 bf f4 st %g1, [ %fp + -12 ] 400089e4: 80 a2 c0 03 cmp %o3, %g3 400089e8: 1a 80 00 03 bcc 400089f4 <_Thread_Create_idle+0x58> 400089ec: d2 07 20 bc ld [ %i4 + 0xbc ], %o1 400089f0: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 400089f4: 03 10 00 63 sethi %hi(0x40018c00), %g1 400089f8: da 08 60 f4 ldub [ %g1 + 0xf4 ], %o5 ! 40018cf4 400089fc: 84 07 bf f4 add %fp, -12, %g2 40008a00: 82 10 20 01 mov 1, %g1 40008a04: c0 23 a0 60 clr [ %sp + 0x60 ] 40008a08: c0 23 a0 64 clr [ %sp + 0x64 ] 40008a0c: c0 23 a0 68 clr [ %sp + 0x68 ] 40008a10: 90 16 a0 70 or %i2, 0x70, %o0 40008a14: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008a18: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 40008a1c: 94 10 20 00 clr %o2 40008a20: 40 00 00 b2 call 40008ce8 <_Thread_Initialize> 40008a24: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 40008a28: c4 06 63 a8 ld [ %i1 + 0x3a8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40008a2c: c2 06 e3 10 ld [ %i3 + 0x310 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008a30: c6 07 20 bc ld [ %i4 + 0xbc ], %g3 40008a34: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40008a38: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 40008a3c: c2 26 e3 10 st %g1, [ %i3 + 0x310 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008a40: 05 10 00 66 sethi %hi(0x40019800), %g2 40008a44: 03 10 00 66 sethi %hi(0x40019800), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40008a48: 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 = 40008a4c: c6 20 a3 d0 st %g3, [ %g2 + 0x3d0 ] 40008a50: c6 20 63 9c st %g3, [ %g1 + 0x39c ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40008a54: b2 10 20 00 clr %i1 40008a58: b6 10 20 00 clr %i3 40008a5c: 40 00 03 ab call 40009908 <_Thread_Start> 40008a60: 99 e8 20 00 restore %g0, 0, %o4 40008a64: 01 00 00 00 nop 40008c38 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40008c38: 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 ) ) { 40008c3c: 80 a2 20 00 cmp %o0, 0 40008c40: 02 80 00 1d be 40008cb4 <_Thread_Get+0x7c> 40008c44: 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); 40008c48: 83 32 20 18 srl %o0, 0x18, %g1 40008c4c: 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 ) 40008c50: 84 00 7f ff add %g1, -1, %g2 40008c54: 80 a0 a0 03 cmp %g2, 3 40008c58: 38 80 00 14 bgu,a 40008ca8 <_Thread_Get+0x70> 40008c5c: 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 :) */ 40008c60: 89 32 20 1b srl %o0, 0x1b, %g4 40008c64: 80 a1 20 01 cmp %g4, 1 40008c68: 12 80 00 0f bne 40008ca4 <_Thread_Get+0x6c> 40008c6c: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 40008c70: 03 10 00 66 sethi %hi(0x40019800), %g1 40008c74: 82 10 62 70 or %g1, 0x270, %g1 ! 40019a70 <_Objects_Information_table> 40008c78: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 40008c7c: 80 a0 60 00 cmp %g1, 0 40008c80: 22 80 00 17 be,a 40008cdc <_Thread_Get+0xa4> 40008c84: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 40008c88: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40008c8c: 80 a2 20 00 cmp %o0, 0 40008c90: 02 80 00 11 be 40008cd4 <_Thread_Get+0x9c> 40008c94: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008c98: 82 13 c0 00 mov %o7, %g1 40008c9c: 7f ff fd 72 call 40008264 <_Objects_Get> 40008ca0: 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; 40008ca4: 82 10 20 01 mov 1, %g1 40008ca8: 90 10 20 00 clr %o0 40008cac: 81 c3 e0 08 retl 40008cb0: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008cb4: 03 10 00 66 sethi %hi(0x40019800), %g1 40008cb8: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 40019b10 <_Thread_Dispatch_disable_level> 40008cbc: 84 00 a0 01 inc %g2 40008cc0: c4 20 63 10 st %g2, [ %g1 + 0x310 ] 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; 40008cc4: 03 10 00 66 sethi %hi(0x40019800), %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; 40008cc8: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40008ccc: 81 c3 e0 08 retl 40008cd0: d0 00 63 d0 ld [ %g1 + 0x3d0 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 40008cd4: 81 c3 e0 08 retl <== NOT EXECUTED 40008cd8: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 40008cdc: 81 c3 e0 08 retl 40008ce0: 90 10 20 00 clr %o0 4000da54 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000da54: 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; 4000da58: 03 10 00 66 sethi %hi(0x40019800), %g1 4000da5c: e2 00 63 d0 ld [ %g1 + 0x3d0 ], %l1 ! 40019bd0 <_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(); 4000da60: 3f 10 00 36 sethi %hi(0x4000d800), %i7 4000da64: be 17 e2 54 or %i7, 0x254, %i7 ! 4000da54 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000da68: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000da6c: 7f ff d0 f3 call 40001e38 4000da70: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000da74: 05 10 00 65 sethi %hi(0x40019400), %g2 doneConstructors = 1; 4000da78: 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; 4000da7c: e0 08 a3 c8 ldub [ %g2 + 0x3c8 ], %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 ); 4000da80: 90 10 00 11 mov %l1, %o0 4000da84: 7f ff f0 5f call 40009c00 <_User_extensions_Thread_begin> 4000da88: c2 28 a3 c8 stb %g1, [ %g2 + 0x3c8 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000da8c: 7f ff ec 5d call 40008c00 <_Thread_Enable_dispatch> 4000da90: 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) */ 4000da94: 80 a4 20 00 cmp %l0, 0 4000da98: 02 80 00 1e be 4000db10 <_Thread_Handler+0xbc> 4000da9c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000daa0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000daa4: 80 a0 60 01 cmp %g1, 1 4000daa8: 22 80 00 21 be,a 4000db2c <_Thread_Handler+0xd8> 4000daac: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000dab0: 80 a0 60 01 cmp %g1, 1 4000dab4: 1a 80 00 0c bcc 4000dae4 <_Thread_Handler+0x90> 4000dab8: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000dabc: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000dac0: 9f c0 40 00 call %g1 4000dac4: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 4000dac8: 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 ); 4000dacc: 7f ff f0 61 call 40009c50 <_User_extensions_Thread_exitted> 4000dad0: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000dad4: 90 10 20 00 clr %o0 4000dad8: 92 10 20 01 mov 1, %o1 4000dadc: 7f ff e8 4a call 40007c04 <_Internal_error_Occurred> 4000dae0: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000dae4: 22 80 00 16 be,a 4000db3c <_Thread_Handler+0xe8> <== NOT EXECUTED 4000dae8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000daec: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000daf0: 12 bf ff f7 bne 4000dacc <_Thread_Handler+0x78> <== NOT EXECUTED 4000daf4: 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 = 4000daf8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000dafc: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000db00: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000db04: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000db08: 10 bf ff f1 b 4000dacc <_Thread_Handler+0x78> <== NOT EXECUTED 4000db0c: 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 (); 4000db10: 40 00 2c 40 call 40018c10 <_init> 4000db14: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000db18: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000db1c: 80 a0 60 01 cmp %g1, 1 4000db20: 12 bf ff e5 bne 4000dab4 <_Thread_Handler+0x60> 4000db24: 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 = 4000db28: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000db2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000db30: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000db34: 10 bf ff e6 b 4000dacc <_Thread_Handler+0x78> <== NOT EXECUTED 4000db38: 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 = 4000db3c: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000db40: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000db44: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED 4000db48: 10 bf ff e1 b 4000dacc <_Thread_Handler+0x78> <== NOT EXECUTED 4000db4c: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED 40008ce8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008ce8: 9d e3 bf 98 save %sp, -104, %sp 40008cec: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008cf0: 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 ) { 40008cf4: e6 00 40 00 ld [ %g1 ], %l3 40008cf8: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008cfc: 02 80 00 51 be 40008e40 <_Thread_Initialize+0x158> 40008d00: 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; 40008d04: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40008d08: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008d0c: 21 10 00 66 sethi %hi(0x40019800), %l0 40008d10: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 ! 40019bb0 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40008d14: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40008d18: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40008d1c: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40008d20: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40008d24: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40008d28: c0 26 60 6c clr [ %i1 + 0x6c ] 40008d2c: 80 a0 60 00 cmp %g1, 0 40008d30: 12 80 00 32 bne 40008df8 <_Thread_Initialize+0x110> 40008d34: c0 26 61 58 clr [ %i1 + 0x158 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 40008d38: c0 26 61 68 clr [ %i1 + 0x168 ] 40008d3c: 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; 40008d40: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40008d44: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40008d48: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 40008d4c: 80 a4 a0 02 cmp %l2, 2 40008d50: 12 80 00 05 bne 40008d64 <_Thread_Initialize+0x7c> 40008d54: 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; 40008d58: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 40008d5c: c4 00 62 68 ld [ %g1 + 0x268 ], %g2 ! 40019a68 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40008d60: 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; 40008d64: 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 ); 40008d68: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40008d6c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40008d70: 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 ); 40008d74: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40008d78: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 40008d7c: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40008d80: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40008d84: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40008d88: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40008d8c: 40 00 02 02 call 40009594 <_Thread_Set_priority> 40008d90: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40008d94: c4 06 60 08 ld [ %i1 + 8 ], %g2 40008d98: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008d9c: 03 00 00 3f sethi %hi(0xfc00), %g1 40008da0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008da4: 84 08 80 01 and %g2, %g1, %g2 40008da8: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40008dac: 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; 40008db0: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40008db4: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40008db8: 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 ); 40008dbc: 90 10 00 19 mov %i1, %o0 40008dc0: 40 00 03 cc call 40009cf0 <_User_extensions_Thread_create> 40008dc4: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 40008dc8: 80 8a 20 ff btst 0xff, %o0 40008dcc: 12 80 00 09 bne 40008df0 <_Thread_Initialize+0x108> 40008dd0: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40008dd4: 02 80 00 05 be 40008de8 <_Thread_Initialize+0x100> <== NOT EXECUTED 40008dd8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 40008ddc: 40 00 04 e7 call 4000a178 <_Workspace_Free> <== NOT EXECUTED 40008de0: 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 ); 40008de4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008de8: 40 00 02 a7 call 40009884 <_Thread_Stack_Free> <== NOT EXECUTED 40008dec: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40008df0: 81 c7 e0 08 ret 40008df4: 81 e8 00 00 restore /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 40008df8: 90 00 60 01 add %g1, 1, %o0 40008dfc: 40 00 04 e6 call 4000a194 <_Workspace_Allocate> 40008e00: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40008e04: b6 92 20 00 orcc %o0, 0, %i3 40008e08: 02 80 00 19 be 40008e6c <_Thread_Initialize+0x184> 40008e0c: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008e10: 88 80 60 01 addcc %g1, 1, %g4 40008e14: 02 bf ff cb be 40008d40 <_Thread_Initialize+0x58> 40008e18: f6 26 61 68 st %i3, [ %i1 + 0x168 ] 40008e1c: 84 10 20 00 clr %g2 40008e20: 86 10 00 1b mov %i3, %g3 the_thread->extensions[i] = NULL; 40008e24: 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++ ) 40008e28: 84 00 a0 01 inc %g2 40008e2c: 80 a0 80 04 cmp %g2, %g4 40008e30: 0a bf ff fd bcs 40008e24 <_Thread_Initialize+0x13c> 40008e34: 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; 40008e38: 10 bf ff c3 b 40008d44 <_Thread_Initialize+0x5c> 40008e3c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40008e40: 90 10 00 19 mov %i1, %o0 40008e44: 40 00 02 74 call 40009814 <_Thread_Stack_Allocate> 40008e48: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40008e4c: 80 a2 20 00 cmp %o0, 0 40008e50: 02 80 00 09 be 40008e74 <_Thread_Initialize+0x18c> 40008e54: 80 a6 c0 08 cmp %i3, %o0 40008e58: 18 80 00 07 bgu 40008e74 <_Thread_Initialize+0x18c> 40008e5c: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40008e60: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40008e64: 10 bf ff aa b 40008d0c <_Thread_Initialize+0x24> 40008e68: 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 ); 40008e6c: 40 00 02 86 call 40009884 <_Thread_Stack_Free> <== NOT EXECUTED 40008e70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008e74: 81 c7 e0 08 ret 40008e78: 91 e8 20 00 restore %g0, 0, %o0 4000ddb4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000ddb4: 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; 4000ddb8: 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; 4000ddbc: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000ddc0: 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; 4000ddc4: 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; 4000ddc8: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000ddcc: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000ddd0: 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; 4000ddd4: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000ddd8: 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 ) ) { 4000dddc: 7f ff f0 74 call 40009fac <_Thread_queue_Extract_with_proxy> 4000dde0: 90 10 00 18 mov %i0, %o0 4000dde4: 80 8a 20 ff btst 0xff, %o0 4000dde8: 32 80 00 07 bne,a 4000de04 <_Thread_Reset+0x50> 4000ddec: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000ddf0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000ddf4: 80 a0 60 02 cmp %g1, 2 4000ddf8: 02 80 00 0c be 4000de28 <_Thread_Reset+0x74> 4000ddfc: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000de00: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 4000de04: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000de08: 80 a0 40 19 cmp %g1, %i1 4000de0c: 02 80 00 05 be 4000de20 <_Thread_Reset+0x6c> 4000de10: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000de14: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000de18: 7f ff f0 e4 call 4000a1a8 <_Thread_Set_priority> 4000de1c: 81 e8 00 00 restore 4000de20: 81 c7 e0 08 ret 4000de24: 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 ); 4000de28: 7f ff f3 8d call 4000ac5c <_Watchdog_Remove> <== NOT EXECUTED 4000de2c: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000de30: 10 bf ff f5 b 4000de04 <_Thread_Reset+0x50> <== NOT EXECUTED 4000de34: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000d088 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000d088: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000d08c: 03 10 00 66 sethi %hi(0x40019800), %g1 4000d090: e0 00 63 d0 ld [ %g1 + 0x3d0 ], %l0 ! 40019bd0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000d094: 7f ff d3 65 call 40001e28 4000d098: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000d09c: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000d0a0: c4 04 40 00 ld [ %l1 ], %g2 4000d0a4: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000d0a8: 80 a0 80 01 cmp %g2, %g1 4000d0ac: 02 80 00 18 be 4000d10c <_Thread_Reset_timeslice+0x84> 4000d0b0: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d0b4: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000d0b8: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000d0bc: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d0c0: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d0c4: 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; 4000d0c8: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000d0cc: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d0d0: 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; 4000d0d4: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000d0d8: 7f ff d3 58 call 40001e38 4000d0dc: 01 00 00 00 nop 4000d0e0: 7f ff d3 52 call 40001e28 4000d0e4: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000d0e8: 07 10 00 66 sethi %hi(0x40019800), %g3 4000d0ec: c2 00 e3 9c ld [ %g3 + 0x39c ], %g1 ! 40019b9c <_Thread_Heir> 4000d0f0: 80 a4 00 01 cmp %l0, %g1 4000d0f4: 02 80 00 08 be 4000d114 <_Thread_Reset_timeslice+0x8c> 4000d0f8: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 4000d0fc: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000d100: c4 28 63 e0 stb %g2, [ %g1 + 0x3e0 ] ! 40019be0 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000d104: 7f ff d3 4d call 40001e38 <== NOT EXECUTED 4000d108: 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 ); 4000d10c: 7f ff d3 4b call 40001e38 4000d110: 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; 4000d114: c2 04 40 00 ld [ %l1 ], %g1 4000d118: c2 20 e3 9c st %g1, [ %g3 + 0x39c ] _Context_Switch_necessary = TRUE; 4000d11c: 03 10 00 66 sethi %hi(0x40019800), %g1 4000d120: c4 28 63 e0 stb %g2, [ %g1 + 0x3e0 ] ! 40019be0 <_Context_Switch_necessary> _ISR_Enable( level ); 4000d124: 7f ff d3 45 call 40001e38 4000d128: 81 e8 00 00 restore 4000d12c: 01 00 00 00 nop 4000aedc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4000aedc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000aee0: 7f ff de ef call 40002a9c 4000aee4: 01 00 00 00 nop 4000aee8: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000aeec: 80 8e 60 ff btst 0xff, %i1 4000aef0: 22 80 00 0d be,a 4000af24 <_Thread_Resume+0x48> 4000aef4: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 4000aef8: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 4000aefc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 4000af00: 80 88 60 02 btst 2, %g1 4000af04: 02 80 00 06 be 4000af1c <_Thread_Resume+0x40> 4000af08: 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); 4000af0c: 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 ) ) { 4000af10: 80 a0 60 00 cmp %g1, 0 4000af14: 02 80 00 0a be 4000af3c <_Thread_Resume+0x60> 4000af18: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 4000af1c: 7f ff de e4 call 40002aac 4000af20: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 4000af24: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000af28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000af2c: 02 bf ff f4 be 4000aefc <_Thread_Resume+0x20> <== NOT EXECUTED 4000af30: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 4000af34: 7f ff de de call 40002aac <== NOT EXECUTED 4000af38: 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; 4000af3c: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 4000af40: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 4000af44: 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); 4000af48: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 4000af4c: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000af50: 1b 10 00 98 sethi %hi(0x40026000), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000af54: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000af58: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000af5c: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 4000af60: c2 26 00 00 st %g1, [ %i0 ] 4000af64: c4 13 60 54 lduh [ %o5 + 0x54 ], %g2 old_last_node = the_chain->last; 4000af68: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 4000af6c: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000af70: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000af74: c8 26 20 04 st %g4, [ %i0 + 4 ] 4000af78: c4 33 60 54 sth %g2, [ %o5 + 0x54 ] 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; 4000af7c: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 4000af80: 7f ff de cb call 40002aac 4000af84: 90 10 00 10 mov %l0, %o0 4000af88: 7f ff de c5 call 40002a9c 4000af8c: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000af90: 09 10 00 98 sethi %hi(0x40026000), %g4 4000af94: c4 01 20 2c ld [ %g4 + 0x2c ], %g2 ! 4002602c <_Thread_Heir> 4000af98: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000af9c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 4000afa0: 80 a0 c0 01 cmp %g3, %g1 4000afa4: 1a bf ff de bcc 4000af1c <_Thread_Resume+0x40> 4000afa8: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000afac: 03 10 00 98 sethi %hi(0x40026000), %g1 4000afb0: c4 00 60 60 ld [ %g1 + 0x60 ], %g2 ! 40026060 <_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; 4000afb4: f0 21 20 2c st %i0, [ %g4 + 0x2c ] if ( _Thread_Executing->is_preemptible || 4000afb8: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 4000afbc: 80 a0 60 00 cmp %g1, 0 4000afc0: 02 80 00 06 be 4000afd8 <_Thread_Resume+0xfc> 4000afc4: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000afc8: 84 10 20 01 mov 1, %g2 4000afcc: 03 10 00 98 sethi %hi(0x40026000), %g1 4000afd0: c4 28 60 70 stb %g2, [ %g1 + 0x70 ] ! 40026070 <_Context_Switch_necessary> 4000afd4: 30 bf ff d2 b,a 4000af1c <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000afd8: 12 bf ff d1 bne 4000af1c <_Thread_Resume+0x40> 4000afdc: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000afe0: 10 bf ff fc b 4000afd0 <_Thread_Resume+0xf4> <== NOT EXECUTED 4000afe4: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 40009814 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 40009814: 9d e3 bf 98 save %sp, -104, %sp 40009818: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000981c: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 ! 40018cf0 40009820: 80 a6 40 01 cmp %i1, %g1 40009824: 2a 80 00 02 bcs,a 4000982c <_Thread_Stack_Allocate+0x18> 40009828: 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 ) { 4000982c: 03 10 00 66 sethi %hi(0x40019800), %g1 40009830: c4 00 63 a8 ld [ %g1 + 0x3a8 ], %g2 ! 40019ba8 <_Configuration_Table> 40009834: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 40009838: 80 a0 60 00 cmp %g1, 0 4000983c: 22 80 00 0a be,a 40009864 <_Thread_Stack_Allocate+0x50> 40009840: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 40009844: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009848: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000984c: 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 ) 40009850: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40009854: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40009858: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 4000985c: 81 c7 e0 08 ret <== NOT EXECUTED 40009860: 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 ); 40009864: 40 00 02 4c call 4000a194 <_Workspace_Allocate> 40009868: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000986c: 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 ) 40009870: 80 a0 00 08 cmp %g0, %o0 40009874: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40009878: b0 0e 40 18 and %i1, %i0, %i0 4000987c: 81 c7 e0 08 ret 40009880: 81 e8 00 00 restore 40009884 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 40009884: 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 ) 40009888: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 4000988c: 80 a0 60 00 cmp %g1, 0 40009890: 02 80 00 09 be 400098b4 <_Thread_Stack_Free+0x30> 40009894: 03 10 00 66 sethi %hi(0x40019800), %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 ) 40009898: c4 00 63 a8 ld [ %g1 + 0x3a8 ], %g2 ! 40019ba8 <_Configuration_Table> 4000989c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 400098a0: 80 a0 60 00 cmp %g1, 0 400098a4: 22 80 00 06 be,a 400098bc <_Thread_Stack_Free+0x38> 400098a8: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 400098ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400098b0: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400098b4: 81 c7 e0 08 ret <== NOT EXECUTED 400098b8: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 400098bc: 40 00 02 2f call 4000a178 <_Workspace_Free> 400098c0: 81 e8 00 00 restore 400098c4: 01 00 00 00 nop 40009954 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 40009954: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 40009958: 03 10 00 66 sethi %hi(0x40019800), %g1 4000995c: e0 00 63 d0 ld [ %g1 + 0x3d0 ], %l0 ! 40019bd0 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 40009960: c4 0c 20 76 ldub [ %l0 + 0x76 ], %g2 40009964: 80 a0 a0 00 cmp %g2, 0 40009968: 02 80 00 23 be 400099f4 <_Thread_Tickle_timeslice+0xa0> 4000996c: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 40009970: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40009974: 80 a0 60 00 cmp %g1, 0 40009978: 12 80 00 1f bne 400099f4 <_Thread_Tickle_timeslice+0xa0> 4000997c: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 40009980: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40009984: 80 a0 60 01 cmp %g1, 1 40009988: 0a 80 00 07 bcs 400099a4 <_Thread_Tickle_timeslice+0x50> 4000998c: 80 a0 60 02 cmp %g1, 2 40009990: 28 80 00 10 bleu,a 400099d0 <_Thread_Tickle_timeslice+0x7c> 40009994: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 40009998: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000999c: 22 80 00 04 be,a 400099ac <_Thread_Tickle_timeslice+0x58> <== NOT EXECUTED 400099a0: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED 400099a4: 81 c7 e0 08 ret 400099a8: 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 ) 400099ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400099b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400099b4: 12 bf ff fc bne 400099a4 <_Thread_Tickle_timeslice+0x50> <== NOT EXECUTED 400099b8: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 400099bc: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 400099c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400099c4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400099c8: 81 c7 e0 08 ret <== NOT EXECUTED 400099cc: 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 ) { 400099d0: 82 00 7f ff add %g1, -1, %g1 400099d4: 80 a0 60 00 cmp %g1, 0 400099d8: 14 bf ff f3 bg 400099a4 <_Thread_Tickle_timeslice+0x50> 400099dc: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 400099e0: 40 00 0d aa call 4000d088 <_Thread_Reset_timeslice> 400099e4: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 400099e8: 03 10 00 66 sethi %hi(0x40019800), %g1 400099ec: c4 00 62 68 ld [ %g1 + 0x268 ], %g2 ! 40019a68 <_Thread_Ticks_per_timeslice> 400099f0: c4 24 20 78 st %g2, [ %l0 + 0x78 ] 400099f4: 81 c7 e0 08 ret 400099f8: 81 e8 00 00 restore 40009194 <_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 ) { 40009194: 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; 40009198: 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); 4000919c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400091a0: 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); 400091a4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 400091a8: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 400091ac: 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 ) { 400091b0: 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 ) ) 400091b4: 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); 400091b8: 83 34 a0 06 srl %l2, 6, %g1 400091bc: 12 80 00 30 bne 4000927c <_Thread_queue_Enqueue_priority+0xe8> 400091c0: 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; 400091c4: 85 28 60 04 sll %g1, 4, %g2 400091c8: 83 28 60 02 sll %g1, 2, %g1 400091cc: 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; 400091d0: b0 10 00 01 mov %g1, %i0 400091d4: 82 05 80 01 add %l6, %g1, %g1 400091d8: 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 ); 400091dc: 7f ff e3 13 call 40001e28 400091e0: 01 00 00 00 nop 400091e4: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 400091e8: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400091ec: 80 a4 00 13 cmp %l0, %l3 400091f0: 32 80 00 18 bne,a 40009250 <_Thread_queue_Enqueue_priority+0xbc> 400091f4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 400091f8: 10 80 00 81 b 400093fc <_Thread_queue_Enqueue_priority+0x268> 400091fc: 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 ) ) 40009200: 80 a4 00 13 cmp %l0, %l3 40009204: 02 80 00 17 be 40009260 <_Thread_queue_Enqueue_priority+0xcc> 40009208: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 4000920c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40009210: 80 a4 80 11 cmp %l2, %l1 40009214: 28 80 00 14 bleu,a 40009264 <_Thread_queue_Enqueue_priority+0xd0> 40009218: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 4000921c: 7f ff e3 07 call 40001e38 40009220: 90 10 00 14 mov %l4, %o0 40009224: 7f ff e3 01 call 40001e28 40009228: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000922c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40009230: 80 8d 40 01 btst %l5, %g1 40009234: 02 80 00 6b be 400093e0 <_Thread_queue_Enqueue_priority+0x24c> 40009238: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 4000923c: 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 ) ) { 40009240: 80 a4 00 13 cmp %l0, %l3 40009244: 02 80 00 07 be 40009260 <_Thread_queue_Enqueue_priority+0xcc> 40009248: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 4000924c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40009250: 80 a4 80 11 cmp %l2, %l1 40009254: 38 bf ff eb bgu,a 40009200 <_Thread_queue_Enqueue_priority+0x6c> 40009258: 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 ) ) { 4000925c: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40009260: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 40009264: 80 a6 20 01 cmp %i0, 1 40009268: 02 80 00 47 be 40009384 <_Thread_queue_Enqueue_priority+0x1f0> 4000926c: 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; 40009270: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 40009274: 81 c7 e0 08 ret <== NOT EXECUTED 40009278: 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; 4000927c: 85 28 60 04 sll %g1, 4, %g2 40009280: 83 28 60 02 sll %g1, 2, %g1 40009284: 82 20 80 01 sub %g2, %g1, %g1 40009288: 05 10 00 63 sethi %hi(0x40018c00), %g2 4000928c: a6 06 00 01 add %i0, %g1, %l3 40009290: ae 10 a0 f4 or %g2, 0xf4, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40009294: 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; 40009298: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 4000929c: 7f ff e2 e3 call 40001e28 400092a0: a2 00 60 01 add %g1, 1, %l1 400092a4: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 400092a8: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 400092ac: 80 a4 c0 10 cmp %l3, %l0 400092b0: 22 80 00 25 be,a 40009344 <_Thread_queue_Enqueue_priority+0x1b0> 400092b4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 400092b8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 400092bc: 80 a4 80 11 cmp %l2, %l1 400092c0: 3a 80 00 21 bcc,a 40009344 <_Thread_queue_Enqueue_priority+0x1b0> 400092c4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 400092c8: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400092cc: 80 a4 c0 10 cmp %l3, %l0 400092d0: 32 80 00 19 bne,a 40009334 <_Thread_queue_Enqueue_priority+0x1a0> 400092d4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400092d8: 10 80 00 1b b 40009344 <_Thread_queue_Enqueue_priority+0x1b0> 400092dc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 400092e0: 7f ff e2 d6 call 40001e38 400092e4: 90 10 00 14 mov %l4, %o0 400092e8: 7f ff e2 d0 call 40001e28 400092ec: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400092f0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400092f4: 80 8d 40 01 btst %l5, %g1 400092f8: 02 80 00 3d be 400093ec <_Thread_queue_Enqueue_priority+0x258> 400092fc: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 40009300: 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 ) ) { 40009304: 80 a4 00 13 cmp %l0, %l3 40009308: 22 80 00 0f be,a 40009344 <_Thread_queue_Enqueue_priority+0x1b0> 4000930c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 40009310: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40009314: 80 a4 80 11 cmp %l2, %l1 40009318: 3a 80 00 0b bcc,a 40009344 <_Thread_queue_Enqueue_priority+0x1b0> 4000931c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40009320: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40009324: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 40009328: 22 80 00 07 be,a 40009344 <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 4000932c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 40009330: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 40009334: 80 a4 80 11 cmp %l2, %l1 40009338: 0a bf ff ea bcs 400092e0 <_Thread_queue_Enqueue_priority+0x14c> 4000933c: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40009340: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 40009344: 80 a6 20 01 cmp %i0, 1 40009348: 12 bf ff ca bne 40009270 <_Thread_queue_Enqueue_priority+0xdc> 4000934c: 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 ) 40009350: 80 a4 80 11 cmp %l2, %l1 40009354: 02 80 00 18 be 400093b4 <_Thread_queue_Enqueue_priority+0x220> 40009358: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4000935c: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40009360: 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; 40009364: 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; 40009368: 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; 4000936c: 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; 40009370: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009374: 7f ff e2 b1 call 40001e38 40009378: 01 00 00 00 nop 4000937c: 81 c7 e0 08 ret 40009380: 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 ) 40009384: 02 80 00 0c be 400093b4 <_Thread_queue_Enqueue_priority+0x220> 40009388: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 4000938c: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009390: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40009394: 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; 40009398: 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; 4000939c: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 400093a0: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400093a4: 7f ff e2 a5 call 40001e38 400093a8: 90 10 00 14 mov %l4, %o0 400093ac: 81 c7 e0 08 ret 400093b0: 81 e8 00 00 restore 400093b4: 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; 400093b8: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 400093bc: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 400093c0: 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; 400093c4: 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; 400093c8: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 400093cc: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400093d0: 7f ff e2 9a call 40001e38 400093d4: b0 10 20 01 mov 1, %i0 400093d8: 81 c7 e0 08 ret 400093dc: 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 ); 400093e0: 7f ff e2 96 call 40001e38 <== NOT EXECUTED 400093e4: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 400093e8: 30 bf ff 7d b,a 400091dc <_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 ); 400093ec: 7f ff e2 93 call 40001e38 <== NOT EXECUTED 400093f0: 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; 400093f4: 10 bf ff aa b 4000929c <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 400093f8: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400093fc: 10 bf ff 9a b 40009264 <_Thread_queue_Enqueue_priority+0xd0> 40009400: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 4000db50 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000db50: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000db54: 7f ff d0 b5 call 40001e28 4000db58: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000db5c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000db60: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000db64: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000db68: 80 88 80 01 btst %g2, %g1 4000db6c: 02 80 00 19 be 4000dbd0 <_Thread_queue_Extract_fifo+0x80> 4000db70: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000db74: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000db78: 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 ) ) { 4000db7c: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000db80: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000db84: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000db88: 80 a0 e0 02 cmp %g3, 2 4000db8c: 02 80 00 07 be 4000dba8 <_Thread_queue_Extract_fifo+0x58> 4000db90: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000db94: 7f ff d0 a9 call 40001e38 4000db98: 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 ); 4000db9c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000dba0: 7f ff eb 1b call 4000880c <_Thread_Clear_state> 4000dba4: 81 e8 00 00 restore 4000dba8: 82 10 20 03 mov 3, %g1 4000dbac: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000dbb0: 7f ff d0 a2 call 40001e38 4000dbb4: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000dbb8: 7f ff f1 0f call 40009ff4 <_Watchdog_Remove> 4000dbbc: 90 06 60 48 add %i1, 0x48, %o0 4000dbc0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000dbc4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000dbc8: 7f ff eb 11 call 4000880c <_Thread_Clear_state> 4000dbcc: 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 ); 4000dbd0: 7f ff d0 9a call 40001e38 <== NOT EXECUTED 4000dbd4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000dbd8: 01 00 00 00 nop 4000ce10 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000ce10: 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 ); 4000ce14: 7f ff d4 05 call 40001e28 4000ce18: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000ce1c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000ce20: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ce24: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000ce28: 80 88 80 01 btst %g2, %g1 4000ce2c: 02 80 00 23 be 4000ceb8 <_Thread_queue_Extract_priority_helper+0xa8> 4000ce30: 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)); 4000ce34: 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; 4000ce38: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000ce3c: 80 a0 c0 01 cmp %g3, %g1 4000ce40: 02 80 00 2a be 4000cee8 <_Thread_queue_Extract_priority_helper+0xd8> 4000ce44: 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; 4000ce48: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000ce4c: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000ce50: 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; 4000ce54: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000ce58: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000ce5c: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000ce60: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000ce64: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000ce68: 80 a0 80 01 cmp %g2, %g1 4000ce6c: 02 80 00 07 be 4000ce88 <_Thread_queue_Extract_priority_helper+0x78> 4000ce70: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000ce74: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000ce78: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000ce7c: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000ce80: 82 00 e0 3c add %g3, 0x3c, %g1 4000ce84: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000ce88: 80 8e a0 ff btst 0xff, %i2 4000ce8c: 12 80 00 0d bne 4000cec0 <_Thread_queue_Extract_priority_helper+0xb0> 4000ce90: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000ce94: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000ce98: 80 a0 60 02 cmp %g1, 2 4000ce9c: 02 80 00 0b be 4000cec8 <_Thread_queue_Extract_priority_helper+0xb8> 4000cea0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000cea4: 7f ff d3 e5 call 40001e38 4000cea8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000ceac: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000ceb0: 7f ff ee 57 call 4000880c <_Thread_Clear_state> 4000ceb4: 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 ); 4000ceb8: 7f ff d3 e0 call 40001e38 <== NOT EXECUTED 4000cebc: 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 ); 4000cec0: 7f ff d3 de call 40001e38 4000cec4: 91 e8 00 08 restore %g0, %o0, %o0 4000cec8: 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 ); 4000cecc: 7f ff d3 db call 40001e38 <== NOT EXECUTED 4000ced0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000ced4: 7f ff f4 48 call 40009ff4 <_Watchdog_Remove> <== NOT EXECUTED 4000ced8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 4000cedc: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 4000cee0: 7f ff ee 4b call 4000880c <_Thread_Clear_state> <== NOT EXECUTED 4000cee4: 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; 4000cee8: 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; 4000ceec: 10 bf ff e7 b 4000ce88 <_Thread_queue_Extract_priority_helper+0x78> 4000cef0: c4 20 40 00 st %g2, [ %g1 ] 4000cef4 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4000cef4: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000cef8: 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 && 4000cefc: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000cf00: 80 a0 e0 00 cmp %g3, 0 4000cf04: 02 80 00 06 be 4000cf1c <_Thread_queue_Process_timeout+0x28> 4000cf08: 03 10 00 66 sethi %hi(0x40019800), %g1 4000cf0c: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 40019bd0 <_Thread_Executing> 4000cf10: 80 a2 40 02 cmp %o1, %g2 4000cf14: 02 80 00 07 be 4000cf30 <_Thread_queue_Process_timeout+0x3c> 4000cf18: 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; 4000cf1c: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000cf20: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000cf24: 82 13 c0 00 mov %o7, %g1 4000cf28: 7f ff ff af call 4000cde4 <_Thread_queue_Extract> 4000cf2c: 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 ) { 4000cf30: 02 80 00 06 be 4000cf48 <_Thread_queue_Process_timeout+0x54> 4000cf34: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000cf38: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000cf3c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000cf40: 81 c3 e0 08 retl 4000cf44: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 4000cf48: 81 c3 e0 08 retl <== NOT EXECUTED 4000cf4c: 01 00 00 00 nop 400094d4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 400094d4: 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 ) 400094d8: 80 a6 20 00 cmp %i0, 0 400094dc: 02 80 00 13 be 40009528 <_Thread_queue_Requeue+0x54> 400094e0: 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 ) { 400094e4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 400094e8: 80 a4 20 01 cmp %l0, 1 400094ec: 02 80 00 04 be 400094fc <_Thread_queue_Requeue+0x28> 400094f0: 01 00 00 00 nop 400094f4: 81 c7 e0 08 ret <== NOT EXECUTED 400094f8: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 400094fc: 7f ff e2 4b call 40001e28 40009500: 01 00 00 00 nop 40009504: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40009508: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000950c: 03 00 00 ef sethi %hi(0x3bc00), %g1 40009510: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40009514: 80 88 80 01 btst %g2, %g1 40009518: 12 80 00 06 bne 40009530 <_Thread_queue_Requeue+0x5c> 4000951c: 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 ); 40009520: 7f ff e2 46 call 40001e38 40009524: 90 10 00 11 mov %l1, %o0 40009528: 81 c7 e0 08 ret 4000952c: 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 ); 40009530: 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; 40009534: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 40009538: 40 00 0e 36 call 4000ce10 <_Thread_queue_Extract_priority_helper> 4000953c: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40009540: 90 10 00 18 mov %i0, %o0 40009544: 92 10 00 19 mov %i1, %o1 40009548: 7f ff ff 13 call 40009194 <_Thread_queue_Enqueue_priority> 4000954c: 94 07 bf f4 add %fp, -12, %o2 40009550: 30 bf ff f4 b,a 40009520 <_Thread_queue_Requeue+0x4c> 40012cac <_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) { 40012cac: 9d e3 bf 98 save %sp, -104, %sp 40012cb0: 03 10 00 cc sethi %hi(0x40033000), %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 ); 40012cb4: 05 10 00 cc sethi %hi(0x40033000), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40012cb8: a0 10 63 cc or %g1, 0x3cc, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40012cbc: 03 10 00 cc sethi %hi(0x40033000), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40012cc0: a4 10 a3 c0 or %g2, 0x3c0, %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 ); 40012cc4: a2 10 63 ac or %g1, 0x3ac, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40012cc8: 40 00 02 a4 call 40013758 <_Chain_Get> 40012ccc: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40012cd0: 80 a2 20 00 cmp %o0, 0 40012cd4: 02 80 00 0f be 40012d10 <_Timer_Server_process_insertions+0x64> 40012cd8: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40012cdc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012ce0: 80 a0 60 01 cmp %g1, 1 40012ce4: 02 80 00 12 be 40012d2c <_Timer_Server_process_insertions+0x80> 40012ce8: 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 ) { 40012cec: 02 80 00 0b be 40012d18 <_Timer_Server_process_insertions+0x6c> 40012cf0: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012cf4: 7f ff ff ee call 40012cac <_Timer_Server_process_insertions> <== NOT EXECUTED 40012cf8: 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 ); 40012cfc: 40 00 02 97 call 40013758 <_Chain_Get> 40012d00: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40012d04: 80 a2 20 00 cmp %o0, 0 40012d08: 32 bf ff f6 bne,a 40012ce0 <_Timer_Server_process_insertions+0x34> 40012d0c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 40012d10: 81 c7 e0 08 ret 40012d14: 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 ); 40012d18: 40 00 11 ea call 400174c0 <_Watchdog_Insert> 40012d1c: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012d20: 7f ff ff e3 call 40012cac <_Timer_Server_process_insertions> 40012d24: 01 00 00 00 nop 40012d28: 30 bf ff f5 b,a 40012cfc <_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 ); 40012d2c: 92 02 20 10 add %o0, 0x10, %o1 40012d30: 40 00 11 e4 call 400174c0 <_Watchdog_Insert> 40012d34: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012d38: 7f ff ff dd call 40012cac <_Timer_Server_process_insertions> 40012d3c: 01 00 00 00 nop 40012d40: 30 bf ff ef b,a 40012cfc <_Timer_Server_process_insertions+0x50> 4000b6f8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000b6f8: 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; 4000b6fc: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000b700: 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; 4000b704: 91 38 60 1f sra %g1, 0x1f, %o0 4000b708: 92 10 00 01 mov %g1, %o1 4000b70c: 83 30 60 1d srl %g1, 0x1d, %g1 4000b710: 87 2a 60 03 sll %o1, 3, %g3 4000b714: 85 2a 20 03 sll %o0, 3, %g2 4000b718: 84 10 40 02 or %g1, %g2, %g2 4000b71c: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b720: 99 28 a0 05 sll %g2, 5, %o4 4000b724: 9b 28 e0 05 sll %g3, 5, %o5 4000b728: 98 10 40 0c or %g1, %o4, %o4 4000b72c: 9a a3 40 03 subcc %o5, %g3, %o5 4000b730: 83 33 60 1a srl %o5, 0x1a, %g1 4000b734: 98 63 00 02 subx %o4, %g2, %o4 4000b738: 97 2b 60 06 sll %o5, 6, %o3 4000b73c: 95 2b 20 06 sll %o4, 6, %o2 4000b740: 96 a2 c0 0d subcc %o3, %o5, %o3 4000b744: 94 10 40 0a or %g1, %o2, %o2 4000b748: 94 62 80 0c subx %o2, %o4, %o2 4000b74c: 96 82 c0 09 addcc %o3, %o1, %o3 4000b750: 94 42 80 08 addx %o2, %o0, %o2 4000b754: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b758: 85 2a a0 02 sll %o2, 2, %g2 4000b75c: 84 10 40 02 or %g1, %g2, %g2 4000b760: 87 2a e0 02 sll %o3, 2, %g3 4000b764: 96 82 c0 03 addcc %o3, %g3, %o3 4000b768: 94 42 80 02 addx %o2, %g2, %o2 4000b76c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b770: 85 2a a0 02 sll %o2, 2, %g2 4000b774: 84 10 40 02 or %g1, %g2, %g2 4000b778: 87 2a e0 02 sll %o3, 2, %g3 4000b77c: 96 82 c0 03 addcc %o3, %g3, %o3 4000b780: 94 42 80 02 addx %o2, %g2, %o2 4000b784: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b788: 85 2a a0 02 sll %o2, 2, %g2 4000b78c: 84 10 40 02 or %g1, %g2, %g2 4000b790: 87 2a e0 02 sll %o3, 2, %g3 4000b794: 96 82 c0 03 addcc %o3, %g3, %o3 4000b798: 94 42 80 02 addx %o2, %g2, %o2 4000b79c: 85 32 e0 17 srl %o3, 0x17, %g2 4000b7a0: 83 2a a0 09 sll %o2, 9, %g1 4000b7a4: 9b 2a e0 09 sll %o3, 9, %o5 4000b7a8: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000b7ac: 96 83 40 0f addcc %o5, %o7, %o3 4000b7b0: 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; 4000b7b4: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000b7b8: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000b7bc: 80 92 80 0b orcc %o2, %o3, %g0 4000b7c0: 02 80 00 5d be 4000b934 <_Timespec_Divide+0x23c> 4000b7c4: 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; 4000b7c8: 92 10 00 08 mov %o0, %o1 4000b7cc: 83 32 60 1d srl %o1, 0x1d, %g1 4000b7d0: 9b 2a 60 03 sll %o1, 3, %o5 4000b7d4: 91 3a 20 1f sra %o0, 0x1f, %o0 4000b7d8: 99 2a 20 03 sll %o0, 3, %o4 4000b7dc: 98 10 40 0c or %g1, %o4, %o4 4000b7e0: 83 33 60 1b srl %o5, 0x1b, %g1 4000b7e4: 85 2b 20 05 sll %o4, 5, %g2 4000b7e8: 87 2b 60 05 sll %o5, 5, %g3 4000b7ec: 84 10 40 02 or %g1, %g2, %g2 4000b7f0: 86 a0 c0 0d subcc %g3, %o5, %g3 4000b7f4: 83 30 e0 1a srl %g3, 0x1a, %g1 4000b7f8: 84 60 80 0c subx %g2, %o4, %g2 4000b7fc: 9b 28 e0 06 sll %g3, 6, %o5 4000b800: 99 28 a0 06 sll %g2, 6, %o4 4000b804: 9a a3 40 03 subcc %o5, %g3, %o5 4000b808: 98 10 40 0c or %g1, %o4, %o4 4000b80c: 98 63 00 02 subx %o4, %g2, %o4 4000b810: 9a 83 40 09 addcc %o5, %o1, %o5 4000b814: 83 33 60 1e srl %o5, 0x1e, %g1 4000b818: 98 43 00 08 addx %o4, %o0, %o4 4000b81c: 87 2b 60 02 sll %o5, 2, %g3 4000b820: 85 2b 20 02 sll %o4, 2, %g2 4000b824: 9a 83 40 03 addcc %o5, %g3, %o5 4000b828: 84 10 40 02 or %g1, %g2, %g2 4000b82c: 83 33 60 1e srl %o5, 0x1e, %g1 4000b830: 98 43 00 02 addx %o4, %g2, %o4 4000b834: 87 2b 60 02 sll %o5, 2, %g3 4000b838: 85 2b 20 02 sll %o4, 2, %g2 4000b83c: 9a 83 40 03 addcc %o5, %g3, %o5 4000b840: 84 10 40 02 or %g1, %g2, %g2 4000b844: 83 33 60 1e srl %o5, 0x1e, %g1 4000b848: 98 43 00 02 addx %o4, %g2, %o4 4000b84c: 87 2b 60 02 sll %o5, 2, %g3 4000b850: 85 2b 20 02 sll %o4, 2, %g2 4000b854: 9a 83 40 03 addcc %o5, %g3, %o5 4000b858: 84 10 40 02 or %g1, %g2, %g2 4000b85c: 98 43 00 02 addx %o4, %g2, %o4 4000b860: 83 2b 20 09 sll %o4, 9, %g1 4000b864: 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; 4000b868: 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; 4000b86c: a0 11 00 01 or %g4, %g1, %l0 4000b870: 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; 4000b874: a2 84 40 13 addcc %l1, %l3, %l1 4000b878: 83 34 60 1e srl %l1, 0x1e, %g1 4000b87c: 87 2c 60 02 sll %l1, 2, %g3 4000b880: a5 3c a0 1f sra %l2, 0x1f, %l2 4000b884: a0 44 00 12 addx %l0, %l2, %l0 4000b888: 85 2c 20 02 sll %l0, 2, %g2 4000b88c: 84 10 40 02 or %g1, %g2, %g2 4000b890: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b894: 99 28 a0 05 sll %g2, 5, %o4 4000b898: 9b 28 e0 05 sll %g3, 5, %o5 4000b89c: 98 10 40 0c or %g1, %o4, %o4 4000b8a0: 9a a3 40 03 subcc %o5, %g3, %o5 4000b8a4: 98 63 00 02 subx %o4, %g2, %o4 4000b8a8: 9a 83 40 11 addcc %o5, %l1, %o5 4000b8ac: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8b0: 98 43 00 10 addx %o4, %l0, %o4 4000b8b4: 87 2b 60 02 sll %o5, 2, %g3 4000b8b8: 85 2b 20 02 sll %o4, 2, %g2 4000b8bc: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8c0: 84 10 40 02 or %g1, %g2, %g2 4000b8c4: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8c8: 87 2b 60 02 sll %o5, 2, %g3 4000b8cc: 98 43 00 02 addx %o4, %g2, %o4 4000b8d0: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8d4: 85 2b 20 02 sll %o4, 2, %g2 4000b8d8: 84 10 40 02 or %g1, %g2, %g2 4000b8dc: 83 33 60 1b srl %o5, 0x1b, %g1 4000b8e0: 98 43 00 02 addx %o4, %g2, %o4 4000b8e4: 99 2b 20 05 sll %o4, 5, %o4 4000b8e8: 98 10 40 0c or %g1, %o4, %o4 4000b8ec: 93 2b 60 05 sll %o5, 5, %o1 4000b8f0: 40 00 33 f4 call 400188c0 <__udivdi3> 4000b8f4: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000b8f8: 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; 4000b8fc: a0 10 00 08 mov %o0, %l0 4000b900: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000b904: 96 10 23 e8 mov 0x3e8, %o3 4000b908: 40 00 33 ee call 400188c0 <__udivdi3> 4000b90c: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000b910: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000b914: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000b918: 94 10 20 00 clr %o2 4000b91c: 92 10 00 11 mov %l1, %o1 4000b920: 40 00 34 c4 call 40018c30 <__umoddi3> 4000b924: 96 10 23 e8 mov 0x3e8, %o3 4000b928: d2 26 c0 00 st %o1, [ %i3 ] 4000b92c: 81 c7 e0 08 ret 4000b930: 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; 4000b934: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000b938: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000b93c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b940: 81 e8 00 00 restore <== NOT EXECUTED 40015db8 <_Timespec_From_ticks>: void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 40015db8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40015dbc: 03 10 00 a9 sethi %hi(0x4002a400), %g1 <== NOT EXECUTED 40015dc0: d2 00 63 60 ld [ %g1 + 0x360 ], %o1 ! 4002a760 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40015dc4: 40 00 30 53 call 40021f10 <.umul> <== NOT EXECUTED 40015dc8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40015dcc: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40015dd0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40015dd4: 7f ff ae 90 call 40001814 <.udiv> <== NOT EXECUTED 40015dd8: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40015ddc: 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; 40015de0: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40015de4: 40 00 30 85 call 40021ff8 <.urem> <== NOT EXECUTED 40015de8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40015dec: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 40015df0: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 40015df4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40015df8: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40015dfc: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED 40015e00: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 40015e04: 81 c7 e0 08 ret <== NOT EXECUTED 40015e08: 81 e8 00 00 restore <== NOT EXECUTED 40015e0c <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 40015e0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40015e10: 02 80 00 0f be 40015e4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40015e14: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 40015e18: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40015e1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015e20: 06 80 00 0b bl 40015e4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40015e24: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 40015e28: d0 02 20 04 ld [ %o0 + 4 ], %o0 <== NOT EXECUTED 40015e2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40015e30: 06 80 00 07 bl 40015e4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40015e34: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 <== NOT EXECUTED 40015e38: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <== NOT EXECUTED 40015e3c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40015e40: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 40015e44: 81 c3 e0 08 retl <== NOT EXECUTED 40015e48: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 40015e4c: 81 c3 e0 08 retl <== NOT EXECUTED 40015e50: 90 10 20 00 clr %o0 <== NOT EXECUTED 40015e54 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 40015e54: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 40015e58: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED 40015e5c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40015e60: 02 80 00 15 be 40015eb4 <_Timespec_To_ticks+0x60> <== NOT EXECUTED 40015e64: e4 06 20 04 ld [ %i0 + 4 ], %l2 <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 40015e68: 03 10 00 a9 sethi %hi(0x4002a400), %g1 <== NOT EXECUTED 40015e6c: e2 00 63 60 ld [ %g1 + 0x360 ], %l1 ! 4002a760 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40015e70: 11 00 03 d0 sethi %hi(0xf4000), %o0 <== NOT EXECUTED 40015e74: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40015e78: 7f ff ae 67 call 40001814 <.udiv> <== NOT EXECUTED 40015e7c: 90 12 22 40 or %o0, 0x240, %o0 <== NOT EXECUTED 40015e80: 40 00 30 24 call 40021f10 <.umul> <== NOT EXECUTED 40015e84: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 40015e88: 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; 40015e8c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 40015e90: 7f ff ae 61 call 40001814 <.udiv> <== NOT EXECUTED 40015e94: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40015e98: 7f ff ae 5f call 40001814 <.udiv> <== NOT EXECUTED 40015e9c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 40015ea0: b0 82 00 10 addcc %o0, %l0, %i0 <== NOT EXECUTED 40015ea4: 22 80 00 02 be,a 40015eac <_Timespec_To_ticks+0x58> <== NOT EXECUTED 40015ea8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return ticks; return 1; } 40015eac: 81 c7 e0 08 ret <== NOT EXECUTED 40015eb0: 81 e8 00 00 restore <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 40015eb4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40015eb8: 12 bf ff ec bne 40015e68 <_Timespec_To_ticks+0x14> <== NOT EXECUTED 40015ebc: b0 10 20 00 clr %i0 <== NOT EXECUTED if (ticks) return ticks; return 1; } 40015ec0: 81 c7 e0 08 ret <== NOT EXECUTED 40015ec4: 81 e8 00 00 restore <== NOT EXECUTED 4000d130 <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 4000d130: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4000d134: 11 10 00 67 sethi %hi(0x40019c00), %o0 4000d138: 92 10 00 18 mov %i0, %o1 4000d13c: 7f ff e8 b8 call 4000741c <_Chain_Append> 4000d140: 90 12 21 48 or %o0, 0x148, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4000d144: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000d148: 80 a0 60 00 cmp %g1, 0 4000d14c: 02 80 00 06 be 4000d164 <_User_extensions_Add_API_set+0x34> 4000d150: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 4000d154: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 4000d158: 31 10 00 66 sethi %hi(0x40019800), %i0 4000d15c: 7f ff e8 b0 call 4000741c <_Chain_Append> 4000d160: 91 ee 23 14 restore %i0, 0x314, %o0 4000d164: 81 c7 e0 08 ret <== NOT EXECUTED 4000d168: 81 e8 00 00 restore <== NOT EXECUTED 40010314 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 40010314: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 40010318: 40 00 13 09 call 40014f3c <_Chain_Extract> 4001031c: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 40010320: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40010324: 80 a0 60 00 cmp %g1, 0 40010328: 02 80 00 04 be 40010338 <_User_extensions_Remove_set+0x24> 4001032c: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 40010330: 40 00 13 03 call 40014f3c <_Chain_Extract> <== NOT EXECUTED 40010334: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 40010338: 81 c7 e0 08 ret 4001033c: 81 e8 00 00 restore 40009cf0 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40009cf0: 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 ; 40009cf4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009cf8: e0 00 61 48 ld [ %g1 + 0x148 ], %l0 ! 40019d48 <_User_extensions_List> 40009cfc: 82 10 61 48 or %g1, 0x148, %g1 40009d00: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40009d04: 80 a4 00 11 cmp %l0, %l1 40009d08: 02 80 00 10 be 40009d48 <_User_extensions_Thread_create+0x58> 40009d0c: 03 10 00 66 sethi %hi(0x40019800), %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)( 40009d10: a4 10 63 d0 or %g1, 0x3d0, %l2 ! 40019bd0 <_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 ) { 40009d14: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40009d18: 80 a0 60 00 cmp %g1, 0 40009d1c: 02 80 00 07 be 40009d38 <_User_extensions_Thread_create+0x48> 40009d20: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40009d24: 9f c0 40 00 call %g1 40009d28: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40009d2c: 80 8a 20 ff btst 0xff, %o0 40009d30: 02 80 00 08 be 40009d50 <_User_extensions_Thread_create+0x60> 40009d34: 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 ) { 40009d38: 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 ) ; 40009d3c: 80 a4 00 11 cmp %l0, %l1 40009d40: 32 bf ff f6 bne,a 40009d18 <_User_extensions_Thread_create+0x28> 40009d44: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40009d48: 81 c7 e0 08 ret 40009d4c: 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 ) 40009d50: 81 c7 e0 08 ret <== NOT EXECUTED 40009d54: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000bccc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000bccc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000bcd0: 7f ff db 73 call 40002a9c 4000bcd4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bcd8: 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; 4000bcdc: 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 ) ) { 4000bce0: 80 a0 80 10 cmp %g2, %l0 4000bce4: 02 80 00 1f be 4000bd60 <_Watchdog_Adjust+0x94> 4000bce8: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000bcec: 12 80 00 1f bne 4000bd68 <_Watchdog_Adjust+0x9c> 4000bcf0: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000bcf4: 80 a6 a0 00 cmp %i2, 0 4000bcf8: 02 80 00 1a be 4000bd60 <_Watchdog_Adjust+0x94> 4000bcfc: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000bd00: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000bd04: 80 a6 80 19 cmp %i2, %i1 4000bd08: 1a 80 00 0b bcc 4000bd34 <_Watchdog_Adjust+0x68> 4000bd0c: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 4000bd10: 10 80 00 1d b 4000bd84 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000bd14: 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 ) { 4000bd18: b4 a6 80 19 subcc %i2, %i1, %i2 4000bd1c: 02 80 00 11 be 4000bd60 <_Watchdog_Adjust+0x94> 4000bd20: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000bd24: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000bd28: 80 a6 40 1a cmp %i1, %i2 4000bd2c: 18 80 00 16 bgu 4000bd84 <_Watchdog_Adjust+0xb8> 4000bd30: 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; 4000bd34: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 4000bd38: 7f ff db 5d call 40002aac 4000bd3c: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000bd40: 40 00 00 b4 call 4000c010 <_Watchdog_Tickle> 4000bd44: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000bd48: 7f ff db 55 call 40002a9c 4000bd4c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bd50: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 4000bd54: 80 a4 00 01 cmp %l0, %g1 4000bd58: 12 bf ff f0 bne 4000bd18 <_Watchdog_Adjust+0x4c> 4000bd5c: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 4000bd60: 7f ff db 53 call 40002aac 4000bd64: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000bd68: 12 bf ff fe bne 4000bd60 <_Watchdog_Adjust+0x94> 4000bd6c: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000bd70: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000bd74: 82 00 40 1a add %g1, %i2, %g1 4000bd78: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 4000bd7c: 7f ff db 4c call 40002aac 4000bd80: 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; 4000bd84: 10 bf ff f7 b 4000bd60 <_Watchdog_Adjust+0x94> 4000bd88: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 400173f0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 400173f0: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 400173f4: a2 96 60 00 orcc %i1, 0, %l1 400173f8: 12 80 00 04 bne 40017408 <_Watchdog_Adjust_to_chain+0x18> 400173fc: 01 00 00 00 nop 40017400: 81 c7 e0 08 ret 40017404: 81 e8 00 00 restore return; } _ISR_Disable( level ); 40017408: 7f ff cf ac call 4000b2b8 4001740c: 01 00 00 00 nop 40017410: a6 10 00 08 mov %o0, %l3 40017414: 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; 40017418: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 4001741c: 80 a0 80 10 cmp %g2, %l0 40017420: 02 80 00 25 be 400174b4 <_Watchdog_Adjust_to_chain+0xc4> 40017424: a4 06 a0 04 add %i2, 4, %l2 40017428: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 4001742c: 80 a6 40 11 cmp %i1, %l1 40017430: 18 80 00 20 bgu 400174b0 <_Watchdog_Adjust_to_chain+0xc0> 40017434: 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; 40017438: 10 80 00 15 b 4001748c <_Watchdog_Adjust_to_chain+0x9c> 4001743c: 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; 40017440: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 40017444: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40017448: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 4001744c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 40017450: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40017454: 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; 40017458: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 4001745c: 7f ff cf 9b call 4000b2c8 40017460: 90 10 00 13 mov %l3, %o0 40017464: 7f ff cf 95 call 4000b2b8 40017468: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001746c: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40017470: 80 a4 00 02 cmp %l0, %g2 40017474: 02 80 00 10 be 400174b4 <_Watchdog_Adjust_to_chain+0xc4> 40017478: 01 00 00 00 nop 4001747c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40017480: 80 a0 60 00 cmp %g1, 0 40017484: 32 80 00 07 bne,a 400174a0 <_Watchdog_Adjust_to_chain+0xb0> 40017488: 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)) 4001748c: 80 a4 00 02 cmp %l0, %g2 40017490: 32 bf ff ec bne,a 40017440 <_Watchdog_Adjust_to_chain+0x50> 40017494: c2 00 80 00 ld [ %g2 ], %g1 40017498: 10 bf ff ec b 40017448 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 4001749c: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 400174a0: 02 80 00 05 be 400174b4 <_Watchdog_Adjust_to_chain+0xc4> 400174a4: 01 00 00 00 nop 400174a8: 10 bf ff e1 b 4001742c <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 400174ac: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 400174b0: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 400174b4: 7f ff cf 85 call 4000b2c8 400174b8: 91 e8 00 13 restore %g0, %l3, %o0 400174bc: 01 00 00 00 nop 40009e48 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009e48: 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; 40009e4c: 03 10 00 66 sethi %hi(0x40019800), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009e50: 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; 40009e54: e6 00 63 ac ld [ %g1 + 0x3ac ], %l3 _ISR_Disable( level ); 40009e58: 7f ff df f4 call 40001e28 40009e5c: 01 00 00 00 nop 40009e60: 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 ) { 40009e64: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009e68: 80 a0 60 00 cmp %g1, 0 40009e6c: 12 80 00 4a bne 40009f94 <_Watchdog_Insert+0x14c> 40009e70: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40009e74: 2b 10 00 67 sethi %hi(0x40019c00), %l5 40009e78: c2 05 60 60 ld [ %l5 + 0x60 ], %g1 ! 40019c60 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009e7c: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40009e80: 82 00 60 01 inc %g1 40009e84: 2f 10 00 66 sethi %hi(0x40019800), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009e88: c4 26 60 08 st %g2, [ %i1 + 8 ] 40009e8c: a8 15 e3 cc or %l7, 0x3cc, %l4 _Watchdog_Sync_count++; 40009e90: c2 25 60 60 st %g1, [ %l5 + 0x60 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009e94: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40009e98: 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 ; 40009e9c: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40009ea0: 80 a4 a0 00 cmp %l2, 0 40009ea4: 02 80 00 2b be 40009f50 <_Watchdog_Insert+0x108> 40009ea8: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009eac: c2 04 40 00 ld [ %l1 ], %g1 40009eb0: 80 a0 60 00 cmp %g1, 0 40009eb4: 02 80 00 27 be 40009f50 <_Watchdog_Insert+0x108> 40009eb8: 03 10 00 67 sethi %hi(0x40019c00), %g1 break; if ( delta_interval < after->delta_interval ) { 40009ebc: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009ec0: 80 a4 80 10 cmp %l2, %l0 40009ec4: 1a 80 00 13 bcc 40009f10 <_Watchdog_Insert+0xc8> 40009ec8: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40009ecc: 10 80 00 20 b 40009f4c <_Watchdog_Insert+0x104> 40009ed0: 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 ) { 40009ed4: c2 05 00 00 ld [ %l4 ], %g1 40009ed8: 80 a4 c0 01 cmp %l3, %g1 40009edc: 0a 80 00 30 bcs 40009f9c <_Watchdog_Insert+0x154> 40009ee0: 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 ) ) 40009ee4: a4 a4 80 10 subcc %l2, %l0, %l2 40009ee8: 02 80 00 19 be 40009f4c <_Watchdog_Insert+0x104> 40009eec: e2 04 40 00 ld [ %l1 ], %l1 40009ef0: c2 04 40 00 ld [ %l1 ], %g1 40009ef4: 80 a0 60 00 cmp %g1, 0 40009ef8: 02 80 00 16 be 40009f50 <_Watchdog_Insert+0x108> 40009efc: 03 10 00 67 sethi %hi(0x40019c00), %g1 break; if ( delta_interval < after->delta_interval ) { 40009f00: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009f04: 80 a4 00 12 cmp %l0, %l2 40009f08: 18 80 00 10 bgu 40009f48 <_Watchdog_Insert+0x100> 40009f0c: 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 ); 40009f10: 7f ff df ca call 40001e38 40009f14: 90 10 00 18 mov %i0, %o0 40009f18: 7f ff df c4 call 40001e28 40009f1c: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40009f20: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009f24: 80 a0 60 01 cmp %g1, 1 40009f28: 02 bf ff eb be 40009ed4 <_Watchdog_Insert+0x8c> 40009f2c: 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; 40009f30: e6 25 e3 cc st %l3, [ %l7 + 0x3cc ] <== NOT EXECUTED _Watchdog_Sync_count--; 40009f34: c2 05 60 60 ld [ %l5 + 0x60 ], %g1 <== NOT EXECUTED 40009f38: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009f3c: c2 25 60 60 st %g1, [ %l5 + 0x60 ] <== NOT EXECUTED _ISR_Enable( level ); 40009f40: 7f ff df be call 40001e38 <== NOT EXECUTED 40009f44: 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; 40009f48: 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; 40009f4c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009f50: c6 00 60 64 ld [ %g1 + 0x64 ], %g3 ! 40019c64 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 40009f54: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40009f58: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40009f5c: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40009f60: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40009f64: 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; 40009f68: e6 25 e3 cc st %l3, [ %l7 + 0x3cc ] 40009f6c: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 40009f70: c2 05 60 60 ld [ %l5 + 0x60 ], %g1 after_node->next = the_node; 40009f74: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40009f78: c4 26 60 04 st %g2, [ %i1 + 4 ] 40009f7c: 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; 40009f80: 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; 40009f84: c8 26 40 00 st %g4, [ %i1 ] 40009f88: c2 25 60 60 st %g1, [ %l5 + 0x60 ] _ISR_Enable( level ); 40009f8c: 7f ff df ab call 40001e38 40009f90: 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 ); 40009f94: 7f ff df a9 call 40001e38 <== NOT EXECUTED 40009f98: 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; 40009f9c: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40009fa0: 10 bf ff bf b 40009e9c <_Watchdog_Insert+0x54> 40009fa4: e4 06 60 0c ld [ %i1 + 0xc ], %l2 40009ff4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 40009ff4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 40009ff8: 7f ff df 8c call 40001e28 40009ffc: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 4000a000: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 4000a004: 80 a6 20 01 cmp %i0, 1 4000a008: 02 80 00 2a be 4000a0b0 <_Watchdog_Remove+0xbc> 4000a00c: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000a010: 1a 80 00 09 bcc 4000a034 <_Watchdog_Remove+0x40> 4000a014: 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; 4000a018: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000a01c: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 40019c64 <_Watchdog_Ticks_since_boot> 4000a020: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a024: 7f ff df 85 call 40001e38 4000a028: 01 00 00 00 nop return( previous_state ); } 4000a02c: 81 c7 e0 08 ret 4000a030: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4000a034: 18 bf ff fa bgu 4000a01c <_Watchdog_Remove+0x28> 4000a038: 03 10 00 67 sethi %hi(0x40019c00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000a03c: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000a040: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000a044: c2 01 00 00 ld [ %g4 ], %g1 4000a048: 80 a0 60 00 cmp %g1, 0 4000a04c: 02 80 00 07 be 4000a068 <_Watchdog_Remove+0x74> 4000a050: 03 10 00 67 sethi %hi(0x40019c00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000a054: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 4000a058: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 4000a05c: 82 00 40 02 add %g1, %g2, %g1 4000a060: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 4000a064: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000a068: c4 00 60 60 ld [ %g1 + 0x60 ], %g2 ! 40019c60 <_Watchdog_Sync_count> 4000a06c: 80 a0 a0 00 cmp %g2, 0 4000a070: 22 80 00 07 be,a 4000a08c <_Watchdog_Remove+0x98> 4000a074: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 4000a078: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000a07c: c6 00 63 ac ld [ %g1 + 0x3ac ], %g3 ! 40019bac <_ISR_Nest_level> <== NOT EXECUTED 4000a080: 05 10 00 66 sethi %hi(0x40019800), %g2 <== NOT EXECUTED 4000a084: c6 20 a3 cc st %g3, [ %g2 + 0x3cc ] ! 40019bcc <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000a088: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000a08c: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000a090: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a094: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000a098: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 40019c64 <_Watchdog_Ticks_since_boot> 4000a09c: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a0a0: 7f ff df 66 call 40001e38 4000a0a4: 01 00 00 00 nop return( previous_state ); } 4000a0a8: 81 c7 e0 08 ret 4000a0ac: 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; 4000a0b0: c4 00 60 64 ld [ %g1 + 0x64 ], %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; 4000a0b4: 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; 4000a0b8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 4000a0bc: 7f ff df 5f call 40001e38 <== NOT EXECUTED 4000a0c0: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 4000a0c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a0c8: 81 e8 00 00 restore <== NOT EXECUTED 4000a1e4 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000a1e4: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 4000a1e8: 80 a6 20 00 cmp %i0, 0 4000a1ec: 02 80 00 15 be 4000a240 <_Workspace_Handler_initialization+0x5c> 4000a1f0: 80 8e 20 07 btst 7, %i0 4000a1f4: 12 80 00 14 bne 4000a244 <_Workspace_Handler_initialization+0x60> 4000a1f8: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 4000a1fc: 03 10 00 66 sethi %hi(0x40019800), %g1 4000a200: c4 00 63 a8 ld [ %g1 + 0x3a8 ], %g2 ! 40019ba8 <_Configuration_Table> 4000a204: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 4000a208: 80 a0 e0 00 cmp %g3, 0 4000a20c: 32 80 00 11 bne,a 4000a250 <_Workspace_Handler_initialization+0x6c> 4000a210: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 4000a214: 92 10 00 18 mov %i0, %o1 4000a218: 94 10 00 19 mov %i1, %o2 4000a21c: 11 10 00 66 sethi %hi(0x40019800), %o0 4000a220: 96 10 20 08 mov 8, %o3 4000a224: 7f ff f5 eb call 400079d0 <_Heap_Initialize> 4000a228: 90 12 23 34 or %o0, 0x334, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000a22c: 80 a2 20 00 cmp %o0, 0 4000a230: 02 80 00 0d be 4000a264 <_Workspace_Handler_initialization+0x80> 4000a234: 92 10 20 01 mov 1, %o1 4000a238: 81 c7 e0 08 ret 4000a23c: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 4000a240: 90 10 20 00 clr %o0 4000a244: 92 10 20 01 mov 1, %o1 4000a248: 7f ff f6 6f call 40007c04 <_Internal_error_Occurred> 4000a24c: 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 ); 4000a250: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a254: 40 00 10 b9 call 4000e538 <== NOT EXECUTED 4000a258: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 4000a25c: 10 bf ff ef b 4000a218 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 4000a260: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4000a264: 7f ff f6 68 call 40007c04 <_Internal_error_Occurred> <== NOT EXECUTED 4000a268: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 4000a26c: 01 00 00 00 nop 40008074 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40008074: 9a 92 60 00 orcc %o1, 0, %o5 40008078: 02 80 00 4d be 400081ac 4000807c: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40008080: 02 80 00 4c be 400081b0 40008084: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40008088: c2 03 40 00 ld [ %o5 ], %g1 4000808c: 80 a0 60 00 cmp %g1, 0 40008090: 22 80 00 44 be,a 400081a0 40008094: 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 ) 40008098: 03 10 00 76 sethi %hi(0x4001d800), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 4000809c: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 400080a0: c8 00 61 70 ld [ %g1 + 0x170 ], %g4 400080a4: 80 a1 00 08 cmp %g4, %o0 400080a8: 08 80 00 39 bleu 4000818c 400080ac: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 400080b0: 80 a2 20 00 cmp %o0, 0 400080b4: 12 80 00 29 bne 40008158 400080b8: 03 10 00 76 sethi %hi(0x4001d800), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 400080bc: 90 81 3f ff addcc %g4, -1, %o0 400080c0: 02 80 00 35 be 40008194 400080c4: 05 10 00 76 sethi %hi(0x4001d800), %g2 400080c8: c6 00 a1 74 ld [ %g2 + 0x174 ], %g3 ! 4001d974 <_IO_Driver_address_table> 400080cc: 85 29 20 03 sll %g4, 3, %g2 400080d0: 83 29 20 05 sll %g4, 5, %g1 400080d4: 82 20 40 02 sub %g1, %g2, %g1 400080d8: 82 00 7f e8 add %g1, -24, %g1 400080dc: 10 80 00 05 b 400080f0 400080e0: 84 00 c0 01 add %g3, %g1, %g2 400080e4: 90 82 3f ff addcc %o0, -1, %o0 400080e8: 02 80 00 2b be 40008194 400080ec: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 400080f0: c2 00 80 00 ld [ %g2 ], %g1 400080f4: 80 a0 60 00 cmp %g1, 0 400080f8: 12 bf ff fb bne 400080e4 400080fc: 88 10 00 02 mov %g2, %g4 40008100: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40008104: 80 a0 60 00 cmp %g1, 0 40008108: 32 bf ff f8 bne,a 400080e8 4000810c: 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; 40008110: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 40008114: 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; 40008118: c2 21 00 00 st %g1, [ %g4 ] 4000811c: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008120: 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; 40008124: c4 21 20 04 st %g2, [ %g4 + 4 ] 40008128: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 4000812c: 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; 40008130: c2 21 20 08 st %g1, [ %g4 + 8 ] 40008134: c4 03 60 0c ld [ %o5 + 0xc ], %g2 40008138: c4 21 20 0c st %g2, [ %g4 + 0xc ] 4000813c: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 40008140: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 40008144: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 40008148: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 4000814c: 82 13 c0 00 mov %o7, %g1 40008150: 7f ff ff 48 call 40007e70 40008154: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40008158: c8 00 61 74 ld [ %g1 + 0x174 ], %g4 4000815c: 85 2a 20 03 sll %o0, 3, %g2 40008160: 83 2a 20 05 sll %o0, 5, %g1 40008164: 82 20 40 02 sub %g1, %g2, %g1 40008168: c6 01 00 01 ld [ %g4 + %g1 ], %g3 4000816c: 80 a0 e0 00 cmp %g3, 0 40008170: 12 80 00 06 bne 40008188 40008174: 88 01 00 01 add %g4, %g1, %g4 40008178: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 4000817c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008180: 22 bf ff e5 be,a 40008114 <== NOT EXECUTED 40008184: 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 ); 40008188: 82 10 20 0c mov 0xc, %g1 } 4000818c: 81 c3 e0 08 retl 40008190: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008194: 82 10 20 05 mov 5, %g1 } 40008198: 81 c3 e0 08 retl 4000819c: 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 ) 400081a0: 80 a0 60 00 cmp %g1, 0 400081a4: 12 bf ff be bne 4000809c 400081a8: 03 10 00 76 sethi %hi(0x4001d800), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 400081ac: 82 10 20 09 mov 9, %g1 } 400081b0: 81 c3 e0 08 retl 400081b4: 90 10 00 01 mov %g1, %o0 400094a0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 400094a0: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 400094a4: 80 a6 20 00 cmp %i0, 0 400094a8: 02 80 00 23 be 40009534 400094ac: 03 10 00 97 sethi %hi(0x40025c00), %g1 return; 400094b0: a4 10 63 04 or %g1, 0x304, %l2 ! 40025f04 <_Objects_Information_table+0x4> 400094b4: 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 ] ) 400094b8: c2 04 80 00 ld [ %l2 ], %g1 400094bc: 80 a0 60 00 cmp %g1, 0 400094c0: 22 80 00 1a be,a 40009528 400094c4: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 400094c8: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 400094cc: 80 a4 60 00 cmp %l1, 0 400094d0: 22 80 00 16 be,a 40009528 400094d4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 400094d8: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 400094dc: 86 90 60 00 orcc %g1, 0, %g3 400094e0: 22 80 00 12 be,a 40009528 400094e4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 400094e8: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 400094ec: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400094f0: 83 2c 20 02 sll %l0, 2, %g1 400094f4: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 400094f8: 80 a2 20 00 cmp %o0, 0 400094fc: 02 80 00 05 be 40009510 40009500: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40009504: 9f c6 00 00 call %i0 40009508: 01 00 00 00 nop 4000950c: 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++ ) { 40009510: 83 28 e0 10 sll %g3, 0x10, %g1 40009514: 83 30 60 10 srl %g1, 0x10, %g1 40009518: 80 a0 40 10 cmp %g1, %l0 4000951c: 3a bf ff f5 bcc,a 400094f0 40009520: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40009524: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40009528: 80 a4 80 13 cmp %l2, %l3 4000952c: 32 bf ff e4 bne,a 400094bc 40009530: c2 04 80 00 ld [ %l2 ], %g1 40009534: 81 c7 e0 08 ret 40009538: 81 e8 00 00 restore 40007ae4 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40007ae4: 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 *) 40007ae8: 11 10 00 79 sethi %hi(0x4001e400), %o0 40007aec: 92 10 00 18 mov %i0, %o1 40007af0: 90 12 20 7c or %o0, 0x7c, %o0 40007af4: 40 00 09 28 call 40009f94 <_Objects_Get> 40007af8: 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 ) { 40007afc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b00: 80 a0 60 00 cmp %g1, 0 40007b04: 02 80 00 04 be 40007b14 40007b08: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007b0c: 81 c7 e0 08 ret 40007b10: 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 ) ) { 40007b14: 25 10 00 79 sethi %hi(0x4001e400), %l2 40007b18: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40007b1c: c2 04 a2 b0 ld [ %l2 + 0x2b0 ], %g1 40007b20: 80 a0 80 01 cmp %g2, %g1 40007b24: 02 80 00 06 be 40007b3c 40007b28: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 40007b2c: 40 00 0b 81 call 4000a930 <_Thread_Enable_dispatch> 40007b30: b0 10 20 17 mov 0x17, %i0 40007b34: 81 c7 e0 08 ret 40007b38: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40007b3c: 12 80 00 0f bne 40007b78 40007b40: 01 00 00 00 nop switch ( the_period->state ) { 40007b44: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40007b48: 80 a0 60 00 cmp %g1, 0 40007b4c: 02 80 00 07 be 40007b68 40007b50: b0 10 20 0b mov 0xb, %i0 40007b54: 82 00 7f fd add %g1, -3, %g1 40007b58: 80 a0 60 01 cmp %g1, 1 40007b5c: 18 80 00 03 bgu 40007b68 40007b60: b0 10 20 00 clr %i0 40007b64: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40007b68: 40 00 0b 72 call 4000a930 <_Thread_Enable_dispatch> 40007b6c: 01 00 00 00 nop 40007b70: 81 c7 e0 08 ret 40007b74: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007b78: 7f ff ec 39 call 40002c5c 40007b7c: 01 00 00 00 nop 40007b80: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40007b84: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40007b88: 80 a4 e0 02 cmp %l3, 2 40007b8c: 02 80 00 1a be 40007bf4 40007b90: 80 a4 e0 04 cmp %l3, 4 40007b94: 02 80 00 32 be 40007c5c 40007b98: 80 a4 e0 00 cmp %l3, 0 40007b9c: 12 bf ff dc bne 40007b0c 40007ba0: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 40007ba4: 7f ff ec 32 call 40002c6c 40007ba8: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40007bac: 7f ff ff 58 call 4000790c <_Rate_monotonic_Initiate_statistics> 40007bb0: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007bb4: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007bb8: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007bbc: 82 10 63 b8 or %g1, 0x3b8, %g1 ! 40007fb8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 40007bc0: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bc4: 92 04 60 10 add %l1, 0x10, %o1 40007bc8: 11 10 00 79 sethi %hi(0x4001e400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007bcc: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bd0: 90 12 22 d0 or %o0, 0x2d0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007bd4: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007bd8: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007bdc: 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; 40007be0: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007be4: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007be8: 40 00 10 c9 call 4000bf0c <_Watchdog_Insert> 40007bec: b0 10 20 00 clr %i0 40007bf0: 30 bf ff de b,a 40007b68 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 40007bf4: 7f ff ff 62 call 4000797c <_Rate_monotonic_Update_statistics> 40007bf8: 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; 40007bfc: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007c00: 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; 40007c04: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40007c08: 7f ff ec 19 call 40002c6c 40007c0c: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40007c10: c2 04 a2 b0 ld [ %l2 + 0x2b0 ], %g1 40007c14: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007c18: 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; 40007c1c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007c20: 40 00 0d d9 call 4000b384 <_Thread_Set_state> 40007c24: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40007c28: 7f ff ec 0d call 40002c5c 40007c2c: 01 00 00 00 nop local_state = the_period->state; 40007c30: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007c34: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40007c38: 7f ff ec 0d call 40002c6c 40007c3c: 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 ) 40007c40: 80 a4 20 03 cmp %l0, 3 40007c44: 02 80 00 17 be 40007ca0 40007c48: d0 04 a2 b0 ld [ %l2 + 0x2b0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 40007c4c: 40 00 0b 39 call 4000a930 <_Thread_Enable_dispatch> 40007c50: b0 10 20 00 clr %i0 40007c54: 81 c7 e0 08 ret 40007c58: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007c5c: 7f ff ff 48 call 4000797c <_Rate_monotonic_Update_statistics> 40007c60: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40007c64: 7f ff ec 02 call 40002c6c 40007c68: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007c6c: 82 10 20 02 mov 2, %g1 40007c70: 92 04 60 10 add %l1, 0x10, %o1 40007c74: 11 10 00 79 sethi %hi(0x4001e400), %o0 40007c78: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 4001e6d0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007c7c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40007c80: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40007c84: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007c88: 40 00 10 a1 call 4000bf0c <_Watchdog_Insert> 40007c8c: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40007c90: 40 00 0b 28 call 4000a930 <_Thread_Enable_dispatch> 40007c94: 01 00 00 00 nop 40007c98: 81 c7 e0 08 ret 40007c9c: 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 ); 40007ca0: 40 00 0a 27 call 4000a53c <_Thread_Clear_state> <== NOT EXECUTED 40007ca4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40007ca8: 30 bf ff e9 b,a 40007c4c <== NOT EXECUTED 400251e0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 400251e0: 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 ) 400251e4: 80 a6 60 00 cmp %i1, 0 400251e8: 02 80 00 4a be 40025310 400251ec: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 400251f0: 13 10 01 20 sethi %hi(0x40048000), %o1 400251f4: 9f c6 40 00 call %i1 400251f8: 92 12 61 18 or %o1, 0x118, %o1 ! 40048118 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 400251fc: 90 10 00 18 mov %i0, %o0 40025200: 13 10 01 20 sethi %hi(0x40048000), %o1 40025204: 9f c6 40 00 call %i1 40025208: 92 12 61 38 or %o1, 0x138, %o1 ! 40048138 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 4002520c: 90 10 00 18 mov %i0, %o0 40025210: 13 10 01 20 sethi %hi(0x40048000), %o1 40025214: 9f c6 40 00 call %i1 40025218: 92 12 61 60 or %o1, 0x160, %o1 ! 40048160 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 4002521c: 90 10 00 18 mov %i0, %o0 40025220: 13 10 01 20 sethi %hi(0x40048000), %o1 40025224: 9f c6 40 00 call %i1 40025228: 92 12 61 88 or %o1, 0x188, %o1 ! 40048188 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 4002522c: 90 10 00 18 mov %i0, %o0 40025230: 13 10 01 20 sethi %hi(0x40048000), %o1 40025234: 9f c6 40 00 call %i1 40025238: 92 12 61 d8 or %o1, 0x1d8, %o1 ! 400481d8 /* * 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 ; 4002523c: 03 10 01 81 sethi %hi(0x40060400), %g1 40025240: a6 10 60 10 or %g1, 0x10, %l3 ! 40060410 <_Rate_monotonic_Information> 40025244: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40025248: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 4002524c: 80 a4 80 01 cmp %l2, %g1 40025250: 18 80 00 30 bgu 40025310 40025254: 03 10 01 20 sethi %hi(0x40048000), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40025258: 05 10 01 21 sethi %hi(0x40048400), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 4002525c: b6 10 62 28 or %g1, 0x228, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40025260: b8 10 a2 30 or %g2, 0x230, %i4 40025264: 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 ); 40025268: ae 07 bf d0 add %fp, -48, %l7 4002526c: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025270: ba 07 bf b0 add %fp, -80, %i5 40025274: 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( 40025278: 10 80 00 06 b 40025290 4002527c: 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++ ) { 40025280: 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 ; 40025284: 80 a0 40 12 cmp %g1, %l2 40025288: 0a 80 00 22 bcs 40025310 4002528c: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40025290: 90 10 00 12 mov %l2, %o0 40025294: 40 00 2d e2 call 40030a1c 40025298: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 4002529c: 80 a2 20 00 cmp %o0, 0 400252a0: 32 bf ff f8 bne,a 40025280 400252a4: 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 ); 400252a8: 92 10 00 17 mov %l7, %o1 400252ac: 40 00 2d f1 call 40030a70 400252b0: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 400252b4: d0 07 bf d0 ld [ %fp + -48 ], %o0 400252b8: 80 a2 20 00 cmp %o0, 0 400252bc: 12 80 00 4b bne 400253e8 400252c0: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400252c4: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 400252c8: 94 10 00 12 mov %l2, %o2 400252cc: 92 10 00 1b mov %i3, %o1 400252d0: 96 10 00 16 mov %l6, %o3 400252d4: 9f c6 40 00 call %i1 400252d8: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400252dc: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 400252e0: 94 10 00 15 mov %l5, %o2 400252e4: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400252e8: 80 a0 60 00 cmp %g1, 0 400252ec: 12 80 00 0b bne 40025318 400252f0: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 400252f4: 9f c6 40 00 call %i1 400252f8: 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 ; 400252fc: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 40025300: 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 ; 40025304: 80 a0 40 12 cmp %g1, %l2 40025308: 1a bf ff e3 bcc 40025294 4002530c: 90 10 00 12 mov %l2, %o0 40025310: 81 c7 e0 08 ret 40025314: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025318: 40 00 05 fd call 40026b0c <_Timespec_Divide_by_integer> 4002531c: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40025320: d0 07 bf a4 ld [ %fp + -92 ], %o0 40025324: 40 00 77 75 call 400430f8 <.div> 40025328: 92 10 23 e8 mov 0x3e8, %o1 4002532c: a2 10 00 08 mov %o0, %l1 40025330: d0 07 bf ac ld [ %fp + -84 ], %o0 40025334: 40 00 77 71 call 400430f8 <.div> 40025338: 92 10 23 e8 mov 0x3e8, %o1 4002533c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40025340: a0 10 00 08 mov %o0, %l0 40025344: d0 07 bf ec ld [ %fp + -20 ], %o0 40025348: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4002534c: 40 00 77 6b call 400430f8 <.div> 40025350: 92 10 23 e8 mov 0x3e8, %o1 40025354: d8 07 bf a8 ld [ %fp + -88 ], %o4 40025358: d4 07 bf a0 ld [ %fp + -96 ], %o2 4002535c: 96 10 00 11 mov %l1, %o3 40025360: 9a 10 00 10 mov %l0, %o5 40025364: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40025368: 13 10 01 20 sethi %hi(0x40048000), %o1 4002536c: 90 10 00 18 mov %i0, %o0 40025370: 9f c6 40 00 call %i1 40025374: 92 12 62 40 or %o1, 0x240, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40025378: d2 07 bf 98 ld [ %fp + -104 ], %o1 4002537c: 94 10 00 15 mov %l5, %o2 40025380: 40 00 05 e3 call 40026b0c <_Timespec_Divide_by_integer> 40025384: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40025388: d0 07 bf bc ld [ %fp + -68 ], %o0 4002538c: 40 00 77 5b call 400430f8 <.div> 40025390: 92 10 23 e8 mov 0x3e8, %o1 40025394: a2 10 00 08 mov %o0, %l1 40025398: d0 07 bf c4 ld [ %fp + -60 ], %o0 4002539c: 40 00 77 57 call 400430f8 <.div> 400253a0: 92 10 23 e8 mov 0x3e8, %o1 400253a4: c2 07 bf e8 ld [ %fp + -24 ], %g1 400253a8: a0 10 00 08 mov %o0, %l0 400253ac: d0 07 bf ec ld [ %fp + -20 ], %o0 400253b0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400253b4: 40 00 77 51 call 400430f8 <.div> 400253b8: 92 10 23 e8 mov 0x3e8, %o1 400253bc: d4 07 bf b8 ld [ %fp + -72 ], %o2 400253c0: d8 07 bf c0 ld [ %fp + -64 ], %o4 400253c4: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 400253c8: 96 10 00 11 mov %l1, %o3 400253cc: 9a 10 00 10 mov %l0, %o5 400253d0: 90 10 00 18 mov %i0, %o0 400253d4: 13 10 01 20 sethi %hi(0x40048000), %o1 400253d8: 9f c6 40 00 call %i1 400253dc: 92 12 62 60 or %o1, 0x260, %o1 ! 40048260 /* * 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 ; 400253e0: 10 bf ff a8 b 40025280 400253e4: 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 ); 400253e8: 94 10 00 16 mov %l6, %o2 400253ec: 7f ff 95 7b call 4000a9d8 400253f0: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400253f4: 10 bf ff b5 b 400252c8 400253f8: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40011240 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40011240: 9d e3 bf 90 save %sp, -112, %sp 40011244: 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 ) 40011248: 80 a6 60 00 cmp %i1, 0 4001124c: 02 80 00 28 be 400112ec 40011250: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40011254: 23 10 00 cd sethi %hi(0x40033400), %l1 40011258: 40 00 09 12 call 400136a0 <_API_Mutex_Lock> 4001125c: d0 04 61 68 ld [ %l1 + 0x168 ], %o0 ! 40033568 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40011260: 92 10 00 10 mov %l0, %o1 40011264: 11 10 00 cc sethi %hi(0x40033000), %o0 40011268: 94 07 bf f0 add %fp, -16, %o2 4001126c: 40 00 10 29 call 40015310 <_Objects_Get_no_protection> 40011270: 90 12 22 ec or %o0, 0x2ec, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011274: c2 07 bf f0 ld [ %fp + -16 ], %g1 40011278: 80 a0 60 00 cmp %g1, 0 4001127c: 12 80 00 16 bne 400112d4 40011280: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40011284: 92 10 00 19 mov %i1, %o1 40011288: 94 10 00 1a mov %i2, %o2 4001128c: 90 02 20 68 add %o0, 0x68, %o0 40011290: 96 07 bf f4 add %fp, -12, %o3 40011294: 40 00 0c 48 call 400143b4 <_Heap_Extend> 40011298: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4001129c: 80 a2 20 01 cmp %o0, 1 400112a0: 02 80 00 11 be 400112e4 400112a4: 01 00 00 00 nop 400112a8: 1a 80 00 13 bcc 400112f4 400112ac: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112b0: c6 07 bf f4 ld [ %fp + -12 ], %g3 400112b4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 400112b8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112bc: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 400112c0: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112c4: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 400112c8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 400112cc: 10 80 00 06 b 400112e4 400112d0: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 400112d4: 80 a0 60 01 cmp %g1, 1 400112d8: 02 80 00 03 be 400112e4 400112dc: 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; 400112e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 400112e4: 40 00 09 05 call 400136f8 <_API_Mutex_Unlock> 400112e8: d0 04 61 68 ld [ %l1 + 0x168 ], %o0 return return_status; } 400112ec: 81 c7 e0 08 ret 400112f0: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 400112f4: 12 bf ff fb bne 400112e0 400112f8: b0 10 20 18 mov 0x18, %i0 400112fc: 30 bf ff fa b,a 400112e4 400115fc : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400115fc: 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 ) 40011600: 80 a6 e0 00 cmp %i3, 0 40011604: 02 80 00 2e be 400116bc 40011608: 21 10 00 cd sethi %hi(0x40033400), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4001160c: 40 00 08 25 call 400136a0 <_API_Mutex_Lock> 40011610: d0 04 21 68 ld [ %l0 + 0x168 ], %o0 ! 40033568 <_RTEMS_Allocator_Mutex> 40011614: 92 10 00 18 mov %i0, %o1 40011618: 11 10 00 cc sethi %hi(0x40033000), %o0 4001161c: 94 07 bf f0 add %fp, -16, %o2 40011620: 40 00 0f 3c call 40015310 <_Objects_Get_no_protection> 40011624: 90 12 22 ec or %o0, 0x2ec, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011628: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001162c: 80 a0 60 00 cmp %g1, 0 40011630: 12 80 00 14 bne 40011680 40011634: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40011638: 94 10 00 1a mov %i2, %o2 4001163c: 92 10 00 19 mov %i1, %o1 40011640: 90 02 20 68 add %o0, 0x68, %o0 40011644: 96 07 bf ec add %fp, -20, %o3 40011648: 40 00 0c e5 call 400149dc <_Heap_Resize_block> 4001164c: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40011650: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 40011654: b4 92 20 00 orcc %o0, 0, %i2 40011658: 12 80 00 13 bne 400116a4 4001165c: c2 26 c0 00 st %g1, [ %i3 ] 40011660: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011668: 12 80 00 17 bne 400116c4 <== NOT EXECUTED 4001166c: d0 04 21 68 ld [ %l0 + 0x168 ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 40011670: 40 00 08 22 call 400136f8 <_API_Mutex_Unlock> <== NOT EXECUTED 40011674: b0 10 20 00 clr %i0 <== NOT EXECUTED 40011678: 81 c7 e0 08 ret <== NOT EXECUTED 4001167c: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011680: d0 04 21 68 ld [ %l0 + 0x168 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011684: 82 18 60 01 xor %g1, 1, %g1 40011688: 80 a0 00 01 cmp %g0, %g1 4001168c: 84 40 3f ff addx %g0, -1, %g2 40011690: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011694: 40 00 08 19 call 400136f8 <_API_Mutex_Unlock> 40011698: b0 06 20 19 add %i0, 0x19, %i0 4001169c: 81 c7 e0 08 ret 400116a0: 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(); 400116a4: d0 04 21 68 ld [ %l0 + 0x168 ], %o0 400116a8: 40 00 08 14 call 400136f8 <_API_Mutex_Unlock> 400116ac: b0 10 20 0d mov 0xd, %i0 return 400116b0: 80 a6 a0 01 cmp %i2, 1 400116b4: 02 80 00 07 be 400116d0 400116b8: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 400116bc: 81 c7 e0 08 ret 400116c0: 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 */ 400116c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400116c8: 40 00 20 d2 call 40019a10 <_Region_Process_queue> <== NOT EXECUTED 400116cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400116d0: 81 c7 e0 08 ret <== NOT EXECUTED 400116d4: 81 e8 00 00 restore <== NOT EXECUTED 400066bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 400066bc: 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 ) ) 400066c0: a4 96 20 00 orcc %i0, 0, %l2 400066c4: 02 80 00 33 be 40006790 400066c8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400066cc: 80 a7 20 00 cmp %i4, 0 400066d0: 02 80 00 30 be 40006790 400066d4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 400066d8: 82 8e a0 c0 andcc %i2, 0xc0, %g1 400066dc: 12 80 00 2f bne 40006798 400066e0: 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 ) ) 400066e4: 80 a4 20 00 cmp %l0, 0 400066e8: 02 80 00 04 be 400066f8 400066ec: 80 a6 60 01 cmp %i1, 1 400066f0: 18 80 00 28 bgu 40006790 400066f4: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400066f8: 05 10 00 66 sethi %hi(0x40019800), %g2 400066fc: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 40019b10 <_Thread_Dispatch_disable_level> 40006700: 82 00 60 01 inc %g1 40006704: c2 20 a3 10 st %g1, [ %g2 + 0x310 ] * 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 ); 40006708: 31 10 00 66 sethi %hi(0x40019800), %i0 4000670c: 40 00 05 6e call 40007cc4 <_Objects_Allocate> 40006710: 90 16 21 d4 or %i0, 0x1d4, %o0 ! 400199d4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40006714: a2 92 20 00 orcc %o0, 0, %l1 40006718: 02 80 00 4e be 40006850 4000671c: 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 ) ) { 40006720: 02 80 00 2c be 400067d0 40006724: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40006728: 80 8e a0 40 btst 0x40, %i2 4000672c: 02 80 00 44 be 4000683c 40006730: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40006734: 82 10 20 02 mov 2, %g1 40006738: 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 ) ) { 4000673c: 80 a4 20 10 cmp %l0, 0x10 40006740: 02 80 00 48 be 40006860 40006744: 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; 40006748: 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; 4000674c: 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( 40006750: 82 1e 60 01 xor %i1, 1, %g1 40006754: 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; 40006758: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 4000675c: 94 60 3f ff subx %g0, -1, %o2 40006760: 90 04 60 14 add %l1, 0x14, %o0 40006764: 40 00 03 3e call 4000745c <_CORE_mutex_Initialize> 40006768: 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 ) { 4000676c: 80 a2 20 06 cmp %o0, 6 40006770: 32 80 00 26 bne,a 40006808 40006774: 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 ); 40006778: 90 16 21 d4 or %i0, 0x1d4, %o0 <== NOT EXECUTED 4000677c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40006780: 40 00 06 4c call 400080b0 <_Objects_Free> <== NOT EXECUTED 40006784: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40006788: 40 00 09 1e call 40008c00 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000678c: 01 00 00 00 nop <== NOT EXECUTED 40006790: 81 c7 e0 08 ret 40006794: 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 ) || 40006798: 80 a4 20 10 cmp %l0, 0x10 4000679c: 02 80 00 06 be 400067b4 400067a0: 80 a4 20 20 cmp %l0, 0x20 400067a4: 02 80 00 05 be 400067b8 400067a8: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400067ac: 81 c7 e0 08 ret 400067b0: 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 ) || 400067b4: 80 8e a0 04 btst 4, %i2 400067b8: 02 bf ff fd be 400067ac 400067bc: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 400067c0: 12 bf ff ca bne 400066e8 400067c4: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 400067c8: 81 c7 e0 08 ret 400067cc: 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 ) ) 400067d0: 80 8e a0 04 btst 4, %i2 400067d4: 22 80 00 04 be,a 400067e4 400067d8: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400067dc: 82 10 20 01 mov 1, %g1 400067e0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400067e4: 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; 400067e8: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400067ec: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400067f0: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400067f4: 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( 400067f8: 90 04 60 14 add %l1, 0x14, %o0 400067fc: 40 00 04 03 call 40007808 <_CORE_semaphore_Initialize> 40006800: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40006804: c4 04 60 08 ld [ %l1 + 8 ], %g2 40006808: 82 16 21 d4 or %i0, 0x1d4, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000680c: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40006810: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40006814: c4 27 00 00 st %g2, [ %i4 ] 40006818: 03 00 00 3f sethi %hi(0xfc00), %g1 4000681c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006820: 84 08 80 01 and %g2, %g1, %g2 40006824: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40006828: b0 10 20 00 clr %i0 4000682c: 40 00 08 f5 call 40008c00 <_Thread_Enable_dispatch> 40006830: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 40006834: 81 c7 e0 08 ret 40006838: 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 ) ) 4000683c: 02 80 00 0f be 40006878 40006840: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40006844: 82 10 20 03 mov 3, %g1 40006848: 10 bf ff bd b 4000673c 4000684c: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40006850: 40 00 08 ec call 40008c00 <_Thread_Enable_dispatch> 40006854: b0 10 20 05 mov 5, %i0 40006858: 81 c7 e0 08 ret 4000685c: 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 ) { 40006860: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006864: 80 a0 60 01 cmp %g1, 1 40006868: 18 80 00 09 bgu 4000688c 4000686c: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40006870: 10 bf ff b8 b 40006750 40006874: 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 ) ) 40006878: 22 bf ff b1 be,a 4000673c 4000687c: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40006880: 82 10 20 01 mov 1, %g1 40006884: 10 bf ff ae b 4000673c 40006888: 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 ) { 4000688c: 80 a0 60 03 cmp %g1, 3 40006890: 18 bf ff b1 bgu 40006754 40006894: 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; 40006898: 82 10 20 01 mov 1, %g1 4000689c: 10 bf ff ad b 40006750 400068a0: c2 2f bf e4 stb %g1, [ %fp + -28 ] 40025564 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40025564: 9d e3 bf 90 save %sp, -112, %sp 40025568: 11 10 01 7f sethi %hi(0x4005fc00), %o0 4002556c: 92 10 00 18 mov %i0, %o1 40025570: 90 12 21 58 or %o0, 0x158, %o0 40025574: 7f ff 9c 75 call 4000c748 <_Objects_Get> 40025578: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4002557c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40025580: 80 a0 60 00 cmp %g1, 0 40025584: 12 80 00 0b bne 400255b0 40025588: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4002558c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40025590: 80 88 60 30 btst 0x30, %g1 40025594: 12 80 00 09 bne 400255b8 40025598: 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( 4002559c: 92 10 20 00 clr %o1 <== NOT EXECUTED 400255a0: 7f ff 99 5c call 4000bb10 <_CORE_semaphore_Flush> <== NOT EXECUTED 400255a4: 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(); 400255a8: 7f ff 9e d2 call 4000d0f0 <_Thread_Enable_dispatch> 400255ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400255b0: 81 c7 e0 08 ret 400255b4: 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( 400255b8: 92 10 20 00 clr %o1 400255bc: 7f ff 98 6a call 4000b764 <_CORE_mutex_Flush> 400255c0: 94 10 20 01 mov 1, %o2 400255c4: 30 bf ff f9 b,a 400255a8 400172c4 : */ void rtems_shutdown_executive( uint32_t result ) { 400172c4: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 400172c8: 05 10 00 67 sethi %hi(0x40019c00), %g2 400172cc: c2 00 a0 b4 ld [ %g2 + 0xb4 ], %g1 ! 40019cb4 <_System_state_Current> 400172d0: 80 a0 60 04 cmp %g1, 4 400172d4: 02 80 00 07 be 400172f0 400172d8: 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 ); 400172dc: 13 10 00 66 sethi %hi(0x40019800), %o1 400172e0: c2 20 a0 b4 st %g1, [ %g2 + 0xb4 ] 400172e4: 92 12 62 88 or %o1, 0x288, %o1 400172e8: 7f ff cb e2 call 4000a270 <_CPU_Context_switch> 400172ec: 90 07 bf 70 add %fp, -144, %o0 400172f0: 81 c7 e0 08 ret <== NOT EXECUTED 400172f4: 81 e8 00 00 restore <== NOT EXECUTED 400089bc : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400089bc: 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() ) 400089c0: 03 10 00 7c sethi %hi(0x4001f000), %g1 400089c4: c4 00 63 c8 ld [ %g1 + 0x3c8 ], %g2 ! 4001f3c8 <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400089c8: 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() ) 400089cc: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 400089d0: c4 08 60 04 ldub [ %g1 + 4 ], %g2 400089d4: 80 a0 a0 00 cmp %g2, 0 400089d8: 02 80 00 1c be 40008a48 400089dc: 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 ) 400089e0: 80 a6 60 0f cmp %i1, 0xf 400089e4: 18 80 00 19 bgu 40008a48 400089e8: b0 10 20 0a mov 0xa, %i0 400089ec: 03 10 00 7c sethi %hi(0x4001f000), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 400089f0: 80 a2 20 00 cmp %o0, 0 400089f4: 02 80 00 17 be 40008a50 400089f8: 86 10 63 f0 or %g1, 0x3f0, %g3 400089fc: 03 10 00 7c sethi %hi(0x4001f000), %g1 40008a00: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4001f3f0 <_Thread_Executing> 40008a04: 86 10 63 f0 or %g1, 0x3f0, %g3 40008a08: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008a0c: 80 a2 00 01 cmp %o0, %g1 40008a10: 22 80 00 11 be,a 40008a54 40008a14: 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 ); 40008a18: 40 00 08 44 call 4000ab28 <_Thread_Get> 40008a1c: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40008a20: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008a24: 80 a0 60 00 cmp %g1, 0 40008a28: 12 80 00 08 bne 40008a48 40008a2c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40008a30: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 40008a34: 82 06 60 08 add %i1, 8, %g1 40008a38: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 40008a3c: b0 10 20 00 clr %i0 40008a40: 40 00 08 2c call 4000aaf0 <_Thread_Enable_dispatch> 40008a44: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40008a48: 81 c7 e0 08 ret 40008a4c: 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; 40008a50: c2 00 c0 00 ld [ %g3 ], %g1 40008a54: 84 06 60 08 add %i1, 8, %g2 40008a58: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 40008a5c: 85 28 a0 02 sll %g2, 2, %g2 40008a60: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 40008a64: 81 c7 e0 08 ret 40008a68: 91 e8 20 00 restore %g0, 0, %o0 4001262c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4001262c: 9d e3 bf 90 save %sp, -112, %sp 40012630: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40012634: 80 a6 60 00 cmp %i1, 0 40012638: 02 80 00 26 be 400126d0 4001263c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40012640: 80 a6 a0 00 cmp %i2, 0 40012644: 02 80 00 23 be 400126d0 40012648: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 4001264c: 11 10 00 cd sethi %hi(0x40033400), %o0 40012650: 92 10 00 12 mov %l2, %o1 40012654: 90 12 23 d0 or %o0, 0x3d0, %o0 40012658: 40 00 0b 40 call 40015358 <_Objects_Get> 4001265c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012660: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012664: a0 10 00 08 mov %o0, %l0 40012668: 80 a0 60 00 cmp %g1, 0 4001266c: 12 80 00 19 bne 400126d0 40012670: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012674: a2 02 20 10 add %o0, 0x10, %l1 40012678: 40 00 13 fd call 4001766c <_Watchdog_Remove> 4001267c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40012680: 7f ff e3 0e call 4000b2b8 40012684: 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 ) { 40012688: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001268c: 80 a0 60 00 cmp %g1, 0 40012690: 12 80 00 12 bne 400126d8 40012694: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012698: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 4001269c: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400126a0: 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; 400126a4: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400126a8: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 400126ac: 7f ff e3 07 call 4000b2c8 400126b0: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400126b4: 92 10 00 11 mov %l1, %o1 400126b8: 11 10 00 cd sethi %hi(0x40033400), %o0 400126bc: 90 12 21 90 or %o0, 0x190, %o0 ! 40033590 <_Watchdog_Ticks_chain> 400126c0: 40 00 13 80 call 400174c0 <_Watchdog_Insert> 400126c4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 400126c8: 40 00 0d 8b call 40015cf4 <_Thread_Enable_dispatch> 400126cc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400126d0: 81 c7 e0 08 ret 400126d4: 81 e8 00 00 restore * 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 ); 400126d8: 7f ff e2 fc call 4000b2c8 <== NOT EXECUTED 400126dc: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400126e0: 40 00 0d 85 call 40015cf4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400126e4: 01 00 00 00 nop <== NOT EXECUTED 400126e8: 81 c7 e0 08 ret <== NOT EXECUTED 400126ec: 81 e8 00 00 restore <== NOT EXECUTED 40012ae4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 40012ae4: 9d e3 bf 90 save %sp, -112, %sp 40012ae8: 92 96 20 00 orcc %i0, 0, %o1 40012aec: 12 80 00 05 bne 40012b00 40012af0: 03 10 00 b8 sethi %hi(0x4002e000), %g1 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 40012af4: 90 10 20 13 mov 0x13, %o0 } return status; } 40012af8: 81 c7 e0 08 ret 40012afc: 91 e8 00 08 restore %g0, %o0, %o0 40012b00: c4 08 62 f4 ldub [ %g1 + 0x2f4 ], %g2 40012b04: 80 a2 40 02 cmp %o1, %g2 40012b08: 18 80 00 56 bgu 40012c60 40012b0c: 80 a2 7f ff cmp %o1, -1 40012b10: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 40012b14: 05 10 00 cd sethi %hi(0x40033400), %g2 40012b18: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 400334b0 <_Thread_Dispatch_disable_level> 40012b1c: 82 00 60 01 inc %g1 40012b20: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012b24: 23 10 00 bb sethi %hi(0x4002ec00), %l1 initialized = true; 40012b28: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012b2c: e0 0c 61 d4 ldub [ %l1 + 0x1d4 ], %l0 initialized = true; _Thread_Enable_dispatch(); 40012b30: 40 00 0c 71 call 40015cf4 <_Thread_Enable_dispatch> 40012b34: c2 2c 61 d4 stb %g1, [ %l1 + 0x1d4 ] if ( tmpInitialized ) 40012b38: 80 a4 20 00 cmp %l0, 0 40012b3c: 12 bf ff ef bne 40012af8 40012b40: 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); 40012b44: 05 10 00 cc sethi %hi(0x40033000), %g2 40012b48: 82 10 a3 cc or %g2, 0x3cc, %g1 ! 400333cc <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012b4c: 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; 40012b50: 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); 40012b54: 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( 40012b58: 92 10 00 18 mov %i0, %o1 40012b5c: 94 10 00 19 mov %i1, %o2 40012b60: 19 00 00 20 sethi %hi(0x8000), %o4 40012b64: c2 20 a3 cc st %g1, [ %g2 + 0x3cc ] 40012b68: 98 16 80 0c or %i2, %o4, %o4 40012b6c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40012b70: 96 10 21 00 mov 0x100, %o3 40012b74: 90 12 21 45 or %o0, 0x145, %o0 40012b78: 7f ff fc 78 call 40011d58 40012b7c: 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) { 40012b80: 80 a2 20 00 cmp %o0, 0 40012b84: 12 80 00 34 bne 40012c54 40012b88: 03 10 00 cc sethi %hi(0x40033000), %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( 40012b8c: 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 ) 40012b90: 86 10 63 6c or %g1, 0x36c, %g3 40012b94: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40012b98: 03 00 00 3f sethi %hi(0xfc00), %g1 40012b9c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40012ba0: 82 0a c0 01 and %o3, %g1, %g1 40012ba4: 80 a0 40 02 cmp %g1, %g2 40012ba8: 18 80 00 05 bgu 40012bbc 40012bac: 98 10 20 00 clr %o4 40012bb0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 40012bb4: 83 28 60 02 sll %g1, 2, %g1 40012bb8: d8 00 80 01 ld [ %g2 + %g1 ], %o4 40012bbc: 09 10 00 cc sethi %hi(0x40033000), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bc0: 1b 10 00 cc sethi %hi(0x40033000), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012bc4: 84 11 23 ac or %g4, 0x3ac, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bc8: 82 13 63 c0 or %o5, 0x3c0, %g1 40012bcc: 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; 40012bd0: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 40012bd4: 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; 40012bd8: 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); 40012bdc: 84 00 a0 04 add %g2, 4, %g2 40012be0: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40012be4: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012be8: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012bec: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 40012bf0: c4 21 23 ac st %g2, [ %g4 + 0x3ac ] 40012bf4: c2 23 63 c0 st %g1, [ %o5 + 0x3c0 ] 40012bf8: 05 10 00 ce sethi %hi(0x40033800), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012bfc: 07 10 00 56 sethi %hi(0x40015800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c00: 03 10 00 cc sethi %hi(0x40033000), %g1 the_watchdog->routine = routine; 40012c04: 86 10 e3 5c or %g3, 0x35c, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c08: 82 10 63 d8 or %g1, 0x3d8, %g1 the_watchdog->routine = routine; 40012c0c: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40012c10: d8 20 a0 14 st %o4, [ %g2 + 0x14 ] 40012c14: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40012c18: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c1c: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012c20: 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; 40012c24: 05 10 00 4b sethi %hi(0x40012c00), %g2 40012c28: 03 10 00 ce sethi %hi(0x40033800), %g1 40012c2c: 84 10 a0 70 or %g2, 0x70, %g2 /* * Start the timer server */ status = rtems_task_start( 40012c30: 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; 40012c34: c4 20 60 10 st %g2, [ %g1 + 0x10 ] /* * Start the timer server */ status = rtems_task_start( 40012c38: 13 10 00 4b sethi %hi(0x40012c00), %o1 40012c3c: 94 10 20 00 clr %o2 40012c40: 7f ff fd 9e call 400122b8 40012c44: 92 12 61 44 or %o1, 0x144, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40012c48: 80 a2 20 00 cmp %o0, 0 40012c4c: 02 bf ff ab be 40012af8 40012c50: 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; 40012c54: c0 2c 61 d4 clrb [ %l1 + 0x1d4 ] } return status; } 40012c58: 81 c7 e0 08 ret 40012c5c: 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 ) 40012c60: 02 bf ff ad be 40012b14 40012c64: 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; 40012c68: 10 bf ff a4 b 40012af8 40012c6c: 90 10 20 13 mov 0x13, %o0 40012864 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 40012864: 9d e3 bf 90 save %sp, -112, %sp 40012868: 11 10 00 cd sethi %hi(0x40033400), %o0 4001286c: 92 10 00 18 mov %i0, %o1 40012870: 90 12 23 d0 or %o0, 0x3d0, %o0 40012874: 40 00 0a b9 call 40015358 <_Objects_Get> 40012878: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001287c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012880: a0 10 00 08 mov %o0, %l0 40012884: 80 a0 60 00 cmp %g1, 0 40012888: 12 80 00 11 bne 400128cc 4001288c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40012890: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012894: 80 a0 60 01 cmp %g1, 1 40012898: 22 80 00 15 be,a 400128ec 4001289c: 31 10 00 ce sethi %hi(0x40033800), %i0 400128a0: 1a 80 00 0d bcc 400128d4 400128a4: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400128a8: a0 02 20 10 add %o0, 0x10, %l0 400128ac: 40 00 13 70 call 4001766c <_Watchdog_Remove> 400128b0: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400128b4: 11 10 00 cd sethi %hi(0x40033400), %o0 400128b8: 92 10 00 10 mov %l0, %o1 400128bc: 40 00 13 01 call 400174c0 <_Watchdog_Insert> 400128c0: 90 12 21 90 or %o0, 0x190, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400128c4: 40 00 0d 0c call 40015cf4 <_Thread_Enable_dispatch> 400128c8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400128cc: 81 c7 e0 08 ret 400128d0: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400128d4: 18 bf ff fc bgu 400128c4 400128d8: 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(); 400128dc: 40 00 0d 06 call 40015cf4 <_Thread_Enable_dispatch> 400128e0: b0 10 20 0b mov 0xb, %i0 ! b 400128e4: 81 c7 e0 08 ret 400128e8: 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 ) { 400128ec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400128f0: 80 a0 60 00 cmp %g1, 0 400128f4: 02 80 00 08 be 40012914 400128f8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400128fc: 40 00 13 5c call 4001766c <_Watchdog_Remove> 40012900: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40012904: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40012908: 9f c0 40 00 call %g1 4001290c: 90 10 00 10 mov %l0, %o0 40012910: 30 bf ff ed b,a 400128c4 _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(); 40012914: 40 00 0c f8 call 40015cf4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012918: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 4001291c: 81 c7 e0 08 ret <== NOT EXECUTED 40012920: 81 e8 00 00 restore <== NOT EXECUTED 40012924 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012924: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012928: 03 10 00 ce sethi %hi(0x40033800), %g1 4001292c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 ! 40033814 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012930: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012934: 80 a0 a0 00 cmp %g2, 0 40012938: 02 80 00 28 be 400129d8 4001293c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40012940: 80 a6 a0 00 cmp %i2, 0 40012944: 02 80 00 25 be 400129d8 40012948: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001294c: 80 a6 60 00 cmp %i1, 0 40012950: 02 80 00 22 be 400129d8 40012954: b0 10 20 0a mov 0xa, %i0 40012958: 11 10 00 cd sethi %hi(0x40033400), %o0 4001295c: 92 10 00 11 mov %l1, %o1 40012960: 90 12 23 d0 or %o0, 0x3d0, %o0 40012964: 40 00 0a 7d call 40015358 <_Objects_Get> 40012968: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001296c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012970: a0 10 00 08 mov %o0, %l0 40012974: 80 a0 60 00 cmp %g1, 0 40012978: 12 80 00 18 bne 400129d8 4001297c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012980: 40 00 13 3b call 4001766c <_Watchdog_Remove> 40012984: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40012988: 7f ff e2 4c call 4000b2b8 4001298c: 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 ) { 40012990: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012994: 80 a0 60 00 cmp %g1, 0 40012998: 12 80 00 12 bne 400129e0 4001299c: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400129a0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400129a4: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400129a8: 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; 400129ac: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400129b0: 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; 400129b4: 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 ); 400129b8: 7f ff e2 44 call 4000b2c8 400129bc: 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 ); 400129c0: 03 10 00 ce sethi %hi(0x40033800), %g1 400129c4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 40033810 <_Timer_Server_schedule_operation> 400129c8: 9f c0 80 00 call %g2 400129cc: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400129d0: 40 00 0c c9 call 40015cf4 <_Thread_Enable_dispatch> 400129d4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400129d8: 81 c7 e0 08 ret 400129dc: 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 ); 400129e0: 7f ff e2 3a call 4000b2c8 <== NOT EXECUTED 400129e4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400129e8: 40 00 0c c3 call 40015cf4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400129ec: 01 00 00 00 nop <== NOT EXECUTED 400129f0: 81 c7 e0 08 ret <== NOT EXECUTED 400129f4: 81 e8 00 00 restore <== NOT EXECUTED