020060ec <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 20060ec: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20060f0: 03 00 80 5d sethi %hi(0x2017400), %g1 20060f4: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20174e4 <_API_extensions_List> 20060f8: 82 10 60 e4 or %g1, 0xe4, %g1 20060fc: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006100: 80 a4 00 11 cmp %l0, %l1 2006104: 02 80 00 0c be 2006134 <_API_extensions_Run_postdriver+0x48> 2006108: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 200610c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2006110: 80 a0 60 00 cmp %g1, 0 2006114: 22 80 00 05 be,a 2006128 <_API_extensions_Run_postdriver+0x3c> 2006118: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 200611c: 9f c0 40 00 call %g1 2006120: 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 ) { 2006124: 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 ) ; 2006128: 80 a4 00 11 cmp %l0, %l1 200612c: 32 bf ff f9 bne,a 2006110 <_API_extensions_Run_postdriver+0x24> 2006130: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 2006134: 81 c7 e0 08 ret 2006138: 81 e8 00 00 restore 0200613c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 200613c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006140: 03 00 80 5d sethi %hi(0x2017400), %g1 2006144: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20174e4 <_API_extensions_List> 2006148: 82 10 60 e4 or %g1, 0xe4, %g1 200614c: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006150: 80 a4 00 11 cmp %l0, %l1 2006154: 02 80 00 0d be 2006188 <_API_extensions_Run_postswitch+0x4c> 2006158: 03 00 80 5c sethi %hi(0x2017000), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 200615c: a4 10 63 64 or %g1, 0x364, %l2 ! 2017364 <_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 ) 2006160: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2006164: 80 a0 60 00 cmp %g1, 0 2006168: 22 80 00 05 be,a 200617c <_API_extensions_Run_postswitch+0x40> 200616c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 2006170: 9f c0 40 00 call %g1 2006174: 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 ) { 2006178: 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 ) ; 200617c: 80 a4 00 11 cmp %l0, %l1 2006180: 32 bf ff f9 bne,a 2006164 <_API_extensions_Run_postswitch+0x28> 2006184: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 2006188: 81 c7 e0 08 ret 200618c: 81 e8 00 00 restore 0200609c <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 200609c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20060a0: 03 00 80 5d sethi %hi(0x2017400), %g1 20060a4: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20174e4 <_API_extensions_List> 20060a8: 82 10 60 e4 or %g1, 0xe4, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20060ac: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 20060b0: 80 a4 00 11 cmp %l0, %l1 20060b4: 02 80 00 0c be 20060e4 <_API_extensions_Run_predriver+0x48> 20060b8: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 20060bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 20060c0: 80 a0 60 00 cmp %g1, 0 20060c4: 22 80 00 05 be,a 20060d8 <_API_extensions_Run_predriver+0x3c> 20060c8: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 20060cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 20060d0: 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 ) { 20060d4: 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 ) ; 20060d8: 80 a4 00 11 cmp %l0, %l1 20060dc: 32 bf ff f9 bne,a 20060c0 <_API_extensions_Run_predriver+0x24> 20060e0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 20060e4: 81 c7 e0 08 ret 20060e8: 81 e8 00 00 restore 02012688 <_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 ) { 2012688: 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 ) { 201268c: 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 ) { 2012690: 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 ) { 2012694: 80 a0 40 1a cmp %g1, %i2 2012698: 0a 80 00 17 bcs 20126f4 <_CORE_message_queue_Broadcast+0x6c> 201269c: 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 ) { 20126a0: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 20126a4: 80 a0 60 00 cmp %g1, 0 20126a8: 02 80 00 0a be 20126d0 <_CORE_message_queue_Broadcast+0x48> 20126ac: a2 10 20 00 clr %l1 *count = 0; 20126b0: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 20126b4: 81 c7 e0 08 ret <== NOT EXECUTED 20126b8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20126bc: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 20126c0: 40 00 20 d2 call 201aa08 20126c4: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 20126c8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 20126cc: 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))) { 20126d0: 40 00 0a 40 call 2014fd0 <_Thread_queue_Dequeue> 20126d4: 90 10 00 12 mov %l2, %o0 20126d8: 92 10 00 19 mov %i1, %o1 20126dc: a0 10 00 08 mov %o0, %l0 20126e0: 80 a2 20 00 cmp %o0, 0 20126e4: 12 bf ff f6 bne 20126bc <_CORE_message_queue_Broadcast+0x34> 20126e8: 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; 20126ec: e2 27 40 00 st %l1, [ %i5 ] 20126f0: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 20126f4: 81 c7 e0 08 ret 20126f8: 81 e8 00 00 restore 02017380 <_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 ) { 2017380: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 2017384: 03 20 00 00 sethi %hi(0x80000000), %g1 2017388: 80 a6 80 01 cmp %i2, %g1 201738c: 02 80 00 41 be 2017490 <_CORE_message_queue_Insert_message+0x110> 2017390: f4 26 60 08 st %i2, [ %i1 + 8 ] 2017394: 82 00 7c 00 add %g1, -1024, %g1 2017398: 82 10 63 ff or %g1, 0x3ff, %g1 201739c: 80 a6 80 01 cmp %i2, %g1 20173a0: 02 80 00 2a be 2017448 <_CORE_message_queue_Insert_message+0xc8> 20173a4: 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; 20173a8: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 20173ac: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 20173b0: 32 80 00 22 bne,a 2017438 <_CORE_message_queue_Insert_message+0xb8> <== NOT EXECUTED 20173b4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 20173b8: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 20173bc: 7f ff ac 86 call 20025d4 <== NOT EXECUTED 20173c0: 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 ); 20173c4: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 20173c8: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 20173cc: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 20173d0: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 20173d4: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 20173d8: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 20173dc: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 20173e0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 20173e4: 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; 20173e8: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 20173ec: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 20173f0: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 20173f4: 7f ff ac 7c call 20025e4 <== NOT EXECUTED 20173f8: 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 ) 20173fc: 80 8c 20 ff btst 0xff, %l0 <== NOT EXECUTED 2017400: 02 80 00 08 be 2017420 <_CORE_message_queue_Insert_message+0xa0> 2017404: 01 00 00 00 nop 2017408: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 201740c: 80 a0 60 00 cmp %g1, 0 2017410: 02 80 00 04 be 2017420 <_CORE_message_queue_Insert_message+0xa0> 2017414: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 2017418: 9f c0 40 00 call %g1 <== NOT EXECUTED 201741c: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 2017420: 81 c7 e0 08 ret 2017424: 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 ) ) { 2017428: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 201742c: 22 bf ff e4 be,a 20173bc <_CORE_message_queue_Insert_message+0x3c> <== NOT EXECUTED 2017430: 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 ) { 2017434: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 2017438: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 201743c: 36 bf ff fb bge,a 2017428 <_CORE_message_queue_Insert_message+0xa8> <== NOT EXECUTED 2017440: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 2017444: 30 bf ff de b,a 20173bc <_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 ); 2017448: 7f ff ac 63 call 20025d4 201744c: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 2017450: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2017454: 82 06 20 54 add %i0, 0x54, %g1 2017458: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 201745c: c6 06 20 58 ld [ %i0 + 0x58 ], %g3 the_chain->last = the_node; 2017460: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 2017464: 80 a0 00 02 cmp %g0, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2017468: c6 26 60 04 st %g3, [ %i1 + 4 ] 201746c: 82 60 3f ff subx %g0, -1, %g1 2017470: 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; 2017474: f2 20 c0 00 st %i1, [ %g3 ] 2017478: a0 10 00 01 mov %g1, %l0 201747c: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 2017480: 7f ff ac 59 call 20025e4 2017484: 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 ) 2017488: 10 bf ff de b 2017400 <_CORE_message_queue_Insert_message+0x80> 201748c: 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 ); 2017490: 7f ff ac 51 call 20025d4 2017494: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 2017498: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 201749c: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 20174a0: 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; 20174a4: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 20174a8: c2 26 60 04 st %g1, [ %i1 + 4 ] 20174ac: 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; 20174b0: f2 20 e0 04 st %i1, [ %g3 + 4 ] 20174b4: 82 60 3f ff subx %g0, -1, %g1 20174b8: 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; 20174bc: c6 26 40 00 st %g3, [ %i1 ] 20174c0: a0 10 00 01 mov %g1, %l0 20174c4: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 20174c8: 7f ff ac 47 call 20025e4 20174cc: 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 ) 20174d0: 10 bf ff cc b 2017400 <_CORE_message_queue_Insert_message+0x80> 20174d4: 80 8c 20 ff btst 0xff, %l0 020140ec <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 20140ec: 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; 20140f0: 27 00 80 9f sethi %hi(0x2027c00), %l3 20140f4: e2 04 e2 e4 ld [ %l3 + 0x2e4 ], %l1 ! 2027ee4 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 20140f8: 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 ); 20140fc: 7f ff b9 36 call 20025d4 2014100: 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)); 2014104: 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)) 2014108: 82 06 20 54 add %i0, 0x54, %g1 201410c: 80 a6 40 01 cmp %i1, %g1 2014110: 02 80 00 21 be 2014194 <_CORE_message_queue_Seize+0xa8> 2014114: 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; 2014118: 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; 201411c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_chain->first = new_first; 2014120: c6 26 20 50 st %g3, [ %i0 + 0x50 ] 2014124: 82 00 7f ff add %g1, -1, %g1 2014128: c2 26 20 48 st %g1, [ %i0 + 0x48 ] new_first->previous = _Chain_Head(the_chain); 201412c: c4 20 e0 04 st %g2, [ %g3 + 4 ] _ISR_Enable( level ); 2014130: 7f ff b9 2d call 20025e4 2014134: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 2014138: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 201413c: c4 04 e2 e4 ld [ %l3 + 0x2e4 ], %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; 2014140: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 2014144: c2 06 60 08 ld [ %i1 + 8 ], %g1 2014148: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 201414c: 92 10 00 11 mov %l1, %o1 2014150: 40 00 14 95 call 20193a4 2014154: 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 ); 2014158: 7f ff e9 13 call 200e5a4 <_Thread_queue_Dequeue> 201415c: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 2014160: 80 a2 20 00 cmp %o0, 0 2014164: 02 80 00 1f be 20141e0 <_CORE_message_queue_Seize+0xf4> 2014168: 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; 201416c: 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; 2014170: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 2014174: 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; 2014178: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED 201417c: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 2014180: 40 00 14 89 call 20193a4 <== NOT EXECUTED 2014184: 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( 2014188: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 201418c: 40 00 0c 7d call 2017380 <_CORE_message_queue_Insert_message> <== NOT EXECUTED 2014190: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 2014194: 80 8f 20 ff btst 0xff, %i4 2014198: 02 80 00 0c be 20141c8 <_CORE_message_queue_Seize+0xdc> 201419c: 82 10 20 01 mov 1, %g1 20141a0: 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; 20141a4: 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; 20141a8: f0 24 60 44 st %i0, [ %l1 + 0x44 ] executing->Wait.id = id; 20141ac: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 20141b0: 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 ); 20141b4: 7f ff b9 0c call 20025e4 20141b8: 35 00 80 3a sethi %hi(0x200e800), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 20141bc: b2 10 00 1d mov %i5, %i1 20141c0: 7f ff e9 5d call 200e734 <_Thread_queue_Enqueue_with_handler> 20141c4: 95 ee a3 8c restore %i2, 0x38c, %o2 ); return; } if ( !wait ) { _ISR_Enable( level ); 20141c8: 7f ff b9 07 call 20025e4 20141cc: 01 00 00 00 nop executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 20141d0: 82 10 20 04 mov 4, %g1 ! 4 20141d4: 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 ); } 20141d8: 81 c7 e0 08 ret 20141dc: 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 ); 20141e0: 7f ff e1 a1 call 200c864 <_Chain_Append> 20141e4: 91 ee 20 68 restore %i0, 0x68, %o0 20141e8: 01 00 00 00 nop 020141ec <_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 ) { 20141ec: 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 ) { 20141f0: 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 ) { 20141f4: 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 ) { 20141f8: 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 ) { 20141fc: 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 ) { 2014200: 0a 80 00 22 bcs 2014288 <_CORE_message_queue_Submit+0x9c> 2014204: 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 ) { 2014208: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 201420c: 80 a0 a0 00 cmp %g2, 0 2014210: 02 80 00 22 be 2014298 <_CORE_message_queue_Submit+0xac> 2014214: 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 < 2014218: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 201421c: 80 a0 40 02 cmp %g1, %g2 2014220: 18 80 00 2b bgu 20142cc <_CORE_message_queue_Submit+0xe0> 2014224: 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 ) { 2014228: 02 80 00 18 be 2014288 <_CORE_message_queue_Submit+0x9c> 201422c: 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() ) { 2014230: 03 00 80 9f sethi %hi(0x2027c00), %g1 <== NOT EXECUTED 2014234: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 2027ec0 <_ISR_Nest_level> <== NOT EXECUTED 2014238: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 201423c: 32 80 00 13 bne,a 2014288 <_CORE_message_queue_Submit+0x9c> <== NOT EXECUTED 2014240: 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; 2014244: 03 00 80 9f sethi %hi(0x2027c00), %g1 <== NOT EXECUTED _ISR_Disable( level ); 2014248: 7f ff b8 e3 call 20025d4 <== NOT EXECUTED 201424c: e0 00 62 e4 ld [ %g1 + 0x2e4 ], %l0 ! 2027ee4 <_Thread_Executing> <== NOT EXECUTED 2014250: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2014254: 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; 2014258: 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; 201425c: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 2014260: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 2014264: 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; 2014268: 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 ); 201426c: 7f ff b8 de call 20025e4 <== NOT EXECUTED 2014270: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 2014274: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 2014278: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201427c: 15 00 80 3a sethi %hi(0x200e800), %o2 <== NOT EXECUTED 2014280: 7f ff e9 2d call 200e734 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 2014284: 94 12 a3 8c or %o2, 0x38c, %o2 ! 200eb8c <_Thread_queue_Timeout> <== NOT EXECUTED 2014288: 81 c7 e0 08 ret 201428c: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 2014290: 81 c7 e0 08 ret <== NOT EXECUTED 2014294: 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 ); 2014298: 7f ff e8 c3 call 200e5a4 <_Thread_queue_Dequeue> 201429c: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 20142a0: a0 92 20 00 orcc %o0, 0, %l0 20142a4: 02 80 00 1b be 2014310 <_CORE_message_queue_Submit+0x124> 20142a8: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20142ac: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 20142b0: 40 00 14 3d call 20193a4 20142b4: 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; 20142b8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 20142bc: 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; 20142c0: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 20142c4: 81 c7 e0 08 ret 20142c8: 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 *) 20142cc: 7f ff e1 72 call 200c894 <_Chain_Get> 20142d0: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 20142d4: a0 92 20 00 orcc %o0, 0, %l0 20142d8: 02 bf ff ee be 2014290 <_CORE_message_queue_Submit+0xa4> 20142dc: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20142e0: 94 10 00 1a mov %i2, %o2 20142e4: 40 00 14 30 call 20193a4 20142e8: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 20142ec: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 20142f0: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 20142f4: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 20142f8: 92 10 00 10 mov %l0, %o1 20142fc: 94 10 00 1d mov %i5, %o2 2014300: 40 00 0c 20 call 2017380 <_CORE_message_queue_Insert_message> 2014304: b0 10 20 00 clr %i0 2014308: 81 c7 e0 08 ret 201430c: 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 ) { 2014310: 10 bf ff c2 b 2014218 <_CORE_message_queue_Submit+0x2c> 2014314: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 0200b7d8 <_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 ) { 200b7d8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 200b7dc: 03 00 80 5c sethi %hi(0x2017000), %g1 200b7e0: c6 00 63 64 ld [ %g1 + 0x364 ], %g3 ! 2017364 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 200b7e4: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200b7e8: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200b7ec: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200b7f0: 80 a0 60 00 cmp %g1, 0 200b7f4: 22 80 00 12 be,a 200b83c <_CORE_mutex_Seize_interrupt_trylock+0x64> 200b7f8: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 200b7fc: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200b800: 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; 200b804: 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; 200b808: 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; 200b80c: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200b810: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200b814: 80 a0 a0 02 cmp %g2, 2 200b818: 02 80 00 0e be 200b850 <_CORE_mutex_Seize_interrupt_trylock+0x78> 200b81c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 200b820: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 200b824: 22 80 00 0d be,a 200b858 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== NOT EXECUTED 200b828: 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 ); 200b82c: 7f ff d9 62 call 2001db4 200b830: b0 10 20 00 clr %i0 200b834: 81 c7 e0 08 ret 200b838: 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 ) ) { 200b83c: 80 a0 c0 01 cmp %g3, %g1 200b840: 22 80 00 2a be,a 200b8e8 <_CORE_mutex_Seize_interrupt_trylock+0x110> 200b844: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200b848: 81 c7 e0 08 ret 200b84c: 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++; 200b850: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b854: 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++; 200b858: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b85c: 12 bf ff f4 bne 200b82c <_CORE_mutex_Seize_interrupt_trylock+0x54> 200b860: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200b864: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 <== NOT EXECUTED current = executing->current_priority; 200b868: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 200b86c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 200b870: 02 80 00 2f be 200b92c <_CORE_mutex_Seize_interrupt_trylock+0x154> <== NOT EXECUTED 200b874: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 200b878: 1a 80 00 11 bcc 200b8bc <_CORE_mutex_Seize_interrupt_trylock+0xe4> <== NOT EXECUTED 200b87c: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200b880: 05 00 80 5c sethi %hi(0x2017000), %g2 <== NOT EXECUTED 200b884: c2 00 a2 a0 ld [ %g2 + 0x2a0 ], %g1 ! 20172a0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 200b888: 82 00 60 01 inc %g1 <== NOT EXECUTED 200b88c: c2 20 a2 a0 st %g1, [ %g2 + 0x2a0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 200b890: 7f ff d9 49 call 2001db4 <== NOT EXECUTED 200b894: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 200b898: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 200b89c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 200b8a0: 94 10 20 00 clr %o2 <== NOT EXECUTED 200b8a4: 7f ff ee fe call 200749c <_Thread_Change_priority> <== NOT EXECUTED 200b8a8: b0 10 20 00 clr %i0 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 200b8ac: 7f ff f0 92 call 2007af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 200b8b0: 01 00 00 00 nop <== NOT EXECUTED 200b8b4: 81 c7 e0 08 ret <== NOT EXECUTED 200b8b8: 81 e8 00 00 restore <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200b8bc: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 200b8c0: 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; 200b8c4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 200b8c8: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200b8cc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 200b8d0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200b8d4: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 200b8d8: 7f ff d9 37 call 2001db4 <== NOT EXECUTED 200b8dc: b0 10 20 00 clr %i0 <== NOT EXECUTED 200b8e0: 81 c7 e0 08 ret <== NOT EXECUTED 200b8e4: 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 ) { 200b8e8: 80 a0 60 00 cmp %g1, 0 200b8ec: 22 80 00 0a be,a 200b914 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 200b8f0: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200b8f4: 80 a0 60 01 cmp %g1, 1 200b8f8: 12 bf ff d4 bne 200b848 <_CORE_mutex_Seize_interrupt_trylock+0x70> 200b8fc: 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; 200b900: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 200b904: 7f ff d9 2c call 2001db4 200b908: b0 10 20 00 clr %i0 200b90c: 81 c7 e0 08 ret 200b910: 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++; 200b914: 82 00 60 01 inc %g1 200b918: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 200b91c: 7f ff d9 26 call 2001db4 200b920: b0 10 20 00 clr %i0 200b924: 81 c7 e0 08 ret 200b928: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 200b92c: 7f ff d9 22 call 2001db4 <== NOT EXECUTED 200b930: b0 10 20 00 clr %i0 <== NOT EXECUTED 200b934: 81 c7 e0 08 ret <== NOT EXECUTED 200b938: 81 e8 00 00 restore <== NOT EXECUTED 0200650c <_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 ) { 200650c: 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 ) { 2006510: 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 ) { 2006514: 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 ) { 2006518: 80 a0 60 00 cmp %g1, 0 200651c: 02 80 00 07 be 2006538 <_CORE_mutex_Surrender+0x2c> 2006520: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 2006524: 03 00 80 5c sethi %hi(0x2017000), %g1 2006528: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 2017364 <_Thread_Executing> 200652c: 80 a2 00 02 cmp %o0, %g2 2006530: 12 80 00 2e bne 20065e8 <_CORE_mutex_Surrender+0xdc> 2006534: 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 ) 2006538: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 200653c: 80 a0 60 00 cmp %g1, 0 2006540: 02 80 00 22 be 20065c8 <_CORE_mutex_Surrender+0xbc> 2006544: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 2006548: 80 a0 60 00 cmp %g1, 0 200654c: 12 80 00 21 bne 20065d0 <_CORE_mutex_Surrender+0xc4> 2006550: 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; 2006554: 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 ) || 2006558: 80 a0 a0 02 cmp %g2, 2 200655c: 02 80 00 31 be 2006620 <_CORE_mutex_Surrender+0x114> 2006560: 80 a0 a0 03 cmp %g2, 3 2006564: 22 80 00 30 be,a 2006624 <_CORE_mutex_Surrender+0x118> 2006568: 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; 200656c: 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 ) || 2006570: 80 a0 a0 02 cmp %g2, 2 2006574: 02 80 00 1f be 20065f0 <_CORE_mutex_Surrender+0xe4> 2006578: c0 24 20 60 clr [ %l0 + 0x60 ] 200657c: 80 a0 a0 03 cmp %g2, 3 2006580: 22 80 00 1d be,a 20065f4 <_CORE_mutex_Surrender+0xe8> 2006584: 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 ) ) ) { 2006588: 40 00 06 55 call 2007edc <_Thread_queue_Dequeue> 200658c: 90 10 00 10 mov %l0, %o0 2006590: 86 92 20 00 orcc %o0, 0, %g3 2006594: 02 80 00 37 be 2006670 <_CORE_mutex_Surrender+0x164> 2006598: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 200659c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 20065a0: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 20065a4: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 20065a8: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 20065ac: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 20065b0: 80 a0 a0 02 cmp %g2, 2 20065b4: 02 80 00 2a be 200665c <_CORE_mutex_Surrender+0x150> 20065b8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 20065bc: 80 a0 a0 03 cmp %g2, 3 20065c0: 22 80 00 1c be,a 2006630 <_CORE_mutex_Surrender+0x124> 20065c4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 20065c8: 81 c7 e0 08 ret 20065cc: 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 ) { 20065d0: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 20065d4: 80 a0 60 00 cmp %g1, 0 20065d8: 02 bf ff fc be 20065c8 <_CORE_mutex_Surrender+0xbc> 20065dc: 80 a0 60 01 cmp %g1, 1 20065e0: 12 bf ff dd bne 2006554 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 20065e4: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 20065e8: 81 c7 e0 08 ret 20065ec: 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 && 20065f0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20065f4: 80 a0 60 00 cmp %g1, 0 20065f8: 12 bf ff e4 bne 2006588 <_CORE_mutex_Surrender+0x7c> 20065fc: 01 00 00 00 nop 2006600: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 2006604: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2006608: 80 a2 40 01 cmp %o1, %g1 200660c: 02 bf ff df be 2006588 <_CORE_mutex_Surrender+0x7c> 2006610: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 2006614: 40 00 03 a2 call 200749c <_Thread_Change_priority> 2006618: 94 10 20 01 mov 1, %o2 ! 1 200661c: 30 bf ff db b,a 2006588 <_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--; 2006620: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2006624: 82 00 7f ff add %g1, -1, %g1 2006628: 10 bf ff d1 b 200656c <_CORE_mutex_Surrender+0x60> 200662c: 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 < 2006630: 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++; 2006634: 82 00 60 01 inc %g1 <== NOT EXECUTED 2006638: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 200663c: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 2006640: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 2006644: 1a bf ff e1 bcc 20065c8 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED 2006648: 94 10 20 00 clr %o2 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 200664c: 40 00 03 94 call 200749c <_Thread_Change_priority> <== NOT EXECUTED 2006650: b0 10 20 00 clr %i0 <== NOT EXECUTED 2006654: 81 c7 e0 08 ret <== NOT EXECUTED 2006658: 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++; 200665c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2006660: 82 00 60 01 inc %g1 2006664: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 2006668: 81 c7 e0 08 ret 200666c: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 2006670: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 2006674: 81 c7 e0 08 ret 2006678: 91 e8 20 00 restore %g0, 0, %o0 02023e14 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 2023e14: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 2023e18: 7f ff 7b f1 call 2002ddc <== NOT EXECUTED 2023e1c: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2023e20: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2023e24: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2023e28: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 2023e2c: 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; 2023e30: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 2023e34: 7f ff 7b ee call 2002dec <== NOT EXECUTED 2023e38: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 2023e3c: 01 00 00 00 nop 0200b698 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 200b698: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 200b69c: c4 00 63 68 ld [ %g1 + 0x368 ], %g2 ! 2017368 <_Debug_Level> <== NOT EXECUTED 200b6a0: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 200b6a4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 200b6a8: 81 c3 e0 08 retl <== NOT EXECUTED 200b6ac: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 020052e4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 20052e4: 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 ]; 20052e8: f2 06 21 68 ld [ %i0 + 0x168 ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 20052ec: 7f ff f2 ae call 2001da4 20052f0: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 20052f4: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 20052f8: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 20052fc: 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 ) ) { 2005300: 9a 88 c0 04 andcc %g3, %g4, %o5 2005304: 02 80 00 28 be 20053a4 <_Event_Surrender+0xc0> 2005308: 03 00 80 5c sethi %hi(0x2017000), %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() && 200530c: c4 00 63 40 ld [ %g1 + 0x340 ], %g2 ! 2017340 <_ISR_Nest_level> 2005310: 80 a0 a0 00 cmp %g2, 0 2005314: 22 80 00 08 be,a 2005334 <_Event_Surrender+0x50> 2005318: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200531c: 03 00 80 5c sethi %hi(0x2017000), %g1 2005320: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 2017364 <_Thread_Executing> 2005324: 80 a6 00 02 cmp %i0, %g2 2005328: 02 80 00 2a be 20053d0 <_Event_Surrender+0xec> 200532c: 19 00 80 5d sethi %hi(0x2017400), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005330: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2005334: 80 88 61 00 btst 0x100, %g1 2005338: 02 80 00 19 be 200539c <_Event_Surrender+0xb8> 200533c: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005340: 02 80 00 04 be 2005350 <_Event_Surrender+0x6c> 2005344: 80 8c 60 02 btst 2, %l1 2005348: 02 80 00 15 be 200539c <_Event_Surrender+0xb8> 200534c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005350: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005354: 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 ); 2005358: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 200535c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005360: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 2005364: 7f ff f2 94 call 2001db4 2005368: 90 10 00 10 mov %l0, %o0 200536c: 7f ff f2 8e call 2001da4 2005370: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005374: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2005378: 80 a0 60 02 cmp %g1, 2 200537c: 02 80 00 0c be 20053ac <_Event_Surrender+0xc8> 2005380: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005384: 90 10 00 10 mov %l0, %o0 2005388: 7f ff f2 8b call 2001db4 200538c: 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 ); 2005390: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005394: 40 00 08 bf call 2007690 <_Thread_Clear_state> 2005398: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200539c: 7f ff f2 86 call 2001db4 <== NOT EXECUTED 20053a0: 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 ); 20053a4: 7f ff f2 84 call 2001db4 20053a8: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 20053ac: 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 ); 20053b0: 7f ff f2 81 call 2001db4 20053b4: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 20053b8: 40 00 0e f0 call 2008f78 <_Watchdog_Remove> 20053bc: 90 06 20 48 add %i0, 0x48, %o0 20053c0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 20053c4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 20053c8: 40 00 08 b2 call 2007690 <_Thread_Clear_state> 20053cc: 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() && 20053d0: c2 03 21 74 ld [ %o4 + 0x174 ], %g1 20053d4: 80 a0 60 01 cmp %g1, 1 20053d8: 02 80 00 07 be 20053f4 <_Event_Surrender+0x110> 20053dc: 80 a0 c0 0d cmp %g3, %o5 20053e0: c2 03 21 74 ld [ %o4 + 0x174 ], %g1 20053e4: 80 a0 60 02 cmp %g1, 2 20053e8: 32 bf ff d3 bne,a 2005334 <_Event_Surrender+0x50> 20053ec: 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) ) { 20053f0: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 20053f4: 02 80 00 04 be 2005404 <_Event_Surrender+0x120> 20053f8: 80 8c 60 02 btst 2, %l1 20053fc: 02 80 00 09 be 2005420 <_Event_Surrender+0x13c> <== NOT EXECUTED 2005400: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2005404: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005408: 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 ); 200540c: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 2005410: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005414: 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; 2005418: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 200541c: c2 23 21 74 st %g1, [ %o4 + 0x174 ] } _ISR_Enable( level ); 2005420: 7f ff f2 65 call 2001db4 2005424: 91 e8 00 10 restore %g0, %l0, %o0 2005428: 01 00 00 00 nop 0200542c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 200542c: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2005430: 90 10 00 18 mov %i0, %o0 2005434: 40 00 09 be call 2007b2c <_Thread_Get> 2005438: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 200543c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005440: 80 a0 60 00 cmp %g1, 0 2005444: 12 80 00 19 bne 20054a8 <_Event_Timeout+0x7c> 2005448: 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 ); 200544c: 7f ff f2 56 call 2001da4 2005450: 01 00 00 00 nop 2005454: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 2005458: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200545c: 80 a0 60 00 cmp %g1, 0 2005460: 02 80 00 14 be 20054b0 <_Event_Timeout+0x84> 2005464: 03 00 80 5c sethi %hi(0x2017000), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005468: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 2017364 <_Thread_Executing> 200546c: 80 a6 00 02 cmp %i0, %g2 2005470: 02 80 00 18 be 20054d0 <_Event_Timeout+0xa4> 2005474: 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; 2005478: 82 10 20 06 mov 6, %g1 200547c: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 2005480: 7f ff f2 4d call 2001db4 2005484: 90 10 00 03 mov %g3, %o0 2005488: 90 10 00 18 mov %i0, %o0 200548c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005490: 40 00 08 80 call 2007690 <_Thread_Clear_state> 2005494: 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; 2005498: 05 00 80 5c sethi %hi(0x2017000), %g2 200549c: c2 00 a2 a0 ld [ %g2 + 0x2a0 ], %g1 ! 20172a0 <_Thread_Dispatch_disable_level> 20054a0: 82 00 7f ff add %g1, -1, %g1 20054a4: c2 20 a2 a0 st %g1, [ %g2 + 0x2a0 ] 20054a8: 81 c7 e0 08 ret 20054ac: 81 e8 00 00 restore 20054b0: 05 00 80 5c sethi %hi(0x2017000), %g2 <== NOT EXECUTED 20054b4: c2 00 a2 a0 ld [ %g2 + 0x2a0 ], %g1 ! 20172a0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 20054b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20054bc: c2 20 a2 a0 st %g1, [ %g2 + 0x2a0 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 20054c0: 7f ff f2 3d call 2001db4 <== NOT EXECUTED 20054c4: 01 00 00 00 nop <== NOT EXECUTED 20054c8: 81 c7 e0 08 ret <== NOT EXECUTED 20054cc: 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; 20054d0: 05 00 80 5d sethi %hi(0x2017400), %g2 20054d4: c2 00 a1 74 ld [ %g2 + 0x174 ], %g1 ! 2017574 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 20054d8: 80 a0 60 01 cmp %g1, 1 20054dc: 38 bf ff e8 bgu,a 200547c <_Event_Timeout+0x50> 20054e0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 20054e4: 82 10 20 02 mov 2, %g1 20054e8: c2 20 a1 74 st %g1, [ %g2 + 0x174 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20054ec: 10 bf ff e4 b 200547c <_Event_Timeout+0x50> 20054f0: 82 10 20 06 mov 6, %g1 02008aa0 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 2008aa0: 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; 2008aa4: 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); 2008aa8: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2008aac: 90 10 00 19 mov %i1, %o0 2008ab0: 92 10 00 16 mov %l6, %o1 2008ab4: 40 00 01 82 call 20090bc <_Heap_Calc_block_size> 2008ab8: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 2008abc: ae 92 20 00 orcc %o0, 0, %l7 2008ac0: 02 80 00 69 be 2008c64 <_Heap_Allocate_aligned+0x1c4> 2008ac4: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 2008ac8: 80 a6 a0 00 cmp %i2, 0 2008acc: 22 80 00 02 be,a 2008ad4 <_Heap_Allocate_aligned+0x34> 2008ad0: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 2008ad4: 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; 2008ad8: 80 a5 40 11 cmp %l5, %l1 2008adc: 02 80 00 62 be 2008c64 <_Heap_Allocate_aligned+0x1c4> 2008ae0: 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); 2008ae4: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008ae8: 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); 2008aec: 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; 2008af0: 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. */ 2008af4: 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; 2008af8: 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. */ 2008afc: 18 80 00 22 bgu 2008b84 <_Heap_Allocate_aligned+0xe4> 2008b00: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008b04: 40 00 3d 9c call 2018174 <.urem> 2008b08: 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)); 2008b0c: 92 10 00 16 mov %l6, %o1 2008b10: b0 24 00 08 sub %l0, %o0, %i0 2008b14: 40 00 3d 98 call 2018174 <.urem> 2008b18: 90 10 00 18 mov %i0, %o0 2008b1c: a0 04 60 08 add %l1, 8, %l0 2008b20: 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) { 2008b24: 80 a4 00 02 cmp %l0, %g2 2008b28: 38 80 00 18 bgu,a 2008b88 <_Heap_Allocate_aligned+0xe8> 2008b2c: 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) { 2008b30: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 2008b34: 82 20 80 10 sub %g2, %l0, %g1 2008b38: 80 a0 40 1d cmp %g1, %i5 2008b3c: 1a 80 00 1e bcc 2008bb4 <_Heap_Allocate_aligned+0x114> 2008b40: 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) { 2008b44: 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; 2008b48: 90 10 00 10 mov %l0, %o0 2008b4c: 92 10 00 1a mov %i2, %o1 2008b50: 80 a5 80 01 cmp %l6, %g1 2008b54: 18 80 00 17 bgu 2008bb0 <_Heap_Allocate_aligned+0x110> 2008b58: 84 10 00 10 mov %l0, %g2 2008b5c: 40 00 3d 86 call 2018174 <.urem> <== NOT EXECUTED 2008b60: 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) { 2008b64: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED *value = r ? v - r + a : v; 2008b68: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 2008b6c: 86 10 20 00 clr %g3 <== NOT EXECUTED 2008b70: 12 80 00 35 bne 2008c44 <_Heap_Allocate_aligned+0x1a4> <== NOT EXECUTED 2008b74: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2008b78: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008b7c: 38 80 00 0d bgu,a 2008bb0 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008b80: 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) 2008b84: 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; 2008b88: 80 a5 40 11 cmp %l5, %l1 2008b8c: 12 bf ff d6 bne 2008ae4 <_Heap_Allocate_aligned+0x44> 2008b90: a8 05 20 01 inc %l4 2008b94: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 2008b98: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 2008b9c: 80 a0 40 14 cmp %g1, %l4 2008ba0: 2a 80 00 02 bcs,a 2008ba8 <_Heap_Allocate_aligned+0x108> 2008ba4: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 2008ba8: 81 c7 e0 08 ret 2008bac: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 2008bb0: 80 a6 20 00 cmp %i0, 0 2008bb4: 22 bf ff f5 be,a 2008b88 <_Heap_Allocate_aligned+0xe8> 2008bb8: 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; 2008bbc: 82 04 e0 08 add %l3, 8, %g1 2008bc0: 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; 2008bc4: 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) { 2008bc8: 80 a0 80 1d cmp %g2, %i5 2008bcc: 2a 80 00 29 bcs,a 2008c70 <_Heap_Allocate_aligned+0x1d0> 2008bd0: 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; 2008bd4: 82 10 a0 01 or %g2, 1, %g1 2008bd8: 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); 2008bdc: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 2008be0: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 2008be4: 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 ); 2008be8: 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; 2008bec: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2008bf0: 82 10 60 01 or %g1, 1, %g1 2008bf4: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 2008bf8: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 2008bfc: 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; 2008c00: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 2008c04: 80 a0 c0 01 cmp %g3, %g1 2008c08: 1a 80 00 03 bcc 2008c14 <_Heap_Allocate_aligned+0x174> 2008c0c: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 2008c10: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 2008c14: 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; 2008c18: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 2008c1c: 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; 2008c20: 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; 2008c24: 86 00 e0 01 inc %g3 stats->allocs += 1; 2008c28: 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; 2008c2c: 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; 2008c30: 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; 2008c34: 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; 2008c38: 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; 2008c3c: 10 bf ff d7 b 2008b98 <_Heap_Allocate_aligned+0xf8> 2008c40: 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; 2008c44: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 2008c48: 90 20 40 04 sub %g1, %g4, %o0 <== NOT EXECUTED 2008c4c: 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) { 2008c50: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008c54: 28 bf ff cd bleu,a 2008b88 <_Heap_Allocate_aligned+0xe8> <== NOT EXECUTED 2008c58: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 2008c5c: 10 bf ff d5 b 2008bb0 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008c60: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 2008c64: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 2008c68: 81 c7 e0 08 ret <== NOT EXECUTED 2008c6c: 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; 2008c70: 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; 2008c74: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 2008c78: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 2008c7c: 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; 2008c80: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008c84: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 2008c88: 10 bf ff d8 b 2008be8 <_Heap_Allocate_aligned+0x148> 2008c8c: 88 10 00 12 mov %l2, %g4 0202f028 <_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; 202f028: 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; 202f02c: 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; 202f030: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 202f034: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 202f038: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 202f03c: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 202f040: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 202f044: 80 a0 40 0b cmp %g1, %o3 202f048: 02 80 00 26 be 202f0e0 <_Heap_Get_information+0xb8> 202f04c: c0 22 60 10 clr [ %o1 + 0x10 ] 202f050: 10 80 00 0e b 202f088 <_Heap_Get_information+0x60> 202f054: 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; 202f058: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 202f05c: 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++; 202f060: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 202f064: 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++; 202f068: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 202f06c: 80 a0 c0 04 cmp %g3, %g4 202f070: 1a 80 00 03 bcc 202f07c <_Heap_Get_information+0x54> 202f074: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 202f078: 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 ) { 202f07c: 80 a2 c0 0d cmp %o3, %o5 202f080: 02 80 00 18 be 202f0e0 <_Heap_Get_information+0xb8> 202f084: 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); 202f088: 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 ); 202f08c: 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); 202f090: 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) ) { 202f094: 80 8b 20 01 btst 1, %o4 202f098: 32 bf ff f0 bne,a 202f058 <_Heap_Get_information+0x30> 202f09c: 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++; 202f0a0: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 202f0a4: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 202f0a8: 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++; 202f0ac: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 202f0b0: 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++; 202f0b4: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 202f0b8: 80 a0 c0 04 cmp %g3, %g4 202f0bc: 1a 80 00 03 bcc 202f0c8 <_Heap_Get_information+0xa0> 202f0c0: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 202f0c4: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 202f0c8: c2 03 40 00 ld [ %o5 ], %g1 202f0cc: 80 a0 40 04 cmp %g1, %g4 202f0d0: 02 bf ff ec be 202f080 <_Heap_Get_information+0x58> 202f0d4: 80 a2 c0 0d cmp %o3, %o5 202f0d8: 81 c3 e0 08 retl <== NOT EXECUTED 202f0dc: 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; 202f0e0: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 202f0e4: 90 10 20 00 clr %o0 202f0e8: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 202f0ec: 81 c3 e0 08 retl 202f0f0: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 02014d04 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 2014d04: 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; 2014d08: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 2014d0c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 2014d10: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 2014d14: 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); 2014d18: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2014d1c: 7f ff fb 8e call 2013b54 <.urem> 2014d20: 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 ); 2014d24: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 2014d28: 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); 2014d2c: 82 06 7f f8 add %i1, -8, %g1 2014d30: 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)) 2014d34: 80 a4 40 04 cmp %l1, %g4 2014d38: 84 60 3f ff subx %g0, -1, %g2 2014d3c: 80 a0 c0 11 cmp %g3, %l1 2014d40: 82 60 3f ff subx %g0, -1, %g1 2014d44: 80 88 80 01 btst %g2, %g1 2014d48: 02 80 00 2f be 2014e04 <_Heap_Resize_block+0x100> 2014d4c: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 2014d50: 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); 2014d54: 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 ); 2014d58: 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) || 2014d5c: 80 a4 80 04 cmp %l2, %g4 2014d60: 84 60 3f ff subx %g0, -1, %g2 2014d64: 80 a0 c0 12 cmp %g3, %l2 2014d68: 82 60 3f ff subx %g0, -1, %g1 2014d6c: 80 88 80 01 btst %g2, %g1 2014d70: 02 80 00 25 be 2014e04 <_Heap_Resize_block+0x100> 2014d74: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2014d78: c2 04 a0 04 ld [ %l2 + 4 ], %g1 2014d7c: 80 88 60 01 btst 1, %g1 2014d80: 02 80 00 21 be 2014e04 <_Heap_Resize_block+0x100> 2014d84: 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) || 2014d88: 80 a0 c0 12 cmp %g3, %l2 2014d8c: a8 10 20 01 mov 1, %l4 2014d90: 02 80 00 04 be 2014da0 <_Heap_Resize_block+0x9c> 2014d94: 82 04 80 17 add %l2, %l7, %g1 2014d98: c2 00 60 04 ld [ %g1 + 4 ], %g1 2014d9c: 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) 2014da0: 82 24 80 19 sub %l2, %i1, %g1 2014da4: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 2014da8: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 2014dac: 80 a0 40 1a cmp %g1, %i2 2014db0: 1a 80 00 17 bcc 2014e0c <_Heap_Resize_block+0x108> 2014db4: 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 */ 2014db8: 80 8d 20 ff btst 0xff, %l4 2014dbc: 12 80 00 10 bne 2014dfc <_Heap_Resize_block+0xf8> 2014dc0: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 2014dc4: 92 10 00 15 mov %l5, %o1 2014dc8: 7f ff fb 63 call 2013b54 <.urem> 2014dcc: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 2014dd0: 80 a2 20 00 cmp %o0, 0 2014dd4: 02 80 00 05 be 2014de8 <_Heap_Resize_block+0xe4> 2014dd8: 80 a4 00 16 cmp %l0, %l6 2014ddc: 82 04 00 15 add %l0, %l5, %g1 2014de0: a0 20 40 08 sub %g1, %o0, %l0 2014de4: 80 a4 00 16 cmp %l0, %l6 2014de8: 0a 80 00 2e bcs 2014ea0 <_Heap_Resize_block+0x19c> 2014dec: 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) 2014df0: 80 a5 c0 08 cmp %l7, %o0 2014df4: 1a 80 00 32 bcc 2014ebc <_Heap_Resize_block+0x1b8> 2014df8: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 2014dfc: 81 c7 e0 08 ret 2014e00: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 2014e04: 81 c7 e0 08 ret 2014e08: 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; 2014e0c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 2014e10: 92 10 00 15 mov %l5, %o1 2014e14: 7f ff fb 50 call 2013b54 <.urem> 2014e18: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 2014e1c: a0 a4 00 08 subcc %l0, %o0, %l0 2014e20: 22 80 00 1c be,a 2014e90 <_Heap_Resize_block+0x18c> 2014e24: 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; 2014e28: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 2014e2c: 80 a5 80 02 cmp %l6, %g2 2014e30: 18 80 00 1e bgu 2014ea8 <_Heap_Resize_block+0x1a4> 2014e34: 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) { 2014e38: 80 8d 20 ff btst 0xff, %l4 2014e3c: 12 80 00 2a bne 2014ee4 <_Heap_Resize_block+0x1e0> 2014e40: 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; 2014e44: 82 10 80 1b or %g2, %i3, %g1 2014e48: 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 ); 2014e4c: 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; 2014e50: 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; 2014e54: 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; 2014e58: 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; 2014e5c: 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; 2014e60: 84 11 20 01 or %g4, 1, %g2 2014e64: 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; 2014e68: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 2014e6c: da 20 e0 08 st %o5, [ %g3 + 8 ] 2014e70: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 2014e74: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 2014e78: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 2014e7c: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 2014e80: c6 23 60 0c st %g3, [ %o5 + 0xc ] 2014e84: c6 23 20 08 st %g3, [ %o4 + 8 ] 2014e88: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2014e8c: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 2014e90: 82 00 60 01 inc %g1 2014e94: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 2014e98: 81 c7 e0 08 ret 2014e9c: 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; 2014ea0: 10 bf ff d4 b 2014df0 <_Heap_Resize_block+0xec> 2014ea4: 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) { 2014ea8: a0 a4 00 01 subcc %l0, %g1, %l0 2014eac: 12 bf ff e3 bne 2014e38 <_Heap_Resize_block+0x134> 2014eb0: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2014eb4: 10 bf ff f7 b 2014e90 <_Heap_Resize_block+0x18c> 2014eb8: 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 = 2014ebc: 92 10 00 12 mov %l2, %o1 2014ec0: 7f ff c6 c6 call 20069d8 <_Heap_Block_allocate> 2014ec4: 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; 2014ec8: 90 02 00 18 add %o0, %i0, %o0 2014ecc: 90 12 00 1b or %o0, %i3, %o0 2014ed0: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 2014ed4: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 2014ed8: 82 00 7f ff add %g1, -1, %g1 2014edc: 10 bf ff ec b 2014e8c <_Heap_Resize_block+0x188> 2014ee0: 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) { 2014ee4: 38 bf ff eb bgu,a 2014e90 <_Heap_Resize_block+0x18c> <== NOT EXECUTED 2014ee8: 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; 2014eec: 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 ); 2014ef0: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 2014ef4: 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; 2014ef8: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 2014efc: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 2014f00: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2014f04: 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 */ 2014f08: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2014f0c: 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 */ 2014f10: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2014f14: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 2014f18: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 2014f1c: 7f ff da e3 call 200baa8 <_Heap_Free> <== NOT EXECUTED 2014f20: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 2014f24: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 2014f28: 10 bf ff d9 b 2014e8c <_Heap_Resize_block+0x188> <== NOT EXECUTED 2014f2c: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 0200e6bc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 200e6bc: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e6c0: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 200e6c4: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e6c8: 06 80 00 8c bl 200e8f8 <_Heap_Walk+0x23c> 200e6cc: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 200e6d0: c2 04 60 04 ld [ %l1 + 4 ], %g1 200e6d4: 80 88 60 01 btst 1, %g1 200e6d8: 02 80 00 81 be 200e8dc <_Heap_Walk+0x220> 200e6dc: 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) { 200e6e0: c4 04 40 00 ld [ %l1 ], %g2 200e6e4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200e6e8: 80 a0 80 01 cmp %g2, %g1 200e6ec: 02 80 00 08 be 200e70c <_Heap_Walk+0x50> 200e6f0: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 200e6f4: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e6f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e6fc: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200e700: 7f ff d9 51 call 2004c44 <== NOT EXECUTED 200e704: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 200e708: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 200e70c: 22 80 00 63 be,a 200e898 <_Heap_Walk+0x1dc> 200e710: 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)) { 200e714: 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); 200e718: c8 04 60 04 ld [ %l1 + 4 ], %g4 200e71c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200e720: 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 ); 200e724: a0 04 40 12 add %l1, %l2, %l0 200e728: 80 a4 00 01 cmp %l0, %g1 200e72c: 84 60 3f ff subx %g0, -1, %g2 200e730: 80 a0 c0 10 cmp %g3, %l0 200e734: 82 60 3f ff subx %g0, -1, %g1 200e738: 80 88 80 01 btst %g2, %g1 200e73c: 02 80 00 77 be 200e918 <_Heap_Walk+0x25c> 200e740: 03 00 80 67 sethi %hi(0x2019c00), %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); 200e744: 05 00 80 6a sethi %hi(0x201a800), %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"); 200e748: ba 10 61 48 or %g1, 0x148, %i5 printk("PASS: %d !the_block not in the free list", source); 200e74c: ae 10 a1 e0 or %g2, 0x1e0, %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); 200e750: 03 00 80 6a sethi %hi(0x201a800), %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); 200e754: 05 00 80 6a sethi %hi(0x201a800), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 200e758: 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); 200e75c: b8 10 61 b0 or %g1, 0x1b0, %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); 200e760: b6 10 a1 80 or %g2, 0x180, %i3 200e764: 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)) { 200e768: c2 04 20 04 ld [ %l0 + 4 ], %g1 200e76c: 80 88 60 01 btst 1, %g1 200e770: 12 80 00 20 bne 200e7f0 <_Heap_Walk+0x134> 200e774: 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) { 200e778: c2 04 00 00 ld [ %l0 ], %g1 200e77c: 80 a0 40 12 cmp %g1, %l2 200e780: 02 80 00 07 be 200e79c <_Heap_Walk+0xe0> 200e784: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200e788: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200e78c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e790: 7f ff d9 2d call 2004c44 <== NOT EXECUTED 200e794: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 200e798: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 200e79c: 32 80 00 0a bne,a 200e7c4 <_Heap_Walk+0x108> 200e7a0: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 200e7a4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 200e7a8: 12 80 00 49 bne 200e8cc <_Heap_Walk+0x210> <== NOT EXECUTED 200e7ac: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200e7b0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200e7b4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e7b8: 7f ff d9 23 call 2004c44 <== NOT EXECUTED 200e7bc: 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; 200e7c0: 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) 200e7c4: 80 a0 40 11 cmp %g1, %l1 200e7c8: 02 80 00 0a be 200e7f0 <_Heap_Walk+0x134> 200e7cc: 80 a4 e0 00 cmp %l3, 0 200e7d0: 80 a6 00 01 cmp %i0, %g1 200e7d4: 02 80 00 58 be 200e934 <_Heap_Walk+0x278> 200e7d8: 80 a0 40 11 cmp %g1, %l1 block = block->next; 200e7dc: 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) 200e7e0: 80 a0 40 11 cmp %g1, %l1 200e7e4: 12 bf ff fc bne 200e7d4 <_Heap_Walk+0x118> 200e7e8: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 200e7ec: 80 a4 e0 00 cmp %l3, 0 200e7f0: 32 80 00 58 bne,a 200e950 <_Heap_Walk+0x294> 200e7f4: 27 00 80 67 sethi %hi(0x2019c00), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200e7f8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200e7fc: 80 a0 40 12 cmp %g1, %l2 200e800: 18 80 00 40 bgu 200e900 <_Heap_Walk+0x244> 200e804: 11 00 80 6a sethi %hi(0x201a800), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 200e808: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200e80c: 40 00 26 5a call 2018174 <.urem> 200e810: 90 10 00 12 mov %l2, %o0 200e814: 80 a2 20 00 cmp %o0, 0 200e818: 12 80 00 15 bne 200e86c <_Heap_Walk+0x1b0> 200e81c: 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) 200e820: 12 80 00 17 bne 200e87c <_Heap_Walk+0x1c0> 200e824: 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 ) { 200e828: 02 80 00 1c be 200e898 <_Heap_Walk+0x1dc> 200e82c: 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); 200e830: 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)) { 200e834: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 200e838: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200e83c: a4 09 3f fe and %g4, -2, %l2 200e840: a0 04 00 12 add %l0, %l2, %l0 200e844: 80 a4 00 01 cmp %l0, %g1 200e848: 84 60 3f ff subx %g0, -1, %g2 200e84c: 80 a0 c0 10 cmp %g3, %l0 200e850: 82 60 3f ff subx %g0, -1, %g1 200e854: 80 88 80 01 btst %g2, %g1 200e858: 02 80 00 2f be 200e914 <_Heap_Walk+0x258> 200e85c: 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); 200e860: a2 10 00 15 mov %l5, %l1 200e864: 10 bf ff c1 b 200e768 <_Heap_Walk+0xac> 200e868: 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); 200e86c: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e870: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e874: 7f ff d8 f4 call 2004c44 <== NOT EXECUTED 200e878: 90 12 22 38 or %o0, 0x238, %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", 200e87c: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 200e880: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e884: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e888: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED 200e88c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200e890: 7f ff d8 ed call 2004c44 <== NOT EXECUTED 200e894: 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) { 200e898: 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); 200e89c: c2 04 60 04 ld [ %l1 + 4 ], %g1 200e8a0: 94 08 7f fe and %g1, -2, %o2 200e8a4: 80 a2 c0 0a cmp %o3, %o2 200e8a8: 02 80 00 07 be 200e8c4 <_Heap_Walk+0x208> 200e8ac: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 200e8b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e8b4: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e8b8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e8bc: 7f ff d8 e2 call 2004c44 <== NOT EXECUTED 200e8c0: 90 12 22 a0 or %o0, 0x2a0, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 200e8c4: 81 c7 e0 08 ret 200e8c8: 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"); 200e8cc: 7f ff d8 de call 2004c44 <== NOT EXECUTED 200e8d0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200e8d4: 10 bf ff b8 b 200e7b4 <_Heap_Walk+0xf8> <== NOT EXECUTED 200e8d8: 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); 200e8dc: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e8e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e8e4: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 200e8e8: 7f ff d8 d7 call 2004c44 <== NOT EXECUTED 200e8ec: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 200e8f0: 10 bf ff 7d b 200e6e4 <_Heap_Walk+0x28> <== NOT EXECUTED 200e8f4: 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; 200e8f8: 10 bf ff 76 b 200e6d0 <_Heap_Walk+0x14> <== NOT EXECUTED 200e8fc: 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); 200e900: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e904: 7f ff d8 d0 call 2004c44 <== NOT EXECUTED 200e908: 90 12 22 10 or %o0, 0x210, %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", 200e90c: 10 bf ff dd b 200e880 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200e910: 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); 200e914: 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); 200e918: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 200e91c: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e920: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e924: 7f ff d8 c8 call 2004c44 <== NOT EXECUTED 200e928: 90 12 21 58 or %o0, 0x158, %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", 200e92c: 10 bf ff d5 b 200e880 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200e930: 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) { 200e934: 02 bf ff ae be 200e7ec <_Heap_Walk+0x130> <== NOT EXECUTED 200e938: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 200e93c: 12 80 00 0a bne 200e964 <_Heap_Walk+0x2a8> <== NOT EXECUTED 200e940: 27 00 80 67 sethi %hi(0x2019c00), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200e944: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200e948: 7f ff d8 bf call 2004c44 <== NOT EXECUTED 200e94c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200e950: 90 14 e1 48 or %l3, 0x148, %o0 <== NOT EXECUTED 200e954: 7f ff d8 bc call 2004c44 <== NOT EXECUTED 200e958: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200e95c: 10 bf ff a8 b 200e7fc <_Heap_Walk+0x140> <== NOT EXECUTED 200e960: 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"); 200e964: 7f ff d8 b8 call 2004c44 <== NOT EXECUTED 200e968: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200e96c: 10 bf ff f7 b 200e948 <_Heap_Walk+0x28c> <== NOT EXECUTED 200e970: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 02006b48 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006b48: 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 ) 2006b4c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006b50: 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 ) 2006b54: 80 a0 60 00 cmp %g1, 0 2006b58: 02 80 00 1d be 2006bcc <_Objects_Allocate+0x84> 2006b5c: 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 ); 2006b60: a2 04 20 20 add %l0, 0x20, %l1 2006b64: 40 00 12 f2 call 200b72c <_Chain_Get> 2006b68: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2006b6c: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 2006b70: 80 a0 60 00 cmp %g1, 0 2006b74: 02 80 00 16 be 2006bcc <_Objects_Allocate+0x84> 2006b78: 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 ) { 2006b7c: 80 a2 20 00 cmp %o0, 0 2006b80: 02 80 00 15 be 2006bd4 <_Objects_Allocate+0x8c> 2006b84: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006b88: c4 06 20 08 ld [ %i0 + 8 ], %g2 2006b8c: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006b90: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006b94: 03 00 00 3f sethi %hi(0xfc00), %g1 2006b98: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006b9c: 84 08 80 01 and %g2, %g1, %g2 2006ba0: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006ba4: 40 00 33 40 call 20138a4 <.udiv> 2006ba8: 90 20 80 08 sub %g2, %o0, %o0 2006bac: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 2006bb0: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2006bb4: 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 ]--; 2006bb8: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 2006bbc: 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 ]--; 2006bc0: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2006bc4: 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 ]--; 2006bc8: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 2006bcc: 81 c7 e0 08 ret 2006bd0: 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 ); 2006bd4: 40 00 00 14 call 2006c24 <_Objects_Extend_information> 2006bd8: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2006bdc: 40 00 12 d4 call 200b72c <_Chain_Get> 2006be0: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 2006be4: b0 92 20 00 orcc %o0, 0, %i0 2006be8: 32 bf ff e9 bne,a 2006b8c <_Objects_Allocate+0x44> 2006bec: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 2006bf0: 81 c7 e0 08 ret <== NOT EXECUTED 2006bf4: 81 e8 00 00 restore <== NOT EXECUTED 02006c24 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2006c24: 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; 2006c28: 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 ) 2006c2c: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2006c30: 03 00 00 3f sethi %hi(0xfc00), %g1 2006c34: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006c38: a8 08 80 01 and %g2, %g1, %l4 2006c3c: 80 a5 40 14 cmp %l5, %l4 2006c40: 1a 80 00 79 bcc 2006e24 <_Objects_Extend_information+0x200> 2006c44: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2006c48: a6 10 00 14 mov %l4, %l3 2006c4c: a4 10 20 00 clr %l2 2006c50: a2 10 20 00 clr %l1 2006c54: ac 10 20 01 mov 1, %l6 2006c58: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 2006c5c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006c60: 80 a0 60 00 cmp %g1, 0 2006c64: 12 80 00 8d bne 2006e98 <_Objects_Extend_information+0x274> 2006c68: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 2006c6c: 90 02 00 14 add %o0, %l4, %o0 2006c70: 90 02 00 1d add %o0, %i5, %o0 2006c74: 40 00 09 30 call 2009134 <_Workspace_Allocate_or_fatal_error> 2006c78: 91 2a 20 02 sll %o0, 2, %o0 2006c7c: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006c80: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006c84: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006c88: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006c8c: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006c90: 18 80 00 94 bgu 2006ee0 <_Objects_Extend_information+0x2bc> 2006c94: 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++ ) { 2006c98: 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, 2006c9c: 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++ ) { 2006ca0: 02 80 00 08 be 2006cc0 <_Objects_Extend_information+0x9c> 2006ca4: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 2006ca8: 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++ ) { 2006cac: 84 00 a0 01 inc %g2 2006cb0: 80 a0 80 14 cmp %g2, %l4 2006cb4: 0a bf ff fd bcs 2006ca8 <_Objects_Extend_information+0x84> 2006cb8: c0 24 00 01 clr [ %l0 + %g1 ] 2006cbc: 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; 2006cc0: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006cc4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006cc8: 86 04 c0 01 add %l3, %g1, %g3 2006ccc: 80 a4 c0 03 cmp %l3, %g3 2006cd0: 1a 80 00 0a bcc 2006cf8 <_Objects_Extend_information+0xd4> 2006cd4: c0 25 c0 15 clr [ %l7 + %l5 ] 2006cd8: 83 2c e0 02 sll %l3, 2, %g1 2006cdc: 84 04 00 01 add %l0, %g1, %g2 2006ce0: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 2006ce4: 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++ ) { 2006ce8: 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 ); 2006cec: 80 a0 40 03 cmp %g1, %g3 2006cf0: 0a bf ff fd bcs 2006ce4 <_Objects_Extend_information+0xc0> 2006cf4: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2006cf8: 7f ff ec 2b call 2001da4 2006cfc: 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( 2006d00: c2 06 00 00 ld [ %i0 ], %g1 2006d04: 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; 2006d08: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006d0c: 89 29 20 1b sll %g4, 0x1b, %g4 2006d10: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006d14: 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( 2006d18: 87 30 e0 10 srl %g3, 0x10, %g3 2006d1c: 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; 2006d20: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006d24: 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; 2006d28: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2006d2c: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006d30: 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( 2006d34: 82 10 40 04 or %g1, %g4, %g1 2006d38: 82 10 40 03 or %g1, %g3, %g1 2006d3c: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006d40: 7f ff ec 1d call 2001db4 2006d44: 01 00 00 00 nop if ( old_tables ) 2006d48: 80 a4 20 00 cmp %l0, 0 2006d4c: 22 80 00 05 be,a 2006d60 <_Objects_Extend_information+0x13c> 2006d50: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 2006d54: 40 00 08 ea call 20090fc <_Workspace_Free> 2006d58: 90 10 00 10 mov %l0, %o0 2006d5c: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 2006d60: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006d64: 80 a0 60 00 cmp %g1, 0 2006d68: 02 80 00 55 be 2006ebc <_Objects_Extend_information+0x298> 2006d6c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 2006d70: 90 10 00 10 mov %l0, %o0 2006d74: 40 00 32 92 call 20137bc <.umul> 2006d78: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006d7c: 40 00 08 e7 call 2009118 <_Workspace_Allocate> 2006d80: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006d84: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 2006d88: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006d8c: d2 00 40 14 ld [ %g1 + %l4 ], %o1 2006d90: 80 a2 60 00 cmp %o1, 0 2006d94: 02 80 00 64 be 2006f24 <_Objects_Extend_information+0x300> 2006d98: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006d9c: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2006da0: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006da4: a0 10 00 13 mov %l3, %l0 2006da8: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006dac: 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( 2006db0: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006db4: 40 00 12 71 call 200b778 <_Chain_Initialize> 2006db8: 90 10 00 13 mov %l3, %o0 2006dbc: 30 80 00 0c b,a 2006dec <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006dc0: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2006dc4: 83 28 60 18 sll %g1, 0x18, %g1 2006dc8: 85 28 a0 1b sll %g2, 0x1b, %g2 2006dcc: 82 10 40 12 or %g1, %l2, %g1 2006dd0: 82 10 40 02 or %g1, %g2, %g1 2006dd4: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006dd8: 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( 2006ddc: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2006de0: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006de4: 7f ff fd 2f call 20062a0 <_Chain_Append> 2006de8: 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 ) { 2006dec: 40 00 12 50 call 200b72c <_Chain_Get> 2006df0: 90 10 00 13 mov %l3, %o0 2006df4: 80 a2 20 00 cmp %o0, 0 2006df8: 32 bf ff f2 bne,a 2006dc0 <_Objects_Extend_information+0x19c> 2006dfc: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006e00: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2006e04: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 2006e08: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006e0c: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 2006e10: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006e14: 82 00 40 04 add %g1, %g4, %g1 2006e18: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006e1c: 81 c7 e0 08 ret 2006e20: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006e24: 90 10 00 15 mov %l5, %o0 2006e28: 40 00 32 9f call 20138a4 <.udiv> 2006e2c: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 2006e30: a4 92 20 00 orcc %o0, 0, %l2 2006e34: 02 80 00 3e be 2006f2c <_Objects_Extend_information+0x308> 2006e38: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 2006e3c: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 2006e40: c2 00 80 00 ld [ %g2 ], %g1 2006e44: 80 a0 60 00 cmp %g1, 0 2006e48: 12 80 00 08 bne 2006e68 <_Objects_Extend_information+0x244> 2006e4c: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2006e50: 10 80 00 0c b 2006e80 <_Objects_Extend_information+0x25c> <== NOT EXECUTED 2006e54: 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 ) 2006e58: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2006e5c: 80 a0 60 00 cmp %g1, 0 2006e60: 02 80 00 08 be 2006e80 <_Objects_Extend_information+0x25c> 2006e64: 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++ ) { 2006e68: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 2006e6c: 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++ ) { 2006e70: 80 a4 80 11 cmp %l2, %l1 2006e74: 18 bf ff f9 bgu 2006e58 <_Objects_Extend_information+0x234> 2006e78: 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 ) { 2006e7c: 80 a4 c0 15 cmp %l3, %l5 2006e80: 2a bf ff b9 bcs,a 2006d64 <_Objects_Extend_information+0x140> 2006e84: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006e88: ac 04 a0 01 add %l2, 1, %l6 2006e8c: 83 2d a0 01 sll %l6, 1, %g1 2006e90: 10 bf ff 73 b 2006c5c <_Objects_Extend_information+0x38> 2006e94: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 2006e98: 90 02 00 14 add %o0, %l4, %o0 2006e9c: 90 02 00 1d add %o0, %i5, %o0 2006ea0: 40 00 08 9e call 2009118 <_Workspace_Allocate> 2006ea4: 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 ) 2006ea8: ae 92 20 00 orcc %o0, 0, %l7 2006eac: 32 bf ff 76 bne,a 2006c84 <_Objects_Extend_information+0x60> 2006eb0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006eb4: 81 c7 e0 08 ret <== NOT EXECUTED 2006eb8: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 2006ebc: 90 10 00 10 mov %l0, %o0 2006ec0: 40 00 32 3f call 20137bc <.umul> 2006ec4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006ec8: 40 00 08 9b call 2009134 <_Workspace_Allocate_or_fatal_error> 2006ecc: a9 2c 60 02 sll %l1, 2, %l4 2006ed0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006ed4: d0 24 00 14 st %o0, [ %l0 + %l4 ] 2006ed8: 10 bf ff b1 b 2006d9c <_Objects_Extend_information+0x178> 2006edc: 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, 2006ee0: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 2006ee4: ab 2c a0 02 sll %l2, 2, %l5 2006ee8: 90 10 00 17 mov %l7, %o0 2006eec: 40 00 19 95 call 200d540 2006ef0: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006ef4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2006ef8: 94 10 00 15 mov %l5, %o2 2006efc: 40 00 19 91 call 200d540 2006f00: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006f04: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 2006f08: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006f0c: 94 05 00 0a add %l4, %o2, %o2 2006f10: 90 10 00 10 mov %l0, %o0 2006f14: 40 00 19 8b call 200d540 2006f18: 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; 2006f1c: 10 bf ff 6a b 2006cc4 <_Objects_Extend_information+0xa0> 2006f20: c0 25 80 15 clr [ %l6 + %l5 ] 2006f24: 81 c7 e0 08 ret <== NOT EXECUTED 2006f28: 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++ ) { 2006f2c: 10 bf ff d4 b 2006e7c <_Objects_Extend_information+0x258> <== NOT EXECUTED 2006f30: a2 10 20 00 clr %l1 <== NOT EXECUTED 02006fe4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 2006fe4: 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 ) 2006fe8: 82 06 3f ff add %i0, -1, %g1 2006fec: 80 a0 60 03 cmp %g1, 3 2006ff0: 38 80 00 1e bgu,a 2007068 <_Objects_Get_information+0x84> 2006ff4: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2006ff8: 80 a6 60 00 cmp %i1, 0 2006ffc: 12 80 00 04 bne 200700c <_Objects_Get_information+0x28> 2007000: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 2007004: 81 c7 e0 08 ret 2007008: 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 ); 200700c: 40 00 13 23 call 200bc98 <_Objects_API_maximum_class> 2007010: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 2007014: 80 a2 20 00 cmp %o0, 0 2007018: 06 bf ff fb bl 2007004 <_Objects_Get_information+0x20> 200701c: 80 a2 00 19 cmp %o0, %i1 2007020: 2a 80 00 12 bcs,a 2007068 <_Objects_Get_information+0x84> 2007024: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 2007028: 85 2e 20 02 sll %i0, 2, %g2 200702c: 03 00 80 5c sethi %hi(0x2017000), %g1 2007030: 82 10 62 00 or %g1, 0x200, %g1 ! 2017200 <_Objects_Information_table> 2007034: c4 00 40 02 ld [ %g1 + %g2 ], %g2 2007038: 80 a0 a0 00 cmp %g2, 0 200703c: 02 80 00 0b be 2007068 <_Objects_Get_information+0x84> 2007040: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2007044: 83 2e 60 02 sll %i1, 2, %g1 2007048: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 200704c: 80 a6 20 00 cmp %i0, 0 2007050: 02 80 00 06 be 2007068 <_Objects_Get_information+0x84> 2007054: 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 ) 2007058: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200705c: 80 a0 60 00 cmp %g1, 0 2007060: 22 80 00 02 be,a 2007068 <_Objects_Get_information+0x84> 2007064: b0 10 20 00 clr %i0 return NULL; #endif return info; } 2007068: 81 c7 e0 08 ret 200706c: 81 e8 00 00 restore 02007070 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 2007070: 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; 2007074: 03 00 00 3f sethi %hi(0xfc00), %g1 2007078: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 200707c: 7f ff eb 4a call 2001da4 2007080: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 2007084: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007088: 80 a6 40 01 cmp %i1, %g1 200708c: 18 80 00 0b bgu 20070b8 <_Objects_Get_isr_disable+0x48> 2007090: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 2007094: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2007098: f0 00 80 01 ld [ %g2 + %g1 ], %i0 200709c: 80 a6 20 00 cmp %i0, 0 20070a0: 02 80 00 0c be 20070d0 <_Objects_Get_isr_disable+0x60> 20070a4: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 20070a8: 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; 20070ac: c0 26 80 00 clr [ %i2 ] 20070b0: 81 c7 e0 08 ret 20070b4: 81 e8 00 00 restore } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 20070b8: 7f ff eb 3f call 2001db4 20070bc: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 20070c0: 82 10 20 01 mov 1, %g1 20070c4: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 20070c8: 81 c7 e0 08 ret 20070cc: 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 ); 20070d0: 7f ff eb 39 call 2001db4 <== NOT EXECUTED 20070d4: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 20070d8: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 20070dc: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 20070e0: 81 c7 e0 08 ret <== NOT EXECUTED 20070e4: 81 e8 00 00 restore <== NOT EXECUTED 020177ac <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 20177ac: 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) 20177b0: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 20177b4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 20177b8: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 20177bc: 22 80 00 02 be,a 20177c4 <_Objects_Get_next+0x18> <== NOT EXECUTED 20177c0: 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) 20177c4: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 20177c8: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 20177cc: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 20177d0: 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); 20177d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20177d8: 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) 20177dc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20177e0: 0a 80 00 0b bcs 201780c <_Objects_Get_next+0x60> <== NOT EXECUTED 20177e4: 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); 20177e8: 7f ff d7 c4 call 200d6f8 <_Objects_Get> <== NOT EXECUTED 20177ec: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 20177f0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 20177f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20177f8: 32 bf ff f6 bne,a 20177d0 <_Objects_Get_next+0x24> <== NOT EXECUTED 20177fc: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 2017800: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2017804: 81 c7 e0 08 ret <== NOT EXECUTED 2017808: 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; 201780c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2017810: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 2017814: 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; 2017818: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 201781c: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 2017820: 81 c7 e0 08 ret <== NOT EXECUTED 2017824: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 020083e8 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 20083e8: 9d e3 bf 90 save %sp, -112, %sp 20083ec: 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 ) 20083f0: 80 a6 60 00 cmp %i1, 0 20083f4: 02 80 00 24 be 2008484 <_Objects_Id_to_name+0x9c> 20083f8: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 20083fc: 80 a2 60 00 cmp %o1, 0 2008400: 02 80 00 26 be 2008498 <_Objects_Id_to_name+0xb0> 2008404: 03 00 80 6c sethi %hi(0x201b000), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 2008408: 83 32 60 18 srl %o1, 0x18, %g1 200840c: 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 ) 2008410: 84 00 7f ff add %g1, -1, %g2 2008414: 80 a0 a0 03 cmp %g2, 3 2008418: 38 80 00 1b bgu,a 2008484 <_Objects_Id_to_name+0x9c> 200841c: 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 ] ) 2008420: 85 28 60 02 sll %g1, 2, %g2 2008424: 03 00 80 6c sethi %hi(0x201b000), %g1 2008428: 82 10 62 40 or %g1, 0x240, %g1 ! 201b240 <_Objects_Information_table> 200842c: c4 00 40 02 ld [ %g1 + %g2 ], %g2 2008430: 80 a0 a0 00 cmp %g2, 0 2008434: 02 80 00 16 be 200848c <_Objects_Id_to_name+0xa4> 2008438: 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 ]; 200843c: 83 28 60 02 sll %g1, 2, %g1 2008440: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 2008444: 80 a2 20 00 cmp %o0, 0 2008448: 02 80 00 0f be 2008484 <_Objects_Id_to_name+0x9c> 200844c: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 2008450: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 2008454: 80 a0 60 00 cmp %g1, 0 2008458: 12 80 00 0e bne 2008490 <_Objects_Id_to_name+0xa8> 200845c: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 2008460: 7f ff ff c5 call 2008374 <_Objects_Get> 2008464: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 2008468: 80 a2 20 00 cmp %o0, 0 200846c: 22 80 00 06 be,a 2008484 <_Objects_Id_to_name+0x9c> 2008470: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 2008474: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 2008478: b0 10 20 00 clr %i0 200847c: 40 00 02 77 call 2008e58 <_Thread_Enable_dispatch> 2008480: c2 26 40 00 st %g1, [ %i1 ] 2008484: 81 c7 e0 08 ret 2008488: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200848c: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 2008490: 81 c7 e0 08 ret <== NOT EXECUTED 2008494: 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; 2008498: c4 00 63 a4 ld [ %g1 + 0x3a4 ], %g2 200849c: 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); 20084a0: 83 32 60 18 srl %o1, 0x18, %g1 20084a4: 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 ) 20084a8: 84 00 7f ff add %g1, -1, %g2 20084ac: 80 a0 a0 03 cmp %g2, 3 20084b0: 38 bf ff f5 bgu,a 2008484 <_Objects_Id_to_name+0x9c> 20084b4: 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 ] ) 20084b8: 10 bf ff db b 2008424 <_Objects_Id_to_name+0x3c> 20084bc: 85 28 60 02 sll %g1, 2, %g2 02007268 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 2007268: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 200726c: 80 a2 e0 00 cmp %o3, 0 2007270: 02 80 00 20 be 20072f0 <_Objects_Name_to_id_u32+0x88> 2007274: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 2007278: 80 a2 60 00 cmp %o1, 0 200727c: 22 80 00 1d be,a 20072f0 <_Objects_Name_to_id_u32+0x88> 2007280: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2007284: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 2007288: 85 28 60 10 sll %g1, 0x10, %g2 200728c: 80 a0 a0 00 cmp %g2, 0 2007290: 22 80 00 18 be,a 20072f0 <_Objects_Name_to_id_u32+0x88> 2007294: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2007298: 80 a2 a0 00 cmp %o2, 0 200729c: 12 80 00 17 bne 20072f8 <_Objects_Name_to_id_u32+0x90> 20072a0: 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++ ) { 20072a4: 89 30 a0 10 srl %g2, 0x10, %g4 20072a8: 80 a1 20 00 cmp %g4, 0 20072ac: 02 80 00 11 be 20072f0 <_Objects_Name_to_id_u32+0x88> 20072b0: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 20072b4: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 20072b8: 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 ]; 20072bc: 83 28 e0 02 sll %g3, 2, %g1 20072c0: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 20072c4: 80 a0 a0 00 cmp %g2, 0 20072c8: 02 80 00 06 be 20072e0 <_Objects_Name_to_id_u32+0x78> 20072cc: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 20072d0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 20072d4: 80 a0 40 09 cmp %g1, %o1 20072d8: 22 80 00 0f be,a 2007314 <_Objects_Name_to_id_u32+0xac> 20072dc: 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++ ) { 20072e0: 80 a0 c0 04 cmp %g3, %g4 20072e4: 08 bf ff f7 bleu 20072c0 <_Objects_Name_to_id_u32+0x58> 20072e8: 83 28 e0 02 sll %g3, 2, %g1 20072ec: 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 } 20072f0: 81 c3 e0 08 retl 20072f4: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 20072f8: 82 10 63 ff or %g1, 0x3ff, %g1 20072fc: 80 a2 80 01 cmp %o2, %g1 2007300: 02 bf ff e9 be 20072a4 <_Objects_Name_to_id_u32+0x3c> 2007304: 80 a2 a0 01 cmp %o2, 1 2007308: 02 bf ff e7 be 20072a4 <_Objects_Name_to_id_u32+0x3c> 200730c: 90 10 20 01 mov 1, %o0 2007310: 30 bf ff f8 b,a 20072f0 <_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; 2007314: 90 10 20 00 clr %o0 2007318: 81 c3 e0 08 retl 200731c: c2 22 c0 00 st %g1, [ %o3 ] 02007230 <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 2007230: 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 ) 2007234: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2007238: 80 a0 60 00 cmp %g1, 0 200723c: 22 80 00 09 be,a 2007260 <_Objects_Namespace_remove+0x30> 2007240: c0 26 60 0c clr [ %i1 + 0xc ] 2007244: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 2007248: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200724c: 22 80 00 05 be,a 2007260 <_Objects_Namespace_remove+0x30> <== NOT EXECUTED 2007250: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 2007254: 40 00 07 aa call 20090fc <_Workspace_Free> <== NOT EXECUTED 2007258: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 200725c: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 2007260: 81 c7 e0 08 ret 2007264: 81 e8 00 00 restore 02008f60 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 2008f60: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 2008f64: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 2008f68: 40 00 1e 62 call 20108f0 2008f6c: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 2008f70: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2008f74: 80 a0 60 00 cmp %g1, 0 2008f78: 12 80 00 21 bne 2008ffc <_Objects_Set_name+0x9c> 2008f7c: 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( 2008f80: 03 08 08 08 sethi %hi(0x20202000), %g1 2008f84: 80 a4 20 00 cmp %l0, 0 2008f88: 02 80 00 19 be 2008fec <_Objects_Set_name+0x8c> 2008f8c: 82 10 60 20 or %g1, 0x20, %g1 2008f90: c4 4e 80 00 ldsb [ %i2 ], %g2 2008f94: 03 00 08 08 sethi %hi(0x202000), %g1 2008f98: 87 28 a0 18 sll %g2, 0x18, %g3 2008f9c: 82 10 60 20 or %g1, 0x20, %g1 2008fa0: 80 a4 20 01 cmp %l0, 1 2008fa4: 02 80 00 12 be 2008fec <_Objects_Set_name+0x8c> 2008fa8: 82 10 c0 01 or %g3, %g1, %g1 2008fac: c4 4e a0 01 ldsb [ %i2 + 1 ], %g2 2008fb0: 03 00 00 08 sethi %hi(0x2000), %g1 2008fb4: 85 28 a0 10 sll %g2, 0x10, %g2 2008fb8: 82 10 60 20 or %g1, 0x20, %g1 2008fbc: 84 10 80 03 or %g2, %g3, %g2 2008fc0: 80 a4 20 02 cmp %l0, 2 2008fc4: 02 80 00 0a be 2008fec <_Objects_Set_name+0x8c> 2008fc8: 82 10 80 01 or %g2, %g1, %g1 2008fcc: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 2008fd0: 80 a4 20 03 cmp %l0, 3 2008fd4: 83 28 60 08 sll %g1, 8, %g1 2008fd8: 84 10 80 01 or %g2, %g1, %g2 2008fdc: 02 80 00 04 be 2008fec <_Objects_Set_name+0x8c> 2008fe0: 82 10 a0 20 or %g2, 0x20, %g1 2008fe4: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 2008fe8: 82 10 80 01 or %g2, %g1, %g1 2008fec: c2 26 60 0c st %g1, [ %i1 + 0xc ] 2008ff0: b0 10 20 01 mov 1, %i0 ); } return TRUE; } 2008ff4: 81 c7 e0 08 ret 2008ff8: 81 e8 00 00 restore length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 2008ffc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2009000: 40 00 07 90 call 200ae40 <_Workspace_Allocate> <== NOT EXECUTED 2009004: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 2009008: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 200900c: 02 bf ff fa be 2008ff4 <_Objects_Set_name+0x94> <== NOT EXECUTED 2009010: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 2009014: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 2009018: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200901c: 02 80 00 06 be 2009034 <_Objects_Set_name+0xd4> <== NOT EXECUTED 2009020: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 2009024: 40 00 07 80 call 200ae24 <_Workspace_Free> <== NOT EXECUTED 2009028: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 200902c: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 2009030: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 2009034: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2009038: 40 00 1d f4 call 2010808 <== NOT EXECUTED 200903c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 2009040: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 2009044: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 2009048: 81 c7 e0 08 ret <== NOT EXECUTED 200904c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 02007328 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2007328: 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; 200732c: 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; 2007330: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2007334: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2007338: 03 00 00 3f sethi %hi(0xfc00), %g1 200733c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007340: 92 10 00 10 mov %l0, %o1 2007344: a4 08 80 01 and %g2, %g1, %l2 2007348: 40 00 31 57 call 20138a4 <.udiv> 200734c: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 2007350: 80 a2 20 00 cmp %o0, 0 2007354: 02 80 00 12 be 200739c <_Objects_Shrink_information+0x74> 2007358: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 200735c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2007360: c2 00 c0 00 ld [ %g3 ], %g1 2007364: 80 a4 00 01 cmp %l0, %g1 2007368: 12 80 00 09 bne 200738c <_Objects_Shrink_information+0x64> 200736c: a2 10 20 04 mov 4, %l1 2007370: 10 80 00 0d b 20073a4 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 2007374: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 2007378: 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 ) { 200737c: 80 a4 00 01 cmp %l0, %g1 2007380: 02 80 00 09 be 20073a4 <_Objects_Shrink_information+0x7c> 2007384: 82 04 60 04 add %l1, 4, %g1 2007388: 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++ ) { 200738c: 84 00 a0 01 inc %g2 2007390: 80 a2 00 02 cmp %o0, %g2 2007394: 38 bf ff f9 bgu,a 2007378 <_Objects_Shrink_information+0x50> 2007398: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 200739c: 81 c7 e0 08 ret 20073a0: 81 e8 00 00 restore 20073a4: 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; 20073a8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 20073ac: 10 80 00 0f b 20073e8 <_Objects_Shrink_information+0xc0> 20073b0: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 20073b4: 82 04 80 01 add %l2, %g1, %g1 20073b8: 80 a0 40 03 cmp %g1, %g3 20073bc: 08 80 00 10 bleu 20073fc <_Objects_Shrink_information+0xd4> 20073c0: 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 ); 20073c4: 40 00 10 d0 call 200b704 <_Chain_Extract> 20073c8: 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 ) ); 20073cc: 80 a4 20 00 cmp %l0, 0 20073d0: 22 80 00 10 be,a 2007410 <_Objects_Shrink_information+0xe8> 20073d4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 20073d8: c2 04 00 00 ld [ %l0 ], %g1 20073dc: 80 a0 60 00 cmp %g1, 0 20073e0: 02 80 00 0b be 200740c <_Objects_Shrink_information+0xe4> 20073e4: 84 10 00 10 mov %l0, %g2 20073e8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 20073ec: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 20073f0: 80 a0 c0 12 cmp %g3, %l2 20073f4: 3a bf ff f0 bcc,a 20073b4 <_Objects_Shrink_information+0x8c> 20073f8: 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; 20073fc: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2007400: 80 a4 20 00 cmp %l0, 0 2007404: 32 bf ff f6 bne,a 20073dc <_Objects_Shrink_information+0xb4> 2007408: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 200740c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2007410: 40 00 07 3b call 20090fc <_Workspace_Free> 2007414: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2007418: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 200741c: 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; 2007420: 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; 2007424: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007428: 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; 200742c: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007430: 82 20 40 02 sub %g1, %g2, %g1 2007434: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2007438: 81 c7 e0 08 ret 200743c: 81 e8 00 00 restore 0202460c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 202460c: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 2024610: 80 a6 20 00 cmp %i0, 0 2024614: 02 80 00 10 be 2024654 <_Protected_heap_Get_information+0x48> 2024618: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 202461c: 02 80 00 0e be 2024654 <_Protected_heap_Get_information+0x48> 2024620: 23 00 81 75 sethi %hi(0x205d400), %l1 return false; _RTEMS_Lock_allocator(); 2024624: 7f ff 93 b1 call 20094e8 <_API_Mutex_Lock> 2024628: d0 04 61 dc ld [ %l1 + 0x1dc ], %o0 ! 205d5dc <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 202462c: 90 10 00 18 mov %i0, %o0 2024630: 40 00 2a 7e call 202f028 <_Heap_Get_information> 2024634: 92 10 00 19 mov %i1, %o1 2024638: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 202463c: 7f ff 93 c1 call 2009540 <_API_Mutex_Unlock> 2024640: d0 04 61 dc ld [ %l1 + 0x1dc ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 2024644: 80 a0 00 10 cmp %g0, %l0 2024648: 82 60 3f ff subx %g0, -1, %g1 202464c: 81 c7 e0 08 ret 2024650: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 2024654: 81 c7 e0 08 ret <== NOT EXECUTED 2024658: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0200b4b4 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200b4b4: 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 ]; 200b4b8: f0 06 21 68 ld [ %i0 + 0x168 ], %i0 if ( !api ) 200b4bc: 80 a6 20 00 cmp %i0, 0 200b4c0: 02 80 00 1f be 200b53c <_RTEMS_tasks_Post_switch_extension+0x88> 200b4c4: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200b4c8: 7f ff da 37 call 2001da4 200b4cc: 01 00 00 00 nop signal_set = asr->signals_posted; 200b4d0: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 asr->signals_posted = 0; 200b4d4: c0 26 20 14 clr [ %i0 + 0x14 ] _ISR_Enable( level ); 200b4d8: 7f ff da 37 call 2001db4 200b4dc: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200b4e0: 80 a4 a0 00 cmp %l2, 0 200b4e4: 32 80 00 04 bne,a 200b4f4 <_RTEMS_tasks_Post_switch_extension+0x40> 200b4e8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200b4ec: 81 c7 e0 08 ret <== NOT EXECUTED 200b4f0: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b4f4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200b4f8: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b4fc: a2 07 bf f4 add %fp, -12, %l1 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200b500: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b504: 94 10 00 11 mov %l1, %o2 200b508: 21 00 00 3f sethi %hi(0xfc00), %l0 200b50c: 40 00 04 92 call 200c754 200b510: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200b514: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200b518: 9f c0 40 00 call %g1 200b51c: 90 10 00 12 mov %l2, %o0 asr->nest_level -= 1; 200b520: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b524: 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; 200b528: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b52c: 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; 200b530: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b534: 40 00 04 88 call 200c754 200b538: 94 10 00 11 mov %l1, %o2 200b53c: 81 c7 e0 08 ret 200b540: 81 e8 00 00 restore 02006e3c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2006e3c: 9d e3 bf 90 save %sp, -112, %sp 2006e40: 11 00 80 6f sethi %hi(0x201bc00), %o0 2006e44: 92 10 00 18 mov %i0, %o1 2006e48: 90 12 20 14 or %o0, 0x14, %o0 2006e4c: 40 00 07 f3 call 2008e18 <_Objects_Get> 2006e50: 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 ) { 2006e54: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006e58: 80 a0 60 00 cmp %g1, 0 2006e5c: 12 80 00 11 bne 2006ea0 <_Rate_monotonic_Timeout+0x64> 2006e60: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2006e64: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006e68: 03 00 00 10 sethi %hi(0x4000), %g1 2006e6c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2006e70: 80 88 80 01 btst %g2, %g1 2006e74: 32 80 00 0d bne,a 2006ea8 <_Rate_monotonic_Timeout+0x6c> 2006e78: 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 ) { 2006e7c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2006e80: 80 a0 60 01 cmp %g1, 1 2006e84: 02 80 00 12 be 2006ecc <_Rate_monotonic_Timeout+0x90> 2006e88: 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; 2006e8c: 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; 2006e90: 05 00 80 6f sethi %hi(0x201bc00), %g2 2006e94: c2 00 a1 90 ld [ %g2 + 0x190 ], %g1 ! 201bd90 <_Thread_Dispatch_disable_level> 2006e98: 82 00 7f ff add %g1, -1, %g1 2006e9c: c2 20 a1 90 st %g1, [ %g2 + 0x190 ] 2006ea0: 81 c7 e0 08 ret 2006ea4: 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 ) && 2006ea8: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006eac: 80 a0 80 01 cmp %g2, %g1 2006eb0: 32 bf ff f4 bne,a 2006e80 <_Rate_monotonic_Timeout+0x44> 2006eb4: 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 ); 2006eb8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006ebc: 40 00 09 41 call 20093c0 <_Thread_Clear_state> 2006ec0: 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 ); 2006ec4: 10 80 00 05 b 2006ed8 <_Rate_monotonic_Timeout+0x9c> 2006ec8: 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; 2006ecc: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006ed0: 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; 2006ed4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006ed8: 7f ff fe 2e call 2006790 <_Rate_monotonic_Initiate_statistics> 2006edc: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006ee0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006ee4: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006ee8: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006eec: 11 00 80 6f sethi %hi(0x201bc00), %o0 2006ef0: 40 00 0f e8 call 200ae90 <_Watchdog_Insert> 2006ef4: 90 12 22 74 or %o0, 0x274, %o0 ! 201be74 <_Watchdog_Ticks_chain> 2006ef8: 30 bf ff e6 b,a 2006e90 <_Rate_monotonic_Timeout+0x54> 0200784c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 200784c: 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 ); 2007850: 35 00 80 5d sethi %hi(0x2017400), %i2 2007854: 7f ff fc bd call 2006b48 <_Objects_Allocate> 2007858: 90 16 a0 00 mov %i2, %o0 ! 2017400 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200785c: 37 00 80 5c sethi %hi(0x2017000), %i3 2007860: c2 06 e2 a0 ld [ %i3 + 0x2a0 ], %g1 ! 20172a0 <_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(); 2007864: 39 00 80 5d sethi %hi(0x2017400), %i4 2007868: 82 00 60 01 inc %g1 200786c: d0 27 20 4c st %o0, [ %i4 + 0x4c ] 2007870: c2 26 e2 a0 st %g1, [ %i3 + 0x2a0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 2007874: 33 00 80 5c sethi %hi(0x2017000), %i1 2007878: c2 06 63 3c ld [ %i1 + 0x33c ], %g1 ! 201733c <_Configuration_Table> 200787c: 05 00 80 59 sethi %hi(0x2016400), %g2 2007880: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 2007884: d6 00 a0 f0 ld [ %g2 + 0xf0 ], %o3 2007888: 03 00 80 56 sethi %hi(0x2015800), %g1 200788c: 82 10 61 78 or %g1, 0x178, %g1 ! 2015978 <_Status_Object_name_errors_to_status+0x18> 2007890: c2 27 bf f4 st %g1, [ %fp + -12 ] 2007894: 80 a2 c0 03 cmp %o3, %g3 2007898: 1a 80 00 03 bcc 20078a4 <_Thread_Create_idle+0x58> 200789c: d2 07 20 4c ld [ %i4 + 0x4c ], %o1 20078a0: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 20078a4: 03 00 80 59 sethi %hi(0x2016400), %g1 20078a8: da 08 60 f4 ldub [ %g1 + 0xf4 ], %o5 ! 20164f4 20078ac: 84 07 bf f4 add %fp, -12, %g2 20078b0: 82 10 20 01 mov 1, %g1 20078b4: c0 23 a0 60 clr [ %sp + 0x60 ] 20078b8: c0 23 a0 64 clr [ %sp + 0x64 ] 20078bc: c0 23 a0 68 clr [ %sp + 0x68 ] 20078c0: 90 16 a0 00 mov %i2, %o0 20078c4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20078c8: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 20078cc: 94 10 20 00 clr %o2 20078d0: 40 00 00 c3 call 2007bdc <_Thread_Initialize> 20078d4: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 20078d8: c4 06 63 3c ld [ %i1 + 0x33c ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20078dc: c2 06 e2 a0 ld [ %i3 + 0x2a0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 20078e0: c6 07 20 4c ld [ %i4 + 0x4c ], %g3 20078e4: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 20078e8: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 20078ec: c2 26 e2 a0 st %g1, [ %i3 + 0x2a0 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 20078f0: 05 00 80 5c sethi %hi(0x2017000), %g2 20078f4: 03 00 80 5c sethi %hi(0x2017000), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 20078f8: 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 = 20078fc: c6 20 a3 64 st %g3, [ %g2 + 0x364 ] 2007900: c6 20 63 30 st %g3, [ %g1 + 0x330 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 2007904: b2 10 20 00 clr %i1 2007908: b6 10 20 00 clr %i3 200790c: 40 00 03 e0 call 200888c <_Thread_Start> 2007910: 99 e8 20 00 restore %g0, 0, %o4 2007914: 01 00 00 00 nop 02007b2c <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 2007b2c: 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 ) ) { 2007b30: 80 a2 20 00 cmp %o0, 0 2007b34: 02 80 00 1d be 2007ba8 <_Thread_Get+0x7c> 2007b38: 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); 2007b3c: 83 32 20 18 srl %o0, 0x18, %g1 2007b40: 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 ) 2007b44: 84 00 7f ff add %g1, -1, %g2 2007b48: 80 a0 a0 03 cmp %g2, 3 2007b4c: 38 80 00 14 bgu,a 2007b9c <_Thread_Get+0x70> 2007b50: 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 :) */ 2007b54: 89 32 20 1b srl %o0, 0x1b, %g4 2007b58: 80 a1 20 01 cmp %g4, 1 2007b5c: 12 80 00 0f bne 2007b98 <_Thread_Get+0x6c> 2007b60: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 2007b64: 03 00 80 5c sethi %hi(0x2017000), %g1 2007b68: 82 10 62 00 or %g1, 0x200, %g1 ! 2017200 <_Objects_Information_table> 2007b6c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 2007b70: 80 a0 60 00 cmp %g1, 0 2007b74: 22 80 00 17 be,a 2007bd0 <_Thread_Get+0xa4> 2007b78: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 2007b7c: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 2007b80: 80 a2 20 00 cmp %o0, 0 2007b84: 02 80 00 11 be 2007bc8 <_Thread_Get+0x9c> 2007b88: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 2007b8c: 82 13 c0 00 mov %o7, %g1 2007b90: 7f ff fd 56 call 20070e8 <_Objects_Get> 2007b94: 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; 2007b98: 82 10 20 01 mov 1, %g1 2007b9c: 90 10 20 00 clr %o0 2007ba0: 81 c3 e0 08 retl 2007ba4: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007ba8: 03 00 80 5c sethi %hi(0x2017000), %g1 2007bac: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 20172a0 <_Thread_Dispatch_disable_level> 2007bb0: 84 00 a0 01 inc %g2 2007bb4: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ] 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; 2007bb8: 03 00 80 5c sethi %hi(0x2017000), %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; 2007bbc: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 2007bc0: 81 c3 e0 08 retl 2007bc4: d0 00 63 64 ld [ %g1 + 0x364 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 2007bc8: 81 c3 e0 08 retl <== NOT EXECUTED 2007bcc: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 2007bd0: 81 c3 e0 08 retl 2007bd4: 90 10 20 00 clr %o0 0200cb08 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200cb08: 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; 200cb0c: 03 00 80 5c sethi %hi(0x2017000), %g1 200cb10: e0 00 63 64 ld [ %g1 + 0x364 ], %l0 ! 2017364 <_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(); 200cb14: 3f 00 80 32 sethi %hi(0x200c800), %i7 200cb18: be 17 e3 08 or %i7, 0x308, %i7 ! 200cb08 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200cb1c: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200cb20: 7f ff d4 a5 call 2001db4 200cb24: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 200cb28: 07 00 80 5b sethi %hi(0x2016c00), %g3 doneConstructors = 1; 200cb2c: 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; 200cb30: e4 08 e3 b8 ldub [ %g3 + 0x3b8 ], %l2 doneConstructors = 1; 200cb34: c2 28 e3 b8 stb %g1, [ %g3 + 0x3b8 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { 200cb38: c4 04 21 60 ld [ %l0 + 0x160 ], %g2 200cb3c: 80 a0 a0 00 cmp %g2, 0 200cb40: 02 80 00 0b be 200cb6c <_Thread_Handler+0x64> 200cb44: 23 00 80 5c sethi %hi(0x2017000), %l1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200cb48: d0 04 63 28 ld [ %l1 + 0x328 ], %o0 ! 2017328 <_Thread_Allocated_fp> 200cb4c: 80 a4 00 08 cmp %l0, %o0 200cb50: 02 80 00 07 be 200cb6c <_Thread_Handler+0x64> 200cb54: 80 a2 20 00 cmp %o0, 0 if ( _Thread_Allocated_fp != NULL ) 200cb58: 22 80 00 05 be,a 200cb6c <_Thread_Handler+0x64> 200cb5c: e0 24 63 28 st %l0, [ %l1 + 0x328 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200cb60: 7f ff f1 a5 call 20091f4 <_CPU_Context_save_fp> 200cb64: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200cb68: e0 24 63 28 st %l0, [ %l1 + 0x328 ] * 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 ); 200cb6c: 7f ff f0 06 call 2008b84 <_User_extensions_Thread_begin> 200cb70: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200cb74: 7f ff eb e0 call 2007af4 <_Thread_Enable_dispatch> 200cb78: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 200cb7c: 83 2c a0 18 sll %l2, 0x18, %g1 200cb80: 80 a0 60 00 cmp %g1, 0 200cb84: 02 80 00 1e be 200cbfc <_Thread_Handler+0xf4> 200cb88: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200cb8c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200cb90: 80 a0 60 01 cmp %g1, 1 200cb94: 22 80 00 21 be,a 200cc18 <_Thread_Handler+0x110> 200cb98: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200cb9c: 80 a0 60 01 cmp %g1, 1 200cba0: 1a 80 00 0c bcc 200cbd0 <_Thread_Handler+0xc8> 200cba4: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 200cba8: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200cbac: 9f c0 40 00 call %g1 200cbb0: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 200cbb4: d0 24 20 28 st %o0, [ %l0 + 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 ); 200cbb8: 7f ff f0 07 call 2008bd4 <_User_extensions_Thread_exitted> 200cbbc: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200cbc0: 90 10 20 00 clr %o0 200cbc4: 92 10 20 01 mov 1, %o1 200cbc8: 7f ff e7 b0 call 2006a88 <_Internal_error_Occurred> 200cbcc: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200cbd0: 22 80 00 16 be,a 200cc28 <_Thread_Handler+0x120> <== NOT EXECUTED 200cbd4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200cbd8: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 200cbdc: 12 bf ff f7 bne 200cbb8 <_Thread_Handler+0xb0> <== NOT EXECUTED 200cbe0: 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 = 200cbe4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200cbe8: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED 200cbec: 9f c0 40 00 call %g1 <== NOT EXECUTED 200cbf0: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED 200cbf4: 10 bf ff f1 b 200cbb8 <_Thread_Handler+0xb0> <== NOT EXECUTED 200cbf8: d0 24 20 28 st %o0, [ %l0 + 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 (); 200cbfc: 40 00 26 05 call 2016410 <_init> 200cc00: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200cc04: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200cc08: 80 a0 60 01 cmp %g1, 1 200cc0c: 12 bf ff e5 bne 200cba0 <_Thread_Handler+0x98> 200cc10: 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 = 200cc14: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200cc18: 9f c0 40 00 call %g1 <== NOT EXECUTED 200cc1c: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200cc20: 10 bf ff e6 b 200cbb8 <_Thread_Handler+0xb0> <== NOT EXECUTED 200cc24: d0 24 20 28 st %o0, [ %l0 + 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 = 200cc28: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200cc2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200cc30: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED 200cc34: 10 bf ff e1 b 200cbb8 <_Thread_Handler+0xb0> <== NOT EXECUTED 200cc38: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED 02007bdc <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007bdc: 9d e3 bf 98 save %sp, -104, %sp 2007be0: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007be4: 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 ) { 2007be8: e4 00 40 00 ld [ %g1 ], %l2 2007bec: e6 07 a0 60 ld [ %fp + 0x60 ], %l3 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007bf0: 02 80 00 69 be 2007d94 <_Thread_Initialize+0x1b8> 2007bf4: 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; 2007bf8: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 2007bfc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2007c00: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 2007c04: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2007c08: 80 8f 20 ff btst 0xff, %i4 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) { _Thread_Stack_Free( the_thread ); return FALSE; 2007c0c: b4 10 20 00 clr %i2 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2007c10: 12 80 00 43 bne 2007d1c <_Thread_Initialize+0x140> 2007c14: 82 10 20 00 clr %g1 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007c18: 37 00 80 5c sethi %hi(0x2017000), %i3 2007c1c: d0 06 e3 44 ld [ %i3 + 0x344 ], %o0 ! 2017344 <_Thread_Maximum_extensions> } else fp_area = NULL; the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 2007c20: c2 26 60 cc st %g1, [ %i1 + 0xcc ] fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 2007c24: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007c28: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2007c2c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007c30: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007c34: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 2007c38: c0 26 61 64 clr [ %i1 + 0x164 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007c3c: 80 a2 20 00 cmp %o0, 0 2007c40: 12 80 00 41 bne 2007d44 <_Thread_Initialize+0x168> 2007c44: b8 16 e3 44 or %i3, 0x344, %i4 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 2007c48: c0 26 61 74 clr [ %i1 + 0x174 ] 2007c4c: a0 10 20 00 clr %l0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007c50: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2007c54: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007c58: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 2007c5c: 80 a4 e0 02 cmp %l3, 2 2007c60: 12 80 00 05 bne 2007c74 <_Thread_Initialize+0x98> 2007c64: e6 26 60 b0 st %l3, [ %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; 2007c68: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 2007c6c: c4 00 61 f8 ld [ %g1 + 0x1f8 ], %g2 ! 20171f8 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 2007c70: 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; 2007c74: 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 ); 2007c78: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 2007c7c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2007c80: 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 ); 2007c84: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2007c88: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 2007c8c: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2007c90: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 2007c94: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 2007c98: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007c9c: 40 00 02 1a call 2008504 <_Thread_Set_priority> 2007ca0: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007ca4: c4 06 60 08 ld [ %i1 + 8 ], %g2 2007ca8: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007cac: 03 00 00 3f sethi %hi(0xfc00), %g1 2007cb0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007cb4: 84 08 80 01 and %g2, %g1, %g2 2007cb8: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2007cbc: e4 26 60 0c st %l2, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 2007cc0: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 2007cc4: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007cc8: 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 ); 2007ccc: 90 10 00 19 mov %i1, %o0 2007cd0: 40 00 03 e9 call 2008c74 <_User_extensions_Thread_create> 2007cd4: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 2007cd8: 80 8a 20 ff btst 0xff, %o0 2007cdc: 12 80 00 0e bne 2007d14 <_Thread_Initialize+0x138> 2007ce0: 80 a4 20 00 cmp %l0, 0 if ( extensions_area ) 2007ce4: 02 80 00 05 be 2007cf8 <_Thread_Initialize+0x11c> <== NOT EXECUTED 2007ce8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 2007cec: 40 00 05 04 call 20090fc <_Workspace_Free> <== NOT EXECUTED 2007cf0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007cf4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007cf8: 02 80 00 05 be 2007d0c <_Thread_Initialize+0x130> <== NOT EXECUTED 2007cfc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007d00: 40 00 04 ff call 20090fc <_Workspace_Free> <== NOT EXECUTED 2007d04: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007d08: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007d0c: 40 00 02 ba call 20087f4 <_Thread_Stack_Free> <== NOT EXECUTED 2007d10: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 2007d14: 81 c7 e0 08 ret 2007d18: 81 e8 00 00 restore */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2007d1c: 40 00 04 ff call 2009118 <_Workspace_Allocate> 2007d20: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) { 2007d24: b4 92 20 00 orcc %o0, 0, %i2 2007d28: 12 bf ff bc bne 2007c18 <_Thread_Initialize+0x3c> 2007d2c: 82 10 00 1a mov %i2, %g1 _Thread_Stack_Free( the_thread ); 2007d30: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007d34: 40 00 02 b0 call 20087f4 <_Thread_Stack_Free> <== NOT EXECUTED 2007d38: b0 10 20 00 clr %i0 <== NOT EXECUTED 2007d3c: 81 c7 e0 08 ret <== NOT EXECUTED 2007d40: 81 e8 00 00 restore <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 2007d44: 90 02 20 01 inc %o0 2007d48: 40 00 04 f4 call 2009118 <_Workspace_Allocate> 2007d4c: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 2007d50: a0 92 20 00 orcc %o0, 0, %l0 2007d54: 02 80 00 1b be 2007dc0 <_Thread_Initialize+0x1e4> 2007d58: c2 06 e3 44 ld [ %i3 + 0x344 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007d5c: 80 a0 7f ff cmp %g1, -1 2007d60: 02 bf ff bc be 2007c50 <_Thread_Initialize+0x74> 2007d64: e0 26 61 74 st %l0, [ %i1 + 0x174 ] 2007d68: 86 10 20 00 clr %g3 2007d6c: 88 10 00 10 mov %l0, %g4 2007d70: c4 07 00 00 ld [ %i4 ], %g2 the_thread->extensions[i] = NULL; 2007d74: 83 28 e0 02 sll %g3, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007d78: 86 00 e0 01 inc %g3 2007d7c: 84 00 a0 01 inc %g2 2007d80: 80 a0 80 03 cmp %g2, %g3 2007d84: 18 bf ff fb bgu 2007d70 <_Thread_Initialize+0x194> 2007d88: c0 21 00 01 clr [ %g4 + %g1 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007d8c: 10 bf ff b2 b 2007c54 <_Thread_Initialize+0x78> 2007d90: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2007d94: 90 10 00 19 mov %i1, %o0 2007d98: 40 00 02 7b call 2008784 <_Thread_Stack_Allocate> 2007d9c: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2007da0: 80 a2 20 00 cmp %o0, 0 2007da4: 02 80 00 0e be 2007ddc <_Thread_Initialize+0x200> 2007da8: 80 a6 c0 08 cmp %i3, %o0 2007dac: 18 80 00 0c bgu 2007ddc <_Thread_Initialize+0x200> 2007db0: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 2007db4: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 2007db8: 10 bf ff 92 b 2007c00 <_Thread_Initialize+0x24> 2007dbc: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007dc0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007dc4: 02 80 00 04 be 2007dd4 <_Thread_Initialize+0x1f8> <== NOT EXECUTED 2007dc8: 01 00 00 00 nop <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007dcc: 40 00 04 cc call 20090fc <_Workspace_Free> <== NOT EXECUTED 2007dd0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007dd4: 40 00 02 88 call 20087f4 <_Thread_Stack_Free> <== NOT EXECUTED 2007dd8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007ddc: 81 c7 e0 08 ret 2007de0: 91 e8 20 00 restore %g0, 0, %o0 0200ce88 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 200ce88: 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; 200ce8c: 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; 200ce90: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200ce94: 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; 200ce98: 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; 200ce9c: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 200cea0: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 200cea4: 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; 200cea8: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 200ceac: 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 ) ) { 200ceb0: 7f ff f0 1b call 2008f1c <_Thread_queue_Extract_with_proxy> 200ceb4: 90 10 00 18 mov %i0, %o0 200ceb8: 80 8a 20 ff btst 0xff, %o0 200cebc: 32 80 00 07 bne,a 200ced8 <_Thread_Reset+0x50> 200cec0: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200cec4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200cec8: 80 a0 60 02 cmp %g1, 2 200cecc: 02 80 00 0c be 200cefc <_Thread_Reset+0x74> 200ced0: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200ced4: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 200ced8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200cedc: 80 a0 40 19 cmp %g1, %i1 200cee0: 02 80 00 05 be 200cef4 <_Thread_Reset+0x6c> 200cee4: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 200cee8: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 200ceec: 7f ff f0 93 call 2009138 <_Thread_Set_priority> 200cef0: 81 e8 00 00 restore 200cef4: 81 c7 e0 08 ret 200cef8: 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 ); 200cefc: 7f ff f3 41 call 2009c00 <_Watchdog_Remove> <== NOT EXECUTED 200cf00: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200cf04: 10 bf ff f5 b 200ced8 <_Thread_Reset+0x50> <== NOT EXECUTED 200cf08: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 0200c13c <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200c13c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200c140: 03 00 80 5c sethi %hi(0x2017000), %g1 200c144: e0 00 63 64 ld [ %g1 + 0x364 ], %l0 ! 2017364 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200c148: 7f ff d7 17 call 2001da4 200c14c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200c150: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200c154: c4 04 40 00 ld [ %l1 ], %g2 200c158: c2 04 60 08 ld [ %l1 + 8 ], %g1 200c15c: 80 a0 80 01 cmp %g2, %g1 200c160: 02 80 00 18 be 200c1c0 <_Thread_Reset_timeslice+0x84> 200c164: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200c168: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 200c16c: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200c170: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c174: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c178: 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; 200c17c: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200c180: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c184: 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; 200c188: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200c18c: 7f ff d7 0a call 2001db4 200c190: 01 00 00 00 nop 200c194: 7f ff d7 04 call 2001da4 200c198: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200c19c: 07 00 80 5c sethi %hi(0x2017000), %g3 200c1a0: c2 00 e3 30 ld [ %g3 + 0x330 ], %g1 ! 2017330 <_Thread_Heir> 200c1a4: 80 a4 00 01 cmp %l0, %g1 200c1a8: 02 80 00 08 be 200c1c8 <_Thread_Reset_timeslice+0x8c> 200c1ac: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 200c1b0: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 200c1b4: c4 28 63 74 stb %g2, [ %g1 + 0x374 ] ! 2017374 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 200c1b8: 7f ff d6 ff call 2001db4 <== NOT EXECUTED 200c1bc: 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 ); 200c1c0: 7f ff d6 fd call 2001db4 200c1c4: 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; 200c1c8: c2 04 40 00 ld [ %l1 ], %g1 200c1cc: c2 20 e3 30 st %g1, [ %g3 + 0x330 ] _Context_Switch_necessary = TRUE; 200c1d0: 03 00 80 5c sethi %hi(0x2017000), %g1 200c1d4: c4 28 63 74 stb %g2, [ %g1 + 0x374 ] ! 2017374 <_Context_Switch_necessary> _ISR_Enable( level ); 200c1d8: 7f ff d6 f7 call 2001db4 200c1dc: 81 e8 00 00 restore 200c1e0: 01 00 00 00 nop 02009e4c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 2009e4c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2009e50: 7f ff e2 f2 call 2002a18 2009e54: 01 00 00 00 nop 2009e58: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 2009e5c: 80 8e 60 ff btst 0xff, %i1 2009e60: 22 80 00 0d be,a 2009e94 <_Thread_Resume+0x48> 2009e64: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 2009e68: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 2009e6c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 2009e70: 80 88 60 02 btst 2, %g1 2009e74: 02 80 00 06 be 2009e8c <_Thread_Resume+0x40> 2009e78: 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); 2009e7c: 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 ) ) { 2009e80: 80 a0 60 00 cmp %g1, 0 2009e84: 02 80 00 0a be 2009eac <_Thread_Resume+0x60> 2009e88: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 2009e8c: 7f ff e2 e7 call 2002a28 2009e90: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 2009e94: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 2009e98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2009e9c: 02 bf ff f4 be 2009e6c <_Thread_Resume+0x20> <== NOT EXECUTED 2009ea0: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 2009ea4: 7f ff e2 e1 call 2002a28 <== NOT EXECUTED 2009ea8: 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; 2009eac: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 2009eb0: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2009eb4: 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); 2009eb8: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 2009ebc: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009ec0: 1b 00 80 8d sethi %hi(0x2023400), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2009ec4: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009ec8: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009ecc: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 2009ed0: c2 26 00 00 st %g1, [ %i0 ] 2009ed4: c4 13 63 d8 lduh [ %o5 + 0x3d8 ], %g2 old_last_node = the_chain->last; 2009ed8: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 2009edc: f0 20 e0 08 st %i0, [ %g3 + 8 ] 2009ee0: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2009ee4: c8 26 20 04 st %g4, [ %i0 + 4 ] 2009ee8: c4 33 63 d8 sth %g2, [ %o5 + 0x3d8 ] 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; 2009eec: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 2009ef0: 7f ff e2 ce call 2002a28 2009ef4: 90 10 00 10 mov %l0, %o0 2009ef8: 7f ff e2 c8 call 2002a18 2009efc: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 2009f00: 09 00 80 8d sethi %hi(0x2023400), %g4 2009f04: c4 01 23 b0 ld [ %g4 + 0x3b0 ], %g2 ! 20237b0 <_Thread_Heir> 2009f08: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 2009f0c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2009f10: 80 a0 c0 01 cmp %g3, %g1 2009f14: 1a bf ff de bcc 2009e8c <_Thread_Resume+0x40> 2009f18: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009f1c: 03 00 80 8d sethi %hi(0x2023400), %g1 2009f20: c4 00 63 e4 ld [ %g1 + 0x3e4 ], %g2 ! 20237e4 <_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; 2009f24: f0 21 23 b0 st %i0, [ %g4 + 0x3b0 ] if ( _Thread_Executing->is_preemptible || 2009f28: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 2009f2c: 80 a0 60 00 cmp %g1, 0 2009f30: 02 80 00 06 be 2009f48 <_Thread_Resume+0xfc> 2009f34: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009f38: 84 10 20 01 mov 1, %g2 2009f3c: 03 00 80 8d sethi %hi(0x2023400), %g1 2009f40: c4 28 63 f4 stb %g2, [ %g1 + 0x3f4 ] ! 20237f4 <_Context_Switch_necessary> 2009f44: 30 bf ff d2 b,a 2009e8c <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009f48: 12 bf ff d1 bne 2009e8c <_Thread_Resume+0x40> 2009f4c: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009f50: 10 bf ff fc b 2009f40 <_Thread_Resume+0xf4> <== NOT EXECUTED 2009f54: 03 00 80 8d sethi %hi(0x2023400), %g1 <== NOT EXECUTED 02008784 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 2008784: 9d e3 bf 98 save %sp, -104, %sp 2008788: 03 00 80 59 sethi %hi(0x2016400), %g1 200878c: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 ! 20164f0 2008790: 80 a6 40 01 cmp %i1, %g1 2008794: 2a 80 00 02 bcs,a 200879c <_Thread_Stack_Allocate+0x18> 2008798: 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 ) { 200879c: 03 00 80 5c sethi %hi(0x2017000), %g1 20087a0: c4 00 63 3c ld [ %g1 + 0x33c ], %g2 ! 201733c <_Configuration_Table> 20087a4: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 20087a8: 80 a0 60 00 cmp %g1, 0 20087ac: 22 80 00 0a be,a 20087d4 <_Thread_Stack_Allocate+0x50> 20087b0: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 20087b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20087b8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 20087bc: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 20087c0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 20087c4: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 20087c8: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 20087cc: 81 c7 e0 08 ret <== NOT EXECUTED 20087d0: 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 ); 20087d4: 40 00 02 51 call 2009118 <_Workspace_Allocate> 20087d8: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 20087dc: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 20087e0: 80 a0 00 08 cmp %g0, %o0 20087e4: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 20087e8: b0 0e 40 18 and %i1, %i0, %i0 20087ec: 81 c7 e0 08 ret 20087f0: 81 e8 00 00 restore 020087f4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 20087f4: 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 ) 20087f8: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 20087fc: 80 a0 60 00 cmp %g1, 0 2008800: 02 80 00 09 be 2008824 <_Thread_Stack_Free+0x30> 2008804: 03 00 80 5c sethi %hi(0x2017000), %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 ) 2008808: c4 00 63 3c ld [ %g1 + 0x33c ], %g2 ! 201733c <_Configuration_Table> 200880c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 2008810: 80 a0 60 00 cmp %g1, 0 2008814: 22 80 00 06 be,a 200882c <_Thread_Stack_Free+0x38> 2008818: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 200881c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008820: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 2008824: 81 c7 e0 08 ret <== NOT EXECUTED 2008828: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 200882c: 40 00 02 34 call 20090fc <_Workspace_Free> 2008830: 81 e8 00 00 restore 2008834: 01 00 00 00 nop 020088d8 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 20088d8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 20088dc: 03 00 80 5c sethi %hi(0x2017000), %g1 20088e0: e0 00 63 64 ld [ %g1 + 0x364 ], %l0 ! 2017364 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 20088e4: c4 0c 20 76 ldub [ %l0 + 0x76 ], %g2 20088e8: 80 a0 a0 00 cmp %g2, 0 20088ec: 02 80 00 23 be 2008978 <_Thread_Tickle_timeslice+0xa0> 20088f0: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 20088f4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20088f8: 80 a0 60 00 cmp %g1, 0 20088fc: 12 80 00 1f bne 2008978 <_Thread_Tickle_timeslice+0xa0> 2008900: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2008904: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 2008908: 80 a0 60 01 cmp %g1, 1 200890c: 0a 80 00 07 bcs 2008928 <_Thread_Tickle_timeslice+0x50> 2008910: 80 a0 60 02 cmp %g1, 2 2008914: 28 80 00 10 bleu,a 2008954 <_Thread_Tickle_timeslice+0x7c> 2008918: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 200891c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 2008920: 22 80 00 04 be,a 2008930 <_Thread_Tickle_timeslice+0x58> <== NOT EXECUTED 2008924: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED 2008928: 81 c7 e0 08 ret 200892c: 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 ) 2008930: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2008934: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2008938: 12 bf ff fc bne 2008928 <_Thread_Tickle_timeslice+0x50> <== NOT EXECUTED 200893c: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 2008940: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 2008944: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008948: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200894c: 81 c7 e0 08 ret <== NOT EXECUTED 2008950: 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 ) { 2008954: 82 00 7f ff add %g1, -1, %g1 2008958: 80 a0 60 00 cmp %g1, 0 200895c: 14 bf ff f3 bg 2008928 <_Thread_Tickle_timeslice+0x50> 2008960: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 2008964: 40 00 0d f6 call 200c13c <_Thread_Reset_timeslice> 2008968: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200896c: 03 00 80 5c sethi %hi(0x2017000), %g1 2008970: c4 00 61 f8 ld [ %g1 + 0x1f8 ], %g2 ! 20171f8 <_Thread_Ticks_per_timeslice> 2008974: c4 24 20 78 st %g2, [ %l0 + 0x78 ] 2008978: 81 c7 e0 08 ret 200897c: 81 e8 00 00 restore 02008104 <_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 ) { 2008104: 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; 2008108: 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); 200810c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2008110: 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); 2008114: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 2008118: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 200811c: 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 ) { 2008120: 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 ) ) 2008124: 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); 2008128: 83 34 a0 06 srl %l2, 6, %g1 200812c: 12 80 00 30 bne 20081ec <_Thread_queue_Enqueue_priority+0xe8> 2008130: 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; 2008134: 85 28 60 04 sll %g1, 4, %g2 2008138: 83 28 60 02 sll %g1, 2, %g1 200813c: 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; 2008140: b0 10 00 01 mov %g1, %i0 2008144: 82 05 80 01 add %l6, %g1, %g1 2008148: 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 ); 200814c: 7f ff e7 16 call 2001da4 2008150: 01 00 00 00 nop 2008154: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 2008158: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 200815c: 80 a4 00 13 cmp %l0, %l3 2008160: 32 80 00 18 bne,a 20081c0 <_Thread_queue_Enqueue_priority+0xbc> 2008164: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 2008168: 10 80 00 81 b 200836c <_Thread_queue_Enqueue_priority+0x268> 200816c: 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 ) ) 2008170: 80 a4 00 13 cmp %l0, %l3 2008174: 02 80 00 17 be 20081d0 <_Thread_queue_Enqueue_priority+0xcc> 2008178: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 200817c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2008180: 80 a4 80 11 cmp %l2, %l1 2008184: 28 80 00 14 bleu,a 20081d4 <_Thread_queue_Enqueue_priority+0xd0> 2008188: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 200818c: 7f ff e7 0a call 2001db4 2008190: 90 10 00 14 mov %l4, %o0 2008194: 7f ff e7 04 call 2001da4 2008198: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 200819c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20081a0: 80 8d 40 01 btst %l5, %g1 20081a4: 02 80 00 6b be 2008350 <_Thread_queue_Enqueue_priority+0x24c> 20081a8: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 20081ac: 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 ) ) { 20081b0: 80 a4 00 13 cmp %l0, %l3 20081b4: 02 80 00 07 be 20081d0 <_Thread_queue_Enqueue_priority+0xcc> 20081b8: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 20081bc: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 20081c0: 80 a4 80 11 cmp %l2, %l1 20081c4: 38 bf ff eb bgu,a 2008170 <_Thread_queue_Enqueue_priority+0x6c> 20081c8: 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 ) ) { 20081cc: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 20081d0: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 20081d4: 80 a6 20 01 cmp %i0, 1 20081d8: 02 80 00 47 be 20082f4 <_Thread_queue_Enqueue_priority+0x1f0> 20081dc: 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; 20081e0: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 20081e4: 81 c7 e0 08 ret <== NOT EXECUTED 20081e8: 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; 20081ec: 85 28 60 04 sll %g1, 4, %g2 20081f0: 83 28 60 02 sll %g1, 2, %g1 20081f4: 82 20 80 01 sub %g2, %g1, %g1 20081f8: 05 00 80 59 sethi %hi(0x2016400), %g2 20081fc: a6 06 00 01 add %i0, %g1, %l3 2008200: 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; 2008204: 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; 2008208: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 200820c: 7f ff e6 e6 call 2001da4 2008210: a2 00 60 01 add %g1, 1, %l1 2008214: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 2008218: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 200821c: 80 a4 c0 10 cmp %l3, %l0 2008220: 22 80 00 25 be,a 20082b4 <_Thread_queue_Enqueue_priority+0x1b0> 2008224: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 2008228: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 200822c: 80 a4 80 11 cmp %l2, %l1 2008230: 3a 80 00 21 bcc,a 20082b4 <_Thread_queue_Enqueue_priority+0x1b0> 2008234: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2008238: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 200823c: 80 a4 c0 10 cmp %l3, %l0 2008240: 32 80 00 19 bne,a 20082a4 <_Thread_queue_Enqueue_priority+0x1a0> 2008244: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008248: 10 80 00 1b b 20082b4 <_Thread_queue_Enqueue_priority+0x1b0> 200824c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2008250: 7f ff e6 d9 call 2001db4 2008254: 90 10 00 14 mov %l4, %o0 2008258: 7f ff e6 d3 call 2001da4 200825c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008260: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2008264: 80 8d 40 01 btst %l5, %g1 2008268: 02 80 00 3d be 200835c <_Thread_queue_Enqueue_priority+0x258> 200826c: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 2008270: 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 ) ) { 2008274: 80 a4 00 13 cmp %l0, %l3 2008278: 22 80 00 0f be,a 20082b4 <_Thread_queue_Enqueue_priority+0x1b0> 200827c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 2008280: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 2008284: 80 a4 80 11 cmp %l2, %l1 2008288: 3a 80 00 0b bcc,a 20082b4 <_Thread_queue_Enqueue_priority+0x1b0> 200828c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2008290: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 2008294: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 2008298: 22 80 00 07 be,a 20082b4 <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 200829c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 20082a0: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 20082a4: 80 a4 80 11 cmp %l2, %l1 20082a8: 0a bf ff ea bcs 2008250 <_Thread_queue_Enqueue_priority+0x14c> 20082ac: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 20082b0: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 20082b4: 80 a6 20 01 cmp %i0, 1 20082b8: 12 bf ff ca bne 20081e0 <_Thread_queue_Enqueue_priority+0xdc> 20082bc: 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 ) 20082c0: 80 a4 80 11 cmp %l2, %l1 20082c4: 02 80 00 18 be 2008324 <_Thread_queue_Enqueue_priority+0x220> 20082c8: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 20082cc: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 20082d0: 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; 20082d4: 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; 20082d8: 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; 20082dc: 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; 20082e0: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20082e4: 7f ff e6 b4 call 2001db4 20082e8: 01 00 00 00 nop 20082ec: 81 c7 e0 08 ret 20082f0: 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 ) 20082f4: 02 80 00 0c be 2008324 <_Thread_queue_Enqueue_priority+0x220> 20082f8: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 20082fc: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008300: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 2008304: 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; 2008308: 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; 200830c: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2008310: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008314: 7f ff e6 a8 call 2001db4 2008318: 90 10 00 14 mov %l4, %o0 200831c: 81 c7 e0 08 ret 2008320: 81 e8 00 00 restore 2008324: 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; 2008328: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 200832c: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2008330: 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; 2008334: 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; 2008338: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 200833c: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008340: 7f ff e6 9d call 2001db4 2008344: b0 10 20 01 mov 1, %i0 2008348: 81 c7 e0 08 ret 200834c: 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 ); 2008350: 7f ff e6 99 call 2001db4 <== NOT EXECUTED 2008354: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 2008358: 30 bf ff 7d b,a 200814c <_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 ); 200835c: 7f ff e6 96 call 2001db4 <== NOT EXECUTED 2008360: 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; 2008364: 10 bf ff aa b 200820c <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 2008368: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 200836c: 10 bf ff 9a b 20081d4 <_Thread_queue_Enqueue_priority+0xd0> 2008370: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 0200cc3c <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200cc3c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200cc40: 7f ff d4 59 call 2001da4 200cc44: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200cc48: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200cc4c: 03 00 00 ef sethi %hi(0x3bc00), %g1 200cc50: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200cc54: 80 88 80 01 btst %g2, %g1 200cc58: 02 80 00 19 be 200ccbc <_Thread_queue_Extract_fifo+0x80> 200cc5c: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200cc60: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 200cc64: 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 ) ) { 200cc68: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 200cc6c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cc70: c4 20 60 04 st %g2, [ %g1 + 4 ] 200cc74: 80 a0 e0 02 cmp %g3, 2 200cc78: 02 80 00 07 be 200cc94 <_Thread_queue_Extract_fifo+0x58> 200cc7c: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 200cc80: 7f ff d4 4d call 2001db4 200cc84: 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 ); 200cc88: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200cc8c: 7f ff ea 81 call 2007690 <_Thread_Clear_state> 200cc90: 81 e8 00 00 restore 200cc94: 82 10 20 03 mov 3, %g1 200cc98: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200cc9c: 7f ff d4 46 call 2001db4 200cca0: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 200cca4: 7f ff f0 b5 call 2008f78 <_Watchdog_Remove> 200cca8: 90 06 60 48 add %i1, 0x48, %o0 200ccac: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200ccb0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200ccb4: 7f ff ea 77 call 2007690 <_Thread_Clear_state> 200ccb8: 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 ); 200ccbc: 7f ff d4 3e call 2001db4 <== NOT EXECUTED 200ccc0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200ccc4: 01 00 00 00 nop 0200bec4 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 200bec4: 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 ); 200bec8: 7f ff d7 b7 call 2001da4 200becc: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200bed0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200bed4: 03 00 00 ef sethi %hi(0x3bc00), %g1 200bed8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200bedc: 80 88 80 01 btst %g2, %g1 200bee0: 02 80 00 23 be 200bf6c <_Thread_queue_Extract_priority_helper+0xa8> 200bee4: 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)); 200bee8: 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; 200beec: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200bef0: 80 a0 c0 01 cmp %g3, %g1 200bef4: 02 80 00 2a be 200bf9c <_Thread_queue_Extract_priority_helper+0xd8> 200bef8: 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; 200befc: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 200bf00: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 200bf04: 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; 200bf08: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 200bf0c: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 200bf10: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 200bf14: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 200bf18: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 200bf1c: 80 a0 80 01 cmp %g2, %g1 200bf20: 02 80 00 07 be 200bf3c <_Thread_queue_Extract_priority_helper+0x78> 200bf24: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 200bf28: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 200bf2c: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 200bf30: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 200bf34: 82 00 e0 3c add %g3, 0x3c, %g1 200bf38: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 200bf3c: 80 8e a0 ff btst 0xff, %i2 200bf40: 12 80 00 0d bne 200bf74 <_Thread_queue_Extract_priority_helper+0xb0> 200bf44: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200bf48: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200bf4c: 80 a0 60 02 cmp %g1, 2 200bf50: 02 80 00 0b be 200bf7c <_Thread_queue_Extract_priority_helper+0xb8> 200bf54: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200bf58: 7f ff d7 97 call 2001db4 200bf5c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200bf60: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200bf64: 7f ff ed cb call 2007690 <_Thread_Clear_state> 200bf68: 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 ); 200bf6c: 7f ff d7 92 call 2001db4 <== NOT EXECUTED 200bf70: 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 ); 200bf74: 7f ff d7 90 call 2001db4 200bf78: 91 e8 00 08 restore %g0, %o0, %o0 200bf7c: 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 ); 200bf80: 7f ff d7 8d call 2001db4 <== NOT EXECUTED 200bf84: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 200bf88: 7f ff f3 fc call 2008f78 <_Watchdog_Remove> <== NOT EXECUTED 200bf8c: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 200bf90: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 200bf94: 7f ff ed bf call 2007690 <_Thread_Clear_state> <== NOT EXECUTED 200bf98: 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; 200bf9c: 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; 200bfa0: 10 bf ff e7 b 200bf3c <_Thread_queue_Extract_priority_helper+0x78> 200bfa4: c4 20 40 00 st %g2, [ %g1 ] 0200bfa8 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 200bfa8: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 200bfac: 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 && 200bfb0: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 200bfb4: 80 a0 e0 00 cmp %g3, 0 200bfb8: 02 80 00 06 be 200bfd0 <_Thread_queue_Process_timeout+0x28> 200bfbc: 03 00 80 5c sethi %hi(0x2017000), %g1 200bfc0: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 2017364 <_Thread_Executing> 200bfc4: 80 a2 40 02 cmp %o1, %g2 200bfc8: 02 80 00 07 be 200bfe4 <_Thread_queue_Process_timeout+0x3c> 200bfcc: 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; 200bfd0: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200bfd4: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200bfd8: 82 13 c0 00 mov %o7, %g1 200bfdc: 7f ff ff af call 200be98 <_Thread_queue_Extract> 200bfe0: 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 ) { 200bfe4: 02 80 00 06 be 200bffc <_Thread_queue_Process_timeout+0x54> 200bfe8: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200bfec: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200bff0: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200bff4: 81 c3 e0 08 retl 200bff8: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 200bffc: 81 c3 e0 08 retl <== NOT EXECUTED 200c000: 01 00 00 00 nop 02008444 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 2008444: 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 ) 2008448: 80 a6 20 00 cmp %i0, 0 200844c: 02 80 00 13 be 2008498 <_Thread_queue_Requeue+0x54> 2008450: 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 ) { 2008454: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2008458: 80 a4 20 01 cmp %l0, 1 200845c: 02 80 00 04 be 200846c <_Thread_queue_Requeue+0x28> 2008460: 01 00 00 00 nop 2008464: 81 c7 e0 08 ret <== NOT EXECUTED 2008468: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200846c: 7f ff e6 4e call 2001da4 2008470: 01 00 00 00 nop 2008474: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2008478: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200847c: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008480: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008484: 80 88 80 01 btst %g2, %g1 2008488: 12 80 00 06 bne 20084a0 <_Thread_queue_Requeue+0x5c> 200848c: 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 ); 2008490: 7f ff e6 49 call 2001db4 2008494: 90 10 00 11 mov %l1, %o0 2008498: 81 c7 e0 08 ret 200849c: 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 ); 20084a0: 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; 20084a4: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 20084a8: 40 00 0e 87 call 200bec4 <_Thread_queue_Extract_priority_helper> 20084ac: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 20084b0: 90 10 00 18 mov %i0, %o0 20084b4: 92 10 00 19 mov %i1, %o1 20084b8: 7f ff ff 13 call 2008104 <_Thread_queue_Enqueue_priority> 20084bc: 94 07 bf f4 add %fp, -12, %o2 20084c0: 30 bf ff f4 b,a 2008490 <_Thread_queue_Requeue+0x4c> 02011b30 <_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) { 2011b30: 9d e3 bf 98 save %sp, -104, %sp 2011b34: 03 00 80 c2 sethi %hi(0x2030800), %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 ); 2011b38: 05 00 80 c2 sethi %hi(0x2030800), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011b3c: a0 10 63 74 or %g1, 0x374, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 2011b40: 03 00 80 c2 sethi %hi(0x2030800), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 2011b44: a4 10 a3 68 or %g2, 0x368, %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 ); 2011b48: a2 10 63 54 or %g1, 0x354, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011b4c: 40 00 02 a4 call 20125dc <_Chain_Get> 2011b50: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011b54: 80 a2 20 00 cmp %o0, 0 2011b58: 02 80 00 0f be 2011b94 <_Timer_Server_process_insertions+0x64> 2011b5c: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2011b60: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011b64: 80 a0 60 01 cmp %g1, 1 2011b68: 02 80 00 12 be 2011bb0 <_Timer_Server_process_insertions+0x80> 2011b6c: 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 ) { 2011b70: 02 80 00 0b be 2011b9c <_Timer_Server_process_insertions+0x6c> 2011b74: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011b78: 7f ff ff ee call 2011b30 <_Timer_Server_process_insertions> <== NOT EXECUTED 2011b7c: 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 ); 2011b80: 40 00 02 97 call 20125dc <_Chain_Get> 2011b84: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011b88: 80 a2 20 00 cmp %o0, 0 2011b8c: 32 bf ff f6 bne,a 2011b64 <_Timer_Server_process_insertions+0x34> 2011b90: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 2011b94: 81 c7 e0 08 ret 2011b98: 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 ); 2011b9c: 40 00 12 32 call 2016464 <_Watchdog_Insert> 2011ba0: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011ba4: 7f ff ff e3 call 2011b30 <_Timer_Server_process_insertions> 2011ba8: 01 00 00 00 nop 2011bac: 30 bf ff f5 b,a 2011b80 <_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 ); 2011bb0: 92 02 20 10 add %o0, 0x10, %o1 2011bb4: 40 00 12 2c call 2016464 <_Watchdog_Insert> 2011bb8: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011bbc: 7f ff ff dd call 2011b30 <_Timer_Server_process_insertions> 2011bc0: 01 00 00 00 nop 2011bc4: 30 bf ff ef b,a 2011b80 <_Timer_Server_process_insertions+0x50> 0200a67c <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a67c: 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; 200a680: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 200a684: 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; 200a688: 91 38 60 1f sra %g1, 0x1f, %o0 200a68c: 92 10 00 01 mov %g1, %o1 200a690: 83 30 60 1d srl %g1, 0x1d, %g1 200a694: 87 2a 60 03 sll %o1, 3, %g3 200a698: 85 2a 20 03 sll %o0, 3, %g2 200a69c: 84 10 40 02 or %g1, %g2, %g2 200a6a0: 83 30 e0 1b srl %g3, 0x1b, %g1 200a6a4: 99 28 a0 05 sll %g2, 5, %o4 200a6a8: 9b 28 e0 05 sll %g3, 5, %o5 200a6ac: 98 10 40 0c or %g1, %o4, %o4 200a6b0: 9a a3 40 03 subcc %o5, %g3, %o5 200a6b4: 83 33 60 1a srl %o5, 0x1a, %g1 200a6b8: 98 63 00 02 subx %o4, %g2, %o4 200a6bc: 97 2b 60 06 sll %o5, 6, %o3 200a6c0: 95 2b 20 06 sll %o4, 6, %o2 200a6c4: 96 a2 c0 0d subcc %o3, %o5, %o3 200a6c8: 94 10 40 0a or %g1, %o2, %o2 200a6cc: 94 62 80 0c subx %o2, %o4, %o2 200a6d0: 96 82 c0 09 addcc %o3, %o1, %o3 200a6d4: 94 42 80 08 addx %o2, %o0, %o2 200a6d8: 83 32 e0 1e srl %o3, 0x1e, %g1 200a6dc: 85 2a a0 02 sll %o2, 2, %g2 200a6e0: 84 10 40 02 or %g1, %g2, %g2 200a6e4: 87 2a e0 02 sll %o3, 2, %g3 200a6e8: 96 82 c0 03 addcc %o3, %g3, %o3 200a6ec: 94 42 80 02 addx %o2, %g2, %o2 200a6f0: 83 32 e0 1e srl %o3, 0x1e, %g1 200a6f4: 85 2a a0 02 sll %o2, 2, %g2 200a6f8: 84 10 40 02 or %g1, %g2, %g2 200a6fc: 87 2a e0 02 sll %o3, 2, %g3 200a700: 96 82 c0 03 addcc %o3, %g3, %o3 200a704: 94 42 80 02 addx %o2, %g2, %o2 200a708: 83 32 e0 1e srl %o3, 0x1e, %g1 200a70c: 85 2a a0 02 sll %o2, 2, %g2 200a710: 84 10 40 02 or %g1, %g2, %g2 200a714: 87 2a e0 02 sll %o3, 2, %g3 200a718: 96 82 c0 03 addcc %o3, %g3, %o3 200a71c: 94 42 80 02 addx %o2, %g2, %o2 200a720: 85 32 e0 17 srl %o3, 0x17, %g2 200a724: 83 2a a0 09 sll %o2, 9, %g1 200a728: 9b 2a e0 09 sll %o3, 9, %o5 200a72c: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 200a730: 96 83 40 0f addcc %o5, %o7, %o3 200a734: 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; 200a738: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a73c: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 200a740: 80 92 80 0b orcc %o2, %o3, %g0 200a744: 02 80 00 5d be 200a8b8 <_Timespec_Divide+0x23c> 200a748: 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; 200a74c: 92 10 00 08 mov %o0, %o1 200a750: 83 32 60 1d srl %o1, 0x1d, %g1 200a754: 9b 2a 60 03 sll %o1, 3, %o5 200a758: 91 3a 20 1f sra %o0, 0x1f, %o0 200a75c: 99 2a 20 03 sll %o0, 3, %o4 200a760: 98 10 40 0c or %g1, %o4, %o4 200a764: 83 33 60 1b srl %o5, 0x1b, %g1 200a768: 85 2b 20 05 sll %o4, 5, %g2 200a76c: 87 2b 60 05 sll %o5, 5, %g3 200a770: 84 10 40 02 or %g1, %g2, %g2 200a774: 86 a0 c0 0d subcc %g3, %o5, %g3 200a778: 83 30 e0 1a srl %g3, 0x1a, %g1 200a77c: 84 60 80 0c subx %g2, %o4, %g2 200a780: 9b 28 e0 06 sll %g3, 6, %o5 200a784: 99 28 a0 06 sll %g2, 6, %o4 200a788: 9a a3 40 03 subcc %o5, %g3, %o5 200a78c: 98 10 40 0c or %g1, %o4, %o4 200a790: 98 63 00 02 subx %o4, %g2, %o4 200a794: 9a 83 40 09 addcc %o5, %o1, %o5 200a798: 83 33 60 1e srl %o5, 0x1e, %g1 200a79c: 98 43 00 08 addx %o4, %o0, %o4 200a7a0: 87 2b 60 02 sll %o5, 2, %g3 200a7a4: 85 2b 20 02 sll %o4, 2, %g2 200a7a8: 9a 83 40 03 addcc %o5, %g3, %o5 200a7ac: 84 10 40 02 or %g1, %g2, %g2 200a7b0: 83 33 60 1e srl %o5, 0x1e, %g1 200a7b4: 98 43 00 02 addx %o4, %g2, %o4 200a7b8: 87 2b 60 02 sll %o5, 2, %g3 200a7bc: 85 2b 20 02 sll %o4, 2, %g2 200a7c0: 9a 83 40 03 addcc %o5, %g3, %o5 200a7c4: 84 10 40 02 or %g1, %g2, %g2 200a7c8: 83 33 60 1e srl %o5, 0x1e, %g1 200a7cc: 98 43 00 02 addx %o4, %g2, %o4 200a7d0: 87 2b 60 02 sll %o5, 2, %g3 200a7d4: 85 2b 20 02 sll %o4, 2, %g2 200a7d8: 9a 83 40 03 addcc %o5, %g3, %o5 200a7dc: 84 10 40 02 or %g1, %g2, %g2 200a7e0: 98 43 00 02 addx %o4, %g2, %o4 200a7e4: 83 2b 20 09 sll %o4, 9, %g1 200a7e8: 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; 200a7ec: 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; 200a7f0: a0 11 00 01 or %g4, %g1, %l0 200a7f4: 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; 200a7f8: a2 84 40 13 addcc %l1, %l3, %l1 200a7fc: 83 34 60 1e srl %l1, 0x1e, %g1 200a800: 87 2c 60 02 sll %l1, 2, %g3 200a804: a5 3c a0 1f sra %l2, 0x1f, %l2 200a808: a0 44 00 12 addx %l0, %l2, %l0 200a80c: 85 2c 20 02 sll %l0, 2, %g2 200a810: 84 10 40 02 or %g1, %g2, %g2 200a814: 83 30 e0 1b srl %g3, 0x1b, %g1 200a818: 99 28 a0 05 sll %g2, 5, %o4 200a81c: 9b 28 e0 05 sll %g3, 5, %o5 200a820: 98 10 40 0c or %g1, %o4, %o4 200a824: 9a a3 40 03 subcc %o5, %g3, %o5 200a828: 98 63 00 02 subx %o4, %g2, %o4 200a82c: 9a 83 40 11 addcc %o5, %l1, %o5 200a830: 83 33 60 1e srl %o5, 0x1e, %g1 200a834: 98 43 00 10 addx %o4, %l0, %o4 200a838: 87 2b 60 02 sll %o5, 2, %g3 200a83c: 85 2b 20 02 sll %o4, 2, %g2 200a840: 9a 83 40 03 addcc %o5, %g3, %o5 200a844: 84 10 40 02 or %g1, %g2, %g2 200a848: 83 33 60 1e srl %o5, 0x1e, %g1 200a84c: 87 2b 60 02 sll %o5, 2, %g3 200a850: 98 43 00 02 addx %o4, %g2, %o4 200a854: 9a 83 40 03 addcc %o5, %g3, %o5 200a858: 85 2b 20 02 sll %o4, 2, %g2 200a85c: 84 10 40 02 or %g1, %g2, %g2 200a860: 83 33 60 1b srl %o5, 0x1b, %g1 200a864: 98 43 00 02 addx %o4, %g2, %o4 200a868: 99 2b 20 05 sll %o4, 5, %o4 200a86c: 98 10 40 0c or %g1, %o4, %o4 200a870: 93 2b 60 05 sll %o5, 5, %o1 200a874: 40 00 33 49 call 2017598 <__udivdi3> 200a878: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 200a87c: 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; 200a880: a0 10 00 08 mov %o0, %l0 200a884: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 200a888: 96 10 23 e8 mov 0x3e8, %o3 200a88c: 40 00 33 43 call 2017598 <__udivdi3> 200a890: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 200a894: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a898: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 200a89c: 94 10 20 00 clr %o2 200a8a0: 92 10 00 11 mov %l1, %o1 200a8a4: 40 00 34 19 call 2017908 <__umoddi3> 200a8a8: 96 10 23 e8 mov 0x3e8, %o3 200a8ac: d2 26 c0 00 st %o1, [ %i3 ] 200a8b0: 81 c7 e0 08 ret 200a8b4: 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; 200a8b8: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 200a8bc: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 200a8c0: 81 c7 e0 08 ret <== NOT EXECUTED 200a8c4: 81 e8 00 00 restore <== NOT EXECUTED 02014e6c <_Timespec_From_ticks>: void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 2014e6c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 2014e70: 03 00 80 9f sethi %hi(0x2027c00), %g1 <== NOT EXECUTED 2014e74: d2 00 63 c0 ld [ %g1 + 0x3c0 ], %o1 ! 2027fc0 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 2014e78: 40 00 2f 5c call 2020be8 <.umul> <== NOT EXECUTED 2014e7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 2014e80: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 2014e84: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 2014e88: 7f ff b2 63 call 2001814 <.udiv> <== NOT EXECUTED 2014e8c: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 2014e90: 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; 2014e94: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 2014e98: 40 00 2f 8e call 2020cd0 <.urem> <== NOT EXECUTED 2014e9c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2014ea0: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 2014ea4: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 2014ea8: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2014eac: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 2014eb0: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED 2014eb4: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 2014eb8: 81 c7 e0 08 ret <== NOT EXECUTED 2014ebc: 81 e8 00 00 restore <== NOT EXECUTED 02014ec0 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 2014ec0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014ec4: 02 80 00 0f be 2014f00 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 2014ec8: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 2014ecc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2014ed0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2014ed4: 06 80 00 0b bl 2014f00 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 2014ed8: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 2014edc: d0 02 20 04 ld [ %o0 + 4 ], %o0 <== NOT EXECUTED 2014ee0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014ee4: 06 80 00 07 bl 2014f00 <_Timespec_Is_valid+0x40> <== NOT EXECUTED 2014ee8: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 <== NOT EXECUTED 2014eec: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <== NOT EXECUTED 2014ef0: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2014ef4: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 2014ef8: 81 c3 e0 08 retl <== NOT EXECUTED 2014efc: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 2014f00: 81 c3 e0 08 retl <== NOT EXECUTED 2014f04: 90 10 20 00 clr %o0 <== NOT EXECUTED 02014f08 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 2014f08: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 2014f0c: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED 2014f10: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2014f14: 02 80 00 15 be 2014f68 <_Timespec_To_ticks+0x60> <== NOT EXECUTED 2014f18: e4 06 20 04 ld [ %i0 + 4 ], %l2 <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 2014f1c: 03 00 80 9f sethi %hi(0x2027c00), %g1 <== NOT EXECUTED 2014f20: e2 00 63 c0 ld [ %g1 + 0x3c0 ], %l1 ! 2027fc0 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 2014f24: 11 00 03 d0 sethi %hi(0xf4000), %o0 <== NOT EXECUTED 2014f28: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2014f2c: 7f ff b2 3a call 2001814 <.udiv> <== NOT EXECUTED 2014f30: 90 12 22 40 or %o0, 0x240, %o0 <== NOT EXECUTED 2014f34: 40 00 2f 2d call 2020be8 <.umul> <== NOT EXECUTED 2014f38: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 2014f3c: 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; 2014f40: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 2014f44: 7f ff b2 34 call 2001814 <.udiv> <== NOT EXECUTED 2014f48: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2014f4c: 7f ff b2 32 call 2001814 <.udiv> <== NOT EXECUTED 2014f50: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 2014f54: b0 82 00 10 addcc %o0, %l0, %i0 <== NOT EXECUTED 2014f58: 22 80 00 02 be,a 2014f60 <_Timespec_To_ticks+0x58> <== NOT EXECUTED 2014f5c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return ticks; return 1; } 2014f60: 81 c7 e0 08 ret <== NOT EXECUTED 2014f64: 81 e8 00 00 restore <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 2014f68: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2014f6c: 12 bf ff ec bne 2014f1c <_Timespec_To_ticks+0x14> <== NOT EXECUTED 2014f70: b0 10 20 00 clr %i0 <== NOT EXECUTED if (ticks) return ticks; return 1; } 2014f74: 81 c7 e0 08 ret <== NOT EXECUTED 2014f78: 81 e8 00 00 restore <== NOT EXECUTED 0200c1e4 <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 200c1e4: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 200c1e8: 11 00 80 5d sethi %hi(0x2017400), %o0 200c1ec: 92 10 00 18 mov %i0, %o1 200c1f0: 7f ff e8 2c call 20062a0 <_Chain_Append> 200c1f4: 90 12 20 d8 or %o0, 0xd8, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 200c1f8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c1fc: 80 a0 60 00 cmp %g1, 0 200c200: 02 80 00 06 be 200c218 <_User_extensions_Add_API_set+0x34> 200c204: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 200c208: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 200c20c: 31 00 80 5c sethi %hi(0x2017000), %i0 200c210: 7f ff e8 24 call 20062a0 <_Chain_Append> 200c214: 91 ee 22 a4 restore %i0, 0x2a4, %o0 200c218: 81 c7 e0 08 ret <== NOT EXECUTED 200c21c: 81 e8 00 00 restore <== NOT EXECUTED 0200f298 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 200f298: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 200f29c: 40 00 13 4d call 2013fd0 <_Chain_Extract> 200f2a0: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 200f2a4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200f2a8: 80 a0 60 00 cmp %g1, 0 200f2ac: 02 80 00 04 be 200f2bc <_User_extensions_Remove_set+0x24> 200f2b0: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 200f2b4: 40 00 13 47 call 2013fd0 <_Chain_Extract> <== NOT EXECUTED 200f2b8: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 200f2bc: 81 c7 e0 08 ret 200f2c0: 81 e8 00 00 restore 02008c74 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2008c74: 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 ; 2008c78: 03 00 80 5d sethi %hi(0x2017400), %g1 2008c7c: e0 00 60 d8 ld [ %g1 + 0xd8 ], %l0 ! 20174d8 <_User_extensions_List> 2008c80: 82 10 60 d8 or %g1, 0xd8, %g1 2008c84: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008c88: 80 a4 00 11 cmp %l0, %l1 2008c8c: 02 80 00 10 be 2008ccc <_User_extensions_Thread_create+0x58> 2008c90: 03 00 80 5c sethi %hi(0x2017000), %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)( 2008c94: a4 10 63 64 or %g1, 0x364, %l2 ! 2017364 <_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 ) { 2008c98: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2008c9c: 80 a0 60 00 cmp %g1, 0 2008ca0: 02 80 00 07 be 2008cbc <_User_extensions_Thread_create+0x48> 2008ca4: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2008ca8: 9f c0 40 00 call %g1 2008cac: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 2008cb0: 80 8a 20 ff btst 0xff, %o0 2008cb4: 02 80 00 08 be 2008cd4 <_User_extensions_Thread_create+0x60> 2008cb8: 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 ) { 2008cbc: 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 ) ; 2008cc0: 80 a4 00 11 cmp %l0, %l1 2008cc4: 32 bf ff f6 bne,a 2008c9c <_User_extensions_Thread_create+0x28> 2008cc8: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 2008ccc: 81 c7 e0 08 ret 2008cd0: 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 ) 2008cd4: 81 c7 e0 08 ret <== NOT EXECUTED 2008cd8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0200ac50 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200ac50: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200ac54: 7f ff df 71 call 2002a18 200ac58: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200ac5c: 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; 200ac60: 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 ) ) { 200ac64: 80 a0 80 10 cmp %g2, %l0 200ac68: 02 80 00 1f be 200ace4 <_Watchdog_Adjust+0x94> 200ac6c: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200ac70: 12 80 00 1f bne 200acec <_Watchdog_Adjust+0x9c> 200ac74: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200ac78: 80 a6 a0 00 cmp %i2, 0 200ac7c: 02 80 00 1a be 200ace4 <_Watchdog_Adjust+0x94> 200ac80: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200ac84: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200ac88: 80 a6 80 19 cmp %i2, %i1 200ac8c: 1a 80 00 0b bcc 200acb8 <_Watchdog_Adjust+0x68> 200ac90: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 200ac94: 10 80 00 1d b 200ad08 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200ac98: 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 ) { 200ac9c: b4 a6 80 19 subcc %i2, %i1, %i2 200aca0: 02 80 00 11 be 200ace4 <_Watchdog_Adjust+0x94> 200aca4: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200aca8: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200acac: 80 a6 40 1a cmp %i1, %i2 200acb0: 18 80 00 16 bgu 200ad08 <_Watchdog_Adjust+0xb8> 200acb4: 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; 200acb8: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 200acbc: 7f ff df 5b call 2002a28 200acc0: 01 00 00 00 nop _Watchdog_Tickle( header ); 200acc4: 40 00 00 b4 call 200af94 <_Watchdog_Tickle> 200acc8: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200accc: 7f ff df 53 call 2002a18 200acd0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200acd4: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 200acd8: 80 a4 00 01 cmp %l0, %g1 200acdc: 12 bf ff f0 bne 200ac9c <_Watchdog_Adjust+0x4c> 200ace0: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 200ace4: 7f ff df 51 call 2002a28 200ace8: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200acec: 12 bf ff fe bne 200ace4 <_Watchdog_Adjust+0x94> 200acf0: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200acf4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200acf8: 82 00 40 1a add %g1, %i2, %g1 200acfc: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 200ad00: 7f ff df 4a call 2002a28 200ad04: 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; 200ad08: 10 bf ff f7 b 200ace4 <_Watchdog_Adjust+0x94> 200ad0c: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 02016394 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 2016394: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 2016398: a2 96 60 00 orcc %i1, 0, %l1 201639c: 12 80 00 04 bne 20163ac <_Watchdog_Adjust_to_chain+0x18> 20163a0: 01 00 00 00 nop 20163a4: 81 c7 e0 08 ret 20163a8: 81 e8 00 00 restore return; } _ISR_Disable( level ); 20163ac: 7f ff d3 a2 call 200b234 20163b0: 01 00 00 00 nop 20163b4: a6 10 00 08 mov %o0, %l3 20163b8: 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; 20163bc: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 20163c0: 80 a0 80 10 cmp %g2, %l0 20163c4: 02 80 00 25 be 2016458 <_Watchdog_Adjust_to_chain+0xc4> 20163c8: a4 06 a0 04 add %i2, 4, %l2 20163cc: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 20163d0: 80 a6 40 11 cmp %i1, %l1 20163d4: 18 80 00 20 bgu 2016454 <_Watchdog_Adjust_to_chain+0xc0> 20163d8: 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; 20163dc: 10 80 00 15 b 2016430 <_Watchdog_Adjust_to_chain+0x9c> 20163e0: 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; 20163e4: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 20163e8: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 20163ec: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 20163f0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 20163f4: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 20163f8: 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; 20163fc: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 2016400: 7f ff d3 91 call 200b244 2016404: 90 10 00 13 mov %l3, %o0 2016408: 7f ff d3 8b call 200b234 201640c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2016410: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 2016414: 80 a4 00 02 cmp %l0, %g2 2016418: 02 80 00 10 be 2016458 <_Watchdog_Adjust_to_chain+0xc4> 201641c: 01 00 00 00 nop 2016420: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 2016424: 80 a0 60 00 cmp %g1, 0 2016428: 32 80 00 07 bne,a 2016444 <_Watchdog_Adjust_to_chain+0xb0> 201642c: 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)) 2016430: 80 a4 00 02 cmp %l0, %g2 2016434: 32 bf ff ec bne,a 20163e4 <_Watchdog_Adjust_to_chain+0x50> 2016438: c2 00 80 00 ld [ %g2 ], %g1 201643c: 10 bf ff ec b 20163ec <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 2016440: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 2016444: 02 80 00 05 be 2016458 <_Watchdog_Adjust_to_chain+0xc4> 2016448: 01 00 00 00 nop 201644c: 10 bf ff e1 b 20163d0 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 2016450: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 2016454: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 2016458: 7f ff d3 7b call 200b244 201645c: 91 e8 00 13 restore %g0, %l3, %o0 2016460: 01 00 00 00 nop 02008dcc <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008dcc: 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; 2008dd0: 03 00 80 5c sethi %hi(0x2017000), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008dd4: 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; 2008dd8: e6 00 63 40 ld [ %g1 + 0x340 ], %l3 _ISR_Disable( level ); 2008ddc: 7f ff e3 f2 call 2001da4 2008de0: 01 00 00 00 nop 2008de4: 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 ) { 2008de8: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008dec: 80 a0 60 00 cmp %g1, 0 2008df0: 12 80 00 4a bne 2008f18 <_Watchdog_Insert+0x14c> 2008df4: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 2008df8: 2b 00 80 5c sethi %hi(0x2017000), %l5 2008dfc: c2 05 63 f0 ld [ %l5 + 0x3f0 ], %g1 ! 20173f0 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008e00: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 2008e04: 82 00 60 01 inc %g1 2008e08: 2f 00 80 5c sethi %hi(0x2017000), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008e0c: c4 26 60 08 st %g2, [ %i1 + 8 ] 2008e10: a8 15 e3 60 or %l7, 0x360, %l4 _Watchdog_Sync_count++; 2008e14: c2 25 63 f0 st %g1, [ %l5 + 0x3f0 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 2008e18: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008e1c: 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 ; 2008e20: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 2008e24: 80 a4 a0 00 cmp %l2, 0 2008e28: 02 80 00 2b be 2008ed4 <_Watchdog_Insert+0x108> 2008e2c: 03 00 80 5c sethi %hi(0x2017000), %g1 2008e30: c2 04 40 00 ld [ %l1 ], %g1 2008e34: 80 a0 60 00 cmp %g1, 0 2008e38: 02 80 00 27 be 2008ed4 <_Watchdog_Insert+0x108> 2008e3c: 03 00 80 5c sethi %hi(0x2017000), %g1 break; if ( delta_interval < after->delta_interval ) { 2008e40: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008e44: 80 a4 80 10 cmp %l2, %l0 2008e48: 1a 80 00 13 bcc 2008e94 <_Watchdog_Insert+0xc8> 2008e4c: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 2008e50: 10 80 00 20 b 2008ed0 <_Watchdog_Insert+0x104> 2008e54: 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 ) { 2008e58: c2 05 00 00 ld [ %l4 ], %g1 2008e5c: 80 a4 c0 01 cmp %l3, %g1 2008e60: 0a 80 00 30 bcs 2008f20 <_Watchdog_Insert+0x154> 2008e64: 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 ) ) 2008e68: a4 a4 80 10 subcc %l2, %l0, %l2 2008e6c: 02 80 00 19 be 2008ed0 <_Watchdog_Insert+0x104> 2008e70: e2 04 40 00 ld [ %l1 ], %l1 2008e74: c2 04 40 00 ld [ %l1 ], %g1 2008e78: 80 a0 60 00 cmp %g1, 0 2008e7c: 02 80 00 16 be 2008ed4 <_Watchdog_Insert+0x108> 2008e80: 03 00 80 5c sethi %hi(0x2017000), %g1 break; if ( delta_interval < after->delta_interval ) { 2008e84: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008e88: 80 a4 00 12 cmp %l0, %l2 2008e8c: 18 80 00 10 bgu 2008ecc <_Watchdog_Insert+0x100> 2008e90: 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 ); 2008e94: 7f ff e3 c8 call 2001db4 2008e98: 90 10 00 18 mov %i0, %o0 2008e9c: 7f ff e3 c2 call 2001da4 2008ea0: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 2008ea4: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008ea8: 80 a0 60 01 cmp %g1, 1 2008eac: 02 bf ff eb be 2008e58 <_Watchdog_Insert+0x8c> 2008eb0: 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; 2008eb4: e6 25 e3 60 st %l3, [ %l7 + 0x360 ] <== NOT EXECUTED _Watchdog_Sync_count--; 2008eb8: c2 05 63 f0 ld [ %l5 + 0x3f0 ], %g1 <== NOT EXECUTED 2008ebc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2008ec0: c2 25 63 f0 st %g1, [ %l5 + 0x3f0 ] <== NOT EXECUTED _ISR_Enable( level ); 2008ec4: 7f ff e3 bc call 2001db4 <== NOT EXECUTED 2008ec8: 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; 2008ecc: 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; 2008ed0: 03 00 80 5c sethi %hi(0x2017000), %g1 2008ed4: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 ! 20173f4 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 2008ed8: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 2008edc: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 2008ee0: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 2008ee4: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2008ee8: 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; 2008eec: e6 25 e3 60 st %l3, [ %l7 + 0x360 ] 2008ef0: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 2008ef4: c2 05 63 f0 ld [ %l5 + 0x3f0 ], %g1 after_node->next = the_node; 2008ef8: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2008efc: c4 26 60 04 st %g2, [ %i1 + 4 ] 2008f00: 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; 2008f04: 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; 2008f08: c8 26 40 00 st %g4, [ %i1 ] 2008f0c: c2 25 63 f0 st %g1, [ %l5 + 0x3f0 ] _ISR_Enable( level ); 2008f10: 7f ff e3 a9 call 2001db4 2008f14: 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 ); 2008f18: 7f ff e3 a7 call 2001db4 <== NOT EXECUTED 2008f1c: 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; 2008f20: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008f24: 10 bf ff bf b 2008e20 <_Watchdog_Insert+0x54> 2008f28: e4 06 60 0c ld [ %i1 + 0xc ], %l2 02008f78 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2008f78: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2008f7c: 7f ff e3 8a call 2001da4 2008f80: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 2008f84: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2008f88: 80 a6 20 01 cmp %i0, 1 2008f8c: 02 80 00 2a be 2009034 <_Watchdog_Remove+0xbc> 2008f90: 03 00 80 5c sethi %hi(0x2017000), %g1 2008f94: 1a 80 00 09 bcc 2008fb8 <_Watchdog_Remove+0x40> 2008f98: 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; 2008f9c: 03 00 80 5c sethi %hi(0x2017000), %g1 2008fa0: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2 ! 20173f4 <_Watchdog_Ticks_since_boot> 2008fa4: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 2008fa8: 7f ff e3 83 call 2001db4 2008fac: 01 00 00 00 nop return( previous_state ); } 2008fb0: 81 c7 e0 08 ret 2008fb4: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 2008fb8: 18 bf ff fa bgu 2008fa0 <_Watchdog_Remove+0x28> 2008fbc: 03 00 80 5c sethi %hi(0x2017000), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 2008fc0: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2008fc4: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2008fc8: c2 01 00 00 ld [ %g4 ], %g1 2008fcc: 80 a0 60 00 cmp %g1, 0 2008fd0: 02 80 00 07 be 2008fec <_Watchdog_Remove+0x74> 2008fd4: 03 00 80 5c sethi %hi(0x2017000), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2008fd8: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 2008fdc: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 2008fe0: 82 00 40 02 add %g1, %g2, %g1 2008fe4: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 2008fe8: 03 00 80 5c sethi %hi(0x2017000), %g1 2008fec: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 20173f0 <_Watchdog_Sync_count> 2008ff0: 80 a0 a0 00 cmp %g2, 0 2008ff4: 22 80 00 07 be,a 2009010 <_Watchdog_Remove+0x98> 2008ff8: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 2008ffc: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 2009000: c6 00 63 40 ld [ %g1 + 0x340 ], %g3 ! 2017340 <_ISR_Nest_level> <== NOT EXECUTED 2009004: 05 00 80 5c sethi %hi(0x2017000), %g2 <== NOT EXECUTED 2009008: c6 20 a3 60 st %g3, [ %g2 + 0x360 ] ! 2017360 <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200900c: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 2009010: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009014: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009018: 03 00 80 5c sethi %hi(0x2017000), %g1 200901c: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2 ! 20173f4 <_Watchdog_Ticks_since_boot> 2009020: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 2009024: 7f ff e3 64 call 2001db4 2009028: 01 00 00 00 nop return( previous_state ); } 200902c: 81 c7 e0 08 ret 2009030: 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; 2009034: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %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; 2009038: 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; 200903c: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 2009040: 7f ff e3 5d call 2001db4 <== NOT EXECUTED 2009044: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 2009048: 81 c7 e0 08 ret <== NOT EXECUTED 200904c: 81 e8 00 00 restore <== NOT EXECUTED 02009168 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 2009168: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 200916c: 80 a6 20 00 cmp %i0, 0 2009170: 02 80 00 15 be 20091c4 <_Workspace_Handler_initialization+0x5c> 2009174: 80 8e 20 07 btst 7, %i0 2009178: 12 80 00 14 bne 20091c8 <_Workspace_Handler_initialization+0x60> 200917c: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 2009180: 03 00 80 5c sethi %hi(0x2017000), %g1 2009184: c4 00 63 3c ld [ %g1 + 0x33c ], %g2 ! 201733c <_Configuration_Table> 2009188: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 200918c: 80 a0 e0 00 cmp %g3, 0 2009190: 32 80 00 11 bne,a 20091d4 <_Workspace_Handler_initialization+0x6c> 2009194: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 2009198: 92 10 00 18 mov %i0, %o1 200919c: 94 10 00 19 mov %i1, %o2 20091a0: 11 00 80 5c sethi %hi(0x2017000), %o0 20091a4: 96 10 20 08 mov 8, %o3 20091a8: 7f ff f5 ab call 2006854 <_Heap_Initialize> 20091ac: 90 12 22 c4 or %o0, 0x2c4, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 20091b0: 80 a2 20 00 cmp %o0, 0 20091b4: 02 80 00 0d be 20091e8 <_Workspace_Handler_initialization+0x80> 20091b8: 92 10 20 01 mov 1, %o1 20091bc: 81 c7 e0 08 ret 20091c0: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 20091c4: 90 10 20 00 clr %o0 20091c8: 92 10 20 01 mov 1, %o1 20091cc: 7f ff f6 2f call 2006a88 <_Internal_error_Occurred> 20091d0: 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 ); 20091d4: 92 10 20 00 clr %o1 <== NOT EXECUTED 20091d8: 40 00 11 13 call 200d624 <== NOT EXECUTED 20091dc: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 20091e0: 10 bf ff ef b 200919c <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 20091e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 20091e8: 7f ff f6 28 call 2006a88 <_Internal_error_Occurred> <== NOT EXECUTED 20091ec: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 20091f0: 01 00 00 00 nop 02006ef8 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 2006ef8: 9a 92 60 00 orcc %o1, 0, %o5 2006efc: 02 80 00 4d be 2007030 2006f00: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 2006f04: 02 80 00 4c be 2007034 2006f08: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 2006f0c: c2 03 40 00 ld [ %o5 ], %g1 2006f10: 80 a0 60 00 cmp %g1, 0 2006f14: 22 80 00 44 be,a 2007024 2006f18: 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 ) 2006f1c: 03 00 80 6c sethi %hi(0x201b000), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 2006f20: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006f24: c8 00 61 10 ld [ %g1 + 0x110 ], %g4 2006f28: 80 a1 00 08 cmp %g4, %o0 2006f2c: 08 80 00 39 bleu 2007010 2006f30: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 2006f34: 80 a2 20 00 cmp %o0, 0 2006f38: 12 80 00 29 bne 2006fdc 2006f3c: 03 00 80 6c sethi %hi(0x201b000), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006f40: 90 81 3f ff addcc %g4, -1, %o0 2006f44: 02 80 00 35 be 2007018 2006f48: 05 00 80 6c sethi %hi(0x201b000), %g2 2006f4c: c6 00 a1 14 ld [ %g2 + 0x114 ], %g3 ! 201b114 <_IO_Driver_address_table> 2006f50: 85 29 20 03 sll %g4, 3, %g2 2006f54: 83 29 20 05 sll %g4, 5, %g1 2006f58: 82 20 40 02 sub %g1, %g2, %g1 2006f5c: 82 00 7f e8 add %g1, -24, %g1 2006f60: 10 80 00 05 b 2006f74 2006f64: 84 00 c0 01 add %g3, %g1, %g2 2006f68: 90 82 3f ff addcc %o0, -1, %o0 2006f6c: 02 80 00 2b be 2007018 2006f70: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 2006f74: c2 00 80 00 ld [ %g2 ], %g1 2006f78: 80 a0 60 00 cmp %g1, 0 2006f7c: 12 bf ff fb bne 2006f68 2006f80: 88 10 00 02 mov %g2, %g4 2006f84: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2006f88: 80 a0 60 00 cmp %g1, 0 2006f8c: 32 bf ff f8 bne,a 2006f6c 2006f90: 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; 2006f94: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 2006f98: 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; 2006f9c: c2 21 00 00 st %g1, [ %g4 ] 2006fa0: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fa4: 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; 2006fa8: c4 21 20 04 st %g2, [ %g4 + 4 ] 2006fac: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fb0: 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; 2006fb4: c2 21 20 08 st %g1, [ %g4 + 8 ] 2006fb8: c4 03 60 0c ld [ %o5 + 0xc ], %g2 2006fbc: c4 21 20 0c st %g2, [ %g4 + 0xc ] 2006fc0: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 2006fc4: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 2006fc8: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 2006fcc: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fd0: 82 13 c0 00 mov %o7, %g1 2006fd4: 7f ff ff 48 call 2006cf4 2006fd8: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 2006fdc: c8 00 61 14 ld [ %g1 + 0x114 ], %g4 2006fe0: 85 2a 20 03 sll %o0, 3, %g2 2006fe4: 83 2a 20 05 sll %o0, 5, %g1 2006fe8: 82 20 40 02 sub %g1, %g2, %g1 2006fec: c6 01 00 01 ld [ %g4 + %g1 ], %g3 2006ff0: 80 a0 e0 00 cmp %g3, 0 2006ff4: 12 80 00 06 bne 200700c 2006ff8: 88 01 00 01 add %g4, %g1, %g4 2006ffc: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 2007000: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007004: 22 bf ff e5 be,a 2006f98 <== NOT EXECUTED 2007008: 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 ); 200700c: 82 10 20 0c mov 0xc, %g1 } 2007010: 81 c3 e0 08 retl 2007014: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007018: 82 10 20 05 mov 5, %g1 } 200701c: 81 c3 e0 08 retl 2007020: 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 ) 2007024: 80 a0 60 00 cmp %g1, 0 2007028: 12 bf ff be bne 2006f20 200702c: 03 00 80 6c sethi %hi(0x201b000), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007030: 82 10 20 09 mov 9, %g1 } 2007034: 81 c3 e0 08 retl 2007038: 90 10 00 01 mov %g1, %o0 02008324 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2008324: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2008328: 80 a6 20 00 cmp %i0, 0 200832c: 02 80 00 23 be 20083b8 2008330: 03 00 80 8d sethi %hi(0x2023400), %g1 return; 2008334: a4 10 62 84 or %g1, 0x284, %l2 ! 2023684 <_Objects_Information_table+0x4> 2008338: 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 ] ) 200833c: c2 04 80 00 ld [ %l2 ], %g1 2008340: 80 a0 60 00 cmp %g1, 0 2008344: 22 80 00 1a be,a 20083ac 2008348: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 200834c: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 2008350: 80 a4 60 00 cmp %l1, 0 2008354: 22 80 00 16 be,a 20083ac 2008358: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 200835c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 2008360: 86 90 60 00 orcc %g1, 0, %g3 2008364: 22 80 00 12 be,a 20083ac 2008368: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 200836c: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 2008370: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 2008374: 83 2c 20 02 sll %l0, 2, %g1 2008378: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 200837c: 80 a2 20 00 cmp %o0, 0 2008380: 02 80 00 05 be 2008394 2008384: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 2008388: 9f c6 00 00 call %i0 200838c: 01 00 00 00 nop 2008390: 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++ ) { 2008394: 83 28 e0 10 sll %g3, 0x10, %g1 2008398: 83 30 60 10 srl %g1, 0x10, %g1 200839c: 80 a0 40 10 cmp %g1, %l0 20083a0: 3a bf ff f5 bcc,a 2008374 20083a4: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 20083a8: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 20083ac: 80 a4 80 13 cmp %l2, %l3 20083b0: 32 bf ff e4 bne,a 2008340 20083b4: c2 04 80 00 ld [ %l2 ], %g1 20083b8: 81 c7 e0 08 ret 20083bc: 81 e8 00 00 restore 02006968 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 2006968: 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 *) 200696c: 11 00 80 6f sethi %hi(0x201bc00), %o0 2006970: 92 10 00 18 mov %i0, %o1 2006974: 90 12 20 14 or %o0, 0x14, %o0 2006978: 40 00 09 28 call 2008e18 <_Objects_Get> 200697c: 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 ) { 2006980: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006984: 80 a0 60 00 cmp %g1, 0 2006988: 02 80 00 04 be 2006998 200698c: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006990: 81 c7 e0 08 ret 2006994: 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 ) ) { 2006998: 25 00 80 6f sethi %hi(0x201bc00), %l2 200699c: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 20069a0: c2 04 a2 54 ld [ %l2 + 0x254 ], %g1 20069a4: 80 a0 80 01 cmp %g2, %g1 20069a8: 02 80 00 06 be 20069c0 20069ac: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 20069b0: 40 00 0b 9d call 2009824 <_Thread_Enable_dispatch> 20069b4: b0 10 20 17 mov 0x17, %i0 20069b8: 81 c7 e0 08 ret 20069bc: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 20069c0: 12 80 00 0f bne 20069fc 20069c4: 01 00 00 00 nop switch ( the_period->state ) { 20069c8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20069cc: 80 a0 60 00 cmp %g1, 0 20069d0: 02 80 00 07 be 20069ec 20069d4: b0 10 20 0b mov 0xb, %i0 20069d8: 82 00 7f fd add %g1, -3, %g1 20069dc: 80 a0 60 01 cmp %g1, 1 20069e0: 18 80 00 03 bgu 20069ec 20069e4: b0 10 20 00 clr %i0 20069e8: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20069ec: 40 00 0b 8e call 2009824 <_Thread_Enable_dispatch> 20069f0: 01 00 00 00 nop 20069f4: 81 c7 e0 08 ret 20069f8: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20069fc: 7f ff f0 77 call 2002bd8 2006a00: 01 00 00 00 nop 2006a04: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 2006a08: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 2006a0c: 80 a4 e0 02 cmp %l3, 2 2006a10: 02 80 00 1a be 2006a78 2006a14: 80 a4 e0 04 cmp %l3, 4 2006a18: 02 80 00 32 be 2006ae0 2006a1c: 80 a4 e0 00 cmp %l3, 0 2006a20: 12 bf ff dc bne 2006990 2006a24: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2006a28: 7f ff f0 70 call 2002be8 2006a2c: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 2006a30: 7f ff ff 58 call 2006790 <_Rate_monotonic_Initiate_statistics> 2006a34: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006a38: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a3c: 03 00 80 1b sethi %hi(0x2006c00), %g1 2006a40: 82 10 62 3c or %g1, 0x23c, %g1 ! 2006e3c <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006a44: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a48: 92 04 60 10 add %l1, 0x10, %o1 2006a4c: 11 00 80 6f sethi %hi(0x201bc00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006a50: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a54: 90 12 22 74 or %o0, 0x274, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006a58: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006a5c: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2006a60: 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; 2006a64: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a68: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a6c: 40 00 11 09 call 200ae90 <_Watchdog_Insert> 2006a70: b0 10 20 00 clr %i0 2006a74: 30 bf ff de b,a 20069ec case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006a78: 7f ff ff 62 call 2006800 <_Rate_monotonic_Update_statistics> 2006a7c: 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; 2006a80: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2006a84: 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; 2006a88: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006a8c: 7f ff f0 57 call 2002be8 2006a90: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2006a94: c2 04 a2 54 ld [ %l2 + 0x254 ], %g1 2006a98: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006a9c: 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; 2006aa0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006aa4: 40 00 0e 14 call 200a2f4 <_Thread_Set_state> 2006aa8: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006aac: 7f ff f0 4b call 2002bd8 2006ab0: 01 00 00 00 nop local_state = the_period->state; 2006ab4: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006ab8: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 2006abc: 7f ff f0 4b call 2002be8 2006ac0: 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 ) 2006ac4: 80 a4 20 03 cmp %l0, 3 2006ac8: 02 80 00 17 be 2006b24 2006acc: d0 04 a2 54 ld [ %l2 + 0x254 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 2006ad0: 40 00 0b 55 call 2009824 <_Thread_Enable_dispatch> 2006ad4: b0 10 20 00 clr %i0 2006ad8: 81 c7 e0 08 ret 2006adc: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 2006ae0: 7f ff ff 48 call 2006800 <_Rate_monotonic_Update_statistics> 2006ae4: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 2006ae8: 7f ff f0 40 call 2002be8 2006aec: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006af0: 82 10 20 02 mov 2, %g1 2006af4: 92 04 60 10 add %l1, 0x10, %o1 2006af8: 11 00 80 6f sethi %hi(0x201bc00), %o0 2006afc: 90 12 22 74 or %o0, 0x274, %o0 ! 201be74 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b00: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 2006b04: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 2006b08: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b0c: 40 00 10 e1 call 200ae90 <_Watchdog_Insert> 2006b10: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 2006b14: 40 00 0b 44 call 2009824 <_Thread_Enable_dispatch> 2006b18: 01 00 00 00 nop 2006b1c: 81 c7 e0 08 ret 2006b20: 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 ); 2006b24: 40 00 0a 27 call 20093c0 <_Thread_Clear_state> <== NOT EXECUTED 2006b28: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 2006b2c: 30 bf ff e9 b,a 2006ad0 <== NOT EXECUTED 0202324c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 202324c: 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 ) 2023250: 80 a6 60 00 cmp %i1, 0 2023254: 02 80 00 4a be 202337c 2023258: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 202325c: 13 00 81 15 sethi %hi(0x2045400), %o1 2023260: 9f c6 40 00 call %i1 2023264: 92 12 63 10 or %o1, 0x310, %o1 ! 2045710 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 2023268: 90 10 00 18 mov %i0, %o0 202326c: 13 00 81 15 sethi %hi(0x2045400), %o1 2023270: 9f c6 40 00 call %i1 2023274: 92 12 63 30 or %o1, 0x330, %o1 ! 2045730 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 2023278: 90 10 00 18 mov %i0, %o0 202327c: 13 00 81 15 sethi %hi(0x2045400), %o1 2023280: 9f c6 40 00 call %i1 2023284: 92 12 63 58 or %o1, 0x358, %o1 ! 2045758 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2023288: 90 10 00 18 mov %i0, %o0 202328c: 13 00 81 15 sethi %hi(0x2045400), %o1 2023290: 9f c6 40 00 call %i1 2023294: 92 12 63 80 or %o1, 0x380, %o1 ! 2045780 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 2023298: 90 10 00 18 mov %i0, %o0 202329c: 13 00 81 15 sethi %hi(0x2045400), %o1 20232a0: 9f c6 40 00 call %i1 20232a4: 92 12 63 d0 or %o1, 0x3d0, %o1 ! 20457d0 /* * 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 ; 20232a8: 03 00 81 76 sethi %hi(0x205d800), %g1 20232ac: a6 10 62 a0 or %g1, 0x2a0, %l3 ! 205daa0 <_Rate_monotonic_Information> 20232b0: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 20232b4: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 20232b8: 80 a4 80 01 cmp %l2, %g1 20232bc: 18 80 00 30 bgu 202337c 20232c0: 03 00 81 16 sethi %hi(0x2045800), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 20232c4: 05 00 81 17 sethi %hi(0x2045c00), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 20232c8: b6 10 60 20 or %g1, 0x20, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 20232cc: b8 10 a0 28 or %g2, 0x28, %i4 20232d0: 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 ); 20232d4: ae 07 bf d0 add %fp, -48, %l7 20232d8: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 20232dc: ba 07 bf b0 add %fp, -80, %i5 20232e0: 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( 20232e4: 10 80 00 06 b 20232fc 20232e8: 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++ ) { 20232ec: 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 ; 20232f0: 80 a0 40 12 cmp %g1, %l2 20232f4: 0a 80 00 22 bcs 202337c 20232f8: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 20232fc: 90 10 00 12 mov %l2, %o0 2023300: 40 00 2d ea call 202eaa8 2023304: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 2023308: 80 a2 20 00 cmp %o0, 0 202330c: 32 bf ff f8 bne,a 20232ec 2023310: 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 ); 2023314: 92 10 00 17 mov %l7, %o1 2023318: 40 00 2d f9 call 202eafc 202331c: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 2023320: d0 07 bf d0 ld [ %fp + -48 ], %o0 2023324: 80 a2 20 00 cmp %o0, 0 2023328: 12 80 00 4b bne 2023454 202332c: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023330: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 2023334: 94 10 00 12 mov %l2, %o2 2023338: 92 10 00 1b mov %i3, %o1 202333c: 96 10 00 16 mov %l6, %o3 2023340: 9f c6 40 00 call %i1 2023344: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2023348: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 202334c: 94 10 00 15 mov %l5, %o2 2023350: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2023354: 80 a0 60 00 cmp %g1, 0 2023358: 12 80 00 0b bne 2023384 202335c: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 2023360: 9f c6 40 00 call %i1 2023364: 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 ; 2023368: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 202336c: 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 ; 2023370: 80 a0 40 12 cmp %g1, %l2 2023374: 1a bf ff e3 bcc 2023300 2023378: 90 10 00 12 mov %l2, %o0 202337c: 81 c7 e0 08 ret 2023380: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2023384: 40 00 06 05 call 2024b98 <_Timespec_Divide_by_integer> 2023388: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 202338c: d0 07 bf a4 ld [ %fp + -92 ], %o0 2023390: 40 00 76 aa call 2040e38 <.div> 2023394: 92 10 23 e8 mov 0x3e8, %o1 2023398: a2 10 00 08 mov %o0, %l1 202339c: d0 07 bf ac ld [ %fp + -84 ], %o0 20233a0: 40 00 76 a6 call 2040e38 <.div> 20233a4: 92 10 23 e8 mov 0x3e8, %o1 20233a8: c2 07 bf e8 ld [ %fp + -24 ], %g1 20233ac: a0 10 00 08 mov %o0, %l0 20233b0: d0 07 bf ec ld [ %fp + -20 ], %o0 20233b4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20233b8: 40 00 76 a0 call 2040e38 <.div> 20233bc: 92 10 23 e8 mov 0x3e8, %o1 20233c0: d8 07 bf a8 ld [ %fp + -88 ], %o4 20233c4: d4 07 bf a0 ld [ %fp + -96 ], %o2 20233c8: 96 10 00 11 mov %l1, %o3 20233cc: 9a 10 00 10 mov %l0, %o5 20233d0: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 20233d4: 13 00 81 16 sethi %hi(0x2045800), %o1 20233d8: 90 10 00 18 mov %i0, %o0 20233dc: 9f c6 40 00 call %i1 20233e0: 92 12 60 38 or %o1, 0x38, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 20233e4: d2 07 bf 98 ld [ %fp + -104 ], %o1 20233e8: 94 10 00 15 mov %l5, %o2 20233ec: 40 00 05 eb call 2024b98 <_Timespec_Divide_by_integer> 20233f0: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 20233f4: d0 07 bf bc ld [ %fp + -68 ], %o0 20233f8: 40 00 76 90 call 2040e38 <.div> 20233fc: 92 10 23 e8 mov 0x3e8, %o1 2023400: a2 10 00 08 mov %o0, %l1 2023404: d0 07 bf c4 ld [ %fp + -60 ], %o0 2023408: 40 00 76 8c call 2040e38 <.div> 202340c: 92 10 23 e8 mov 0x3e8, %o1 2023410: c2 07 bf e8 ld [ %fp + -24 ], %g1 2023414: a0 10 00 08 mov %o0, %l0 2023418: d0 07 bf ec ld [ %fp + -20 ], %o0 202341c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2023420: 40 00 76 86 call 2040e38 <.div> 2023424: 92 10 23 e8 mov 0x3e8, %o1 2023428: d4 07 bf b8 ld [ %fp + -72 ], %o2 202342c: d8 07 bf c0 ld [ %fp + -64 ], %o4 2023430: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2023434: 96 10 00 11 mov %l1, %o3 2023438: 9a 10 00 10 mov %l0, %o5 202343c: 90 10 00 18 mov %i0, %o0 2023440: 13 00 81 16 sethi %hi(0x2045800), %o1 2023444: 9f c6 40 00 call %i1 2023448: 92 12 60 58 or %o1, 0x58, %o1 ! 2045858 /* * 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 ; 202344c: 10 bf ff a8 b 20232ec 2023450: 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 ); 2023454: 94 10 00 16 mov %l6, %o2 2023458: 7f ff 95 02 call 2008860 202345c: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023460: 10 bf ff b5 b 2023334 2023464: d8 1f bf 98 ldd [ %fp + -104 ], %o4 020100c4 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 20100c4: 9d e3 bf 90 save %sp, -112, %sp 20100c8: 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 ) 20100cc: 80 a6 60 00 cmp %i1, 0 20100d0: 02 80 00 28 be 2010170 20100d4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 20100d8: 23 00 80 c3 sethi %hi(0x2030c00), %l1 20100dc: 40 00 09 12 call 2012524 <_API_Mutex_Lock> 20100e0: d0 04 61 1c ld [ %l1 + 0x11c ], %o0 ! 2030d1c <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 20100e4: 92 10 00 10 mov %l0, %o1 20100e8: 11 00 80 c2 sethi %hi(0x2030800), %o0 20100ec: 94 07 bf f0 add %fp, -16, %o2 20100f0: 40 00 10 29 call 2014194 <_Objects_Get_no_protection> 20100f4: 90 12 22 94 or %o0, 0x294, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20100f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 20100fc: 80 a0 60 00 cmp %g1, 0 2010100: 12 80 00 16 bne 2010158 2010104: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 2010108: 92 10 00 19 mov %i1, %o1 201010c: 94 10 00 1a mov %i2, %o2 2010110: 90 02 20 68 add %o0, 0x68, %o0 2010114: 96 07 bf f4 add %fp, -12, %o3 2010118: 40 00 0c 48 call 2013238 <_Heap_Extend> 201011c: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010120: 80 a2 20 01 cmp %o0, 1 2010124: 02 80 00 11 be 2010168 2010128: 01 00 00 00 nop 201012c: 1a 80 00 13 bcc 2010178 2010130: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010134: c6 07 bf f4 ld [ %fp + -12 ], %g3 2010138: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 201013c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010140: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 2010144: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010148: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 201014c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 2010150: 10 80 00 06 b 2010168 2010154: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 2010158: 80 a0 60 01 cmp %g1, 1 201015c: 02 80 00 03 be 2010168 2010160: 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; 2010164: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010168: 40 00 09 05 call 201257c <_API_Mutex_Unlock> 201016c: d0 04 61 1c ld [ %l1 + 0x11c ], %o0 return return_status; } 2010170: 81 c7 e0 08 ret 2010174: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 2010178: 12 bf ff fb bne 2010164 201017c: b0 10 20 18 mov 0x18, %i0 2010180: 30 bf ff fa b,a 2010168 02010480 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 2010480: 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 ) 2010484: 80 a6 e0 00 cmp %i3, 0 2010488: 02 80 00 2e be 2010540 201048c: 21 00 80 c3 sethi %hi(0x2030c00), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 2010490: 40 00 08 25 call 2012524 <_API_Mutex_Lock> 2010494: d0 04 21 1c ld [ %l0 + 0x11c ], %o0 ! 2030d1c <_RTEMS_Allocator_Mutex> 2010498: 92 10 00 18 mov %i0, %o1 201049c: 11 00 80 c2 sethi %hi(0x2030800), %o0 20104a0: 94 07 bf f0 add %fp, -16, %o2 20104a4: 40 00 0f 3c call 2014194 <_Objects_Get_no_protection> 20104a8: 90 12 22 94 or %o0, 0x294, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20104ac: c2 07 bf f0 ld [ %fp + -16 ], %g1 20104b0: 80 a0 60 00 cmp %g1, 0 20104b4: 12 80 00 14 bne 2010504 20104b8: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 20104bc: 94 10 00 1a mov %i2, %o2 20104c0: 92 10 00 19 mov %i1, %o1 20104c4: 90 02 20 68 add %o0, 0x68, %o0 20104c8: 96 07 bf ec add %fp, -20, %o3 20104cc: 40 00 0c e5 call 2013860 <_Heap_Resize_block> 20104d0: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 20104d4: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 20104d8: b4 92 20 00 orcc %o0, 0, %i2 20104dc: 12 80 00 13 bne 2010528 20104e0: c2 26 c0 00 st %g1, [ %i3 ] 20104e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 20104e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20104ec: 12 80 00 17 bne 2010548 <== NOT EXECUTED 20104f0: d0 04 21 1c ld [ %l0 + 0x11c ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 20104f4: 40 00 08 22 call 201257c <_API_Mutex_Unlock> <== NOT EXECUTED 20104f8: b0 10 20 00 clr %i0 <== NOT EXECUTED 20104fc: 81 c7 e0 08 ret <== NOT EXECUTED 2010500: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010504: d0 04 21 1c ld [ %l0 + 0x11c ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 2010508: 82 18 60 01 xor %g1, 1, %g1 201050c: 80 a0 00 01 cmp %g0, %g1 2010510: 84 40 3f ff addx %g0, -1, %g2 2010514: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010518: 40 00 08 19 call 201257c <_API_Mutex_Unlock> 201051c: b0 06 20 19 add %i0, 0x19, %i0 2010520: 81 c7 e0 08 ret 2010524: 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(); 2010528: d0 04 21 1c ld [ %l0 + 0x11c ], %o0 201052c: 40 00 08 14 call 201257c <_API_Mutex_Unlock> 2010530: b0 10 20 0d mov 0xd, %i0 return 2010534: 80 a6 a0 01 cmp %i2, 1 2010538: 02 80 00 07 be 2010554 201053c: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 2010540: 81 c7 e0 08 ret 2010544: 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 */ 2010548: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201054c: 40 00 21 5e call 2018ac4 <_Region_Process_queue> <== NOT EXECUTED 2010550: b0 10 20 00 clr %i0 <== NOT EXECUTED 2010554: 81 c7 e0 08 ret <== NOT EXECUTED 2010558: 81 e8 00 00 restore <== NOT EXECUTED 02005540 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 2005540: 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 ) ) 2005544: a4 96 20 00 orcc %i0, 0, %l2 2005548: 02 80 00 33 be 2005614 200554c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 2005550: 80 a7 20 00 cmp %i4, 0 2005554: 02 80 00 30 be 2005614 2005558: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 200555c: 82 8e a0 c0 andcc %i2, 0xc0, %g1 2005560: 12 80 00 2f bne 200561c 2005564: 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 ) ) 2005568: 80 a4 20 00 cmp %l0, 0 200556c: 02 80 00 04 be 200557c 2005570: 80 a6 60 01 cmp %i1, 1 2005574: 18 80 00 28 bgu 2005614 2005578: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200557c: 05 00 80 5c sethi %hi(0x2017000), %g2 2005580: c2 00 a2 a0 ld [ %g2 + 0x2a0 ], %g1 ! 20172a0 <_Thread_Dispatch_disable_level> 2005584: 82 00 60 01 inc %g1 2005588: c2 20 a2 a0 st %g1, [ %g2 + 0x2a0 ] * 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 ); 200558c: 31 00 80 5c sethi %hi(0x2017000), %i0 2005590: 40 00 05 6e call 2006b48 <_Objects_Allocate> 2005594: 90 16 21 6c or %i0, 0x16c, %o0 ! 201716c <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 2005598: a2 92 20 00 orcc %o0, 0, %l1 200559c: 02 80 00 4e be 20056d4 20055a0: 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 ) ) { 20055a4: 02 80 00 2c be 2005654 20055a8: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 20055ac: 80 8e a0 40 btst 0x40, %i2 20055b0: 02 80 00 44 be 20056c0 20055b4: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 20055b8: 82 10 20 02 mov 2, %g1 20055bc: 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 ) ) { 20055c0: 80 a4 20 10 cmp %l0, 0x10 20055c4: 02 80 00 48 be 20056e4 20055c8: 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; 20055cc: 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; 20055d0: 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( 20055d4: 82 1e 60 01 xor %i1, 1, %g1 20055d8: 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; 20055dc: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 20055e0: 94 60 3f ff subx %g0, -1, %o2 20055e4: 90 04 60 14 add %l1, 0x14, %o0 20055e8: 40 00 03 3e call 20062e0 <_CORE_mutex_Initialize> 20055ec: 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 ) { 20055f0: 80 a2 20 06 cmp %o0, 6 20055f4: 32 80 00 26 bne,a 200568c 20055f8: 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 ); 20055fc: 90 16 21 6c or %i0, 0x16c, %o0 <== NOT EXECUTED 2005600: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2005604: 40 00 06 4c call 2006f34 <_Objects_Free> <== NOT EXECUTED 2005608: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200560c: 40 00 09 3a call 2007af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 2005610: 01 00 00 00 nop <== NOT EXECUTED 2005614: 81 c7 e0 08 ret 2005618: 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 ) || 200561c: 80 a4 20 10 cmp %l0, 0x10 2005620: 02 80 00 06 be 2005638 2005624: 80 a4 20 20 cmp %l0, 0x20 2005628: 02 80 00 05 be 200563c 200562c: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 2005630: 81 c7 e0 08 ret 2005634: 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 ) || 2005638: 80 8e a0 04 btst 4, %i2 200563c: 02 bf ff fd be 2005630 2005640: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 2005644: 12 bf ff ca bne 200556c 2005648: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 200564c: 81 c7 e0 08 ret 2005650: 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 ) ) 2005654: 80 8e a0 04 btst 4, %i2 2005658: 22 80 00 04 be,a 2005668 200565c: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 2005660: 82 10 20 01 mov 1, %g1 2005664: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005668: 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; 200566c: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 2005670: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 2005674: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005678: 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( 200567c: 90 04 60 14 add %l1, 0x14, %o0 2005680: 40 00 04 03 call 200668c <_CORE_semaphore_Initialize> 2005684: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005688: c4 04 60 08 ld [ %l1 + 8 ], %g2 200568c: 82 16 21 6c or %i0, 0x16c, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005690: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005694: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 2005698: c4 27 00 00 st %g2, [ %i4 ] 200569c: 03 00 00 3f sethi %hi(0xfc00), %g1 20056a0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20056a4: 84 08 80 01 and %g2, %g1, %g2 20056a8: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 20056ac: b0 10 20 00 clr %i0 20056b0: 40 00 09 11 call 2007af4 <_Thread_Enable_dispatch> 20056b4: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 20056b8: 81 c7 e0 08 ret 20056bc: 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 ) ) 20056c0: 02 80 00 0f be 20056fc 20056c4: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 20056c8: 82 10 20 03 mov 3, %g1 20056cc: 10 bf ff bd b 20055c0 20056d0: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 20056d4: 40 00 09 08 call 2007af4 <_Thread_Enable_dispatch> 20056d8: b0 10 20 05 mov 5, %i0 20056dc: 81 c7 e0 08 ret 20056e0: 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 ) { 20056e4: c2 07 bf e8 ld [ %fp + -24 ], %g1 20056e8: 80 a0 60 01 cmp %g1, 1 20056ec: 18 80 00 09 bgu 2005710 20056f0: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 20056f4: 10 bf ff b8 b 20055d4 20056f8: 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 ) ) 20056fc: 22 bf ff b1 be,a 20055c0 2005700: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 2005704: 82 10 20 01 mov 1, %g1 2005708: 10 bf ff ae b 20055c0 200570c: 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 ) { 2005710: 80 a0 60 03 cmp %g1, 3 2005714: 18 bf ff b1 bgu 20055d8 2005718: 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; 200571c: 82 10 20 01 mov 1, %g1 2005720: 10 bf ff ad b 20055d4 2005724: c2 2f bf e4 stb %g1, [ %fp + -28 ] 020235d0 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 20235d0: 9d e3 bf 90 save %sp, -112, %sp 20235d4: 11 00 81 74 sethi %hi(0x205d000), %o0 20235d8: 92 10 00 18 mov %i0, %o1 20235dc: 90 12 23 f0 or %o0, 0x3f0, %o0 20235e0: 7f ff 9b fc call 200a5d0 <_Objects_Get> 20235e4: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 20235e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20235ec: 80 a0 60 00 cmp %g1, 0 20235f0: 12 80 00 0b bne 202361c 20235f4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 20235f8: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 20235fc: 80 88 60 30 btst 0x30, %g1 2023600: 12 80 00 09 bne 2023624 2023604: 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( 2023608: 92 10 20 00 clr %o1 <== NOT EXECUTED 202360c: 7f ff 98 e3 call 2009998 <_CORE_semaphore_Flush> <== NOT EXECUTED 2023610: 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(); 2023614: 7f ff 9e 75 call 200afe8 <_Thread_Enable_dispatch> 2023618: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 202361c: 81 c7 e0 08 ret 2023620: 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( 2023624: 92 10 20 00 clr %o1 2023628: 7f ff 97 f1 call 20095ec <_CORE_mutex_Flush> 202362c: 94 10 20 01 mov 1, %o2 2023630: 30 bf ff f9 b,a 2023614 02014a34 : */ void rtems_shutdown_executive( uint32_t result ) { 2014a34: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 2014a38: 05 00 80 5d sethi %hi(0x2017400), %g2 2014a3c: c2 00 a0 44 ld [ %g2 + 0x44 ], %g1 ! 2017444 <_System_state_Current> 2014a40: 80 a0 60 04 cmp %g1, 4 2014a44: 02 80 00 07 be 2014a60 2014a48: 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 ); 2014a4c: 13 00 80 5c sethi %hi(0x2017000), %o1 2014a50: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] 2014a54: 92 12 62 18 or %o1, 0x218, %o1 2014a58: 7f ff d2 21 call 20092dc <_CPU_Context_switch> 2014a5c: 90 07 bf 70 add %fp, -144, %o0 2014a60: 81 c7 e0 08 ret <== NOT EXECUTED 2014a64: 81 e8 00 00 restore <== NOT EXECUTED 02007840 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 2007840: 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() ) 2007844: 03 00 80 72 sethi %hi(0x201c800), %g1 2007848: c4 00 63 7c ld [ %g1 + 0x37c ], %g2 ! 201cb7c <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 200784c: 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() ) 2007850: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 2007854: c4 08 60 04 ldub [ %g1 + 4 ], %g2 2007858: 80 a0 a0 00 cmp %g2, 0 200785c: 02 80 00 1c be 20078cc 2007860: 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 ) 2007864: 80 a6 60 0f cmp %i1, 0xf 2007868: 18 80 00 19 bgu 20078cc 200786c: b0 10 20 0a mov 0xa, %i0 2007870: 03 00 80 72 sethi %hi(0x201c800), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 2007874: 80 a2 20 00 cmp %o0, 0 2007878: 02 80 00 17 be 20078d4 200787c: 86 10 63 a4 or %g1, 0x3a4, %g3 2007880: 03 00 80 72 sethi %hi(0x201c800), %g1 2007884: c4 00 63 a4 ld [ %g1 + 0x3a4 ], %g2 ! 201cba4 <_Thread_Executing> 2007888: 86 10 63 a4 or %g1, 0x3a4, %g3 200788c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007890: 80 a2 00 01 cmp %o0, %g1 2007894: 22 80 00 11 be,a 20078d8 2007898: 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 ); 200789c: 40 00 08 60 call 2009a1c <_Thread_Get> 20078a0: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20078a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 20078a8: 80 a0 60 00 cmp %g1, 0 20078ac: 12 80 00 08 bne 20078cc 20078b0: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 20078b4: c4 02 21 68 ld [ %o0 + 0x168 ], %g2 20078b8: 82 06 60 08 add %i1, 8, %g1 20078bc: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 20078c0: b0 10 20 00 clr %i0 20078c4: 40 00 08 48 call 20099e4 <_Thread_Enable_dispatch> 20078c8: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20078cc: 81 c7 e0 08 ret 20078d0: 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; 20078d4: c2 00 c0 00 ld [ %g3 ], %g1 20078d8: 84 06 60 08 add %i1, 8, %g2 20078dc: c6 00 61 68 ld [ %g1 + 0x168 ], %g3 20078e0: 85 28 a0 02 sll %g2, 2, %g2 20078e4: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 20078e8: 81 c7 e0 08 ret 20078ec: 91 e8 20 00 restore %g0, 0, %o0 020114b0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20114b0: 9d e3 bf 90 save %sp, -112, %sp 20114b4: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 20114b8: 80 a6 60 00 cmp %i1, 0 20114bc: 02 80 00 26 be 2011554 20114c0: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 20114c4: 80 a6 a0 00 cmp %i2, 0 20114c8: 02 80 00 23 be 2011554 20114cc: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 20114d0: 11 00 80 c3 sethi %hi(0x2030c00), %o0 20114d4: 92 10 00 12 mov %l2, %o1 20114d8: 90 12 23 80 or %o0, 0x380, %o0 20114dc: 40 00 0b 40 call 20141dc <_Objects_Get> 20114e0: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20114e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 20114e8: a0 10 00 08 mov %o0, %l0 20114ec: 80 a0 60 00 cmp %g1, 0 20114f0: 12 80 00 19 bne 2011554 20114f4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 20114f8: a2 02 20 10 add %o0, 0x10, %l1 20114fc: 40 00 14 45 call 2016610 <_Watchdog_Remove> 2011500: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 2011504: 7f ff e7 4c call 200b234 2011508: 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 ) { 201150c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011510: 80 a0 60 00 cmp %g1, 0 2011514: 12 80 00 12 bne 201155c 2011518: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 201151c: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2011520: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2011524: 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; 2011528: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 201152c: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 2011530: 7f ff e7 45 call 200b244 2011534: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2011538: 92 10 00 11 mov %l1, %o1 201153c: 11 00 80 c3 sethi %hi(0x2030c00), %o0 2011540: 90 12 21 44 or %o0, 0x144, %o0 ! 2030d44 <_Watchdog_Ticks_chain> 2011544: 40 00 13 c8 call 2016464 <_Watchdog_Insert> 2011548: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 201154c: 40 00 0d a7 call 2014be8 <_Thread_Enable_dispatch> 2011550: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011554: 81 c7 e0 08 ret 2011558: 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 ); 201155c: 7f ff e7 3a call 200b244 <== NOT EXECUTED 2011560: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 2011564: 40 00 0d a1 call 2014be8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011568: 01 00 00 00 nop <== NOT EXECUTED 201156c: 81 c7 e0 08 ret <== NOT EXECUTED 2011570: 81 e8 00 00 restore <== NOT EXECUTED 02011968 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 2011968: 9d e3 bf 90 save %sp, -112, %sp 201196c: 92 96 20 00 orcc %i0, 0, %o1 2011970: 12 80 00 05 bne 2011984 2011974: 03 00 80 ae sethi %hi(0x202b800), %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; 2011978: 90 10 20 13 mov 0x13, %o0 } return status; } 201197c: 81 c7 e0 08 ret 2011980: 91 e8 00 08 restore %g0, %o0, %o0 2011984: c4 08 63 14 ldub [ %g1 + 0x314 ], %g2 2011988: 80 a2 40 02 cmp %o1, %g2 201198c: 18 80 00 56 bgu 2011ae4 2011990: 80 a2 7f ff cmp %o1, -1 2011994: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 2011998: 05 00 80 c3 sethi %hi(0x2030c00), %g2 201199c: c2 00 a0 60 ld [ %g2 + 0x60 ], %g1 ! 2030c60 <_Thread_Dispatch_disable_level> 20119a0: 82 00 60 01 inc %g1 20119a4: c2 20 a0 60 st %g1, [ %g2 + 0x60 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20119a8: 23 00 80 b1 sethi %hi(0x202c400), %l1 initialized = true; 20119ac: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20119b0: e0 0c 61 d4 ldub [ %l1 + 0x1d4 ], %l0 initialized = true; _Thread_Enable_dispatch(); 20119b4: 40 00 0c 8d call 2014be8 <_Thread_Enable_dispatch> 20119b8: c2 2c 61 d4 stb %g1, [ %l1 + 0x1d4 ] if ( tmpInitialized ) 20119bc: 80 a4 20 00 cmp %l0, 0 20119c0: 12 bf ff ef bne 201197c 20119c4: 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); 20119c8: 05 00 80 c2 sethi %hi(0x2030800), %g2 20119cc: 82 10 a3 74 or %g2, 0x374, %g1 ! 2030b74 <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20119d0: 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; 20119d4: 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); 20119d8: 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( 20119dc: 92 10 00 18 mov %i0, %o1 20119e0: 94 10 00 19 mov %i1, %o2 20119e4: 19 00 00 20 sethi %hi(0x8000), %o4 20119e8: c2 20 a3 74 st %g1, [ %g2 + 0x374 ] 20119ec: 98 16 80 0c or %i2, %o4, %o4 20119f0: 11 15 12 53 sethi %hi(0x54494c00), %o0 20119f4: 96 10 21 00 mov 0x100, %o3 20119f8: 90 12 21 45 or %o0, 0x145, %o0 20119fc: 7f ff fc 78 call 2010bdc 2011a00: 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) { 2011a04: 80 a2 20 00 cmp %o0, 0 2011a08: 12 80 00 34 bne 2011ad8 2011a0c: 03 00 80 c2 sethi %hi(0x2030800), %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( 2011a10: 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 ) 2011a14: 86 10 63 14 or %g1, 0x314, %g3 2011a18: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 2011a1c: 03 00 00 3f sethi %hi(0xfc00), %g1 2011a20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2011a24: 82 0a c0 01 and %o3, %g1, %g1 2011a28: 80 a0 40 02 cmp %g1, %g2 2011a2c: 18 80 00 05 bgu 2011a40 2011a30: 98 10 20 00 clr %o4 2011a34: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 2011a38: 83 28 60 02 sll %g1, 2, %g1 2011a3c: d8 00 80 01 ld [ %g2 + %g1 ], %o4 2011a40: 09 00 80 c2 sethi %hi(0x2030800), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011a44: 1b 00 80 c2 sethi %hi(0x2030800), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2011a48: 84 11 23 54 or %g4, 0x354, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011a4c: 82 13 63 68 or %o5, 0x368, %g1 2011a50: 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; 2011a54: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2011a58: 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; 2011a5c: 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); 2011a60: 84 00 a0 04 add %g2, 4, %g2 2011a64: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2011a68: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a6c: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011a70: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 2011a74: c4 21 23 54 st %g2, [ %g4 + 0x354 ] 2011a78: c2 23 63 68 st %g1, [ %o5 + 0x368 ] 2011a7c: 05 00 80 c3 sethi %hi(0x2030c00), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2011a80: 07 00 80 52 sethi %hi(0x2014800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a84: 03 00 80 c2 sethi %hi(0x2030800), %g1 the_watchdog->routine = routine; 2011a88: 86 10 e2 0c or %g3, 0x20c, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a8c: 82 10 63 80 or %g1, 0x380, %g1 the_watchdog->routine = routine; 2011a90: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 2011a94: d8 20 a3 c4 st %o4, [ %g2 + 0x3c4 ] 2011a98: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2011a9c: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011aa0: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011aa4: 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; 2011aa8: 05 00 80 46 sethi %hi(0x2011800), %g2 2011aac: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2011ab0: 84 10 a2 f4 or %g2, 0x2f4, %g2 /* * Start the timer server */ status = rtems_task_start( 2011ab4: 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; 2011ab8: c4 20 63 c0 st %g2, [ %g1 + 0x3c0 ] /* * Start the timer server */ status = rtems_task_start( 2011abc: 13 00 80 46 sethi %hi(0x2011800), %o1 2011ac0: 94 10 20 00 clr %o2 2011ac4: 7f ff fd 9e call 201113c 2011ac8: 92 12 63 c8 or %o1, 0x3c8, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 2011acc: 80 a2 20 00 cmp %o0, 0 2011ad0: 02 bf ff ab be 201197c 2011ad4: 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; 2011ad8: c0 2c 61 d4 clrb [ %l1 + 0x1d4 ] } return status; } 2011adc: 81 c7 e0 08 ret 2011ae0: 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 ) 2011ae4: 02 bf ff ad be 2011998 2011ae8: 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; 2011aec: 10 bf ff a4 b 201197c 2011af0: 90 10 20 13 mov 0x13, %o0 020116e8 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 20116e8: 9d e3 bf 90 save %sp, -112, %sp 20116ec: 11 00 80 c3 sethi %hi(0x2030c00), %o0 20116f0: 92 10 00 18 mov %i0, %o1 20116f4: 90 12 23 80 or %o0, 0x380, %o0 20116f8: 40 00 0a b9 call 20141dc <_Objects_Get> 20116fc: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011700: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011704: a0 10 00 08 mov %o0, %l0 2011708: 80 a0 60 00 cmp %g1, 0 201170c: 12 80 00 11 bne 2011750 2011710: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 2011714: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011718: 80 a0 60 01 cmp %g1, 1 201171c: 22 80 00 15 be,a 2011770 2011720: 31 00 80 c3 sethi %hi(0x2030c00), %i0 2011724: 1a 80 00 0d bcc 2011758 2011728: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 201172c: a0 02 20 10 add %o0, 0x10, %l0 2011730: 40 00 13 b8 call 2016610 <_Watchdog_Remove> 2011734: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 2011738: 11 00 80 c3 sethi %hi(0x2030c00), %o0 201173c: 92 10 00 10 mov %l0, %o1 2011740: 40 00 13 49 call 2016464 <_Watchdog_Insert> 2011744: 90 12 21 44 or %o0, 0x144, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 2011748: 40 00 0d 28 call 2014be8 <_Thread_Enable_dispatch> 201174c: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011750: 81 c7 e0 08 ret 2011754: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 2011758: 18 bf ff fc bgu 2011748 201175c: 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(); 2011760: 40 00 0d 22 call 2014be8 <_Thread_Enable_dispatch> 2011764: b0 10 20 0b mov 0xb, %i0 ! b 2011768: 81 c7 e0 08 ret 201176c: 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 ) { 2011770: c2 06 23 c0 ld [ %i0 + 0x3c0 ], %g1 2011774: 80 a0 60 00 cmp %g1, 0 2011778: 02 80 00 08 be 2011798 201177c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 2011780: 40 00 13 a4 call 2016610 <_Watchdog_Remove> 2011784: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 2011788: c2 06 23 c0 ld [ %i0 + 0x3c0 ], %g1 201178c: 9f c0 40 00 call %g1 2011790: 90 10 00 10 mov %l0, %o0 2011794: 30 bf ff ed b,a 2011748 _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(); 2011798: 40 00 0d 14 call 2014be8 <_Thread_Enable_dispatch> <== NOT EXECUTED 201179c: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 20117a0: 81 c7 e0 08 ret <== NOT EXECUTED 20117a4: 81 e8 00 00 restore <== NOT EXECUTED 020117a8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20117a8: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20117ac: 03 00 80 c3 sethi %hi(0x2030c00), %g1 20117b0: c4 00 63 c4 ld [ %g1 + 0x3c4 ], %g2 ! 2030fc4 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20117b4: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20117b8: 80 a0 a0 00 cmp %g2, 0 20117bc: 02 80 00 28 be 201185c 20117c0: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 20117c4: 80 a6 a0 00 cmp %i2, 0 20117c8: 02 80 00 25 be 201185c 20117cc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 20117d0: 80 a6 60 00 cmp %i1, 0 20117d4: 02 80 00 22 be 201185c 20117d8: b0 10 20 0a mov 0xa, %i0 20117dc: 11 00 80 c3 sethi %hi(0x2030c00), %o0 20117e0: 92 10 00 11 mov %l1, %o1 20117e4: 90 12 23 80 or %o0, 0x380, %o0 20117e8: 40 00 0a 7d call 20141dc <_Objects_Get> 20117ec: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20117f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20117f4: a0 10 00 08 mov %o0, %l0 20117f8: 80 a0 60 00 cmp %g1, 0 20117fc: 12 80 00 18 bne 201185c 2011800: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011804: 40 00 13 83 call 2016610 <_Watchdog_Remove> 2011808: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 201180c: 7f ff e6 8a call 200b234 2011810: 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 ) { 2011814: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011818: 80 a0 60 00 cmp %g1, 0 201181c: 12 80 00 12 bne 2011864 2011820: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2011824: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2011828: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 201182c: 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; 2011830: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011834: 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; 2011838: 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 ); 201183c: 7f ff e6 82 call 200b244 2011840: 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 ); 2011844: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2011848: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 2030fc0 <_Timer_Server_schedule_operation> 201184c: 9f c0 80 00 call %g2 2011850: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 2011854: 40 00 0c e5 call 2014be8 <_Thread_Enable_dispatch> 2011858: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 201185c: 81 c7 e0 08 ret 2011860: 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 ); 2011864: 7f ff e6 78 call 200b244 <== NOT EXECUTED 2011868: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 201186c: 40 00 0c df call 2014be8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011870: 01 00 00 00 nop <== NOT EXECUTED 2011874: 81 c7 e0 08 ret <== NOT EXECUTED 2011878: 81 e8 00 00 restore <== NOT EXECUTED