=============================================================================== 02006170 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2006170: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006174: 03 00 80 5d sethi %hi(0x2017400), %g1 2006178: e0 00 62 24 ld [ %g1 + 0x224 ], %l0 ! 2017624 <_API_extensions_List> 200617c: 82 10 62 24 or %g1, 0x224, %g1 2006180: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006184: 80 a4 00 11 cmp %l0, %l1 2006188: 02 80 00 0c be 20061b8 <_API_extensions_Run_postdriver+0x48><== NEVER TAKEN 200618c: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 2006190: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2006194: 80 a0 60 00 cmp %g1, 0 2006198: 22 80 00 05 be,a 20061ac <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 200619c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 20061a0: 9f c0 40 00 call %g1 20061a4: 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 ) { 20061a8: 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 ) ; 20061ac: 80 a4 00 11 cmp %l0, %l1 20061b0: 32 bf ff f9 bne,a 2006194 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN 20061b4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 20061b8: 81 c7 e0 08 ret 20061bc: 81 e8 00 00 restore =============================================================================== 020061c0 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 20061c0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20061c4: 03 00 80 5d sethi %hi(0x2017400), %g1 20061c8: e0 00 62 24 ld [ %g1 + 0x224 ], %l0 ! 2017624 <_API_extensions_List> 20061cc: 82 10 62 24 or %g1, 0x224, %g1 20061d0: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 20061d4: 80 a4 00 11 cmp %l0, %l1 20061d8: 02 80 00 0d be 200620c <_API_extensions_Run_postswitch+0x4c><== NEVER TAKEN 20061dc: 03 00 80 5d sethi %hi(0x2017400), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 20061e0: a4 10 60 a4 or %g1, 0xa4, %l2 ! 20174a4 <_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 ) 20061e4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20061e8: 80 a0 60 00 cmp %g1, 0 20061ec: 22 80 00 05 be,a 2006200 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 20061f0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 20061f4: 9f c0 40 00 call %g1 20061f8: 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 ) { 20061fc: 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 ) ; 2006200: 80 a4 00 11 cmp %l0, %l1 2006204: 32 bf ff f9 bne,a 20061e8 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN 2006208: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 200620c: 81 c7 e0 08 ret 2006210: 81 e8 00 00 restore =============================================================================== 02006120 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 2006120: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006124: 03 00 80 5d sethi %hi(0x2017400), %g1 2006128: e0 00 62 24 ld [ %g1 + 0x224 ], %l0 ! 2017624 <_API_extensions_List> 200612c: 82 10 62 24 or %g1, 0x224, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2006130: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006134: 80 a4 00 11 cmp %l0, %l1 2006138: 02 80 00 0c be 2006168 <_API_extensions_Run_predriver+0x48><== NEVER TAKEN 200613c: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 2006140: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006144: 80 a0 60 00 cmp %g1, 0 2006148: 22 80 00 05 be,a 200615c <_API_extensions_Run_predriver+0x3c><== ALWAYS TAKEN 200614c: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 2006150: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006154: 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 ) { 2006158: 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 ) ; 200615c: 80 a4 00 11 cmp %l0, %l1 2006160: 32 bf ff f9 bne,a 2006144 <_API_extensions_Run_predriver+0x24><== NEVER TAKEN 2006164: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 2006168: 81 c7 e0 08 ret 200616c: 81 e8 00 00 restore =============================================================================== 02007414 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 2007414: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 2007418: 03 00 80 6c sethi %hi(0x201b000), %g1 200741c: e2 00 61 74 ld [ %g1 + 0x174 ], %l1 ! 201b174 <_Thread_Executing> Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 2007420: b4 10 00 1c mov %i4, %i2 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 2007424: c0 24 60 34 clr [ %l1 + 0x34 ] _ISR_Disable( level ); 2007428: 7f ff ed 43 call 2002934 200742c: a0 10 00 18 mov %i0, %l0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 2007430: a4 10 00 19 mov %i1, %l2 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 2007434: 86 10 00 08 mov %o0, %g3 the_barrier->number_of_waiting_threads++; 2007438: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 if ( the_barrier->number_of_waiting_threads == 200743c: c4 06 20 44 ld [ %i0 + 0x44 ], %g2 ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; 2007440: 82 00 60 01 inc %g1 if ( the_barrier->number_of_waiting_threads == 2007444: 80 a0 40 02 cmp %g1, %g2 2007448: 12 80 00 06 bne 2007460 <_CORE_barrier_Wait+0x4c> 200744c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 2007450: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 2007454: 80 a0 60 00 cmp %g1, 0 2007458: 02 80 00 0d be 200748c <_CORE_barrier_Wait+0x78> <== ALWAYS TAKEN 200745c: 82 10 20 01 mov 1, %g1 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; 2007460: 82 10 20 01 mov 1, %g1 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 2007464: e4 24 60 20 st %l2, [ %l1 + 0x20 ] return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 2007468: e0 24 60 44 st %l0, [ %l1 + 0x44 ] 200746c: c2 24 20 30 st %g1, [ %l0 + 0x30 ] executing->Wait.id = id; _ISR_Enable( level ); 2007470: 90 10 00 03 mov %g3, %o0 2007474: 7f ff ed 34 call 2002944 2007478: 35 00 80 25 sethi %hi(0x2009400), %i2 _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 200747c: b0 10 00 10 mov %l0, %i0 2007480: b2 10 00 1b mov %i3, %i1 2007484: 40 00 07 6f call 2009240 <_Thread_queue_Enqueue_with_handler> 2007488: 95 ee a2 98 restore %i2, 0x298, %o2 _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 200748c: c2 24 60 34 st %g1, [ %l1 + 0x34 ] _ISR_Enable( level ); 2007490: 7f ff ed 2d call 2002944 2007494: 01 00 00 00 nop _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 2007498: 7f ff ff d4 call 20073e8 <_CORE_barrier_Release> 200749c: 81 e8 00 00 restore =============================================================================== 0201270c <_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 ) { 201270c: 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 ) { 2012710: 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 ) { 2012714: 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 ) { 2012718: 80 a0 40 1a cmp %g1, %i2 201271c: 0a 80 00 17 bcs 2012778 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 2012720: 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 ) { 2012724: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 2012728: 80 a0 60 00 cmp %g1, 0 201272c: 02 80 00 0a be 2012754 <_CORE_message_queue_Broadcast+0x48><== ALWAYS TAKEN 2012730: a2 10 20 00 clr %l1 *count = 0; 2012734: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 2012738: 81 c7 e0 08 ret <== NOT EXECUTED 201273c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2012740: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2012744: 40 00 20 e4 call 201aad4 2012748: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 201274c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2012750: 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))) { 2012754: 40 00 0a 40 call 2015054 <_Thread_queue_Dequeue> 2012758: 90 10 00 12 mov %l2, %o0 201275c: 92 10 00 19 mov %i1, %o1 2012760: a0 10 00 08 mov %o0, %l0 2012764: 80 a2 20 00 cmp %o0, 0 2012768: 12 bf ff f6 bne 2012740 <_CORE_message_queue_Broadcast+0x34> 201276c: 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; 2012770: e2 27 40 00 st %l1, [ %i5 ] 2012774: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 2012778: 81 c7 e0 08 ret 201277c: 81 e8 00 00 restore =============================================================================== 0201283c <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 201283c: 9d e3 bf 98 save %sp, -104, %sp size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 2012840: c0 26 20 48 clr [ %i0 + 0x48 ] ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 2012844: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 2012848: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 201284c: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 2012850: c0 26 20 64 clr [ %i0 + 0x64 ] * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 2012854: 80 8e e0 03 btst 3, %i3 2012858: 02 80 00 09 be 201287c <_CORE_message_queue_Initialize+0x40> 201285c: a0 10 00 1b mov %i3, %l0 allocated_message_size += sizeof(uint32_t); 2012860: 82 06 e0 04 add %i3, 4, %g1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2012864: a0 08 7f fc and %g1, -4, %l0 } if (allocated_message_size < maximum_message_size) 2012868: 80 a6 c0 10 cmp %i3, %l0 201286c: 08 80 00 05 bleu 2012880 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN 2012870: b6 04 20 14 add %l0, 0x14, %i3 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2012874: 81 c7 e0 08 ret 2012878: 91 e8 20 00 restore %g0, 0, %o0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 201287c: b6 04 20 14 add %l0, 0x14, %i3 2012880: 92 10 00 1a mov %i2, %o1 2012884: 40 00 3f fe call 202287c <.umul> 2012888: 90 10 00 1b mov %i3, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 201288c: 80 a2 00 10 cmp %o0, %l0 2012890: 0a bf ff f9 bcs 2012874 <_CORE_message_queue_Initialize+0x38><== NEVER TAKEN 2012894: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2012898: 40 00 0f e7 call 2016834 <_Workspace_Allocate> 201289c: 01 00 00 00 nop _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 20128a0: 80 a2 20 00 cmp %o0, 0 20128a4: 02 bf ff f4 be 2012874 <_CORE_message_queue_Initialize+0x38> 20128a8: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 20128ac: 92 10 00 08 mov %o0, %o1 20128b0: 94 10 00 1a mov %i2, %o2 20128b4: 90 06 20 68 add %i0, 0x68, %o0 20128b8: 7f ff ff 7d call 20126ac <_Chain_Initialize> 20128bc: 96 10 00 1b mov %i3, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 20128c0: c2 06 40 00 ld [ %i1 ], %g1 20128c4: 84 06 20 50 add %i0, 0x50, %g2 20128c8: 82 18 60 01 xor %g1, 1, %g1 20128cc: 80 a0 00 01 cmp %g0, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20128d0: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 20128d4: c0 26 20 54 clr [ %i0 + 0x54 ] 20128d8: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20128dc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20128e0: c4 26 20 58 st %g2, [ %i0 + 0x58 ] 20128e4: 92 60 3f ff subx %g0, -1, %o1 20128e8: 94 10 20 80 mov 0x80, %o2 20128ec: 96 10 20 06 mov 6, %o3 20128f0: 40 00 0b 14 call 2015540 <_Thread_queue_Initialize> 20128f4: b0 10 20 01 mov 1, %i0 20128f8: 81 c7 e0 08 ret 20128fc: 81 e8 00 00 restore =============================================================================== 02018f54 <_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 ) { 2018f54: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 2018f58: 03 20 00 00 sethi %hi(0x80000000), %g1 2018f5c: 80 a6 80 01 cmp %i2, %g1 2018f60: 02 80 00 41 be 2019064 <_CORE_message_queue_Insert_message+0x110> 2018f64: f4 26 60 08 st %i2, [ %i1 + 8 ] 2018f68: 82 00 7c 00 add %g1, -1024, %g1 2018f6c: 82 10 63 ff or %g1, 0x3ff, %g1 2018f70: 80 a6 80 01 cmp %i2, %g1 2018f74: 02 80 00 2a be 201901c <_CORE_message_queue_Insert_message+0xc8><== ALWAYS TAKEN 2018f78: 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; 2018f7c: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 2018f80: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 2018f84: 32 80 00 22 bne,a 201900c <_CORE_message_queue_Insert_message+0xb8><== NOT EXECUTED 2018f88: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 2018f8c: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 2018f90: 7f ff c8 b9 call 200b274 <== NOT EXECUTED 2018f94: 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 ); 2018f98: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 2018f9c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2018fa0: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2018fa4: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2018fa8: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 2018fac: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 2018fb0: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 2018fb4: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 2018fb8: 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; 2018fbc: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 2018fc0: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 2018fc4: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 2018fc8: 7f ff c8 af call 200b284 <== NOT EXECUTED 2018fcc: 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 ) 2018fd0: 80 8c 20 ff btst 0xff, %l0 <== NOT EXECUTED 2018fd4: 02 80 00 08 be 2018ff4 <_CORE_message_queue_Insert_message+0xa0> 2018fd8: 01 00 00 00 nop 2018fdc: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 2018fe0: 80 a0 60 00 cmp %g1, 0 2018fe4: 02 80 00 04 be 2018ff4 <_CORE_message_queue_Insert_message+0xa0><== ALWAYS TAKEN 2018fe8: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 2018fec: 9f c0 40 00 call %g1 <== NOT EXECUTED 2018ff0: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 2018ff4: 81 c7 e0 08 ret 2018ff8: 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 ) ) { 2018ffc: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 2019000: 22 bf ff e4 be,a 2018f90 <_CORE_message_queue_Insert_message+0x3c><== NOT EXECUTED 2019004: 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 ) { 2019008: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 201900c: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 2019010: 36 bf ff fb bge,a 2018ffc <_CORE_message_queue_Insert_message+0xa8><== NOT EXECUTED 2019014: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 2019018: 30 bf ff de b,a 2018f90 <_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 ); 201901c: 7f ff c8 96 call 200b274 2019020: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 2019024: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2019028: 82 06 20 54 add %i0, 0x54, %g1 201902c: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 2019030: c6 06 20 58 ld [ %i0 + 0x58 ], %g3 the_chain->last = the_node; 2019034: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 2019038: 80 a0 00 02 cmp %g0, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 201903c: c6 26 60 04 st %g3, [ %i1 + 4 ] 2019040: 82 60 3f ff subx %g0, -1, %g1 2019044: 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; 2019048: f2 20 c0 00 st %i1, [ %g3 ] 201904c: a0 10 00 01 mov %g1, %l0 2019050: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 2019054: 7f ff c8 8c call 200b284 2019058: 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 ) 201905c: 10 bf ff de b 2018fd4 <_CORE_message_queue_Insert_message+0x80> 2019060: 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 ); 2019064: 7f ff c8 84 call 200b274 2019068: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 201906c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2019070: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 2019074: 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; 2019078: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 201907c: c2 26 60 04 st %g1, [ %i1 + 4 ] 2019080: 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; 2019084: f2 20 e0 04 st %i1, [ %g3 + 4 ] 2019088: 82 60 3f ff subx %g0, -1, %g1 201908c: 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; 2019090: c6 26 40 00 st %g3, [ %i1 ] 2019094: a0 10 00 01 mov %g1, %l0 2019098: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 201909c: 7f ff c8 7a call 200b284 20190a0: 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 ) 20190a4: 10 bf ff cc b 2018fd4 <_CORE_message_queue_Insert_message+0x80> 20190a8: 80 8c 20 ff btst 0xff, %l0 =============================================================================== 02012900 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 2012900: 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; 2012904: 27 00 80 c3 sethi %hi(0x2030c00), %l3 2012908: e2 04 e2 44 ld [ %l3 + 0x244 ], %l1 ! 2030e44 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 201290c: 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 ); 2012910: 7f ff e2 59 call 200b274 2012914: 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)); 2012918: 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)) 201291c: 82 06 20 54 add %i0, 0x54, %g1 2012920: 80 a6 40 01 cmp %i1, %g1 2012924: 02 80 00 21 be 20129a8 <_CORE_message_queue_Seize+0xa8> 2012928: 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; 201292c: 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; 2012930: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_chain->first = new_first; 2012934: c6 26 20 50 st %g3, [ %i0 + 0x50 ] 2012938: 82 00 7f ff add %g1, -1, %g1 201293c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] new_first->previous = _Chain_Head(the_chain); 2012940: c4 20 e0 04 st %g2, [ %g3 + 4 ] _ISR_Enable( level ); 2012944: 7f ff e2 50 call 200b284 2012948: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 201294c: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 2012950: c4 04 e2 44 ld [ %l3 + 0x244 ], %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; 2012954: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 2012958: c2 06 60 08 ld [ %i1 + 8 ], %g1 201295c: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2012960: 92 10 00 11 mov %l1, %o1 2012964: 40 00 20 5c call 201aad4 2012968: 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 ); 201296c: 40 00 09 ba call 2015054 <_Thread_queue_Dequeue> 2012970: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 2012974: 80 a2 20 00 cmp %o0, 0 2012978: 02 80 00 1f be 20129f4 <_CORE_message_queue_Seize+0xf4> <== ALWAYS TAKEN 201297c: 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; 2012980: 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; 2012984: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 2012988: 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; 201298c: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED 2012990: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 2012994: 40 00 20 50 call 201aad4 <== NOT EXECUTED 2012998: 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( 201299c: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 20129a0: 40 00 19 6d call 2018f54 <_CORE_message_queue_Insert_message><== NOT EXECUTED 20129a4: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 20129a8: 80 8f 20 ff btst 0xff, %i4 20129ac: 02 80 00 0c be 20129dc <_CORE_message_queue_Seize+0xdc> 20129b0: 82 10 20 01 mov 1, %g1 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; 20129b4: 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; 20129b8: 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; 20129bc: f0 24 60 44 st %i0, [ %l1 + 0x44 ] executing->Wait.id = id; 20129c0: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 20129c4: 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 ); 20129c8: 7f ff e2 2f call 200b284 20129cc: 35 00 80 55 sethi %hi(0x2015400), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 20129d0: b2 10 00 1d mov %i5, %i1 20129d4: 40 00 0a 04 call 20151e4 <_Thread_queue_Enqueue_with_handler> 20129d8: 95 ee a2 3c restore %i2, 0x23c, %o2 ); return; } if ( !wait ) { _ISR_Enable( level ); 20129dc: 7f ff e2 2a call 200b284 20129e0: 01 00 00 00 nop executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 20129e4: 82 10 20 04 mov 4, %g1 ! 4 20129e8: 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 ); } 20129ec: 81 c7 e0 08 ret 20129f0: 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 ); 20129f4: 7f ff ff 0f call 2012630 <_Chain_Append> 20129f8: 91 ee 20 68 restore %i0, 0x68, %o0 =============================================================================== 02012a00 <_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 ) { 2012a00: 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 ) { 2012a04: 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 ) { 2012a08: 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 ) { 2012a0c: 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 ) { 2012a10: 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 ) { 2012a14: 0a 80 00 22 bcs 2012a9c <_CORE_message_queue_Submit+0x9c> 2012a18: 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 ) { 2012a1c: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 2012a20: 80 a0 a0 00 cmp %g2, 0 2012a24: 02 80 00 22 be 2012aac <_CORE_message_queue_Submit+0xac> 2012a28: 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 < 2012a2c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 2012a30: 80 a0 40 02 cmp %g1, %g2 2012a34: 18 80 00 2b bgu 2012ae0 <_CORE_message_queue_Submit+0xe0> 2012a38: 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 ) { 2012a3c: 02 80 00 18 be 2012a9c <_CORE_message_queue_Submit+0x9c> <== ALWAYS TAKEN 2012a40: 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() ) { 2012a44: 03 00 80 c3 sethi %hi(0x2030c00), %g1 <== NOT EXECUTED 2012a48: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 2030e20 <_ISR_Nest_level><== NOT EXECUTED 2012a4c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2012a50: 32 80 00 13 bne,a 2012a9c <_CORE_message_queue_Submit+0x9c><== NOT EXECUTED 2012a54: 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; 2012a58: 03 00 80 c3 sethi %hi(0x2030c00), %g1 <== NOT EXECUTED _ISR_Disable( level ); 2012a5c: 7f ff e2 06 call 200b274 <== NOT EXECUTED 2012a60: e0 00 62 44 ld [ %g1 + 0x244 ], %l0 ! 2030e44 <_Thread_Executing><== NOT EXECUTED 2012a64: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2012a68: 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; 2012a6c: 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; 2012a70: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 2012a74: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 2012a78: 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; 2012a7c: 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 ); 2012a80: 7f ff e2 01 call 200b284 <== NOT EXECUTED 2012a84: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 2012a88: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 2012a8c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2012a90: 15 00 80 55 sethi %hi(0x2015400), %o2 <== NOT EXECUTED 2012a94: 40 00 09 d4 call 20151e4 <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED 2012a98: 94 12 a2 3c or %o2, 0x23c, %o2 ! 201563c <_Thread_queue_Timeout><== NOT EXECUTED 2012a9c: 81 c7 e0 08 ret 2012aa0: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 2012aa4: 81 c7 e0 08 ret <== NOT EXECUTED 2012aa8: 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 ); 2012aac: 40 00 09 6a call 2015054 <_Thread_queue_Dequeue> 2012ab0: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 2012ab4: a0 92 20 00 orcc %o0, 0, %l0 2012ab8: 02 80 00 1b be 2012b24 <_CORE_message_queue_Submit+0x124> 2012abc: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2012ac0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2012ac4: 40 00 20 04 call 201aad4 2012ac8: 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; 2012acc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 2012ad0: 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; 2012ad4: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 2012ad8: 81 c7 e0 08 ret 2012adc: 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 *) 2012ae0: 7f ff fe e0 call 2012660 <_Chain_Get> 2012ae4: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 2012ae8: a0 92 20 00 orcc %o0, 0, %l0 2012aec: 02 bf ff ee be 2012aa4 <_CORE_message_queue_Submit+0xa4> <== NEVER TAKEN 2012af0: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2012af4: 94 10 00 1a mov %i2, %o2 2012af8: 40 00 1f f7 call 201aad4 2012afc: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 2012b00: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 2012b04: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 2012b08: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 2012b0c: 92 10 00 10 mov %l0, %o1 2012b10: 94 10 00 1d mov %i5, %o2 2012b14: 40 00 19 10 call 2018f54 <_CORE_message_queue_Insert_message> 2012b18: b0 10 20 00 clr %i0 2012b1c: 81 c7 e0 08 ret 2012b20: 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 ) { 2012b24: 10 bf ff c2 b 2012a2c <_CORE_message_queue_Submit+0x2c> 2012b28: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 =============================================================================== 02006364 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 2006364: 9d e3 bf 98 save %sp, -104, %sp /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 2006368: c2 06 40 00 ld [ %i1 ], %g1 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 200636c: 90 10 00 18 mov %i0, %o0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 2006370: c2 26 20 40 st %g1, [ %i0 + 0x40 ] 2006374: c4 06 60 04 ld [ %i1 + 4 ], %g2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 2006378: 80 a6 a0 00 cmp %i2, 0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 200637c: c4 26 20 44 st %g2, [ %i0 + 0x44 ] 2006380: c6 06 60 08 ld [ %i1 + 8 ], %g3 2006384: c6 26 20 48 st %g3, [ %i0 + 0x48 ] 2006388: c2 06 60 0c ld [ %i1 + 0xc ], %g1 the_mutex->lock = initial_lock; 200638c: f4 26 20 50 st %i2, [ %i0 + 0x50 ] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 2006390: c2 26 20 4c st %g1, [ %i0 + 0x4c ] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 2006394: 12 80 00 1f bne 2006410 <_CORE_mutex_Initialize+0xac> 2006398: c0 26 20 58 clr [ %i0 + 0x58 ] the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 200639c: 03 00 80 5d sethi %hi(0x2017400), %g1 20063a0: c8 00 60 a4 ld [ %g1 + 0xa4 ], %g4 ! 20174a4 <_Thread_Executing> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 20063a4: 84 10 20 01 mov 1, %g2 20063a8: c4 26 20 54 st %g2, [ %i0 + 0x54 ] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 20063ac: c2 01 20 08 ld [ %g4 + 8 ], %g1 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 20063b0: c8 26 20 5c st %g4, [ %i0 + 0x5c ] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 20063b4: 80 a0 e0 02 cmp %g3, 2 20063b8: 02 80 00 05 be 20063cc <_CORE_mutex_Initialize+0x68> 20063bc: c2 26 20 60 st %g1, [ %i0 + 0x60 ] 20063c0: 80 a0 e0 03 cmp %g3, 3 20063c4: 32 80 00 17 bne,a 2006420 <_CORE_mutex_Initialize+0xbc> <== ALWAYS TAKEN 20063c8: c2 06 60 08 ld [ %i1 + 8 ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 20063cc: c4 01 20 14 ld [ %g4 + 0x14 ], %g2 20063d0: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 20063d4: 80 a0 80 01 cmp %g2, %g1 20063d8: 0a 80 00 0c bcs 2006408 <_CORE_mutex_Initialize+0xa4> <== NEVER TAKEN 20063dc: b0 10 20 06 mov 6, %i0 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 20063e0: c2 01 20 1c ld [ %g4 + 0x1c ], %g1 the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 20063e4: 94 10 24 00 mov 0x400, %o2 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 20063e8: 82 00 60 01 inc %g1 20063ec: c2 21 20 1c st %g1, [ %g4 + 0x1c ] the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 20063f0: c2 06 60 08 ld [ %i1 + 8 ], %g1 20063f4: 96 10 20 05 mov 5, %o3 20063f8: 80 a0 00 01 cmp %g0, %g1 20063fc: b0 10 20 00 clr %i0 2006400: 40 00 08 13 call 200844c <_Thread_queue_Initialize> 2006404: 92 40 20 00 addx %g0, 0, %o1 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 2006408: 81 c7 e0 08 ret 200640c: 81 e8 00 00 restore #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 2006410: c0 26 20 54 clr [ %i0 + 0x54 ] the_mutex->holder = NULL; 2006414: c0 26 20 5c clr [ %i0 + 0x5c ] the_mutex->holder_id = 0; 2006418: c0 26 20 60 clr [ %i0 + 0x60 ] } _Thread_queue_Initialize( 200641c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2006420: 94 10 24 00 mov 0x400, %o2 2006424: 80 a0 00 01 cmp %g0, %g1 2006428: 96 10 20 05 mov 5, %o3 200642c: 92 40 20 00 addx %g0, 0, %o1 2006430: 40 00 08 07 call 200844c <_Thread_queue_Initialize> 2006434: b0 10 20 00 clr %i0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 2006438: 81 c7 e0 08 ret 200643c: 81 e8 00 00 restore =============================================================================== 020064cc <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 20064cc: 9d e3 bf 98 save %sp, -104, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 20064d0: 21 00 80 5c sethi %hi(0x2017000), %l0 20064d4: c2 04 23 e0 ld [ %l0 + 0x3e0 ], %g1 ! 20173e0 <_Thread_Dispatch_disable_level> 20064d8: 80 a0 60 00 cmp %g1, 0 20064dc: 02 80 00 05 be 20064f0 <_CORE_mutex_Seize+0x24> 20064e0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20064e4: 80 8e a0 ff btst 0xff, %i2 20064e8: 12 80 00 1a bne 2006550 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN 20064ec: 03 00 80 5d sethi %hi(0x2017400), %g1 20064f0: 90 10 00 18 mov %i0, %o0 20064f4: 40 00 14 ec call 200b8a4 <_CORE_mutex_Seize_interrupt_trylock> 20064f8: 92 07 a0 54 add %fp, 0x54, %o1 20064fc: 80 a2 20 00 cmp %o0, 0 2006500: 02 80 00 12 be 2006548 <_CORE_mutex_Seize+0x7c> 2006504: 80 8e a0 ff btst 0xff, %i2 2006508: 02 80 00 1a be 2006570 <_CORE_mutex_Seize+0xa4> 200650c: 01 00 00 00 nop 2006510: c2 04 23 e0 ld [ %l0 + 0x3e0 ], %g1 2006514: 05 00 80 5d sethi %hi(0x2017400), %g2 2006518: c6 00 a0 a4 ld [ %g2 + 0xa4 ], %g3 ! 20174a4 <_Thread_Executing> 200651c: 82 00 60 01 inc %g1 2006520: f2 20 e0 20 st %i1, [ %g3 + 0x20 ] 2006524: c2 24 23 e0 st %g1, [ %l0 + 0x3e0 ] 2006528: f0 20 e0 44 st %i0, [ %g3 + 0x44 ] 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; 200652c: 82 10 20 01 mov 1, %g1 2006530: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 2006534: 7f ff ee 30 call 2001df4 2006538: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 200653c: 90 10 00 18 mov %i0, %o0 2006540: 7f ff ff c0 call 2006440 <_CORE_mutex_Seize_interrupt_blocking> 2006544: 92 10 00 1b mov %i3, %o1 2006548: 81 c7 e0 08 ret 200654c: 81 e8 00 00 restore 2006550: c4 00 61 84 ld [ %g1 + 0x184 ], %g2 2006554: 80 a0 a0 01 cmp %g2, 1 2006558: 28 bf ff e7 bleu,a 20064f4 <_CORE_mutex_Seize+0x28> 200655c: 90 10 00 18 mov %i0, %o0 2006560: 90 10 20 00 clr %o0 2006564: 92 10 20 00 clr %o1 2006568: 40 00 01 69 call 2006b0c <_Internal_error_Occurred> 200656c: 94 10 20 13 mov 0x13, %o2 2006570: 7f ff ee 21 call 2001df4 2006574: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006578: 03 00 80 5d sethi %hi(0x2017400), %g1 200657c: c6 00 60 a4 ld [ %g1 + 0xa4 ], %g3 ! 20174a4 <_Thread_Executing> 2006580: 84 10 20 01 mov 1, %g2 2006584: c4 20 e0 34 st %g2, [ %g3 + 0x34 ] 2006588: 81 c7 e0 08 ret 200658c: 81 e8 00 00 restore =============================================================================== 0200b8a4 <_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 ) { 200b8a4: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 200b8a8: 03 00 80 5d sethi %hi(0x2017400), %g1 200b8ac: c6 00 60 a4 ld [ %g1 + 0xa4 ], %g3 ! 20174a4 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 200b8b0: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200b8b4: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200b8b8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200b8bc: 80 a0 60 00 cmp %g1, 0 200b8c0: 22 80 00 12 be,a 200b908 <_CORE_mutex_Seize_interrupt_trylock+0x64> 200b8c4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 200b8c8: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200b8cc: 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; 200b8d0: 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; 200b8d4: 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; 200b8d8: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200b8dc: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200b8e0: 80 a0 a0 02 cmp %g2, 2 200b8e4: 02 80 00 0e be 200b91c <_CORE_mutex_Seize_interrupt_trylock+0x78><== ALWAYS TAKEN 200b8e8: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 200b8ec: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 200b8f0: 22 80 00 0d be,a 200b924 <_CORE_mutex_Seize_interrupt_trylock+0x80><== NOT EXECUTED 200b8f4: 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 ); 200b8f8: 7f ff d9 3f call 2001df4 200b8fc: b0 10 20 00 clr %i0 200b900: 81 c7 e0 08 ret 200b904: 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 ) ) { 200b908: 80 a0 c0 01 cmp %g3, %g1 200b90c: 22 80 00 2a be,a 200b9b4 <_CORE_mutex_Seize_interrupt_trylock+0x110> 200b910: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200b914: 81 c7 e0 08 ret 200b918: 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++; 200b91c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b920: 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++; 200b924: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b928: 12 bf ff f4 bne 200b8f8 <_CORE_mutex_Seize_interrupt_trylock+0x54><== ALWAYS TAKEN 200b92c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200b930: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 <== NOT EXECUTED current = executing->current_priority; 200b934: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 200b938: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 200b93c: 02 80 00 2f be 200b9f8 <_CORE_mutex_Seize_interrupt_trylock+0x154><== NOT EXECUTED 200b940: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 200b944: 1a 80 00 11 bcc 200b988 <_CORE_mutex_Seize_interrupt_trylock+0xe4><== NOT EXECUTED 200b948: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200b94c: 05 00 80 5c sethi %hi(0x2017000), %g2 <== NOT EXECUTED 200b950: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20173e0 <_Thread_Dispatch_disable_level><== NOT EXECUTED 200b954: 82 00 60 01 inc %g1 <== NOT EXECUTED 200b958: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 200b95c: 7f ff d9 26 call 2001df4 <== NOT EXECUTED 200b960: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 200b964: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 200b968: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 200b96c: 94 10 20 00 clr %o2 <== NOT EXECUTED 200b970: 7f ff ee ec call 2007520 <_Thread_Change_priority> <== NOT EXECUTED 200b974: b0 10 20 00 clr %i0 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 200b978: 7f ff f0 80 call 2007b78 <_Thread_Enable_dispatch> <== NOT EXECUTED 200b97c: 01 00 00 00 nop <== NOT EXECUTED 200b980: 81 c7 e0 08 ret <== NOT EXECUTED 200b984: 81 e8 00 00 restore <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200b988: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 200b98c: 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; 200b990: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 200b994: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200b998: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 200b99c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200b9a0: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 200b9a4: 7f ff d9 14 call 2001df4 <== NOT EXECUTED 200b9a8: b0 10 20 00 clr %i0 <== NOT EXECUTED 200b9ac: 81 c7 e0 08 ret <== NOT EXECUTED 200b9b0: 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 ) { 200b9b4: 80 a0 60 00 cmp %g1, 0 200b9b8: 22 80 00 0a be,a 200b9e0 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 200b9bc: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200b9c0: 80 a0 60 01 cmp %g1, 1 200b9c4: 12 bf ff d4 bne 200b914 <_CORE_mutex_Seize_interrupt_trylock+0x70> 200b9c8: 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; 200b9cc: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 200b9d0: 7f ff d9 09 call 2001df4 200b9d4: b0 10 20 00 clr %i0 200b9d8: 81 c7 e0 08 ret 200b9dc: 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++; 200b9e0: 82 00 60 01 inc %g1 200b9e4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 200b9e8: 7f ff d9 03 call 2001df4 200b9ec: b0 10 20 00 clr %i0 200b9f0: 81 c7 e0 08 ret 200b9f4: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 200b9f8: 7f ff d8 ff call 2001df4 <== NOT EXECUTED 200b9fc: b0 10 20 00 clr %i0 <== NOT EXECUTED 200ba00: 81 c7 e0 08 ret <== NOT EXECUTED 200ba04: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02006590 <_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 ) { 2006590: 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 ) { 2006594: 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 ) { 2006598: 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 ) { 200659c: 80 a0 60 00 cmp %g1, 0 20065a0: 02 80 00 07 be 20065bc <_CORE_mutex_Surrender+0x2c> 20065a4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 20065a8: 03 00 80 5d sethi %hi(0x2017400), %g1 20065ac: c4 00 60 a4 ld [ %g1 + 0xa4 ], %g2 ! 20174a4 <_Thread_Executing> 20065b0: 80 a2 00 02 cmp %o0, %g2 20065b4: 12 80 00 2e bne 200666c <_CORE_mutex_Surrender+0xdc> 20065b8: 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 ) 20065bc: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 20065c0: 80 a0 60 00 cmp %g1, 0 20065c4: 02 80 00 22 be 200664c <_CORE_mutex_Surrender+0xbc> 20065c8: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 20065cc: 80 a0 60 00 cmp %g1, 0 20065d0: 12 80 00 21 bne 2006654 <_CORE_mutex_Surrender+0xc4> 20065d4: 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; 20065d8: 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 ) || 20065dc: 80 a0 a0 02 cmp %g2, 2 20065e0: 02 80 00 31 be 20066a4 <_CORE_mutex_Surrender+0x114> 20065e4: 80 a0 a0 03 cmp %g2, 3 20065e8: 22 80 00 30 be,a 20066a8 <_CORE_mutex_Surrender+0x118> <== NEVER TAKEN 20065ec: 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; 20065f0: 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 ) || 20065f4: 80 a0 a0 02 cmp %g2, 2 20065f8: 02 80 00 1f be 2006674 <_CORE_mutex_Surrender+0xe4> 20065fc: c0 24 20 60 clr [ %l0 + 0x60 ] 2006600: 80 a0 a0 03 cmp %g2, 3 2006604: 22 80 00 1d be,a 2006678 <_CORE_mutex_Surrender+0xe8> <== NEVER TAKEN 2006608: 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 ) ) ) { 200660c: 40 00 06 55 call 2007f60 <_Thread_queue_Dequeue> 2006610: 90 10 00 10 mov %l0, %o0 2006614: 86 92 20 00 orcc %o0, 0, %g3 2006618: 02 80 00 37 be 20066f4 <_CORE_mutex_Surrender+0x164> 200661c: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 2006620: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 2006624: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 2006628: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 200662c: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 2006630: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 2006634: 80 a0 a0 02 cmp %g2, 2 2006638: 02 80 00 2a be 20066e0 <_CORE_mutex_Surrender+0x150> 200663c: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 2006640: 80 a0 a0 03 cmp %g2, 3 2006644: 22 80 00 1c be,a 20066b4 <_CORE_mutex_Surrender+0x124> <== NEVER TAKEN 2006648: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 200664c: 81 c7 e0 08 ret 2006650: 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 ) { 2006654: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2006658: 80 a0 60 00 cmp %g1, 0 200665c: 02 bf ff fc be 200664c <_CORE_mutex_Surrender+0xbc> <== ALWAYS TAKEN 2006660: 80 a0 60 01 cmp %g1, 1 2006664: 12 bf ff dd bne 20065d8 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 2006668: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 200666c: 81 c7 e0 08 ret 2006670: 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 && 2006674: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2006678: 80 a0 60 00 cmp %g1, 0 200667c: 12 bf ff e4 bne 200660c <_CORE_mutex_Surrender+0x7c> 2006680: 01 00 00 00 nop 2006684: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 2006688: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200668c: 80 a2 40 01 cmp %o1, %g1 2006690: 02 bf ff df be 200660c <_CORE_mutex_Surrender+0x7c> 2006694: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 2006698: 40 00 03 a2 call 2007520 <_Thread_Change_priority> 200669c: 94 10 20 01 mov 1, %o2 ! 1 20066a0: 30 bf ff db b,a 200660c <_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--; 20066a4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20066a8: 82 00 7f ff add %g1, -1, %g1 20066ac: 10 bf ff d1 b 20065f0 <_CORE_mutex_Surrender+0x60> 20066b0: 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 < 20066b4: 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++; 20066b8: 82 00 60 01 inc %g1 <== NOT EXECUTED 20066bc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 20066c0: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 20066c4: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 20066c8: 1a bf ff e1 bcc 200664c <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED 20066cc: 94 10 20 00 clr %o2 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 20066d0: 40 00 03 94 call 2007520 <_Thread_Change_priority> <== NOT EXECUTED 20066d4: b0 10 20 00 clr %i0 <== NOT EXECUTED 20066d8: 81 c7 e0 08 ret <== NOT EXECUTED 20066dc: 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++; 20066e0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 20066e4: 82 00 60 01 inc %g1 20066e8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 20066ec: 81 c7 e0 08 ret 20066f0: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 20066f4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 20066f8: 81 c7 e0 08 ret 20066fc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200674c <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 200674c: 9d e3 bf 98 save %sp, -104, %sp 2006750: a0 10 00 18 mov %i0, %l0 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 2006754: b0 10 20 00 clr %i0 2006758: 40 00 06 02 call 2007f60 <_Thread_queue_Dequeue> 200675c: 90 10 00 10 mov %l0, %o0 2006760: 80 a2 20 00 cmp %o0, 0 2006764: 02 80 00 04 be 2006774 <_CORE_semaphore_Surrender+0x28> 2006768: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 200676c: 81 c7 e0 08 ret 2006770: 81 e8 00 00 restore if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 2006774: 7f ff ed 9c call 2001de4 2006778: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 200677c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 2006780: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2006784: 80 a0 80 01 cmp %g2, %g1 2006788: 0a 80 00 06 bcs 20067a0 <_CORE_semaphore_Surrender+0x54> <== ALWAYS TAKEN 200678c: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2006790: 7f ff ed 99 call 2001df4 2006794: 01 00 00 00 nop } return status; } 2006798: 81 c7 e0 08 ret 200679c: 81 e8 00 00 restore #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 20067a0: 82 00 a0 01 add %g2, 1, %g1 20067a4: b0 10 20 00 clr %i0 20067a8: 10 bf ff fa b 2006790 <_CORE_semaphore_Surrender+0x44> 20067ac: c2 24 20 48 st %g1, [ %l0 + 0x48 ] =============================================================================== 0200b844 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 200b844: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 200b848: c0 26 20 04 clr [ %i0 + 4 ] Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 200b84c: 90 10 00 1b mov %i3, %o0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 200b850: 80 a6 a0 00 cmp %i2, 0 200b854: 02 80 00 0f be 200b890 <_Chain_Initialize+0x4c> <== NEVER TAKEN 200b858: 84 10 00 18 mov %i0, %g2 200b85c: b4 06 bf ff add %i2, -1, %i2 200b860: 82 10 00 19 mov %i1, %g1 200b864: 92 10 00 1a mov %i2, %o1 current->next = next; next->previous = current; 200b868: c4 20 60 04 st %g2, [ %g1 + 4 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 200b86c: c2 20 80 00 st %g1, [ %g2 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 200b870: 80 a6 a0 00 cmp %i2, 0 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 200b874: 84 10 00 01 mov %g1, %g2 200b878: b4 06 bf ff add %i2, -1, %i2 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 200b87c: 12 bf ff fb bne 200b868 <_Chain_Initialize+0x24> 200b880: 82 00 40 08 add %g1, %o0, %g1 200b884: 40 00 20 01 call 2013888 <.umul> 200b888: 01 00 00 00 nop 200b88c: 84 06 40 08 add %i1, %o0, %g2 next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 200b890: 82 06 20 04 add %i0, 4, %g1 200b894: c2 20 80 00 st %g1, [ %g2 ] the_chain->last = current; 200b898: c4 26 20 08 st %g2, [ %i0 + 8 ] } 200b89c: 81 c7 e0 08 ret 200b8a0: 81 e8 00 00 restore =============================================================================== 0200b764 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 200b764: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 200b768: c4 00 60 a8 ld [ %g1 + 0xa8 ], %g2 ! 20174a8 <_Debug_Level><== NOT EXECUTED 200b76c: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 200b770: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 200b774: 81 c3 e0 08 retl <== NOT EXECUTED 200b778: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 020051dc <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 20051dc: 9d e3 bf 98 save %sp, -104, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 20051e0: 03 00 80 5d sethi %hi(0x2017400), %g1 20051e4: e0 00 60 a4 ld [ %g1 + 0xa4 ], %l0 ! 20174a4 <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 20051e8: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 20051ec: 7f ff f2 fe call 2001de4 20051f0: e4 04 21 68 ld [ %l0 + 0x168 ], %l2 pending_events = api->pending_events; 20051f4: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 20051f8: a2 8e 00 01 andcc %i0, %g1, %l1 20051fc: 02 80 00 07 be 2005218 <_Event_Seize+0x3c> 2005200: 80 8e 60 01 btst 1, %i1 2005204: 80 a6 00 11 cmp %i0, %l1 2005208: 02 80 00 23 be 2005294 <_Event_Seize+0xb8> 200520c: 80 8e 60 02 btst 2, %i1 2005210: 12 80 00 21 bne 2005294 <_Event_Seize+0xb8> <== ALWAYS TAKEN 2005214: 80 8e 60 01 btst 1, %i1 _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 2005218: 12 80 00 18 bne 2005278 <_Event_Seize+0x9c> 200521c: 82 10 20 01 mov 1, %g1 executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2005220: 23 00 80 5d sethi %hi(0x2017400), %l1 executing->Wait.option = (uint32_t) option_set; 2005224: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t) event_in; 2005228: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 200522c: f6 24 20 28 st %i3, [ %l0 + 0x28 ] executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2005230: c2 24 62 b4 st %g1, [ %l1 + 0x2b4 ] executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _ISR_Enable( level ); 2005234: 7f ff f2 f0 call 2001df4 2005238: 01 00 00 00 nop if ( ticks ) { 200523c: 80 a6 a0 00 cmp %i2, 0 2005240: 32 80 00 1c bne,a 20052b0 <_Event_Seize+0xd4> 2005244: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2005248: 90 10 00 10 mov %l0, %o0 200524c: 40 00 0c e9 call 20085f0 <_Thread_Set_state> 2005250: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 2005254: 7f ff f2 e4 call 2001de4 2005258: 01 00 00 00 nop sync_state = _Event_Sync_state; 200525c: f0 04 62 b4 ld [ %l1 + 0x2b4 ], %i0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 2005260: c0 24 62 b4 clr [ %l1 + 0x2b4 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 2005264: 80 a6 20 01 cmp %i0, 1 2005268: 02 80 00 27 be 2005304 <_Event_Seize+0x128> 200526c: b2 10 00 10 mov %l0, %i1 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 2005270: 40 00 08 95 call 20074c4 <_Thread_blocking_operation_Cancel> 2005274: 95 e8 00 08 restore %g0, %o0, %o2 *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 2005278: 7f ff f2 df call 2001df4 200527c: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 2005280: 82 10 20 0d mov 0xd, %g1 ! d 2005284: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 2005288: e2 26 c0 00 st %l1, [ %i3 ] 200528c: 81 c7 e0 08 ret 2005290: 81 e8 00 00 restore pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 2005294: 82 28 40 11 andn %g1, %l1, %g1 2005298: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 200529c: 7f ff f2 d6 call 2001df4 20052a0: 01 00 00 00 nop *event_out = seized_events; 20052a4: e2 26 c0 00 st %l1, [ %i3 ] 20052a8: 81 c7 e0 08 ret 20052ac: 81 e8 00 00 restore ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20052b0: 92 04 20 48 add %l0, 0x48, %o1 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 20052b4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20052b8: 03 00 80 15 sethi %hi(0x2005400), %g1 20052bc: 82 10 60 b0 or %g1, 0xb0, %g1 ! 20054b0 <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20052c0: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20052c4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20052c8: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 20052cc: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20052d0: 11 00 80 5d sethi %hi(0x2017400), %o0 20052d4: 40 00 0e df call 2008e50 <_Watchdog_Insert> 20052d8: 90 12 20 c4 or %o0, 0xc4, %o0 ! 20174c4 <_Watchdog_Ticks_chain> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 20052dc: 90 10 00 10 mov %l0, %o0 20052e0: 40 00 0c c4 call 20085f0 <_Thread_Set_state> 20052e4: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 20052e8: 7f ff f2 bf call 2001de4 20052ec: 01 00 00 00 nop sync_state = _Event_Sync_state; 20052f0: f0 04 62 b4 ld [ %l1 + 0x2b4 ], %i0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 20052f4: c0 24 62 b4 clr [ %l1 + 0x2b4 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 20052f8: 80 a6 20 01 cmp %i0, 1 20052fc: 12 bf ff dd bne 2005270 <_Event_Seize+0x94> 2005300: b2 10 00 10 mov %l0, %i1 _ISR_Enable( level ); 2005304: 7f ff f2 bc call 2001df4 2005308: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02005368 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2005368: 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 ]; 200536c: f2 06 21 68 ld [ %i0 + 0x168 ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2005370: 7f ff f2 9d call 2001de4 2005374: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 2005378: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 200537c: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 2005380: 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 ) ) { 2005384: 9a 88 c0 04 andcc %g3, %g4, %o5 2005388: 02 80 00 28 be 2005428 <_Event_Surrender+0xc0> 200538c: 03 00 80 5d sethi %hi(0x2017400), %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() && 2005390: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 2017480 <_ISR_Nest_level> 2005394: 80 a0 a0 00 cmp %g2, 0 2005398: 22 80 00 08 be,a 20053b8 <_Event_Surrender+0x50> 200539c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20053a0: 03 00 80 5d sethi %hi(0x2017400), %g1 20053a4: c4 00 60 a4 ld [ %g1 + 0xa4 ], %g2 ! 20174a4 <_Thread_Executing> 20053a8: 80 a6 00 02 cmp %i0, %g2 20053ac: 02 80 00 2a be 2005454 <_Event_Surrender+0xec> 20053b0: 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 ) ) { 20053b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20053b8: 80 88 61 00 btst 0x100, %g1 20053bc: 02 80 00 19 be 2005420 <_Event_Surrender+0xb8> <== NEVER TAKEN 20053c0: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 20053c4: 02 80 00 04 be 20053d4 <_Event_Surrender+0x6c> 20053c8: 80 8c 60 02 btst 2, %l1 20053cc: 02 80 00 15 be 2005420 <_Event_Surrender+0xb8> <== NEVER TAKEN 20053d0: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 20053d4: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20053d8: 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 ); 20053dc: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 20053e0: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20053e4: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 20053e8: 7f ff f2 83 call 2001df4 20053ec: 90 10 00 10 mov %l0, %o0 20053f0: 7f ff f2 7d call 2001de4 20053f4: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 20053f8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 20053fc: 80 a0 60 02 cmp %g1, 2 2005400: 02 80 00 0c be 2005430 <_Event_Surrender+0xc8> 2005404: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005408: 90 10 00 10 mov %l0, %o0 200540c: 7f ff f2 7a call 2001df4 2005410: 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 ); 2005414: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005418: 40 00 08 bf call 2007714 <_Thread_Clear_state> 200541c: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2005420: 7f ff f2 75 call 2001df4 <== NOT EXECUTED 2005424: 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 ); 2005428: 7f ff f2 73 call 2001df4 200542c: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2005430: 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 ); 2005434: 7f ff f2 70 call 2001df4 2005438: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 200543c: 40 00 0e f0 call 2008ffc <_Watchdog_Remove> 2005440: 90 06 20 48 add %i0, 0x48, %o0 2005444: 33 04 00 ff sethi %hi(0x1003fc00), %i1 2005448: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200544c: 40 00 08 b2 call 2007714 <_Thread_Clear_state> 2005450: 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() && 2005454: c2 03 22 b4 ld [ %o4 + 0x2b4 ], %g1 2005458: 80 a0 60 01 cmp %g1, 1 200545c: 02 80 00 07 be 2005478 <_Event_Surrender+0x110> 2005460: 80 a0 c0 0d cmp %g3, %o5 2005464: c2 03 22 b4 ld [ %o4 + 0x2b4 ], %g1 2005468: 80 a0 60 02 cmp %g1, 2 200546c: 32 bf ff d3 bne,a 20053b8 <_Event_Surrender+0x50> <== ALWAYS TAKEN 2005470: 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) ) { 2005474: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 2005478: 02 80 00 04 be 2005488 <_Event_Surrender+0x120> <== ALWAYS TAKEN 200547c: 80 8c 60 02 btst 2, %l1 2005480: 02 80 00 09 be 20054a4 <_Event_Surrender+0x13c> <== NOT EXECUTED 2005484: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2005488: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 200548c: 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 ); 2005490: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 2005494: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005498: 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; 200549c: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 20054a0: c2 23 22 b4 st %g1, [ %o4 + 0x2b4 ] } _ISR_Enable( level ); 20054a4: 7f ff f2 54 call 2001df4 20054a8: 91 e8 00 10 restore %g0, %l0, %o0 =============================================================================== 020054b0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 20054b0: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 20054b4: 90 10 00 18 mov %i0, %o0 20054b8: 40 00 09 be call 2007bb0 <_Thread_Get> 20054bc: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20054c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20054c4: 80 a0 60 00 cmp %g1, 0 20054c8: 12 80 00 19 bne 200552c <_Event_Timeout+0x7c> <== NEVER TAKEN 20054cc: 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 ); 20054d0: 7f ff f2 45 call 2001de4 20054d4: 01 00 00 00 nop 20054d8: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 20054dc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20054e0: 80 a0 60 00 cmp %g1, 0 20054e4: 02 80 00 14 be 2005534 <_Event_Timeout+0x84> <== NEVER TAKEN 20054e8: 03 00 80 5d sethi %hi(0x2017400), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 20054ec: c4 00 60 a4 ld [ %g1 + 0xa4 ], %g2 ! 20174a4 <_Thread_Executing> 20054f0: 80 a6 00 02 cmp %i0, %g2 20054f4: 02 80 00 18 be 2005554 <_Event_Timeout+0xa4> 20054f8: 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; 20054fc: 82 10 20 06 mov 6, %g1 2005500: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 2005504: 7f ff f2 3c call 2001df4 2005508: 90 10 00 03 mov %g3, %o0 200550c: 90 10 00 18 mov %i0, %o0 2005510: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005514: 40 00 08 80 call 2007714 <_Thread_Clear_state> 2005518: 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; 200551c: 05 00 80 5c sethi %hi(0x2017000), %g2 2005520: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20173e0 <_Thread_Dispatch_disable_level> 2005524: 82 00 7f ff add %g1, -1, %g1 2005528: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] 200552c: 81 c7 e0 08 ret 2005530: 81 e8 00 00 restore 2005534: 05 00 80 5c sethi %hi(0x2017000), %g2 <== NOT EXECUTED 2005538: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20173e0 <_Thread_Dispatch_disable_level><== NOT EXECUTED 200553c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2005540: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 2005544: 7f ff f2 2c call 2001df4 <== NOT EXECUTED 2005548: 01 00 00 00 nop <== NOT EXECUTED 200554c: 81 c7 e0 08 ret <== NOT EXECUTED 2005550: 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; 2005554: 05 00 80 5d sethi %hi(0x2017400), %g2 2005558: c2 00 a2 b4 ld [ %g2 + 0x2b4 ], %g1 ! 20176b4 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 200555c: 80 a0 60 01 cmp %g1, 1 2005560: 38 bf ff e8 bgu,a 2005500 <_Event_Timeout+0x50> <== NEVER TAKEN 2005564: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005568: 82 10 20 02 mov 2, %g1 200556c: c2 20 a2 b4 st %g1, [ %g2 + 0x2b4 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005570: 10 bf ff e4 b 2005500 <_Event_Timeout+0x50> 2005574: 82 10 20 06 mov 6, %g1 =============================================================================== 0200ba6c <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 200ba6c: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 200ba70: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200ba74: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 200ba78: 90 10 00 19 mov %i1, %o0 200ba7c: 7f ff eb e4 call 2006a0c <_Heap_Calc_block_size> 200ba80: a0 10 00 18 mov %i0, %l0 _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 200ba84: 80 a2 20 00 cmp %o0, 0 200ba88: 02 80 00 2c be 200bb38 <_Heap_Allocate+0xcc> <== NEVER TAKEN 200ba8c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 200ba90: f0 06 20 08 ld [ %i0 + 8 ], %i0 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 200ba94: 80 a4 00 18 cmp %l0, %i0 200ba98: 02 80 00 28 be 200bb38 <_Heap_Allocate+0xcc> 200ba9c: b2 10 20 00 clr %i1 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 200baa0: c2 06 20 04 ld [ %i0 + 4 ], %g1 200baa4: 80 a2 00 01 cmp %o0, %g1 200baa8: 18 80 00 18 bgu 200bb08 <_Heap_Allocate+0x9c> 200baac: a2 10 20 00 clr %l1 (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 200bab0: 94 10 00 08 mov %o0, %o2 200bab4: 92 10 00 18 mov %i0, %o1 200bab8: 7f ff eb e9 call 2006a5c <_Heap_Block_allocate> 200babc: 90 10 00 10 mov %l0, %o0 ptr = _Heap_User_area(the_block); stats->allocs += 1; 200bac0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 stats->searches += search_count + 1; 200bac4: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 200bac8: 82 00 60 01 inc %g1 stats->searches += search_count + 1; 200bacc: 84 00 a0 01 inc %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 200bad0: c2 24 20 48 st %g1, [ %l0 + 0x48 ] stats->searches += search_count + 1; 200bad4: 84 00 80 19 add %g2, %i1, %g2 200bad8: b0 06 20 08 add %i0, 8, %i0 200badc: c4 24 20 4c st %g2, [ %l0 + 0x4c ] _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 200bae0: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 200bae4: 80 a0 40 11 cmp %g1, %l1 200bae8: 2a 80 00 02 bcs,a 200baf0 <_Heap_Allocate+0x84> 200baec: e2 24 20 44 st %l1, [ %l0 + 0x44 ] stats->max_search = search_count; return ptr; } 200baf0: 81 c7 e0 08 ret 200baf4: 81 e8 00 00 restore /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 200baf8: c2 06 20 04 ld [ %i0 + 4 ], %g1 200bafc: 80 a2 00 01 cmp %o0, %g1 200bb00: 08 80 00 10 bleu 200bb40 <_Heap_Allocate+0xd4> 200bb04: 94 10 00 08 mov %o0, %o2 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 200bb08: f0 06 20 08 ld [ %i0 + 8 ], %i0 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 200bb0c: 80 a4 00 18 cmp %l0, %i0 200bb10: 12 bf ff fa bne 200baf8 <_Heap_Allocate+0x8c> 200bb14: b2 06 60 01 inc %i1 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 200bb18: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 200bb1c: a2 10 00 19 mov %i1, %l1 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 200bb20: 80 a0 40 11 cmp %g1, %l1 200bb24: 1a bf ff f3 bcc 200baf0 <_Heap_Allocate+0x84> 200bb28: b0 10 20 00 clr %i0 stats->max_search = search_count; 200bb2c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 200bb30: 81 c7 e0 08 ret 200bb34: 81 e8 00 00 restore return ptr; } 200bb38: 81 c7 e0 08 ret 200bb3c: 91 e8 20 00 restore %g0, 0, %o0 _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 200bb40: 92 10 00 18 mov %i0, %o1 200bb44: 7f ff eb c6 call 2006a5c <_Heap_Block_allocate> 200bb48: 90 10 00 10 mov %l0, %o0 ptr = _Heap_User_area(the_block); stats->allocs += 1; 200bb4c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 stats->searches += search_count + 1; 200bb50: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 200bb54: 82 00 60 01 inc %g1 stats->searches += search_count + 1; 200bb58: 84 00 a0 01 inc %g2 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 200bb5c: a2 10 00 19 mov %i1, %l1 (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; stats->searches += search_count + 1; 200bb60: 84 00 80 19 add %g2, %i1, %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 200bb64: c2 24 20 48 st %g1, [ %l0 + 0x48 ] stats->searches += search_count + 1; 200bb68: c4 24 20 4c st %g2, [ %l0 + 0x4c ] 200bb6c: 10 bf ff dd b 200bae0 <_Heap_Allocate+0x74> 200bb70: b0 06 20 08 add %i0, 8, %i0 =============================================================================== 02008b24 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 2008b24: 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; 2008b28: 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); 2008b2c: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2008b30: 90 10 00 19 mov %i1, %o0 2008b34: 92 10 00 16 mov %l6, %o1 2008b38: 40 00 01 82 call 2009140 <_Heap_Calc_block_size> 2008b3c: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 2008b40: ae 92 20 00 orcc %o0, 0, %l7 2008b44: 02 80 00 69 be 2008ce8 <_Heap_Allocate_aligned+0x1c4> <== NEVER TAKEN 2008b48: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 2008b4c: 80 a6 a0 00 cmp %i2, 0 2008b50: 22 80 00 02 be,a 2008b58 <_Heap_Allocate_aligned+0x34> 2008b54: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 2008b58: 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; 2008b5c: 80 a5 40 11 cmp %l5, %l1 2008b60: 02 80 00 62 be 2008ce8 <_Heap_Allocate_aligned+0x1c4> <== NEVER TAKEN 2008b64: 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); 2008b68: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008b6c: 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); 2008b70: 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; 2008b74: 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. */ 2008b78: 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; 2008b7c: 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. */ 2008b80: 18 80 00 22 bgu 2008c08 <_Heap_Allocate_aligned+0xe4> 2008b84: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008b88: 40 00 3d ae call 2018240 <.urem> 2008b8c: 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)); 2008b90: 92 10 00 16 mov %l6, %o1 2008b94: b0 24 00 08 sub %l0, %o0, %i0 2008b98: 40 00 3d aa call 2018240 <.urem> 2008b9c: 90 10 00 18 mov %i0, %o0 2008ba0: a0 04 60 08 add %l1, 8, %l0 2008ba4: 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) { 2008ba8: 80 a4 00 02 cmp %l0, %g2 2008bac: 38 80 00 18 bgu,a 2008c0c <_Heap_Allocate_aligned+0xe8> 2008bb0: 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) { 2008bb4: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 2008bb8: 82 20 80 10 sub %g2, %l0, %g1 2008bbc: 80 a0 40 1d cmp %g1, %i5 2008bc0: 1a 80 00 1e bcc 2008c38 <_Heap_Allocate_aligned+0x114> 2008bc4: 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) { 2008bc8: 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; 2008bcc: 90 10 00 10 mov %l0, %o0 2008bd0: 92 10 00 1a mov %i2, %o1 2008bd4: 80 a5 80 01 cmp %l6, %g1 2008bd8: 18 80 00 17 bgu 2008c34 <_Heap_Allocate_aligned+0x110> <== ALWAYS TAKEN 2008bdc: 84 10 00 10 mov %l0, %g2 2008be0: 40 00 3d 98 call 2018240 <.urem> <== NOT EXECUTED 2008be4: 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) { 2008be8: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED *value = r ? v - r + a : v; 2008bec: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 2008bf0: 86 10 20 00 clr %g3 <== NOT EXECUTED 2008bf4: 12 80 00 35 bne 2008cc8 <_Heap_Allocate_aligned+0x1a4> <== NOT EXECUTED 2008bf8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2008bfc: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008c00: 38 80 00 0d bgu,a 2008c34 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008c04: 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) 2008c08: 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; 2008c0c: 80 a5 40 11 cmp %l5, %l1 2008c10: 12 bf ff d6 bne 2008b68 <_Heap_Allocate_aligned+0x44> 2008c14: a8 05 20 01 inc %l4 2008c18: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 2008c1c: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 2008c20: 80 a0 40 14 cmp %g1, %l4 2008c24: 2a 80 00 02 bcs,a 2008c2c <_Heap_Allocate_aligned+0x108> 2008c28: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 2008c2c: 81 c7 e0 08 ret 2008c30: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 2008c34: 80 a6 20 00 cmp %i0, 0 2008c38: 22 bf ff f5 be,a 2008c0c <_Heap_Allocate_aligned+0xe8> <== NEVER TAKEN 2008c3c: 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; 2008c40: 82 04 e0 08 add %l3, 8, %g1 2008c44: 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; 2008c48: 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) { 2008c4c: 80 a0 80 1d cmp %g2, %i5 2008c50: 2a 80 00 29 bcs,a 2008cf4 <_Heap_Allocate_aligned+0x1d0> 2008c54: 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; 2008c58: 82 10 a0 01 or %g2, 1, %g1 2008c5c: 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); 2008c60: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 2008c64: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 2008c68: 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 ); 2008c6c: 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; 2008c70: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2008c74: 82 10 60 01 or %g1, 1, %g1 2008c78: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 2008c7c: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 2008c80: 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; 2008c84: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 2008c88: 80 a0 c0 01 cmp %g3, %g1 2008c8c: 1a 80 00 03 bcc 2008c98 <_Heap_Allocate_aligned+0x174> 2008c90: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 2008c94: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 2008c98: 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; 2008c9c: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 2008ca0: 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; 2008ca4: 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; 2008ca8: 86 00 e0 01 inc %g3 stats->allocs += 1; 2008cac: 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; 2008cb0: 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; 2008cb4: 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; 2008cb8: 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; 2008cbc: 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; 2008cc0: 10 bf ff d7 b 2008c1c <_Heap_Allocate_aligned+0xf8> 2008cc4: 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; 2008cc8: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 2008ccc: 90 20 40 04 sub %g1, %g4, %o0 <== NOT EXECUTED 2008cd0: 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) { 2008cd4: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008cd8: 28 bf ff cd bleu,a 2008c0c <_Heap_Allocate_aligned+0xe8> <== NOT EXECUTED 2008cdc: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 2008ce0: 10 bf ff d5 b 2008c34 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008ce4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 2008ce8: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 2008cec: 81 c7 e0 08 ret <== NOT EXECUTED 2008cf0: 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; 2008cf4: 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; 2008cf8: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 2008cfc: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 2008d00: 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; 2008d04: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008d08: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 2008d0c: 10 bf ff d8 b 2008c6c <_Heap_Allocate_aligned+0x148> 2008d10: 88 10 00 12 mov %l2, %g4 =============================================================================== 0200e4dc <_Heap_Extend>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t *amount_extended ) { 200e4dc: 9d e3 bf 98 save %sp, -104, %sp * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( starting_address >= the_heap->begin && /* case 3 */ 200e4e0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200e4e4: 80 a0 40 19 cmp %g1, %i1 200e4e8: 08 80 00 08 bleu 200e508 <_Heap_Extend+0x2c> 200e4ec: a2 10 00 18 mov %i0, %l1 200e4f0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 starting_address < the_heap->end ) return HEAP_EXTEND_ERROR; if ( starting_address != the_heap->end ) 200e4f4: 80 a6 40 01 cmp %i1, %g1 200e4f8: 02 80 00 0b be 200e524 <_Heap_Extend+0x48> <== NEVER TAKEN 200e4fc: b0 10 20 02 mov 2, %i0 stats->frees -= 1; /* Don't count subsequent call as actual free() */ _Heap_Free( the_heap, _Heap_User_area( old_final ) ); return HEAP_EXTEND_SUCCESSFUL; } 200e500: 81 c7 e0 08 ret 200e504: 81 e8 00 00 restore * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( starting_address >= the_heap->begin && /* case 3 */ 200e508: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200e50c: 80 a6 40 01 cmp %i1, %g1 200e510: 0a bf ff fc bcs 200e500 <_Heap_Extend+0x24> 200e514: b0 10 20 01 mov 1, %i0 starting_address < the_heap->end ) return HEAP_EXTEND_ERROR; if ( starting_address != the_heap->end ) 200e518: 80 a6 40 01 cmp %i1, %g1 200e51c: 12 bf ff f9 bne 200e500 <_Heap_Extend+0x24> 200e520: b0 10 20 02 mov 2, %i0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 200e524: d2 04 60 10 ld [ %l1 + 0x10 ], %o1 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ old_final = the_heap->final; 200e528: e4 04 60 24 ld [ %l1 + 0x24 ], %l2 200e52c: 82 06 40 1a add %i1, %i2, %g1 the_heap->end = _Addresses_Add_offset( the_heap->end, size ); the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD; 200e530: a0 20 40 12 sub %g1, %l2, %l0 * The basic trick is to make the extend area look like a used * block and free it. */ old_final = the_heap->final; the_heap->end = _Addresses_Add_offset( the_heap->end, size ); 200e534: c2 24 60 1c st %g1, [ %l1 + 0x1c ] the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD; 200e538: a0 04 3f f8 add %l0, -8, %l0 200e53c: 40 00 27 41 call 2018240 <.urem> 200e540: 90 10 00 10 mov %l0, %o0 _Heap_Align_down( &the_size, the_heap->page_size ); *amount_extended = size; 200e544: f4 26 c0 00 st %i2, [ %i3 ] if( the_size < the_heap->min_block_size ) 200e548: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 200e54c: a0 24 00 08 sub %l0, %o0, %l0 200e550: 80 a0 40 10 cmp %g1, %l0 200e554: 18 bf ff eb bgu 200e500 <_Heap_Extend+0x24> <== NEVER TAKEN 200e558: b0 10 20 00 clr %i0 return HEAP_EXTEND_SUCCESSFUL; old_final->size = the_size | (old_final->size & HEAP_PREV_USED); 200e55c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 new_final = _Heap_Block_at( old_final, the_size ); new_final->size = HEAP_PREV_USED; 200e560: 84 10 20 01 mov 1, %g2 *amount_extended = size; if( the_size < the_heap->min_block_size ) return HEAP_EXTEND_SUCCESSFUL; old_final->size = the_size | (old_final->size & HEAP_PREV_USED); 200e564: 82 08 60 01 and %g1, 1, %g1 200e568: 82 14 00 01 or %l0, %g1, %g1 200e56c: c2 24 a0 04 st %g1, [ %l2 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 200e570: 88 04 80 10 add %l2, %l0, %g4 new_final = _Heap_Block_at( old_final, the_size ); new_final->size = HEAP_PREV_USED; 200e574: c4 21 20 04 st %g2, [ %g4 + 4 ] the_heap->final = new_final; stats->size += size; 200e578: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 stats->used_blocks += 1; 200e57c: c4 04 60 40 ld [ %l1 + 0x40 ], %g2 stats->frees -= 1; /* Don't count subsequent call as actual free() */ 200e580: c6 04 60 50 ld [ %l1 + 0x50 ], %g3 old_final->size = the_size | (old_final->size & HEAP_PREV_USED); new_final = _Heap_Block_at( old_final, the_size ); new_final->size = HEAP_PREV_USED; the_heap->final = new_final; stats->size += size; 200e584: 82 00 40 1a add %g1, %i2, %g1 stats->used_blocks += 1; 200e588: 84 00 a0 01 inc %g2 stats->frees -= 1; /* Don't count subsequent call as actual free() */ 200e58c: 86 00 ff ff add %g3, -1, %g3 return HEAP_EXTEND_SUCCESSFUL; old_final->size = the_size | (old_final->size & HEAP_PREV_USED); new_final = _Heap_Block_at( old_final, the_size ); new_final->size = HEAP_PREV_USED; the_heap->final = new_final; 200e590: c8 24 60 24 st %g4, [ %l1 + 0x24 ] stats->size += size; 200e594: c2 24 60 2c st %g1, [ %l1 + 0x2c ] stats->used_blocks += 1; 200e598: c4 24 60 40 st %g2, [ %l1 + 0x40 ] stats->frees -= 1; /* Don't count subsequent call as actual free() */ 200e59c: c6 24 60 50 st %g3, [ %l1 + 0x50 ] _Heap_Free( the_heap, _Heap_User_area( old_final ) ); 200e5a0: 90 10 00 11 mov %l1, %o0 200e5a4: 7f ff ea 1e call 2008e1c <_Heap_Free> 200e5a8: 92 04 a0 08 add %l2, 8, %o1 return HEAP_EXTEND_SUCCESSFUL; } 200e5ac: 81 c7 e0 08 ret 200e5b0: 81 e8 00 00 restore =============================================================================== 0200bb74 <_Heap_Free>: bool _Heap_Free( Heap_Control *the_heap, void *starting_address ) { 200bb74: 9d e3 bf 98 save %sp, -104, %sp uint32_t the_size; uint32_t next_size; Heap_Statistics *const stats = &the_heap->stats; bool next_is_free; if ( !_Addresses_Is_in_range( 200bb78: e4 06 20 20 ld [ %i0 + 0x20 ], %l2 200bb7c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 200bb80: 80 a6 40 12 cmp %i1, %l2 200bb84: 84 60 3f ff subx %g0, -1, %g2 200bb88: 80 a4 40 19 cmp %l1, %i1 200bb8c: 82 60 3f ff subx %g0, -1, %g1 200bb90: 80 88 80 01 btst %g2, %g1 200bb94: 02 80 00 42 be 200bc9c <_Heap_Free+0x128> 200bb98: 01 00 00 00 nop /* 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); 200bb9c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200bba0: 40 00 20 20 call 2013c20 <.urem> 200bba4: 90 10 00 19 mov %i1, %o0 200bba8: a0 06 7f f8 add %i1, -8, %l0 200bbac: 90 24 00 08 sub %l0, %o0, %o0 return( FALSE ); } _Heap_Start_of_block( the_heap, starting_address, &the_block ); if ( !_Heap_Is_block_in( the_heap, the_block ) ) { 200bbb0: 80 a2 00 12 cmp %o0, %l2 200bbb4: 84 60 3f ff subx %g0, -1, %g2 200bbb8: 80 a4 40 08 cmp %l1, %o0 200bbbc: 82 60 3f ff subx %g0, -1, %g1 200bbc0: 80 88 80 01 btst %g2, %g1 200bbc4: 02 80 00 36 be 200bc9c <_Heap_Free+0x128> <== NEVER TAKEN 200bbc8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200bbcc: c6 02 20 04 ld [ %o0 + 4 ], %g3 200bbd0: 9a 08 ff fe and %g3, -2, %o5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 200bbd4: 88 02 00 0d add %o0, %o5, %g4 } the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); if ( !_Heap_Is_block_in( the_heap, next_block ) ) { 200bbd8: 80 a1 00 12 cmp %g4, %l2 200bbdc: 84 60 3f ff subx %g0, -1, %g2 200bbe0: 80 a4 40 04 cmp %l1, %g4 200bbe4: 82 60 3f ff subx %g0, -1, %g1 200bbe8: 80 88 80 01 btst %g2, %g1 200bbec: 02 80 00 2c be 200bc9c <_Heap_Free+0x128> <== NEVER TAKEN 200bbf0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 200bbf4: c2 01 20 04 ld [ %g4 + 4 ], %g1 _HAssert( FALSE ); return( FALSE ); } if ( !_Heap_Is_prev_used( next_block ) ) { 200bbf8: 80 88 60 01 btst 1, %g1 200bbfc: 02 80 00 28 be 200bc9c <_Heap_Free+0x128> <== NEVER TAKEN 200bc00: 92 08 7f fe and %g1, -2, %o1 _HAssert( FALSE ); return( FALSE ); } next_size = _Heap_Block_size( next_block ); next_is_free = next_block < the_heap->final && 200bc04: 80 a4 40 04 cmp %l1, %g4 200bc08: 08 80 00 06 bleu 200bc20 <_Heap_Free+0xac> 200bc0c: 98 10 20 00 clr %o4 200bc10: 84 01 00 09 add %g4, %o1, %g2 200bc14: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200bc18: 82 18 60 01 xor %g1, 1, %g1 200bc1c: 98 08 60 01 and %g1, 1, %o4 !_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size)); if ( !_Heap_Is_prev_used( the_block ) ) { 200bc20: 80 88 e0 01 btst 1, %g3 200bc24: 12 80 00 20 bne 200bca4 <_Heap_Free+0x130> 200bc28: 80 8b 20 ff btst 0xff, %o4 uint32_t const prev_size = the_block->prev_size; 200bc2c: d4 02 00 00 ld [ %o0 ], %o2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 200bc30: 96 22 00 0a sub %o0, %o2, %o3 Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size ); if ( !_Heap_Is_block_in( the_heap, prev_block ) ) { 200bc34: 80 a2 c0 12 cmp %o3, %l2 200bc38: 84 60 3f ff subx %g0, -1, %g2 200bc3c: 80 a4 40 0b cmp %l1, %o3 200bc40: 82 60 3f ff subx %g0, -1, %g1 200bc44: 80 88 80 01 btst %g2, %g1 200bc48: 02 80 00 15 be 200bc9c <_Heap_Free+0x128> <== NEVER TAKEN 200bc4c: 01 00 00 00 nop return( FALSE ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 200bc50: c2 02 e0 04 ld [ %o3 + 4 ], %g1 200bc54: 80 88 60 01 btst 1, %g1 200bc58: 02 80 00 11 be 200bc9c <_Heap_Free+0x128> <== NEVER TAKEN 200bc5c: 80 8b 20 ff btst 0xff, %o4 _HAssert( FALSE ); return( FALSE ); } if ( next_is_free ) { /* coalesce both */ 200bc60: 02 80 00 3a be 200bd48 <_Heap_Free+0x1d4> 200bc64: 86 03 40 0a add %o5, %o2, %g3 uint32_t const size = the_size + prev_size + next_size; _Heap_Block_remove( next_block ); stats->free_blocks -= 1; 200bc68: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 200bc6c: c6 01 20 0c ld [ %g4 + 0xc ], %g3 Heap_Block *the_block ) { Heap_Block *block = the_block; Heap_Block *next = block->next; 200bc70: c4 01 20 08 ld [ %g4 + 8 ], %g2 200bc74: 82 00 7f ff add %g1, -1, %g1 200bc78: c2 26 20 38 st %g1, [ %i0 + 0x38 ] Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 200bc7c: c6 20 a0 0c st %g3, [ %g2 + 0xc ] _HAssert( FALSE ); return( FALSE ); } if ( next_is_free ) { /* coalesce both */ uint32_t const size = the_size + prev_size + next_size; 200bc80: 82 03 40 09 add %o5, %o1, %g1 { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 200bc84: c4 20 e0 08 st %g2, [ %g3 + 8 ] 200bc88: 82 00 40 0a add %g1, %o2, %g1 _Heap_Block_remove( next_block ); stats->free_blocks -= 1; prev_block->size = size | HEAP_PREV_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 200bc8c: c2 22 c0 01 st %g1, [ %o3 + %g1 ] if ( next_is_free ) { /* coalesce both */ uint32_t const size = the_size + prev_size + next_size; _Heap_Block_remove( next_block ); stats->free_blocks -= 1; prev_block->size = size | HEAP_PREV_USED; 200bc90: 82 10 60 01 or %g1, 1, %g1 200bc94: 10 80 00 10 b 200bcd4 <_Heap_Free+0x160> 200bc98: c2 22 e0 04 st %g1, [ %o3 + 4 ] stats->used_blocks -= 1; stats->free_size += the_size; stats->frees += 1; return( TRUE ); } 200bc9c: 81 c7 e0 08 ret 200bca0: 91 e8 20 00 restore %g0, 0, %o0 prev_block->size = size | HEAP_PREV_USED; next_block->size &= ~HEAP_PREV_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200bca4: 02 80 00 17 be 200bd00 <_Heap_Free+0x18c> 200bca8: 82 13 60 01 or %o5, 1, %g1 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 200bcac: c2 01 20 0c ld [ %g4 + 0xc ], %g1 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 200bcb0: c4 01 20 08 ld [ %g4 + 8 ], %g2 Heap_Block *prev = block->prev; block = new_block; block->next = next; block->prev = prev; 200bcb4: c2 22 20 0c st %g1, [ %o0 + 0xc ] Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; block = new_block; block->next = next; 200bcb8: c4 22 20 08 st %g2, [ %o0 + 8 ] block->prev = prev; next->prev = prev->next = block; 200bcbc: d0 20 60 08 st %o0, [ %g1 + 8 ] 200bcc0: d0 20 a0 0c st %o0, [ %g2 + 0xc ] uint32_t const size = the_size + next_size; 200bcc4: 82 02 40 0d add %o1, %o5, %g1 _Heap_Block_replace( next_block, the_block ); the_block->size = size | HEAP_PREV_USED; next_block = _Heap_Block_at( the_block, size ); next_block->prev_size = size; 200bcc8: c2 22 00 01 st %g1, [ %o0 + %g1 ] } } else if ( next_is_free ) { /* coalesce next */ uint32_t const size = the_size + next_size; _Heap_Block_replace( next_block, the_block ); the_block->size = size | HEAP_PREV_USED; 200bccc: 82 10 60 01 or %g1, 1, %g1 200bcd0: c2 22 20 04 st %g1, [ %o0 + 4 ] stats->free_blocks += 1; if ( stats->max_free_blocks < stats->free_blocks ) stats->max_free_blocks = stats->free_blocks; } stats->used_blocks -= 1; 200bcd4: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 stats->free_size += the_size; 200bcd8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 stats->frees += 1; 200bcdc: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 if ( stats->max_free_blocks < stats->free_blocks ) stats->max_free_blocks = stats->free_blocks; } stats->used_blocks -= 1; stats->free_size += the_size; 200bce0: 84 00 80 0d add %g2, %o5, %g2 stats->free_blocks += 1; if ( stats->max_free_blocks < stats->free_blocks ) stats->max_free_blocks = stats->free_blocks; } stats->used_blocks -= 1; 200bce4: 82 00 7f ff add %g1, -1, %g1 stats->free_size += the_size; 200bce8: c4 26 20 30 st %g2, [ %i0 + 0x30 ] stats->free_blocks += 1; if ( stats->max_free_blocks < stats->free_blocks ) stats->max_free_blocks = stats->free_blocks; } stats->used_blocks -= 1; 200bcec: c2 26 20 40 st %g1, [ %i0 + 0x40 ] stats->free_size += the_size; stats->frees += 1; 200bcf0: 86 00 e0 01 inc %g3 200bcf4: c6 26 20 50 st %g3, [ %i0 + 0x50 ] 200bcf8: 81 c7 e0 08 ret 200bcfc: 91 e8 20 01 restore %g0, 1, %o0 } else { /* no coalesce */ /* Add 'the_block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Block_insert_after( _Heap_Head( the_heap), the_block ); the_block->size = the_size | HEAP_PREV_USED; 200bd00: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size &= ~HEAP_PREV_USED; 200bd04: c4 01 20 04 ld [ %g4 + 4 ], %g2 ) { Heap_Block *prev = prev_block; Heap_Block *block = the_block; Heap_Block *next = prev->next; 200bd08: c6 06 20 08 ld [ %i0 + 8 ], %g3 next_block->prev_size = the_size; 200bd0c: da 22 00 0d st %o5, [ %o0 + %o5 ] else { /* no coalesce */ /* Add 'the_block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Block_insert_after( _Heap_Head( the_heap), the_block ); the_block->size = the_size | HEAP_PREV_USED; next_block->size &= ~HEAP_PREV_USED; 200bd10: 84 08 bf fe and %g2, -2, %g2 200bd14: c4 21 20 04 st %g2, [ %g4 + 4 ] next_block->prev_size = the_size; stats->free_blocks += 1; 200bd18: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 block->next = next; 200bd1c: c6 22 20 08 st %g3, [ %o0 + 8 ] block->prev = prev; 200bd20: f0 22 20 0c st %i0, [ %o0 + 0xc ] if ( stats->max_free_blocks < stats->free_blocks ) 200bd24: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 _Heap_Block_insert_after( _Heap_Head( the_heap), the_block ); the_block->size = the_size | HEAP_PREV_USED; next_block->size &= ~HEAP_PREV_USED; next_block->prev_size = the_size; stats->free_blocks += 1; 200bd28: 82 00 60 01 inc %g1 next->prev = prev->next = block; 200bd2c: d0 20 e0 0c st %o0, [ %g3 + 0xc ] 200bd30: d0 26 20 08 st %o0, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) 200bd34: 80 a0 40 02 cmp %g1, %g2 200bd38: 08 bf ff e7 bleu 200bcd4 <_Heap_Free+0x160> 200bd3c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200bd40: 10 bf ff e5 b 200bcd4 <_Heap_Free+0x160> 200bd44: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uint32_t const size = the_size + prev_size; prev_block->size = size | HEAP_PREV_USED; 200bd48: 84 10 e0 01 or %g3, 1, %g2 200bd4c: c4 22 e0 04 st %g2, [ %o3 + 4 ] next_block->size &= ~HEAP_PREV_USED; 200bd50: c2 01 20 04 ld [ %g4 + 4 ], %g1 next_block->prev_size = size; 200bd54: c6 22 00 0d st %g3, [ %o0 + %o5 ] next_block->prev_size = size; } else { /* coalesce prev */ uint32_t const size = the_size + prev_size; prev_block->size = size | HEAP_PREV_USED; next_block->size &= ~HEAP_PREV_USED; 200bd58: 82 08 7f fe and %g1, -2, %g1 200bd5c: 10 bf ff de b 200bcd4 <_Heap_Free+0x160> 200bd60: c2 21 20 04 st %g1, [ %g4 + 4 ] =============================================================================== 0200e5b4 <_Heap_Get_free_information>: */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 200e5b4: da 02 20 08 ld [ %o0 + 8 ], %o5 ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Tail(the_heap); info->number = 0; 200e5b8: c0 22 40 00 clr [ %o1 ] info->largest = 0; 200e5bc: c0 22 60 04 clr [ %o1 + 4 ] info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 200e5c0: 80 a2 00 0d cmp %o0, %o5 200e5c4: 02 80 00 12 be 200e60c <_Heap_Get_free_information+0x58> <== NEVER TAKEN 200e5c8: c0 22 60 08 clr [ %o1 + 8 ] 200e5cc: 88 10 20 00 clr %g4 200e5d0: 86 10 20 00 clr %g3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200e5d4: c2 03 60 04 ld [ %o5 + 4 ], %g1 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 200e5d8: c4 02 60 04 ld [ %o1 + 4 ], %g2 200e5dc: 82 08 7f fe and %g1, -2, %g1 uint32_t const the_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)); info->number++; 200e5e0: 88 01 20 01 inc %g4 info->total += the_size; 200e5e4: 86 00 c0 01 add %g3, %g1, %g3 uint32_t const the_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)); info->number++; 200e5e8: c8 22 40 00 st %g4, [ %o1 ] info->total += the_size; if ( info->largest < the_size ) 200e5ec: 80 a0 80 01 cmp %g2, %g1 200e5f0: 1a 80 00 03 bcc 200e5fc <_Heap_Get_free_information+0x48> <== NEVER TAKEN 200e5f4: c6 22 60 08 st %g3, [ %o1 + 8 ] info->largest = the_size; 200e5f8: c2 22 60 04 st %g1, [ %o1 + 4 ] info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; the_block = the_block->next) 200e5fc: da 03 60 08 ld [ %o5 + 8 ], %o5 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 200e600: 80 a2 00 0d cmp %o0, %o5 200e604: 32 bf ff f5 bne,a 200e5d8 <_Heap_Get_free_information+0x24> 200e608: c2 03 60 04 ld [ %o5 + 4 ], %g1 200e60c: 81 c3 e0 08 retl =============================================================================== 0200e614 <_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; 200e614: 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; 200e618: 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; 200e61c: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 200e620: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 200e624: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 200e628: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 200e62c: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 200e630: 80 a0 40 0b cmp %g1, %o3 200e634: 02 80 00 26 be 200e6cc <_Heap_Get_information+0xb8> <== NEVER TAKEN 200e638: c0 22 60 10 clr [ %o1 + 0x10 ] 200e63c: 10 80 00 0e b 200e674 <_Heap_Get_information+0x60> 200e640: 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; 200e644: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 200e648: 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++; 200e64c: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 200e650: 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++; 200e654: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 200e658: 80 a0 c0 04 cmp %g3, %g4 200e65c: 1a 80 00 03 bcc 200e668 <_Heap_Get_information+0x54> 200e660: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 200e664: 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 ) { 200e668: 80 a2 c0 0d cmp %o3, %o5 200e66c: 02 80 00 18 be 200e6cc <_Heap_Get_information+0xb8> 200e670: 82 10 00 0d mov %o5, %g1 200e674: 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 ); 200e678: 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); 200e67c: 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) ) { 200e680: 80 8b 20 01 btst 1, %o4 200e684: 32 bf ff f0 bne,a 200e644 <_Heap_Get_information+0x30> 200e688: 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++; 200e68c: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 200e690: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 200e694: 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++; 200e698: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 200e69c: 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++; 200e6a0: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 200e6a4: 80 a0 c0 04 cmp %g3, %g4 200e6a8: 1a 80 00 03 bcc 200e6b4 <_Heap_Get_information+0xa0> <== NEVER TAKEN 200e6ac: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 200e6b0: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 200e6b4: c2 03 40 00 ld [ %o5 ], %g1 200e6b8: 80 a0 40 04 cmp %g1, %g4 200e6bc: 02 bf ff ec be 200e66c <_Heap_Get_information+0x58> <== ALWAYS TAKEN 200e6c0: 80 a2 c0 0d cmp %o3, %o5 200e6c4: 81 c3 e0 08 retl <== NOT EXECUTED 200e6c8: 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; 200e6cc: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 200e6d0: 90 10 20 00 clr %o0 200e6d4: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 200e6d8: 81 c3 e0 08 retl 200e6dc: c2 22 60 14 st %g1, [ %o1 + 0x14 ] =============================================================================== 020068d8 <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 20068d8: 9d e3 bf 98 save %sp, -104, %sp _H_uptr_t start; _H_uptr_t aligned_start; uint32_t overhead; Heap_Statistics *const stats = &the_heap->stats; if (page_size == 0) 20068dc: 80 a6 e0 00 cmp %i3, 0 20068e0: 12 80 00 43 bne 20069ec <_Heap_Initialize+0x114> 20068e4: 84 8e e0 07 andcc %i3, 7, %g2 20068e8: b6 10 20 08 mov 8, %i3 20068ec: a2 10 20 00 clr %l1 /* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; 20068f0: a0 06 60 08 add %i1, 8, %l0 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 20068f4: 92 10 00 1b mov %i3, %o1 20068f8: 40 00 34 ca call 2013c20 <.urem> 20068fc: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 2006900: 80 a2 20 00 cmp %o0, 0 2006904: 22 80 00 05 be,a 2006918 <_Heap_Initialize+0x40> 2006908: 82 06 e0 10 add %i3, 0x10, %g1 200690c: 82 06 c0 10 add %i3, %l0, %g1 2006910: a0 20 40 08 sub %g1, %o0, %l0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 2006914: 82 06 e0 10 add %i3, 0x10, %g1 2006918: 80 a4 60 00 cmp %l1, 0 _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 200691c: a4 04 3f f8 add %l0, -8, %l2 2006920: 12 80 00 03 bne 200692c <_Heap_Initialize+0x54> 2006924: 82 20 40 11 sub %g1, %l1, %g1 2006928: 82 10 20 10 mov 0x10, %g1 200692c: c2 26 20 14 st %g1, [ %i0 + 0x14 ] /* Calculate 'the_size' -- size of the first block so that there is enough space at the end for the permanent last block. It is equal to 'size' minus total overhead aligned down to the nearest multiple of 'page_size'. */ overhead = HEAP_OVERHEAD + (aligned_start - start); 2006930: 82 24 80 19 sub %l2, %i1, %g1 2006934: 82 00 60 08 add %g1, 8, %g1 if ( size < overhead ) 2006938: 80 a0 40 1a cmp %g1, %i2 200693c: 18 80 00 2a bgu 20069e4 <_Heap_Initialize+0x10c> <== NEVER TAKEN 2006940: a0 26 80 01 sub %i2, %g1, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 2006944: 92 10 00 1b mov %i3, %o1 2006948: 40 00 34 b6 call 2013c20 <.urem> 200694c: 90 10 00 10 mov %l0, %o0 return 0; /* Too small area for the heap */ the_size = size - overhead; _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 2006950: a0 a4 00 08 subcc %l0, %o0, %l0 2006954: 02 80 00 24 be 20069e4 <_Heap_Initialize+0x10c> 2006958: 09 00 80 5c sethi %hi(0x2017000), %g4 return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 200695c: f6 26 20 10 st %i3, [ %i0 + 0x10 ] the_heap->begin = starting_address; the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; 2006960: f6 24 80 00 st %i3, [ %l2 ] the_block->size = the_size | HEAP_PREV_USED; 2006964: 82 14 20 01 or %l0, 1, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 2006968: c6 01 20 b4 ld [ %g4 + 0xb4 ], %g3 the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; 200696c: c2 24 a0 04 st %g1, [ %l2 + 4 ] _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ 2006970: e0 24 80 10 st %l0, [ %l2 + %l0 ] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 2006974: 9a 04 80 10 add %l2, %l0, %o5 the_block->size = page_size; 2006978: f6 23 60 04 st %i3, [ %o5 + 4 ] the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); 200697c: f0 24 a0 08 st %i0, [ %l2 + 8 ] the_block->prev = _Heap_Head( the_heap ); 2006980: f0 24 a0 0c st %i0, [ %l2 + 0xc ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 2006984: c6 26 20 28 st %g3, [ %i0 + 0x28 ] the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ the_block->size = page_size; stats->size = size; 2006988: f4 26 20 2c st %i2, [ %i0 + 0x2c ] stats->free_size = the_size; 200698c: e0 26 20 30 st %l0, [ %i0 + 0x30 ] stats->min_free_size = the_size; 2006990: e0 26 20 34 st %l0, [ %i0 + 0x34 ] stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; 2006994: c0 26 20 40 clr [ %i0 + 0x40 ] stats->max_search = 0; 2006998: c0 26 20 44 clr [ %i0 + 0x44 ] stats->allocs = 0; 200699c: c0 26 20 48 clr [ %i0 + 0x48 ] stats->searches = 0; 20069a0: c0 26 20 4c clr [ %i0 + 0x4c ] stats->frees = 0; 20069a4: c0 26 20 50 clr [ %i0 + 0x50 ] stats->resizes = 0; 20069a8: c0 26 20 54 clr [ %i0 + 0x54 ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 20069ac: 84 10 20 01 mov 1, %g2 stats->max_free_blocks = 1; 20069b0: c4 26 20 3c st %g2, [ %i0 + 0x3c ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 20069b4: c4 26 20 38 st %g2, [ %i0 + 0x38 ] if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 20069b8: 82 06 40 1a add %i1, %i2, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 20069bc: 86 00 e0 01 inc %g3 if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 20069c0: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; 20069c4: f2 26 20 18 st %i1, [ %i0 + 0x18 ] the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); the_block->prev = _Heap_Head( the_heap ); _Heap_Head(the_heap)->next = the_block; 20069c8: e4 26 20 08 st %l2, [ %i0 + 8 ] _Heap_Tail(the_heap)->prev = the_block; 20069cc: e4 26 20 0c st %l2, [ %i0 + 0xc ] the_heap->start = the_block; 20069d0: e4 26 20 20 st %l2, [ %i0 + 0x20 ] _HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT)); _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ 20069d4: da 26 20 24 st %o5, [ %i0 + 0x24 ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 20069d8: c6 21 20 b4 st %g3, [ %g4 + 0xb4 ] return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 20069dc: 81 c7 e0 08 ret 20069e0: 91 ec 3f fc restore %l0, -4, %o0 } 20069e4: 81 c7 e0 08 ret 20069e8: 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; 20069ec: 02 80 00 04 be 20069fc <_Heap_Initialize+0x124> 20069f0: 90 10 20 10 mov 0x10, %o0 20069f4: 82 06 e0 08 add %i3, 8, %g1 20069f8: b6 20 40 02 sub %g1, %g2, %i3 20069fc: 40 00 34 89 call 2013c20 <.urem> 2006a00: 92 10 00 1b mov %i3, %o1 2006a04: 10 bf ff bb b 20068f0 <_Heap_Initialize+0x18> 2006a08: a2 10 00 08 mov %o0, %l1 =============================================================================== 02014dd0 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 2014dd0: 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; 2014dd4: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 2014dd8: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 2014ddc: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 2014de0: 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); 2014de4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2014de8: 7f ff fb 8e call 2013c20 <.urem> 2014dec: 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 ); 2014df0: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 2014df4: 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); 2014df8: 82 06 7f f8 add %i1, -8, %g1 2014dfc: 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)) 2014e00: 80 a4 40 04 cmp %l1, %g4 2014e04: 84 60 3f ff subx %g0, -1, %g2 2014e08: 80 a0 c0 11 cmp %g3, %l1 2014e0c: 82 60 3f ff subx %g0, -1, %g1 2014e10: 80 88 80 01 btst %g2, %g1 2014e14: 02 80 00 2f be 2014ed0 <_Heap_Resize_block+0x100> 2014e18: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 2014e1c: 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); 2014e20: 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 ); 2014e24: 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) || 2014e28: 80 a4 80 04 cmp %l2, %g4 2014e2c: 84 60 3f ff subx %g0, -1, %g2 2014e30: 80 a0 c0 12 cmp %g3, %l2 2014e34: 82 60 3f ff subx %g0, -1, %g1 2014e38: 80 88 80 01 btst %g2, %g1 2014e3c: 02 80 00 25 be 2014ed0 <_Heap_Resize_block+0x100> <== NEVER TAKEN 2014e40: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2014e44: c2 04 a0 04 ld [ %l2 + 4 ], %g1 2014e48: 80 88 60 01 btst 1, %g1 2014e4c: 02 80 00 21 be 2014ed0 <_Heap_Resize_block+0x100> <== NEVER TAKEN 2014e50: 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) || 2014e54: 80 a0 c0 12 cmp %g3, %l2 2014e58: a8 10 20 01 mov 1, %l4 2014e5c: 02 80 00 04 be 2014e6c <_Heap_Resize_block+0x9c> <== NEVER TAKEN 2014e60: 82 04 80 17 add %l2, %l7, %g1 2014e64: c2 00 60 04 ld [ %g1 + 4 ], %g1 2014e68: 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) 2014e6c: 82 24 80 19 sub %l2, %i1, %g1 2014e70: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 2014e74: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 2014e78: 80 a0 40 1a cmp %g1, %i2 2014e7c: 1a 80 00 17 bcc 2014ed8 <_Heap_Resize_block+0x108> 2014e80: 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 */ 2014e84: 80 8d 20 ff btst 0xff, %l4 2014e88: 12 80 00 10 bne 2014ec8 <_Heap_Resize_block+0xf8> 2014e8c: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 2014e90: 92 10 00 15 mov %l5, %o1 2014e94: 7f ff fb 63 call 2013c20 <.urem> 2014e98: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 2014e9c: 80 a2 20 00 cmp %o0, 0 2014ea0: 02 80 00 05 be 2014eb4 <_Heap_Resize_block+0xe4> <== NEVER TAKEN 2014ea4: 80 a4 00 16 cmp %l0, %l6 2014ea8: 82 04 00 15 add %l0, %l5, %g1 2014eac: a0 20 40 08 sub %g1, %o0, %l0 2014eb0: 80 a4 00 16 cmp %l0, %l6 2014eb4: 0a 80 00 2e bcs 2014f6c <_Heap_Resize_block+0x19c> <== ALWAYS TAKEN 2014eb8: 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) 2014ebc: 80 a5 c0 08 cmp %l7, %o0 2014ec0: 1a 80 00 32 bcc 2014f88 <_Heap_Resize_block+0x1b8> <== ALWAYS TAKEN 2014ec4: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 2014ec8: 81 c7 e0 08 ret 2014ecc: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 2014ed0: 81 c7 e0 08 ret 2014ed4: 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; 2014ed8: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 2014edc: 92 10 00 15 mov %l5, %o1 2014ee0: 7f ff fb 50 call 2013c20 <.urem> 2014ee4: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 2014ee8: a0 a4 00 08 subcc %l0, %o0, %l0 2014eec: 22 80 00 1c be,a 2014f5c <_Heap_Resize_block+0x18c> 2014ef0: 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; 2014ef4: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 2014ef8: 80 a5 80 02 cmp %l6, %g2 2014efc: 18 80 00 1e bgu 2014f74 <_Heap_Resize_block+0x1a4> 2014f00: 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) { 2014f04: 80 8d 20 ff btst 0xff, %l4 2014f08: 12 80 00 2a bne 2014fb0 <_Heap_Resize_block+0x1e0> <== NEVER TAKEN 2014f0c: 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; 2014f10: 82 10 80 1b or %g2, %i3, %g1 2014f14: 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 ); 2014f18: 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; 2014f1c: 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; 2014f20: 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; 2014f24: 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; 2014f28: 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; 2014f2c: 84 11 20 01 or %g4, 1, %g2 2014f30: 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; 2014f34: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 2014f38: da 20 e0 08 st %o5, [ %g3 + 8 ] 2014f3c: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 2014f40: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 2014f44: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 2014f48: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 2014f4c: c6 23 60 0c st %g3, [ %o5 + 0xc ] 2014f50: c6 23 20 08 st %g3, [ %o4 + 8 ] 2014f54: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2014f58: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 2014f5c: 82 00 60 01 inc %g1 2014f60: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 2014f64: 81 c7 e0 08 ret 2014f68: 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; 2014f6c: 10 bf ff d4 b 2014ebc <_Heap_Resize_block+0xec> 2014f70: 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) { 2014f74: a0 a4 00 01 subcc %l0, %g1, %l0 2014f78: 12 bf ff e3 bne 2014f04 <_Heap_Resize_block+0x134> <== NEVER TAKEN 2014f7c: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2014f80: 10 bf ff f7 b 2014f5c <_Heap_Resize_block+0x18c> 2014f84: 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 = 2014f88: 92 10 00 12 mov %l2, %o1 2014f8c: 7f ff c6 b4 call 2006a5c <_Heap_Block_allocate> 2014f90: 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; 2014f94: 90 02 00 18 add %o0, %i0, %o0 2014f98: 90 12 00 1b or %o0, %i3, %o0 2014f9c: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 2014fa0: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 2014fa4: 82 00 7f ff add %g1, -1, %g1 2014fa8: 10 bf ff ec b 2014f58 <_Heap_Resize_block+0x188> 2014fac: 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) { 2014fb0: 38 bf ff eb bgu,a 2014f5c <_Heap_Resize_block+0x18c> <== NOT EXECUTED 2014fb4: 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; 2014fb8: 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 ); 2014fbc: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 2014fc0: 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; 2014fc4: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 2014fc8: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 2014fcc: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2014fd0: 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 */ 2014fd4: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2014fd8: 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 */ 2014fdc: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2014fe0: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 2014fe4: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 2014fe8: 7f ff da e3 call 200bb74 <_Heap_Free> <== NOT EXECUTED 2014fec: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 2014ff0: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 2014ff4: 10 bf ff d9 b 2014f58 <_Heap_Resize_block+0x188> <== NOT EXECUTED 2014ff8: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED =============================================================================== 02014ffc <_Heap_Size_of_user_area>: bool _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 2014ffc: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *the_block; Heap_Block *next_block; uint32_t the_size; if ( !_Addresses_Is_in_range( 2015000: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2015004: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 2015008: 80 a6 40 10 cmp %i1, %l0 201500c: 84 60 3f ff subx %g0, -1, %g2 2015010: 80 a4 40 19 cmp %l1, %i1 2015014: 82 60 3f ff subx %g0, -1, %g1 2015018: 80 88 80 01 btst %g2, %g1 201501c: 02 80 00 20 be 201509c <_Heap_Size_of_user_area+0xa0> 2015020: 01 00 00 00 nop /* 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); 2015024: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2015028: 7f ff fa fe call 2013c20 <.urem> 201502c: 90 10 00 19 mov %i1, %o0 2015030: 82 06 7f f8 add %i1, -8, %g1 2015034: 86 20 40 08 sub %g1, %o0, %g3 return( FALSE ); _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 ) ) 2015038: 80 a0 c0 10 cmp %g3, %l0 201503c: 84 60 3f ff subx %g0, -1, %g2 2015040: 80 a4 40 03 cmp %l1, %g3 2015044: 82 60 3f ff subx %g0, -1, %g1 2015048: 80 88 80 01 btst %g2, %g1 201504c: 02 80 00 14 be 201509c <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN 2015050: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2015054: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2015058: 82 08 7f fe and %g1, -2, %g1 201505c: 90 00 c0 01 add %g3, %g1, %o0 the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); _HAssert(_Heap_Is_block_in( the_heap, next_block )); _HAssert(_Heap_Is_prev_used( next_block )); if ( 2015060: 80 a2 00 10 cmp %o0, %l0 2015064: 84 60 3f ff subx %g0, -1, %g2 2015068: 80 a4 40 08 cmp %l1, %o0 201506c: 82 60 3f ff subx %g0, -1, %g1 2015070: 80 88 80 01 btst %g2, %g1 2015074: 02 80 00 0a be 201509c <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN 2015078: 01 00 00 00 nop 201507c: c2 02 20 04 ld [ %o0 + 4 ], %g1 2015080: 80 88 60 01 btst 1, %g1 2015084: 02 80 00 06 be 201509c <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN 2015088: 82 22 00 19 sub %o0, %i1, %g1 and then add correction equal to the offset of the 'size' field of the 'Heap_Block' structure. The correction is due to the fact that 'prev_size' field of the next block is actually used as user accessible area of 'the_block'. */ *size = _Addresses_Subtract ( next_block, starting_address ) 201508c: 82 00 60 04 add %g1, 4, %g1 2015090: c2 26 80 00 st %g1, [ %i2 ] 2015094: 81 c7 e0 08 ret 2015098: 91 e8 20 01 restore %g0, 1, %o0 + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); } 201509c: 81 c7 e0 08 ret 20150a0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200e788 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 200e788: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e78c: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 200e790: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e794: 06 80 00 8c bl 200e9c4 <_Heap_Walk+0x23c> <== NEVER TAKEN 200e798: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 200e79c: c2 04 60 04 ld [ %l1 + 4 ], %g1 200e7a0: 80 88 60 01 btst 1, %g1 200e7a4: 02 80 00 81 be 200e9a8 <_Heap_Walk+0x220> <== NEVER TAKEN 200e7a8: 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) { 200e7ac: c4 04 40 00 ld [ %l1 ], %g2 200e7b0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200e7b4: 80 a0 80 01 cmp %g2, %g1 200e7b8: 02 80 00 08 be 200e7d8 <_Heap_Walk+0x50> <== ALWAYS TAKEN 200e7bc: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 200e7c0: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e7c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e7c8: 90 12 22 68 or %o0, 0x268, %o0 <== NOT EXECUTED 200e7cc: 7f ff d9 3f call 2004cc8 <== NOT EXECUTED 200e7d0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 200e7d4: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 200e7d8: 22 80 00 63 be,a 200e964 <_Heap_Walk+0x1dc> <== NEVER TAKEN 200e7dc: 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)) { 200e7e0: 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); 200e7e4: c8 04 60 04 ld [ %l1 + 4 ], %g4 200e7e8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200e7ec: 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 ); 200e7f0: a0 04 40 12 add %l1, %l2, %l0 200e7f4: 80 a4 00 01 cmp %l0, %g1 200e7f8: 84 60 3f ff subx %g0, -1, %g2 200e7fc: 80 a0 c0 10 cmp %g3, %l0 200e800: 82 60 3f ff subx %g0, -1, %g1 200e804: 80 88 80 01 btst %g2, %g1 200e808: 02 80 00 77 be 200e9e4 <_Heap_Walk+0x25c> <== NEVER TAKEN 200e80c: 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); 200e810: 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"); 200e814: ba 10 62 20 or %g1, 0x220, %i5 printk("PASS: %d !the_block not in the free list", source); 200e818: ae 10 a3 28 or %g2, 0x328, %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); 200e81c: 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); 200e820: 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); 200e824: 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); 200e828: b8 10 62 f8 or %g1, 0x2f8, %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); 200e82c: b6 10 a2 c8 or %g2, 0x2c8, %i3 200e830: 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)) { 200e834: c2 04 20 04 ld [ %l0 + 4 ], %g1 200e838: 80 88 60 01 btst 1, %g1 200e83c: 12 80 00 20 bne 200e8bc <_Heap_Walk+0x134> 200e840: 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) { 200e844: c2 04 00 00 ld [ %l0 ], %g1 200e848: 80 a0 40 12 cmp %g1, %l2 200e84c: 02 80 00 07 be 200e868 <_Heap_Walk+0xe0> <== ALWAYS TAKEN 200e850: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200e854: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200e858: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e85c: 7f ff d9 1b call 2004cc8 <== NOT EXECUTED 200e860: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 200e864: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 200e868: 32 80 00 0a bne,a 200e890 <_Heap_Walk+0x108> <== ALWAYS TAKEN 200e86c: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 200e870: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 200e874: 12 80 00 49 bne 200e998 <_Heap_Walk+0x210> <== NOT EXECUTED 200e878: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200e87c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200e880: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e884: 7f ff d9 11 call 2004cc8 <== NOT EXECUTED 200e888: 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; 200e88c: 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) 200e890: 80 a0 40 11 cmp %g1, %l1 200e894: 02 80 00 0a be 200e8bc <_Heap_Walk+0x134> 200e898: 80 a4 e0 00 cmp %l3, 0 200e89c: 80 a6 00 01 cmp %i0, %g1 200e8a0: 02 80 00 58 be 200ea00 <_Heap_Walk+0x278> <== NEVER TAKEN 200e8a4: 80 a0 40 11 cmp %g1, %l1 block = block->next; 200e8a8: 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) 200e8ac: 80 a0 40 11 cmp %g1, %l1 200e8b0: 12 bf ff fc bne 200e8a0 <_Heap_Walk+0x118> 200e8b4: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 200e8b8: 80 a4 e0 00 cmp %l3, 0 200e8bc: 32 80 00 58 bne,a 200ea1c <_Heap_Walk+0x294> <== NEVER TAKEN 200e8c0: 27 00 80 67 sethi %hi(0x2019c00), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200e8c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200e8c8: 80 a0 40 12 cmp %g1, %l2 200e8cc: 18 80 00 40 bgu 200e9cc <_Heap_Walk+0x244> <== NEVER TAKEN 200e8d0: 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)) { 200e8d4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200e8d8: 40 00 26 5a call 2018240 <.urem> 200e8dc: 90 10 00 12 mov %l2, %o0 200e8e0: 80 a2 20 00 cmp %o0, 0 200e8e4: 12 80 00 15 bne 200e938 <_Heap_Walk+0x1b0> <== NEVER TAKEN 200e8e8: 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) 200e8ec: 12 80 00 17 bne 200e948 <_Heap_Walk+0x1c0> <== NEVER TAKEN 200e8f0: 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 ) { 200e8f4: 02 80 00 1c be 200e964 <_Heap_Walk+0x1dc> 200e8f8: 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); 200e8fc: 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)) { 200e900: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 200e904: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200e908: a4 09 3f fe and %g4, -2, %l2 200e90c: a0 04 00 12 add %l0, %l2, %l0 200e910: 80 a4 00 01 cmp %l0, %g1 200e914: 84 60 3f ff subx %g0, -1, %g2 200e918: 80 a0 c0 10 cmp %g3, %l0 200e91c: 82 60 3f ff subx %g0, -1, %g1 200e920: 80 88 80 01 btst %g2, %g1 200e924: 02 80 00 2f be 200e9e0 <_Heap_Walk+0x258> <== NEVER TAKEN 200e928: 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); 200e92c: a2 10 00 15 mov %l5, %l1 200e930: 10 bf ff c1 b 200e834 <_Heap_Walk+0xac> 200e934: 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); 200e938: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e93c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e940: 7f ff d8 e2 call 2004cc8 <== NOT EXECUTED 200e944: 90 12 23 80 or %o0, 0x380, %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", 200e948: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 200e94c: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e950: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e954: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED 200e958: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200e95c: 7f ff d8 db call 2004cc8 <== NOT EXECUTED 200e960: 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) { 200e964: 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); 200e968: c2 04 60 04 ld [ %l1 + 4 ], %g1 200e96c: 94 08 7f fe and %g1, -2, %o2 200e970: 80 a2 c0 0a cmp %o3, %o2 200e974: 02 80 00 07 be 200e990 <_Heap_Walk+0x208> <== ALWAYS TAKEN 200e978: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 200e97c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e980: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e984: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e988: 7f ff d8 d0 call 2004cc8 <== NOT EXECUTED 200e98c: 90 12 23 e8 or %o0, 0x3e8, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 200e990: 81 c7 e0 08 ret 200e994: 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"); 200e998: 7f ff d8 cc call 2004cc8 <== NOT EXECUTED 200e99c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200e9a0: 10 bf ff b8 b 200e880 <_Heap_Walk+0xf8> <== NOT EXECUTED 200e9a4: 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); 200e9a8: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e9ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e9b0: 90 12 22 30 or %o0, 0x230, %o0 <== NOT EXECUTED 200e9b4: 7f ff d8 c5 call 2004cc8 <== NOT EXECUTED 200e9b8: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 200e9bc: 10 bf ff 7d b 200e7b0 <_Heap_Walk+0x28> <== NOT EXECUTED 200e9c0: 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; 200e9c4: 10 bf ff 76 b 200e79c <_Heap_Walk+0x14> <== NOT EXECUTED 200e9c8: 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); 200e9cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e9d0: 7f ff d8 be call 2004cc8 <== NOT EXECUTED 200e9d4: 90 12 23 58 or %o0, 0x358, %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", 200e9d8: 10 bf ff dd b 200e94c <_Heap_Walk+0x1c4> <== NOT EXECUTED 200e9dc: 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); 200e9e0: 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); 200e9e4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 200e9e8: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e9ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e9f0: 7f ff d8 b6 call 2004cc8 <== NOT EXECUTED 200e9f4: 90 12 22 a0 or %o0, 0x2a0, %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", 200e9f8: 10 bf ff d5 b 200e94c <_Heap_Walk+0x1c4> <== NOT EXECUTED 200e9fc: 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) { 200ea00: 02 bf ff ae be 200e8b8 <_Heap_Walk+0x130> <== NOT EXECUTED 200ea04: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 200ea08: 12 80 00 0a bne 200ea30 <_Heap_Walk+0x2a8> <== NOT EXECUTED 200ea0c: 27 00 80 67 sethi %hi(0x2019c00), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200ea10: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200ea14: 7f ff d8 ad call 2004cc8 <== NOT EXECUTED 200ea18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200ea1c: 90 14 e2 20 or %l3, 0x220, %o0 <== NOT EXECUTED 200ea20: 7f ff d8 aa call 2004cc8 <== NOT EXECUTED 200ea24: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200ea28: 10 bf ff a8 b 200e8c8 <_Heap_Walk+0x140> <== NOT EXECUTED 200ea2c: 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"); 200ea30: 7f ff d8 a6 call 2004cc8 <== NOT EXECUTED 200ea34: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200ea38: 10 bf ff f7 b 200ea14 <_Heap_Walk+0x28c> <== NOT EXECUTED 200ea3c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED =============================================================================== 02005f88 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 2005f88: 9d e3 bf 98 save %sp, -104, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2005f8c: 03 00 80 5d sethi %hi(0x2017400), %g1 2005f90: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 20176f8 <_IO_Number_of_drivers> 2005f94: 80 a0 a0 00 cmp %g2, 0 2005f98: 02 80 00 0c be 2005fc8 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 2005f9c: a2 10 62 f8 or %g1, 0x2f8, %l1 2005fa0: a0 10 20 00 clr %l0 (void) rtems_io_initialize( major, 0, NULL ); 2005fa4: 90 10 00 10 mov %l0, %o0 2005fa8: 92 10 20 00 clr %o1 2005fac: 40 00 15 f4 call 200b77c 2005fb0: 94 10 20 00 clr %o2 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2005fb4: c2 04 40 00 ld [ %l1 ], %g1 2005fb8: a0 04 20 01 inc %l0 2005fbc: 80 a0 40 10 cmp %g1, %l0 2005fc0: 18 bf ff fa bgu 2005fa8 <_IO_Initialize_all_drivers+0x20> 2005fc4: 90 10 00 10 mov %l0, %o0 2005fc8: 81 c7 e0 08 ret 2005fcc: 81 e8 00 00 restore =============================================================================== 02005fd0 <_IO_Manager_initialization>: void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, uint32_t number_of_drivers ) { 2005fd0: 9d e3 bf 98 save %sp, -104, %sp /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 2005fd4: 80 a6 80 19 cmp %i2, %i1 2005fd8: 18 80 00 08 bgu 2005ff8 <_IO_Manager_initialization+0x28> 2005fdc: 83 2e a0 03 sll %i2, 3, %g1 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 2005fe0: 03 00 80 5d sethi %hi(0x2017400), %g1 _IO_Number_of_drivers = number_of_drivers; 2005fe4: 05 00 80 5d sethi %hi(0x2017400), %g2 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 2005fe8: f0 20 62 fc st %i0, [ %g1 + 0x2fc ] _IO_Number_of_drivers = number_of_drivers; 2005fec: f2 20 a2 f8 st %i1, [ %g2 + 0x2f8 ] 2005ff0: 81 c7 e0 08 ret 2005ff4: 81 e8 00 00 restore /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 2005ff8: a1 2e a0 05 sll %i2, 5, %l0 2005ffc: a0 24 00 01 sub %l0, %g1, %l0 2006000: 40 00 0c 6e call 20091b8 <_Workspace_Allocate_or_fatal_error> 2006004: 90 10 00 10 mov %l0, %o0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2006008: 03 00 80 5d sethi %hi(0x2017400), %g1 memset( 200600c: 94 10 00 10 mov %l0, %o2 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2006010: f4 20 62 f8 st %i2, [ %g1 + 0x2f8 ] /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 2006014: 21 00 80 5d sethi %hi(0x2017400), %l0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 2006018: 92 10 20 00 clr %o1 200601c: 40 00 1d b5 call 200d6f0 2006020: d0 24 22 fc st %o0, [ %l0 + 0x2fc ] _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2006024: 80 a6 60 00 cmp %i1, 0 2006028: 02 bf ff f2 be 2005ff0 <_IO_Manager_initialization+0x20> <== NEVER TAKEN 200602c: d4 04 22 fc ld [ %l0 + 0x2fc ], %o2 _IO_Driver_address_table[index] = driver_table[index]; 2006030: 96 10 20 00 clr %o3 2006034: 98 10 20 00 clr %o4 2006038: c2 06 00 0c ld [ %i0 + %o4 ], %g1 200603c: 9a 06 00 0c add %i0, %o4, %o5 2006040: c2 22 80 0c st %g1, [ %o2 + %o4 ] 2006044: c4 03 60 04 ld [ %o5 + 4 ], %g2 2006048: 86 02 80 0c add %o2, %o4, %g3 200604c: c4 20 e0 04 st %g2, [ %g3 + 4 ] 2006050: c2 03 60 08 ld [ %o5 + 8 ], %g1 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2006054: 96 02 e0 01 inc %o3 _IO_Driver_address_table[index] = driver_table[index]; 2006058: c2 20 e0 08 st %g1, [ %g3 + 8 ] 200605c: c4 03 60 0c ld [ %o5 + 0xc ], %g2 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2006060: 98 03 20 18 add %o4, 0x18, %o4 _IO_Driver_address_table[index] = driver_table[index]; 2006064: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 2006068: c8 03 60 10 ld [ %o5 + 0x10 ], %g4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 200606c: 80 a6 40 0b cmp %i1, %o3 _IO_Driver_address_table[index] = driver_table[index]; 2006070: c8 20 e0 10 st %g4, [ %g3 + 0x10 ] 2006074: c2 03 60 14 ld [ %o5 + 0x14 ], %g1 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2006078: 18 bf ff f0 bgu 2006038 <_IO_Manager_initialization+0x68> 200607c: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] 2006080: 81 c7 e0 08 ret 2006084: 81 e8 00 00 restore =============================================================================== 0200bd64 <_Objects_API_maximum_class>: #include int _Objects_API_maximum_class( uint32_t api ) { 200bd64: 82 10 00 08 mov %o0, %g1 switch (api) { 200bd68: 80 a2 20 02 cmp %o0, 2 200bd6c: 02 80 00 0f be 200bda8 <_Objects_API_maximum_class+0x44> 200bd70: 90 10 20 0a mov 0xa, %o0 200bd74: 80 a0 60 02 cmp %g1, 2 200bd78: 08 80 00 0a bleu 200bda0 <_Objects_API_maximum_class+0x3c> 200bd7c: 80 a0 60 01 cmp %g1, 1 200bd80: 80 a0 60 03 cmp %g1, 3 200bd84: 02 80 00 09 be 200bda8 <_Objects_API_maximum_class+0x44> <== NEVER TAKEN 200bd88: 90 10 20 0c mov 0xc, %o0 200bd8c: 80 a0 60 04 cmp %g1, 4 200bd90: 02 80 00 06 be 200bda8 <_Objects_API_maximum_class+0x44> 200bd94: 90 10 20 08 mov 8, %o0 case OBJECTS_NO_API: default: break; } return -1; } 200bd98: 81 c3 e0 08 retl 200bd9c: 90 10 3f ff mov -1, %o0 int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 200bda0: 12 bf ff fe bne 200bd98 <_Objects_API_maximum_class+0x34> 200bda4: 90 10 20 02 mov 2, %o0 200bda8: 81 c3 e0 08 retl =============================================================================== 02006bcc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006bcc: 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 ) 2006bd0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006bd4: 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 ) 2006bd8: 80 a0 60 00 cmp %g1, 0 2006bdc: 02 80 00 1d be 2006c50 <_Objects_Allocate+0x84> <== NEVER TAKEN 2006be0: 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 ); 2006be4: a2 04 20 20 add %l0, 0x20, %l1 2006be8: 40 00 13 04 call 200b7f8 <_Chain_Get> 2006bec: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2006bf0: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 2006bf4: 80 a0 60 00 cmp %g1, 0 2006bf8: 02 80 00 16 be 2006c50 <_Objects_Allocate+0x84> 2006bfc: 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 ) { 2006c00: 80 a2 20 00 cmp %o0, 0 2006c04: 02 80 00 15 be 2006c58 <_Objects_Allocate+0x8c> 2006c08: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006c0c: c4 06 20 08 ld [ %i0 + 8 ], %g2 2006c10: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c14: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006c18: 03 00 00 3f sethi %hi(0xfc00), %g1 2006c1c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006c20: 84 08 80 01 and %g2, %g1, %g2 2006c24: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c28: 40 00 33 52 call 2013970 <.udiv> 2006c2c: 90 20 80 08 sub %g2, %o0, %o0 2006c30: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 2006c34: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2006c38: 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 ]--; 2006c3c: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 2006c40: 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 ]--; 2006c44: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2006c48: 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 ]--; 2006c4c: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 2006c50: 81 c7 e0 08 ret 2006c54: 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 ); 2006c58: 40 00 00 14 call 2006ca8 <_Objects_Extend_information> 2006c5c: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2006c60: 40 00 12 e6 call 200b7f8 <_Chain_Get> 2006c64: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 2006c68: b0 92 20 00 orcc %o0, 0, %i0 2006c6c: 32 bf ff e9 bne,a 2006c10 <_Objects_Allocate+0x44> <== ALWAYS TAKEN 2006c70: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 2006c74: 81 c7 e0 08 ret <== NOT EXECUTED 2006c78: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02006ca8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2006ca8: 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; 2006cac: 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 ) 2006cb0: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2006cb4: 03 00 00 3f sethi %hi(0xfc00), %g1 2006cb8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006cbc: a8 08 80 01 and %g2, %g1, %l4 2006cc0: 80 a5 40 14 cmp %l5, %l4 2006cc4: 1a 80 00 79 bcc 2006ea8 <_Objects_Extend_information+0x200> 2006cc8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2006ccc: a6 10 00 14 mov %l4, %l3 2006cd0: a4 10 20 00 clr %l2 2006cd4: a2 10 20 00 clr %l1 2006cd8: ac 10 20 01 mov 1, %l6 2006cdc: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 2006ce0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006ce4: 80 a0 60 00 cmp %g1, 0 2006ce8: 12 80 00 8d bne 2006f1c <_Objects_Extend_information+0x274> 2006cec: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 2006cf0: 90 02 00 14 add %o0, %l4, %o0 2006cf4: 90 02 00 1d add %o0, %i5, %o0 2006cf8: 40 00 09 30 call 20091b8 <_Workspace_Allocate_or_fatal_error> 2006cfc: 91 2a 20 02 sll %o0, 2, %o0 2006d00: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d04: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006d08: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d0c: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006d10: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d14: 18 80 00 94 bgu 2006f64 <_Objects_Extend_information+0x2bc> 2006d18: 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++ ) { 2006d1c: 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, 2006d20: 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++ ) { 2006d24: 02 80 00 08 be 2006d44 <_Objects_Extend_information+0x9c> <== NEVER TAKEN 2006d28: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 2006d2c: 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++ ) { 2006d30: 84 00 a0 01 inc %g2 2006d34: 80 a0 80 14 cmp %g2, %l4 2006d38: 0a bf ff fd bcs 2006d2c <_Objects_Extend_information+0x84><== NEVER TAKEN 2006d3c: c0 24 00 01 clr [ %l0 + %g1 ] 2006d40: 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; 2006d44: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006d48: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006d4c: 86 04 c0 01 add %l3, %g1, %g3 2006d50: 80 a4 c0 03 cmp %l3, %g3 2006d54: 1a 80 00 0a bcc 2006d7c <_Objects_Extend_information+0xd4><== NEVER TAKEN 2006d58: c0 25 c0 15 clr [ %l7 + %l5 ] 2006d5c: 83 2c e0 02 sll %l3, 2, %g1 2006d60: 84 04 00 01 add %l0, %g1, %g2 2006d64: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 2006d68: 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++ ) { 2006d6c: 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 ); 2006d70: 80 a0 40 03 cmp %g1, %g3 2006d74: 0a bf ff fd bcs 2006d68 <_Objects_Extend_information+0xc0> 2006d78: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2006d7c: 7f ff ec 1a call 2001de4 2006d80: 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( 2006d84: c2 06 00 00 ld [ %i0 ], %g1 2006d88: 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; 2006d8c: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006d90: 89 29 20 1b sll %g4, 0x1b, %g4 2006d94: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006d98: 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( 2006d9c: 87 30 e0 10 srl %g3, 0x10, %g3 2006da0: 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; 2006da4: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006da8: 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; 2006dac: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2006db0: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006db4: 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( 2006db8: 82 10 40 04 or %g1, %g4, %g1 2006dbc: 82 10 40 03 or %g1, %g3, %g1 2006dc0: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006dc4: 7f ff ec 0c call 2001df4 2006dc8: 01 00 00 00 nop if ( old_tables ) 2006dcc: 80 a4 20 00 cmp %l0, 0 2006dd0: 22 80 00 05 be,a 2006de4 <_Objects_Extend_information+0x13c> 2006dd4: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 2006dd8: 40 00 08 ea call 2009180 <_Workspace_Free> 2006ddc: 90 10 00 10 mov %l0, %o0 2006de0: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 2006de4: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006de8: 80 a0 60 00 cmp %g1, 0 2006dec: 02 80 00 55 be 2006f40 <_Objects_Extend_information+0x298> 2006df0: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 2006df4: 90 10 00 10 mov %l0, %o0 2006df8: 40 00 32 a4 call 2013888 <.umul> 2006dfc: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006e00: 40 00 08 e7 call 200919c <_Workspace_Allocate> 2006e04: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006e08: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 2006e0c: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006e10: d2 00 40 14 ld [ %g1 + %l4 ], %o1 2006e14: 80 a2 60 00 cmp %o1, 0 2006e18: 02 80 00 64 be 2006fa8 <_Objects_Extend_information+0x300><== NEVER TAKEN 2006e1c: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e20: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2006e24: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e28: a0 10 00 13 mov %l3, %l0 2006e2c: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e30: 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( 2006e34: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e38: 40 00 12 83 call 200b844 <_Chain_Initialize> 2006e3c: 90 10 00 13 mov %l3, %o0 2006e40: 30 80 00 0c b,a 2006e70 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006e44: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2006e48: 83 28 60 18 sll %g1, 0x18, %g1 2006e4c: 85 28 a0 1b sll %g2, 0x1b, %g2 2006e50: 82 10 40 12 or %g1, %l2, %g1 2006e54: 82 10 40 02 or %g1, %g2, %g1 2006e58: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e5c: 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( 2006e60: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2006e64: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e68: 7f ff fd 2f call 2006324 <_Chain_Append> 2006e6c: 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 ) { 2006e70: 40 00 12 62 call 200b7f8 <_Chain_Get> 2006e74: 90 10 00 13 mov %l3, %o0 2006e78: 80 a2 20 00 cmp %o0, 0 2006e7c: 32 bf ff f2 bne,a 2006e44 <_Objects_Extend_information+0x19c> 2006e80: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006e84: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2006e88: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 2006e8c: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006e90: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 2006e94: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006e98: 82 00 40 04 add %g1, %g4, %g1 2006e9c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006ea0: 81 c7 e0 08 ret 2006ea4: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006ea8: 90 10 00 15 mov %l5, %o0 2006eac: 40 00 32 b1 call 2013970 <.udiv> 2006eb0: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 2006eb4: a4 92 20 00 orcc %o0, 0, %l2 2006eb8: 02 80 00 3e be 2006fb0 <_Objects_Extend_information+0x308><== NEVER TAKEN 2006ebc: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 2006ec0: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 2006ec4: c2 00 80 00 ld [ %g2 ], %g1 2006ec8: 80 a0 60 00 cmp %g1, 0 2006ecc: 12 80 00 08 bne 2006eec <_Objects_Extend_information+0x244><== ALWAYS TAKEN 2006ed0: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2006ed4: 10 80 00 0c b 2006f04 <_Objects_Extend_information+0x25c> <== NOT EXECUTED 2006ed8: 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 ) 2006edc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2006ee0: 80 a0 60 00 cmp %g1, 0 2006ee4: 02 80 00 08 be 2006f04 <_Objects_Extend_information+0x25c> 2006ee8: 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++ ) { 2006eec: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 2006ef0: 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++ ) { 2006ef4: 80 a4 80 11 cmp %l2, %l1 2006ef8: 18 bf ff f9 bgu 2006edc <_Objects_Extend_information+0x234> 2006efc: 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 ) { 2006f00: 80 a4 c0 15 cmp %l3, %l5 2006f04: 2a bf ff b9 bcs,a 2006de8 <_Objects_Extend_information+0x140> 2006f08: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006f0c: ac 04 a0 01 add %l2, 1, %l6 2006f10: 83 2d a0 01 sll %l6, 1, %g1 2006f14: 10 bf ff 73 b 2006ce0 <_Objects_Extend_information+0x38> 2006f18: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 2006f1c: 90 02 00 14 add %o0, %l4, %o0 2006f20: 90 02 00 1d add %o0, %i5, %o0 2006f24: 40 00 08 9e call 200919c <_Workspace_Allocate> 2006f28: 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 ) 2006f2c: ae 92 20 00 orcc %o0, 0, %l7 2006f30: 32 bf ff 76 bne,a 2006d08 <_Objects_Extend_information+0x60><== ALWAYS TAKEN 2006f34: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006f38: 81 c7 e0 08 ret <== NOT EXECUTED 2006f3c: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 2006f40: 90 10 00 10 mov %l0, %o0 2006f44: 40 00 32 51 call 2013888 <.umul> 2006f48: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006f4c: 40 00 08 9b call 20091b8 <_Workspace_Allocate_or_fatal_error> 2006f50: a9 2c 60 02 sll %l1, 2, %l4 2006f54: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006f58: d0 24 00 14 st %o0, [ %l0 + %l4 ] 2006f5c: 10 bf ff b1 b 2006e20 <_Objects_Extend_information+0x178> 2006f60: 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, 2006f64: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 2006f68: ab 2c a0 02 sll %l2, 2, %l5 2006f6c: 90 10 00 17 mov %l7, %o0 2006f70: 40 00 19 a7 call 200d60c 2006f74: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006f78: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2006f7c: 94 10 00 15 mov %l5, %o2 2006f80: 40 00 19 a3 call 200d60c 2006f84: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006f88: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 2006f8c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006f90: 94 05 00 0a add %l4, %o2, %o2 2006f94: 90 10 00 10 mov %l0, %o0 2006f98: 40 00 19 9d call 200d60c 2006f9c: 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; 2006fa0: 10 bf ff 6a b 2006d48 <_Objects_Extend_information+0xa0> 2006fa4: c0 25 80 15 clr [ %l6 + %l5 ] 2006fa8: 81 c7 e0 08 ret <== NOT EXECUTED 2006fac: 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++ ) { 2006fb0: 10 bf ff d4 b 2006f00 <_Objects_Extend_information+0x258> <== NOT EXECUTED 2006fb4: a2 10 20 00 clr %l1 <== NOT EXECUTED =============================================================================== 02007068 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 2007068: 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 ) 200706c: 82 06 3f ff add %i0, -1, %g1 2007070: 80 a0 60 03 cmp %g1, 3 2007074: 38 80 00 1e bgu,a 20070ec <_Objects_Get_information+0x84> 2007078: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 200707c: 80 a6 60 00 cmp %i1, 0 2007080: 12 80 00 04 bne 2007090 <_Objects_Get_information+0x28> 2007084: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 2007088: 81 c7 e0 08 ret 200708c: 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 ); 2007090: 40 00 13 35 call 200bd64 <_Objects_API_maximum_class> 2007094: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 2007098: 80 a2 20 00 cmp %o0, 0 200709c: 06 bf ff fb bl 2007088 <_Objects_Get_information+0x20> <== NEVER TAKEN 20070a0: 80 a2 00 19 cmp %o0, %i1 20070a4: 2a 80 00 12 bcs,a 20070ec <_Objects_Get_information+0x84><== NEVER TAKEN 20070a8: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 20070ac: 85 2e 20 02 sll %i0, 2, %g2 20070b0: 03 00 80 5c sethi %hi(0x2017000), %g1 20070b4: 82 10 63 40 or %g1, 0x340, %g1 ! 2017340 <_Objects_Information_table> 20070b8: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20070bc: 80 a0 a0 00 cmp %g2, 0 20070c0: 02 80 00 0b be 20070ec <_Objects_Get_information+0x84> <== NEVER TAKEN 20070c4: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20070c8: 83 2e 60 02 sll %i1, 2, %g1 20070cc: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 20070d0: 80 a6 20 00 cmp %i0, 0 20070d4: 02 80 00 06 be 20070ec <_Objects_Get_information+0x84> <== NEVER TAKEN 20070d8: 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 ) 20070dc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20070e0: 80 a0 60 00 cmp %g1, 0 20070e4: 22 80 00 02 be,a 20070ec <_Objects_Get_information+0x84> 20070e8: b0 10 20 00 clr %i0 return NULL; #endif return info; } 20070ec: 81 c7 e0 08 ret 20070f0: 81 e8 00 00 restore =============================================================================== 020070f4 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 20070f4: 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; 20070f8: 03 00 00 3f sethi %hi(0xfc00), %g1 20070fc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 2007100: 7f ff eb 39 call 2001de4 2007104: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 2007108: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200710c: 80 a6 40 01 cmp %i1, %g1 2007110: 18 80 00 0b bgu 200713c <_Objects_Get_isr_disable+0x48> 2007114: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 2007118: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 200711c: f0 00 80 01 ld [ %g2 + %g1 ], %i0 2007120: 80 a6 20 00 cmp %i0, 0 2007124: 02 80 00 0c be 2007154 <_Objects_Get_isr_disable+0x60> <== NEVER TAKEN 2007128: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 200712c: 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; 2007130: c0 26 80 00 clr [ %i2 ] 2007134: 81 c7 e0 08 ret 2007138: 81 e8 00 00 restore } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 200713c: 7f ff eb 2e call 2001df4 2007140: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 2007144: 82 10 20 01 mov 1, %g1 2007148: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 200714c: 81 c7 e0 08 ret 2007150: 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 ); 2007154: 7f ff eb 28 call 2001df4 <== NOT EXECUTED 2007158: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 200715c: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 2007160: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 2007164: 81 c7 e0 08 ret <== NOT EXECUTED 2007168: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020089e4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 20089e4: 9d e3 bf 88 save %sp, -120, %sp 20089e8: 90 10 00 18 mov %i0, %o0 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 20089ec: 80 a6 60 00 cmp %i1, 0 20089f0: 12 80 00 04 bne 2008a00 <_Objects_Get_name_as_string+0x1c> 20089f4: b0 10 00 1a mov %i2, %i0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 20089f8: 81 c7 e0 08 ret 20089fc: 91 e8 20 00 restore %g0, 0, %o0 Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 2008a00: 80 a6 a0 00 cmp %i2, 0 2008a04: 02 80 00 38 be 2008ae4 <_Objects_Get_name_as_string+0x100> 2008a08: b4 92 20 00 orcc %o0, 0, %i2 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2008a0c: 12 80 00 04 bne 2008a1c <_Objects_Get_name_as_string+0x38> 2008a10: 03 00 80 8e sethi %hi(0x2023800), %g1 2008a14: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 2023914 <_Thread_Executing> 2008a18: f4 00 a0 08 ld [ %g2 + 8 ], %i2 information = _Objects_Get_information_id( tmpId ); 2008a1c: 7f ff ff aa call 20088c4 <_Objects_Get_information_id> 2008a20: 90 10 00 1a mov %i2, %o0 if ( !information ) 2008a24: a0 92 20 00 orcc %o0, 0, %l0 2008a28: 22 80 00 2f be,a 2008ae4 <_Objects_Get_name_as_string+0x100> 2008a2c: b0 10 20 00 clr %i0 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 2008a30: 92 10 00 1a mov %i2, %o1 2008a34: 40 00 00 38 call 2008b14 <_Objects_Get> 2008a38: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 2008a3c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2008a40: 80 a0 60 00 cmp %g1, 0 2008a44: 32 80 00 28 bne,a 2008ae4 <_Objects_Get_name_as_string+0x100> 2008a48: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 2008a4c: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1 2008a50: 80 a0 60 00 cmp %g1, 0 2008a54: 22 80 00 26 be,a 2008aec <_Objects_Get_name_as_string+0x108> 2008a58: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name.name_p; 2008a5c: d0 02 20 0c ld [ %o0 + 0xc ], %o0 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 2008a60: 80 a2 20 00 cmp %o0, 0 2008a64: 02 80 00 1e be 2008adc <_Objects_Get_name_as_string+0xf8> <== NEVER TAKEN 2008a68: 98 10 00 18 mov %i0, %o4 for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2008a6c: 96 86 7f ff addcc %i1, -1, %o3 2008a70: 02 80 00 1b be 2008adc <_Objects_Get_name_as_string+0xf8> <== NEVER TAKEN 2008a74: 98 10 00 18 mov %i0, %o4 2008a78: da 0a 00 00 ldub [ %o0 ], %o5 2008a7c: 85 2b 60 18 sll %o5, 0x18, %g2 2008a80: 80 a0 a0 00 cmp %g2, 0 2008a84: 02 80 00 16 be 2008adc <_Objects_Get_name_as_string+0xf8> 2008a88: 03 00 80 6c sethi %hi(0x201b000), %g1 2008a8c: 98 10 00 18 mov %i0, %o4 2008a90: 94 10 62 08 or %g1, 0x208, %o2 2008a94: 10 80 00 07 b 2008ab0 <_Objects_Get_name_as_string+0xcc> 2008a98: 88 10 20 00 clr %g4 2008a9c: da 0a 00 04 ldub [ %o0 + %g4 ], %o5 2008aa0: 85 2b 60 18 sll %o5, 0x18, %g2 2008aa4: 80 a0 a0 00 cmp %g2, 0 2008aa8: 02 80 00 0d be 2008adc <_Objects_Get_name_as_string+0xf8> 2008aac: 01 00 00 00 nop *d = (isprint(*s)) ? *s : '*'; 2008ab0: c2 02 80 00 ld [ %o2 ], %g1 2008ab4: 85 38 a0 18 sra %g2, 0x18, %g2 2008ab8: c6 48 40 02 ldsb [ %g1 + %g2 ], %g3 2008abc: 80 88 e0 97 btst 0x97, %g3 2008ac0: 12 80 00 03 bne 2008acc <_Objects_Get_name_as_string+0xe8> 2008ac4: 88 01 20 01 inc %g4 2008ac8: 9a 10 20 2a mov 0x2a, %o5 2008acc: da 2b 00 00 stb %o5, [ %o4 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2008ad0: 80 a1 00 0b cmp %g4, %o3 2008ad4: 0a bf ff f2 bcs 2008a9c <_Objects_Get_name_as_string+0xb8> 2008ad8: 98 03 20 01 inc %o4 *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 2008adc: 40 00 02 63 call 2009468 <_Thread_Enable_dispatch> 2008ae0: c0 2b 00 00 clrb [ %o4 ] 2008ae4: 81 c7 e0 08 ret 2008ae8: 81 e8 00 00 restore lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 2008aec: c0 2f bf ec clrb [ %fp + -20 ] if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 2008af0: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; 2008af4: 87 30 60 10 srl %g1, 0x10, %g3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 2008af8: c2 2f bf eb stb %g1, [ %fp + -21 ] if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 2008afc: c4 2f bf e8 stb %g2, [ %fp + -24 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 2008b00: 83 30 60 08 srl %g1, 8, %g1 s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 2008b04: c6 2f bf e9 stb %g3, [ %fp + -23 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 2008b08: c2 2f bf ea stb %g1, [ %fp + -22 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 2008b0c: 10 bf ff d8 b 2008a6c <_Objects_Get_name_as_string+0x88> 2008b10: 90 07 bf e8 add %fp, -24, %o0 =============================================================================== 02014218 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 2014218: c2 02 20 08 ld [ %o0 + 8 ], %g1 if ( information->maximum >= index ) { 201421c: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 2014220: 92 22 40 01 sub %o1, %g1, %o1 2014224: 82 02 60 01 add %o1, 1, %g1 if ( information->maximum >= index ) { 2014228: 80 a0 40 02 cmp %g1, %g2 201422c: 18 80 00 09 bgu 2014250 <_Objects_Get_no_protection+0x38> 2014230: 83 28 60 02 sll %g1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 2014234: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 2014238: d0 00 80 01 ld [ %g2 + %g1 ], %o0 201423c: 80 a2 20 00 cmp %o0, 0 2014240: 02 80 00 05 be 2014254 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 2014244: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; 2014248: 81 c3 e0 08 retl 201424c: c0 22 80 00 clr [ %o2 ] /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 2014250: 82 10 20 01 mov 1, %g1 2014254: 90 10 20 00 clr %o0 return NULL; } 2014258: 81 c3 e0 08 retl 201425c: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 0200846c <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200846c: 9d e3 bf 90 save %sp, -112, %sp 2008470: 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 ) 2008474: 80 a6 60 00 cmp %i1, 0 2008478: 02 80 00 24 be 2008508 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN 200847c: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2008480: 80 a2 60 00 cmp %o1, 0 2008484: 02 80 00 26 be 200851c <_Objects_Id_to_name+0xb0> 2008488: 03 00 80 6d sethi %hi(0x201b400), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 200848c: 83 32 60 18 srl %o1, 0x18, %g1 2008490: 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 ) 2008494: 84 00 7f ff add %g1, -1, %g2 2008498: 80 a0 a0 03 cmp %g2, 3 200849c: 38 80 00 1b bgu,a 2008508 <_Objects_Id_to_name+0x9c> 20084a0: 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 ] ) 20084a4: 85 28 60 02 sll %g1, 2, %g2 20084a8: 03 00 80 6c sethi %hi(0x201b000), %g1 20084ac: 82 10 63 80 or %g1, 0x380, %g1 ! 201b380 <_Objects_Information_table> 20084b0: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20084b4: 80 a0 a0 00 cmp %g2, 0 20084b8: 02 80 00 16 be 2008510 <_Objects_Id_to_name+0xa4> <== NEVER TAKEN 20084bc: 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 ]; 20084c0: 83 28 60 02 sll %g1, 2, %g1 20084c4: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 20084c8: 80 a2 20 00 cmp %o0, 0 20084cc: 02 80 00 0f be 2008508 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN 20084d0: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 20084d4: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 20084d8: 80 a0 60 00 cmp %g1, 0 20084dc: 12 80 00 0e bne 2008514 <_Objects_Id_to_name+0xa8> <== NEVER TAKEN 20084e0: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 20084e4: 7f ff ff c5 call 20083f8 <_Objects_Get> 20084e8: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 20084ec: 80 a2 20 00 cmp %o0, 0 20084f0: 22 80 00 06 be,a 2008508 <_Objects_Id_to_name+0x9c> 20084f4: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 20084f8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 20084fc: b0 10 20 00 clr %i0 2008500: 40 00 02 77 call 2008edc <_Thread_Enable_dispatch> 2008504: c2 26 40 00 st %g1, [ %i1 ] 2008508: 81 c7 e0 08 ret 200850c: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008510: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 2008514: 81 c7 e0 08 ret <== NOT EXECUTED 2008518: 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; 200851c: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 2008520: 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); 2008524: 83 32 60 18 srl %o1, 0x18, %g1 2008528: 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 ) 200852c: 84 00 7f ff add %g1, -1, %g2 2008530: 80 a0 a0 03 cmp %g2, 3 2008534: 38 bf ff f5 bgu,a 2008508 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN 2008538: 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 ] ) 200853c: 10 bf ff db b 20084a8 <_Objects_Id_to_name+0x3c> 2008540: 85 28 60 02 sll %g1, 2, %g2 =============================================================================== 020071e0 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 20071e0: 9d e3 bf 98 save %sp, -104, %sp /* * Set the entry in the object information table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 20071e4: 03 00 80 5c sethi %hi(0x2017000), %g1 20071e8: 85 2e 60 02 sll %i1, 2, %g2 20071ec: 82 10 63 40 or %g1, 0x340, %g1 20071f0: c8 00 40 02 ld [ %g1 + %g2 ], %g4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 20071f4: de 07 a0 5c ld [ %fp + 0x5c ], %o7 /* * Are we operating in unlimited, or auto-extend mode */ information->auto_extend = 20071f8: 83 36 e0 1f srl %i3, 0x1f, %g1 (maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE; maximum &= ~OBJECTS_UNLIMITED_OBJECTS; 20071fc: 05 20 00 00 sethi %hi(0x80000000), %g2 /* * Set the size of the object */ information->size = size; 2007200: b9 2f 20 10 sll %i4, 0x10, %i4 2007204: b9 37 20 10 srl %i4, 0x10, %i4 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->is_string = is_string; 2007208: fa 2e 20 38 stb %i5, [ %i0 + 0x38 ] */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 200720c: 87 2e 60 18 sll %i1, 0x18, %g3 2007210: bb 2e a0 1b sll %i2, 0x1b, %i5 /* * Set the size of the object */ information->size = size; 2007214: f8 26 20 18 st %i4, [ %i0 + 0x18 ] #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 2007218: f4 36 20 04 sth %i2, [ %i0 + 4 ] * Are we operating in unlimited, or auto-extend mode */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE; maximum &= ~OBJECTS_UNLIMITED_OBJECTS; 200721c: b8 2e c0 02 andn %i3, %g2, %i4 /* * Set the entry in the object information table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 2007220: b5 2e a0 02 sll %i2, 2, %i2 */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 2007224: 80 a0 00 1c cmp %g0, %i4 /* * Set the entry in the object information table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 2007228: f0 21 00 1a st %i0, [ %g4 + %i2 ] /* * Are we operating in unlimited, or auto-extend mode */ information->auto_extend = 200722c: c2 2e 20 12 stb %g1, [ %i0 + 0x12 ] */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 2007230: 88 40 20 00 addx %g0, 0, %g4 /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 2007234: 03 00 80 5c sethi %hi(0x2017000), %g1 */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 2007238: 05 00 00 40 sethi %hi(0x10000), %g2 /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 200723c: 82 10 60 b8 or %g1, 0xb8, %g1 */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 2007240: 86 10 c0 02 or %g3, %g2, %g3 /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 2007244: c2 26 20 1c st %g1, [ %i0 + 0x1c ] */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 2007248: 86 10 c0 1d or %g3, %i5, %g3 uint32_t name_length; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 200724c: f2 26 00 00 st %i1, [ %i0 ] */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 2007250: 86 10 c0 04 or %g3, %g4, %g3 information->the_api = the_api; information->the_class = the_class; information->is_string = is_string; information->local_table = 0; information->inactive_per_block = 0; 2007254: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 2007258: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 200725c: c0 36 20 2c clrh [ %i0 + 0x2c ] /* * The allocation unit is the maximum value */ information->allocation_size = maximum; 2007260: f8 26 20 14 st %i4, [ %i0 + 0x14 ] */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 2007264: c6 26 20 08 st %g3, [ %i0 + 8 ] */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 2007268: 82 03 e0 04 add %o7, 4, %g1 * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 200726c: 80 8b e0 03 btst 3, %o7 2007270: 12 80 00 03 bne 200727c <_Objects_Initialize_information+0x9c><== NEVER TAKEN 2007274: 82 08 7f fc and %g1, -4, %g1 2007278: 82 10 00 0f mov %o7, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 200727c: c2 36 20 3a sth %g1, [ %i0 + 0x3a ] Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2007280: 84 06 20 20 add %i0, 0x20, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2007284: 82 06 20 24 add %i0, 0x24, %g1 the_chain->permanent_null = NULL; 2007288: c0 26 20 24 clr [ %i0 + 0x24 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200728c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] /* * Initialize objects .. if there are any */ if ( maximum ) { 2007290: 80 a7 20 00 cmp %i4, 0 2007294: 12 80 00 04 bne 20072a4 <_Objects_Initialize_information+0xc4> 2007298: c4 26 20 28 st %g2, [ %i0 + 0x28 ] 200729c: 81 c7 e0 08 ret 20072a0: 81 e8 00 00 restore /* * Reset the maximum value. It will be updated when the information is * extended. */ information->maximum = 0; 20072a4: c0 36 20 10 clrh [ %i0 + 0x10 ] * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 20072a8: 7f ff fe 80 call 2006ca8 <_Objects_Extend_information> 20072ac: 81 e8 00 00 restore =============================================================================== 020072ec <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 20072ec: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 20072f0: 80 a2 e0 00 cmp %o3, 0 20072f4: 02 80 00 20 be 2007374 <_Objects_Name_to_id_u32+0x88> 20072f8: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 20072fc: 80 a2 60 00 cmp %o1, 0 2007300: 22 80 00 1d be,a 2007374 <_Objects_Name_to_id_u32+0x88> 2007304: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2007308: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 200730c: 85 28 60 10 sll %g1, 0x10, %g2 2007310: 80 a0 a0 00 cmp %g2, 0 2007314: 22 80 00 18 be,a 2007374 <_Objects_Name_to_id_u32+0x88> <== NEVER TAKEN 2007318: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 200731c: 80 a2 a0 00 cmp %o2, 0 2007320: 12 80 00 17 bne 200737c <_Objects_Name_to_id_u32+0x90> 2007324: 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++ ) { 2007328: 89 30 a0 10 srl %g2, 0x10, %g4 200732c: 80 a1 20 00 cmp %g4, 0 2007330: 02 80 00 11 be 2007374 <_Objects_Name_to_id_u32+0x88> <== NEVER TAKEN 2007334: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2007338: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 200733c: 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 ]; 2007340: 83 28 e0 02 sll %g3, 2, %g1 2007344: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 2007348: 80 a0 a0 00 cmp %g2, 0 200734c: 02 80 00 06 be 2007364 <_Objects_Name_to_id_u32+0x78> 2007350: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 2007354: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2007358: 80 a0 40 09 cmp %g1, %o1 200735c: 22 80 00 0f be,a 2007398 <_Objects_Name_to_id_u32+0xac> 2007360: 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++ ) { 2007364: 80 a0 c0 04 cmp %g3, %g4 2007368: 08 bf ff f7 bleu 2007344 <_Objects_Name_to_id_u32+0x58> 200736c: 83 28 e0 02 sll %g3, 2, %g1 2007370: 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 } 2007374: 81 c3 e0 08 retl 2007378: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 200737c: 82 10 63 ff or %g1, 0x3ff, %g1 2007380: 80 a2 80 01 cmp %o2, %g1 2007384: 02 bf ff e9 be 2007328 <_Objects_Name_to_id_u32+0x3c> 2007388: 80 a2 a0 01 cmp %o2, 1 200738c: 02 bf ff e7 be 2007328 <_Objects_Name_to_id_u32+0x3c> 2007390: 90 10 20 01 mov 1, %o0 2007394: 30 bf ff f8 b,a 2007374 <_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; 2007398: 90 10 20 00 clr %o0 200739c: 81 c3 e0 08 retl 20073a0: c2 22 c0 00 st %g1, [ %o3 ] =============================================================================== 020072b4 <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 20072b4: 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 ) 20072b8: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 20072bc: 80 a0 60 00 cmp %g1, 0 20072c0: 22 80 00 09 be,a 20072e4 <_Objects_Namespace_remove+0x30><== ALWAYS TAKEN 20072c4: c0 26 60 0c clr [ %i1 + 0xc ] 20072c8: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 20072cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20072d0: 22 80 00 05 be,a 20072e4 <_Objects_Namespace_remove+0x30><== NOT EXECUTED 20072d4: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 20072d8: 40 00 07 aa call 2009180 <_Workspace_Free> <== NOT EXECUTED 20072dc: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 20072e0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 20072e4: 81 c7 e0 08 ret 20072e8: 81 e8 00 00 restore =============================================================================== 02008fe4 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 2008fe4: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 2008fe8: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 2008fec: 40 00 1e 74 call 20109bc 2008ff0: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 2008ff4: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2008ff8: 80 a0 60 00 cmp %g1, 0 2008ffc: 12 80 00 21 bne 2009080 <_Objects_Set_name+0x9c> <== NEVER TAKEN 2009000: 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( 2009004: 03 08 08 08 sethi %hi(0x20202000), %g1 2009008: 80 a4 20 00 cmp %l0, 0 200900c: 02 80 00 19 be 2009070 <_Objects_Set_name+0x8c> <== NEVER TAKEN 2009010: 82 10 60 20 or %g1, 0x20, %g1 2009014: c4 4e 80 00 ldsb [ %i2 ], %g2 2009018: 03 00 08 08 sethi %hi(0x202000), %g1 200901c: 87 28 a0 18 sll %g2, 0x18, %g3 2009020: 82 10 60 20 or %g1, 0x20, %g1 2009024: 80 a4 20 01 cmp %l0, 1 2009028: 02 80 00 12 be 2009070 <_Objects_Set_name+0x8c> 200902c: 82 10 c0 01 or %g3, %g1, %g1 2009030: c4 4e a0 01 ldsb [ %i2 + 1 ], %g2 2009034: 03 00 00 08 sethi %hi(0x2000), %g1 2009038: 85 28 a0 10 sll %g2, 0x10, %g2 200903c: 82 10 60 20 or %g1, 0x20, %g1 2009040: 84 10 80 03 or %g2, %g3, %g2 2009044: 80 a4 20 02 cmp %l0, 2 2009048: 02 80 00 0a be 2009070 <_Objects_Set_name+0x8c> 200904c: 82 10 80 01 or %g2, %g1, %g1 2009050: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 2009054: 80 a4 20 03 cmp %l0, 3 2009058: 83 28 60 08 sll %g1, 8, %g1 200905c: 84 10 80 01 or %g2, %g1, %g2 2009060: 02 80 00 04 be 2009070 <_Objects_Set_name+0x8c> 2009064: 82 10 a0 20 or %g2, 0x20, %g1 2009068: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 200906c: 82 10 80 01 or %g2, %g1, %g1 2009070: c2 26 60 0c st %g1, [ %i1 + 0xc ] 2009074: b0 10 20 01 mov 1, %i0 ); } return TRUE; } 2009078: 81 c7 e0 08 ret 200907c: 81 e8 00 00 restore length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 2009080: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2009084: 40 00 07 90 call 200aec4 <_Workspace_Allocate> <== NOT EXECUTED 2009088: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 200908c: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 2009090: 02 bf ff fa be 2009078 <_Objects_Set_name+0x94> <== NOT EXECUTED 2009094: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 2009098: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 200909c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20090a0: 02 80 00 06 be 20090b8 <_Objects_Set_name+0xd4> <== NOT EXECUTED 20090a4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 20090a8: 40 00 07 80 call 200aea8 <_Workspace_Free> <== NOT EXECUTED 20090ac: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 20090b0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 20090b4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20090b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20090bc: 40 00 1e 06 call 20108d4 <== NOT EXECUTED 20090c0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 20090c4: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 20090c8: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 20090cc: 81 c7 e0 08 ret <== NOT EXECUTED 20090d0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED =============================================================================== 020073ac <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 20073ac: 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; 20073b0: 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; 20073b4: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 20073b8: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 20073bc: 03 00 00 3f sethi %hi(0xfc00), %g1 20073c0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20073c4: 92 10 00 10 mov %l0, %o1 20073c8: a4 08 80 01 and %g2, %g1, %l2 20073cc: 40 00 31 69 call 2013970 <.udiv> 20073d0: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 20073d4: 80 a2 20 00 cmp %o0, 0 20073d8: 02 80 00 12 be 2007420 <_Objects_Shrink_information+0x74> <== NEVER TAKEN 20073dc: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 20073e0: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 20073e4: c2 00 c0 00 ld [ %g3 ], %g1 20073e8: 80 a4 00 01 cmp %l0, %g1 20073ec: 12 80 00 09 bne 2007410 <_Objects_Shrink_information+0x64><== ALWAYS TAKEN 20073f0: a2 10 20 04 mov 4, %l1 20073f4: 10 80 00 0d b 2007428 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 20073f8: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 20073fc: 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 ) { 2007400: 80 a4 00 01 cmp %l0, %g1 2007404: 02 80 00 09 be 2007428 <_Objects_Shrink_information+0x7c> 2007408: 82 04 60 04 add %l1, 4, %g1 200740c: 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++ ) { 2007410: 84 00 a0 01 inc %g2 2007414: 80 a2 00 02 cmp %o0, %g2 2007418: 38 bf ff f9 bgu,a 20073fc <_Objects_Shrink_information+0x50> 200741c: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 2007420: 81 c7 e0 08 ret 2007424: 81 e8 00 00 restore 2007428: 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; 200742c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2007430: 10 80 00 0f b 200746c <_Objects_Shrink_information+0xc0> 2007434: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 2007438: 82 04 80 01 add %l2, %g1, %g1 200743c: 80 a0 40 03 cmp %g1, %g3 2007440: 08 80 00 10 bleu 2007480 <_Objects_Shrink_information+0xd4> 2007444: 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 ); 2007448: 40 00 10 e2 call 200b7d0 <_Chain_Extract> 200744c: 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 ) ); 2007450: 80 a4 20 00 cmp %l0, 0 2007454: 22 80 00 10 be,a 2007494 <_Objects_Shrink_information+0xe8><== NEVER TAKEN 2007458: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 200745c: c2 04 00 00 ld [ %l0 ], %g1 2007460: 80 a0 60 00 cmp %g1, 0 2007464: 02 80 00 0b be 2007490 <_Objects_Shrink_information+0xe4> 2007468: 84 10 00 10 mov %l0, %g2 200746c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007470: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 2007474: 80 a0 c0 12 cmp %g3, %l2 2007478: 3a bf ff f0 bcc,a 2007438 <_Objects_Shrink_information+0x8c> 200747c: 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; 2007480: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2007484: 80 a4 20 00 cmp %l0, 0 2007488: 32 bf ff f6 bne,a 2007460 <_Objects_Shrink_information+0xb4><== ALWAYS TAKEN 200748c: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2007490: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2007494: 40 00 07 3b call 2009180 <_Workspace_Free> 2007498: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 200749c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 20074a0: 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; 20074a4: 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; 20074a8: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 20074ac: 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; 20074b0: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 20074b4: 82 20 40 02 sub %g1, %g2, %g1 20074b8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 20074bc: 81 c7 e0 08 ret 20074c0: 81 e8 00 00 restore =============================================================================== 02009f5c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2009f5c: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 2009f60: 80 a6 20 00 cmp %i0, 0 2009f64: 02 80 00 10 be 2009fa4 <_Protected_heap_Get_information+0x48><== NEVER TAKEN 2009f68: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 2009f6c: 02 80 00 0e be 2009fa4 <_Protected_heap_Get_information+0x48><== NEVER TAKEN 2009f70: 23 00 80 74 sethi %hi(0x201d000), %l1 return false; _RTEMS_Lock_allocator(); 2009f74: 7f ff f9 22 call 20083fc <_API_Mutex_Lock> 2009f78: d0 04 60 dc ld [ %l1 + 0xdc ], %o0 ! 201d0dc <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 2009f7c: 90 10 00 18 mov %i0, %o0 2009f80: 40 00 11 a5 call 200e614 <_Heap_Get_information> 2009f84: 92 10 00 19 mov %i1, %o1 2009f88: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 2009f8c: 7f ff f9 32 call 2008454 <_API_Mutex_Unlock> 2009f90: d0 04 60 dc ld [ %l1 + 0xdc ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 2009f94: 80 a0 00 10 cmp %g0, %l0 2009f98: 82 60 3f ff subx %g0, -1, %g1 2009f9c: 81 c7 e0 08 ret 2009fa0: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 2009fa4: 81 c7 e0 08 ret <== NOT EXECUTED 2009fa8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 0200b650 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 200b650: 9d e3 bf 98 save %sp, -104, %sp /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 200b654: 21 00 80 5d sethi %hi(0x2017400), %l0 200b658: c6 04 20 7c ld [ %l0 + 0x7c ], %g3 ! 201747c <_Configuration_Table> to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) 200b65c: b0 10 20 00 clr %i0 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 200b660: c2 00 e0 40 ld [ %g3 + 0x40 ], %g1 200b664: c4 08 60 04 ldub [ %g1 + 4 ], %g2 200b668: 80 a0 00 02 cmp %g0, %g2 200b66c: 90 60 20 00 subx %g0, 0, %o0 200b670: 90 0a 20 40 and %o0, 0x40, %o0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 200b674: 7f ff f6 ca call 200919c <_Workspace_Allocate> 200b678: 90 02 20 20 add %o0, 0x20, %o0 if ( !api ) 200b67c: 80 a2 20 00 cmp %o0, 0 200b680: 02 80 00 17 be 200b6dc <_RTEMS_tasks_Create_extension+0x8c><== NEVER TAKEN 200b684: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = true; 200b688: 84 10 20 01 mov 1, %g2 api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 200b68c: c6 00 60 40 ld [ %g1 + 0x40 ], %g3 200b690: c4 2a 20 08 stb %g2, [ %o0 + 8 ] 200b694: c2 08 e0 04 ldub [ %g3 + 4 ], %g1 created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 200b698: c0 26 61 78 clr [ %i1 + 0x178 ] api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 200b69c: d0 26 61 68 st %o0, [ %i1 + 0x168 ] api->pending_events = EVENT_SETS_NONE_PENDING; 200b6a0: c0 22 00 00 clr [ %o0 ] information->handler = NULL; 200b6a4: c0 22 20 0c clr [ %o0 + 0xc ] information->mode_set = RTEMS_DEFAULT_MODES; 200b6a8: c0 22 20 10 clr [ %o0 + 0x10 ] information->signals_posted = 0; 200b6ac: c0 22 20 14 clr [ %o0 + 0x14 ] information->signals_pending = 0; 200b6b0: c0 22 20 18 clr [ %o0 + 0x18 ] _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 200b6b4: 80 a0 60 00 cmp %g1, 0 200b6b8: 02 80 00 08 be 200b6d8 <_RTEMS_tasks_Create_extension+0x88> 200b6bc: c0 22 20 1c clr [ %o0 + 0x1c ] 200b6c0: 84 10 20 00 clr %g2 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 200b6c4: 82 02 00 02 add %o0, %g2, %g1 200b6c8: 84 00 a0 04 add %g2, 4, %g2 api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 200b6cc: 80 a0 a0 40 cmp %g2, 0x40 200b6d0: 12 bf ff fd bne 200b6c4 <_RTEMS_tasks_Create_extension+0x74> 200b6d4: c0 20 60 20 clr [ %g1 + 0x20 ] 200b6d8: b0 10 20 01 mov 1, %i0 api->Notepads[i] = 0; } return true; } 200b6dc: 81 c7 e0 08 ret 200b6e0: 81 e8 00 00 restore =============================================================================== 02005c34 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 2005c34: 9d e3 bf 90 save %sp, -112, %sp rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 2005c38: 03 00 80 5d sethi %hi(0x2017400), %g1 2005c3c: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 ! 201747c <_Configuration_Table> 2005c40: c6 00 a0 40 ld [ %g2 + 0x40 ], %g3 /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 2005c44: d0 00 e0 2c ld [ %g3 + 0x2c ], %o0 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 2005c48: 80 a2 20 00 cmp %o0, 0 2005c4c: 02 80 00 1b be 2005cb8 <_RTEMS_tasks_Initialize_user_tasks_body+0x84><== NEVER TAKEN 2005c50: e4 00 e0 28 ld [ %g3 + 0x28 ], %l2 2005c54: 80 a4 a0 00 cmp %l2, 0 2005c58: 02 80 00 18 be 2005cb8 <_RTEMS_tasks_Initialize_user_tasks_body+0x84><== NEVER TAKEN 2005c5c: a0 10 00 08 mov %o0, %l0 return; 2005c60: a2 10 20 00 clr %l1 2005c64: a6 07 bf f4 add %fp, -12, %l3 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 2005c68: d0 04 00 00 ld [ %l0 ], %o0 2005c6c: d2 04 20 08 ld [ %l0 + 8 ], %o1 2005c70: d4 04 20 04 ld [ %l0 + 4 ], %o2 2005c74: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 2005c78: d8 04 20 0c ld [ %l0 + 0xc ], %o4 2005c7c: 7f ff ff 6c call 2005a2c 2005c80: 9a 10 00 13 mov %l3, %o5 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 2005c84: 80 a2 20 00 cmp %o0, 0 2005c88: 12 80 00 0f bne 2005cc4 <_RTEMS_tasks_Initialize_user_tasks_body+0x90> 2005c8c: 94 10 00 08 mov %o0, %o2 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 2005c90: d0 07 bf f4 ld [ %fp + -12 ], %o0 2005c94: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 2005c98: 40 00 00 0f call 2005cd4 2005c9c: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 2005ca0: 80 a2 20 00 cmp %o0, 0 2005ca4: 12 80 00 07 bne 2005cc0 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> 2005ca8: a2 04 60 01 inc %l1 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 2005cac: 80 a4 80 11 cmp %l2, %l1 2005cb0: 18 bf ff ee bgu 2005c68 <_RTEMS_tasks_Initialize_user_tasks_body+0x34><== NEVER TAKEN 2005cb4: a0 04 20 1c add %l0, 0x1c, %l0 2005cb8: 81 c7 e0 08 ret 2005cbc: 81 e8 00 00 restore user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 2005cc0: 94 10 00 08 mov %o0, %o2 2005cc4: 92 10 20 01 mov 1, %o1 2005cc8: 40 00 03 91 call 2006b0c <_Internal_error_Occurred> 2005ccc: 90 10 20 01 mov 1, %o0 =============================================================================== 0200b580 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200b580: 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 ]; 200b584: f0 06 21 68 ld [ %i0 + 0x168 ], %i0 if ( !api ) 200b588: 80 a6 20 00 cmp %i0, 0 200b58c: 02 80 00 1f be 200b608 <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN 200b590: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200b594: 7f ff da 14 call 2001de4 200b598: 01 00 00 00 nop signal_set = asr->signals_posted; 200b59c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 asr->signals_posted = 0; 200b5a0: c0 26 20 14 clr [ %i0 + 0x14 ] _ISR_Enable( level ); 200b5a4: 7f ff da 14 call 2001df4 200b5a8: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200b5ac: 80 a4 a0 00 cmp %l2, 0 200b5b0: 32 80 00 04 bne,a 200b5c0 <_RTEMS_tasks_Post_switch_extension+0x40><== ALWAYS TAKEN 200b5b4: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200b5b8: 81 c7 e0 08 ret <== NOT EXECUTED 200b5bc: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b5c0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200b5c4: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b5c8: a2 07 bf f4 add %fp, -12, %l1 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200b5cc: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b5d0: 94 10 00 11 mov %l1, %o2 200b5d4: 21 00 00 3f sethi %hi(0xfc00), %l0 200b5d8: 40 00 04 92 call 200c820 200b5dc: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200b5e0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200b5e4: 9f c0 40 00 call %g1 200b5e8: 90 10 00 12 mov %l2, %o0 asr->nest_level -= 1; 200b5ec: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b5f0: 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; 200b5f4: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b5f8: 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; 200b5fc: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b600: 40 00 04 88 call 200c820 200b604: 94 10 00 11 mov %l1, %o2 200b608: 81 c7 e0 08 ret 200b60c: 81 e8 00 00 restore =============================================================================== 0200b4a8 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 200b4a8: c8 02 21 78 ld [ %o0 + 0x178 ], %g4 while (tvp) { 200b4ac: 80 a1 20 00 cmp %g4, 0 200b4b0: 22 80 00 0b be,a 200b4dc <_RTEMS_tasks_Switch_extension+0x34> 200b4b4: d2 02 61 78 ld [ %o1 + 0x178 ], %o1 tvp->tval = *tvp->ptr; 200b4b8: c2 01 20 04 ld [ %g4 + 4 ], %g1 *tvp->ptr = tvp->gval; 200b4bc: c6 01 20 08 ld [ %g4 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 200b4c0: c4 00 40 00 ld [ %g1 ], %g2 200b4c4: c4 21 20 0c st %g2, [ %g4 + 0xc ] *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; 200b4c8: c8 01 00 00 ld [ %g4 ], %g4 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 200b4cc: 80 a1 20 00 cmp %g4, 0 200b4d0: 12 bf ff fa bne 200b4b8 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN 200b4d4: c6 20 40 00 st %g3, [ %g1 ] tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 200b4d8: d2 02 61 78 ld [ %o1 + 0x178 ], %o1 while (tvp) { 200b4dc: 80 a2 60 00 cmp %o1, 0 200b4e0: 02 80 00 0a be 200b508 <_RTEMS_tasks_Switch_extension+0x60> 200b4e4: 01 00 00 00 nop tvp->gval = *tvp->ptr; 200b4e8: c2 02 60 04 ld [ %o1 + 4 ], %g1 *tvp->ptr = tvp->tval; 200b4ec: c6 02 60 0c ld [ %o1 + 0xc ], %g3 tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; 200b4f0: c4 00 40 00 ld [ %g1 ], %g2 200b4f4: c4 22 60 08 st %g2, [ %o1 + 8 ] *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; 200b4f8: d2 02 40 00 ld [ %o1 ], %o1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 200b4fc: 80 a2 60 00 cmp %o1, 0 200b500: 12 bf ff fa bne 200b4e8 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN 200b504: c6 20 40 00 st %g3, [ %g1 ] 200b508: 81 c3 e0 08 retl =============================================================================== 02006ec0 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2006ec0: 9d e3 bf 90 save %sp, -112, %sp 2006ec4: 11 00 80 6f sethi %hi(0x201bc00), %o0 2006ec8: 92 10 00 18 mov %i0, %o1 2006ecc: 90 12 21 54 or %o0, 0x154, %o0 2006ed0: 40 00 07 f3 call 2008e9c <_Objects_Get> 2006ed4: 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 ) { 2006ed8: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006edc: 80 a0 60 00 cmp %g1, 0 2006ee0: 12 80 00 11 bne 2006f24 <_Rate_monotonic_Timeout+0x64> <== NEVER TAKEN 2006ee4: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2006ee8: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006eec: 03 00 00 10 sethi %hi(0x4000), %g1 2006ef0: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2006ef4: 80 88 80 01 btst %g2, %g1 2006ef8: 32 80 00 0d bne,a 2006f2c <_Rate_monotonic_Timeout+0x6c> 2006efc: 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 ) { 2006f00: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2006f04: 80 a0 60 01 cmp %g1, 1 2006f08: 02 80 00 12 be 2006f50 <_Rate_monotonic_Timeout+0x90> <== NEVER TAKEN 2006f0c: 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; 2006f10: 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; 2006f14: 05 00 80 6f sethi %hi(0x201bc00), %g2 2006f18: c2 00 a2 d0 ld [ %g2 + 0x2d0 ], %g1 ! 201bed0 <_Thread_Dispatch_disable_level> 2006f1c: 82 00 7f ff add %g1, -1, %g1 2006f20: c2 20 a2 d0 st %g1, [ %g2 + 0x2d0 ] 2006f24: 81 c7 e0 08 ret 2006f28: 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 ) && 2006f2c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006f30: 80 a0 80 01 cmp %g2, %g1 2006f34: 32 bf ff f4 bne,a 2006f04 <_Rate_monotonic_Timeout+0x44> <== NEVER TAKEN 2006f38: 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 ); 2006f3c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006f40: 40 00 09 41 call 2009444 <_Thread_Clear_state> 2006f44: 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 ); 2006f48: 10 80 00 05 b 2006f5c <_Rate_monotonic_Timeout+0x9c> 2006f4c: 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; 2006f50: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006f54: 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; 2006f58: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006f5c: 7f ff fe 2e call 2006814 <_Rate_monotonic_Initiate_statistics> 2006f60: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006f64: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006f68: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006f6c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006f70: 11 00 80 6f sethi %hi(0x201bc00), %o0 2006f74: 40 00 0f e8 call 200af14 <_Watchdog_Insert> 2006f78: 90 12 23 b4 or %o0, 0x3b4, %o0 ! 201bfb4 <_Watchdog_Ticks_chain> 2006f7c: 30 bf ff e6 b,a 2006f14 <_Rate_monotonic_Timeout+0x54> =============================================================================== 02006850 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 2006850: 9d e3 bf 90 save %sp, -112, %sp /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; tick.tv_sec = 0; /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2006854: 09 00 80 5d sethi %hi(0x2017400), %g4 2006858: c2 01 21 34 ld [ %g4 + 0x134 ], %g1 ! 2017534 <_Watchdog_Ticks_since_boot> { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 200685c: 05 00 80 5d sethi %hi(0x2017400), %g2 2006860: c6 00 a1 80 ld [ %g2 + 0x180 ], %g3 ! 2017580 <_TOD_Microseconds_per_tick> tick.tv_sec = 0; /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2006864: 82 00 60 01 inc %g1 { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 2006868: 85 28 e0 02 sll %g3, 2, %g2 tick.tv_sec = 0; /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 200686c: c2 21 21 34 st %g1, [ %g4 + 0x134 ] { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 2006870: 83 28 e0 07 sll %g3, 7, %g1 2006874: 82 20 40 02 sub %g1, %g2, %g1 2006878: 82 00 40 03 add %g1, %g3, %g1 200687c: 83 28 60 03 sll %g1, 3, %g1 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ (void) _Timespec_Add_to( &_TOD_Uptime, &tick ); 2006880: a0 07 bf f0 add %fp, -16, %l0 { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 2006884: c2 27 bf f4 st %g1, [ %fp + -12 ] /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ (void) _Timespec_Add_to( &_TOD_Uptime, &tick ); 2006888: 92 10 00 10 mov %l0, %o1 struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; tick.tv_sec = 0; 200688c: c0 27 bf f0 clr [ %fp + -16 ] /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ (void) _Timespec_Add_to( &_TOD_Uptime, &tick ); 2006890: 11 00 80 5d sethi %hi(0x2017400), %o0 2006894: 40 00 08 86 call 2008aac <_Timespec_Add_to> 2006898: 90 12 20 60 or %o0, 0x60, %o0 ! 2017460 <_TOD_Uptime> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timespec_Add_to( &_TOD_Now, &tick ); 200689c: 92 10 00 10 mov %l0, %o1 20068a0: 11 00 80 5d sethi %hi(0x2017400), %o0 20068a4: 40 00 08 82 call 2008aac <_Timespec_Add_to> 20068a8: 90 12 20 74 or %o0, 0x74, %o0 ! 2017474 <_TOD_Now> while ( seconds ) { 20068ac: a0 92 20 00 orcc %o0, 0, %l0 20068b0: 02 80 00 08 be 20068d0 <_TOD_Tickle_ticks+0x80> 20068b4: 03 00 80 5d sethi %hi(0x2017400), %g1 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 20068b8: a2 10 60 b8 or %g1, 0xb8, %l1 ! 20174b8 <_Watchdog_Seconds_chain> 20068bc: 40 00 0a 06 call 20090d4 <_Watchdog_Tickle> 20068c0: 90 10 00 11 mov %l1, %o0 20068c4: a0 84 3f ff addcc %l0, -1, %l0 20068c8: 12 bf ff fd bne 20068bc <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN 20068cc: 01 00 00 00 nop 20068d0: 81 c7 e0 08 ret 20068d4: 81 e8 00 00 restore =============================================================================== 02006494 <_TOD_Validate>: */ bool _TOD_Validate( rtems_time_of_day *the_tod ) { 2006494: 9d e3 bf 98 save %sp, -104, %sp uint32_t days_in_month; if ((!the_tod) || 2006498: 80 a6 20 00 cmp %i0, 0 200649c: 02 80 00 2f be 2006558 <_TOD_Validate+0xc4> <== NEVER TAKEN 20064a0: 03 00 80 8e sethi %hi(0x2023800), %g1 20064a4: d2 00 61 f0 ld [ %g1 + 0x1f0 ], %o1 ! 20239f0 <_TOD_Microseconds_per_tick> 20064a8: 11 00 03 d0 sethi %hi(0xf4000), %o0 20064ac: 40 00 43 16 call 2017104 <.udiv> 20064b0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 20064b4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20064b8: 80 a0 40 08 cmp %g1, %o0 20064bc: 1a 80 00 27 bcc 2006558 <_TOD_Validate+0xc4> 20064c0: 01 00 00 00 nop 20064c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20064c8: 80 a0 60 3b cmp %g1, 0x3b 20064cc: 18 80 00 23 bgu 2006558 <_TOD_Validate+0xc4> 20064d0: 01 00 00 00 nop 20064d4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20064d8: 80 a0 60 3b cmp %g1, 0x3b 20064dc: 18 80 00 1f bgu 2006558 <_TOD_Validate+0xc4> 20064e0: 01 00 00 00 nop 20064e4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20064e8: 80 a0 60 17 cmp %g1, 0x17 20064ec: 18 80 00 1b bgu 2006558 <_TOD_Validate+0xc4> 20064f0: 01 00 00 00 nop 20064f4: c4 06 20 04 ld [ %i0 + 4 ], %g2 20064f8: 80 a0 a0 00 cmp %g2, 0 20064fc: 02 80 00 17 be 2006558 <_TOD_Validate+0xc4> <== NEVER TAKEN 2006500: 80 a0 a0 0c cmp %g2, 0xc 2006504: 18 80 00 15 bgu 2006558 <_TOD_Validate+0xc4> 2006508: 01 00 00 00 nop 200650c: c2 06 00 00 ld [ %i0 ], %g1 2006510: 80 a0 67 c3 cmp %g1, 0x7c3 2006514: 08 80 00 11 bleu 2006558 <_TOD_Validate+0xc4> 2006518: 01 00 00 00 nop 200651c: f0 06 20 08 ld [ %i0 + 8 ], %i0 2006520: 80 a6 20 00 cmp %i0, 0 2006524: 02 80 00 0d be 2006558 <_TOD_Validate+0xc4> <== NEVER TAKEN 2006528: 80 88 60 03 btst 3, %g1 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 200652c: 32 80 00 0d bne,a 2006560 <_TOD_Validate+0xcc> 2006530: 85 28 a0 02 sll %g2, 2, %g2 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2006534: 84 00 a0 0d add %g2, 0xd, %g2 2006538: 03 00 80 65 sethi %hi(0x2019400), %g1 200653c: 85 28 a0 02 sll %g2, 2, %g2 2006540: 82 10 62 c8 or %g1, 0x2c8, %g1 2006544: c4 00 40 02 ld [ %g1 + %g2 ], %g2 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2006548: 80 a0 80 18 cmp %g2, %i0 200654c: 82 60 3f ff subx %g0, -1, %g1 2006550: 81 c7 e0 08 ret 2006554: 91 e8 00 01 restore %g0, %g1, %o0 if ( the_tod->day > days_in_month ) return false; return true; } 2006558: 81 c7 e0 08 ret 200655c: 91 e8 20 00 restore %g0, 0, %o0 return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2006560: 03 00 80 65 sethi %hi(0x2019400), %g1 2006564: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 20196c8 <_TOD_Days_per_month> 2006568: 10 bf ff f8 b 2006548 <_TOD_Validate+0xb4> 200656c: c4 00 40 02 ld [ %g1 + %g2 ], %g2 =============================================================================== 02007520 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007520: 9d e3 bf 98 save %sp, -104, %sp */ /* * Save original state */ original_state = the_thread->current_state; 2007524: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 2007528: 40 00 04 94 call 2008778 <_Thread_Set_transient> 200752c: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 2007530: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007534: a0 10 00 18 mov %i0, %l0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 2007538: 80 a0 40 19 cmp %g1, %i1 200753c: 02 80 00 04 be 200754c <_Thread_Change_priority+0x2c> 2007540: 92 10 00 19 mov %i1, %o1 _Thread_Set_priority( the_thread, new_priority ); 2007544: 40 00 04 11 call 2008588 <_Thread_Set_priority> 2007548: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200754c: 7f ff ea 26 call 2001de4 2007550: 01 00 00 00 nop 2007554: b0 10 00 08 mov %o0, %i0 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 2007558: f2 04 20 10 ld [ %l0 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 200755c: 80 a6 60 04 cmp %i1, 4 2007560: 02 80 00 10 be 20075a0 <_Thread_Change_priority+0x80> 2007564: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2007568: 12 80 00 03 bne 2007574 <_Thread_Change_priority+0x54> <== NEVER TAKEN 200756c: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2007570: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 2007574: 7f ff ea 20 call 2001df4 2007578: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 200757c: 03 00 00 ef sethi %hi(0x3bc00), %g1 2007580: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2007584: 80 8e 40 01 btst %i1, %g1 2007588: 32 80 00 04 bne,a 2007598 <_Thread_Change_priority+0x78> 200758c: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 2007590: 81 c7 e0 08 ret 2007594: 81 e8 00 00 restore _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2007598: 40 00 03 cc call 20084c8 <_Thread_queue_Requeue> 200759c: 93 e8 00 10 restore %g0, %l0, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 20075a0: 12 80 00 14 bne 20075f0 <_Thread_Change_priority+0xd0> <== NEVER TAKEN 20075a4: 23 00 80 5d sethi %hi(0x2017400), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 20075a8: c6 04 20 90 ld [ %l0 + 0x90 ], %g3 20075ac: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 20075b0: c2 10 c0 00 lduh [ %g3 ], %g1 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 20075b4: c0 24 20 10 clr [ %l0 + 0x10 ] 20075b8: 82 10 40 02 or %g1, %g2, %g1 20075bc: c2 30 c0 00 sth %g1, [ %g3 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 20075c0: c4 14 60 98 lduh [ %l1 + 0x98 ], %g2 20075c4: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 20075c8: 80 8e a0 ff btst 0xff, %i2 20075cc: 84 10 80 01 or %g2, %g1, %g2 20075d0: c4 34 60 98 sth %g2, [ %l1 + 0x98 ] 20075d4: 02 80 00 49 be 20076f8 <_Thread_Change_priority+0x1d8> 20075d8: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 20075dc: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 20075e0: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 20075e4: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 20075e8: e0 20 a0 04 st %l0, [ %g2 + 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; 20075ec: c4 24 00 00 st %g2, [ %l0 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 20075f0: 7f ff ea 01 call 2001df4 20075f4: 90 10 00 18 mov %i0, %o0 20075f8: 7f ff e9 fb call 2001de4 20075fc: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 2007600: c2 14 60 98 lduh [ %l1 + 0x98 ], %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007604: 05 00 80 5c sethi %hi(0x2017000), %g2 2007608: 83 28 60 10 sll %g1, 0x10, %g1 200760c: 87 30 60 10 srl %g1, 0x10, %g3 2007610: 80 a0 e0 ff cmp %g3, 0xff 2007614: 08 80 00 28 bleu 20076b4 <_Thread_Change_priority+0x194> 2007618: d8 00 a3 34 ld [ %g2 + 0x334 ], %o4 200761c: 05 00 80 56 sethi %hi(0x2015800), %g2 2007620: 83 30 60 18 srl %g1, 0x18, %g1 2007624: 88 10 a0 e0 or %g2, 0xe0, %g4 2007628: c2 09 00 01 ldub [ %g4 + %g1 ], %g1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 200762c: 05 00 80 5d sethi %hi(0x2017400), %g2 2007630: 9b 28 60 10 sll %g1, 0x10, %o5 2007634: 84 10 a1 10 or %g2, 0x110, %g2 2007638: 83 33 60 0f srl %o5, 0xf, %g1 200763c: c6 10 80 01 lduh [ %g2 + %g1 ], %g3 2007640: 83 28 e0 10 sll %g3, 0x10, %g1 2007644: 85 30 60 10 srl %g1, 0x10, %g2 2007648: 80 a0 a0 ff cmp %g2, 0xff 200764c: 18 80 00 29 bgu 20076f0 <_Thread_Change_priority+0x1d0> 2007650: 83 30 60 18 srl %g1, 0x18, %g1 2007654: c2 09 00 02 ldub [ %g4 + %g2 ], %g1 2007658: 82 00 60 08 add %g1, 8, %g1 200765c: 87 33 60 0c srl %o5, 0xc, %g3 2007660: 83 28 60 10 sll %g1, 0x10, %g1 2007664: 83 30 60 10 srl %g1, 0x10, %g1 2007668: 82 00 40 03 add %g1, %g3, %g1 200766c: 85 28 60 04 sll %g1, 4, %g2 2007670: 83 28 60 02 sll %g1, 2, %g1 2007674: 84 20 80 01 sub %g2, %g1, %g2 2007678: c6 03 00 02 ld [ %o4 + %g2 ], %g3 * is also the heir thread, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 200767c: 03 00 80 5d sethi %hi(0x2017400), %g1 2007680: c2 00 60 a4 ld [ %g1 + 0xa4 ], %g1 ! 20174a4 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007684: 05 00 80 5d sethi %hi(0x2017400), %g2 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 2007688: 80 a0 c0 01 cmp %g3, %g1 200768c: 02 80 00 08 be 20076ac <_Thread_Change_priority+0x18c> 2007690: c6 20 a0 70 st %g3, [ %g2 + 0x70 ] 2007694: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 2007698: 80 a0 60 00 cmp %g1, 0 200769c: 02 80 00 04 be 20076ac <_Thread_Change_priority+0x18c> 20076a0: 84 10 20 01 mov 1, %g2 _Thread_Executing->is_preemptible ) _Context_Switch_necessary = TRUE; 20076a4: 03 00 80 5d sethi %hi(0x2017400), %g1 20076a8: c4 28 60 b4 stb %g2, [ %g1 + 0xb4 ] ! 20174b4 <_Context_Switch_necessary> _ISR_Enable( level ); 20076ac: 7f ff e9 d2 call 2001df4 20076b0: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 20076b4: 05 00 80 56 sethi %hi(0x2015800), %g2 20076b8: 88 10 a0 e0 or %g2, 0xe0, %g4 ! 20158e0 <__log2table> 20076bc: c2 09 00 03 ldub [ %g4 + %g3 ], %g1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 20076c0: 05 00 80 5d sethi %hi(0x2017400), %g2 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 20076c4: 82 00 60 08 add %g1, 8, %g1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 20076c8: 84 10 a1 10 or %g2, 0x110, %g2 20076cc: 9b 28 60 10 sll %g1, 0x10, %o5 20076d0: 83 33 60 0f srl %o5, 0xf, %g1 20076d4: c6 10 80 01 lduh [ %g2 + %g1 ], %g3 20076d8: 83 28 e0 10 sll %g3, 0x10, %g1 20076dc: 85 30 60 10 srl %g1, 0x10, %g2 20076e0: 80 a0 a0 ff cmp %g2, 0xff 20076e4: 28 bf ff dd bleu,a 2007658 <_Thread_Change_priority+0x138> 20076e8: c2 09 00 02 ldub [ %g4 + %g2 ], %g1 20076ec: 83 30 60 18 srl %g1, 0x18, %g1 20076f0: 10 bf ff db b 200765c <_Thread_Change_priority+0x13c> 20076f4: c2 09 00 01 ldub [ %g4 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 20076f8: 84 00 60 04 add %g1, 4, %g2 20076fc: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 2007700: c6 00 60 08 ld [ %g1 + 8 ], %g3 the_chain->last = the_node; 2007704: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007708: c6 24 20 04 st %g3, [ %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; 200770c: 10 bf ff b9 b 20075f0 <_Thread_Change_priority+0xd0> 2007710: e0 20 c0 00 st %l0, [ %g3 ] =============================================================================== 02007714 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 2007714: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2007718: 7f ff e9 b3 call 2001de4 200771c: a0 10 00 19 mov %i1, %l0 2007720: a2 10 00 08 mov %o0, %l1 current_state = the_thread->current_state; 2007724: f2 06 20 10 ld [ %i0 + 0x10 ], %i1 if ( current_state & state ) { 2007728: 80 8c 00 19 btst %l0, %i1 200772c: 02 80 00 05 be 2007740 <_Thread_Clear_state+0x2c> 2007730: 82 2e 40 10 andn %i1, %l0, %g1 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 2007734: 80 a0 60 00 cmp %g1, 0 2007738: 02 80 00 04 be 2007748 <_Thread_Clear_state+0x34> 200773c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 2007740: 7f ff e9 ad call 2001df4 2007744: 91 e8 00 11 restore %g0, %l1, %o0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007748: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 200774c: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2007750: 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); 2007754: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 2007758: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 200775c: 1b 00 80 5d sethi %hi(0x2017400), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007760: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007764: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2007768: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 200776c: c2 26 00 00 st %g1, [ %i0 ] 2007770: c4 13 60 98 lduh [ %o5 + 0x98 ], %g2 old_last_node = the_chain->last; 2007774: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 2007778: f0 20 e0 08 st %i0, [ %g3 + 8 ] 200777c: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2007780: c8 26 20 04 st %g4, [ %i0 + 4 ] 2007784: c4 33 60 98 sth %g2, [ %o5 + 0x98 ] 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; 2007788: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 200778c: 7f ff e9 9a call 2001df4 2007790: 01 00 00 00 nop 2007794: 7f ff e9 94 call 2001de4 2007798: 01 00 00 00 nop * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 200779c: 09 00 80 5d sethi %hi(0x2017400), %g4 20077a0: c4 01 20 70 ld [ %g4 + 0x70 ], %g2 ! 2017470 <_Thread_Heir> 20077a4: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 20077a8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 20077ac: 80 a0 c0 01 cmp %g3, %g1 20077b0: 1a bf ff e4 bcc 2007740 <_Thread_Clear_state+0x2c> 20077b4: 03 00 80 5d sethi %hi(0x2017400), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 20077b8: c4 00 60 a4 ld [ %g1 + 0xa4 ], %g2 ! 20174a4 <_Thread_Executing> * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 20077bc: f0 21 20 70 st %i0, [ %g4 + 0x70 ] if ( _Thread_Executing->is_preemptible || 20077c0: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 20077c4: 80 a0 60 00 cmp %g1, 0 20077c8: 12 80 00 05 bne 20077dc <_Thread_Clear_state+0xc8> 20077cc: 84 10 20 01 mov 1, %g2 20077d0: 80 a0 e0 00 cmp %g3, 0 20077d4: 12 bf ff db bne 2007740 <_Thread_Clear_state+0x2c> <== ALWAYS TAKEN 20077d8: 01 00 00 00 nop the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 20077dc: 03 00 80 5d sethi %hi(0x2017400), %g1 20077e0: c4 28 60 b4 stb %g2, [ %g1 + 0xb4 ] ! 20174b4 <_Context_Switch_necessary> 20077e4: 30 bf ff d7 b,a 2007740 <_Thread_Clear_state+0x2c> =============================================================================== 020078d0 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 20078d0: 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 ); 20078d4: 35 00 80 5d sethi %hi(0x2017400), %i2 20078d8: 7f ff fc bd call 2006bcc <_Objects_Allocate> 20078dc: 90 16 a1 40 or %i2, 0x140, %o0 ! 2017540 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20078e0: 37 00 80 5c sethi %hi(0x2017000), %i3 20078e4: c2 06 e3 e0 ld [ %i3 + 0x3e0 ], %g1 ! 20173e0 <_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(); 20078e8: 39 00 80 5d sethi %hi(0x2017400), %i4 20078ec: 82 00 60 01 inc %g1 20078f0: d0 27 21 8c st %o0, [ %i4 + 0x18c ] 20078f4: c2 26 e3 e0 st %g1, [ %i3 + 0x3e0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 20078f8: 33 00 80 5d sethi %hi(0x2017400), %i1 20078fc: c2 06 60 7c ld [ %i1 + 0x7c ], %g1 ! 201747c <_Configuration_Table> 2007900: 05 00 80 59 sethi %hi(0x2016400), %g2 2007904: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 2007908: d6 00 a2 30 ld [ %g2 + 0x230 ], %o3 200790c: 03 00 80 56 sethi %hi(0x2015800), %g1 2007910: 82 10 62 48 or %g1, 0x248, %g1 ! 2015a48 <_Status_Object_name_errors_to_status+0x18> 2007914: c2 27 bf f4 st %g1, [ %fp + -12 ] 2007918: 80 a2 c0 03 cmp %o3, %g3 200791c: 1a 80 00 03 bcc 2007928 <_Thread_Create_idle+0x58> <== ALWAYS TAKEN 2007920: d2 07 21 8c ld [ %i4 + 0x18c ], %o1 2007924: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 2007928: 03 00 80 59 sethi %hi(0x2016400), %g1 200792c: da 08 62 34 ldub [ %g1 + 0x234 ], %o5 ! 2016634 2007930: 84 07 bf f4 add %fp, -12, %g2 2007934: 82 10 20 01 mov 1, %g1 2007938: c0 23 a0 60 clr [ %sp + 0x60 ] 200793c: c0 23 a0 64 clr [ %sp + 0x64 ] 2007940: c0 23 a0 68 clr [ %sp + 0x68 ] 2007944: 90 16 a1 40 or %i2, 0x140, %o0 2007948: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200794c: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 2007950: 94 10 20 00 clr %o2 2007954: 40 00 00 c3 call 2007c60 <_Thread_Initialize> 2007958: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 200795c: c4 06 60 7c ld [ %i1 + 0x7c ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2007960: c2 06 e3 e0 ld [ %i3 + 0x3e0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007964: c6 07 21 8c ld [ %i4 + 0x18c ], %g3 2007968: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 200796c: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 2007970: c2 26 e3 e0 st %g1, [ %i3 + 0x3e0 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007974: 05 00 80 5d sethi %hi(0x2017400), %g2 2007978: 03 00 80 5d sethi %hi(0x2017400), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 200797c: 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 = 2007980: c6 20 a0 a4 st %g3, [ %g2 + 0xa4 ] 2007984: c6 20 60 70 st %g3, [ %g1 + 0x70 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 2007988: b2 10 20 00 clr %i1 200798c: b6 10 20 00 clr %i3 2007990: 40 00 03 e0 call 2008910 <_Thread_Start> 2007994: 99 e8 20 00 restore %g0, 0, %o4 =============================================================================== 0200799c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 200799c: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 20079a0: 90 10 00 18 mov %i0, %o0 20079a4: 40 00 00 83 call 2007bb0 <_Thread_Get> 20079a8: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20079ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 20079b0: 80 a0 60 00 cmp %g1, 0 20079b4: 12 80 00 08 bne 20079d4 <_Thread_Delay_ended+0x38> <== NEVER TAKEN 20079b8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20079bc: 7f ff ff 56 call 2007714 <_Thread_Clear_state> 20079c0: 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; 20079c4: 05 00 80 5c sethi %hi(0x2017000), %g2 20079c8: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20173e0 <_Thread_Dispatch_disable_level> 20079cc: 82 00 7f ff add %g1, -1, %g1 20079d0: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] 20079d4: 81 c7 e0 08 ret 20079d8: 81 e8 00 00 restore =============================================================================== 020079dc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 20079dc: 9d e3 bf 88 save %sp, -120, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 20079e0: 03 00 80 5d sethi %hi(0x2017400), %g1 20079e4: e2 00 60 a4 ld [ %g1 + 0xa4 ], %l1 ! 20174a4 <_Thread_Executing> _ISR_Disable( level ); 20079e8: 7f ff e8 ff call 2001de4 20079ec: ae 10 60 a4 or %g1, 0xa4, %l7 while ( _Context_Switch_necessary == TRUE ) { 20079f0: 05 00 80 5d sethi %hi(0x2017400), %g2 20079f4: c2 08 a0 b4 ldub [ %g2 + 0xb4 ], %g1 ! 20174b4 <_Context_Switch_necessary> 20079f8: aa 10 a0 b4 or %g2, 0xb4, %l5 20079fc: 80 a0 60 00 cmp %g1, 0 2007a00: 03 00 80 5c sethi %hi(0x2017000), %g1 2007a04: 02 80 00 4d be 2007b38 <_Thread_Dispatch+0x15c> 2007a08: b2 10 63 e0 or %g1, 0x3e0, %i1 ! 20173e0 <_Thread_Dispatch_disable_level> 2007a0c: 03 00 80 5d sethi %hi(0x2017400), %g1 2007a10: 05 00 80 5d sethi %hi(0x2017400), %g2 2007a14: b4 10 60 70 or %g1, 0x70, %i2 2007a18: 03 00 80 5d sethi %hi(0x2017400), %g1 2007a1c: a4 10 a0 ac or %g2, 0xac, %l2 2007a20: b6 10 60 6c or %g1, 0x6c, %i3 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007a24: 05 00 80 5c sethi %hi(0x2017000), %g2 #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 ); 2007a28: 03 00 80 5d sethi %hi(0x2017400), %g1 2007a2c: b0 10 a3 38 or %g2, 0x338, %i0 2007a30: ac 10 60 68 or %g1, 0x68, %l6 2007a34: a8 07 bf f0 add %fp, -16, %l4 2007a38: a6 07 bf e8 add %fp, -24, %l3 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2007a3c: b8 10 20 01 mov 1, %i4 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); 2007a40: 10 80 00 34 b 2007b10 <_Thread_Dispatch+0x134> 2007a44: ba 10 00 12 mov %l2, %i5 executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 2007a48: 7f ff e8 eb call 2001df4 2007a4c: 01 00 00 00 nop #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); 2007a50: 40 00 0f ee call 200ba08 <_TOD_Get_uptime> 2007a54: 90 10 00 14 mov %l4, %o0 _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); 2007a58: 90 10 00 1d mov %i5, %o0 2007a5c: 92 10 00 14 mov %l4, %o1 2007a60: 40 00 04 2d call 2008b14 <_Timespec_Subtract> 2007a64: 94 10 00 13 mov %l3, %o2 _Timespec_Add_to( &executing->cpu_time_used, &ran ); 2007a68: 92 10 00 13 mov %l3, %o1 2007a6c: 40 00 04 10 call 2008aac <_Timespec_Add_to> 2007a70: 90 04 60 84 add %l1, 0x84, %o0 _Thread_Time_of_last_context_switch = uptime; 2007a74: c2 07 bf f0 ld [ %fp + -16 ], %g1 2007a78: c4 07 bf f4 ld [ %fp + -12 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007a7c: c6 06 c0 00 ld [ %i3 ], %g3 { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); _Timespec_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2007a80: c2 24 80 00 st %g1, [ %l2 ] 2007a84: c4 24 a0 04 st %g2, [ %l2 + 4 ] if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 2007a88: 90 10 00 11 mov %l1, %o0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007a8c: 80 a0 e0 00 cmp %g3, 0 2007a90: 02 80 00 06 be 2007aa8 <_Thread_Dispatch+0xcc> <== NEVER TAKEN 2007a94: 92 10 00 10 mov %l0, %o1 executing->libc_reent = *_Thread_libc_reent; 2007a98: c2 00 c0 00 ld [ %g3 ], %g1 2007a9c: c2 24 61 64 st %g1, [ %l1 + 0x164 ] *_Thread_libc_reent = heir->libc_reent; 2007aa0: c4 04 21 64 ld [ %l0 + 0x164 ], %g2 2007aa4: c4 20 c0 00 st %g2, [ %g3 ] } _User_extensions_Thread_switch( executing, heir ); 2007aa8: 40 00 04 d8 call 2008e08 <_User_extensions_Thread_switch> 2007aac: 01 00 00 00 nop if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 2007ab0: 92 04 20 d8 add %l0, 0xd8, %o1 2007ab4: 40 00 06 2b call 2009360 <_CPU_Context_switch> 2007ab8: 90 04 60 d8 add %l1, 0xd8, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2007abc: c2 04 61 60 ld [ %l1 + 0x160 ], %g1 2007ac0: 80 a0 60 00 cmp %g1, 0 2007ac4: 02 80 00 0d be 2007af8 <_Thread_Dispatch+0x11c> 2007ac8: 01 00 00 00 nop 2007acc: d0 05 80 00 ld [ %l6 ], %o0 2007ad0: 80 a4 40 08 cmp %l1, %o0 2007ad4: 02 80 00 09 be 2007af8 <_Thread_Dispatch+0x11c> 2007ad8: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2007adc: 02 80 00 04 be 2007aec <_Thread_Dispatch+0x110> 2007ae0: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2007ae4: 40 00 05 e5 call 2009278 <_CPU_Context_save_fp> 2007ae8: 90 02 21 60 add %o0, 0x160, %o0 _Context_Restore_fp( &executing->fp_context ); 2007aec: 40 00 06 00 call 20092ec <_CPU_Context_restore_fp> 2007af0: 90 04 61 60 add %l1, 0x160, %o0 _Thread_Allocated_fp = executing; 2007af4: e2 25 80 00 st %l1, [ %l6 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 2007af8: 7f ff e8 bb call 2001de4 2007afc: e2 05 c0 00 ld [ %l7 ], %l1 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { 2007b00: c2 0d 40 00 ldub [ %l5 ], %g1 2007b04: 80 a0 60 00 cmp %g1, 0 2007b08: 02 80 00 0c be 2007b38 <_Thread_Dispatch+0x15c> 2007b0c: 03 00 80 5c sethi %hi(0x2017000), %g1 heir = _Thread_Heir; 2007b10: e0 06 80 00 ld [ %i2 ], %l0 _Thread_Dispatch_disable_level = 1; 2007b14: f8 26 40 00 st %i4, [ %i1 ] _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 2007b18: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = FALSE; 2007b1c: c0 2d 40 00 clrb [ %l5 ] _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 2007b20: 80 a0 60 01 cmp %g1, 1 2007b24: 12 bf ff c9 bne 2007a48 <_Thread_Dispatch+0x6c> 2007b28: e0 25 c0 00 st %l0, [ %l7 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007b2c: c2 06 00 00 ld [ %i0 ], %g1 2007b30: 10 bf ff c6 b 2007a48 <_Thread_Dispatch+0x6c> 2007b34: c2 24 20 78 st %g1, [ %l0 + 0x78 ] executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 2007b38: c0 20 63 e0 clr [ %g1 + 0x3e0 ] _ISR_Enable( level ); 2007b3c: 7f ff e8 ae call 2001df4 2007b40: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 2007b44: 03 00 80 5d sethi %hi(0x2017400), %g1 2007b48: c4 00 60 88 ld [ %g1 + 0x88 ], %g2 ! 2017488 <_Thread_Do_post_task_switch_extension> 2007b4c: 80 a0 a0 00 cmp %g2, 0 2007b50: 12 80 00 06 bne 2007b68 <_Thread_Dispatch+0x18c> <== NEVER TAKEN 2007b54: 01 00 00 00 nop 2007b58: c2 0c 60 75 ldub [ %l1 + 0x75 ], %g1 2007b5c: 80 a0 60 00 cmp %g1, 0 2007b60: 02 80 00 04 be 2007b70 <_Thread_Dispatch+0x194> 2007b64: 01 00 00 00 nop executing->do_post_task_switch_extension ) { executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 2007b68: 7f ff f9 96 call 20061c0 <_API_extensions_Run_postswitch> 2007b6c: c0 2c 60 75 clrb [ %l1 + 0x75 ] 2007b70: 81 c7 e0 08 ret 2007b74: 81 e8 00 00 restore =============================================================================== 0200cb7c <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200cb7c: 03 00 80 5d sethi %hi(0x2017400), %g1 200cb80: c6 00 60 a4 ld [ %g1 + 0xa4 ], %g3 ! 20174a4 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200cb84: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 200cb88: 80 a0 a0 00 cmp %g2, 0 200cb8c: 12 80 00 0b bne 200cbb8 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 200cb90: 84 10 20 01 mov 1, %g2 200cb94: 03 00 80 5d sethi %hi(0x2017400), %g1 200cb98: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 2017470 <_Thread_Heir> 200cb9c: 80 a0 c0 02 cmp %g3, %g2 200cba0: 02 80 00 0b be 200cbcc <_Thread_Evaluate_mode+0x50> 200cba4: 01 00 00 00 nop 200cba8: c2 08 e0 76 ldub [ %g3 + 0x76 ], %g1 200cbac: 80 a0 60 00 cmp %g1, 0 200cbb0: 02 80 00 07 be 200cbcc <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 200cbb4: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 200cbb8: 03 00 80 5d sethi %hi(0x2017400), %g1 200cbbc: 90 10 20 01 mov 1, %o0 200cbc0: c4 28 60 b4 stb %g2, [ %g1 + 0xb4 ] 200cbc4: 81 c3 e0 08 retl 200cbc8: 01 00 00 00 nop return TRUE; } return FALSE; } 200cbcc: 81 c3 e0 08 retl 200cbd0: 90 10 20 00 clr %o0 ! 0 =============================================================================== 02007bb0 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 2007bb0: 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 ) ) { 2007bb4: 80 a2 20 00 cmp %o0, 0 2007bb8: 02 80 00 1d be 2007c2c <_Thread_Get+0x7c> 2007bbc: 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); 2007bc0: 83 32 20 18 srl %o0, 0x18, %g1 2007bc4: 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 ) 2007bc8: 84 00 7f ff add %g1, -1, %g2 2007bcc: 80 a0 a0 03 cmp %g2, 3 2007bd0: 38 80 00 14 bgu,a 2007c20 <_Thread_Get+0x70> 2007bd4: 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 :) */ 2007bd8: 89 32 20 1b srl %o0, 0x1b, %g4 2007bdc: 80 a1 20 01 cmp %g4, 1 2007be0: 12 80 00 0f bne 2007c1c <_Thread_Get+0x6c> 2007be4: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 2007be8: 03 00 80 5c sethi %hi(0x2017000), %g1 2007bec: 82 10 63 40 or %g1, 0x340, %g1 ! 2017340 <_Objects_Information_table> 2007bf0: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 2007bf4: 80 a0 60 00 cmp %g1, 0 2007bf8: 22 80 00 17 be,a 2007c54 <_Thread_Get+0xa4> 2007bfc: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 2007c00: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 2007c04: 80 a2 20 00 cmp %o0, 0 2007c08: 02 80 00 11 be 2007c4c <_Thread_Get+0x9c> <== NEVER TAKEN 2007c0c: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 2007c10: 82 13 c0 00 mov %o7, %g1 2007c14: 7f ff fd 56 call 200716c <_Objects_Get> 2007c18: 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; 2007c1c: 82 10 20 01 mov 1, %g1 2007c20: 90 10 20 00 clr %o0 2007c24: 81 c3 e0 08 retl 2007c28: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007c2c: 03 00 80 5c sethi %hi(0x2017000), %g1 2007c30: c4 00 63 e0 ld [ %g1 + 0x3e0 ], %g2 ! 20173e0 <_Thread_Dispatch_disable_level> 2007c34: 84 00 a0 01 inc %g2 2007c38: c4 20 63 e0 st %g2, [ %g1 + 0x3e0 ] 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; 2007c3c: 03 00 80 5d sethi %hi(0x2017400), %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; 2007c40: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 2007c44: 81 c3 e0 08 retl 2007c48: d0 00 60 a4 ld [ %g1 + 0xa4 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 2007c4c: 81 c3 e0 08 retl <== NOT EXECUTED 2007c50: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 2007c54: 81 c3 e0 08 retl 2007c58: 90 10 20 00 clr %o0 =============================================================================== 0200cbd4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200cbd4: 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; 200cbd8: 03 00 80 5d sethi %hi(0x2017400), %g1 200cbdc: e0 00 60 a4 ld [ %g1 + 0xa4 ], %l0 ! 20174a4 <_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(); 200cbe0: 3f 00 80 32 sethi %hi(0x200c800), %i7 200cbe4: be 17 e3 d4 or %i7, 0x3d4, %i7 ! 200cbd4 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200cbe8: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200cbec: 7f ff d4 82 call 2001df4 200cbf0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 200cbf4: 07 00 80 5c sethi %hi(0x2017000), %g3 doneConstructors = 1; 200cbf8: 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; 200cbfc: e4 08 e0 f8 ldub [ %g3 + 0xf8 ], %l2 doneConstructors = 1; 200cc00: c2 28 e0 f8 stb %g1, [ %g3 + 0xf8 ] #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 ) ) { 200cc04: c4 04 21 60 ld [ %l0 + 0x160 ], %g2 200cc08: 80 a0 a0 00 cmp %g2, 0 200cc0c: 02 80 00 0b be 200cc38 <_Thread_Handler+0x64> 200cc10: 23 00 80 5d sethi %hi(0x2017400), %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 ); 200cc14: d0 04 60 68 ld [ %l1 + 0x68 ], %o0 ! 2017468 <_Thread_Allocated_fp> 200cc18: 80 a4 00 08 cmp %l0, %o0 200cc1c: 02 80 00 07 be 200cc38 <_Thread_Handler+0x64> 200cc20: 80 a2 20 00 cmp %o0, 0 if ( _Thread_Allocated_fp != NULL ) 200cc24: 22 80 00 05 be,a 200cc38 <_Thread_Handler+0x64> 200cc28: e0 24 60 68 st %l0, [ %l1 + 0x68 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200cc2c: 7f ff f1 93 call 2009278 <_CPU_Context_save_fp> 200cc30: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200cc34: e0 24 60 68 st %l0, [ %l1 + 0x68 ] * 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 ); 200cc38: 7f ff ef f4 call 2008c08 <_User_extensions_Thread_begin> 200cc3c: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200cc40: 7f ff eb ce call 2007b78 <_Thread_Enable_dispatch> 200cc44: 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) */ 200cc48: 83 2c a0 18 sll %l2, 0x18, %g1 200cc4c: 80 a0 60 00 cmp %g1, 0 200cc50: 02 80 00 1e be 200ccc8 <_Thread_Handler+0xf4> 200cc54: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200cc58: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200cc5c: 80 a0 60 01 cmp %g1, 1 200cc60: 22 80 00 21 be,a 200cce4 <_Thread_Handler+0x110> <== NEVER TAKEN 200cc64: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200cc68: 80 a0 60 01 cmp %g1, 1 200cc6c: 1a 80 00 0c bcc 200cc9c <_Thread_Handler+0xc8> <== NEVER TAKEN 200cc70: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 200cc74: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200cc78: 9f c0 40 00 call %g1 200cc7c: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 200cc80: 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 ); 200cc84: 7f ff ef f5 call 2008c58 <_User_extensions_Thread_exitted> 200cc88: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200cc8c: 90 10 20 00 clr %o0 200cc90: 92 10 20 01 mov 1, %o1 200cc94: 7f ff e7 9e call 2006b0c <_Internal_error_Occurred> 200cc98: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200cc9c: 22 80 00 16 be,a 200ccf4 <_Thread_Handler+0x120> <== NOT EXECUTED 200cca0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200cca4: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 200cca8: 12 bf ff f7 bne 200cc84 <_Thread_Handler+0xb0> <== NOT EXECUTED 200ccac: 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 = 200ccb0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200ccb4: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED 200ccb8: 9f c0 40 00 call %g1 <== NOT EXECUTED 200ccbc: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED 200ccc0: 10 bf ff f1 b 200cc84 <_Thread_Handler+0xb0> <== NOT EXECUTED 200ccc4: 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 (); 200ccc8: 40 00 26 20 call 2016548 <_init> 200cccc: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200ccd0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200ccd4: 80 a0 60 01 cmp %g1, 1 200ccd8: 12 bf ff e5 bne 200cc6c <_Thread_Handler+0x98> <== ALWAYS TAKEN 200ccdc: 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 = 200cce0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200cce4: 9f c0 40 00 call %g1 <== NOT EXECUTED 200cce8: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200ccec: 10 bf ff e6 b 200cc84 <_Thread_Handler+0xb0> <== NOT EXECUTED 200ccf0: 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 = 200ccf4: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200ccf8: 9f c0 40 00 call %g1 <== NOT EXECUTED 200ccfc: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED 200cd00: 10 bf ff e1 b 200cc84 <_Thread_Handler+0xb0> <== NOT EXECUTED 200cd04: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED =============================================================================== 02007c60 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007c60: 9d e3 bf 98 save %sp, -104, %sp 2007c64: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007c68: 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 ) { 2007c6c: e4 00 40 00 ld [ %g1 ], %l2 2007c70: e6 07 a0 60 ld [ %fp + 0x60 ], %l3 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007c74: 02 80 00 69 be 2007e18 <_Thread_Initialize+0x1b8> <== ALWAYS TAKEN 2007c78: 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; 2007c7c: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 2007c80: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2007c84: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 2007c88: 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 ) { 2007c8c: 80 8f 20 ff btst 0xff, %i4 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) { _Thread_Stack_Free( the_thread ); return FALSE; 2007c90: 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 ) { 2007c94: 12 80 00 43 bne 2007da0 <_Thread_Initialize+0x140> 2007c98: 82 10 20 00 clr %g1 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007c9c: 37 00 80 5d sethi %hi(0x2017400), %i3 2007ca0: d0 06 e0 84 ld [ %i3 + 0x84 ], %o0 ! 2017484 <_Thread_Maximum_extensions> } else fp_area = NULL; the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 2007ca4: 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; 2007ca8: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007cac: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2007cb0: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007cb4: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007cb8: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 2007cbc: c0 26 61 64 clr [ %i1 + 0x164 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007cc0: 80 a2 20 00 cmp %o0, 0 2007cc4: 12 80 00 41 bne 2007dc8 <_Thread_Initialize+0x168> 2007cc8: b8 16 e0 84 or %i3, 0x84, %i4 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 2007ccc: c0 26 61 74 clr [ %i1 + 0x174 ] 2007cd0: 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; 2007cd4: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2007cd8: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007cdc: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 2007ce0: 80 a4 e0 02 cmp %l3, 2 2007ce4: 12 80 00 05 bne 2007cf8 <_Thread_Initialize+0x98> <== ALWAYS TAKEN 2007ce8: 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; 2007cec: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 2007cf0: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 2017338 <_Thread_Ticks_per_timeslice><== NOT EXECUTED 2007cf4: 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; 2007cf8: 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 ); 2007cfc: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 2007d00: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2007d04: 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 ); 2007d08: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2007d0c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 2007d10: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2007d14: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 2007d18: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 2007d1c: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007d20: 40 00 02 1a call 2008588 <_Thread_Set_priority> 2007d24: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007d28: c4 06 60 08 ld [ %i1 + 8 ], %g2 2007d2c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007d30: 03 00 00 3f sethi %hi(0xfc00), %g1 2007d34: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007d38: 84 08 80 01 and %g2, %g1, %g2 2007d3c: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2007d40: 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; 2007d44: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 2007d48: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007d4c: 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 ); 2007d50: 90 10 00 19 mov %i1, %o0 2007d54: 40 00 03 e9 call 2008cf8 <_User_extensions_Thread_create> 2007d58: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 2007d5c: 80 8a 20 ff btst 0xff, %o0 2007d60: 12 80 00 0e bne 2007d98 <_Thread_Initialize+0x138> <== ALWAYS TAKEN 2007d64: 80 a4 20 00 cmp %l0, 0 if ( extensions_area ) 2007d68: 02 80 00 05 be 2007d7c <_Thread_Initialize+0x11c> <== NOT EXECUTED 2007d6c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 2007d70: 40 00 05 04 call 2009180 <_Workspace_Free> <== NOT EXECUTED 2007d74: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007d78: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007d7c: 02 80 00 05 be 2007d90 <_Thread_Initialize+0x130> <== NOT EXECUTED 2007d80: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007d84: 40 00 04 ff call 2009180 <_Workspace_Free> <== NOT EXECUTED 2007d88: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007d8c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007d90: 40 00 02 ba call 2008878 <_Thread_Stack_Free> <== NOT EXECUTED 2007d94: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 2007d98: 81 c7 e0 08 ret 2007d9c: 81 e8 00 00 restore */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2007da0: 40 00 04 ff call 200919c <_Workspace_Allocate> 2007da4: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) { 2007da8: b4 92 20 00 orcc %o0, 0, %i2 2007dac: 12 bf ff bc bne 2007c9c <_Thread_Initialize+0x3c> <== ALWAYS TAKEN 2007db0: 82 10 00 1a mov %i2, %g1 _Thread_Stack_Free( the_thread ); 2007db4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007db8: 40 00 02 b0 call 2008878 <_Thread_Stack_Free> <== NOT EXECUTED 2007dbc: b0 10 20 00 clr %i0 <== NOT EXECUTED 2007dc0: 81 c7 e0 08 ret <== NOT EXECUTED 2007dc4: 81 e8 00 00 restore <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 2007dc8: 90 02 20 01 inc %o0 2007dcc: 40 00 04 f4 call 200919c <_Workspace_Allocate> 2007dd0: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 2007dd4: a0 92 20 00 orcc %o0, 0, %l0 2007dd8: 02 80 00 1b be 2007e44 <_Thread_Initialize+0x1e4> <== NEVER TAKEN 2007ddc: c2 06 e0 84 ld [ %i3 + 0x84 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007de0: 80 a0 7f ff cmp %g1, -1 2007de4: 02 bf ff bc be 2007cd4 <_Thread_Initialize+0x74> <== NEVER TAKEN 2007de8: e0 26 61 74 st %l0, [ %i1 + 0x174 ] 2007dec: 86 10 20 00 clr %g3 2007df0: 88 10 00 10 mov %l0, %g4 2007df4: c4 07 00 00 ld [ %i4 ], %g2 the_thread->extensions[i] = NULL; 2007df8: 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++ ) 2007dfc: 86 00 e0 01 inc %g3 2007e00: 84 00 a0 01 inc %g2 2007e04: 80 a0 80 03 cmp %g2, %g3 2007e08: 18 bf ff fb bgu 2007df4 <_Thread_Initialize+0x194> 2007e0c: 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; 2007e10: 10 bf ff b2 b 2007cd8 <_Thread_Initialize+0x78> 2007e14: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2007e18: 90 10 00 19 mov %i1, %o0 2007e1c: 40 00 02 7b call 2008808 <_Thread_Stack_Allocate> 2007e20: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2007e24: 80 a2 20 00 cmp %o0, 0 2007e28: 02 80 00 0e be 2007e60 <_Thread_Initialize+0x200> 2007e2c: 80 a6 c0 08 cmp %i3, %o0 2007e30: 18 80 00 0c bgu 2007e60 <_Thread_Initialize+0x200> <== NEVER TAKEN 2007e34: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 2007e38: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 2007e3c: 10 bf ff 92 b 2007c84 <_Thread_Initialize+0x24> 2007e40: 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 ) 2007e44: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007e48: 02 80 00 04 be 2007e58 <_Thread_Initialize+0x1f8> <== NOT EXECUTED 2007e4c: 01 00 00 00 nop <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007e50: 40 00 04 cc call 2009180 <_Workspace_Free> <== NOT EXECUTED 2007e54: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007e58: 40 00 02 88 call 2008878 <_Thread_Stack_Free> <== NOT EXECUTED 2007e5c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007e60: 81 c7 e0 08 ret 2007e64: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200cf54 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 200cf54: 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; 200cf58: 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; 200cf5c: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200cf60: 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; 200cf64: 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; 200cf68: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 200cf6c: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 200cf70: 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; 200cf74: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 200cf78: 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 ) ) { 200cf7c: 7f ff f0 09 call 2008fa0 <_Thread_queue_Extract_with_proxy> 200cf80: 90 10 00 18 mov %i0, %o0 200cf84: 80 8a 20 ff btst 0xff, %o0 200cf88: 32 80 00 07 bne,a 200cfa4 <_Thread_Reset+0x50> 200cf8c: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200cf90: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200cf94: 80 a0 60 02 cmp %g1, 2 200cf98: 02 80 00 0c be 200cfc8 <_Thread_Reset+0x74> <== NEVER TAKEN 200cf9c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200cfa0: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 200cfa4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200cfa8: 80 a0 40 19 cmp %g1, %i1 200cfac: 02 80 00 05 be 200cfc0 <_Thread_Reset+0x6c> 200cfb0: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 200cfb4: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 200cfb8: 7f ff f0 81 call 20091bc <_Thread_Set_priority> 200cfbc: 81 e8 00 00 restore 200cfc0: 81 c7 e0 08 ret 200cfc4: 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 ); 200cfc8: 7f ff f3 2f call 2009c84 <_Watchdog_Remove> <== NOT EXECUTED 200cfcc: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200cfd0: 10 bf ff f5 b 200cfa4 <_Thread_Reset+0x50> <== NOT EXECUTED 200cfd4: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED =============================================================================== 0200c208 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200c208: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200c20c: 03 00 80 5d sethi %hi(0x2017400), %g1 200c210: e0 00 60 a4 ld [ %g1 + 0xa4 ], %l0 ! 20174a4 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200c214: 7f ff d6 f4 call 2001de4 200c218: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200c21c: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200c220: c4 04 40 00 ld [ %l1 ], %g2 200c224: c2 04 60 08 ld [ %l1 + 8 ], %g1 200c228: 80 a0 80 01 cmp %g2, %g1 200c22c: 02 80 00 18 be 200c28c <_Thread_Reset_timeslice+0x84> 200c230: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200c234: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 200c238: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200c23c: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c240: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c244: 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; 200c248: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200c24c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c250: 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; 200c254: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200c258: 7f ff d6 e7 call 2001df4 200c25c: 01 00 00 00 nop 200c260: 7f ff d6 e1 call 2001de4 200c264: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200c268: 07 00 80 5d sethi %hi(0x2017400), %g3 200c26c: c2 00 e0 70 ld [ %g3 + 0x70 ], %g1 ! 2017470 <_Thread_Heir> 200c270: 80 a4 00 01 cmp %l0, %g1 200c274: 02 80 00 08 be 200c294 <_Thread_Reset_timeslice+0x8c> <== ALWAYS TAKEN 200c278: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 200c27c: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 200c280: c4 28 60 b4 stb %g2, [ %g1 + 0xb4 ] ! 20174b4 <_Context_Switch_necessary><== NOT EXECUTED _ISR_Enable( level ); 200c284: 7f ff d6 dc call 2001df4 <== NOT EXECUTED 200c288: 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 ); 200c28c: 7f ff d6 da call 2001df4 200c290: 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; 200c294: c2 04 40 00 ld [ %l1 ], %g1 200c298: c2 20 e0 70 st %g1, [ %g3 + 0x70 ] _Context_Switch_necessary = TRUE; 200c29c: 03 00 80 5d sethi %hi(0x2017400), %g1 200c2a0: c4 28 60 b4 stb %g2, [ %g1 + 0xb4 ] ! 20174b4 <_Context_Switch_necessary> _ISR_Enable( level ); 200c2a4: 7f ff d6 d4 call 2001df4 200c2a8: 81 e8 00 00 restore =============================================================================== 02009ed0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 2009ed0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2009ed4: 7f ff e2 e1 call 2002a58 2009ed8: 01 00 00 00 nop 2009edc: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 2009ee0: 80 8e 60 ff btst 0xff, %i1 2009ee4: 22 80 00 0d be,a 2009f18 <_Thread_Resume+0x48> <== NEVER TAKEN 2009ee8: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 2009eec: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 2009ef0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 2009ef4: 80 88 60 02 btst 2, %g1 2009ef8: 02 80 00 06 be 2009f10 <_Thread_Resume+0x40> <== NEVER TAKEN 2009efc: 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); 2009f00: 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 ) ) { 2009f04: 80 a0 60 00 cmp %g1, 0 2009f08: 02 80 00 0a be 2009f30 <_Thread_Resume+0x60> 2009f0c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 2009f10: 7f ff e2 d6 call 2002a68 2009f14: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 2009f18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 2009f1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2009f20: 02 bf ff f4 be 2009ef0 <_Thread_Resume+0x20> <== NOT EXECUTED 2009f24: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 2009f28: 7f ff e2 d0 call 2002a68 <== NOT EXECUTED 2009f2c: 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; 2009f30: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 2009f34: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2009f38: 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); 2009f3c: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 2009f40: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009f44: 1b 00 80 8e sethi %hi(0x2023800), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2009f48: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009f4c: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009f50: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 2009f54: c2 26 00 00 st %g1, [ %i0 ] 2009f58: c4 13 61 08 lduh [ %o5 + 0x108 ], %g2 old_last_node = the_chain->last; 2009f5c: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 2009f60: f0 20 e0 08 st %i0, [ %g3 + 8 ] 2009f64: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2009f68: c8 26 20 04 st %g4, [ %i0 + 4 ] 2009f6c: c4 33 61 08 sth %g2, [ %o5 + 0x108 ] 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; 2009f70: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 2009f74: 7f ff e2 bd call 2002a68 2009f78: 90 10 00 10 mov %l0, %o0 2009f7c: 7f ff e2 b7 call 2002a58 2009f80: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 2009f84: 09 00 80 8e sethi %hi(0x2023800), %g4 2009f88: c4 01 20 e0 ld [ %g4 + 0xe0 ], %g2 ! 20238e0 <_Thread_Heir> 2009f8c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 2009f90: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2009f94: 80 a0 c0 01 cmp %g3, %g1 2009f98: 1a bf ff de bcc 2009f10 <_Thread_Resume+0x40> 2009f9c: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009fa0: 03 00 80 8e sethi %hi(0x2023800), %g1 2009fa4: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 2023914 <_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; 2009fa8: f0 21 20 e0 st %i0, [ %g4 + 0xe0 ] if ( _Thread_Executing->is_preemptible || 2009fac: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 2009fb0: 80 a0 60 00 cmp %g1, 0 2009fb4: 02 80 00 06 be 2009fcc <_Thread_Resume+0xfc> 2009fb8: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009fbc: 84 10 20 01 mov 1, %g2 2009fc0: 03 00 80 8e sethi %hi(0x2023800), %g1 2009fc4: c4 28 61 24 stb %g2, [ %g1 + 0x124 ] ! 2023924 <_Context_Switch_necessary> 2009fc8: 30 bf ff d2 b,a 2009f10 <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009fcc: 12 bf ff d1 bne 2009f10 <_Thread_Resume+0x40> <== ALWAYS TAKEN 2009fd0: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009fd4: 10 bf ff fc b 2009fc4 <_Thread_Resume+0xf4> <== NOT EXECUTED 2009fd8: 03 00 80 8e sethi %hi(0x2023800), %g1 <== NOT EXECUTED =============================================================================== 02008808 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 2008808: 9d e3 bf 98 save %sp, -104, %sp 200880c: 03 00 80 59 sethi %hi(0x2016400), %g1 2008810: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 2016630 2008814: 80 a6 40 01 cmp %i1, %g1 2008818: 2a 80 00 02 bcs,a 2008820 <_Thread_Stack_Allocate+0x18> 200881c: 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 ) { 2008820: 03 00 80 5d sethi %hi(0x2017400), %g1 2008824: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 ! 201747c <_Configuration_Table> 2008828: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 200882c: 80 a0 60 00 cmp %g1, 0 2008830: 22 80 00 0a be,a 2008858 <_Thread_Stack_Allocate+0x50> <== ALWAYS TAKEN 2008834: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 2008838: 9f c0 40 00 call %g1 <== NOT EXECUTED 200883c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008840: 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 ) 2008844: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 2008848: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 200884c: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 2008850: 81 c7 e0 08 ret <== NOT EXECUTED 2008854: 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 ); 2008858: 40 00 02 51 call 200919c <_Workspace_Allocate> 200885c: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008860: 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 ) 2008864: 80 a0 00 08 cmp %g0, %o0 2008868: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 200886c: b0 0e 40 18 and %i1, %i0, %i0 2008870: 81 c7 e0 08 ret 2008874: 81 e8 00 00 restore =============================================================================== 02008878 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 2008878: 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 ) 200887c: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 2008880: 80 a0 60 00 cmp %g1, 0 2008884: 02 80 00 09 be 20088a8 <_Thread_Stack_Free+0x30> <== NEVER TAKEN 2008888: 03 00 80 5d sethi %hi(0x2017400), %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 ) 200888c: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 ! 201747c <_Configuration_Table> 2008890: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 2008894: 80 a0 60 00 cmp %g1, 0 2008898: 22 80 00 06 be,a 20088b0 <_Thread_Stack_Free+0x38> <== ALWAYS TAKEN 200889c: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 20088a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20088a4: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 20088a8: 81 c7 e0 08 ret <== NOT EXECUTED 20088ac: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 20088b0: 40 00 02 34 call 2009180 <_Workspace_Free> 20088b4: 81 e8 00 00 restore =============================================================================== 0200895c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 200895c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 2008960: 03 00 80 5d sethi %hi(0x2017400), %g1 2008964: e0 00 60 a4 ld [ %g1 + 0xa4 ], %l0 ! 20174a4 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 2008968: c4 0c 20 76 ldub [ %l0 + 0x76 ], %g2 200896c: 80 a0 a0 00 cmp %g2, 0 2008970: 02 80 00 23 be 20089fc <_Thread_Tickle_timeslice+0xa0> 2008974: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 2008978: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 200897c: 80 a0 60 00 cmp %g1, 0 2008980: 12 80 00 1f bne 20089fc <_Thread_Tickle_timeslice+0xa0> <== NEVER TAKEN 2008984: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2008988: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 200898c: 80 a0 60 01 cmp %g1, 1 2008990: 0a 80 00 07 bcs 20089ac <_Thread_Tickle_timeslice+0x50> 2008994: 80 a0 60 02 cmp %g1, 2 2008998: 28 80 00 10 bleu,a 20089d8 <_Thread_Tickle_timeslice+0x7c><== ALWAYS TAKEN 200899c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 20089a0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 20089a4: 22 80 00 04 be,a 20089b4 <_Thread_Tickle_timeslice+0x58> <== NOT EXECUTED 20089a8: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED 20089ac: 81 c7 e0 08 ret 20089b0: 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 ) 20089b4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20089b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20089bc: 12 bf ff fc bne 20089ac <_Thread_Tickle_timeslice+0x50> <== NOT EXECUTED 20089c0: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 20089c4: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 20089c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20089cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20089d0: 81 c7 e0 08 ret <== NOT EXECUTED 20089d4: 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 ) { 20089d8: 82 00 7f ff add %g1, -1, %g1 20089dc: 80 a0 60 00 cmp %g1, 0 20089e0: 14 bf ff f3 bg 20089ac <_Thread_Tickle_timeslice+0x50> 20089e4: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 20089e8: 40 00 0e 08 call 200c208 <_Thread_Reset_timeslice> 20089ec: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 20089f0: 03 00 80 5c sethi %hi(0x2017000), %g1 20089f4: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 2017338 <_Thread_Ticks_per_timeslice> 20089f8: c4 24 20 78 st %g2, [ %l0 + 0x78 ] 20089fc: 81 c7 e0 08 ret 2008a00: 81 e8 00 00 restore =============================================================================== 02008a04 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 2008a04: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 2008a08: 03 00 80 5d sethi %hi(0x2017400), %g1 2008a0c: e0 00 60 a4 ld [ %g1 + 0xa4 ], %l0 ! 20174a4 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 2008a10: 7f ff e4 f5 call 2001de4 2008a14: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 2008a18: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 2008a1c: c4 04 40 00 ld [ %l1 ], %g2 2008a20: c2 04 60 08 ld [ %l1 + 8 ], %g1 2008a24: 80 a0 80 01 cmp %g2, %g1 2008a28: 02 80 00 19 be 2008a8c <_Thread_Yield_processor+0x88> 2008a2c: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2008a30: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 2008a34: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 2008a38: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2008a3c: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2008a40: 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; 2008a44: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 2008a48: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2008a4c: 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; 2008a50: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2008a54: 7f ff e4 e8 call 2001df4 2008a58: 01 00 00 00 nop 2008a5c: 7f ff e4 e2 call 2001de4 2008a60: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2008a64: 07 00 80 5d sethi %hi(0x2017400), %g3 2008a68: c2 00 e0 70 ld [ %g3 + 0x70 ], %g1 ! 2017470 <_Thread_Heir> 2008a6c: 80 a4 00 01 cmp %l0, %g1 2008a70: 22 80 00 0d be,a 2008aa4 <_Thread_Yield_processor+0xa0> <== ALWAYS TAKEN 2008a74: c2 04 40 00 ld [ %l1 ], %g1 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = TRUE; 2008a78: 84 10 20 01 mov 1, %g2 2008a7c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008a80: c4 28 60 b4 stb %g2, [ %g1 + 0xb4 ] ! 20174b4 <_Context_Switch_necessary> _ISR_Enable( level ); 2008a84: 7f ff e4 dc call 2001df4 2008a88: 81 e8 00 00 restore if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 2008a8c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008a90: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 2017470 <_Thread_Heir> 2008a94: 80 a4 00 02 cmp %l0, %g2 2008a98: 12 bf ff f9 bne 2008a7c <_Thread_Yield_processor+0x78> <== NEVER TAKEN 2008a9c: 84 10 20 01 mov 1, %g2 2008aa0: 30 bf ff f9 b,a 2008a84 <_Thread_Yield_processor+0x80> _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 2008aa4: 10 bf ff f5 b 2008a78 <_Thread_Yield_processor+0x74> 2008aa8: c2 20 e0 70 st %g1, [ %g3 + 0x70 ] =============================================================================== 02008188 <_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 ) { 2008188: 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; 200818c: 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); 2008190: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2008194: 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); 2008198: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 200819c: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 20081a0: 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 ) { 20081a4: 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 ) ) 20081a8: 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); 20081ac: 83 34 a0 06 srl %l2, 6, %g1 20081b0: 12 80 00 30 bne 2008270 <_Thread_queue_Enqueue_priority+0xe8> 20081b4: 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; 20081b8: 85 28 60 04 sll %g1, 4, %g2 20081bc: 83 28 60 02 sll %g1, 2, %g1 20081c0: 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; 20081c4: b0 10 00 01 mov %g1, %i0 20081c8: 82 05 80 01 add %l6, %g1, %g1 20081cc: 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 ); 20081d0: 7f ff e7 05 call 2001de4 20081d4: 01 00 00 00 nop 20081d8: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 20081dc: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 20081e0: 80 a4 00 13 cmp %l0, %l3 20081e4: 32 80 00 18 bne,a 2008244 <_Thread_queue_Enqueue_priority+0xbc> 20081e8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 20081ec: 10 80 00 81 b 20083f0 <_Thread_queue_Enqueue_priority+0x268> 20081f0: 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 ) ) 20081f4: 80 a4 00 13 cmp %l0, %l3 20081f8: 02 80 00 17 be 2008254 <_Thread_queue_Enqueue_priority+0xcc> 20081fc: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 2008200: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2008204: 80 a4 80 11 cmp %l2, %l1 2008208: 28 80 00 14 bleu,a 2008258 <_Thread_queue_Enqueue_priority+0xd0> 200820c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 2008210: 7f ff e6 f9 call 2001df4 2008214: 90 10 00 14 mov %l4, %o0 2008218: 7f ff e6 f3 call 2001de4 200821c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008220: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2008224: 80 8d 40 01 btst %l5, %g1 2008228: 02 80 00 6b be 20083d4 <_Thread_queue_Enqueue_priority+0x24c><== NEVER TAKEN 200822c: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 2008230: 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 ) ) { 2008234: 80 a4 00 13 cmp %l0, %l3 2008238: 02 80 00 07 be 2008254 <_Thread_queue_Enqueue_priority+0xcc> 200823c: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 2008240: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2008244: 80 a4 80 11 cmp %l2, %l1 2008248: 38 bf ff eb bgu,a 20081f4 <_Thread_queue_Enqueue_priority+0x6c> 200824c: 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 ) ) { 2008250: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008254: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 2008258: 80 a6 20 01 cmp %i0, 1 200825c: 02 80 00 47 be 2008378 <_Thread_queue_Enqueue_priority+0x1f0><== ALWAYS TAKEN 2008260: 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; 2008264: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 2008268: 81 c7 e0 08 ret <== NOT EXECUTED 200826c: 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; 2008270: 85 28 60 04 sll %g1, 4, %g2 2008274: 83 28 60 02 sll %g1, 2, %g1 2008278: 82 20 80 01 sub %g2, %g1, %g1 200827c: 05 00 80 59 sethi %hi(0x2016400), %g2 2008280: a6 06 00 01 add %i0, %g1, %l3 2008284: ae 10 a2 34 or %g2, 0x234, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 2008288: 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; 200828c: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 2008290: 7f ff e6 d5 call 2001de4 2008294: a2 00 60 01 add %g1, 1, %l1 2008298: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 200829c: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 20082a0: 80 a4 c0 10 cmp %l3, %l0 20082a4: 22 80 00 25 be,a 2008338 <_Thread_queue_Enqueue_priority+0x1b0> 20082a8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 20082ac: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 20082b0: 80 a4 80 11 cmp %l2, %l1 20082b4: 3a 80 00 21 bcc,a 2008338 <_Thread_queue_Enqueue_priority+0x1b0> 20082b8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 20082bc: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 20082c0: 80 a4 c0 10 cmp %l3, %l0 20082c4: 32 80 00 19 bne,a 2008328 <_Thread_queue_Enqueue_priority+0x1a0> 20082c8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 20082cc: 10 80 00 1b b 2008338 <_Thread_queue_Enqueue_priority+0x1b0> 20082d0: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 20082d4: 7f ff e6 c8 call 2001df4 20082d8: 90 10 00 14 mov %l4, %o0 20082dc: 7f ff e6 c2 call 2001de4 20082e0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20082e4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20082e8: 80 8d 40 01 btst %l5, %g1 20082ec: 02 80 00 3d be 20083e0 <_Thread_queue_Enqueue_priority+0x258><== NEVER TAKEN 20082f0: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 20082f4: 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 ) ) { 20082f8: 80 a4 00 13 cmp %l0, %l3 20082fc: 22 80 00 0f be,a 2008338 <_Thread_queue_Enqueue_priority+0x1b0> 2008300: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 2008304: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 2008308: 80 a4 80 11 cmp %l2, %l1 200830c: 3a 80 00 0b bcc,a 2008338 <_Thread_queue_Enqueue_priority+0x1b0><== ALWAYS TAKEN 2008310: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2008314: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 2008318: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 200831c: 22 80 00 07 be,a 2008338 <_Thread_queue_Enqueue_priority+0x1b0><== NOT EXECUTED 2008320: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 2008324: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 2008328: 80 a4 80 11 cmp %l2, %l1 200832c: 0a bf ff ea bcs 20082d4 <_Thread_queue_Enqueue_priority+0x14c> 2008330: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008334: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 2008338: 80 a6 20 01 cmp %i0, 1 200833c: 12 bf ff ca bne 2008264 <_Thread_queue_Enqueue_priority+0xdc><== NEVER TAKEN 2008340: 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 ) 2008344: 80 a4 80 11 cmp %l2, %l1 2008348: 02 80 00 18 be 20083a8 <_Thread_queue_Enqueue_priority+0x220> 200834c: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2008350: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2008354: 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; 2008358: 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; 200835c: 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; 2008360: 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; 2008364: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008368: 7f ff e6 a3 call 2001df4 200836c: 01 00 00 00 nop 2008370: 81 c7 e0 08 ret 2008374: 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 ) 2008378: 02 80 00 0c be 20083a8 <_Thread_queue_Enqueue_priority+0x220> 200837c: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008380: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008384: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 2008388: 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; 200838c: 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; 2008390: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2008394: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008398: 7f ff e6 97 call 2001df4 200839c: 90 10 00 14 mov %l4, %o0 20083a0: 81 c7 e0 08 ret 20083a4: 81 e8 00 00 restore 20083a8: 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; 20083ac: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 20083b0: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 20083b4: 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; 20083b8: 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; 20083bc: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 20083c0: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20083c4: 7f ff e6 8c call 2001df4 20083c8: b0 10 20 01 mov 1, %i0 20083cc: 81 c7 e0 08 ret 20083d0: 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 ); 20083d4: 7f ff e6 88 call 2001df4 <== NOT EXECUTED 20083d8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 20083dc: 30 bf ff 7d b,a 20081d0 <_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 ); 20083e0: 7f ff e6 85 call 2001df4 <== NOT EXECUTED 20083e4: 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; 20083e8: 10 bf ff aa b 2008290 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED 20083ec: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 20083f0: 10 bf ff 9a b 2008258 <_Thread_queue_Enqueue_priority+0xd0> 20083f4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 =============================================================================== 0200cd08 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200cd08: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200cd0c: 7f ff d4 36 call 2001de4 200cd10: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200cd14: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200cd18: 03 00 00 ef sethi %hi(0x3bc00), %g1 200cd1c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200cd20: 80 88 80 01 btst %g2, %g1 200cd24: 02 80 00 19 be 200cd88 <_Thread_queue_Extract_fifo+0x80> <== NEVER TAKEN 200cd28: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200cd2c: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 200cd30: 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 ) ) { 200cd34: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 200cd38: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cd3c: c4 20 60 04 st %g2, [ %g1 + 4 ] 200cd40: 80 a0 e0 02 cmp %g3, 2 200cd44: 02 80 00 07 be 200cd60 <_Thread_queue_Extract_fifo+0x58> 200cd48: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 200cd4c: 7f ff d4 2a call 2001df4 200cd50: 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 ); 200cd54: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200cd58: 7f ff ea 6f call 2007714 <_Thread_Clear_state> 200cd5c: 81 e8 00 00 restore 200cd60: 82 10 20 03 mov 3, %g1 200cd64: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200cd68: 7f ff d4 23 call 2001df4 200cd6c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 200cd70: 7f ff f0 a3 call 2008ffc <_Watchdog_Remove> 200cd74: 90 06 60 48 add %i1, 0x48, %o0 200cd78: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200cd7c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200cd80: 7f ff ea 65 call 2007714 <_Thread_Clear_state> 200cd84: 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 ); 200cd88: 7f ff d4 1b call 2001df4 <== NOT EXECUTED 200cd8c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0200bf90 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 200bf90: 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 ); 200bf94: 7f ff d7 94 call 2001de4 200bf98: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200bf9c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200bfa0: 03 00 00 ef sethi %hi(0x3bc00), %g1 200bfa4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200bfa8: 80 88 80 01 btst %g2, %g1 200bfac: 02 80 00 23 be 200c038 <_Thread_queue_Extract_priority_helper+0xa8><== NEVER TAKEN 200bfb0: 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)); 200bfb4: 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; 200bfb8: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200bfbc: 80 a0 c0 01 cmp %g3, %g1 200bfc0: 02 80 00 2a be 200c068 <_Thread_queue_Extract_priority_helper+0xd8> 200bfc4: 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; 200bfc8: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 200bfcc: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 200bfd0: 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; 200bfd4: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 200bfd8: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 200bfdc: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 200bfe0: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 200bfe4: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 200bfe8: 80 a0 80 01 cmp %g2, %g1 200bfec: 02 80 00 07 be 200c008 <_Thread_queue_Extract_priority_helper+0x78> 200bff0: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 200bff4: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 200bff8: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 200bffc: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 200c000: 82 00 e0 3c add %g3, 0x3c, %g1 200c004: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 200c008: 80 8e a0 ff btst 0xff, %i2 200c00c: 12 80 00 0d bne 200c040 <_Thread_queue_Extract_priority_helper+0xb0> 200c010: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200c014: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200c018: 80 a0 60 02 cmp %g1, 2 200c01c: 02 80 00 0b be 200c048 <_Thread_queue_Extract_priority_helper+0xb8><== NEVER TAKEN 200c020: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200c024: 7f ff d7 74 call 2001df4 200c028: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200c02c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200c030: 7f ff ed b9 call 2007714 <_Thread_Clear_state> 200c034: 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 ); 200c038: 7f ff d7 6f call 2001df4 <== NOT EXECUTED 200c03c: 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 ); 200c040: 7f ff d7 6d call 2001df4 200c044: 91 e8 00 08 restore %g0, %o0, %o0 200c048: 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 ); 200c04c: 7f ff d7 6a call 2001df4 <== NOT EXECUTED 200c050: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 200c054: 7f ff f3 ea call 2008ffc <_Watchdog_Remove> <== NOT EXECUTED 200c058: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 200c05c: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 200c060: 7f ff ed ad call 2007714 <_Thread_Clear_state> <== NOT EXECUTED 200c064: 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; 200c068: 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; 200c06c: 10 bf ff e7 b 200c008 <_Thread_queue_Extract_priority_helper+0x78> 200c070: c4 20 40 00 st %g2, [ %g1 ] =============================================================================== 0200c074 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 200c074: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 200c078: 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 && 200c07c: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 200c080: 80 a0 e0 00 cmp %g3, 0 200c084: 02 80 00 06 be 200c09c <_Thread_queue_Process_timeout+0x28> 200c088: 03 00 80 5d sethi %hi(0x2017400), %g1 200c08c: c4 00 60 a4 ld [ %g1 + 0xa4 ], %g2 ! 20174a4 <_Thread_Executing> 200c090: 80 a2 40 02 cmp %o1, %g2 200c094: 02 80 00 07 be 200c0b0 <_Thread_queue_Process_timeout+0x3c><== ALWAYS TAKEN 200c098: 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; 200c09c: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200c0a0: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200c0a4: 82 13 c0 00 mov %o7, %g1 200c0a8: 7f ff ff af call 200bf64 <_Thread_queue_Extract> 200c0ac: 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 ) { 200c0b0: 02 80 00 06 be 200c0c8 <_Thread_queue_Process_timeout+0x54><== NEVER TAKEN 200c0b4: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200c0b8: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200c0bc: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200c0c0: 81 c3 e0 08 retl 200c0c4: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 200c0c8: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 020084c8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20084c8: 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 ) 20084cc: 80 a6 20 00 cmp %i0, 0 20084d0: 02 80 00 13 be 200851c <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 20084d4: 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 ) { 20084d8: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 20084dc: 80 a4 20 01 cmp %l0, 1 20084e0: 02 80 00 04 be 20084f0 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 20084e4: 01 00 00 00 nop 20084e8: 81 c7 e0 08 ret <== NOT EXECUTED 20084ec: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 20084f0: 7f ff e6 3d call 2001de4 20084f4: 01 00 00 00 nop 20084f8: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 20084fc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2008500: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008504: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008508: 80 88 80 01 btst %g2, %g1 200850c: 12 80 00 06 bne 2008524 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 2008510: 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 ); 2008514: 7f ff e6 38 call 2001df4 2008518: 90 10 00 11 mov %l1, %o0 200851c: 81 c7 e0 08 ret 2008520: 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 ); 2008524: 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; 2008528: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 200852c: 40 00 0e 99 call 200bf90 <_Thread_queue_Extract_priority_helper> 2008530: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2008534: 90 10 00 18 mov %i0, %o0 2008538: 92 10 00 19 mov %i1, %o1 200853c: 7f ff ff 13 call 2008188 <_Thread_queue_Enqueue_priority> 2008540: 94 07 bf f4 add %fp, -12, %o2 2008544: 30 bf ff f4 b,a 2008514 <_Thread_queue_Requeue+0x4c> =============================================================================== 02008548 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 2008548: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200854c: 90 10 00 18 mov %i0, %o0 2008550: 7f ff fd 98 call 2007bb0 <_Thread_Get> 2008554: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 2008558: c2 07 bf f4 ld [ %fp + -12 ], %g1 200855c: 80 a0 60 00 cmp %g1, 0 2008560: 12 80 00 08 bne 2008580 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 2008564: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2008568: 40 00 0e c3 call 200c074 <_Thread_queue_Process_timeout> 200856c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2008570: 05 00 80 5c sethi %hi(0x2017000), %g2 2008574: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20173e0 <_Thread_Dispatch_disable_level> 2008578: 82 00 7f ff add %g1, -1, %g1 200857c: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] 2008580: 81 c7 e0 08 ret 2008584: 81 e8 00 00 restore =============================================================================== 02011c4c <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 2011c4c: 9d e3 bf 88 save %sp, -120, %sp 2011c50: 05 00 80 c3 sethi %hi(0x2030c00), %g2 /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 2011c54: 19 00 80 c3 sethi %hi(0x2030c00), %o4 2011c58: c6 03 22 d4 ld [ %o4 + 0x2d4 ], %g3 ! 2030ed4 <_Watchdog_Ticks_since_boot> 2011c5c: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 2011c60: 17 00 80 c3 sethi %hi(0x2030c00), %o3 2011c64: c8 02 e2 14 ld [ %o3 + 0x214 ], %g4 ! 2030e14 <_TOD_Now> 2011c68: 82 00 60 01 inc %g1 /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 2011c6c: 1b 00 80 c3 sethi %hi(0x2030c00), %o5 2011c70: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2011c74: a2 07 bf ec add %fp, -20, %l1 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 2011c78: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2011c7c: a4 07 bf f0 add %fp, -16, %l2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2011c80: c0 27 bf f0 clr [ %fp + -16 ] /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 2011c84: c6 23 60 84 st %g3, [ %o5 + 0x84 ] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 2011c88: c8 20 60 80 st %g4, [ %g1 + 0x80 ] the_chain->last = _Chain_Head(the_chain); 2011c8c: e2 27 bf f4 st %l1, [ %fp + -12 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2011c90: e4 27 bf ec st %l2, [ %fp + -20 ] /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 2011c94: b0 13 22 d4 or %o4, 0x2d4, %i0 2011c98: ac 13 60 84 or %o5, 0x84, %l6 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 2011c9c: ae 10 60 80 or %g1, 0x80, %l7 2011ca0: b6 12 e2 14 or %o3, 0x214, %i3 2011ca4: a6 10 a1 80 or %g2, 0x180, %l3 /* * Insert the timers that were inserted before we got to run. * This should be done with dispatching disabled. */ _Thread_Disable_dispatch(); _Timer_Server_process_insertions(); 2011ca8: 7f ff ff c3 call 2011bb4 <_Timer_Server_process_insertions> 2011cac: 01 00 00 00 nop _Thread_Enable_dispatch(); 2011cb0: 40 00 0b ef call 2014c6c <_Thread_Enable_dispatch> 2011cb4: 01 00 00 00 nop 2011cb8: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2011cbc: b8 10 60 78 or %g1, 0x78, %i4 ! 2030c78 <_Timer_Ticks_chain+0x4> 2011cc0: 03 00 80 c4 sethi %hi(0x2031000), %g1 2011cc4: 05 00 80 c3 sethi %hi(0x2030c00), %g2 2011cc8: a8 10 60 e4 or %g1, 0xe4, %l4 2011ccc: ba 10 a0 8c or %g2, 0x8c, %i5 2011cd0: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2011cd4: b4 07 3f fc add %i4, -4, %i2 2011cd8: b2 07 7f fc add %i5, -4, %i1 2011cdc: aa 10 60 a0 or %g1, 0xa0, %l5 2011ce0: c2 04 c0 00 ld [ %l3 ], %g1 2011ce4: 82 00 60 01 inc %g1 2011ce8: c2 24 c0 00 st %g1, [ %l3 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 2011cec: d0 05 00 00 ld [ %l4 ], %o0 2011cf0: 40 00 0e e3 call 201587c <_Thread_Set_state> 2011cf4: 92 10 20 08 mov 8, %o1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2011cf8: c2 06 80 00 ld [ %i2 ], %g1 _Timer_Server_reset_ticks_timer(); 2011cfc: 80 a0 40 1c cmp %g1, %i4 2011d00: 02 80 00 0a be 2011d28 <_Timer_Server_body+0xdc> 2011d04: 05 00 80 c4 sethi %hi(0x2031000), %g2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2011d08: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2011d0c: 84 10 a0 e4 or %g2, 0xe4, %g2 2011d10: d2 00 80 00 ld [ %g2 ], %o1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2011d14: 11 00 80 c3 sethi %hi(0x2030c00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2011d18: c2 22 60 54 st %g1, [ %o1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2011d1c: 90 12 22 64 or %o0, 0x264, %o0 2011d20: 40 00 11 f2 call 20164e8 <_Watchdog_Insert> 2011d24: 92 02 60 48 add %o1, 0x48, %o1 2011d28: c2 06 40 00 ld [ %i1 ], %g1 _Timer_Server_reset_seconds_timer(); 2011d2c: 80 a0 40 1d cmp %g1, %i5 2011d30: 02 80 00 08 be 2011d50 <_Timer_Server_body+0x104> 2011d34: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2011d38: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2011d3c: 11 00 80 c3 sethi %hi(0x2030c00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2011d40: c2 25 60 0c st %g1, [ %l5 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2011d44: 90 12 22 58 or %o0, 0x258, %o0 2011d48: 40 00 11 e8 call 20164e8 <_Watchdog_Insert> 2011d4c: 92 10 00 15 mov %l5, %o1 _Thread_Enable_dispatch(); 2011d50: 40 00 0b c7 call 2014c6c <_Thread_Enable_dispatch> 2011d54: 01 00 00 00 nop 2011d58: c2 04 c0 00 ld [ %l3 ], %g1 2011d5c: 82 00 60 01 inc %g1 2011d60: c2 24 c0 00 st %g1, [ %l3 ] /* * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 2011d64: d0 05 00 00 ld [ %l4 ], %o0 2011d68: 40 00 12 4b call 2016694 <_Watchdog_Remove> 2011d6c: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_stop_seconds_timer(); 2011d70: 11 00 80 c3 sethi %hi(0x2030c00), %o0 2011d74: 40 00 12 48 call 2016694 <_Watchdog_Remove> 2011d78: 90 12 20 a0 or %o0, 0xa0, %o0 ! 2030ca0 <_Timer_Seconds_timer> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 2011d7c: c6 06 00 00 ld [ %i0 ], %g3 if ( snapshot >= _Timer_Server_ticks_last_time ) 2011d80: c4 05 80 00 ld [ %l6 ], %g2 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 2011d84: 82 38 00 02 xnor %g0, %g2, %g1 { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; if ( snapshot >= _Timer_Server_ticks_last_time ) 2011d88: 80 a0 c0 02 cmp %g3, %g2 2011d8c: 0a 80 00 03 bcs 2011d98 <_Timer_Server_body+0x14c> <== NEVER TAKEN 2011d90: 92 00 40 03 add %g1, %g3, %o1 ticks = snapshot - _Timer_Server_ticks_last_time; 2011d94: 92 20 c0 02 sub %g3, %g2, %o1 else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 2011d98: 94 10 00 11 mov %l1, %o2 if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 2011d9c: c6 25 80 00 st %g3, [ %l6 ] _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 2011da0: 11 00 80 c3 sethi %hi(0x2030c00), %o0 2011da4: 40 00 11 9d call 2016418 <_Watchdog_Adjust_to_chain> 2011da8: 90 12 20 74 or %o0, 0x74, %o0 ! 2030c74 <_Timer_Ticks_chain> * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; if ( snapshot > _Timer_Server_seconds_last_time ) { 2011dac: d4 05 c0 00 ld [ %l7 ], %o2 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 2011db0: e0 06 c0 00 ld [ %i3 ], %l0 if ( snapshot > _Timer_Server_seconds_last_time ) { 2011db4: 80 a4 00 0a cmp %l0, %o2 2011db8: 18 80 00 1b bgu 2011e24 <_Timer_Server_body+0x1d8> 2011dbc: 92 24 00 0a sub %l0, %o2, %o1 * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); } else if ( snapshot < _Timer_Server_seconds_last_time ) { 2011dc0: 0a 80 00 1e bcs 2011e38 <_Timer_Server_body+0x1ec> 2011dc4: 94 22 80 10 sub %o2, %l0, %o2 _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011dc8: 7f ff ff 7b call 2011bb4 <_Timer_Server_process_insertions> 2011dcc: e0 25 c0 00 st %l0, [ %l7 ] /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 2011dd0: 40 00 0b a7 call 2014c6c <_Thread_Enable_dispatch> 2011dd4: 01 00 00 00 nop 2011dd8: 30 80 00 0a b,a 2011e00 <_Timer_Server_body+0x1b4> if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 2011ddc: c0 24 20 08 clr [ %l0 + 8 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 2011de0: c2 27 bf ec st %g1, [ %fp + -20 ] new_first->previous = _Chain_Head(the_chain); 2011de4: e2 20 60 04 st %l1, [ %g1 + 4 ] _ISR_Enable( level ); 2011de8: 7f ff e5 27 call 200b284 2011dec: 01 00 00 00 nop (*watch->routine)( watch->id, watch->user_data ); 2011df0: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 2011df4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2011df8: 9f c0 40 00 call %g1 2011dfc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 2011e00: 7f ff e5 1d call 200b274 2011e04: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2011e08: e0 07 bf ec ld [ %fp + -20 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2011e0c: 80 a4 80 10 cmp %l2, %l0 2011e10: 32 bf ff f3 bne,a 2011ddc <_Timer_Server_body+0x190> 2011e14: c2 04 00 00 ld [ %l0 ], %g1 watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); if ( watch == NULL ) { _ISR_Enable( level ); 2011e18: 7f ff e5 1b call 200b284 2011e1c: 01 00 00 00 nop 2011e20: 30 bf ff b0 b,a 2011ce0 <_Timer_Server_body+0x94> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); 2011e24: 11 00 80 c3 sethi %hi(0x2030c00), %o0 2011e28: 94 10 00 11 mov %l1, %o2 2011e2c: 40 00 11 7b call 2016418 <_Watchdog_Adjust_to_chain> 2011e30: 90 12 20 88 or %o0, 0x88, %o0 2011e34: 30 bf ff e5 b,a 2011dc8 <_Timer_Server_body+0x17c> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); 2011e38: 11 00 80 c3 sethi %hi(0x2030c00), %o0 2011e3c: 92 10 20 01 mov 1, %o1 2011e40: 40 00 11 46 call 2016358 <_Watchdog_Adjust> 2011e44: 90 12 20 88 or %o0, 0x88, %o0 2011e48: 30 bf ff e0 b,a 2011dc8 <_Timer_Server_body+0x17c> =============================================================================== 02011bb4 <_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) { 2011bb4: 9d e3 bf 98 save %sp, -104, %sp 2011bb8: 03 00 80 c3 sethi %hi(0x2030c00), %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 ); 2011bbc: 05 00 80 c3 sethi %hi(0x2030c00), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011bc0: a0 10 60 94 or %g1, 0x94, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 2011bc4: 03 00 80 c3 sethi %hi(0x2030c00), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 2011bc8: a4 10 a0 88 or %g2, 0x88, %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 ); 2011bcc: a2 10 60 74 or %g1, 0x74, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011bd0: 40 00 02 a4 call 2012660 <_Chain_Get> 2011bd4: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011bd8: 80 a2 20 00 cmp %o0, 0 2011bdc: 02 80 00 0f be 2011c18 <_Timer_Server_process_insertions+0x64> 2011be0: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2011be4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011be8: 80 a0 60 01 cmp %g1, 1 2011bec: 02 80 00 12 be 2011c34 <_Timer_Server_process_insertions+0x80> 2011bf0: 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 ) { 2011bf4: 02 80 00 0b be 2011c20 <_Timer_Server_process_insertions+0x6c><== ALWAYS TAKEN 2011bf8: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011bfc: 7f ff ff ee call 2011bb4 <_Timer_Server_process_insertions><== NOT EXECUTED 2011c00: 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 ); 2011c04: 40 00 02 97 call 2012660 <_Chain_Get> 2011c08: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011c0c: 80 a2 20 00 cmp %o0, 0 2011c10: 32 bf ff f6 bne,a 2011be8 <_Timer_Server_process_insertions+0x34><== NEVER TAKEN 2011c14: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 2011c18: 81 c7 e0 08 ret 2011c1c: 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 ); 2011c20: 40 00 12 32 call 20164e8 <_Watchdog_Insert> 2011c24: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011c28: 7f ff ff e3 call 2011bb4 <_Timer_Server_process_insertions> 2011c2c: 01 00 00 00 nop 2011c30: 30 bf ff f5 b,a 2011c04 <_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 ); 2011c34: 92 02 20 10 add %o0, 0x10, %o1 2011c38: 40 00 12 2c call 20164e8 <_Watchdog_Insert> 2011c3c: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011c40: 7f ff ff dd call 2011bb4 <_Timer_Server_process_insertions> 2011c44: 01 00 00 00 nop 2011c48: 30 bf ff ef b,a 2011c04 <_Timer_Server_process_insertions+0x50> =============================================================================== 02008aac <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 2008aac: 88 10 00 08 mov %o0, %g4 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 2008ab0: c4 02 60 04 ld [ %o1 + 4 ], %g2 2008ab4: c2 01 20 04 ld [ %g4 + 4 ], %g1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 2008ab8: d0 02 40 00 ld [ %o1 ], %o0 /* Add the basics */ time->tv_sec += add->tv_sec; 2008abc: c6 01 00 00 ld [ %g4 ], %g3 time->tv_nsec += add->tv_nsec; 2008ac0: 84 00 80 01 add %g2, %g1, %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 2008ac4: 86 00 c0 08 add %g3, %o0, %g3 time->tv_nsec += add->tv_nsec; 2008ac8: c4 21 20 04 st %g2, [ %g4 + 4 ] /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2008acc: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 2008ad0: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff 2008ad4: 80 a0 80 01 cmp %g2, %g1 2008ad8: 08 80 00 0d bleu 2008b0c <_Timespec_Add_to+0x60> 2008adc: c6 21 00 00 st %g3, [ %g4 ] 2008ae0: 98 10 00 01 mov %g1, %o4 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 2008ae4: 03 31 19 4d sethi %hi(0xc4653400), %g1 2008ae8: 9a 10 62 00 or %g1, 0x200, %o5 ! c4653600 2008aec: 82 00 80 0d add %g2, %o5, %g1 time->tv_sec++; 2008af0: 86 00 e0 01 inc %g3 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 2008af4: c2 21 20 04 st %g1, [ %g4 + 4 ] time->tv_sec++; 2008af8: c6 21 00 00 st %g3, [ %g4 ] /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2008afc: 84 10 00 01 mov %g1, %g2 2008b00: 80 a0 40 0c cmp %g1, %o4 2008b04: 18 bf ff fa bgu 2008aec <_Timespec_Add_to+0x40> <== NEVER TAKEN 2008b08: 90 02 20 01 inc %o0 time->tv_sec++; seconds++; } return seconds; } 2008b0c: 81 c3 e0 08 retl =============================================================================== 0200a700 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a700: 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; 200a704: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 200a708: 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; 200a70c: 91 38 60 1f sra %g1, 0x1f, %o0 200a710: 92 10 00 01 mov %g1, %o1 200a714: 83 30 60 1d srl %g1, 0x1d, %g1 200a718: 87 2a 60 03 sll %o1, 3, %g3 200a71c: 85 2a 20 03 sll %o0, 3, %g2 200a720: 84 10 40 02 or %g1, %g2, %g2 200a724: 83 30 e0 1b srl %g3, 0x1b, %g1 200a728: 99 28 a0 05 sll %g2, 5, %o4 200a72c: 9b 28 e0 05 sll %g3, 5, %o5 200a730: 98 10 40 0c or %g1, %o4, %o4 200a734: 9a a3 40 03 subcc %o5, %g3, %o5 200a738: 83 33 60 1a srl %o5, 0x1a, %g1 200a73c: 98 63 00 02 subx %o4, %g2, %o4 200a740: 97 2b 60 06 sll %o5, 6, %o3 200a744: 95 2b 20 06 sll %o4, 6, %o2 200a748: 96 a2 c0 0d subcc %o3, %o5, %o3 200a74c: 94 10 40 0a or %g1, %o2, %o2 200a750: 94 62 80 0c subx %o2, %o4, %o2 200a754: 96 82 c0 09 addcc %o3, %o1, %o3 200a758: 94 42 80 08 addx %o2, %o0, %o2 200a75c: 83 32 e0 1e srl %o3, 0x1e, %g1 200a760: 85 2a a0 02 sll %o2, 2, %g2 200a764: 84 10 40 02 or %g1, %g2, %g2 200a768: 87 2a e0 02 sll %o3, 2, %g3 200a76c: 96 82 c0 03 addcc %o3, %g3, %o3 200a770: 94 42 80 02 addx %o2, %g2, %o2 200a774: 83 32 e0 1e srl %o3, 0x1e, %g1 200a778: 85 2a a0 02 sll %o2, 2, %g2 200a77c: 84 10 40 02 or %g1, %g2, %g2 200a780: 87 2a e0 02 sll %o3, 2, %g3 200a784: 96 82 c0 03 addcc %o3, %g3, %o3 200a788: 94 42 80 02 addx %o2, %g2, %o2 200a78c: 83 32 e0 1e srl %o3, 0x1e, %g1 200a790: 85 2a a0 02 sll %o2, 2, %g2 200a794: 84 10 40 02 or %g1, %g2, %g2 200a798: 87 2a e0 02 sll %o3, 2, %g3 200a79c: 96 82 c0 03 addcc %o3, %g3, %o3 200a7a0: 94 42 80 02 addx %o2, %g2, %o2 200a7a4: 85 32 e0 17 srl %o3, 0x17, %g2 200a7a8: 83 2a a0 09 sll %o2, 9, %g1 200a7ac: 9b 2a e0 09 sll %o3, 9, %o5 200a7b0: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 200a7b4: 96 83 40 0f addcc %o5, %o7, %o3 200a7b8: 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; 200a7bc: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a7c0: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 200a7c4: 80 92 80 0b orcc %o2, %o3, %g0 200a7c8: 02 80 00 5d be 200a93c <_Timespec_Divide+0x23c> <== NEVER TAKEN 200a7cc: 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; 200a7d0: 92 10 00 08 mov %o0, %o1 200a7d4: 83 32 60 1d srl %o1, 0x1d, %g1 200a7d8: 9b 2a 60 03 sll %o1, 3, %o5 200a7dc: 91 3a 20 1f sra %o0, 0x1f, %o0 200a7e0: 99 2a 20 03 sll %o0, 3, %o4 200a7e4: 98 10 40 0c or %g1, %o4, %o4 200a7e8: 83 33 60 1b srl %o5, 0x1b, %g1 200a7ec: 85 2b 20 05 sll %o4, 5, %g2 200a7f0: 87 2b 60 05 sll %o5, 5, %g3 200a7f4: 84 10 40 02 or %g1, %g2, %g2 200a7f8: 86 a0 c0 0d subcc %g3, %o5, %g3 200a7fc: 83 30 e0 1a srl %g3, 0x1a, %g1 200a800: 84 60 80 0c subx %g2, %o4, %g2 200a804: 9b 28 e0 06 sll %g3, 6, %o5 200a808: 99 28 a0 06 sll %g2, 6, %o4 200a80c: 9a a3 40 03 subcc %o5, %g3, %o5 200a810: 98 10 40 0c or %g1, %o4, %o4 200a814: 98 63 00 02 subx %o4, %g2, %o4 200a818: 9a 83 40 09 addcc %o5, %o1, %o5 200a81c: 83 33 60 1e srl %o5, 0x1e, %g1 200a820: 98 43 00 08 addx %o4, %o0, %o4 200a824: 87 2b 60 02 sll %o5, 2, %g3 200a828: 85 2b 20 02 sll %o4, 2, %g2 200a82c: 9a 83 40 03 addcc %o5, %g3, %o5 200a830: 84 10 40 02 or %g1, %g2, %g2 200a834: 83 33 60 1e srl %o5, 0x1e, %g1 200a838: 98 43 00 02 addx %o4, %g2, %o4 200a83c: 87 2b 60 02 sll %o5, 2, %g3 200a840: 85 2b 20 02 sll %o4, 2, %g2 200a844: 9a 83 40 03 addcc %o5, %g3, %o5 200a848: 84 10 40 02 or %g1, %g2, %g2 200a84c: 83 33 60 1e srl %o5, 0x1e, %g1 200a850: 98 43 00 02 addx %o4, %g2, %o4 200a854: 87 2b 60 02 sll %o5, 2, %g3 200a858: 85 2b 20 02 sll %o4, 2, %g2 200a85c: 9a 83 40 03 addcc %o5, %g3, %o5 200a860: 84 10 40 02 or %g1, %g2, %g2 200a864: 98 43 00 02 addx %o4, %g2, %o4 200a868: 83 2b 20 09 sll %o4, 9, %g1 200a86c: 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; 200a870: 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; 200a874: a0 11 00 01 or %g4, %g1, %l0 200a878: 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; 200a87c: a2 84 40 13 addcc %l1, %l3, %l1 200a880: 83 34 60 1e srl %l1, 0x1e, %g1 200a884: 87 2c 60 02 sll %l1, 2, %g3 200a888: a5 3c a0 1f sra %l2, 0x1f, %l2 200a88c: a0 44 00 12 addx %l0, %l2, %l0 200a890: 85 2c 20 02 sll %l0, 2, %g2 200a894: 84 10 40 02 or %g1, %g2, %g2 200a898: 83 30 e0 1b srl %g3, 0x1b, %g1 200a89c: 99 28 a0 05 sll %g2, 5, %o4 200a8a0: 9b 28 e0 05 sll %g3, 5, %o5 200a8a4: 98 10 40 0c or %g1, %o4, %o4 200a8a8: 9a a3 40 03 subcc %o5, %g3, %o5 200a8ac: 98 63 00 02 subx %o4, %g2, %o4 200a8b0: 9a 83 40 11 addcc %o5, %l1, %o5 200a8b4: 83 33 60 1e srl %o5, 0x1e, %g1 200a8b8: 98 43 00 10 addx %o4, %l0, %o4 200a8bc: 87 2b 60 02 sll %o5, 2, %g3 200a8c0: 85 2b 20 02 sll %o4, 2, %g2 200a8c4: 9a 83 40 03 addcc %o5, %g3, %o5 200a8c8: 84 10 40 02 or %g1, %g2, %g2 200a8cc: 83 33 60 1e srl %o5, 0x1e, %g1 200a8d0: 87 2b 60 02 sll %o5, 2, %g3 200a8d4: 98 43 00 02 addx %o4, %g2, %o4 200a8d8: 9a 83 40 03 addcc %o5, %g3, %o5 200a8dc: 85 2b 20 02 sll %o4, 2, %g2 200a8e0: 84 10 40 02 or %g1, %g2, %g2 200a8e4: 83 33 60 1b srl %o5, 0x1b, %g1 200a8e8: 98 43 00 02 addx %o4, %g2, %o4 200a8ec: 99 2b 20 05 sll %o4, 5, %o4 200a8f0: 98 10 40 0c or %g1, %o4, %o4 200a8f4: 93 2b 60 05 sll %o5, 5, %o1 200a8f8: 40 00 33 5b call 2017664 <__udivdi3> 200a8fc: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 200a900: 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; 200a904: a0 10 00 08 mov %o0, %l0 200a908: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 200a90c: 96 10 23 e8 mov 0x3e8, %o3 200a910: 40 00 33 55 call 2017664 <__udivdi3> 200a914: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 200a918: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a91c: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 200a920: 94 10 20 00 clr %o2 200a924: 92 10 00 11 mov %l1, %o1 200a928: 40 00 34 2b call 20179d4 <__umoddi3> 200a92c: 96 10 23 e8 mov 0x3e8, %o3 200a930: d2 26 c0 00 st %o1, [ %i3 ] 200a934: 81 c7 e0 08 ret 200a938: 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; 200a93c: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 200a940: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 200a944: 81 c7 e0 08 ret <== NOT EXECUTED 200a948: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200ab48 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 200ab48: c4 02 00 00 ld [ %o0 ], %g2 200ab4c: c2 02 40 00 ld [ %o1 ], %g1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 200ab50: 86 10 00 08 mov %o0, %g3 if ( lhs->tv_sec > rhs->tv_sec ) 200ab54: 80 a0 80 01 cmp %g2, %g1 200ab58: 14 80 00 0a bg 200ab80 <_Timespec_Greater_than+0x38> <== NEVER TAKEN 200ab5c: 90 10 20 01 mov 1, %o0 return TRUE; if ( lhs->tv_sec < rhs->tv_sec ) 200ab60: 80 a0 80 01 cmp %g2, %g1 200ab64: 06 80 00 07 bl 200ab80 <_Timespec_Greater_than+0x38> <== NEVER TAKEN 200ab68: 90 10 20 00 clr %o0 return FALSE; /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) 200ab6c: c4 00 e0 04 ld [ %g3 + 4 ], %g2 200ab70: c2 02 60 04 ld [ %o1 + 4 ], %g1 200ab74: 80 a0 80 01 cmp %g2, %g1 200ab78: 04 80 00 04 ble 200ab88 <_Timespec_Greater_than+0x40> 200ab7c: 90 10 20 01 mov 1, %o0 return TRUE; return FALSE; } 200ab80: 81 c3 e0 08 retl 200ab84: 01 00 00 00 nop 200ab88: 81 c3 e0 08 retl 200ab8c: 90 10 20 00 clr %o0 ! 0 =============================================================================== 0200ab90 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 200ab90: c4 02 00 00 ld [ %o0 ], %g2 200ab94: c2 02 40 00 ld [ %o1 ], %g1 bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 200ab98: 86 10 00 08 mov %o0, %g3 if ( lhs->tv_sec < rhs->tv_sec ) 200ab9c: 80 a0 80 01 cmp %g2, %g1 200aba0: 06 80 00 0a bl 200abc8 <_Timespec_Less_than+0x38> 200aba4: 90 10 20 01 mov 1, %o0 return TRUE; if ( lhs->tv_sec > rhs->tv_sec ) 200aba8: 80 a0 80 01 cmp %g2, %g1 200abac: 14 80 00 07 bg 200abc8 <_Timespec_Less_than+0x38> <== NEVER TAKEN 200abb0: 90 10 20 00 clr %o0 return FALSE; /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) 200abb4: c4 00 e0 04 ld [ %g3 + 4 ], %g2 200abb8: c2 02 60 04 ld [ %o1 + 4 ], %g1 200abbc: 80 a0 80 01 cmp %g2, %g1 200abc0: 16 80 00 04 bge 200abd0 <_Timespec_Less_than+0x40> 200abc4: 90 10 20 01 mov 1, %o0 return TRUE; return FALSE; } 200abc8: 81 c3 e0 08 retl 200abcc: 01 00 00 00 nop 200abd0: 81 c3 e0 08 retl 200abd4: 90 10 20 00 clr %o0 ! 0 =============================================================================== 0200c2b0 <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 200c2b0: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 200c2b4: 11 00 80 5d sethi %hi(0x2017400), %o0 200c2b8: 92 10 00 18 mov %i0, %o1 200c2bc: 7f ff e8 1a call 2006324 <_Chain_Append> 200c2c0: 90 12 22 18 or %o0, 0x218, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 200c2c4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c2c8: 80 a0 60 00 cmp %g1, 0 200c2cc: 02 80 00 06 be 200c2e4 <_User_extensions_Add_API_set+0x34><== NEVER TAKEN 200c2d0: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 200c2d4: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 200c2d8: 31 00 80 5c sethi %hi(0x2017000), %i0 200c2dc: 7f ff e8 12 call 2006324 <_Chain_Append> 200c2e0: 91 ee 23 e4 restore %i0, 0x3e4, %o0 200c2e4: 81 c7 e0 08 ret <== NOT EXECUTED 200c2e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02008ca4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, uint32_t the_error ) { 2008ca4: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2008ca8: 03 00 80 5d sethi %hi(0x2017400), %g1 2008cac: 82 10 62 18 or %g1, 0x218, %g1 ! 2017618 <_User_extensions_List> 2008cb0: e0 00 60 08 ld [ %g1 + 8 ], %l0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 2008cb4: 80 a4 00 01 cmp %l0, %g1 2008cb8: 02 80 00 0e be 2008cf0 <_User_extensions_Fatal+0x4c> <== NEVER TAKEN 2008cbc: a2 10 00 01 mov %g1, %l1 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 2008cc0: b2 0e 60 ff and %i1, 0xff, %i1 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 2008cc4: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 2008cc8: 80 a0 60 00 cmp %g1, 0 2008ccc: 02 80 00 05 be 2008ce0 <_User_extensions_Fatal+0x3c> 2008cd0: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 2008cd4: 92 10 00 19 mov %i1, %o1 2008cd8: 9f c0 40 00 call %g1 2008cdc: 94 10 00 1a mov %i2, %o2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 2008ce0: e0 04 20 04 ld [ %l0 + 4 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 2008ce4: 80 a4 00 11 cmp %l0, %l1 2008ce8: 32 bf ff f8 bne,a 2008cc8 <_User_extensions_Fatal+0x24> 2008cec: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 2008cf0: 81 c7 e0 08 ret 2008cf4: 81 e8 00 00 restore =============================================================================== 02008b6c <_User_extensions_Handler_initialization>: void _User_extensions_Handler_initialization ( uint32_t number_of_extensions, User_extensions_Table *initial_extensions ) { 2008b6c: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2008b70: 07 00 80 5d sethi %hi(0x2017400), %g3 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2008b74: 09 00 80 5c sethi %hi(0x2017000), %g4 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2008b78: 84 10 e2 18 or %g3, 0x218, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2008b7c: 82 11 23 e4 or %g4, 0x3e4, %g1 2008b80: 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; 2008b84: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2008b88: 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; 2008b8c: 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); 2008b90: 84 00 a0 04 add %g2, 4, %g2 2008b94: 82 00 60 04 add %g1, 4, %g1 2008b98: c4 20 e2 18 st %g2, [ %g3 + 0x218 ] uint32_t i; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 2008b9c: 80 a6 60 00 cmp %i1, 0 2008ba0: 02 80 00 18 be 2008c00 <_User_extensions_Handler_initialization+0x94> 2008ba4: c2 21 23 e4 st %g1, [ %g4 + 0x3e4 ] extension = (User_extensions_Control *) 2008ba8: 83 2e 20 02 sll %i0, 2, %g1 2008bac: a1 2e 20 04 sll %i0, 4, %l0 2008bb0: a0 24 00 01 sub %l0, %g1, %l0 2008bb4: a0 04 00 18 add %l0, %i0, %l0 2008bb8: a1 2c 20 02 sll %l0, 2, %l0 2008bbc: 40 00 01 7f call 20091b8 <_Workspace_Allocate_or_fatal_error> 2008bc0: 90 10 00 10 mov %l0, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2008bc4: 94 10 00 10 mov %l0, %o2 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 2008bc8: a2 10 00 08 mov %o0, %l1 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2008bcc: 40 00 12 c9 call 200d6f0 2008bd0: 92 10 20 00 clr %o1 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 2008bd4: 80 a6 20 00 cmp %i0, 0 2008bd8: 02 80 00 0a be 2008c00 <_User_extensions_Handler_initialization+0x94><== NEVER TAKEN 2008bdc: a0 10 20 00 clr %l0 _User_extensions_Add_set (extension, &initial_extensions[i]); 2008be0: 90 10 00 11 mov %l1, %o0 2008be4: 40 00 0d c2 call 200c2ec <_User_extensions_Add_set> 2008be8: 92 10 00 19 mov %i1, %o1 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 2008bec: a0 04 20 01 inc %l0 _User_extensions_Add_set (extension, &initial_extensions[i]); extension++; 2008bf0: a2 04 60 34 add %l1, 0x34, %l1 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 2008bf4: 80 a6 00 10 cmp %i0, %l0 2008bf8: 18 bf ff fa bgu 2008be0 <_User_extensions_Handler_initialization+0x74> 2008bfc: b2 06 60 20 add %i1, 0x20, %i1 2008c00: 81 c7 e0 08 ret 2008c04: 81 e8 00 00 restore =============================================================================== 0200ad68 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 200ad68: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 200ad6c: 40 00 0b 42 call 200da74 <_Chain_Extract> 200ad70: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 200ad74: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200ad78: 80 a0 60 00 cmp %g1, 0 200ad7c: 02 80 00 04 be 200ad8c <_User_extensions_Remove_set+0x24> <== ALWAYS TAKEN 200ad80: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 200ad84: 40 00 0b 3c call 200da74 <_Chain_Extract> <== NOT EXECUTED 200ad88: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 200ad8c: 81 c7 e0 08 ret 200ad90: 81 e8 00 00 restore =============================================================================== 02008c08 <_User_extensions_Thread_begin>: */ void _User_extensions_Thread_begin ( Thread_Control *executing ) { 2008c08: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2008c0c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008c10: e0 00 62 18 ld [ %g1 + 0x218 ], %l0 ! 2017618 <_User_extensions_List> 2008c14: 82 10 62 18 or %g1, 0x218, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2008c18: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008c1c: 80 a4 00 11 cmp %l0, %l1 2008c20: 02 80 00 0c be 2008c50 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 2008c24: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 2008c28: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2008c2c: 80 a0 60 00 cmp %g1, 0 2008c30: 02 80 00 04 be 2008c40 <_User_extensions_Thread_begin+0x38> 2008c34: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 2008c38: 9f c0 40 00 call %g1 2008c3c: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2008c40: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008c44: 80 a4 00 11 cmp %l0, %l1 2008c48: 32 bf ff f9 bne,a 2008c2c <_User_extensions_Thread_begin+0x24> 2008c4c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2008c50: 81 c7 e0 08 ret 2008c54: 81 e8 00 00 restore =============================================================================== 02008cf8 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2008cf8: 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 ; 2008cfc: 03 00 80 5d sethi %hi(0x2017400), %g1 2008d00: e0 00 62 18 ld [ %g1 + 0x218 ], %l0 ! 2017618 <_User_extensions_List> 2008d04: 82 10 62 18 or %g1, 0x218, %g1 2008d08: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008d0c: 80 a4 00 11 cmp %l0, %l1 2008d10: 02 80 00 10 be 2008d50 <_User_extensions_Thread_create+0x58><== NEVER TAKEN 2008d14: 03 00 80 5d sethi %hi(0x2017400), %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)( 2008d18: a4 10 60 a4 or %g1, 0xa4, %l2 ! 20174a4 <_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 ) { 2008d1c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2008d20: 80 a0 60 00 cmp %g1, 0 2008d24: 02 80 00 07 be 2008d40 <_User_extensions_Thread_create+0x48> 2008d28: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2008d2c: 9f c0 40 00 call %g1 2008d30: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 2008d34: 80 8a 20 ff btst 0xff, %o0 2008d38: 02 80 00 08 be 2008d58 <_User_extensions_Thread_create+0x60><== NEVER TAKEN 2008d3c: 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 ) { 2008d40: 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 ) ; 2008d44: 80 a4 00 11 cmp %l0, %l1 2008d48: 32 bf ff f6 bne,a 2008d20 <_User_extensions_Thread_create+0x28> 2008d4c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 2008d50: 81 c7 e0 08 ret 2008d54: 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 ) 2008d58: 81 c7 e0 08 ret <== NOT EXECUTED 2008d5c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02008d60 <_User_extensions_Thread_delete>: */ void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 2008d60: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2008d64: 03 00 80 5d sethi %hi(0x2017400), %g1 2008d68: 82 10 62 18 or %g1, 0x218, %g1 ! 2017618 <_User_extensions_List> 2008d6c: e0 00 60 08 ld [ %g1 + 8 ], %l0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 2008d70: 80 a4 00 01 cmp %l0, %g1 2008d74: 02 80 00 0e be 2008dac <_User_extensions_Thread_delete+0x4c><== NEVER TAKEN 2008d78: a4 10 00 01 mov %g1, %l2 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( 2008d7c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008d80: a2 10 60 a4 or %g1, 0xa4, %l1 ! 20174a4 <_Thread_Executing> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 2008d84: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 2008d88: 80 a0 60 00 cmp %g1, 0 2008d8c: 02 80 00 04 be 2008d9c <_User_extensions_Thread_delete+0x3c> 2008d90: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_delete)( 2008d94: 9f c0 40 00 call %g1 2008d98: d0 04 40 00 ld [ %l1 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 2008d9c: e0 04 20 04 ld [ %l0 + 4 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 2008da0: 80 a4 00 12 cmp %l0, %l2 2008da4: 32 bf ff f9 bne,a 2008d88 <_User_extensions_Thread_delete+0x28> 2008da8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 2008dac: 81 c7 e0 08 ret 2008db0: 81 e8 00 00 restore =============================================================================== 02008c58 <_User_extensions_Thread_exitted>: */ void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 2008c58: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2008c5c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008c60: 82 10 62 18 or %g1, 0x218, %g1 ! 2017618 <_User_extensions_List> 2008c64: e0 00 60 08 ld [ %g1 + 8 ], %l0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 2008c68: 80 a4 00 01 cmp %l0, %g1 2008c6c: 02 80 00 0c be 2008c9c <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 2008c70: a2 10 00 01 mov %g1, %l1 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 2008c74: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 2008c78: 80 a0 60 00 cmp %g1, 0 2008c7c: 02 80 00 04 be 2008c8c <_User_extensions_Thread_exitted+0x34> 2008c80: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 2008c84: 9f c0 40 00 call %g1 2008c88: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 2008c8c: e0 04 20 04 ld [ %l0 + 4 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 2008c90: 80 a4 00 11 cmp %l0, %l1 2008c94: 32 bf ff f9 bne,a 2008c78 <_User_extensions_Thread_exitted+0x20> 2008c98: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 2008c9c: 81 c7 e0 08 ret 2008ca0: 81 e8 00 00 restore =============================================================================== 020099e8 <_User_extensions_Thread_restart>: */ void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 20099e8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 20099ec: 03 00 80 6a sethi %hi(0x201a800), %g1 20099f0: e0 00 63 48 ld [ %g1 + 0x348 ], %l0 ! 201ab48 <_User_extensions_List> 20099f4: 82 10 63 48 or %g1, 0x348, %g1 20099f8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 20099fc: 80 a4 00 11 cmp %l0, %l1 2009a00: 02 80 00 0d be 2009a34 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 2009a04: 03 00 80 6a sethi %hi(0x201a800), %g1 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( 2009a08: a4 10 61 d4 or %g1, 0x1d4, %l2 ! 201a9d4 <_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_restart != NULL ) 2009a0c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2009a10: 80 a0 60 00 cmp %g1, 0 2009a14: 02 80 00 04 be 2009a24 <_User_extensions_Thread_restart+0x3c> 2009a18: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_restart)( 2009a1c: 9f c0 40 00 call %g1 2009a20: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2009a24: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2009a28: 80 a4 00 11 cmp %l0, %l1 2009a2c: 32 bf ff f9 bne,a 2009a10 <_User_extensions_Thread_restart+0x28> 2009a30: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2009a34: 81 c7 e0 08 ret 2009a38: 81 e8 00 00 restore =============================================================================== 02008db4 <_User_extensions_Thread_start>: */ void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 2008db4: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2008db8: 03 00 80 5d sethi %hi(0x2017400), %g1 2008dbc: e0 00 62 18 ld [ %g1 + 0x218 ], %l0 ! 2017618 <_User_extensions_List> 2008dc0: 82 10 62 18 or %g1, 0x218, %g1 2008dc4: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008dc8: 80 a4 00 11 cmp %l0, %l1 2008dcc: 02 80 00 0d be 2008e00 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 2008dd0: 03 00 80 5d sethi %hi(0x2017400), %g1 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( 2008dd4: a4 10 60 a4 or %g1, 0xa4, %l2 ! 20174a4 <_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_start != NULL ) 2008dd8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2008ddc: 80 a0 60 00 cmp %g1, 0 2008de0: 02 80 00 04 be 2008df0 <_User_extensions_Thread_start+0x3c> 2008de4: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_start)( 2008de8: 9f c0 40 00 call %g1 2008dec: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2008df0: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008df4: 80 a4 00 11 cmp %l0, %l1 2008df8: 32 bf ff f9 bne,a 2008ddc <_User_extensions_Thread_start+0x28> 2008dfc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2008e00: 81 c7 e0 08 ret 2008e04: 81 e8 00 00 restore =============================================================================== 02008e08 <_User_extensions_Thread_switch>: */ void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 2008e08: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 2008e0c: 03 00 80 5c sethi %hi(0x2017000), %g1 2008e10: e0 00 63 e4 ld [ %g1 + 0x3e4 ], %l0 ! 20173e4 <_User_extensions_Switches_list> 2008e14: 82 10 63 e4 or %g1, 0x3e4, %g1 2008e18: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; 2008e1c: 80 a4 00 11 cmp %l0, %l1 2008e20: 02 80 00 0a be 2008e48 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 2008e24: 01 00 00 00 nop the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 2008e28: c2 04 20 08 ld [ %l0 + 8 ], %g1 2008e2c: 90 10 00 18 mov %i0, %o0 2008e30: 9f c0 40 00 call %g1 2008e34: 92 10 00 19 mov %i1, %o1 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 2008e38: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; 2008e3c: 80 a4 00 11 cmp %l0, %l1 2008e40: 32 bf ff fb bne,a 2008e2c <_User_extensions_Thread_switch+0x24> 2008e44: c2 04 20 08 ld [ %l0 + 8 ], %g1 2008e48: 81 c7 e0 08 ret 2008e4c: 81 e8 00 00 restore =============================================================================== 0200acd4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200acd4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200acd8: 7f ff df 60 call 2002a58 200acdc: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200ace0: 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; 200ace4: 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 ) ) { 200ace8: 80 a0 80 10 cmp %g2, %l0 200acec: 02 80 00 1f be 200ad68 <_Watchdog_Adjust+0x94> 200acf0: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200acf4: 12 80 00 1f bne 200ad70 <_Watchdog_Adjust+0x9c> 200acf8: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200acfc: 80 a6 a0 00 cmp %i2, 0 200ad00: 02 80 00 1a be 200ad68 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200ad04: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200ad08: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200ad0c: 80 a6 80 19 cmp %i2, %i1 200ad10: 1a 80 00 0b bcc 200ad3c <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN 200ad14: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 200ad18: 10 80 00 1d b 200ad8c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200ad1c: 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 ) { 200ad20: b4 a6 80 19 subcc %i2, %i1, %i2 200ad24: 02 80 00 11 be 200ad68 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200ad28: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200ad2c: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200ad30: 80 a6 40 1a cmp %i1, %i2 200ad34: 18 80 00 16 bgu 200ad8c <_Watchdog_Adjust+0xb8> 200ad38: 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; 200ad3c: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 200ad40: 7f ff df 4a call 2002a68 200ad44: 01 00 00 00 nop _Watchdog_Tickle( header ); 200ad48: 40 00 00 b4 call 200b018 <_Watchdog_Tickle> 200ad4c: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200ad50: 7f ff df 42 call 2002a58 200ad54: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200ad58: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 200ad5c: 80 a4 00 01 cmp %l0, %g1 200ad60: 12 bf ff f0 bne 200ad20 <_Watchdog_Adjust+0x4c> 200ad64: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 200ad68: 7f ff df 40 call 2002a68 200ad6c: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200ad70: 12 bf ff fe bne 200ad68 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200ad74: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200ad78: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200ad7c: 82 00 40 1a add %g1, %i2, %g1 200ad80: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 200ad84: 7f ff df 39 call 2002a68 200ad88: 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; 200ad8c: 10 bf ff f7 b 200ad68 <_Watchdog_Adjust+0x94> 200ad90: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] =============================================================================== 02016418 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 2016418: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 201641c: a2 96 60 00 orcc %i1, 0, %l1 2016420: 12 80 00 04 bne 2016430 <_Watchdog_Adjust_to_chain+0x18> 2016424: 01 00 00 00 nop 2016428: 81 c7 e0 08 ret 201642c: 81 e8 00 00 restore return; } _ISR_Disable( level ); 2016430: 7f ff d3 91 call 200b274 2016434: 01 00 00 00 nop 2016438: a6 10 00 08 mov %o0, %l3 201643c: 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; 2016440: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 2016444: 80 a0 80 10 cmp %g2, %l0 2016448: 02 80 00 25 be 20164dc <_Watchdog_Adjust_to_chain+0xc4> 201644c: a4 06 a0 04 add %i2, 4, %l2 2016450: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 2016454: 80 a6 40 11 cmp %i1, %l1 2016458: 18 80 00 20 bgu 20164d8 <_Watchdog_Adjust_to_chain+0xc0> 201645c: 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; 2016460: 10 80 00 15 b 20164b4 <_Watchdog_Adjust_to_chain+0x9c> 2016464: 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; 2016468: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 201646c: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2016470: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 2016474: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 2016478: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 201647c: 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; 2016480: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 2016484: 7f ff d3 80 call 200b284 2016488: 90 10 00 13 mov %l3, %o0 201648c: 7f ff d3 7a call 200b274 2016490: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2016494: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 2016498: 80 a4 00 02 cmp %l0, %g2 201649c: 02 80 00 10 be 20164dc <_Watchdog_Adjust_to_chain+0xc4> 20164a0: 01 00 00 00 nop 20164a4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20164a8: 80 a0 60 00 cmp %g1, 0 20164ac: 32 80 00 07 bne,a 20164c8 <_Watchdog_Adjust_to_chain+0xb0> 20164b0: 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)) 20164b4: 80 a4 00 02 cmp %l0, %g2 20164b8: 32 bf ff ec bne,a 2016468 <_Watchdog_Adjust_to_chain+0x50><== ALWAYS TAKEN 20164bc: c2 00 80 00 ld [ %g2 ], %g1 20164c0: 10 bf ff ec b 2016470 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 20164c4: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 20164c8: 02 80 00 05 be 20164dc <_Watchdog_Adjust_to_chain+0xc4> <== ALWAYS TAKEN 20164cc: 01 00 00 00 nop 20164d0: 10 bf ff e1 b 2016454 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 20164d4: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 20164d8: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 20164dc: 7f ff d3 6a call 200b284 20164e0: 91 e8 00 13 restore %g0, %l3, %o0 =============================================================================== 02008e50 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008e50: 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; 2008e54: 03 00 80 5d sethi %hi(0x2017400), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008e58: 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; 2008e5c: e6 00 60 80 ld [ %g1 + 0x80 ], %l3 _ISR_Disable( level ); 2008e60: 7f ff e3 e1 call 2001de4 2008e64: 01 00 00 00 nop 2008e68: 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 ) { 2008e6c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008e70: 80 a0 60 00 cmp %g1, 0 2008e74: 12 80 00 4a bne 2008f9c <_Watchdog_Insert+0x14c> <== NEVER TAKEN 2008e78: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 2008e7c: 2b 00 80 5d sethi %hi(0x2017400), %l5 2008e80: c2 05 61 30 ld [ %l5 + 0x130 ], %g1 ! 2017530 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008e84: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 2008e88: 82 00 60 01 inc %g1 2008e8c: 2f 00 80 5d sethi %hi(0x2017400), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008e90: c4 26 60 08 st %g2, [ %i1 + 8 ] 2008e94: a8 15 e0 a0 or %l7, 0xa0, %l4 _Watchdog_Sync_count++; 2008e98: c2 25 61 30 st %g1, [ %l5 + 0x130 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 2008e9c: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008ea0: 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 ; 2008ea4: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 2008ea8: 80 a4 a0 00 cmp %l2, 0 2008eac: 02 80 00 2b be 2008f58 <_Watchdog_Insert+0x108> <== NEVER TAKEN 2008eb0: 03 00 80 5d sethi %hi(0x2017400), %g1 2008eb4: c2 04 40 00 ld [ %l1 ], %g1 2008eb8: 80 a0 60 00 cmp %g1, 0 2008ebc: 02 80 00 27 be 2008f58 <_Watchdog_Insert+0x108> 2008ec0: 03 00 80 5d sethi %hi(0x2017400), %g1 break; if ( delta_interval < after->delta_interval ) { 2008ec4: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008ec8: 80 a4 80 10 cmp %l2, %l0 2008ecc: 1a 80 00 13 bcc 2008f18 <_Watchdog_Insert+0xc8> 2008ed0: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 2008ed4: 10 80 00 20 b 2008f54 <_Watchdog_Insert+0x104> 2008ed8: 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 ) { 2008edc: c2 05 00 00 ld [ %l4 ], %g1 2008ee0: 80 a4 c0 01 cmp %l3, %g1 2008ee4: 0a 80 00 30 bcs 2008fa4 <_Watchdog_Insert+0x154> 2008ee8: 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 ) ) 2008eec: a4 a4 80 10 subcc %l2, %l0, %l2 2008ef0: 02 80 00 19 be 2008f54 <_Watchdog_Insert+0x104> 2008ef4: e2 04 40 00 ld [ %l1 ], %l1 2008ef8: c2 04 40 00 ld [ %l1 ], %g1 2008efc: 80 a0 60 00 cmp %g1, 0 2008f00: 02 80 00 16 be 2008f58 <_Watchdog_Insert+0x108> 2008f04: 03 00 80 5d sethi %hi(0x2017400), %g1 break; if ( delta_interval < after->delta_interval ) { 2008f08: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008f0c: 80 a4 00 12 cmp %l0, %l2 2008f10: 18 80 00 10 bgu 2008f50 <_Watchdog_Insert+0x100> 2008f14: 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 ); 2008f18: 7f ff e3 b7 call 2001df4 2008f1c: 90 10 00 18 mov %i0, %o0 2008f20: 7f ff e3 b1 call 2001de4 2008f24: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 2008f28: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008f2c: 80 a0 60 01 cmp %g1, 1 2008f30: 02 bf ff eb be 2008edc <_Watchdog_Insert+0x8c> <== ALWAYS TAKEN 2008f34: 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; 2008f38: e6 25 e0 a0 st %l3, [ %l7 + 0xa0 ] <== NOT EXECUTED _Watchdog_Sync_count--; 2008f3c: c2 05 61 30 ld [ %l5 + 0x130 ], %g1 <== NOT EXECUTED 2008f40: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2008f44: c2 25 61 30 st %g1, [ %l5 + 0x130 ] <== NOT EXECUTED _ISR_Enable( level ); 2008f48: 7f ff e3 ab call 2001df4 <== NOT EXECUTED 2008f4c: 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; 2008f50: 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; 2008f54: 03 00 80 5d sethi %hi(0x2017400), %g1 2008f58: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2017534 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 2008f5c: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 2008f60: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 2008f64: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 2008f68: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2008f6c: 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; 2008f70: e6 25 e0 a0 st %l3, [ %l7 + 0xa0 ] 2008f74: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 2008f78: c2 05 61 30 ld [ %l5 + 0x130 ], %g1 after_node->next = the_node; 2008f7c: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2008f80: c4 26 60 04 st %g2, [ %i1 + 4 ] 2008f84: 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; 2008f88: 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; 2008f8c: c8 26 40 00 st %g4, [ %i1 ] 2008f90: c2 25 61 30 st %g1, [ %l5 + 0x130 ] _ISR_Enable( level ); 2008f94: 7f ff e3 98 call 2001df4 2008f98: 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 ); 2008f9c: 7f ff e3 96 call 2001df4 <== NOT EXECUTED 2008fa0: 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; 2008fa4: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008fa8: 10 bf ff bf b 2008ea4 <_Watchdog_Insert+0x54> 2008fac: e4 06 60 0c ld [ %i1 + 0xc ], %l2 =============================================================================== 02008ffc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2008ffc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009000: 7f ff e3 79 call 2001de4 2009004: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 2009008: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 200900c: 80 a6 20 01 cmp %i0, 1 2009010: 02 80 00 2a be 20090b8 <_Watchdog_Remove+0xbc> <== NEVER TAKEN 2009014: 03 00 80 5d sethi %hi(0x2017400), %g1 2009018: 1a 80 00 09 bcc 200903c <_Watchdog_Remove+0x40> 200901c: 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; 2009020: 03 00 80 5d sethi %hi(0x2017400), %g1 2009024: c4 00 61 34 ld [ %g1 + 0x134 ], %g2 ! 2017534 <_Watchdog_Ticks_since_boot> 2009028: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 200902c: 7f ff e3 72 call 2001df4 2009030: 01 00 00 00 nop return( previous_state ); } 2009034: 81 c7 e0 08 ret 2009038: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 200903c: 18 bf ff fa bgu 2009024 <_Watchdog_Remove+0x28> <== NEVER TAKEN 2009040: 03 00 80 5d sethi %hi(0x2017400), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 2009044: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009048: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200904c: c2 01 00 00 ld [ %g4 ], %g1 2009050: 80 a0 60 00 cmp %g1, 0 2009054: 02 80 00 07 be 2009070 <_Watchdog_Remove+0x74> 2009058: 03 00 80 5d sethi %hi(0x2017400), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 200905c: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 2009060: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 2009064: 82 00 40 02 add %g1, %g2, %g1 2009068: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 200906c: 03 00 80 5d sethi %hi(0x2017400), %g1 2009070: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 2017530 <_Watchdog_Sync_count> 2009074: 80 a0 a0 00 cmp %g2, 0 2009078: 22 80 00 07 be,a 2009094 <_Watchdog_Remove+0x98> <== ALWAYS TAKEN 200907c: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 2009080: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 2009084: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 ! 2017480 <_ISR_Nest_level><== NOT EXECUTED 2009088: 05 00 80 5d sethi %hi(0x2017400), %g2 <== NOT EXECUTED 200908c: c6 20 a0 a0 st %g3, [ %g2 + 0xa0 ] ! 20174a0 <_Watchdog_Sync_level><== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2009090: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 2009094: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009098: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200909c: 03 00 80 5d sethi %hi(0x2017400), %g1 20090a0: c4 00 61 34 ld [ %g1 + 0x134 ], %g2 ! 2017534 <_Watchdog_Ticks_since_boot> 20090a4: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 20090a8: 7f ff e3 53 call 2001df4 20090ac: 01 00 00 00 nop return( previous_state ); } 20090b0: 81 c7 e0 08 ret 20090b4: 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; 20090b8: c4 00 61 34 ld [ %g1 + 0x134 ], %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; 20090bc: 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; 20090c0: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 20090c4: 7f ff e3 4c call 2001df4 <== NOT EXECUTED 20090c8: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 20090cc: 81 c7 e0 08 ret <== NOT EXECUTED 20090d0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020090d4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 20090d4: 9d e3 bf 98 save %sp, -104, %sp * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 20090d8: 7f ff e3 43 call 2001de4 20090dc: a4 10 00 18 mov %i0, %l2 20090e0: b0 10 00 08 mov %o0, %i0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20090e4: c4 04 80 00 ld [ %l2 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20090e8: a6 04 a0 04 add %l2, 4, %l3 if ( _Chain_Is_empty( header ) ) 20090ec: 80 a0 80 13 cmp %g2, %l3 20090f0: 02 80 00 0a be 2009118 <_Watchdog_Tickle+0x44> 20090f4: 01 00 00 00 nop * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 20090f8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20090fc: 80 a0 60 00 cmp %g1, 0 2009100: 02 80 00 16 be 2009158 <_Watchdog_Tickle+0x84> <== NEVER TAKEN 2009104: a2 10 00 02 mov %g2, %l1 the_watchdog->delta_interval--; 2009108: 82 00 7f ff add %g1, -1, %g1 if ( the_watchdog->delta_interval != 0 ) 200910c: 80 a0 60 00 cmp %g1, 0 2009110: 02 80 00 12 be 2009158 <_Watchdog_Tickle+0x84> 2009114: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 2009118: 7f ff e3 37 call 2001df4 200911c: 81 e8 00 00 restore _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 2009120: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 2009124: 9f c0 40 00 call %g1 2009128: d0 04 60 20 ld [ %l1 + 0x20 ], %o0 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 200912c: 7f ff e3 2e call 2001de4 2009130: 01 00 00 00 nop 2009134: b0 10 00 08 mov %o0, %i0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 2009138: c2 04 80 00 ld [ %l2 ], %g1 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 200913c: 80 a4 c0 01 cmp %l3, %g1 2009140: 02 bf ff f6 be 2009118 <_Watchdog_Tickle+0x44> 2009144: a2 10 00 01 mov %g1, %l1 2009148: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200914c: 80 a0 60 00 cmp %g1, 0 2009150: 12 bf ff f2 bne 2009118 <_Watchdog_Tickle+0x44> 2009154: 01 00 00 00 nop if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 2009158: 7f ff ff a9 call 2008ffc <_Watchdog_Remove> 200915c: 90 10 00 11 mov %l1, %o0 2009160: a0 10 00 08 mov %o0, %l0 _ISR_Enable( level ); 2009164: 7f ff e3 24 call 2001df4 2009168: 90 10 00 18 mov %i0, %o0 switch( watchdog_state ) { 200916c: 80 a4 20 02 cmp %l0, 2 2009170: 12 bf ff ef bne 200912c <_Watchdog_Tickle+0x58> <== NEVER TAKEN 2009174: 01 00 00 00 nop case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 2009178: 10 bf ff ea b 2009120 <_Watchdog_Tickle+0x4c> 200917c: d2 04 60 24 ld [ %l1 + 0x24 ], %o1 =============================================================================== 020091ec <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 20091ec: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 20091f0: 80 a6 20 00 cmp %i0, 0 20091f4: 02 80 00 15 be 2009248 <_Workspace_Handler_initialization+0x5c> 20091f8: 80 8e 20 07 btst 7, %i0 20091fc: 12 80 00 14 bne 200924c <_Workspace_Handler_initialization+0x60><== NEVER TAKEN 2009200: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 2009204: 03 00 80 5d sethi %hi(0x2017400), %g1 2009208: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 ! 201747c <_Configuration_Table> 200920c: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 2009210: 80 a0 e0 00 cmp %g3, 0 2009214: 32 80 00 11 bne,a 2009258 <_Workspace_Handler_initialization+0x6c><== NEVER TAKEN 2009218: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 200921c: 92 10 00 18 mov %i0, %o1 2009220: 94 10 00 19 mov %i1, %o2 2009224: 11 00 80 5d sethi %hi(0x2017400), %o0 2009228: 96 10 20 08 mov 8, %o3 200922c: 7f ff f5 ab call 20068d8 <_Heap_Initialize> 2009230: 90 12 20 04 or %o0, 4, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 2009234: 80 a2 20 00 cmp %o0, 0 2009238: 02 80 00 0d be 200926c <_Workspace_Handler_initialization+0x80><== NEVER TAKEN 200923c: 92 10 20 01 mov 1, %o1 2009240: 81 c7 e0 08 ret 2009244: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 2009248: 90 10 20 00 clr %o0 200924c: 92 10 20 01 mov 1, %o1 2009250: 7f ff f6 2f call 2006b0c <_Internal_error_Occurred> 2009254: 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 ); 2009258: 92 10 20 00 clr %o1 <== NOT EXECUTED 200925c: 40 00 11 25 call 200d6f0 <== NOT EXECUTED 2009260: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 2009264: 10 bf ff ef b 2009220 <_Workspace_Handler_initialization+0x34><== NOT EXECUTED 2009268: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 200926c: 7f ff f6 28 call 2006b0c <_Internal_error_Occurred> <== NOT EXECUTED 2009270: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED =============================================================================== 02005d1c : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 2005d1c: 9d e3 bf 90 save %sp, -112, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 2005d20: a2 96 20 00 orcc %i0, 0, %l1 2005d24: 02 80 00 25 be 2005db8 <== NEVER TAKEN 2005d28: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 2005d2c: 80 a6 e0 00 cmp %i3, 0 2005d30: 02 80 00 22 be 2005db8 <== NEVER TAKEN 2005d34: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 2005d38: 80 8e 60 10 btst 0x10, %i1 2005d3c: 02 80 00 21 be 2005dc0 2005d40: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 2005d44: 02 80 00 1d be 2005db8 2005d48: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005d4c: 05 00 80 6c sethi %hi(0x201b000), %g2 2005d50: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 201b0b0 <_Thread_Dispatch_disable_level> if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 2005d54: c0 27 bf f0 clr [ %fp + -16 ] 2005d58: 82 00 60 01 inc %g1 if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 2005d5c: f4 27 bf f4 st %i2, [ %fp + -12 ] 2005d60: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 2005d64: 21 00 80 6b sethi %hi(0x201ac00), %l0 2005d68: 40 00 07 ed call 2007d1c <_Objects_Allocate> 2005d6c: 90 14 23 3c or %l0, 0x33c, %o0 ! 201af3c <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 2005d70: b4 92 20 00 orcc %o0, 0, %i2 2005d74: 02 80 00 20 be 2005df4 <== NEVER TAKEN 2005d78: 90 06 a0 14 add %i2, 0x14, %o0 return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 2005d7c: 92 07 bf f0 add %fp, -16, %o1 2005d80: 40 00 05 8e call 20073b8 <_CORE_barrier_Initialize> 2005d84: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005d88: c4 06 a0 08 ld [ %i2 + 8 ], %g2 2005d8c: 82 14 23 3c or %l0, 0x33c, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005d90: e2 26 a0 0c st %l1, [ %i2 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005d94: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 2005d98: c4 26 c0 00 st %g2, [ %i3 ] 2005d9c: 03 00 00 3f sethi %hi(0xfc00), %g1 2005da0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005da4: 84 08 80 01 and %g2, %g1, %g2 2005da8: 85 28 a0 02 sll %g2, 2, %g2 _Thread_Enable_dispatch(); 2005dac: b0 10 20 00 clr %i0 2005db0: 40 00 0b c6 call 2008cc8 <_Thread_Enable_dispatch> 2005db4: f4 20 c0 02 st %i2, [ %g3 + %g2 ] return RTEMS_SUCCESSFUL; } 2005db8: 81 c7 e0 08 ret 2005dbc: 81 e8 00 00 restore if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 2005dc0: 82 10 20 01 mov 1, %g1 2005dc4: 05 00 80 6c sethi %hi(0x201b000), %g2 2005dc8: c2 27 bf f0 st %g1, [ %fp + -16 ] 2005dcc: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 the_attributes.maximum_count = maximum_waiters; 2005dd0: f4 27 bf f4 st %i2, [ %fp + -12 ] 2005dd4: 82 00 60 01 inc %g1 2005dd8: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] 2005ddc: 21 00 80 6b sethi %hi(0x201ac00), %l0 2005de0: 40 00 07 cf call 2007d1c <_Objects_Allocate> 2005de4: 90 14 23 3c or %l0, 0x33c, %o0 ! 201af3c <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 2005de8: b4 92 20 00 orcc %o0, 0, %i2 2005dec: 12 bf ff e4 bne 2005d7c 2005df0: 90 06 a0 14 add %i2, 0x14, %o0 _Thread_Enable_dispatch(); 2005df4: 40 00 0b b5 call 2008cc8 <_Thread_Enable_dispatch> 2005df8: b0 10 20 05 mov 5, %i0 2005dfc: 81 c7 e0 08 ret 2005e00: 81 e8 00 00 restore =============================================================================== 02005ea4 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 2005ea4: 9d e3 bf 90 save %sp, -112, %sp 2005ea8: a0 10 00 18 mov %i0, %l0 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 2005eac: 80 a6 60 00 cmp %i1, 0 2005eb0: 02 80 00 12 be 2005ef8 <== NEVER TAKEN 2005eb4: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 2005eb8: 11 00 80 6b sethi %hi(0x201ac00), %o0 2005ebc: 92 10 00 10 mov %l0, %o1 2005ec0: 90 12 23 3c or %o0, 0x33c, %o0 2005ec4: 40 00 08 fe call 20082bc <_Objects_Get> 2005ec8: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 2005ecc: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005ed0: 80 a0 60 00 cmp %g1, 0 2005ed4: 12 80 00 09 bne 2005ef8 2005ed8: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 2005edc: 92 10 00 10 mov %l0, %o1 2005ee0: 94 10 20 00 clr %o2 2005ee4: 40 00 05 41 call 20073e8 <_CORE_barrier_Release> 2005ee8: 90 02 20 14 add %o0, 0x14, %o0 _Thread_Enable_dispatch(); 2005eec: b0 10 20 00 clr %i0 2005ef0: 40 00 0b 76 call 2008cc8 <_Thread_Enable_dispatch> 2005ef4: d0 26 40 00 st %o0, [ %i1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2005ef8: 81 c7 e0 08 ret 2005efc: 81 e8 00 00 restore =============================================================================== 02004ee8 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 2004ee8: 9d e3 bf 98 save %sp, -104, %sp 2004eec: 82 10 00 18 mov %i0, %g1 if ( !time_buffer ) 2004ef0: 80 a6 60 00 cmp %i1, 0 2004ef4: 02 80 00 10 be 2004f34 <== NEVER TAKEN 2004ef8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; switch ( option ) { 2004efc: 80 a0 60 04 cmp %g1, 4 2004f00: 18 80 00 0d bgu 2004f34 2004f04: b0 10 20 0a mov 0xa, %i0 2004f08: 83 28 60 02 sll %g1, 2, %g1 2004f0c: 05 00 80 13 sethi %hi(0x2004c00), %g2 2004f10: 84 10 a2 d4 or %g2, 0x2d4, %g2 ! 2004ed4 2004f14: c6 00 80 01 ld [ %g2 + %g1 ], %g3 2004f18: 81 c0 c0 00 jmp %g3 2004f1c: 01 00 00 00 nop *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 2004f20: 40 00 00 5a call 2005088 2004f24: 91 e8 00 19 restore %g0, %i1, %o0 return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 2004f28: 40 00 00 1d call 2004f9c 2004f2c: b0 10 20 00 clr %i0 2004f30: d0 26 40 00 st %o0, [ %i1 ] 2004f34: 81 c7 e0 08 ret 2004f38: 81 e8 00 00 restore return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 2004f3c: 40 00 00 20 call 2004fbc 2004f40: b0 10 20 00 clr %i0 2004f44: d0 26 40 00 st %o0, [ %i1 ] 2004f48: 81 c7 e0 08 ret 2004f4c: 81 e8 00 00 restore switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 2004f50: 40 00 00 05 call 2004f64 2004f54: 91 e8 00 19 restore %g0, %i1, %o0 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 2004f58: 40 00 00 1d call 2004fcc 2004f5c: 91 e8 00 19 restore %g0, %i1, %o0 =============================================================================== 02004f64 : rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) 2004f64: 86 92 20 00 orcc %o0, 0, %g3 2004f68: 02 80 00 0b be 2004f94 <== NEVER TAKEN 2004f6c: 90 10 20 09 mov 9, %o0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 2004f70: 03 00 80 5c sethi %hi(0x2017000), %g1 2004f74: c4 08 63 f4 ldub [ %g1 + 0x3f4 ], %g2 ! 20173f4 <_TOD_Is_set> 2004f78: 80 a0 a0 00 cmp %g2, 0 2004f7c: 02 80 00 06 be 2004f94 2004f80: 90 10 20 0b mov 0xb, %o0 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch; 2004f84: 03 00 80 5d sethi %hi(0x2017400), %g1 2004f88: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 ! 2017474 <_TOD_Now> 2004f8c: 90 10 20 00 clr %o0 2004f90: c4 20 c0 00 st %g2, [ %g3 ] return RTEMS_SUCCESSFUL; } 2004f94: 81 c3 e0 08 retl =============================================================================== 02004fcc : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 2004fcc: 9d e3 bf 60 save %sp, -160, %sp rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 2004fd0: a2 96 20 00 orcc %i0, 0, %l1 2004fd4: 02 80 00 2b be 2005080 <== NEVER TAKEN 2004fd8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 2004fdc: 03 00 80 5c sethi %hi(0x2017000), %g1 2004fe0: c4 08 63 f4 ldub [ %g1 + 0x3f4 ], %g2 ! 20173f4 <_TOD_Is_set> 2004fe4: 80 a0 a0 00 cmp %g2, 0 2004fe8: 02 80 00 26 be 2005080 2004fec: b0 10 20 0b mov 0xb, %i0 ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 2004ff0: 7f ff f3 7d call 2001de4 2004ff4: 01 00 00 00 nop 2004ff8: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 2004ffc: 40 00 05 ed call 20067b0 <_TOD_Get> 2005000: 90 07 bf e8 add %fp, -24, %o0 _ISR_Enable(level); 2005004: 7f ff f3 7c call 2001df4 2005008: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; 200500c: c2 07 bf e8 ld [ %fp + -24 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 2005010: d0 07 bf ec ld [ %fp + -20 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 2005014: c2 27 bf f0 st %g1, [ %fp + -16 ] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 2005018: 40 00 3a 56 call 2013970 <.udiv> 200501c: 92 10 23 e8 mov 0x3e8, %o1 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 2005020: 92 07 bf c4 add %fp, -60, %o1 2005024: d0 27 bf f4 st %o0, [ %fp + -12 ] 2005028: 40 00 21 74 call 200d5f8 200502c: 90 07 bf f0 add %fp, -16, %o0 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 2005030: c4 07 bf d0 ld [ %fp + -48 ], %g2 tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 2005034: 03 00 80 5d sethi %hi(0x2017400), %g1 2005038: d0 07 bf f4 ld [ %fp + -12 ], %o0 200503c: d2 00 61 80 ld [ %g1 + 0x180 ], %o1 gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 2005040: c4 24 60 08 st %g2, [ %l1 + 8 ] tmbuf->hour = time.tm_hour; 2005044: c2 07 bf cc ld [ %fp + -52 ], %g1 tmbuf->minute = time.tm_min; 2005048: c4 07 bf c8 ld [ %fp + -56 ], %g2 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; 200504c: c2 24 60 0c st %g1, [ %l1 + 0xc ] tmbuf->minute = time.tm_min; 2005050: c4 24 60 10 st %g2, [ %l1 + 0x10 ] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 2005054: c2 07 bf d8 ld [ %fp + -40 ], %g1 tmbuf->month = time.tm_mon + 1; 2005058: c4 07 bf d4 ld [ %fp + -44 ], %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 200505c: c6 07 bf c4 ld [ %fp + -60 ], %g3 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 2005060: 82 00 67 6c add %g1, 0x76c, %g1 tmbuf->month = time.tm_mon + 1; 2005064: 84 00 a0 01 inc %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 2005068: c6 24 60 14 st %g3, [ %l1 + 0x14 ] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 200506c: c2 24 40 00 st %g1, [ %l1 ] tmbuf->month = time.tm_mon + 1; 2005070: c4 24 60 04 st %g2, [ %l1 + 4 ] tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 2005074: 40 00 3a 3f call 2013970 <.udiv> 2005078: b0 10 20 00 clr %i0 200507c: d0 24 60 18 st %o0, [ %l1 + 0x18 ] return RTEMS_SUCCESSFUL; } 2005080: 81 c7 e0 08 ret 2005084: 81 e8 00 00 restore =============================================================================== 02005088 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 2005088: 9d e3 bf 90 save %sp, -112, %sp if ( !time ) 200508c: a2 96 20 00 orcc %i0, 0, %l1 2005090: 02 80 00 15 be 20050e4 <== NEVER TAKEN 2005094: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 2005098: 03 00 80 5c sethi %hi(0x2017000), %g1 200509c: c4 08 63 f4 ldub [ %g1 + 0x3f4 ], %g2 ! 20173f4 <_TOD_Is_set> 20050a0: 80 a0 a0 00 cmp %g2, 0 20050a4: 02 80 00 10 be 20050e4 20050a8: b0 10 20 0b mov 0xb, %i0 ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 20050ac: 7f ff f3 4e call 2001de4 20050b0: 01 00 00 00 nop 20050b4: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 20050b8: 40 00 05 be call 20067b0 <_TOD_Get> 20050bc: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 20050c0: 7f ff f3 4d call 2001df4 20050c4: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 20050c8: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 20050cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 20050d0: 92 10 23 e8 mov 0x3e8, %o1 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 20050d4: c2 24 40 00 st %g1, [ %l1 ] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 20050d8: 40 00 3a 26 call 2013970 <.udiv> 20050dc: b0 10 20 00 clr %i0 20050e0: d0 24 60 04 st %o0, [ %l1 + 4 ] return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 20050e4: 81 c7 e0 08 ret 20050e8: 81 e8 00 00 restore =============================================================================== 02005304 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 2005304: 9d e3 bf 98 save %sp, -104, %sp if ( !uptime ) 2005308: 90 96 20 00 orcc %i0, 0, %o0 200530c: 02 80 00 04 be 200531c <== NEVER TAKEN 2005310: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime( uptime ); 2005314: 40 00 06 46 call 2006c2c <_TOD_Get_uptime> 2005318: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 200531c: 81 c7 e0 08 ret 2005320: 81 e8 00 00 restore =============================================================================== 020062d4 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 20062d4: 9d e3 bf 90 save %sp, -112, %sp struct timespec newtime; if ( !time_buffer ) 20062d8: a0 96 20 00 orcc %i0, 0, %l0 20062dc: 02 80 00 08 be 20062fc <== NEVER TAKEN 20062e0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 20062e4: 90 10 00 10 mov %l0, %o0 20062e8: 40 00 00 6b call 2006494 <_TOD_Validate> 20062ec: b0 10 20 14 mov 0x14, %i0 20062f0: 80 8a 20 ff btst 0xff, %o0 20062f4: 12 80 00 04 bne 2006304 20062f8: 01 00 00 00 nop _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 20062fc: 81 c7 e0 08 ret 2006300: 81 e8 00 00 restore if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 2006304: 40 00 00 2f call 20063c0 <_TOD_To_seconds> 2006308: 90 10 00 10 mov %l0, %o0 newtime.tv_nsec = time_buffer->ticks * 200630c: 03 00 80 8e sethi %hi(0x2023800), %g1 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 2006310: d0 27 bf f0 st %o0, [ %fp + -16 ] newtime.tv_nsec = time_buffer->ticks * 2006314: d2 00 61 f0 ld [ %g1 + 0x1f0 ], %o1 2006318: 40 00 43 41 call 201701c <.umul> 200631c: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006320: 07 00 80 8e sethi %hi(0x2023800), %g3 2006324: c4 00 e0 50 ld [ %g3 + 0x50 ], %g2 ! 2023850 <_Thread_Dispatch_disable_level> 2006328: 89 2a 20 02 sll %o0, 2, %g4 200632c: 84 00 a0 01 inc %g2 2006330: 83 2a 20 07 sll %o0, 7, %g1 2006334: c4 20 e0 50 st %g2, [ %g3 + 0x50 ] 2006338: 82 20 40 04 sub %g1, %g4, %g1 200633c: 82 00 40 08 add %g1, %o0, %g1 2006340: 83 28 60 03 sll %g1, 3, %g1 2006344: c2 27 bf f4 st %g1, [ %fp + -12 ] (_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 2006348: 90 07 bf f0 add %fp, -16, %o0 200634c: 40 00 07 10 call 2007f8c <_TOD_Set> 2006350: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2006354: 40 00 0c 45 call 2009468 <_Thread_Enable_dispatch> 2006358: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 200635c: 81 c7 e0 08 ret 2006360: 81 e8 00 00 restore =============================================================================== 020050ec : */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 20050ec: 84 92 20 00 orcc %o0, 0, %g2 20050f0: 02 80 00 05 be 2005104 <== NEVER TAKEN 20050f4: 90 10 20 09 mov 9, %o0 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 20050f8: 03 00 80 5d sethi %hi(0x2017400), %g1 20050fc: 90 10 20 00 clr %o0 2005100: c4 20 61 88 st %g2, [ %g1 + 0x188 ] return RTEMS_SUCCESSFUL; } 2005104: 81 c3 e0 08 retl =============================================================================== 02005168 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 2005168: 9d e3 bf 98 save %sp, -104, %sp 200516c: 90 10 00 18 mov %i0, %o0 2005170: 96 10 00 1b mov %i3, %o3 2005174: 92 10 00 19 mov %i1, %o1 2005178: 94 10 00 1a mov %i2, %o2 RTEMS_API_Control *api; if ( !event_out ) 200517c: 80 a6 e0 00 cmp %i3, 0 2005180: 02 80 00 15 be 20051d4 <== NEVER TAKEN 2005184: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 2005188: 37 00 80 5d sethi %hi(0x2017400), %i3 200518c: c2 06 e0 a4 ld [ %i3 + 0xa4 ], %g1 ! 20174a4 <_Thread_Executing> if ( _Event_sets_Is_empty( event_in ) ) { 2005190: 80 a2 20 00 cmp %o0, 0 2005194: 12 80 00 06 bne 20051ac 2005198: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 *event_out = api->pending_events; 200519c: c2 00 40 00 ld [ %g1 ], %g1 20051a0: c2 22 c0 00 st %g1, [ %o3 ] 20051a4: 81 c7 e0 08 ret 20051a8: 91 e8 20 00 restore %g0, 0, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20051ac: 03 00 80 5c sethi %hi(0x2017000), %g1 20051b0: c4 00 63 e0 ld [ %g1 + 0x3e0 ], %g2 ! 20173e0 <_Thread_Dispatch_disable_level> 20051b4: 84 00 a0 01 inc %g2 20051b8: c4 20 63 e0 st %g2, [ %g1 + 0x3e0 ] return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 20051bc: 40 00 00 08 call 20051dc <_Event_Seize> 20051c0: 01 00 00 00 nop _Thread_Enable_dispatch(); 20051c4: 40 00 0a 6d call 2007b78 <_Thread_Enable_dispatch> 20051c8: 01 00 00 00 nop return( _Thread_Executing->Wait.return_code ); 20051cc: c2 06 e0 a4 ld [ %i3 + 0xa4 ], %g1 20051d0: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 } 20051d4: 81 c7 e0 08 ret 20051d8: 81 e8 00 00 restore =============================================================================== 02006f7c : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 2006f7c: 9a 92 60 00 orcc %o1, 0, %o5 2006f80: 02 80 00 4d be 20070b4 2006f84: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 2006f88: 02 80 00 4c be 20070b8 2006f8c: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 2006f90: c2 03 40 00 ld [ %o5 ], %g1 2006f94: 80 a0 60 00 cmp %g1, 0 2006f98: 22 80 00 44 be,a 20070a8 2006f9c: 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 ) 2006fa0: 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; 2006fa4: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006fa8: c8 00 62 40 ld [ %g1 + 0x240 ], %g4 2006fac: 80 a1 00 08 cmp %g4, %o0 2006fb0: 08 80 00 39 bleu 2007094 2006fb4: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 2006fb8: 80 a2 20 00 cmp %o0, 0 2006fbc: 12 80 00 29 bne 2007060 2006fc0: 03 00 80 6c sethi %hi(0x201b000), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006fc4: 90 81 3f ff addcc %g4, -1, %o0 2006fc8: 02 80 00 35 be 200709c <== NEVER TAKEN 2006fcc: 05 00 80 6c sethi %hi(0x201b000), %g2 2006fd0: c6 00 a2 44 ld [ %g2 + 0x244 ], %g3 ! 201b244 <_IO_Driver_address_table> 2006fd4: 85 29 20 03 sll %g4, 3, %g2 2006fd8: 83 29 20 05 sll %g4, 5, %g1 2006fdc: 82 20 40 02 sub %g1, %g2, %g1 2006fe0: 82 00 7f e8 add %g1, -24, %g1 2006fe4: 10 80 00 05 b 2006ff8 2006fe8: 84 00 c0 01 add %g3, %g1, %g2 2006fec: 90 82 3f ff addcc %o0, -1, %o0 2006ff0: 02 80 00 2b be 200709c 2006ff4: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 2006ff8: c2 00 80 00 ld [ %g2 ], %g1 2006ffc: 80 a0 60 00 cmp %g1, 0 2007000: 12 bf ff fb bne 2006fec 2007004: 88 10 00 02 mov %g2, %g4 2007008: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200700c: 80 a0 60 00 cmp %g1, 0 2007010: 32 bf ff f8 bne,a 2006ff0 <== NEVER TAKEN 2007014: 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; 2007018: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 200701c: 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; 2007020: c2 21 00 00 st %g1, [ %g4 ] 2007024: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007028: 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; 200702c: c4 21 20 04 st %g2, [ %g4 + 4 ] 2007030: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007034: 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; 2007038: c2 21 20 08 st %g1, [ %g4 + 8 ] 200703c: c4 03 60 0c ld [ %o5 + 0xc ], %g2 2007040: c4 21 20 0c st %g2, [ %g4 + 0xc ] 2007044: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 2007048: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 200704c: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 2007050: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007054: 82 13 c0 00 mov %o7, %g1 2007058: 7f ff ff 48 call 2006d78 200705c: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 2007060: c8 00 62 44 ld [ %g1 + 0x244 ], %g4 2007064: 85 2a 20 03 sll %o0, 3, %g2 2007068: 83 2a 20 05 sll %o0, 5, %g1 200706c: 82 20 40 02 sub %g1, %g2, %g1 2007070: c6 01 00 01 ld [ %g4 + %g1 ], %g3 2007074: 80 a0 e0 00 cmp %g3, 0 2007078: 12 80 00 06 bne 2007090 <== ALWAYS TAKEN 200707c: 88 01 00 01 add %g4, %g1, %g4 2007080: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 2007084: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007088: 22 bf ff e5 be,a 200701c <== NOT EXECUTED 200708c: 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 ); 2007090: 82 10 20 0c mov 0xc, %g1 } 2007094: 81 c3 e0 08 retl 2007098: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 200709c: 82 10 20 05 mov 5, %g1 } 20070a0: 81 c3 e0 08 retl 20070a4: 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 ) 20070a8: 80 a0 60 00 cmp %g1, 0 20070ac: 12 bf ff be bne 2006fa4 <== NEVER TAKEN 20070b0: 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 ); 20070b4: 82 10 20 09 mov 9, %g1 } 20070b8: 81 c3 e0 08 retl 20070bc: 90 10 00 01 mov %g1, %o0 =============================================================================== 020070c0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 20070c0: 9d e3 bf 98 save %sp, -104, %sp if ( major < _IO_Number_of_drivers ) { 20070c4: 03 00 80 6c sethi %hi(0x201b000), %g1 20070c8: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 201b240 <_IO_Number_of_drivers> */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 20070cc: 86 10 00 18 mov %i0, %g3 if ( major < _IO_Number_of_drivers ) { 20070d0: 80 a0 80 18 cmp %g2, %i0 20070d4: 08 80 00 0c bleu 2007104 <== NEVER TAKEN 20070d8: b0 10 20 0d mov 0xd, %i0 memset( 20070dc: 03 00 80 6c sethi %hi(0x201b000), %g1 20070e0: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 201b244 <_IO_Driver_address_table> 20070e4: 83 28 e0 03 sll %g3, 3, %g1 20070e8: 91 28 e0 05 sll %g3, 5, %o0 20070ec: 92 10 20 00 clr %o1 20070f0: 90 22 00 01 sub %o0, %g1, %o0 20070f4: 94 10 20 18 mov 0x18, %o2 20070f8: 90 00 80 08 add %g2, %o0, %o0 20070fc: 40 00 1d 4d call 200e630 2007100: b0 10 20 00 clr %i0 sizeof( rtems_driver_address_table ) ); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 2007104: 81 c7 e0 08 ret 2007108: 81 e8 00 00 restore =============================================================================== 020083a8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 20083a8: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 20083ac: 80 a6 20 00 cmp %i0, 0 20083b0: 02 80 00 23 be 200843c <== NEVER TAKEN 20083b4: 03 00 80 8d sethi %hi(0x2023400), %g1 return; 20083b8: a4 10 63 b4 or %g1, 0x3b4, %l2 ! 20237b4 <_Objects_Information_table+0x4> 20083bc: 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 ] ) 20083c0: c2 04 80 00 ld [ %l2 ], %g1 20083c4: 80 a0 60 00 cmp %g1, 0 20083c8: 22 80 00 1a be,a 2008430 20083cc: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 20083d0: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 20083d4: 80 a4 60 00 cmp %l1, 0 20083d8: 22 80 00 16 be,a 2008430 <== NEVER TAKEN 20083dc: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 20083e0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 20083e4: 86 90 60 00 orcc %g1, 0, %g3 20083e8: 22 80 00 12 be,a 2008430 <== NEVER TAKEN 20083ec: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 20083f0: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 20083f4: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 20083f8: 83 2c 20 02 sll %l0, 2, %g1 20083fc: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 2008400: 80 a2 20 00 cmp %o0, 0 2008404: 02 80 00 05 be 2008418 <== NEVER TAKEN 2008408: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 200840c: 9f c6 00 00 call %i0 2008410: 01 00 00 00 nop 2008414: 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++ ) { 2008418: 83 28 e0 10 sll %g3, 0x10, %g1 200841c: 83 30 60 10 srl %g1, 0x10, %g1 2008420: 80 a0 40 10 cmp %g1, %l0 2008424: 3a bf ff f5 bcc,a 20083f8 2008428: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 200842c: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2008430: 80 a4 80 13 cmp %l2, %l3 2008434: 32 bf ff e4 bne,a 20083c4 2008438: c2 04 80 00 ld [ %l2 ], %g1 200843c: 81 c7 e0 08 ret 2008440: 81 e8 00 00 restore =============================================================================== 0200f21c : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 200f21c: 9d e3 bf 90 save %sp, -112, %sp CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 200f220: a2 96 20 00 orcc %i0, 0, %l1 200f224: 02 80 00 26 be 200f2bc 200f228: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 200f22c: 80 a7 20 00 cmp %i4, 0 200f230: 02 80 00 23 be 200f2bc <== NEVER TAKEN 200f234: b0 10 20 09 mov 9, %i0 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 200f238: 80 a6 60 00 cmp %i1, 0 200f23c: 02 80 00 20 be 200f2bc <== NEVER TAKEN 200f240: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 200f244: 80 a6 a0 00 cmp %i2, 0 200f248: 02 80 00 1d be 200f2bc <== NEVER TAKEN 200f24c: b0 10 20 08 mov 8, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200f250: 05 00 80 c3 sethi %hi(0x2030c00), %g2 200f254: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 2030d80 <_Thread_Dispatch_disable_level> 200f258: 82 00 60 01 inc %g1 200f25c: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 200f260: 40 00 26 1f call 2018adc <_Message_queue_Allocate> 200f264: 01 00 00 00 nop if ( !the_message_queue ) { 200f268: a0 92 20 00 orcc %o0, 0, %l0 200f26c: 02 80 00 26 be 200f304 200f270: 80 8e e0 04 btst 4, %i3 } #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) 200f274: 02 80 00 14 be 200f2c4 200f278: f6 24 20 10 st %i3, [ %l0 + 0x10 ] the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 200f27c: 82 10 20 01 mov 1, %g1 200f280: c2 27 bf f4 st %g1, [ %fp + -12 ] else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 200f284: 94 10 00 19 mov %i1, %o2 200f288: 96 10 00 1a mov %i2, %o3 200f28c: 90 04 20 14 add %l0, 0x14, %o0 200f290: 40 00 0d 6b call 201283c <_CORE_message_queue_Initialize> 200f294: 92 07 bf f4 add %fp, -12, %o1 200f298: 80 8a 20 ff btst 0xff, %o0 200f29c: 12 80 00 0c bne 200f2cc 200f2a0: 92 10 00 10 mov %l0, %o1 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 200f2a4: 11 00 80 c4 sethi %hi(0x2031000), %o0 200f2a8: 90 12 20 60 or %o0, 0x60, %o0 ! 2031060 <_Message_queue_Information> 200f2ac: 40 00 13 6e call 2014064 <_Objects_Free> 200f2b0: b0 10 20 0d mov 0xd, %i0 _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 200f2b4: 40 00 16 6e call 2014c6c <_Thread_Enable_dispatch> 200f2b8: 01 00 00 00 nop 200f2bc: 81 c7 e0 08 ret 200f2c0: 81 e8 00 00 restore the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 200f2c4: 10 bf ff f0 b 200f284 200f2c8: c0 27 bf f4 clr [ %fp + -12 ] 200f2cc: c4 04 20 08 ld [ %l0 + 8 ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200f2d0: e2 24 20 0c st %l1, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200f2d4: 03 00 80 c4 sethi %hi(0x2031000), %g1 200f2d8: c6 00 60 7c ld [ %g1 + 0x7c ], %g3 ! 203107c <_Message_queue_Information+0x1c> &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 200f2dc: c4 27 00 00 st %g2, [ %i4 ] 200f2e0: 03 00 00 3f sethi %hi(0xfc00), %g1 200f2e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200f2e8: 84 08 80 01 and %g2, %g1, %g2 200f2ec: 85 28 a0 02 sll %g2, 2, %g2 name, 0 ); #endif _Thread_Enable_dispatch(); 200f2f0: b0 10 20 00 clr %i0 200f2f4: 40 00 16 5e call 2014c6c <_Thread_Enable_dispatch> 200f2f8: e0 20 c0 02 st %l0, [ %g3 + %g2 ] return RTEMS_SUCCESSFUL; } 200f2fc: 81 c7 e0 08 ret 200f300: 81 e8 00 00 restore _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 200f304: 40 00 16 5a call 2014c6c <_Thread_Enable_dispatch> 200f308: b0 10 20 05 mov 5, %i0 200f30c: 81 c7 e0 08 ret 200f310: 81 e8 00 00 restore =============================================================================== 0200f37c : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 200f37c: 9d e3 bf 90 save %sp, -112, %sp 200f380: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 200f384: 80 a6 60 00 cmp %i1, 0 200f388: 02 80 00 0f be 200f3c4 <== NEVER TAKEN 200f38c: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 200f390: 11 00 80 c4 sethi %hi(0x2031000), %o0 200f394: 94 07 bf f4 add %fp, -12, %o2 200f398: 40 00 13 b2 call 2014260 <_Objects_Get> 200f39c: 90 12 20 60 or %o0, 0x60, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 200f3a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 200f3a4: 80 a0 60 00 cmp %g1, 0 200f3a8: 12 80 00 07 bne 200f3c4 200f3ac: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 200f3b0: 40 00 0d 03 call 20127bc <_CORE_message_queue_Flush> 200f3b4: 90 02 20 14 add %o0, 0x14, %o0 _Thread_Enable_dispatch(); 200f3b8: b0 10 20 00 clr %i0 200f3bc: 40 00 16 2c call 2014c6c <_Thread_Enable_dispatch> 200f3c0: d0 26 40 00 st %o0, [ %i1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200f3c4: 81 c7 e0 08 ret 200f3c8: 81 e8 00 00 restore =============================================================================== 0200f3cc : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 200f3cc: 9d e3 bf 90 save %sp, -112, %sp 200f3d0: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 200f3d4: 80 a6 60 00 cmp %i1, 0 200f3d8: 02 80 00 0e be 200f410 <== NEVER TAKEN 200f3dc: b0 10 20 09 mov 9, %i0 200f3e0: 11 00 80 c4 sethi %hi(0x2031000), %o0 200f3e4: 94 07 bf f4 add %fp, -12, %o2 200f3e8: 40 00 13 9e call 2014260 <_Objects_Get> 200f3ec: 90 12 20 60 or %o0, 0x60, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 200f3f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 200f3f4: 80 a0 60 00 cmp %g1, 0 200f3f8: 12 80 00 06 bne 200f410 200f3fc: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 200f400: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 _Thread_Enable_dispatch(); 200f404: b0 10 20 00 clr %i0 200f408: 40 00 16 19 call 2014c6c <_Thread_Enable_dispatch> 200f40c: c2 26 40 00 st %g1, [ %i1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200f410: 81 c7 e0 08 ret 200f414: 81 e8 00 00 restore =============================================================================== 0200f4dc : rtems_status_code rtems_message_queue_send( Objects_Id id, const void *buffer, size_t size ) { 200f4dc: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 200f4e0: 80 a6 60 00 cmp %i1, 0 200f4e4: 02 80 00 0c be 200f514 <== NEVER TAKEN 200f4e8: 90 10 20 09 mov 9, %o0 200f4ec: 11 00 80 c4 sethi %hi(0x2031000), %o0 200f4f0: 92 10 00 18 mov %i0, %o1 200f4f4: 90 12 20 60 or %o0, 0x60, %o0 200f4f8: 40 00 13 5a call 2014260 <_Objects_Get> 200f4fc: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 200f500: c2 07 bf f4 ld [ %fp + -12 ], %g1 200f504: 84 10 00 08 mov %o0, %g2 200f508: 80 a0 60 00 cmp %g1, 0 200f50c: 02 80 00 04 be 200f51c 200f510: 90 10 20 04 mov 4, %o0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200f514: 81 c7 e0 08 ret 200f518: 91 e8 00 08 restore %g0, %o0, %o0 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 200f51c: 96 10 00 18 mov %i0, %o3 200f520: 92 10 00 19 mov %i1, %o1 200f524: 94 10 00 1a mov %i2, %o2 200f528: 90 00 a0 14 add %g2, 0x14, %o0 200f52c: 98 10 20 00 clr %o4 200f530: c0 23 a0 5c clr [ %sp + 0x5c ] 200f534: c0 23 a0 60 clr [ %sp + 0x60 ] 200f538: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5 200f53c: 40 00 0d 31 call 2012a00 <_CORE_message_queue_Submit> 200f540: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 200f544: 40 00 15 ca call 2014c6c <_Thread_Enable_dispatch> 200f548: a0 10 00 08 mov %o0, %l0 /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 200f54c: 40 00 00 04 call 200f55c <_Message_queue_Translate_core_message_queue_return_code> 200f550: 90 10 00 10 mov %l0, %o0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200f554: 81 c7 e0 08 ret 200f558: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200f570 : rtems_status_code rtems_message_queue_urgent( Objects_Id id, const void *buffer, size_t size ) { 200f570: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 200f574: 80 a6 60 00 cmp %i1, 0 200f578: 02 80 00 0c be 200f5a8 <== NEVER TAKEN 200f57c: 90 10 20 09 mov 9, %o0 200f580: 11 00 80 c4 sethi %hi(0x2031000), %o0 200f584: 92 10 00 18 mov %i0, %o1 200f588: 90 12 20 60 or %o0, 0x60, %o0 200f58c: 40 00 13 35 call 2014260 <_Objects_Get> 200f590: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 200f594: c2 07 bf f4 ld [ %fp + -12 ], %g1 200f598: 84 10 00 08 mov %o0, %g2 200f59c: 80 a0 60 00 cmp %g1, 0 200f5a0: 02 80 00 04 be 200f5b0 200f5a4: 90 10 20 04 mov 4, %o0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200f5a8: 81 c7 e0 08 ret 200f5ac: 91 e8 00 08 restore %g0, %o0, %o0 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 200f5b0: 96 10 00 18 mov %i0, %o3 200f5b4: 92 10 00 19 mov %i1, %o1 200f5b8: 94 10 00 1a mov %i2, %o2 200f5bc: 90 00 a0 14 add %g2, 0x14, %o0 200f5c0: 98 10 20 00 clr %o4 200f5c4: 1b 20 00 00 sethi %hi(0x80000000), %o5 200f5c8: c0 23 a0 5c clr [ %sp + 0x5c ] 200f5cc: 40 00 0d 0d call 2012a00 <_CORE_message_queue_Submit> 200f5d0: c0 23 a0 60 clr [ %sp + 0x60 ] id, MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 200f5d4: 40 00 15 a6 call 2014c6c <_Thread_Enable_dispatch> 200f5d8: a0 10 00 08 mov %o0, %l0 /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 200f5dc: 7f ff ff e0 call 200f55c <_Message_queue_Translate_core_message_queue_return_code> 200f5e0: 90 10 00 10 mov %l0, %o0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200f5e4: 81 c7 e0 08 ret 200f5e8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02006f14 : rtems_status_code rtems_object_get_class_information( uint32_t the_api, uint32_t the_class, rtems_object_api_class_information *info ) { 2006f14: 9d e3 bf 98 save %sp, -104, %sp 2006f18: 90 10 00 18 mov %i0, %o0 2006f1c: 92 10 00 19 mov %i1, %o1 uint32_t i; /* * Validate parameters and look up information structure. */ if ( !info ) 2006f20: 80 a6 a0 00 cmp %i2, 0 2006f24: 02 80 00 1f be 2006fa0 2006f28: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 2006f2c: 40 00 07 09 call 2008b50 <_Objects_Get_information> 2006f30: b0 10 20 0a mov 0xa, %i0 if ( !obj_info ) 2006f34: 80 a2 20 00 cmp %o0, 0 2006f38: 02 80 00 1a be 2006fa0 2006f3c: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 2006f40: c2 02 20 08 ld [ %o0 + 8 ], %g1 info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 2006f44: da 12 20 10 lduh [ %o0 + 0x10 ], %o5 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 2006f48: c2 26 80 00 st %g1, [ %i2 ] info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 2006f4c: c4 0a 20 12 ldub [ %o0 + 0x12 ], %g2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 2006f50: c2 02 20 0c ld [ %o0 + 0xc ], %g1 info->auto_extend = obj_info->auto_extend; 2006f54: c4 2e a0 0c stb %g2, [ %i2 + 0xc ] /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 2006f58: c2 26 a0 04 st %g1, [ %i2 + 4 ] info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 2006f5c: da 26 a0 08 st %o5, [ %i2 + 8 ] for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 2006f60: 80 a3 60 00 cmp %o5, 0 2006f64: 02 80 00 0d be 2006f98 <== NEVER TAKEN 2006f68: 88 10 20 00 clr %g4 2006f6c: d0 02 20 1c ld [ %o0 + 0x1c ], %o0 2006f70: 88 10 20 00 clr %g4 2006f74: 86 10 20 01 mov 1, %g3 if ( !obj_info->local_table[i] ) 2006f78: 83 28 e0 02 sll %g3, 2, %g1 2006f7c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 2006f80: 86 00 e0 01 inc %g3 if ( !obj_info->local_table[i] ) unallocated++; 2006f84: 80 a0 00 02 cmp %g0, %g2 2006f88: 88 61 3f ff subx %g4, -1, %g4 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 2006f8c: 80 a3 40 03 cmp %o5, %g3 2006f90: 1a bf ff fb bcc 2006f7c 2006f94: 83 28 e0 02 sll %g3, 2, %g1 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 2006f98: c8 26 a0 10 st %g4, [ %i2 + 0x10 ] 2006f9c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 2006fa0: 81 c7 e0 08 ret 2006fa4: 81 e8 00 00 restore =============================================================================== 02006ff8 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 2006ff8: 9d e3 bf 90 save %sp, -112, %sp 2006ffc: 90 10 00 18 mov %i0, %o0 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 2007000: 80 a6 60 00 cmp %i1, 0 2007004: 02 80 00 16 be 200705c <== NEVER TAKEN 2007008: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 200700c: b0 92 20 00 orcc %o0, 0, %i0 2007010: 02 80 00 18 be 2007070 2007014: 03 00 80 71 sethi %hi(0x201c400), %g1 information = _Objects_Get_information_id( tmpId ); 2007018: 40 00 06 c7 call 2008b34 <_Objects_Get_information_id> 200701c: 90 10 00 18 mov %i0, %o0 if ( !information ) 2007020: a0 92 20 00 orcc %o0, 0, %l0 2007024: 02 80 00 10 be 2007064 2007028: 92 10 00 18 mov %i0, %o1 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 200702c: 40 00 07 56 call 2008d84 <_Objects_Get> 2007030: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 2007034: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007038: 80 a0 60 00 cmp %g1, 0 200703c: 32 80 00 08 bne,a 200705c 2007040: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 2007044: 92 10 00 08 mov %o0, %o1 2007048: 94 10 00 19 mov %i1, %o2 200704c: 40 00 07 e6 call 2008fe4 <_Objects_Set_name> 2007050: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 2007054: 40 00 0a 13 call 20098a0 <_Thread_Enable_dispatch> 2007058: b0 10 20 00 clr %i0 200705c: 81 c7 e0 08 ret 2007060: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 2007064: b0 10 20 04 mov 4, %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007068: 81 c7 e0 08 ret 200706c: 81 e8 00 00 restore Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2007070: c4 00 62 f4 ld [ %g1 + 0x2f4 ], %g2 2007074: 10 bf ff e9 b 2007018 2007078: f0 00 a0 08 ld [ %g2 + 8 ], %i0 =============================================================================== 0200f5ec : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 200f5ec: 9d e3 bf 98 save %sp, -104, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 200f5f0: a4 96 20 00 orcc %i0, 0, %l2 200f5f4: 02 80 00 36 be 200f6cc 200f5f8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 200f5fc: 80 a6 60 00 cmp %i1, 0 200f600: 02 80 00 35 be 200f6d4 <== NEVER TAKEN 200f604: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 200f608: 02 80 00 33 be 200f6d4 <== NEVER TAKEN 200f60c: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 200f610: 12 80 00 04 bne 200f620 200f614: 80 a6 e0 00 cmp %i3, 0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 200f618: 81 c7 e0 08 ret 200f61c: 91 e8 20 08 restore %g0, 8, %o0 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 200f620: 02 80 00 2b be 200f6cc 200f624: b0 10 20 08 mov 8, %i0 200f628: 80 a6 80 1b cmp %i2, %i3 200f62c: 0a 80 00 28 bcs 200f6cc 200f630: 80 8e e0 07 btst 7, %i3 200f634: 12 80 00 26 bne 200f6cc 200f638: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 200f63c: 12 80 00 26 bne 200f6d4 200f640: 05 00 80 c3 sethi %hi(0x2030c00), %g2 200f644: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 2030d80 <_Thread_Dispatch_disable_level> 200f648: 82 00 60 01 inc %g1 200f64c: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 200f650: 31 00 80 c2 sethi %hi(0x2030800), %i0 200f654: 40 00 11 89 call 2013c78 <_Objects_Allocate> 200f658: 90 16 23 34 or %i0, 0x334, %o0 ! 2030b34 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 200f65c: a2 92 20 00 orcc %o0, 0, %l1 200f660: 02 80 00 1f be 200f6dc 200f664: 92 10 00 1b mov %i3, %o1 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 200f668: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 200f66c: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 200f670: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 200f674: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 200f678: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 200f67c: 40 00 4c ba call 2022964 <.udiv> 200f680: 90 10 00 1a mov %i2, %o0 200f684: 92 10 00 19 mov %i1, %o1 200f688: 94 10 00 08 mov %o0, %o2 200f68c: 96 10 00 1b mov %i3, %o3 200f690: a0 04 60 24 add %l1, 0x24, %l0 200f694: 40 00 0c 06 call 20126ac <_Chain_Initialize> 200f698: 90 10 00 10 mov %l0, %o0 200f69c: c4 04 60 08 ld [ %l1 + 8 ], %g2 200f6a0: 82 16 23 34 or %i0, 0x334, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200f6a4: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200f6a8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 200f6ac: c4 27 40 00 st %g2, [ %i5 ] 200f6b0: 03 00 00 3f sethi %hi(0xfc00), %g1 200f6b4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200f6b8: 84 08 80 01 and %g2, %g1, %g2 200f6bc: 85 28 a0 02 sll %g2, 2, %g2 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 200f6c0: b0 10 20 00 clr %i0 200f6c4: 40 00 15 6a call 2014c6c <_Thread_Enable_dispatch> 200f6c8: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 200f6cc: 81 c7 e0 08 ret 200f6d0: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 200f6d4: 81 c7 e0 08 ret 200f6d8: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 200f6dc: 40 00 15 64 call 2014c6c <_Thread_Enable_dispatch> 200f6e0: b0 10 20 05 mov 5, %i0 200f6e4: 81 c7 e0 08 ret 200f6e8: 81 e8 00 00 restore =============================================================================== 0200f760 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 200f760: 9d e3 bf 90 save %sp, -112, %sp 200f764: 92 10 00 18 mov %i0, %o1 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 200f768: 80 a6 60 00 cmp %i1, 0 200f76c: 02 80 00 19 be 200f7d0 <== NEVER TAKEN 200f770: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 200f774: 11 00 80 c2 sethi %hi(0x2030800), %o0 200f778: 94 07 bf f4 add %fp, -12, %o2 200f77c: 40 00 12 b9 call 2014260 <_Objects_Get> 200f780: 90 12 23 34 or %o0, 0x334, %o0 return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 200f784: c2 07 bf f4 ld [ %fp + -12 ], %g1 200f788: a0 10 00 08 mov %o0, %l0 200f78c: 80 a0 60 00 cmp %g1, 0 200f790: 12 80 00 10 bne 200f7d0 200f794: b0 10 20 04 mov 4, %i0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 200f798: 40 00 0b b2 call 2012660 <_Chain_Get> 200f79c: 90 02 20 24 add %o0, 0x24, %o0 case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 200f7a0: b0 92 20 00 orcc %o0, 0, %i0 200f7a4: 02 80 00 09 be 200f7c8 200f7a8: 01 00 00 00 nop the_partition->number_of_used_blocks += 1; 200f7ac: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 200f7b0: 82 00 60 01 inc %g1 _Thread_Enable_dispatch(); 200f7b4: 40 00 15 2e call 2014c6c <_Thread_Enable_dispatch> 200f7b8: c2 24 20 20 st %g1, [ %l0 + 0x20 ] *buffer = the_buffer; 200f7bc: f0 26 40 00 st %i0, [ %i1 ] 200f7c0: 81 c7 e0 08 ret 200f7c4: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 200f7c8: 40 00 15 29 call 2014c6c <_Thread_Enable_dispatch> 200f7cc: b0 10 20 0d mov 0xd, %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200f7d0: 81 c7 e0 08 ret 200f7d4: 81 e8 00 00 restore =============================================================================== 0200eb30 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 200eb30: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 200eb34: a0 96 20 00 orcc %i0, 0, %l0 200eb38: 02 80 00 22 be 200ebc0 200eb3c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 200eb40: 80 a7 20 00 cmp %i4, 0 200eb44: 02 80 00 05 be 200eb58 <== NEVER TAKEN 200eb48: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 200eb4c: 80 88 60 07 btst 7, %g1 200eb50: 02 80 00 04 be 200eb60 200eb54: 05 00 80 c3 sethi %hi(0x2030c00), %g2 ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 200eb58: 81 c7 e0 08 ret 200eb5c: 91 e8 20 09 restore %g0, 9, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200eb60: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 200eb64: 82 00 60 01 inc %g1 200eb68: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 200eb6c: 31 00 80 c2 sethi %hi(0x2030800), %i0 200eb70: 40 00 14 42 call 2013c78 <_Objects_Allocate> 200eb74: 90 16 22 f4 or %i0, 0x2f4, %o0 ! 2030af4 <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 200eb78: 80 a2 20 00 cmp %o0, 0 200eb7c: 02 80 00 13 be 200ebc8 200eb80: 82 16 22 f4 or %i0, 0x2f4, %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200eb84: c4 02 20 08 ld [ %o0 + 8 ], %g2 200eb88: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200eb8c: e0 22 20 0c st %l0, [ %o0 + 0xc ] return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 200eb90: 82 06 ff ff add %i3, -1, %g1 200eb94: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 200eb98: c4 27 00 00 st %g2, [ %i4 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200eb9c: 03 00 00 3f sethi %hi(0xfc00), %g1 200eba0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200eba4: 84 08 80 01 and %g2, %g1, %g2 200eba8: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 200ebac: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 200ebb0: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 200ebb4: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 200ebb8: 40 00 18 2d call 2014c6c <_Thread_Enable_dispatch> 200ebbc: b0 10 20 00 clr %i0 200ebc0: 81 c7 e0 08 ret 200ebc4: 81 e8 00 00 restore _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 200ebc8: 40 00 18 29 call 2014c6c <_Thread_Enable_dispatch> 200ebcc: b0 10 20 05 mov 5, %i0 200ebd0: 81 c7 e0 08 ret 200ebd4: 81 e8 00 00 restore =============================================================================== 0200ec30 : rtems_status_code rtems_port_external_to_internal( Objects_Id id, void *external, void **internal ) { 200ec30: 9d e3 bf 90 save %sp, -112, %sp 200ec34: 92 10 00 18 mov %i0, %o1 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 200ec38: 80 a6 a0 00 cmp %i2, 0 200ec3c: 02 80 00 13 be 200ec88 <== NEVER TAKEN 200ec40: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 200ec44: 11 00 80 c2 sethi %hi(0x2030800), %o0 200ec48: 94 07 bf f4 add %fp, -12, %o2 200ec4c: 40 00 15 85 call 2014260 <_Objects_Get> 200ec50: 90 12 22 f4 or %o0, 0x2f4, %o0 return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 200ec54: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ec58: 80 a0 60 00 cmp %g1, 0 200ec5c: 12 80 00 0b bne 200ec88 200ec60: b0 10 20 04 mov 4, %i0 RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract ( void *left, void *right ) { return ((char *) left - (char *) right); 200ec64: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 200ec68: c4 02 20 18 ld [ %o0 + 0x18 ], %g2 200ec6c: 86 26 40 01 sub %i1, %g1, %g3 200ec70: 80 a0 80 03 cmp %g2, %g3 200ec74: 3a 80 00 07 bcc,a 200ec90 200ec78: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 *internal = external; 200ec7c: f2 26 80 00 st %i1, [ %i2 ] else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 200ec80: 40 00 17 fb call 2014c6c <_Thread_Enable_dispatch> 200ec84: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200ec88: 81 c7 e0 08 ret 200ec8c: 81 e8 00 00 restore case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 200ec90: 82 00 40 03 add %g1, %g3, %g1 200ec94: 10 bf ff fb b 200ec80 200ec98: c2 26 80 00 st %g1, [ %i2 ] =============================================================================== 0200ecd0 : rtems_status_code rtems_port_internal_to_external( Objects_Id id, void *internal, void **external ) { 200ecd0: 9d e3 bf 90 save %sp, -112, %sp 200ecd4: 92 10 00 18 mov %i0, %o1 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 200ecd8: 80 a6 a0 00 cmp %i2, 0 200ecdc: 02 80 00 13 be 200ed28 <== NEVER TAKEN 200ece0: b0 10 20 09 mov 9, %i0 200ece4: 11 00 80 c2 sethi %hi(0x2030800), %o0 200ece8: 94 07 bf f4 add %fp, -12, %o2 200ecec: 40 00 15 5d call 2014260 <_Objects_Get> 200ecf0: 90 12 22 f4 or %o0, 0x2f4, %o0 return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 200ecf4: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ecf8: 80 a0 60 00 cmp %g1, 0 200ecfc: 12 80 00 0b bne 200ed28 200ed00: b0 10 20 04 mov 4, %i0 200ed04: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 200ed08: c4 02 20 18 ld [ %o0 + 0x18 ], %g2 200ed0c: 86 26 40 01 sub %i1, %g1, %g3 200ed10: 80 a0 80 03 cmp %g2, %g3 200ed14: 3a 80 00 07 bcc,a 200ed30 200ed18: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 *external = internal; 200ed1c: f2 26 80 00 st %i1, [ %i2 ] else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 200ed20: 40 00 17 d3 call 2014c6c <_Thread_Enable_dispatch> 200ed24: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200ed28: 81 c7 e0 08 ret 200ed2c: 81 e8 00 00 restore case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 200ed30: 82 00 40 03 add %g1, %g3, %g1 200ed34: 10 bf ff fb b 200ed20 200ed38: c2 26 80 00 st %g1, [ %i2 ] =============================================================================== 020066f0 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, Objects_Id *id ) { 20066f0: 9d e3 bf 98 save %sp, -104, %sp Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 20066f4: a2 96 20 00 orcc %i0, 0, %l1 20066f8: 02 80 00 33 be 20067c4 20066fc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 2006700: 80 a6 60 00 cmp %i1, 0 2006704: 02 80 00 30 be 20067c4 <== NEVER TAKEN 2006708: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200670c: 05 00 80 6f sethi %hi(0x201bc00), %g2 2006710: c2 00 a2 d0 ld [ %g2 + 0x2d0 ], %g1 ! 201bed0 <_Thread_Dispatch_disable_level> 2006714: 82 00 60 01 inc %g1 2006718: c2 20 a2 d0 st %g1, [ %g2 + 0x2d0 ] * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 200671c: 21 00 80 6f sethi %hi(0x201bc00), %l0 2006720: 40 00 08 2b call 20087cc <_Objects_Allocate> 2006724: 90 14 21 54 or %l0, 0x154, %o0 ! 201bd54 <_Rate_monotonic_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 2006728: 80 a2 20 00 cmp %o0, 0 200672c: 02 80 00 28 be 20067cc 2006730: 03 00 80 6f sethi %hi(0x201bc00), %g1 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 2006734: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 201bf94 <_Thread_Executing> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2006738: c0 22 20 30 clr [ %o0 + 0x30 ] the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 200673c: c0 22 20 54 clr [ %o0 + 0x54 ] if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 2006740: c4 22 20 50 st %g2, [ %o0 + 0x50 ] the_period->state = RATE_MONOTONIC_INACTIVE; 2006744: c0 22 20 38 clr [ %o0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006748: c0 22 20 18 clr [ %o0 + 0x18 ] the_watchdog->routine = routine; 200674c: c0 22 20 2c clr [ %o0 + 0x2c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2006750: c0 22 20 34 clr [ %o0 + 0x34 ] _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 2006754: 82 02 20 54 add %o0, 0x54, %g1 2006758: c0 20 60 34 clr [ %g1 + 0x34 ] 200675c: c0 20 60 04 clr [ %g1 + 4 ] 2006760: c0 20 60 10 clr [ %g1 + 0x10 ] 2006764: c0 20 60 14 clr [ %g1 + 0x14 ] 2006768: c0 20 60 18 clr [ %g1 + 0x18 ] 200676c: c0 20 60 1c clr [ %g1 + 0x1c ] 2006770: c0 20 60 28 clr [ %g1 + 0x28 ] 2006774: c0 20 60 2c clr [ %g1 + 0x2c ] 2006778: c0 20 60 30 clr [ %g1 + 0x30 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200677c: c4 02 20 08 ld [ %o0 + 8 ], %g2 2006780: 86 14 21 54 or %l0, 0x154, %g3 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2006784: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2006788: c8 00 e0 1c ld [ %g3 + 0x1c ], %g4 200678c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 2006790: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 2006794: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 2006798: c2 22 20 5c st %g1, [ %o0 + 0x5c ] 200679c: c2 22 20 60 st %g1, [ %o0 + 0x60 ] 20067a0: c2 22 20 74 st %g1, [ %o0 + 0x74 ] &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 20067a4: c4 26 40 00 st %g2, [ %i1 ] 20067a8: 03 00 00 3f sethi %hi(0xfc00), %g1 20067ac: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20067b0: 84 08 80 01 and %g2, %g1, %g2 20067b4: 85 28 a0 02 sll %g2, 2, %g2 _Thread_Enable_dispatch(); 20067b8: b0 10 20 00 clr %i0 20067bc: 40 00 0c 3b call 20098a8 <_Thread_Enable_dispatch> 20067c0: d0 21 00 02 st %o0, [ %g4 + %g2 ] return RTEMS_SUCCESSFUL; } 20067c4: 81 c7 e0 08 ret 20067c8: 81 e8 00 00 restore _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 20067cc: 40 00 0c 37 call 20098a8 <_Thread_Enable_dispatch> 20067d0: b0 10 20 05 mov 5, %i0 20067d4: 81 c7 e0 08 ret 20067d8: 81 e8 00 00 restore =============================================================================== 0200d56c : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 200d56c: 9d e3 bf 90 save %sp, -112, %sp 200d570: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 200d574: 80 a6 60 00 cmp %i1, 0 200d578: 02 80 00 10 be 200d5b8 <== NEVER TAKEN 200d57c: b0 10 20 09 mov 9, %i0 200d580: 11 00 80 6f sethi %hi(0x201bc00), %o0 200d584: 94 07 bf f4 add %fp, -12, %o2 200d588: 7f ff ee 45 call 2008e9c <_Objects_Get> 200d58c: 90 12 21 54 or %o0, 0x154, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 200d590: c2 07 bf f4 ld [ %fp + -12 ], %g1 200d594: 80 a0 60 00 cmp %g1, 0 200d598: 12 80 00 08 bne 200d5b8 200d59c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: *statistics = the_period->Statistics; 200d5a0: 92 02 20 54 add %o0, 0x54, %o1 200d5a4: 94 10 20 38 mov 0x38, %o2 200d5a8: 40 00 08 4a call 200f6d0 200d5ac: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); 200d5b0: 7f ff f0 be call 20098a8 <_Thread_Enable_dispatch> 200d5b4: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200d5b8: 81 c7 e0 08 ret 200d5bc: 81 e8 00 00 restore =============================================================================== 0200d5c0 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 200d5c0: 9d e3 bf 88 save %sp, -120, %sp 200d5c4: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 200d5c8: 80 a6 60 00 cmp %i1, 0 200d5cc: 02 80 00 1b be 200d638 <== NEVER TAKEN 200d5d0: b0 10 20 09 mov 9, %i0 200d5d4: 11 00 80 6f sethi %hi(0x201bc00), %o0 200d5d8: 94 07 bf f4 add %fp, -12, %o2 200d5dc: 7f ff ee 30 call 2008e9c <_Objects_Get> 200d5e0: 90 12 21 54 or %o0, 0x154, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 200d5e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 200d5e8: a2 10 00 08 mov %o0, %l1 200d5ec: 80 a0 60 00 cmp %g1, 0 200d5f0: 12 80 00 12 bne 200d638 200d5f4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 200d5f8: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 200d5fc: 80 a0 60 00 cmp %g1, 0 200d600: 02 80 00 03 be 200d60c <== NEVER TAKEN 200d604: 84 10 20 00 clr %g2 200d608: c4 00 60 08 ld [ %g1 + 8 ], %g2 status->state = the_period->state; 200d60c: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 200d610: c4 26 40 00 st %g2, [ %i1 ] status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 200d614: 80 a0 60 00 cmp %g1, 0 200d618: 12 80 00 0a bne 200d640 200d61c: c2 26 60 04 st %g1, [ %i1 + 4 ] #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 200d620: c0 26 60 14 clr [ %i1 + 0x14 ] status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 200d624: c0 26 60 08 clr [ %i1 + 8 ] status->since_last_period.tv_nsec = 0; 200d628: c0 26 60 0c clr [ %i1 + 0xc ] #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 200d62c: c0 26 60 10 clr [ %i1 + 0x10 ] the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 200d630: 7f ff f0 9e call 20098a8 <_Thread_Enable_dispatch> 200d634: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200d638: 81 c7 e0 08 ret 200d63c: 81 e8 00 00 restore * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 200d640: a0 07 bf ec add %fp, -20, %l0 200d644: 7f ff eb 5b call 20083b0 <_TOD_Get_uptime> 200d648: 90 10 00 10 mov %l0, %o0 #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 200d64c: 90 04 60 44 add %l1, 0x44, %o0 200d650: 92 10 00 10 mov %l0, %o1 200d654: 7f ff f5 61 call 200abd8 <_Timespec_Subtract> 200d658: 94 06 60 08 add %i1, 8, %o2 status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 200d65c: 92 10 00 10 mov %l0, %o1 200d660: 94 06 60 10 add %i1, 0x10, %o2 200d664: 11 00 80 6f sethi %hi(0x201bc00), %o0 200d668: 7f ff f5 5c call 200abd8 <_Timespec_Subtract> 200d66c: 90 12 23 9c or %o0, 0x39c, %o0 ! 201bf9c <_Thread_Time_of_last_context_switch> 200d670: 30 bf ff f0 b,a 200d630 =============================================================================== 020069ec : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 20069ec: 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 *) 20069f0: 11 00 80 6f sethi %hi(0x201bc00), %o0 20069f4: 92 10 00 18 mov %i0, %o1 20069f8: 90 12 21 54 or %o0, 0x154, %o0 20069fc: 40 00 09 28 call 2008e9c <_Objects_Get> 2006a00: 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 ) { 2006a04: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006a08: 80 a0 60 00 cmp %g1, 0 2006a0c: 02 80 00 04 be 2006a1c 2006a10: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006a14: 81 c7 e0 08 ret 2006a18: 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 ) ) { 2006a1c: 25 00 80 6f sethi %hi(0x201bc00), %l2 2006a20: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 2006a24: c2 04 a3 94 ld [ %l2 + 0x394 ], %g1 2006a28: 80 a0 80 01 cmp %g2, %g1 2006a2c: 02 80 00 06 be 2006a44 2006a30: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2006a34: 40 00 0b 9d call 20098a8 <_Thread_Enable_dispatch> 2006a38: b0 10 20 17 mov 0x17, %i0 2006a3c: 81 c7 e0 08 ret 2006a40: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 2006a44: 12 80 00 0f bne 2006a80 2006a48: 01 00 00 00 nop switch ( the_period->state ) { 2006a4c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2006a50: 80 a0 60 00 cmp %g1, 0 2006a54: 02 80 00 07 be 2006a70 2006a58: b0 10 20 0b mov 0xb, %i0 2006a5c: 82 00 7f fd add %g1, -3, %g1 2006a60: 80 a0 60 01 cmp %g1, 1 2006a64: 18 80 00 03 bgu 2006a70 2006a68: b0 10 20 00 clr %i0 2006a6c: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 2006a70: 40 00 0b 8e call 20098a8 <_Thread_Enable_dispatch> 2006a74: 01 00 00 00 nop 2006a78: 81 c7 e0 08 ret 2006a7c: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 2006a80: 7f ff f0 66 call 2002c18 2006a84: 01 00 00 00 nop 2006a88: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 2006a8c: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 2006a90: 80 a4 e0 02 cmp %l3, 2 2006a94: 02 80 00 1a be 2006afc 2006a98: 80 a4 e0 04 cmp %l3, 4 2006a9c: 02 80 00 32 be 2006b64 2006aa0: 80 a4 e0 00 cmp %l3, 0 2006aa4: 12 bf ff dc bne 2006a14 <== NEVER TAKEN 2006aa8: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2006aac: 7f ff f0 5f call 2002c28 2006ab0: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 2006ab4: 7f ff ff 58 call 2006814 <_Rate_monotonic_Initiate_statistics> 2006ab8: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006abc: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006ac0: 03 00 80 1b sethi %hi(0x2006c00), %g1 2006ac4: 82 10 62 c0 or %g1, 0x2c0, %g1 ! 2006ec0 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006ac8: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006acc: 92 04 60 10 add %l1, 0x10, %o1 2006ad0: 11 00 80 6f sethi %hi(0x201bc00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006ad4: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006ad8: 90 12 23 b4 or %o0, 0x3b4, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006adc: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006ae0: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2006ae4: 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; 2006ae8: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006aec: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006af0: 40 00 11 09 call 200af14 <_Watchdog_Insert> 2006af4: b0 10 20 00 clr %i0 2006af8: 30 bf ff de b,a 2006a70 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006afc: 7f ff ff 62 call 2006884 <_Rate_monotonic_Update_statistics> 2006b00: 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; 2006b04: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2006b08: 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; 2006b0c: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006b10: 7f ff f0 46 call 2002c28 2006b14: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2006b18: c2 04 a3 94 ld [ %l2 + 0x394 ], %g1 2006b1c: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006b20: 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; 2006b24: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006b28: 40 00 0e 14 call 200a378 <_Thread_Set_state> 2006b2c: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006b30: 7f ff f0 3a call 2002c18 2006b34: 01 00 00 00 nop local_state = the_period->state; 2006b38: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006b3c: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 2006b40: 7f ff f0 3a call 2002c28 2006b44: 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 ) 2006b48: 80 a4 20 03 cmp %l0, 3 2006b4c: 02 80 00 17 be 2006ba8 <== NEVER TAKEN 2006b50: d0 04 a3 94 ld [ %l2 + 0x394 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 2006b54: 40 00 0b 55 call 20098a8 <_Thread_Enable_dispatch> 2006b58: b0 10 20 00 clr %i0 2006b5c: 81 c7 e0 08 ret 2006b60: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 2006b64: 7f ff ff 48 call 2006884 <_Rate_monotonic_Update_statistics> 2006b68: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 2006b6c: 7f ff f0 2f call 2002c28 2006b70: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006b74: 82 10 20 02 mov 2, %g1 2006b78: 92 04 60 10 add %l1, 0x10, %o1 2006b7c: 11 00 80 6f sethi %hi(0x201bc00), %o0 2006b80: 90 12 23 b4 or %o0, 0x3b4, %o0 ! 201bfb4 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b84: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 2006b88: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 2006b8c: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b90: 40 00 10 e1 call 200af14 <_Watchdog_Insert> 2006b94: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 2006b98: 40 00 0b 44 call 20098a8 <_Thread_Enable_dispatch> 2006b9c: 01 00 00 00 nop 2006ba0: 81 c7 e0 08 ret 2006ba4: 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 ); 2006ba8: 40 00 0a 27 call 2009444 <_Thread_Clear_state> <== NOT EXECUTED 2006bac: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 2006bb0: 30 bf ff e9 b,a 2006b54 <== NOT EXECUTED =============================================================================== 02006bb4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 2006bb4: 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 ) 2006bb8: 80 a6 60 00 cmp %i1, 0 2006bbc: 02 80 00 4a be 2006ce4 <== NEVER TAKEN 2006bc0: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 2006bc4: 13 00 80 66 sethi %hi(0x2019800), %o1 2006bc8: 9f c6 40 00 call %i1 2006bcc: 92 12 60 c0 or %o1, 0xc0, %o1 ! 20198c0 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 2006bd0: 90 10 00 18 mov %i0, %o0 2006bd4: 13 00 80 66 sethi %hi(0x2019800), %o1 2006bd8: 9f c6 40 00 call %i1 2006bdc: 92 12 60 e0 or %o1, 0xe0, %o1 ! 20198e0 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 2006be0: 90 10 00 18 mov %i0, %o0 2006be4: 13 00 80 66 sethi %hi(0x2019800), %o1 2006be8: 9f c6 40 00 call %i1 2006bec: 92 12 61 08 or %o1, 0x108, %o1 ! 2019908 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2006bf0: 90 10 00 18 mov %i0, %o0 2006bf4: 13 00 80 66 sethi %hi(0x2019800), %o1 2006bf8: 9f c6 40 00 call %i1 2006bfc: 92 12 61 30 or %o1, 0x130, %o1 ! 2019930 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 2006c00: 90 10 00 18 mov %i0, %o0 2006c04: 13 00 80 66 sethi %hi(0x2019800), %o1 2006c08: 9f c6 40 00 call %i1 2006c0c: 92 12 61 80 or %o1, 0x180, %o1 ! 2019980 /* * 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 ; 2006c10: 03 00 80 6f sethi %hi(0x201bc00), %g1 2006c14: a6 10 61 54 or %g1, 0x154, %l3 ! 201bd54 <_Rate_monotonic_Information> 2006c18: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 2006c1c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 2006c20: 80 a4 80 01 cmp %l2, %g1 2006c24: 18 80 00 30 bgu 2006ce4 <== NEVER TAKEN 2006c28: 03 00 80 66 sethi %hi(0x2019800), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2006c2c: 05 00 80 66 sethi %hi(0x2019800), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006c30: b6 10 61 d0 or %g1, 0x1d0, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2006c34: b8 10 a1 00 or %g2, 0x100, %i4 2006c38: 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 ); 2006c3c: ae 07 bf d0 add %fp, -48, %l7 2006c40: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2006c44: ba 07 bf b0 add %fp, -80, %i5 2006c48: 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( 2006c4c: 10 80 00 06 b 2006c64 2006c50: 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++ ) { 2006c54: 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 ; 2006c58: 80 a0 40 12 cmp %g1, %l2 2006c5c: 0a 80 00 22 bcs 2006ce4 2006c60: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 2006c64: 90 10 00 12 mov %l2, %o0 2006c68: 40 00 1a 41 call 200d56c 2006c6c: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 2006c70: 80 a2 20 00 cmp %o0, 0 2006c74: 32 bf ff f8 bne,a 2006c54 2006c78: 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 ); 2006c7c: 92 10 00 17 mov %l7, %o1 2006c80: 40 00 1a 50 call 200d5c0 2006c84: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 2006c88: d0 07 bf d0 ld [ %fp + -48 ], %o0 2006c8c: 80 a2 20 00 cmp %o0, 0 2006c90: 12 80 00 4b bne 2006dbc <== ALWAYS TAKEN 2006c94: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006c98: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 2006c9c: 94 10 00 12 mov %l2, %o2 2006ca0: 92 10 00 1b mov %i3, %o1 2006ca4: 96 10 00 16 mov %l6, %o3 2006ca8: 9f c6 40 00 call %i1 2006cac: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2006cb0: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2006cb4: 94 10 00 15 mov %l5, %o2 2006cb8: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2006cbc: 80 a0 60 00 cmp %g1, 0 2006cc0: 12 80 00 0b bne 2006cec 2006cc4: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 2006cc8: 9f c6 40 00 call %i1 2006ccc: 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 ; 2006cd0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 2006cd4: 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 ; 2006cd8: 80 a0 40 12 cmp %g1, %l2 2006cdc: 1a bf ff e3 bcc 2006c68 <== ALWAYS TAKEN 2006ce0: 90 10 00 12 mov %l2, %o0 2006ce4: 81 c7 e0 08 ret 2006ce8: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2006cec: 40 00 0f 52 call 200aa34 <_Timespec_Divide_by_integer> 2006cf0: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 2006cf4: d0 07 bf a4 ld [ %fp + -92 ], %o0 2006cf8: 40 00 41 c6 call 2017410 <.div> 2006cfc: 92 10 23 e8 mov 0x3e8, %o1 2006d00: a2 10 00 08 mov %o0, %l1 2006d04: d0 07 bf ac ld [ %fp + -84 ], %o0 2006d08: 40 00 41 c2 call 2017410 <.div> 2006d0c: 92 10 23 e8 mov 0x3e8, %o1 2006d10: c2 07 bf e8 ld [ %fp + -24 ], %g1 2006d14: a0 10 00 08 mov %o0, %l0 2006d18: d0 07 bf ec ld [ %fp + -20 ], %o0 2006d1c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2006d20: 40 00 41 bc call 2017410 <.div> 2006d24: 92 10 23 e8 mov 0x3e8, %o1 2006d28: d8 07 bf a8 ld [ %fp + -88 ], %o4 2006d2c: d4 07 bf a0 ld [ %fp + -96 ], %o2 2006d30: 96 10 00 11 mov %l1, %o3 2006d34: 9a 10 00 10 mov %l0, %o5 2006d38: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2006d3c: 13 00 80 66 sethi %hi(0x2019800), %o1 2006d40: 90 10 00 18 mov %i0, %o0 2006d44: 9f c6 40 00 call %i1 2006d48: 92 12 61 e8 or %o1, 0x1e8, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 2006d4c: d2 07 bf 98 ld [ %fp + -104 ], %o1 2006d50: 94 10 00 15 mov %l5, %o2 2006d54: 40 00 0f 38 call 200aa34 <_Timespec_Divide_by_integer> 2006d58: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 2006d5c: d0 07 bf bc ld [ %fp + -68 ], %o0 2006d60: 40 00 41 ac call 2017410 <.div> 2006d64: 92 10 23 e8 mov 0x3e8, %o1 2006d68: a2 10 00 08 mov %o0, %l1 2006d6c: d0 07 bf c4 ld [ %fp + -60 ], %o0 2006d70: 40 00 41 a8 call 2017410 <.div> 2006d74: 92 10 23 e8 mov 0x3e8, %o1 2006d78: c2 07 bf e8 ld [ %fp + -24 ], %g1 2006d7c: a0 10 00 08 mov %o0, %l0 2006d80: d0 07 bf ec ld [ %fp + -20 ], %o0 2006d84: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2006d88: 40 00 41 a2 call 2017410 <.div> 2006d8c: 92 10 23 e8 mov 0x3e8, %o1 2006d90: d4 07 bf b8 ld [ %fp + -72 ], %o2 2006d94: d8 07 bf c0 ld [ %fp + -64 ], %o4 2006d98: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2006d9c: 96 10 00 11 mov %l1, %o3 2006da0: 9a 10 00 10 mov %l0, %o5 2006da4: 90 10 00 18 mov %i0, %o0 2006da8: 13 00 80 66 sethi %hi(0x2019800), %o1 2006dac: 9f c6 40 00 call %i1 2006db0: 92 12 62 08 or %o1, 0x208, %o1 ! 2019a08 /* * 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 ; 2006db4: 10 bf ff a8 b 2006c54 2006db8: 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 ); 2006dbc: 94 10 00 16 mov %l6, %o2 2006dc0: 40 00 00 70 call 2006f80 2006dc4: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006dc8: 10 bf ff b5 b 2006c9c 2006dcc: d8 1f bf 98 ldd [ %fp + -104 ], %o4 =============================================================================== 02006dec : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 2006dec: 9d e3 bf 98 save %sp, -104, %sp 2006df0: 05 00 80 6f sethi %hi(0x201bc00), %g2 2006df4: c2 00 a2 d0 ld [ %g2 + 0x2d0 ], %g1 ! 201bed0 <_Thread_Dispatch_disable_level> 2006df8: 82 00 60 01 inc %g1 2006dfc: c2 20 a2 d0 st %g1, [ %g2 + 0x2d0 ] /* * Cycle through all possible ids and try to reset 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 ; 2006e00: 03 00 80 6f sethi %hi(0x201bc00), %g1 2006e04: a2 10 61 54 or %g1, 0x154, %l1 ! 201bd54 <_Rate_monotonic_Information> 2006e08: e0 04 60 08 ld [ %l1 + 8 ], %l0 id <= _Rate_monotonic_Information.maximum_id ; 2006e0c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2006e10: 80 a4 00 01 cmp %l0, %g1 2006e14: 18 80 00 09 bgu 2006e38 <== NEVER TAKEN 2006e18: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 2006e1c: 40 00 00 0a call 2006e44 2006e20: 90 10 00 10 mov %l0, %o0 /* * Cycle through all possible ids and try to reset 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 ; 2006e24: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id++ ) { 2006e28: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to reset 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 ; 2006e2c: 80 a0 40 10 cmp %g1, %l0 2006e30: 1a bf ff fb bcc 2006e1c 2006e34: 01 00 00 00 nop } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 2006e38: 40 00 0a 9c call 20098a8 <_Thread_Enable_dispatch> 2006e3c: 81 e8 00 00 restore =============================================================================== 02010148 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 2010148: 9d e3 bf 90 save %sp, -112, %sp 201014c: 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 ) 2010150: 80 a6 60 00 cmp %i1, 0 2010154: 02 80 00 28 be 20101f4 <== NEVER TAKEN 2010158: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 201015c: 23 00 80 c3 sethi %hi(0x2030c00), %l1 2010160: 40 00 09 12 call 20125a8 <_API_Mutex_Lock> 2010164: d0 04 62 3c ld [ %l1 + 0x23c ], %o0 ! 2030e3c <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 2010168: 92 10 00 10 mov %l0, %o1 201016c: 11 00 80 c2 sethi %hi(0x2030800), %o0 2010170: 94 07 bf f0 add %fp, -16, %o2 2010174: 40 00 10 29 call 2014218 <_Objects_Get_no_protection> 2010178: 90 12 23 b4 or %o0, 0x3b4, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 201017c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2010180: 80 a0 60 00 cmp %g1, 0 2010184: 12 80 00 16 bne 20101dc 2010188: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 201018c: 92 10 00 19 mov %i1, %o1 2010190: 94 10 00 1a mov %i2, %o2 2010194: 90 02 20 68 add %o0, 0x68, %o0 2010198: 96 07 bf f4 add %fp, -12, %o3 201019c: 40 00 0c 48 call 20132bc <_Heap_Extend> 20101a0: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 20101a4: 80 a2 20 01 cmp %o0, 1 20101a8: 02 80 00 11 be 20101ec 20101ac: 01 00 00 00 nop 20101b0: 1a 80 00 13 bcc 20101fc 20101b4: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 20101b8: c6 07 bf f4 ld [ %fp + -12 ], %g3 20101bc: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 20101c0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 20101c4: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 20101c8: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 20101cc: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 20101d0: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 20101d4: 10 80 00 06 b 20101ec 20101d8: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 20101dc: 80 a0 60 01 cmp %g1, 1 20101e0: 02 80 00 03 be 20101ec <== ALWAYS TAKEN 20101e4: 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; 20101e8: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 20101ec: 40 00 09 05 call 2012600 <_API_Mutex_Unlock> 20101f0: d0 04 62 3c ld [ %l1 + 0x23c ], %o0 return return_status; } 20101f4: 81 c7 e0 08 ret 20101f8: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 20101fc: 12 bf ff fb bne 20101e8 <== NEVER TAKEN 2010200: b0 10 20 18 mov 0x18, %i0 2010204: 30 bf ff fa b,a 20101ec =============================================================================== 0201030c : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 201030c: 9d e3 bf 90 save %sp, -112, %sp 2010310: a6 10 00 18 mov %i0, %l3 Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; void *the_segment; if ( !segment ) 2010314: 80 a7 20 00 cmp %i4, 0 2010318: 02 80 00 1b be 2010384 <== NEVER TAKEN 201031c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; *segment = NULL; 2010320: c0 27 00 00 clr [ %i4 ] if ( size == 0 ) 2010324: 80 a6 60 00 cmp %i1, 0 2010328: 02 80 00 17 be 2010384 <== NEVER TAKEN 201032c: b0 10 20 08 mov 8, %i0 return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 2010330: 23 00 80 c3 sethi %hi(0x2030c00), %l1 2010334: 40 00 08 9d call 20125a8 <_API_Mutex_Lock> 2010338: d0 04 62 3c ld [ %l1 + 0x23c ], %o0 ! 2030e3c <_RTEMS_Allocator_Mutex> executing = _Thread_Executing; 201033c: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2010340: 92 10 00 13 mov %l3, %o1 2010344: e4 00 62 44 ld [ %g1 + 0x244 ], %l2 2010348: 11 00 80 c2 sethi %hi(0x2030800), %o0 201034c: 94 07 bf f4 add %fp, -12, %o2 2010350: 40 00 0f b2 call 2014218 <_Objects_Get_no_protection> 2010354: 90 12 23 b4 or %o0, 0x3b4, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 2010358: c2 07 bf f4 ld [ %fp + -12 ], %g1 201035c: 80 a0 60 00 cmp %g1, 0 2010360: 02 80 00 0b be 201038c 2010364: a0 10 00 08 mov %o0, %l0 2010368: 82 18 60 01 xor %g1, 1, %g1 201036c: 80 a0 00 01 cmp %g0, %g1 2010370: 84 40 3f ff addx %g0, -1, %g2 2010374: b0 08 bf eb and %g2, -21, %i0 2010378: b0 06 20 19 add %i0, 0x19, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 201037c: 40 00 08 a1 call 2012600 <_API_Mutex_Unlock> 2010380: d0 04 62 3c ld [ %l1 + 0x23c ], %o0 return return_status; } 2010384: 81 c7 e0 08 ret 2010388: 81 e8 00 00 restore executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 201038c: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 2010390: 80 a6 40 01 cmp %i1, %g1 2010394: 18 bf ff fa bgu 201037c 2010398: b0 10 20 08 mov 8, %i0 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 201039c: 90 02 20 68 add %o0, 0x68, %o0 20103a0: 40 00 0b 85 call 20131b4 <_Heap_Allocate> 20103a4: 92 10 00 19 mov %i1, %o1 the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 20103a8: 80 a2 20 00 cmp %o0, 0 20103ac: 02 80 00 07 be 20103c8 20103b0: b0 10 20 00 clr %i0 the_region->number_of_used_blocks += 1; 20103b4: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 *segment = the_segment; 20103b8: d0 27 00 00 st %o0, [ %i4 ] the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { the_region->number_of_used_blocks += 1; 20103bc: 82 00 60 01 inc %g1 20103c0: 10 bf ff ef b 201037c 20103c4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 20103c8: 80 8e a0 01 btst 1, %i2 20103cc: 12 bf ff ec bne 201037c 20103d0: b0 10 20 0d mov 0xd, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20103d4: 05 00 80 c3 sethi %hi(0x2030c00), %g2 20103d8: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 2030d80 <_Thread_Dispatch_disable_level> 20103dc: 82 00 60 01 inc %g1 20103e0: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 20103e4: 40 00 08 87 call 2012600 <_API_Mutex_Unlock> 20103e8: d0 04 62 3c ld [ %l1 + 0x23c ], %o0 executing->Wait.queue = &the_region->Wait_queue; 20103ec: 84 04 20 10 add %l0, 0x10, %g2 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; 20103f0: 82 10 20 01 mov 1, %g1 executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 20103f4: 92 10 00 1b mov %i3, %o1 20103f8: 90 10 00 02 mov %g2, %o0 20103fc: 15 00 80 55 sethi %hi(0x2015400), %o2 2010400: 94 12 a2 3c or %o2, 0x23c, %o2 ! 201563c <_Thread_queue_Timeout> * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; 2010404: c4 24 a0 44 st %g2, [ %l2 + 0x44 ] 2010408: c2 24 20 40 st %g1, [ %l0 + 0x40 ] executing->Wait.id = id; 201040c: e6 24 a0 20 st %l3, [ %l2 + 0x20 ] executing->Wait.count = size; 2010410: f2 24 a0 24 st %i1, [ %l2 + 0x24 ] executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 2010414: 40 00 13 74 call 20151e4 <_Thread_queue_Enqueue_with_handler> 2010418: f8 24 a0 28 st %i4, [ %l2 + 0x28 ] _Thread_Enable_dispatch(); 201041c: 40 00 12 14 call 2014c6c <_Thread_Enable_dispatch> 2010420: 01 00 00 00 nop return (rtems_status_code) executing->Wait.return_code; 2010424: f0 04 a0 34 ld [ %l2 + 0x34 ], %i0 2010428: 81 c7 e0 08 ret 201042c: 81 e8 00 00 restore =============================================================================== 02010504 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 2010504: 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 ) 2010508: 80 a6 e0 00 cmp %i3, 0 201050c: 02 80 00 2e be 20105c4 2010510: 21 00 80 c3 sethi %hi(0x2030c00), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 2010514: 40 00 08 25 call 20125a8 <_API_Mutex_Lock> 2010518: d0 04 22 3c ld [ %l0 + 0x23c ], %o0 ! 2030e3c <_RTEMS_Allocator_Mutex> 201051c: 92 10 00 18 mov %i0, %o1 2010520: 11 00 80 c2 sethi %hi(0x2030800), %o0 2010524: 94 07 bf f0 add %fp, -16, %o2 2010528: 40 00 0f 3c call 2014218 <_Objects_Get_no_protection> 201052c: 90 12 23 b4 or %o0, 0x3b4, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 2010530: c2 07 bf f0 ld [ %fp + -16 ], %g1 2010534: 80 a0 60 00 cmp %g1, 0 2010538: 12 80 00 14 bne 2010588 201053c: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 2010540: 94 10 00 1a mov %i2, %o2 2010544: 92 10 00 19 mov %i1, %o1 2010548: 90 02 20 68 add %o0, 0x68, %o0 201054c: 96 07 bf ec add %fp, -20, %o3 2010550: 40 00 0c e5 call 20138e4 <_Heap_Resize_block> 2010554: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 2010558: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 201055c: b4 92 20 00 orcc %o0, 0, %i2 2010560: 12 80 00 13 bne 20105ac <== ALWAYS TAKEN 2010564: c2 26 c0 00 st %g1, [ %i3 ] 2010568: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 201056c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2010570: 12 80 00 17 bne 20105cc <== NOT EXECUTED 2010574: d0 04 22 3c ld [ %l0 + 0x23c ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 2010578: 40 00 08 22 call 2012600 <_API_Mutex_Unlock> <== NOT EXECUTED 201057c: b0 10 20 00 clr %i0 <== NOT EXECUTED 2010580: 81 c7 e0 08 ret <== NOT EXECUTED 2010584: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010588: d0 04 22 3c ld [ %l0 + 0x23c ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 201058c: 82 18 60 01 xor %g1, 1, %g1 2010590: 80 a0 00 01 cmp %g0, %g1 2010594: 84 40 3f ff addx %g0, -1, %g2 2010598: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 201059c: 40 00 08 19 call 2012600 <_API_Mutex_Unlock> 20105a0: b0 06 20 19 add %i0, 0x19, %i0 20105a4: 81 c7 e0 08 ret 20105a8: 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(); 20105ac: d0 04 22 3c ld [ %l0 + 0x23c ], %o0 20105b0: 40 00 08 14 call 2012600 <_API_Mutex_Unlock> 20105b4: b0 10 20 0d mov 0xd, %i0 return 20105b8: 80 a6 a0 01 cmp %i2, 1 20105bc: 02 80 00 07 be 20105d8 <== NEVER TAKEN 20105c0: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 20105c4: 81 c7 e0 08 ret 20105c8: 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 */ 20105cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20105d0: 40 00 21 70 call 2018b90 <_Region_Process_queue> <== NOT EXECUTED 20105d4: b0 10 20 00 clr %i0 <== NOT EXECUTED 20105d8: 81 c7 e0 08 ret <== NOT EXECUTED 20105dc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020055c4 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 20055c4: 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 ) ) 20055c8: a4 96 20 00 orcc %i0, 0, %l2 20055cc: 02 80 00 33 be 2005698 20055d0: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 20055d4: 80 a7 20 00 cmp %i4, 0 20055d8: 02 80 00 30 be 2005698 <== NEVER TAKEN 20055dc: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 20055e0: 82 8e a0 c0 andcc %i2, 0xc0, %g1 20055e4: 12 80 00 2f bne 20056a0 20055e8: 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 ) ) 20055ec: 80 a4 20 00 cmp %l0, 0 20055f0: 02 80 00 04 be 2005600 20055f4: 80 a6 60 01 cmp %i1, 1 20055f8: 18 80 00 28 bgu 2005698 20055fc: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005600: 05 00 80 5c sethi %hi(0x2017000), %g2 2005604: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20173e0 <_Thread_Dispatch_disable_level> 2005608: 82 00 60 01 inc %g1 200560c: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] * 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 ); 2005610: 31 00 80 5c sethi %hi(0x2017000), %i0 2005614: 40 00 05 6e call 2006bcc <_Objects_Allocate> 2005618: 90 16 22 ac or %i0, 0x2ac, %o0 ! 20172ac <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 200561c: a2 92 20 00 orcc %o0, 0, %l1 2005620: 02 80 00 4e be 2005758 2005624: 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 ) ) { 2005628: 02 80 00 2c be 20056d8 200562c: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 2005630: 80 8e a0 40 btst 0x40, %i2 2005634: 02 80 00 44 be 2005744 2005638: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 200563c: 82 10 20 02 mov 2, %g1 2005640: 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 ) ) { 2005644: 80 a4 20 10 cmp %l0, 0x10 2005648: 02 80 00 48 be 2005768 200564c: 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; 2005650: 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; 2005654: 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( 2005658: 82 1e 60 01 xor %i1, 1, %g1 200565c: 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; 2005660: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 2005664: 94 60 3f ff subx %g0, -1, %o2 2005668: 90 04 60 14 add %l1, 0x14, %o0 200566c: 40 00 03 3e call 2006364 <_CORE_mutex_Initialize> 2005670: 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 ) { 2005674: 80 a2 20 06 cmp %o0, 6 2005678: 32 80 00 26 bne,a 2005710 <== ALWAYS TAKEN 200567c: 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 ); 2005680: 90 16 22 ac or %i0, 0x2ac, %o0 <== NOT EXECUTED 2005684: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2005688: 40 00 06 4c call 2006fb8 <_Objects_Free> <== NOT EXECUTED 200568c: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 2005690: 40 00 09 3a call 2007b78 <_Thread_Enable_dispatch> <== NOT EXECUTED 2005694: 01 00 00 00 nop <== NOT EXECUTED 2005698: 81 c7 e0 08 ret 200569c: 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 ) || 20056a0: 80 a4 20 10 cmp %l0, 0x10 20056a4: 02 80 00 06 be 20056bc 20056a8: 80 a4 20 20 cmp %l0, 0x20 20056ac: 02 80 00 05 be 20056c0 20056b0: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 20056b4: 81 c7 e0 08 ret 20056b8: 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 ) || 20056bc: 80 8e a0 04 btst 4, %i2 20056c0: 02 bf ff fd be 20056b4 20056c4: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 20056c8: 12 bf ff ca bne 20055f0 20056cc: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 20056d0: 81 c7 e0 08 ret 20056d4: 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 ) ) 20056d8: 80 8e a0 04 btst 4, %i2 20056dc: 22 80 00 04 be,a 20056ec 20056e0: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 20056e4: 82 10 20 01 mov 1, %g1 20056e8: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 20056ec: 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; 20056f0: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 20056f4: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 20056f8: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 20056fc: 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( 2005700: 90 04 60 14 add %l1, 0x14, %o0 2005704: 40 00 04 03 call 2006710 <_CORE_semaphore_Initialize> 2005708: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200570c: c4 04 60 08 ld [ %l1 + 8 ], %g2 2005710: 82 16 22 ac or %i0, 0x2ac, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005714: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005718: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 200571c: c4 27 00 00 st %g2, [ %i4 ] 2005720: 03 00 00 3f sethi %hi(0xfc00), %g1 2005724: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005728: 84 08 80 01 and %g2, %g1, %g2 200572c: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2005730: b0 10 20 00 clr %i0 2005734: 40 00 09 11 call 2007b78 <_Thread_Enable_dispatch> 2005738: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 200573c: 81 c7 e0 08 ret 2005740: 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 ) ) 2005744: 02 80 00 0f be 2005780 2005748: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 200574c: 82 10 20 03 mov 3, %g1 2005750: 10 bf ff bd b 2005644 2005754: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 2005758: 40 00 09 08 call 2007b78 <_Thread_Enable_dispatch> 200575c: b0 10 20 05 mov 5, %i0 2005760: 81 c7 e0 08 ret 2005764: 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 ) { 2005768: c2 07 bf e8 ld [ %fp + -24 ], %g1 200576c: 80 a0 60 01 cmp %g1, 1 2005770: 18 80 00 09 bgu 2005794 2005774: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 2005778: 10 bf ff b8 b 2005658 200577c: 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 ) ) 2005780: 22 bf ff b1 be,a 2005644 2005784: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 2005788: 82 10 20 01 mov 1, %g1 200578c: 10 bf ff ae b 2005644 2005790: 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 ) { 2005794: 80 a0 60 03 cmp %g1, 3 2005798: 18 bf ff b1 bgu 200565c <== NEVER TAKEN 200579c: 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; 20057a0: 82 10 20 01 mov 1, %g1 20057a4: 10 bf ff ad b 2005658 20057a8: c2 2f bf e4 stb %g1, [ %fp + -28 ] =============================================================================== 0201091c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 201091c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 2010920: 11 00 80 c2 sethi %hi(0x2030800), %o0 2010924: 92 10 00 18 mov %i0, %o1 2010928: 90 12 23 f4 or %o0, 0x3f4, %o0 201092c: 40 00 0e 4d call 2014260 <_Objects_Get> 2010930: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 2010934: c2 07 bf f4 ld [ %fp + -12 ], %g1 2010938: 80 a0 60 00 cmp %g1, 0 201093c: 12 80 00 0b bne 2010968 2010940: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 2010944: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2010948: 80 88 60 30 btst 0x30, %g1 201094c: 12 80 00 09 bne 2010970 <== ALWAYS TAKEN 2010950: 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( 2010954: 92 10 20 00 clr %o1 <== NOT EXECUTED 2010958: 40 00 09 60 call 2012ed8 <_CORE_semaphore_Flush> <== NOT EXECUTED 201095c: 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(); 2010960: 40 00 10 c3 call 2014c6c <_Thread_Enable_dispatch> 2010964: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2010968: 81 c7 e0 08 ret 201096c: 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( 2010970: 92 10 20 00 clr %o1 2010974: 40 00 08 6e call 2012b2c <_CORE_mutex_Flush> 2010978: 94 10 20 01 mov 1, %o2 201097c: 30 bf ff f9 b,a 2010960 =============================================================================== 02014b00 : */ void rtems_shutdown_executive( uint32_t result ) { 2014b00: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 2014b04: 05 00 80 5d sethi %hi(0x2017400), %g2 2014b08: c2 00 a1 84 ld [ %g2 + 0x184 ], %g1 ! 2017584 <_System_state_Current> 2014b0c: 80 a0 60 04 cmp %g1, 4 2014b10: 02 80 00 07 be 2014b2c <== NEVER TAKEN 2014b14: 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 ); 2014b18: 13 00 80 5c sethi %hi(0x2017000), %o1 2014b1c: c2 20 a1 84 st %g1, [ %g2 + 0x184 ] 2014b20: 92 12 63 58 or %o1, 0x358, %o1 2014b24: 7f ff d2 0f call 2009360 <_CPU_Context_switch> 2014b28: 90 07 bf 70 add %fp, -144, %o0 2014b2c: 81 c7 e0 08 ret <== NOT EXECUTED 2014b30: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02010b80 : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 2010b80: 9d e3 bf 90 save %sp, -112, %sp 2010b84: 90 10 00 18 mov %i0, %o0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 2010b88: 80 a6 60 00 cmp %i1, 0 2010b8c: 02 80 00 2f be 2010c48 <== NEVER TAKEN 2010b90: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 2010b94: 40 00 10 44 call 2014ca4 <_Thread_Get> 2010b98: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 2010b9c: c2 07 bf f4 ld [ %fp + -12 ], %g1 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 2010ba0: a0 10 00 08 mov %o0, %l0 switch ( location ) { 2010ba4: 80 a0 60 00 cmp %g1, 0 2010ba8: 12 80 00 28 bne 2010c48 2010bac: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 2010bb0: f0 02 21 68 ld [ %o0 + 0x168 ], %i0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 2010bb4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2010bb8: 80 a0 60 00 cmp %g1, 0 2010bbc: 02 80 00 25 be 2010c50 2010bc0: 01 00 00 00 nop if ( asr->is_enabled ) { 2010bc4: c2 0e 20 08 ldub [ %i0 + 8 ], %g1 2010bc8: 80 a0 60 00 cmp %g1, 0 2010bcc: 02 80 00 16 be 2010c24 2010bd0: 01 00 00 00 nop rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 2010bd4: 7f ff e9 a8 call 200b274 2010bd8: 01 00 00 00 nop *signal_set |= signals; 2010bdc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2010be0: 82 10 40 19 or %g1, %i1, %g1 2010be4: c2 26 20 14 st %g1, [ %i0 + 0x14 ] _ISR_Enable( _level ); 2010be8: 7f ff e9 a7 call 200b284 2010bec: 01 00 00 00 nop _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2010bf0: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2010bf4: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 2030e20 <_ISR_Nest_level> if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 2010bf8: 86 10 20 01 mov 1, %g3 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2010bfc: 80 a0 a0 00 cmp %g2, 0 2010c00: 02 80 00 10 be 2010c40 2010c04: c6 2c 20 75 stb %g3, [ %l0 + 0x75 ] 2010c08: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2010c0c: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 2030e44 <_Thread_Executing> 2010c10: 80 a4 00 02 cmp %l0, %g2 2010c14: 12 80 00 0b bne 2010c40 <== NEVER TAKEN 2010c18: 03 00 80 c3 sethi %hi(0x2030c00), %g1 _ISR_Signals_to_thread_executing = TRUE; 2010c1c: 10 80 00 09 b 2010c40 2010c20: c6 28 62 d8 stb %g3, [ %g1 + 0x2d8 ] ! 2030ed8 <_ISR_Signals_to_thread_executing> rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 2010c24: 7f ff e9 94 call 200b274 2010c28: 01 00 00 00 nop *signal_set |= signals; 2010c2c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2010c30: 82 10 40 19 or %g1, %i1, %g1 2010c34: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( _level ); 2010c38: 7f ff e9 93 call 200b284 2010c3c: 01 00 00 00 nop } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 2010c40: 40 00 10 0b call 2014c6c <_Thread_Enable_dispatch> 2010c44: b0 10 20 00 clr %i0 ! 0 2010c48: 81 c7 e0 08 ret 2010c4c: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 2010c50: 40 00 10 07 call 2014c6c <_Thread_Enable_dispatch> 2010c54: b0 10 20 0b mov 0xb, %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2010c58: 81 c7 e0 08 ret 2010c5c: 81 e8 00 00 restore =============================================================================== 02005a2c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, Objects_Id *id ) { 2005a2c: 9d e3 bf 78 save %sp, -136, %sp 2005a30: a4 10 00 18 mov %i0, %l2 Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 2005a34: 80 a7 60 00 cmp %i5, 0 2005a38: 02 80 00 38 be 2005b18 <== NEVER TAKEN 2005a3c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 2005a40: 80 a4 a0 00 cmp %l2, 0 2005a44: 02 80 00 35 be 2005b18 2005a48: b0 10 20 03 mov 3, %i0 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 2005a4c: 03 00 00 20 sethi %hi(0x8000), %g1 2005a50: 80 8f 00 01 btst %i4, %g1 2005a54: 12 80 00 09 bne 2005a78 2005a58: 80 a6 60 00 cmp %i1, 0 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 2005a5c: 02 80 00 2f be 2005b18 2005a60: b0 10 20 13 mov 0x13, %i0 2005a64: 03 00 80 59 sethi %hi(0x2016400), %g1 2005a68: c4 08 62 34 ldub [ %g1 + 0x234 ], %g2 ! 2016634 2005a6c: 80 a6 40 02 cmp %i1, %g2 2005a70: 18 80 00 38 bgu 2005b50 <== NEVER TAKEN 2005a74: 01 00 00 00 nop */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 2005a78: 31 00 80 5d sethi %hi(0x2017400), %i0 2005a7c: d0 06 20 9c ld [ %i0 + 0x9c ], %o0 ! 201749c <_RTEMS_Allocator_Mutex> 2005a80: 40 00 02 07 call 200629c <_API_Mutex_Lock> 2005a84: 23 00 80 5c sethi %hi(0x2017000), %l1 * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 2005a88: 40 00 04 51 call 2006bcc <_Objects_Allocate> 2005a8c: 90 14 62 ec or %l1, 0x2ec, %o0 ! 20172ec <_RTEMS_tasks_Information> * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 2005a90: a0 92 20 00 orcc %o0, 0, %l0 2005a94: 02 80 00 2c be 2005b44 2005a98: 83 36 e0 08 srl %i3, 8, %g1 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 2005a9c: 85 36 e0 09 srl %i3, 9, %g2 2005aa0: 82 18 60 01 xor %g1, 1, %g1 2005aa4: 84 08 a0 01 and %g2, 1, %g2 2005aa8: 82 08 60 01 and %g1, 1, %g1 2005aac: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2005ab0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2005ab4: 84 07 bf f4 add %fp, -12, %g2 2005ab8: 82 0e e0 0f and %i3, 0xf, %g1 2005abc: e4 27 bf f4 st %l2, [ %fp + -12 ] 2005ac0: c0 23 a0 64 clr [ %sp + 0x64 ] 2005ac4: 90 14 62 ec or %l1, 0x2ec, %o0 2005ac8: 96 10 00 1a mov %i2, %o3 2005acc: 98 0f 20 01 and %i4, 1, %o4 2005ad0: 9a 10 00 19 mov %i1, %o5 2005ad4: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 2005ad8: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 2005adc: 92 10 00 10 mov %l0, %o1 2005ae0: 40 00 08 60 call 2007c60 <_Thread_Initialize> 2005ae4: 94 10 20 00 clr %o2 NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 2005ae8: 80 8a 20 ff btst 0xff, %o0 2005aec: 02 80 00 0d be 2005b20 2005af0: d0 06 20 9c ld [ %i0 + 0x9c ], %o0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; *id = the_thread->Object.id; 2005af4: c2 04 20 08 ld [ %l0 + 8 ], %g1 } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 2005af8: c6 04 21 68 ld [ %l0 + 0x168 ], %g3 2005afc: 85 36 e0 0a srl %i3, 0xa, %g2 2005b00: 84 18 a0 01 xor %g2, 1, %g2 2005b04: 84 08 a0 01 and %g2, 1, %g2 *id = the_thread->Object.id; 2005b08: c2 27 40 00 st %g1, [ %i5 ] } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 2005b0c: c4 28 e0 08 stb %g2, [ %g3 + 8 ] ); } #endif _RTEMS_Unlock_allocator(); 2005b10: 40 00 01 f9 call 20062f4 <_API_Mutex_Unlock> 2005b14: b0 10 20 00 clr %i0 2005b18: 81 c7 e0 08 ret 2005b1c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 2005b20: 40 00 05 4b call 200704c <_Objects_Get_information_id> 2005b24: d0 04 20 08 ld [ %l0 + 8 ], %o0 2005b28: 40 00 05 24 call 2006fb8 <_Objects_Free> 2005b2c: 92 10 00 10 mov %l0, %o1 #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 2005b30: d0 06 20 9c ld [ %i0 + 0x9c ], %o0 2005b34: 40 00 01 f0 call 20062f4 <_API_Mutex_Unlock> 2005b38: b0 10 20 0d mov 0xd, %i0 2005b3c: 81 c7 e0 08 ret 2005b40: 81 e8 00 00 restore */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 2005b44: d0 06 20 9c ld [ %i0 + 0x9c ], %o0 2005b48: 40 00 01 eb call 20062f4 <_API_Mutex_Unlock> 2005b4c: b0 10 20 05 mov 5, %i0 2005b50: 81 c7 e0 08 ret 2005b54: 81 e8 00 00 restore =============================================================================== 020076f8 : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 20076f8: 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() ) 20076fc: 03 00 80 73 sethi %hi(0x201cc00), %g1 2007700: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 201ccac <_Configuration_Table> rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 2007704: 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() ) 2007708: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 200770c: c4 08 60 04 ldub [ %g1 + 4 ], %g2 2007710: 80 a0 a0 00 cmp %g2, 0 2007714: 02 80 00 20 be 2007794 <== NEVER TAKEN 2007718: b0 10 20 16 mov 0x16, %i0 return RTEMS_NOT_CONFIGURED; if ( !note ) 200771c: 80 a6 a0 00 cmp %i2, 0 2007720: 02 80 00 1d be 2007794 <== NEVER TAKEN 2007724: b0 10 20 09 mov 9, %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 ) 2007728: 80 a6 60 0f cmp %i1, 0xf 200772c: 18 80 00 1a bgu 2007794 2007730: b0 10 20 0a mov 0xa, %i0 2007734: 03 00 80 73 sethi %hi(0x201cc00), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 2007738: 80 a2 20 00 cmp %o0, 0 200773c: 02 80 00 18 be 200779c 2007740: 86 10 60 d4 or %g1, 0xd4, %g3 2007744: 03 00 80 73 sethi %hi(0x201cc00), %g1 2007748: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 ! 201ccd4 <_Thread_Executing> 200774c: 86 10 60 d4 or %g1, 0xd4, %g3 2007750: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007754: 80 a2 00 01 cmp %o0, %g1 2007758: 22 80 00 12 be,a 20077a0 200775c: c4 00 c0 00 ld [ %g3 ], %g2 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 2007760: 40 00 08 d0 call 2009aa0 <_Thread_Get> 2007764: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 2007768: c2 07 bf f4 ld [ %fp + -12 ], %g1 200776c: 80 a0 60 00 cmp %g1, 0 2007770: 12 80 00 09 bne 2007794 2007774: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 2007778: c2 02 21 68 ld [ %o0 + 0x168 ], %g1 200777c: 84 06 60 08 add %i1, 8, %g2 2007780: 85 28 a0 02 sll %g2, 2, %g2 2007784: c6 00 40 02 ld [ %g1 + %g2 ], %g3 _Thread_Enable_dispatch(); 2007788: b0 10 20 00 clr %i0 200778c: 40 00 08 b7 call 2009a68 <_Thread_Enable_dispatch> 2007790: c6 26 80 00 st %g3, [ %i2 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007794: 81 c7 e0 08 ret 2007798: 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 ]; *note = api->Notepads[ notepad ]; 200779c: c4 00 c0 00 ld [ %g3 ], %g2 20077a0: 82 06 60 08 add %i1, 8, %g1 20077a4: c6 00 a1 68 ld [ %g2 + 0x168 ], %g3 20077a8: 83 28 60 02 sll %g1, 2, %g1 20077ac: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 20077b0: c4 26 80 00 st %g2, [ %i2 ] 20077b4: 81 c7 e0 08 ret 20077b8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02005bd4 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, Objects_Id *id ) { 2005bd4: 9d e3 bf 98 save %sp, -104, %sp 2005bd8: 92 10 00 18 mov %i0, %o1 2005bdc: 96 10 00 1a mov %i2, %o3 2005be0: 94 10 00 19 mov %i1, %o2 Objects_Name_or_id_lookup_errors status; if ( !id ) 2005be4: 80 a6 a0 00 cmp %i2, 0 2005be8: 02 80 00 11 be 2005c2c <== NEVER TAKEN 2005bec: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 2005bf0: 80 a2 60 00 cmp %o1, 0 2005bf4: 12 80 00 07 bne 2005c10 2005bf8: 03 00 80 5d sethi %hi(0x2017400), %g1 *id = _Thread_Executing->Object.id; 2005bfc: c4 00 60 a4 ld [ %g1 + 0xa4 ], %g2 ! 20174a4 <_Thread_Executing> 2005c00: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2005c04: c2 26 80 00 st %g1, [ %i2 ] 2005c08: 81 c7 e0 08 ret 2005c0c: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 2005c10: 11 00 80 5c sethi %hi(0x2017000), %o0 2005c14: 40 00 05 b6 call 20072ec <_Objects_Name_to_id_u32> 2005c18: 90 12 22 ec or %o0, 0x2ec, %o0 ! 20172ec <_RTEMS_tasks_Information> return _Status_Object_name_errors_to_status[ status ]; 2005c1c: 03 00 80 56 sethi %hi(0x2015800), %g1 2005c20: 91 2a 20 02 sll %o0, 2, %o0 2005c24: 82 10 62 30 or %g1, 0x230, %g1 2005c28: f0 00 40 08 ld [ %g1 + %o0 ], %i0 } 2005c2c: 81 c7 e0 08 ret 2005c30: 81 e8 00 00 restore =============================================================================== 02006258 : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 2006258: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200625c: 90 10 00 18 mov %i0, %o0 2006260: 40 00 07 d4 call 20081b0 <_Thread_Get> 2006264: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 2006268: c2 07 bf f4 ld [ %fp + -12 ], %g1 200626c: 80 a0 60 00 cmp %g1, 0 2006270: 12 80 00 08 bne 2006290 <== NEVER TAKEN 2006274: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 2006278: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 200627c: 80 88 60 02 btst 2, %g1 2006280: 02 80 00 06 be 2006298 2006284: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 2006288: 40 00 07 bc call 2008178 <_Thread_Enable_dispatch> 200628c: b0 10 20 0f mov 0xf, %i0 ! f case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006290: 81 c7 e0 08 ret 2006294: 81 e8 00 00 restore the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 2006298: 40 00 07 b8 call 2008178 <_Thread_Enable_dispatch> 200629c: b0 10 20 00 clr %i0 20062a0: 81 c7 e0 08 ret 20062a4: 81 e8 00 00 restore =============================================================================== 0200c820 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 200c820: 9d e3 bf 98 save %sp, -104, %sp 200c824: a8 10 00 18 mov %i0, %l4 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 200c828: 80 a6 a0 00 cmp %i2, 0 200c82c: 02 80 00 44 be 200c93c <== NEVER TAKEN 200c830: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 200c834: 03 00 80 5d sethi %hi(0x2017400), %g1 200c838: e4 00 60 a4 ld [ %g1 + 0xa4 ], %l2 ! 20174a4 <_Thread_Executing> api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200c83c: c4 0c a0 76 ldub [ %l2 + 0x76 ], %g2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200c840: c6 04 a0 7c ld [ %l2 + 0x7c ], %g3 executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200c844: 80 a0 00 02 cmp %g0, %g2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 200c848: e6 04 a1 68 ld [ %l2 + 0x168 ], %l3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200c84c: 82 60 3f ff subx %g0, -1, %g1 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200c850: 80 a0 e0 00 cmp %g3, 0 200c854: 12 80 00 3c bne 200c944 200c858: a3 28 60 08 sll %g1, 8, %l1 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 200c85c: c2 0c e0 08 ldub [ %l3 + 8 ], %g1 200c860: 80 a0 00 01 cmp %g0, %g1 old_mode |= _ISR_Get_level(); 200c864: 7f ff f3 c4 call 2009774 <_CPU_ISR_Get_level> 200c868: a0 60 3f ff subx %g0, -1, %l0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 200c86c: a1 2c 20 0a sll %l0, 0xa, %l0 200c870: a0 14 00 08 or %l0, %o0, %l0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200c874: a0 14 00 11 or %l0, %l1, %l0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200c878: 80 8e 61 00 btst 0x100, %i1 200c87c: 02 80 00 06 be 200c894 200c880: e0 26 80 00 st %l0, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE; 200c884: 83 35 20 08 srl %l4, 8, %g1 200c888: 82 18 60 01 xor %g1, 1, %g1 200c88c: 82 08 60 01 and %g1, 1, %g1 200c890: c2 2c a0 76 stb %g1, [ %l2 + 0x76 ] if ( mask & RTEMS_TIMESLICE_MASK ) { 200c894: 80 8e 62 00 btst 0x200, %i1 200c898: 02 80 00 0b be 200c8c4 200c89c: 80 8e 60 0f btst 0xf, %i1 if ( _Modes_Is_timeslice(mode_set) ) { 200c8a0: 80 8d 22 00 btst 0x200, %l4 200c8a4: 22 80 00 07 be,a 200c8c0 200c8a8: c0 24 a0 7c clr [ %l2 + 0x7c ] executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200c8ac: 03 00 80 5c sethi %hi(0x2017000), %g1 200c8b0: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 2017338 <_Thread_Ticks_per_timeslice> if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200c8b4: 82 10 20 01 mov 1, %g1 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200c8b8: c4 24 a0 78 st %g2, [ %l2 + 0x78 ] if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200c8bc: c2 24 a0 7c st %g1, [ %l2 + 0x7c ] /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 200c8c0: 80 8e 60 0f btst 0xf, %i1 200c8c4: 12 80 00 2d bne 200c978 200c8c8: 01 00 00 00 nop */ is_asr_enabled = FALSE; needs_asr_dispatching = FALSE; if ( mask & RTEMS_ASR_MASK ) { 200c8cc: 80 8e 64 00 btst 0x400, %i1 200c8d0: 02 80 00 16 be 200c928 200c8d4: a0 10 20 00 clr %l0 is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 200c8d8: c4 0c e0 08 ldub [ %l3 + 8 ], %g2 */ is_asr_enabled = FALSE; needs_asr_dispatching = FALSE; if ( mask & RTEMS_ASR_MASK ) { 200c8dc: 83 35 20 0a srl %l4, 0xa, %g1 200c8e0: 82 18 60 01 xor %g1, 1, %g1 200c8e4: 82 08 60 01 and %g1, 1, %g1 is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 200c8e8: 80 a0 80 01 cmp %g2, %g1 200c8ec: 22 80 00 10 be,a 200c92c 200c8f0: 03 00 80 5d sethi %hi(0x2017400), %g1 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 200c8f4: 7f ff d5 3c call 2001de4 200c8f8: c2 2c e0 08 stb %g1, [ %l3 + 8 ] _signals = information->signals_pending; 200c8fc: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1 information->signals_pending = information->signals_posted; 200c900: c4 04 e0 14 ld [ %l3 + 0x14 ], %g2 information->signals_posted = _signals; 200c904: c2 24 e0 14 st %g1, [ %l3 + 0x14 ] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 200c908: c4 24 e0 18 st %g2, [ %l3 + 0x18 ] information->signals_posted = _signals; _ISR_Enable( _level ); 200c90c: 7f ff d5 3a call 2001df4 200c910: 01 00 00 00 nop asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 200c914: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 200c918: 80 a0 60 00 cmp %g1, 0 200c91c: 12 80 00 27 bne 200c9b8 200c920: 82 10 20 01 mov 1, %g1 needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 200c924: a0 10 20 00 clr %l0 } } } if ( _System_state_Is_up(_System_state_Current) ) 200c928: 03 00 80 5d sethi %hi(0x2017400), %g1 200c92c: c4 00 61 84 ld [ %g1 + 0x184 ], %g2 ! 2017584 <_System_state_Current> 200c930: 80 a0 a0 03 cmp %g2, 3 200c934: 02 80 00 16 be 200c98c <== ALWAYS TAKEN 200c938: b0 10 20 00 clr %i0 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 200c93c: 81 c7 e0 08 ret 200c940: 81 e8 00 00 restore if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 200c944: c2 0c e0 08 ldub [ %l3 + 8 ], %g1 old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 200c948: a2 14 62 00 or %l1, 0x200, %l1 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 200c94c: 80 a0 00 01 cmp %g0, %g1 old_mode |= _ISR_Get_level(); 200c950: 7f ff f3 89 call 2009774 <_CPU_ISR_Get_level> 200c954: a0 60 3f ff subx %g0, -1, %l0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 200c958: a1 2c 20 0a sll %l0, 0xa, %l0 200c95c: a0 14 00 08 or %l0, %o0, %l0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200c960: a0 14 00 11 or %l0, %l1, %l0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200c964: 80 8e 61 00 btst 0x100, %i1 200c968: 02 bf ff cb be 200c894 200c96c: e0 26 80 00 st %l0, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE; 200c970: 10 bf ff c6 b 200c888 200c974: 83 35 20 08 srl %l4, 8, %g1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 200c978: 90 0d 20 0f and %l4, 0xf, %o0 200c97c: 7f ff d5 1e call 2001df4 200c980: 91 2a 20 08 sll %o0, 8, %o0 */ is_asr_enabled = FALSE; needs_asr_dispatching = FALSE; if ( mask & RTEMS_ASR_MASK ) { 200c984: 10 bf ff d3 b 200c8d0 200c988: 80 8e 64 00 btst 0x400, %i1 } } } if ( _System_state_Is_up(_System_state_Current) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 200c98c: 40 00 00 7c call 200cb7c <_Thread_Evaluate_mode> 200c990: 01 00 00 00 nop 200c994: 80 8a 20 ff btst 0xff, %o0 200c998: 12 80 00 04 bne 200c9a8 200c99c: 80 8c 20 ff btst 0xff, %l0 200c9a0: 22 bf ff e7 be,a 200c93c 200c9a4: b0 10 20 00 clr %i0 _Thread_Dispatch(); 200c9a8: 7f ff ec 0d call 20079dc <_Thread_Dispatch> 200c9ac: b0 10 20 00 clr %i0 200c9b0: 81 c7 e0 08 ret 200c9b4: 81 e8 00 00 restore if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 200c9b8: a0 10 20 01 mov 1, %l0 200c9bc: 10 bf ff db b 200c928 200c9c0: c2 2c a0 75 stb %g1, [ %l2 + 0x75 ] =============================================================================== 020078c4 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 20078c4: 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() ) 20078c8: 03 00 80 73 sethi %hi(0x201cc00), %g1 20078cc: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 201ccac <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 20078d0: 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() ) 20078d4: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 20078d8: c4 08 60 04 ldub [ %g1 + 4 ], %g2 20078dc: 80 a0 a0 00 cmp %g2, 0 20078e0: 02 80 00 1c be 2007950 <== NEVER TAKEN 20078e4: 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 ) 20078e8: 80 a6 60 0f cmp %i1, 0xf 20078ec: 18 80 00 19 bgu 2007950 20078f0: b0 10 20 0a mov 0xa, %i0 20078f4: 03 00 80 73 sethi %hi(0x201cc00), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 20078f8: 80 a2 20 00 cmp %o0, 0 20078fc: 02 80 00 17 be 2007958 2007900: 86 10 60 d4 or %g1, 0xd4, %g3 2007904: 03 00 80 73 sethi %hi(0x201cc00), %g1 2007908: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 ! 201ccd4 <_Thread_Executing> 200790c: 86 10 60 d4 or %g1, 0xd4, %g3 2007910: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007914: 80 a2 00 01 cmp %o0, %g1 2007918: 22 80 00 11 be,a 200795c <== NEVER TAKEN 200791c: 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 ); 2007920: 40 00 08 60 call 2009aa0 <_Thread_Get> 2007924: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 2007928: c2 07 bf f4 ld [ %fp + -12 ], %g1 200792c: 80 a0 60 00 cmp %g1, 0 2007930: 12 80 00 08 bne 2007950 2007934: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 2007938: c4 02 21 68 ld [ %o0 + 0x168 ], %g2 200793c: 82 06 60 08 add %i1, 8, %g1 2007940: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 2007944: b0 10 20 00 clr %i0 2007948: 40 00 08 48 call 2009a68 <_Thread_Enable_dispatch> 200794c: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007950: 81 c7 e0 08 ret 2007954: 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; 2007958: c2 00 c0 00 ld [ %g3 ], %g1 200795c: 84 06 60 08 add %i1, 8, %g2 2007960: c6 00 61 68 ld [ %g1 + 0x168 ], %g3 2007964: 85 28 a0 02 sll %g2, 2, %g2 2007968: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 200796c: 81 c7 e0 08 ret 2007970: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02006e40 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 2006e40: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 2006e44: 80 a6 60 00 cmp %i1, 0 2006e48: 02 80 00 07 be 2006e64 2006e4c: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 2006e50: 03 00 80 69 sethi %hi(0x201a400), %g1 2006e54: c4 08 62 24 ldub [ %g1 + 0x224 ], %g2 ! 201a624 2006e58: 80 a6 40 02 cmp %i1, %g2 2006e5c: 18 80 00 1c bgu 2006ecc 2006e60: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 2006e64: 80 a6 a0 00 cmp %i2, 0 2006e68: 02 80 00 19 be 2006ecc <== NEVER TAKEN 2006e6c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 2006e70: 40 00 08 29 call 2008f14 <_Thread_Get> 2006e74: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 2006e78: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006e7c: 80 a0 60 00 cmp %g1, 0 2006e80: 12 80 00 13 bne 2006ecc 2006e84: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 2006e88: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 2006e8c: 80 a6 60 00 cmp %i1, 0 2006e90: 02 80 00 0d be 2006ec4 2006e94: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 2006e98: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2006e9c: 80 a0 60 00 cmp %g1, 0 2006ea0: 02 80 00 06 be 2006eb8 2006ea4: f2 22 20 18 st %i1, [ %o0 + 0x18 ] 2006ea8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2006eac: 80 a6 40 01 cmp %i1, %g1 2006eb0: 1a 80 00 05 bcc 2006ec4 <== ALWAYS TAKEN 2006eb4: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 2006eb8: 92 10 00 19 mov %i1, %o1 2006ebc: 40 00 06 72 call 2008884 <_Thread_Change_priority> 2006ec0: 94 10 20 00 clr %o2 } _Thread_Enable_dispatch(); 2006ec4: 40 00 08 06 call 2008edc <_Thread_Enable_dispatch> 2006ec8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006ecc: 81 c7 e0 08 ret 2006ed0: 81 e8 00 00 restore =============================================================================== 020075f4 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 20075f4: 9d e3 bf 90 save %sp, -112, %sp 20075f8: 90 10 00 18 mov %i0, %o0 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 20075fc: 80 a6 60 00 cmp %i1, 0 2007600: 02 80 00 18 be 2007660 <== NEVER TAKEN 2007604: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 2007608: 40 00 08 37 call 20096e4 <_Thread_Get> 200760c: 92 07 bf f4 add %fp, -12, %o1 switch (location) { 2007610: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 2007614: a0 10 00 08 mov %o0, %l0 switch (location) { 2007618: 80 a0 60 00 cmp %g1, 0 200761c: 12 80 00 11 bne 2007660 <== NEVER TAKEN 2007620: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 2007624: c4 02 21 78 ld [ %o0 + 0x178 ], %g2 while (tvp) { 2007628: 80 a0 a0 00 cmp %g2, 0 200762c: 32 80 00 07 bne,a 2007648 2007630: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2007634: 30 80 00 0d b,a 2007668 2007638: 80 a0 a0 00 cmp %g2, 0 200763c: 02 80 00 0b be 2007668 2007640: 01 00 00 00 nop if (tvp->ptr == ptr) { 2007644: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2007648: 80 a0 40 19 cmp %g1, %i1 200764c: 32 bf ff fb bne,a 2007638 2007650: c4 00 80 00 ld [ %g2 ], %g2 tvp->dtor = dtor; 2007654: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] _Thread_Enable_dispatch(); 2007658: 40 00 08 15 call 20096ac <_Thread_Enable_dispatch> 200765c: b0 10 20 00 clr %i0 2007660: 81 c7 e0 08 ret 2007664: 81 e8 00 00 restore } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 2007668: 40 00 0e 00 call 200ae68 <_Workspace_Allocate> 200766c: 90 10 20 14 mov 0x14, %o0 _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 2007670: 80 a2 20 00 cmp %o0, 0 2007674: 02 80 00 0d be 20076a8 2007678: 01 00 00 00 nop } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 200767c: c4 04 21 78 ld [ %l0 + 0x178 ], %g2 _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 2007680: c2 06 40 00 ld [ %i1 ], %g1 new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 2007684: d0 24 21 78 st %o0, [ %l0 + 0x178 ] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 2007688: c2 22 20 08 st %g1, [ %o0 + 8 ] new->ptr = ptr; 200768c: f2 22 20 04 st %i1, [ %o0 + 4 ] new->dtor = dtor; 2007690: f4 22 20 10 st %i2, [ %o0 + 0x10 ] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 2007694: c4 22 00 00 st %g2, [ %o0 ] the_thread->task_variables = new; _Thread_Enable_dispatch(); 2007698: 40 00 08 05 call 20096ac <_Thread_Enable_dispatch> 200769c: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20076a0: 81 c7 e0 08 ret 20076a4: 81 e8 00 00 restore * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 20076a8: 40 00 08 01 call 20096ac <_Thread_Enable_dispatch> 20076ac: b0 10 20 1a mov 0x1a, %i0 20076b0: 81 c7 e0 08 ret 20076b4: 81 e8 00 00 restore =============================================================================== 020076b8 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 20076b8: 9d e3 bf 90 save %sp, -112, %sp 20076bc: 90 10 00 18 mov %i0, %o0 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 20076c0: 80 a6 60 00 cmp %i1, 0 20076c4: 02 80 00 1c be 2007734 20076c8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 20076cc: 40 00 08 06 call 20096e4 <_Thread_Get> 20076d0: 92 07 bf f4 add %fp, -12, %o1 switch (location) { 20076d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 20076d8: 80 a0 60 00 cmp %g1, 0 20076dc: 12 80 00 16 bne 2007734 <== NEVER TAKEN 20076e0: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 20076e4: d2 02 21 78 ld [ %o0 + 0x178 ], %o1 while (tvp) { 20076e8: 80 a2 60 00 cmp %o1, 0 20076ec: 02 80 00 10 be 200772c 20076f0: 01 00 00 00 nop if (tvp->ptr == ptr) { 20076f4: c2 02 60 04 ld [ %o1 + 4 ], %g1 20076f8: 80 a0 40 19 cmp %g1, %i1 20076fc: 12 80 00 08 bne 200771c 2007700: 84 10 00 09 mov %o1, %g2 if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 2007704: 10 80 00 15 b 2007758 2007708: c2 02 40 00 ld [ %o1 ], %g1 switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 200770c: 80 a0 40 19 cmp %g1, %i1 2007710: 22 80 00 0b be,a 200773c 2007714: c2 02 40 00 ld [ %o1 ], %g1 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 2007718: 84 10 00 09 mov %o1, %g2 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 200771c: d2 02 40 00 ld [ %o1 ], %o1 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 2007720: 80 a2 60 00 cmp %o1, 0 2007724: 32 bf ff fa bne,a 200770c <== ALWAYS TAKEN 2007728: c2 02 60 04 ld [ %o1 + 4 ], %g1 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 200772c: 40 00 07 e0 call 20096ac <_Thread_Enable_dispatch> 2007730: b0 10 20 09 mov 9, %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007734: 81 c7 e0 08 ret 2007738: 81 e8 00 00 restore case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 200773c: c2 20 80 00 st %g1, [ %g2 ] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 2007740: 40 00 00 2d call 20077f4 <_RTEMS_Tasks_Invoke_task_variable_dtor> 2007744: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2007748: 40 00 07 d9 call 20096ac <_Thread_Enable_dispatch> 200774c: 01 00 00 00 nop 2007750: 81 c7 e0 08 ret 2007754: 81 e8 00 00 restore while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 2007758: 10 bf ff fa b 2007740 200775c: c2 22 21 78 st %g1, [ %o0 + 0x178 ] =============================================================================== 02007760 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 2007760: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 2007764: 80 a6 60 00 cmp %i1, 0 2007768: 02 80 00 1d be 20077dc 200776c: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; if ( !result ) 2007770: 80 a6 a0 00 cmp %i2, 0 2007774: 02 80 00 18 be 20077d4 2007778: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 200777c: 40 00 07 da call 20096e4 <_Thread_Get> 2007780: 92 07 bf f4 add %fp, -12, %o1 switch (location) { 2007784: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007788: 80 a0 60 00 cmp %g1, 0 200778c: 12 80 00 12 bne 20077d4 <== NEVER TAKEN 2007790: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 2007794: d0 02 21 78 ld [ %o0 + 0x178 ], %o0 while (tvp) { 2007798: 80 a2 20 00 cmp %o0, 0 200779c: 32 80 00 07 bne,a 20077b8 20077a0: c2 02 20 04 ld [ %o0 + 4 ], %g1 20077a4: 30 80 00 10 b,a 20077e4 20077a8: 80 a2 20 00 cmp %o0, 0 20077ac: 02 80 00 0e be 20077e4 <== NEVER TAKEN 20077b0: 01 00 00 00 nop if (tvp->ptr == ptr) { 20077b4: c2 02 20 04 ld [ %o0 + 4 ], %g1 20077b8: 80 a0 40 19 cmp %g1, %i1 20077bc: 32 bf ff fb bne,a 20077a8 20077c0: d0 02 00 00 ld [ %o0 ], %o0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 20077c4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 20077c8: b0 10 20 00 clr %i0 20077cc: 40 00 07 b8 call 20096ac <_Thread_Enable_dispatch> 20077d0: c2 26 80 00 st %g1, [ %i2 ] 20077d4: 81 c7 e0 08 ret 20077d8: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20077dc: 81 c7 e0 08 ret 20077e0: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 20077e4: 40 00 07 b2 call 20096ac <_Thread_Enable_dispatch> 20077e8: b0 10 20 09 mov 9, %i0 20077ec: 81 c7 e0 08 ret 20077f0: 81 e8 00 00 restore =============================================================================== 02007358 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 2007358: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval seconds; if ( !_TOD_Is_set ) 200735c: 03 00 80 6b sethi %hi(0x201ac00), %g1 2007360: c4 08 61 b4 ldub [ %g1 + 0x1b4 ], %g2 ! 201adb4 <_TOD_Is_set> */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 2007364: a0 10 00 18 mov %i0, %l0 Watchdog_Interval seconds; if ( !_TOD_Is_set ) 2007368: 80 a0 a0 00 cmp %g2, 0 200736c: 02 80 00 2e be 2007424 2007370: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 2007374: 80 a4 20 00 cmp %l0, 0 2007378: 02 80 00 2b be 2007424 <== NEVER TAKEN 200737c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 2007380: c0 24 20 18 clr [ %l0 + 0x18 ] if ( !_TOD_Validate( time_buffer ) ) 2007384: 7f ff fc bd call 2006678 <_TOD_Validate> 2007388: 90 10 00 10 mov %l0, %o0 200738c: 80 8a 20 ff btst 0xff, %o0 2007390: 12 80 00 04 bne 20073a0 2007394: 01 00 00 00 nop &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 2007398: 81 c7 e0 08 ret 200739c: 91 e8 20 14 restore %g0, 0x14, %o0 time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 20073a0: 7f ff fc 81 call 20065a4 <_TOD_To_seconds> 20073a4: 90 10 00 10 mov %l0, %o0 if ( seconds <= _TOD_Seconds_since_epoch ) 20073a8: 23 00 80 6b sethi %hi(0x201ac00), %l1 20073ac: c2 04 62 34 ld [ %l1 + 0x234 ], %g1 ! 201ae34 <_TOD_Now> 20073b0: 80 a2 00 01 cmp %o0, %g1 20073b4: 08 bf ff f9 bleu 2007398 20073b8: b0 10 00 08 mov %o0, %i0 20073bc: 05 00 80 6b sethi %hi(0x201ac00), %g2 20073c0: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 201ada0 <_Thread_Dispatch_disable_level> 20073c4: 82 00 60 01 inc %g1 20073c8: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ] return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 20073cc: 21 00 80 6b sethi %hi(0x201ac00), %l0 20073d0: d0 04 22 64 ld [ %l0 + 0x264 ], %o0 ! 201ae64 <_Thread_Executing> 20073d4: 40 00 0a 26 call 2009c6c <_Thread_Set_state> 20073d8: 92 10 20 10 mov 0x10, %o1 _Watchdog_Initialize( 20073dc: c4 04 22 64 ld [ %l0 + 0x264 ], %g2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 20073e0: 11 00 80 6b sethi %hi(0x201ac00), %o0 20073e4: c6 00 a0 08 ld [ %g2 + 8 ], %g3 20073e8: 90 12 22 78 or %o0, 0x278, %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 20073ec: c6 20 a0 68 st %g3, [ %g2 + 0x68 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20073f0: c2 04 62 34 ld [ %l1 + 0x234 ], %g1 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 20073f4: 92 00 a0 48 add %g2, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20073f8: 82 26 00 01 sub %i0, %g1, %g1 20073fc: c2 20 a0 54 st %g1, [ %g2 + 0x54 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2007400: 03 00 80 24 sethi %hi(0x2009000), %g1 2007404: 82 10 60 18 or %g1, 0x18, %g1 ! 2009018 <_Thread_Delay_ended> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007408: c0 20 a0 50 clr [ %g2 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 200740c: c0 20 a0 6c clr [ %g2 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2007410: c2 20 a0 64 st %g1, [ %g2 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2007414: 40 00 0c 5e call 200a58c <_Watchdog_Insert> 2007418: b0 10 20 00 clr %i0 ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); 200741c: 40 00 07 76 call 20091f4 <_Thread_Enable_dispatch> 2007420: 01 00 00 00 nop 2007424: 81 c7 e0 08 ret 2007428: 81 e8 00 00 restore =============================================================================== 020113e4 : */ rtems_status_code rtems_timer_cancel( Objects_Id id ) { 20113e4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 20113e8: 11 00 80 c4 sethi %hi(0x2031000), %o0 20113ec: 92 10 00 18 mov %i0, %o1 20113f0: 90 12 20 a0 or %o0, 0xa0, %o0 20113f4: 40 00 0b 9b call 2014260 <_Objects_Get> 20113f8: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20113fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011400: 80 a0 60 00 cmp %g1, 0 2011404: 12 80 00 0a bne 201142c 2011408: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 201140c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011410: 80 a0 60 04 cmp %g1, 4 2011414: 02 80 00 04 be 2011424 <== NEVER TAKEN 2011418: 01 00 00 00 nop (void) _Watchdog_Remove( &the_timer->Ticker ); 201141c: 40 00 14 9e call 2016694 <_Watchdog_Remove> 2011420: 90 02 20 10 add %o0, 0x10, %o0 _Thread_Enable_dispatch(); 2011424: 40 00 0e 12 call 2014c6c <_Thread_Enable_dispatch> 2011428: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 201142c: 81 c7 e0 08 ret 2011430: 81 e8 00 00 restore =============================================================================== 02011434 : rtems_status_code rtems_timer_create( rtems_name name, Objects_Id *id ) { 2011434: 9d e3 bf 98 save %sp, -104, %sp Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 2011438: a2 96 20 00 orcc %i0, 0, %l1 201143c: 02 80 00 20 be 20114bc 2011440: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 2011444: 80 a6 60 00 cmp %i1, 0 2011448: 02 80 00 1d be 20114bc <== NEVER TAKEN 201144c: b0 10 20 09 mov 9, %i0 2011450: 05 00 80 c3 sethi %hi(0x2030c00), %g2 2011454: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 2030d80 <_Thread_Dispatch_disable_level> 2011458: 82 00 60 01 inc %g1 201145c: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 2011460: 21 00 80 c4 sethi %hi(0x2031000), %l0 2011464: 40 00 0a 05 call 2013c78 <_Objects_Allocate> 2011468: 90 14 20 a0 or %l0, 0xa0, %o0 ! 20310a0 <_Timer_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 201146c: 80 a2 20 00 cmp %o0, 0 2011470: 02 80 00 15 be 20114c4 2011474: 82 14 20 a0 or %l0, 0xa0, %g1 2011478: c6 02 20 08 ld [ %o0 + 8 ], %g3 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 201147c: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2011480: c8 00 60 1c ld [ %g1 + 0x1c ], %g4 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2011484: c0 22 20 30 clr [ %o0 + 0x30 ] &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 2011488: c6 26 40 00 st %g3, [ %i1 ] if ( !the_timer ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 201148c: 84 10 20 04 mov 4, %g2 2011490: 03 00 00 3f sethi %hi(0xfc00), %g1 2011494: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2011498: 86 08 c0 01 and %g3, %g1, %g3 201149c: 87 28 e0 02 sll %g3, 2, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20114a0: c0 22 20 18 clr [ %o0 + 0x18 ] the_watchdog->routine = routine; 20114a4: c0 22 20 2c clr [ %o0 + 0x2c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20114a8: c0 22 20 34 clr [ %o0 + 0x34 ] 20114ac: c4 22 20 38 st %g2, [ %o0 + 0x38 ] 20114b0: d0 21 00 03 st %o0, [ %g4 + %g3 ] &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); 20114b4: 40 00 0d ee call 2014c6c <_Thread_Enable_dispatch> 20114b8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 20114bc: 81 c7 e0 08 ret 20114c0: 81 e8 00 00 restore _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 20114c4: 40 00 0d ea call 2014c6c <_Thread_Enable_dispatch> 20114c8: b0 10 20 05 mov 5, %i0 20114cc: 81 c7 e0 08 ret 20114d0: 81 e8 00 00 restore =============================================================================== 02011534 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 2011534: 9d e3 bf 90 save %sp, -112, %sp 2011538: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 201153c: 80 a6 60 00 cmp %i1, 0 2011540: 02 80 00 26 be 20115d8 2011544: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 2011548: 80 a6 a0 00 cmp %i2, 0 201154c: 02 80 00 23 be 20115d8 <== NEVER TAKEN 2011550: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 2011554: 11 00 80 c4 sethi %hi(0x2031000), %o0 2011558: 92 10 00 12 mov %l2, %o1 201155c: 90 12 20 a0 or %o0, 0xa0, %o0 2011560: 40 00 0b 40 call 2014260 <_Objects_Get> 2011564: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011568: c2 07 bf f4 ld [ %fp + -12 ], %g1 201156c: a0 10 00 08 mov %o0, %l0 2011570: 80 a0 60 00 cmp %g1, 0 2011574: 12 80 00 19 bne 20115d8 2011578: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 201157c: a2 02 20 10 add %o0, 0x10, %l1 2011580: 40 00 14 45 call 2016694 <_Watchdog_Remove> 2011584: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 2011588: 7f ff e7 3b call 200b274 201158c: 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 ) { 2011590: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011594: 80 a0 60 00 cmp %g1, 0 2011598: 12 80 00 12 bne 20115e0 <== NEVER TAKEN 201159c: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20115a0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 20115a4: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 20115a8: 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; 20115ac: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20115b0: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 20115b4: 7f ff e7 34 call 200b284 20115b8: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20115bc: 92 10 00 11 mov %l1, %o1 20115c0: 11 00 80 c3 sethi %hi(0x2030c00), %o0 20115c4: 90 12 22 64 or %o0, 0x264, %o0 ! 2030e64 <_Watchdog_Ticks_chain> 20115c8: 40 00 13 c8 call 20164e8 <_Watchdog_Insert> 20115cc: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 20115d0: 40 00 0d a7 call 2014c6c <_Thread_Enable_dispatch> 20115d4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20115d8: 81 c7 e0 08 ret 20115dc: 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 ); 20115e0: 7f ff e7 29 call 200b284 <== NOT EXECUTED 20115e4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 20115e8: 40 00 0d a1 call 2014c6c <_Thread_Enable_dispatch> <== NOT EXECUTED 20115ec: 01 00 00 00 nop <== NOT EXECUTED 20115f0: 81 c7 e0 08 ret <== NOT EXECUTED 20115f4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020115f8 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 20115f8: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 20115fc: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2011600: c4 08 61 94 ldub [ %g1 + 0x194 ], %g2 ! 2030d94 <_TOD_Is_set> Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 2011604: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 2011608: 80 a0 a0 00 cmp %g2, 0 201160c: 02 80 00 2f be 20116c8 2011610: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 2011614: 7f ff f5 10 call 200ea54 <_TOD_Validate> 2011618: 90 10 00 19 mov %i1, %o0 201161c: 80 8a 20 ff btst 0xff, %o0 2011620: 02 80 00 0b be 201164c 2011624: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_CLOCK; if ( !routine ) 2011628: 02 80 00 28 be 20116c8 <== NEVER TAKEN 201162c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 2011630: 7f ff f4 d4 call 200e980 <_TOD_To_seconds> 2011634: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch ) 2011638: 27 00 80 c3 sethi %hi(0x2030c00), %l3 201163c: c2 04 e2 14 ld [ %l3 + 0x214 ], %g1 ! 2030e14 <_TOD_Now> 2011640: 80 a2 00 01 cmp %o0, %g1 2011644: 18 80 00 04 bgu 2011654 2011648: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 201164c: 81 c7 e0 08 ret 2011650: 91 e8 20 14 restore %g0, 0x14, %o0 2011654: 11 00 80 c4 sethi %hi(0x2031000), %o0 2011658: 92 10 00 12 mov %l2, %o1 201165c: 90 12 20 a0 or %o0, 0xa0, %o0 2011660: 40 00 0b 00 call 2014260 <_Objects_Get> 2011664: 94 07 bf f4 add %fp, -12, %o2 seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011668: c2 07 bf f4 ld [ %fp + -12 ], %g1 201166c: b2 10 00 08 mov %o0, %i1 2011670: 80 a0 60 00 cmp %g1, 0 2011674: 12 80 00 15 bne 20116c8 2011678: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 201167c: a0 02 20 10 add %o0, 0x10, %l0 2011680: 40 00 14 05 call 2016694 <_Watchdog_Remove> 2011684: 90 10 00 10 mov %l0, %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2011688: e4 26 60 30 st %l2, [ %i1 + 0x30 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 201168c: c2 04 e2 14 ld [ %l3 + 0x214 ], %g1 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2011690: 92 10 00 10 mov %l0, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2011694: 82 24 40 01 sub %l1, %g1, %g1 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2011698: 11 00 80 c3 sethi %hi(0x2030c00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 201169c: c2 26 60 1c st %g1, [ %i1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 20116a0: 90 12 22 58 or %o0, 0x258, %o0 the_timer->the_class = TIMER_TIME_OF_DAY; 20116a4: 82 10 20 02 mov 2, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20116a8: f4 26 60 2c st %i2, [ %i1 + 0x2c ] 20116ac: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20116b0: f6 26 60 34 st %i3, [ %i1 + 0x34 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20116b4: c0 26 60 18 clr [ %i1 + 0x18 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 20116b8: 40 00 13 8c call 20164e8 <_Watchdog_Insert> 20116bc: b0 10 20 00 clr %i0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); 20116c0: 40 00 0d 6b call 2014c6c <_Thread_Enable_dispatch> 20116c4: 01 00 00 00 nop 20116c8: 81 c7 e0 08 ret 20116cc: 81 e8 00 00 restore =============================================================================== 020116d0 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 20116d0: 9d e3 bf 90 save %sp, -112, %sp 20116d4: 92 10 00 18 mov %i0, %o1 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 20116d8: 80 a6 60 00 cmp %i1, 0 20116dc: 02 80 00 14 be 201172c <== NEVER TAKEN 20116e0: b0 10 20 09 mov 9, %i0 20116e4: 11 00 80 c4 sethi %hi(0x2031000), %o0 20116e8: 94 07 bf f4 add %fp, -12, %o2 20116ec: 40 00 0a dd call 2014260 <_Objects_Get> 20116f0: 90 12 20 a0 or %o0, 0xa0, %o0 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20116f4: c2 07 bf f4 ld [ %fp + -12 ], %g1 20116f8: 80 a0 60 00 cmp %g1, 0 20116fc: 12 80 00 0c bne 201172c 2011700: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; 2011704: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 2011708: c6 02 20 38 ld [ %o0 + 0x38 ], %g3 the_info->initial = the_timer->Ticker.initial; 201170c: c2 26 60 04 st %g1, [ %i1 + 4 ] the_info->start_time = the_timer->Ticker.start_time; 2011710: c4 02 20 24 ld [ %o0 + 0x24 ], %g2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 2011714: c6 26 40 00 st %g3, [ %i1 ] the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; 2011718: c4 26 60 08 st %g2, [ %i1 + 8 ] the_info->stop_time = the_timer->Ticker.stop_time; 201171c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 _Thread_Enable_dispatch(); 2011720: b0 10 20 00 clr %i0 2011724: 40 00 0d 52 call 2014c6c <_Thread_Enable_dispatch> 2011728: c2 26 60 0c st %g1, [ %i1 + 0xc ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 201172c: 81 c7 e0 08 ret 2011730: 81 e8 00 00 restore =============================================================================== 020119ec : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 20119ec: 9d e3 bf 90 save %sp, -112, %sp 20119f0: 92 96 20 00 orcc %i0, 0, %o1 20119f4: 12 80 00 05 bne 2011a08 20119f8: 03 00 80 af sethi %hi(0x202bc00), %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; 20119fc: 90 10 20 13 mov 0x13, %o0 } return status; } 2011a00: 81 c7 e0 08 ret 2011a04: 91 e8 00 08 restore %g0, %o0, %o0 2011a08: c4 08 60 34 ldub [ %g1 + 0x34 ], %g2 2011a0c: 80 a2 40 02 cmp %o1, %g2 2011a10: 18 80 00 56 bgu 2011b68 <== ALWAYS TAKEN 2011a14: 80 a2 7f ff cmp %o1, -1 2011a18: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 2011a1c: 05 00 80 c3 sethi %hi(0x2030c00), %g2 2011a20: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 2030d80 <_Thread_Dispatch_disable_level> 2011a24: 82 00 60 01 inc %g1 2011a28: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 2011a2c: 23 00 80 b1 sethi %hi(0x202c400), %l1 initialized = true; 2011a30: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 2011a34: e0 0c 62 f4 ldub [ %l1 + 0x2f4 ], %l0 initialized = true; _Thread_Enable_dispatch(); 2011a38: 40 00 0c 8d call 2014c6c <_Thread_Enable_dispatch> 2011a3c: c2 2c 62 f4 stb %g1, [ %l1 + 0x2f4 ] if ( tmpInitialized ) 2011a40: 80 a4 20 00 cmp %l0, 0 2011a44: 12 bf ff ef bne 2011a00 2011a48: 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); 2011a4c: 05 00 80 c3 sethi %hi(0x2030c00), %g2 2011a50: 82 10 a0 94 or %g2, 0x94, %g1 ! 2030c94 <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011a54: 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; 2011a58: 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); 2011a5c: 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( 2011a60: 92 10 00 18 mov %i0, %o1 2011a64: 94 10 00 19 mov %i1, %o2 2011a68: 19 00 00 20 sethi %hi(0x8000), %o4 2011a6c: c2 20 a0 94 st %g1, [ %g2 + 0x94 ] 2011a70: 98 16 80 0c or %i2, %o4, %o4 2011a74: 11 15 12 53 sethi %hi(0x54494c00), %o0 2011a78: 96 10 21 00 mov 0x100, %o3 2011a7c: 90 12 21 45 or %o0, 0x145, %o0 2011a80: 7f ff fc 78 call 2010c60 2011a84: 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) { 2011a88: 80 a2 20 00 cmp %o0, 0 2011a8c: 12 80 00 34 bne 2011b5c 2011a90: 03 00 80 c3 sethi %hi(0x2030c00), %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( 2011a94: 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 ) 2011a98: 86 10 60 34 or %g1, 0x34, %g3 2011a9c: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 2011aa0: 03 00 00 3f sethi %hi(0xfc00), %g1 2011aa4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2011aa8: 82 0a c0 01 and %o3, %g1, %g1 2011aac: 80 a0 40 02 cmp %g1, %g2 2011ab0: 18 80 00 05 bgu 2011ac4 <== NEVER TAKEN 2011ab4: 98 10 20 00 clr %o4 2011ab8: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 2011abc: 83 28 60 02 sll %g1, 2, %g1 2011ac0: d8 00 80 01 ld [ %g2 + %g1 ], %o4 2011ac4: 09 00 80 c3 sethi %hi(0x2030c00), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011ac8: 1b 00 80 c3 sethi %hi(0x2030c00), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2011acc: 84 11 20 74 or %g4, 0x74, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011ad0: 82 13 60 88 or %o5, 0x88, %g1 2011ad4: 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; 2011ad8: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2011adc: 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; 2011ae0: 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); 2011ae4: 84 00 a0 04 add %g2, 4, %g2 2011ae8: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2011aec: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011af0: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011af4: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 2011af8: c4 21 20 74 st %g2, [ %g4 + 0x74 ] 2011afc: c2 23 60 88 st %g1, [ %o5 + 0x88 ] 2011b00: 05 00 80 c4 sethi %hi(0x2031000), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2011b04: 07 00 80 52 sethi %hi(0x2014800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011b08: 03 00 80 c3 sethi %hi(0x2030c00), %g1 the_watchdog->routine = routine; 2011b0c: 86 10 e2 90 or %g3, 0x290, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011b10: 82 10 60 a0 or %g1, 0xa0, %g1 the_watchdog->routine = routine; 2011b14: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 2011b18: d8 20 a0 e4 st %o4, [ %g2 + 0xe4 ] 2011b1c: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2011b20: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011b24: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011b28: 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; 2011b2c: 05 00 80 46 sethi %hi(0x2011800), %g2 2011b30: 03 00 80 c4 sethi %hi(0x2031000), %g1 2011b34: 84 10 a3 78 or %g2, 0x378, %g2 /* * Start the timer server */ status = rtems_task_start( 2011b38: 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; 2011b3c: c4 20 60 e0 st %g2, [ %g1 + 0xe0 ] /* * Start the timer server */ status = rtems_task_start( 2011b40: 13 00 80 47 sethi %hi(0x2011c00), %o1 2011b44: 94 10 20 00 clr %o2 2011b48: 7f ff fd 9e call 20111c0 2011b4c: 92 12 60 4c or %o1, 0x4c, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 2011b50: 80 a2 20 00 cmp %o0, 0 2011b54: 02 bf ff ab be 2011a00 <== ALWAYS TAKEN 2011b58: 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; 2011b5c: c0 2c 62 f4 clrb [ %l1 + 0x2f4 ] } return status; } 2011b60: 81 c7 e0 08 ret 2011b64: 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 ) 2011b68: 02 bf ff ad be 2011a1c 2011b6c: 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; 2011b70: 10 bf ff a4 b 2011a00 2011b74: 90 10 20 13 mov 0x13, %o0 =============================================================================== 0201176c : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 201176c: 9d e3 bf 90 save %sp, -112, %sp 2011770: 11 00 80 c4 sethi %hi(0x2031000), %o0 2011774: 92 10 00 18 mov %i0, %o1 2011778: 90 12 20 a0 or %o0, 0xa0, %o0 201177c: 40 00 0a b9 call 2014260 <_Objects_Get> 2011780: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011784: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011788: a0 10 00 08 mov %o0, %l0 201178c: 80 a0 60 00 cmp %g1, 0 2011790: 12 80 00 11 bne 20117d4 2011794: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 2011798: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 201179c: 80 a0 60 01 cmp %g1, 1 20117a0: 22 80 00 15 be,a 20117f4 20117a4: 31 00 80 c4 sethi %hi(0x2031000), %i0 20117a8: 1a 80 00 0d bcc 20117dc 20117ac: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 20117b0: a0 02 20 10 add %o0, 0x10, %l0 20117b4: 40 00 13 b8 call 2016694 <_Watchdog_Remove> 20117b8: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 20117bc: 11 00 80 c3 sethi %hi(0x2030c00), %o0 20117c0: 92 10 00 10 mov %l0, %o1 20117c4: 40 00 13 49 call 20164e8 <_Watchdog_Insert> 20117c8: 90 12 22 64 or %o0, 0x264, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 20117cc: 40 00 0d 28 call 2014c6c <_Thread_Enable_dispatch> 20117d0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20117d4: 81 c7 e0 08 ret 20117d8: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 20117dc: 18 bf ff fc bgu 20117cc <== NEVER TAKEN 20117e0: 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(); 20117e4: 40 00 0d 22 call 2014c6c <_Thread_Enable_dispatch> 20117e8: b0 10 20 0b mov 0xb, %i0 ! b 20117ec: 81 c7 e0 08 ret 20117f0: 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 ) { 20117f4: c2 06 20 e0 ld [ %i0 + 0xe0 ], %g1 20117f8: 80 a0 60 00 cmp %g1, 0 20117fc: 02 80 00 08 be 201181c <== NEVER TAKEN 2011800: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 2011804: 40 00 13 a4 call 2016694 <_Watchdog_Remove> 2011808: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 201180c: c2 06 20 e0 ld [ %i0 + 0xe0 ], %g1 2011810: 9f c0 40 00 call %g1 2011814: 90 10 00 10 mov %l0, %o0 2011818: 30 bf ff ed b,a 20117cc _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(); 201181c: 40 00 0d 14 call 2014c6c <_Thread_Enable_dispatch> <== NOT EXECUTED 2011820: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 2011824: 81 c7 e0 08 ret <== NOT EXECUTED 2011828: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201182c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 201182c: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 2011830: 03 00 80 c4 sethi %hi(0x2031000), %g1 2011834: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 20310e4 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 2011838: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 201183c: 80 a0 a0 00 cmp %g2, 0 2011840: 02 80 00 28 be 20118e0 2011844: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 2011848: 80 a6 a0 00 cmp %i2, 0 201184c: 02 80 00 25 be 20118e0 <== NEVER TAKEN 2011850: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 2011854: 80 a6 60 00 cmp %i1, 0 2011858: 02 80 00 22 be 20118e0 201185c: b0 10 20 0a mov 0xa, %i0 2011860: 11 00 80 c4 sethi %hi(0x2031000), %o0 2011864: 92 10 00 11 mov %l1, %o1 2011868: 90 12 20 a0 or %o0, 0xa0, %o0 201186c: 40 00 0a 7d call 2014260 <_Objects_Get> 2011870: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011874: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011878: a0 10 00 08 mov %o0, %l0 201187c: 80 a0 60 00 cmp %g1, 0 2011880: 12 80 00 18 bne 20118e0 2011884: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011888: 40 00 13 83 call 2016694 <_Watchdog_Remove> 201188c: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 2011890: 7f ff e6 79 call 200b274 2011894: 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 ) { 2011898: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 201189c: 80 a0 60 00 cmp %g1, 0 20118a0: 12 80 00 12 bne 20118e8 <== NEVER TAKEN 20118a4: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20118a8: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 20118ac: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 20118b0: 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; 20118b4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20118b8: 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; 20118bc: 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 ); 20118c0: 7f ff e6 71 call 200b284 20118c4: 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 ); 20118c8: 03 00 80 c4 sethi %hi(0x2031000), %g1 20118cc: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 20310e0 <_Timer_Server_schedule_operation> 20118d0: 9f c0 80 00 call %g2 20118d4: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 20118d8: 40 00 0c e5 call 2014c6c <_Thread_Enable_dispatch> 20118dc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20118e0: 81 c7 e0 08 ret 20118e4: 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 ); 20118e8: 7f ff e6 67 call 200b284 <== NOT EXECUTED 20118ec: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 20118f0: 40 00 0c df call 2014c6c <_Thread_Enable_dispatch> <== NOT EXECUTED 20118f4: 01 00 00 00 nop <== NOT EXECUTED 20118f8: 81 c7 e0 08 ret <== NOT EXECUTED 20118fc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011900 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 2011900: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 2011904: 03 00 80 c4 sethi %hi(0x2031000), %g1 2011908: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 20310e4 <_Timer_Server> Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 201190c: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 2011910: 80 a0 a0 00 cmp %g2, 0 2011914: 02 80 00 34 be 20119e4 2011918: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 201191c: 03 00 80 c3 sethi %hi(0x2030c00), %g1 2011920: c4 08 61 94 ldub [ %g1 + 0x194 ], %g2 ! 2030d94 <_TOD_Is_set> 2011924: 80 a0 a0 00 cmp %g2, 0 2011928: 02 80 00 2f be 20119e4 <== NEVER TAKEN 201192c: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !routine ) 2011930: 80 a6 a0 00 cmp %i2, 0 2011934: 02 80 00 2c be 20119e4 <== NEVER TAKEN 2011938: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 201193c: 7f ff f4 46 call 200ea54 <_TOD_Validate> 2011940: 90 10 00 19 mov %i1, %o0 2011944: 80 8a 20 ff btst 0xff, %o0 2011948: 12 80 00 04 bne 2011958 201194c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011950: 81 c7 e0 08 ret 2011954: 91 e8 20 14 restore %g0, 0x14, %o0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 2011958: 7f ff f4 0a call 200e980 <_TOD_To_seconds> 201195c: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch ) 2011960: 25 00 80 c3 sethi %hi(0x2030c00), %l2 2011964: c2 04 a2 14 ld [ %l2 + 0x214 ], %g1 ! 2030e14 <_TOD_Now> 2011968: 80 a2 00 01 cmp %o0, %g1 201196c: 08 bf ff f9 bleu 2011950 2011970: a0 10 00 08 mov %o0, %l0 2011974: 11 00 80 c4 sethi %hi(0x2031000), %o0 2011978: 92 10 00 11 mov %l1, %o1 201197c: 90 12 20 a0 or %o0, 0xa0, %o0 2011980: 40 00 0a 38 call 2014260 <_Objects_Get> 2011984: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011988: c2 07 bf f4 ld [ %fp + -12 ], %g1 201198c: b2 10 00 08 mov %o0, %i1 2011990: 80 a0 60 00 cmp %g1, 0 2011994: 12 80 00 14 bne 20119e4 2011998: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 201199c: 40 00 13 3e call 2016694 <_Watchdog_Remove> 20119a0: 90 02 20 10 add %o0, 0x10, %o0 the_watchdog->routine = routine; the_watchdog->id = id; 20119a4: e2 26 60 30 st %l1, [ %i1 + 0x30 ] the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 20119a8: c4 04 a2 14 ld [ %l2 + 0x214 ], %g2 /* * _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 ); 20119ac: 03 00 80 c4 sethi %hi(0x2031000), %g1 20119b0: c6 00 60 e0 ld [ %g1 + 0xe0 ], %g3 ! 20310e0 <_Timer_Server_schedule_operation> case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 20119b4: 84 24 00 02 sub %l0, %g2, %g2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 20119b8: 82 10 20 03 mov 3, %g1 /* * _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 ); 20119bc: 90 10 00 19 mov %i1, %o0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 20119c0: c4 26 60 1c st %g2, [ %i1 + 0x1c ] the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 20119c4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20119c8: f4 26 60 2c st %i2, [ %i1 + 0x2c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20119cc: f6 26 60 34 st %i3, [ %i1 + 0x34 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119d0: c0 26 60 18 clr [ %i1 + 0x18 ] /* * _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 ); 20119d4: 9f c0 c0 00 call %g3 20119d8: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 20119dc: 40 00 0c a4 call 2014c6c <_Thread_Enable_dispatch> 20119e0: 01 00 00 00 nop 20119e4: 81 c7 e0 08 ret 20119e8: 81 e8 00 00 restore