=============================================================================== 400074b4 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 400074b4: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400074b8: 23 10 00 75 sethi %hi(0x4001d400), %l1 400074bc: e0 04 62 34 ld [ %l1 + 0x234 ], %l0 ! 4001d634 <_API_extensions_List> 400074c0: a2 14 62 34 or %l1, 0x234, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400074c4: a2 04 60 04 add %l1, 4, %l1 400074c8: 80 a4 00 11 cmp %l0, %l1 400074cc: 02 80 00 09 be 400074f0 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 400074d0: 01 00 00 00 nop * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 400074d4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400074d8: 9f c0 40 00 call %g1 400074dc: 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 ) { 400074e0: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400074e4: 80 a4 00 11 cmp %l0, %l1 400074e8: 32 bf ff fc bne,a 400074d8 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN 400074ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400074f0: 81 c7 e0 08 ret 400074f4: 81 e8 00 00 restore =============================================================================== 400074f8 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 400074f8: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400074fc: 23 10 00 75 sethi %hi(0x4001d400), %l1 40007500: e0 04 62 34 ld [ %l1 + 0x234 ], %l0 ! 4001d634 <_API_extensions_List> 40007504: a2 14 62 34 or %l1, 0x234, %l1 40007508: a2 04 60 04 add %l1, 4, %l1 4000750c: 80 a4 00 11 cmp %l0, %l1 40007510: 02 80 00 0a be 40007538 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 40007514: 25 10 00 75 sethi %hi(0x4001d400), %l2 40007518: a4 14 a0 ac or %l2, 0xac, %l2 ! 4001d4ac <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 4000751c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007520: 9f c0 40 00 call %g1 40007524: 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 ) { 40007528: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4000752c: 80 a4 00 11 cmp %l0, %l1 40007530: 32 bf ff fc bne,a 40007520 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN 40007534: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40007538: 81 c7 e0 08 ret 4000753c: 81 e8 00 00 restore =============================================================================== 40017eac <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 40017eac: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40017eb0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 40017eb4: a0 10 00 18 mov %i0, %l0 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40017eb8: 80 a0 40 1a cmp %g1, %i2 40017ebc: 0a 80 00 17 bcs 40017f18 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 40017ec0: 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 ) { 40017ec4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40017ec8: 80 a0 60 00 cmp %g1, 0 40017ecc: 02 80 00 0a be 40017ef4 <_CORE_message_queue_Broadcast+0x48> 40017ed0: a4 10 20 00 clr %l2 *count = 0; 40017ed4: c0 27 40 00 clr [ %i5 ] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 40017ed8: 81 c7 e0 08 ret 40017edc: 91 e8 20 00 restore %g0, 0, %o0 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40017ee0: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 40017ee4: 40 00 23 f0 call 40020ea4 40017ee8: a4 04 a0 01 inc %l2 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40017eec: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 40017ef0: 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))) { 40017ef4: 40 00 0a 4d call 4001a828 <_Thread_queue_Dequeue> 40017ef8: 90 10 00 10 mov %l0, %o0 40017efc: 92 10 00 19 mov %i1, %o1 40017f00: a2 10 00 08 mov %o0, %l1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 40017f04: 80 a2 20 00 cmp %o0, 0 40017f08: 12 bf ff f6 bne 40017ee0 <_CORE_message_queue_Broadcast+0x34> 40017f0c: 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; 40017f10: e4 27 40 00 st %l2, [ %i5 ] 40017f14: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40017f18: 81 c7 e0 08 ret 40017f1c: 81 e8 00 00 restore =============================================================================== 40011874 <_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 ) { 40011874: 9d e3 bf a0 save %sp, -96, %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; 40011878: 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; 4001187c: 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; 40011880: f6 26 20 4c st %i3, [ %i0 + 0x4c ] /* * 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)) { 40011884: 80 8e e0 03 btst 3, %i3 40011888: 02 80 00 09 be 400118ac <_CORE_message_queue_Initialize+0x38> 4001188c: a2 10 00 1b mov %i3, %l1 allocated_message_size += sizeof(uint32_t); 40011890: a2 06 e0 04 add %i3, 4, %l1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 40011894: a2 0c 7f fc and %l1, -4, %l1 } if (allocated_message_size < maximum_message_size) 40011898: 80 a6 c0 11 cmp %i3, %l1 4001189c: 08 80 00 05 bleu 400118b0 <_CORE_message_queue_Initialize+0x3c><== ALWAYS TAKEN 400118a0: a0 04 60 10 add %l1, 0x10, %l0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 400118a4: 81 c7 e0 08 ret 400118a8: 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 * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 400118ac: a0 04 60 10 add %l1, 0x10, %l0 /* * 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 * 400118b0: 92 10 00 1a mov %i2, %o1 400118b4: 40 00 4c 9b call 40024b20 <.umul> 400118b8: 90 10 00 10 mov %l0, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 400118bc: 80 a2 00 11 cmp %o0, %l1 400118c0: 0a bf ff f9 bcs 400118a4 <_CORE_message_queue_Initialize+0x30><== NEVER TAKEN 400118c4: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 400118c8: 40 00 0c 23 call 40014954 <_Workspace_Allocate> 400118cc: 01 00 00 00 nop _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 400118d0: 80 a2 20 00 cmp %o0, 0 400118d4: 02 bf ff f4 be 400118a4 <_CORE_message_queue_Initialize+0x30> 400118d8: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 400118dc: 92 10 00 08 mov %o0, %o1 400118e0: 94 10 00 1a mov %i2, %o2 400118e4: 90 06 20 60 add %i0, 0x60, %o0 400118e8: 40 00 14 8a call 40016b10 <_Chain_Initialize> 400118ec: 96 10 00 10 mov %l0, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 400118f0: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 400118f4: c0 26 20 54 clr [ %i0 + 0x54 ] 400118f8: 82 18 60 01 xor %g1, 1, %g1 400118fc: 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); 40011900: 82 06 20 54 add %i0, 0x54, %g1 40011904: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40011908: 82 06 20 50 add %i0, 0x50, %g1 4001190c: 90 10 00 18 mov %i0, %o0 40011910: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 40011914: 92 60 3f ff subx %g0, -1, %o1 40011918: 94 10 20 80 mov 0x80, %o2 4001191c: 96 10 20 06 mov 6, %o3 40011920: 40 00 08 cc call 40013c50 <_Thread_queue_Initialize> 40011924: b0 10 20 01 mov 1, %i0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 40011928: 81 c7 e0 08 ret 4001192c: 81 e8 00 00 restore =============================================================================== 400077ec <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 400077ec: 9d e3 bf a0 save %sp, -96, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 400077f0: 21 10 00 74 sethi %hi(0x4001d000), %l0 400077f4: c2 04 23 f0 ld [ %l0 + 0x3f0 ], %g1 ! 4001d3f0 <_Thread_Dispatch_disable_level> 400077f8: 80 a0 60 00 cmp %g1, 0 400077fc: 02 80 00 05 be 40007810 <_CORE_mutex_Seize+0x24> 40007800: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40007804: 80 8e a0 ff btst 0xff, %i2 40007808: 12 80 00 1a bne 40007870 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN 4000780c: 03 10 00 75 sethi %hi(0x4001d400), %g1 40007810: 90 10 00 18 mov %i0, %o0 40007814: 40 00 14 33 call 4000c8e0 <_CORE_mutex_Seize_interrupt_trylock> 40007818: 92 07 a0 54 add %fp, 0x54, %o1 4000781c: 80 a2 20 00 cmp %o0, 0 40007820: 02 80 00 12 be 40007868 <_CORE_mutex_Seize+0x7c> 40007824: 80 8e a0 ff btst 0xff, %i2 40007828: 02 80 00 1a be 40007890 <_CORE_mutex_Seize+0xa4> 4000782c: 01 00 00 00 nop 40007830: c4 04 23 f0 ld [ %l0 + 0x3f0 ], %g2 40007834: 03 10 00 75 sethi %hi(0x4001d400), %g1 40007838: c2 00 60 ac ld [ %g1 + 0xac ], %g1 ! 4001d4ac <_Thread_Executing> 4000783c: f2 20 60 20 st %i1, [ %g1 + 0x20 ] 40007840: f0 20 60 44 st %i0, [ %g1 + 0x44 ] 40007844: 82 00 a0 01 add %g2, 1, %g1 40007848: c2 24 23 f0 st %g1, [ %l0 + 0x3f0 ] 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; 4000784c: 82 10 20 01 mov 1, %g1 40007850: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 40007854: 7f ff e9 74 call 40001e24 40007858: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 4000785c: 90 10 00 18 mov %i0, %o0 40007860: 7f ff ff c0 call 40007760 <_CORE_mutex_Seize_interrupt_blocking> 40007864: 92 10 00 1b mov %i3, %o1 40007868: 81 c7 e0 08 ret 4000786c: 81 e8 00 00 restore 40007870: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 40007874: 80 a0 60 01 cmp %g1, 1 40007878: 28 bf ff e7 bleu,a 40007814 <_CORE_mutex_Seize+0x28> 4000787c: 90 10 00 18 mov %i0, %o0 40007880: 90 10 20 00 clr %o0 40007884: 92 10 20 00 clr %o1 40007888: 40 00 01 a6 call 40007f20 <_Internal_error_Occurred> 4000788c: 94 10 20 13 mov 0x13, %o2 40007890: 7f ff e9 65 call 40001e24 40007894: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 40007898: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000789c: c2 00 60 ac ld [ %g1 + 0xac ], %g1 ! 4001d4ac <_Thread_Executing> 400078a0: 84 10 20 01 mov 1, %g2 400078a4: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 400078a8: 81 c7 e0 08 ret 400078ac: 81 e8 00 00 restore =============================================================================== 4000c8e0 <_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 ) { 4000c8e0: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000c8e4: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000c8e8: c2 00 60 ac ld [ %g1 + 0xac ], %g1 ! 4001d4ac <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000c8ec: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000c8f0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000c8f4: 80 a0 a0 00 cmp %g2, 0 4000c8f8: 22 80 00 13 be,a 4000c944 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000c8fc: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000c900: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000c904: c6 00 60 08 ld [ %g1 + 8 ], %g3 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000c908: 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; 4000c90c: c6 26 20 60 st %g3, [ %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; 4000c910: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000c914: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000c918: 80 a0 a0 02 cmp %g2, 2 4000c91c: 02 80 00 0f be 4000c958 <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000c920: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000c924: 80 a0 a0 03 cmp %g2, 3 4000c928: 22 80 00 1f be,a 4000c9a4 <_CORE_mutex_Seize_interrupt_trylock+0xc4> 4000c92c: da 00 60 1c ld [ %g1 + 0x1c ], %o5 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000c930: d0 06 40 00 ld [ %i1 ], %o0 4000c934: 7f ff d5 3c call 40001e24 4000c938: b0 10 20 00 clr %i0 4000c93c: 81 c7 e0 08 ret 4000c940: 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 ) ) { 4000c944: 80 a0 40 02 cmp %g1, %g2 4000c948: 22 80 00 0c be,a 4000c978 <_CORE_mutex_Seize_interrupt_trylock+0x98> 4000c94c: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000c950: 81 c7 e0 08 ret 4000c954: 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++; 4000c958: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000c95c: 84 00 a0 01 inc %g2 4000c960: c4 20 60 1c st %g2, [ %g1 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000c964: d0 06 40 00 ld [ %i1 ], %o0 4000c968: 7f ff d5 2f call 40001e24 4000c96c: b0 10 20 00 clr %i0 4000c970: 81 c7 e0 08 ret 4000c974: 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000c978: 80 a0 a0 00 cmp %g2, 0 4000c97c: 12 80 00 2b bne 4000ca28 <_CORE_mutex_Seize_interrupt_trylock+0x148> 4000c980: 80 a0 a0 01 cmp %g2, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000c984: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000c988: 82 00 60 01 inc %g1 4000c98c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000c990: d0 06 40 00 ld [ %i1 ], %o0 4000c994: 7f ff d5 24 call 40001e24 4000c998: b0 10 20 00 clr %i0 4000c99c: 81 c7 e0 08 ret 4000c9a0: 81 e8 00 00 restore { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000c9a4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000c9a8: 88 03 60 01 add %o5, 1, %g4 4000c9ac: c8 20 60 1c st %g4, [ %g1 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000c9b0: c8 06 20 4c ld [ %i0 + 0x4c ], %g4 current = executing->current_priority; if ( current == ceiling ) { 4000c9b4: 80 a1 00 02 cmp %g4, %g2 4000c9b8: 02 80 00 24 be 4000ca48 <_CORE_mutex_Seize_interrupt_trylock+0x168> 4000c9bc: 01 00 00 00 nop _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4000c9c0: 1a 80 00 11 bcc 4000ca04 <_CORE_mutex_Seize_interrupt_trylock+0x124> 4000c9c4: 84 10 20 06 mov 6, %g2 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c9c8: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000c9cc: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4001d3f0 <_Thread_Dispatch_disable_level> 4000c9d0: 84 00 a0 01 inc %g2 4000c9d4: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000c9d8: 7f ff d5 13 call 40001e24 4000c9dc: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000c9e0: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000c9e4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000c9e8: 94 10 20 00 clr %o2 4000c9ec: 7f ff ef b8 call 400088cc <_Thread_Change_priority> 4000c9f0: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000c9f4: 7f ff f1 36 call 40008ecc <_Thread_Enable_dispatch> 4000c9f8: 01 00 00 00 nop 4000c9fc: 81 c7 e0 08 ret 4000ca00: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000ca04: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000ca08: c6 26 20 50 st %g3, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ 4000ca0c: c0 26 20 54 clr [ %i0 + 0x54 ] executing->resource_count--; /* undo locking above */ 4000ca10: da 20 60 1c st %o5, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000ca14: d0 06 40 00 ld [ %i1 ], %o0 4000ca18: 7f ff d5 03 call 40001e24 4000ca1c: b0 10 20 00 clr %i0 4000ca20: 81 c7 e0 08 ret 4000ca24: 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000ca28: 12 bf ff ca bne 4000c950 <_CORE_mutex_Seize_interrupt_trylock+0x70><== ALWAYS TAKEN 4000ca2c: 84 10 20 02 mov 2, %g2 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000ca30: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED _ISR_Enable( *level_p ); 4000ca34: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 4000ca38: 7f ff d4 fb call 40001e24 <== NOT EXECUTED 4000ca3c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ca40: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca44: 81 e8 00 00 restore <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4000ca48: d0 06 40 00 ld [ %i1 ], %o0 4000ca4c: 7f ff d4 f6 call 40001e24 4000ca50: b0 10 20 00 clr %i0 4000ca54: 81 c7 e0 08 ret 4000ca58: 81 e8 00 00 restore =============================================================================== 40007a4c <_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 ) { 40007a4c: 9d e3 bf a0 save %sp, -96, %sp 40007a50: 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)) ) { 40007a54: b0 10 20 00 clr %i0 40007a58: 40 00 06 05 call 4000926c <_Thread_queue_Dequeue> 40007a5c: 90 10 00 10 mov %l0, %o0 40007a60: 80 a2 20 00 cmp %o0, 0 40007a64: 02 80 00 04 be 40007a74 <_CORE_semaphore_Surrender+0x28> 40007a68: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 40007a6c: 81 c7 e0 08 ret 40007a70: 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 ); 40007a74: 7f ff e8 e8 call 40001e14 40007a78: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 40007a7c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40007a80: c4 04 20 40 ld [ %l0 + 0x40 ], %g2 40007a84: 80 a0 40 02 cmp %g1, %g2 40007a88: 1a 80 00 05 bcc 40007a9c <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN 40007a8c: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 40007a90: 82 00 60 01 inc %g1 40007a94: b0 10 20 00 clr %i0 40007a98: c2 24 20 48 st %g1, [ %l0 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 40007a9c: 7f ff e8 e2 call 40001e24 40007aa0: 01 00 00 00 nop } return status; } 40007aa4: 81 c7 e0 08 ret 40007aa8: 81 e8 00 00 restore =============================================================================== 4000c8a8 <_Chain_Initialize>: Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 4000c8a8: c0 22 20 04 clr [ %o0 + 4 ] next = starting_address; while ( count-- ) { 4000c8ac: 80 a2 a0 00 cmp %o2, 0 4000c8b0: 02 80 00 08 be 4000c8d0 <_Chain_Initialize+0x28> <== NEVER TAKEN 4000c8b4: 82 10 00 08 mov %o0, %g1 current->next = next; next->previous = current; 4000c8b8: c2 22 60 04 st %g1, [ %o1 + 4 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 4000c8bc: d2 20 40 00 st %o1, [ %g1 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4000c8c0: 94 82 bf ff addcc %o2, -1, %o2 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 4000c8c4: 82 10 00 09 mov %o1, %g1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4000c8c8: 12 bf ff fc bne 4000c8b8 <_Chain_Initialize+0x10> 4000c8cc: 92 02 40 0b add %o1, %o3, %o1 next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4000c8d0: 84 02 20 04 add %o0, 4, %g2 4000c8d4: c4 20 40 00 st %g2, [ %g1 ] the_chain->last = current; } 4000c8d8: 81 c3 e0 08 retl 4000c8dc: c2 22 20 08 st %g1, [ %o0 + 8 ] =============================================================================== 40006628 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 40006628: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 4000662c: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006630: e0 00 60 ac ld [ %g1 + 0xac ], %l0 ! 4001d4ac <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 40006634: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 40006638: 7f ff ed f7 call 40001e14 4000663c: e4 04 21 5c ld [ %l0 + 0x15c ], %l2 pending_events = api->pending_events; 40006640: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 40006644: a2 8e 00 01 andcc %i0, %g1, %l1 40006648: 02 80 00 07 be 40006664 <_Event_Seize+0x3c> 4000664c: 80 8e 60 01 btst 1, %i1 40006650: 80 a6 00 11 cmp %i0, %l1 40006654: 02 80 00 23 be 400066e0 <_Event_Seize+0xb8> 40006658: 80 8e 60 02 btst 2, %i1 4000665c: 12 80 00 21 bne 400066e0 <_Event_Seize+0xb8> <== ALWAYS TAKEN 40006660: 80 8e 60 01 btst 1, %i1 _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 40006664: 12 80 00 18 bne 400066c4 <_Event_Seize+0x9c> 40006668: 82 10 20 01 mov 1, %g1 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 4000666c: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t) event_in; 40006670: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 40006674: f6 24 20 28 st %i3, [ %l0 + 0x28 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40006678: 33 10 00 75 sethi %hi(0x4001d400), %i1 4000667c: c2 26 62 78 st %g1, [ %i1 + 0x278 ] ! 4001d678 <_Event_Sync_state> _ISR_Enable( level ); 40006680: 7f ff ed e9 call 40001e24 40006684: 01 00 00 00 nop if ( ticks ) { 40006688: 80 a6 a0 00 cmp %i2, 0 4000668c: 32 80 00 1c bne,a 400066fc <_Event_Seize+0xd4> 40006690: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 40006694: 90 10 00 10 mov %l0, %o0 40006698: 40 00 0c 76 call 40009870 <_Thread_Set_state> 4000669c: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 400066a0: 7f ff ed dd call 40001e14 400066a4: 01 00 00 00 nop sync_state = _Event_Sync_state; 400066a8: f0 06 62 78 ld [ %i1 + 0x278 ], %i0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 400066ac: c0 26 62 78 clr [ %i1 + 0x278 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 400066b0: 80 a6 20 01 cmp %i0, 1 400066b4: 02 80 00 1f be 40006730 <_Event_Seize+0x108> 400066b8: 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 ); 400066bc: 40 00 08 6d call 40008870 <_Thread_blocking_operation_Cancel> 400066c0: 95 e8 00 08 restore %g0, %o0, %o2 *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 400066c4: 7f ff ed d8 call 40001e24 400066c8: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 400066cc: 82 10 20 0d mov 0xd, %g1 ! d 400066d0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 400066d4: e2 26 c0 00 st %l1, [ %i3 ] 400066d8: 81 c7 e0 08 ret 400066dc: 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 = 400066e0: 82 28 40 11 andn %g1, %l1, %g1 400066e4: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 400066e8: 7f ff ed cf call 40001e24 400066ec: 01 00 00 00 nop *event_out = seized_events; 400066f0: e2 26 c0 00 st %l1, [ %i3 ] return; 400066f4: 81 c7 e0 08 ret 400066f8: 81 e8 00 00 restore Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400066fc: f4 24 20 54 st %i2, [ %l0 + 0x54 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40006700: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006704: 03 10 00 1a sethi %hi(0x40006800), %g1 40006708: 82 10 60 dc or %g1, 0xdc, %g1 ! 400068dc <_Event_Timeout> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000670c: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40006710: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006714: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006718: 11 10 00 75 sethi %hi(0x4001d400), %o0 4000671c: 92 04 20 48 add %l0, 0x48, %o1 40006720: 40 00 0e 59 call 4000a084 <_Watchdog_Insert> 40006724: 90 12 20 cc or %o0, 0xcc, %o0 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 40006728: 10 bf ff dc b 40006698 <_Event_Seize+0x70> 4000672c: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 40006730: 7f ff ed bd call 40001e24 40006734: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40006794 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40006794: 9d e3 bf a0 save %sp, -96, %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 ]; 40006798: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 4000679c: 7f ff ed 9e call 40001e14 400067a0: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 400067a4: a2 10 00 08 mov %o0, %l1 pending_events = api->pending_events; 400067a8: c4 04 00 00 ld [ %l0 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 400067ac: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 400067b0: 86 88 40 02 andcc %g1, %g2, %g3 400067b4: 02 80 00 3e be 400068ac <_Event_Surrender+0x118> 400067b8: 09 10 00 75 sethi %hi(0x4001d400), %g4 /* * 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() && 400067bc: c8 01 20 88 ld [ %g4 + 0x88 ], %g4 ! 4001d488 <_ISR_Nest_level> 400067c0: 80 a1 20 00 cmp %g4, 0 400067c4: 12 80 00 1d bne 40006838 <_Event_Surrender+0xa4> 400067c8: 09 10 00 75 sethi %hi(0x4001d400), %g4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400067cc: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 400067d0: 80 89 21 00 btst 0x100, %g4 400067d4: 02 80 00 34 be 400068a4 <_Event_Surrender+0x110> 400067d8: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400067dc: 02 80 00 04 be 400067ec <_Event_Surrender+0x58> 400067e0: 80 8c a0 02 btst 2, %l2 400067e4: 02 80 00 30 be 400068a4 <_Event_Surrender+0x110> <== NEVER TAKEN 400067e8: 01 00 00 00 nop 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; 400067ec: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400067f0: 84 28 80 03 andn %g2, %g3, %g2 400067f4: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 400067f8: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400067fc: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 40006800: 7f ff ed 89 call 40001e24 40006804: 90 10 00 11 mov %l1, %o0 40006808: 7f ff ed 83 call 40001e14 4000680c: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40006810: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40006814: 80 a0 60 02 cmp %g1, 2 40006818: 02 80 00 27 be 400068b4 <_Event_Surrender+0x120> 4000681c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40006820: 90 10 00 11 mov %l1, %o0 40006824: 7f ff ed 80 call 40001e24 40006828: 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 ); 4000682c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006830: 40 00 08 ab call 40008adc <_Thread_Clear_state> 40006834: 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() && 40006838: c8 01 20 ac ld [ %g4 + 0xac ], %g4 4000683c: 80 a6 00 04 cmp %i0, %g4 40006840: 32 bf ff e4 bne,a 400067d0 <_Event_Surrender+0x3c> 40006844: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 40006848: 09 10 00 75 sethi %hi(0x4001d400), %g4 4000684c: da 01 22 78 ld [ %g4 + 0x278 ], %o5 ! 4001d678 <_Event_Sync_state> /* * 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() && 40006850: 80 a3 60 02 cmp %o5, 2 40006854: 02 80 00 07 be 40006870 <_Event_Surrender+0xdc> <== NEVER TAKEN 40006858: 80 a0 40 03 cmp %g1, %g3 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4000685c: da 01 22 78 ld [ %g4 + 0x278 ], %o5 /* * 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() && 40006860: 80 a3 60 01 cmp %o5, 1 40006864: 32 bf ff db bne,a 400067d0 <_Event_Surrender+0x3c> 40006868: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4000686c: 80 a0 40 03 cmp %g1, %g3 40006870: 02 80 00 04 be 40006880 <_Event_Surrender+0xec> 40006874: 80 8c a0 02 btst 2, %l2 40006878: 02 80 00 09 be 4000689c <_Event_Surrender+0x108> <== NEVER TAKEN 4000687c: 01 00 00 00 nop 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; 40006880: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40006884: 84 28 80 03 andn %g2, %g3, %g2 40006888: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 4000688c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40006890: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40006894: 82 10 20 03 mov 3, %g1 40006898: c2 21 22 78 st %g1, [ %g4 + 0x278 ] } _ISR_Enable( level ); 4000689c: 7f ff ed 62 call 40001e24 400068a0: 91 e8 00 11 restore %g0, %l1, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 400068a4: 7f ff ed 60 call 40001e24 400068a8: 91 e8 00 11 restore %g0, %l1, %o0 /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 400068ac: 7f ff ed 5e call 40001e24 400068b0: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 400068b4: 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 ); 400068b8: 7f ff ed 5b call 40001e24 400068bc: 90 10 00 11 mov %l1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 400068c0: 40 00 0e 5e call 4000a238 <_Watchdog_Remove> 400068c4: 90 06 20 48 add %i0, 0x48, %o0 400068c8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 400068cc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 400068d0: 40 00 08 83 call 40008adc <_Thread_Clear_state> 400068d4: 81 e8 00 00 restore =============================================================================== 400068dc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400068dc: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400068e0: 90 10 00 18 mov %i0, %o0 400068e4: 40 00 09 88 call 40008f04 <_Thread_Get> 400068e8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 400068ec: c2 07 bf fc ld [ %fp + -4 ], %g1 400068f0: 80 a0 60 00 cmp %g1, 0 400068f4: 12 80 00 15 bne 40006948 <_Event_Timeout+0x6c> <== NEVER TAKEN 400068f8: a0 10 00 08 mov %o0, %l0 * * 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. */ _ISR_Disable( level ); 400068fc: 7f ff ed 46 call 40001e14 40006900: 01 00 00 00 nop return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 40006904: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006908: c2 00 60 ac ld [ %g1 + 0xac ], %g1 ! 4001d4ac <_Thread_Executing> 4000690c: 80 a4 00 01 cmp %l0, %g1 40006910: 02 80 00 10 be 40006950 <_Event_Timeout+0x74> 40006914: c0 24 20 24 clr [ %l0 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 40006918: 82 10 20 06 mov 6, %g1 4000691c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] _ISR_Enable( level ); 40006920: 7f ff ed 41 call 40001e24 40006924: 01 00 00 00 nop 40006928: 90 10 00 10 mov %l0, %o0 4000692c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006930: 40 00 08 6b call 40008adc <_Thread_Clear_state> 40006934: 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; 40006938: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000693c: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4001d3f0 <_Thread_Dispatch_disable_level> 40006940: 84 00 bf ff add %g2, -1, %g2 40006944: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ] 40006948: 81 c7 e0 08 ret 4000694c: 81 e8 00 00 restore } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 40006950: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006954: c4 00 62 78 ld [ %g1 + 0x278 ], %g2 ! 4001d678 <_Event_Sync_state> 40006958: 80 a0 a0 01 cmp %g2, 1 4000695c: 32 bf ff f0 bne,a 4000691c <_Event_Timeout+0x40> 40006960: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40006964: 84 10 20 02 mov 2, %g2 40006968: c4 20 62 78 st %g2, [ %g1 + 0x278 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4000696c: 10 bf ff ec b 4000691c <_Event_Timeout+0x40> 40006970: 82 10 20 06 mov 6, %g1 =============================================================================== 4000cb54 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000cb54: 9d e3 bf 98 save %sp, -104, %sp Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 4000cb58: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000cb5c: a0 10 00 18 mov %i0, %l0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4000cb60: 80 a6 40 14 cmp %i1, %l4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4000cb64: e4 06 20 08 ld [ %i0 + 8 ], %l2 4000cb68: 18 80 00 72 bgu 4000cd30 <_Heap_Allocate_aligned_with_boundary+0x1dc> 4000cb6c: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000cb70: 80 a6 e0 00 cmp %i3, 0 4000cb74: 12 80 00 6d bne 4000cd28 <_Heap_Allocate_aligned_with_boundary+0x1d4> 4000cb78: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cb7c: 80 a4 00 12 cmp %l0, %l2 4000cb80: 02 80 00 6f be 4000cd3c <_Heap_Allocate_aligned_with_boundary+0x1e8> 4000cb84: a2 10 20 00 clr %l1 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000cb88: 82 10 20 04 mov 4, %g1 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4000cb8c: b8 07 60 07 add %i5, 7, %i4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000cb90: 82 20 40 19 sub %g1, %i1, %g1 4000cb94: 10 80 00 09 b 4000cbb8 <_Heap_Allocate_aligned_with_boundary+0x64> 4000cb98: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 4000cb9c: 80 a6 20 00 cmp %i0, 0 4000cba0: 32 80 00 54 bne,a 4000ccf0 <_Heap_Allocate_aligned_with_boundary+0x19c><== ALWAYS TAKEN 4000cba4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 4000cba8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cbac: 80 a4 00 12 cmp %l0, %l2 4000cbb0: 22 80 00 57 be,a 4000cd0c <_Heap_Allocate_aligned_with_boundary+0x1b8> 4000cbb4: b0 10 20 00 clr %i0 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4000cbb8: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000cbbc: 80 a5 00 13 cmp %l4, %l3 4000cbc0: 1a bf ff fa bcc 4000cba8 <_Heap_Allocate_aligned_with_boundary+0x54> 4000cbc4: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000cbc8: 80 a6 a0 00 cmp %i2, 0 4000cbcc: 02 bf ff f4 be 4000cb9c <_Heap_Allocate_aligned_with_boundary+0x48> 4000cbd0: b0 04 a0 08 add %l2, 8, %i0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000cbd4: c2 07 bf fc ld [ %fp + -4 ], %g1 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4000cbd8: ee 04 20 14 ld [ %l0 + 0x14 ], %l7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4000cbdc: a6 0c ff fe and %l3, -2, %l3 4000cbe0: a6 04 80 13 add %l2, %l3, %l3 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000cbe4: b0 00 40 13 add %g1, %l3, %i0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4000cbe8: 82 27 00 17 sub %i4, %l7, %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4000cbec: 90 10 00 18 mov %i0, %o0 4000cbf0: a6 00 40 13 add %g1, %l3, %l3 4000cbf4: 40 00 2f 8f call 40018a30 <.urem> 4000cbf8: 92 10 00 1a mov %i2, %o1 4000cbfc: b0 26 00 08 sub %i0, %o0, %i0 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4000cc00: 80 a4 c0 18 cmp %l3, %i0 4000cc04: 1a 80 00 06 bcc 4000cc1c <_Heap_Allocate_aligned_with_boundary+0xc8> 4000cc08: ac 04 a0 08 add %l2, 8, %l6 4000cc0c: 90 10 00 13 mov %l3, %o0 4000cc10: 40 00 2f 88 call 40018a30 <.urem> 4000cc14: 92 10 00 1a mov %i2, %o1 4000cc18: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000cc1c: 80 a6 e0 00 cmp %i3, 0 4000cc20: 02 80 00 24 be 4000ccb0 <_Heap_Allocate_aligned_with_boundary+0x15c> 4000cc24: 80 a5 80 18 cmp %l6, %i0 /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4000cc28: a6 06 00 19 add %i0, %i1, %l3 4000cc2c: 92 10 00 1b mov %i3, %o1 4000cc30: 40 00 2f 80 call 40018a30 <.urem> 4000cc34: 90 10 00 13 mov %l3, %o0 4000cc38: 90 24 c0 08 sub %l3, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4000cc3c: 80 a4 c0 08 cmp %l3, %o0 4000cc40: 08 80 00 1b bleu 4000ccac <_Heap_Allocate_aligned_with_boundary+0x158> 4000cc44: 80 a6 00 08 cmp %i0, %o0 4000cc48: 1a 80 00 1a bcc 4000ccb0 <_Heap_Allocate_aligned_with_boundary+0x15c> 4000cc4c: 80 a5 80 18 cmp %l6, %i0 alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4000cc50: aa 05 80 19 add %l6, %i1, %l5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4000cc54: 80 a5 40 08 cmp %l5, %o0 4000cc58: 28 80 00 09 bleu,a 4000cc7c <_Heap_Allocate_aligned_with_boundary+0x128> 4000cc5c: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 4000cc60: 10 bf ff d3 b 4000cbac <_Heap_Allocate_aligned_with_boundary+0x58> 4000cc64: e4 04 a0 08 ld [ %l2 + 8 ], %l2 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4000cc68: 1a 80 00 11 bcc 4000ccac <_Heap_Allocate_aligned_with_boundary+0x158> 4000cc6c: 80 a5 40 08 cmp %l5, %o0 if ( boundary_line < boundary_floor ) { 4000cc70: 38 bf ff cf bgu,a 4000cbac <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 4000cc74: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 4000cc78: b0 22 00 19 sub %o0, %i1, %i0 4000cc7c: 92 10 00 1a mov %i2, %o1 4000cc80: 40 00 2f 6c call 40018a30 <.urem> 4000cc84: 90 10 00 18 mov %i0, %o0 4000cc88: 92 10 00 1b mov %i3, %o1 4000cc8c: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000cc90: a6 06 00 19 add %i0, %i1, %l3 4000cc94: 40 00 2f 67 call 40018a30 <.urem> 4000cc98: 90 10 00 13 mov %l3, %o0 4000cc9c: 90 24 c0 08 sub %l3, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4000cca0: 80 a4 c0 08 cmp %l3, %o0 4000cca4: 18 bf ff f1 bgu 4000cc68 <_Heap_Allocate_aligned_with_boundary+0x114> 4000cca8: 80 a6 00 08 cmp %i0, %o0 boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4000ccac: 80 a5 80 18 cmp %l6, %i0 4000ccb0: 18 bf ff be bgu 4000cba8 <_Heap_Allocate_aligned_with_boundary+0x54> 4000ccb4: 82 10 3f f8 mov -8, %g1 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4000ccb8: 90 10 00 18 mov %i0, %o0 4000ccbc: a6 20 40 12 sub %g1, %l2, %l3 4000ccc0: 92 10 00 1d mov %i5, %o1 4000ccc4: 40 00 2f 5b call 40018a30 <.urem> 4000ccc8: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 4000cccc: 90 a4 c0 08 subcc %l3, %o0, %o0 4000ccd0: 02 bf ff b4 be 4000cba0 <_Heap_Allocate_aligned_with_boundary+0x4c> 4000ccd4: 80 a6 20 00 cmp %i0, 0 4000ccd8: 80 a5 c0 08 cmp %l7, %o0 4000ccdc: 18 bf ff b3 bgu 4000cba8 <_Heap_Allocate_aligned_with_boundary+0x54> 4000cce0: 80 a6 20 00 cmp %i0, 0 boundary ); } } if ( alloc_begin != 0 ) { 4000cce4: 22 bf ff b2 be,a 4000cbac <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 4000cce8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000ccec: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000ccf0: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000ccf4: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000ccf8: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000ccfc: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000cd00: 90 10 00 10 mov %l0, %o0 4000cd04: 7f ff ec 36 call 40007ddc <_Heap_Block_allocate> 4000cd08: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000cd0c: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 4000cd10: 80 a0 40 11 cmp %g1, %l1 4000cd14: 1a 80 00 08 bcc 4000cd34 <_Heap_Allocate_aligned_with_boundary+0x1e0> 4000cd18: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000cd1c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 4000cd20: 81 c7 e0 08 ret 4000cd24: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4000cd28: 08 80 00 07 bleu 4000cd44 <_Heap_Allocate_aligned_with_boundary+0x1f0> 4000cd2c: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000cd30: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 4000cd34: 81 c7 e0 08 ret 4000cd38: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cd3c: 10 bf ff f4 b 4000cd0c <_Heap_Allocate_aligned_with_boundary+0x1b8> 4000cd40: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000cd44: 22 bf ff 8e be,a 4000cb7c <_Heap_Allocate_aligned_with_boundary+0x28> 4000cd48: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 4000cd4c: 10 bf ff 8d b 4000cb80 <_Heap_Allocate_aligned_with_boundary+0x2c> 4000cd50: 80 a4 00 12 cmp %l0, %l2 =============================================================================== 40012508 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 40012508: 9d e3 bf a0 save %sp, -96, %sp Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 4001250c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 40012510: a0 10 00 18 mov %i0, %l0 * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 40012514: 80 a6 40 01 cmp %i1, %g1 40012518: 0a 80 00 2a bcs 400125c0 <_Heap_Extend+0xb8> 4001251c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 40012520: 80 a6 40 01 cmp %i1, %g1 40012524: 12 80 00 25 bne 400125b8 <_Heap_Extend+0xb0> 40012528: b0 10 20 02 mov 2, %i0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4001252c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 40012530: b4 06 40 1a add %i1, %i2, %i2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 40012534: b2 26 80 11 sub %i2, %l1, %i1 * 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. */ heap->area_end = new_heap_area_end; 40012538: f4 24 20 1c st %i2, [ %l0 + 0x1c ] extend_size = new_heap_area_end 4001253c: b2 06 7f f8 add %i1, -8, %i1 40012540: 7f ff c7 7c call 40004330 <.urem> 40012544: 90 10 00 19 mov %i1, %o0 40012548: 90 26 40 08 sub %i1, %o0, %o0 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 4001254c: d0 26 c0 00 st %o0, [ %i3 ] if( extend_size >= heap->min_block_size ) { 40012550: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40012554: 80 a0 40 08 cmp %g1, %o0 40012558: 18 80 00 18 bgu 400125b8 <_Heap_Extend+0xb0> <== NEVER TAKEN 4001255c: b0 10 20 00 clr %i0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 40012560: c2 04 60 04 ld [ %l1 + 4 ], %g1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 40012564: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40012568: 82 08 60 01 and %g1, 1, %g1 4001256c: 82 12 00 01 or %o0, %g1, %g1 40012570: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 40012574: 82 02 00 11 add %o0, %l1, %g1 40012578: 84 20 80 01 sub %g2, %g1, %g2 4001257c: 84 10 a0 01 or %g2, 1, %g2 40012580: c4 20 60 04 st %g2, [ %g1 + 4 ] heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 40012584: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 40012588: f2 04 20 2c ld [ %l0 + 0x2c ], %i1 ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 4001258c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 40012590: c2 24 20 24 st %g1, [ %l0 + 0x24 ] /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 40012594: 82 00 e0 01 add %g3, 1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 40012598: 90 06 40 08 add %i1, %o0, %o0 ++stats->used_blocks; 4001259c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] --stats->frees; /* Do not count subsequent call as actual free() */ 400125a0: 82 00 bf ff add %g2, -1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 400125a4: d0 24 20 2c st %o0, [ %l0 + 0x2c ] ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 400125a8: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 400125ac: 90 10 00 10 mov %l0, %o0 400125b0: 7f ff e9 70 call 4000cb70 <_Heap_Free> 400125b4: 92 04 60 08 add %l1, 8, %o1 } return HEAP_EXTEND_SUCCESSFUL; } 400125b8: 81 c7 e0 08 ret 400125bc: 81 e8 00 00 restore uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 400125c0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 400125c4: 80 a6 40 02 cmp %i1, %g2 400125c8: 0a bf ff d6 bcs 40012520 <_Heap_Extend+0x18> 400125cc: b0 10 20 01 mov 1, %i0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 400125d0: 81 c7 e0 08 ret 400125d4: 81 e8 00 00 restore =============================================================================== 4000cd54 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4000cd54: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4000cd58: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4000cd5c: 40 00 2f 35 call 40018a30 <.urem> 4000cd60: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4000cd64: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4000cd68: b2 06 7f f8 add %i1, -8, %i1 4000cd6c: 90 26 40 08 sub %i1, %o0, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4000cd70: 80 a2 00 01 cmp %o0, %g1 4000cd74: 0a 80 00 36 bcs 4000ce4c <_Heap_Free+0xf8> 4000cd78: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 4000cd7c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4000cd80: 80 a2 00 03 cmp %o0, %g3 4000cd84: 18 80 00 32 bgu 4000ce4c <_Heap_Free+0xf8> 4000cd88: 01 00 00 00 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4000cd8c: da 02 20 04 ld [ %o0 + 4 ], %o5 4000cd90: 88 0b 7f fe and %o5, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4000cd94: 84 02 00 04 add %o0, %g4, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4000cd98: 80 a0 40 02 cmp %g1, %g2 4000cd9c: 18 80 00 2c bgu 4000ce4c <_Heap_Free+0xf8> <== NEVER TAKEN 4000cda0: 80 a0 c0 02 cmp %g3, %g2 4000cda4: 0a 80 00 2a bcs 4000ce4c <_Heap_Free+0xf8> <== NEVER TAKEN 4000cda8: 01 00 00 00 nop block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4000cdac: d8 00 a0 04 ld [ %g2 + 4 ], %o4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4000cdb0: 80 8b 20 01 btst 1, %o4 4000cdb4: 02 80 00 26 be 4000ce4c <_Heap_Free+0xf8> <== NEVER TAKEN 4000cdb8: 96 0b 3f fe and %o4, -2, %o3 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4000cdbc: 80 a0 c0 02 cmp %g3, %g2 4000cdc0: 02 80 00 06 be 4000cdd8 <_Heap_Free+0x84> 4000cdc4: 98 10 20 00 clr %o4 #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4000cdc8: 98 00 80 0b add %g2, %o3, %o4 4000cdcc: d8 03 20 04 ld [ %o4 + 4 ], %o4 4000cdd0: 98 0b 20 01 and %o4, 1, %o4 4000cdd4: 98 1b 20 01 xor %o4, 1, %o4 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4000cdd8: 80 8b 60 01 btst 1, %o5 4000cddc: 12 80 00 1e bne 4000ce54 <_Heap_Free+0x100> 4000cde0: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 4000cde4: d4 02 00 00 ld [ %o0 ], %o2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4000cde8: 9a 22 00 0a sub %o0, %o2, %o5 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4000cdec: 80 a0 40 0d cmp %g1, %o5 4000cdf0: 18 80 00 17 bgu 4000ce4c <_Heap_Free+0xf8> <== NEVER TAKEN 4000cdf4: 80 a0 c0 0d cmp %g3, %o5 4000cdf8: 0a 80 00 15 bcs 4000ce4c <_Heap_Free+0xf8> <== NEVER TAKEN 4000cdfc: 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) ) { 4000ce00: c2 03 60 04 ld [ %o5 + 4 ], %g1 4000ce04: 80 88 60 01 btst 1, %g1 4000ce08: 02 80 00 11 be 4000ce4c <_Heap_Free+0xf8> <== NEVER TAKEN 4000ce0c: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4000ce10: 22 80 00 3a be,a 4000cef8 <_Heap_Free+0x1a4> 4000ce14: 94 01 00 0a add %g4, %o2, %o2 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4000ce18: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000ce1c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4000ce20: c4 00 a0 08 ld [ %g2 + 8 ], %g2 4000ce24: 86 00 ff ff add %g3, -1, %g3 4000ce28: c6 26 20 38 st %g3, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4000ce2c: 96 01 00 0b add %g4, %o3, %o3 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4000ce30: c2 20 a0 0c st %g1, [ %g2 + 0xc ] 4000ce34: 94 02 c0 0a add %o3, %o2, %o2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4000ce38: c4 20 60 08 st %g2, [ %g1 + 8 ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4000ce3c: d4 23 40 0a st %o2, [ %o5 + %o2 ] if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4000ce40: 94 12 a0 01 or %o2, 1, %o2 4000ce44: 10 80 00 10 b 4000ce84 <_Heap_Free+0x130> 4000ce48: d4 23 60 04 st %o2, [ %o5 + 4 ] --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4000ce4c: 81 c7 e0 08 ret 4000ce50: 91 e8 20 00 restore %g0, 0, %o0 uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4000ce54: 02 80 00 17 be 4000ceb0 <_Heap_Free+0x15c> 4000ce58: 82 11 20 01 or %g4, 1, %g1 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4000ce5c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4000ce60: c4 00 a0 08 ld [ %g2 + 8 ], %g2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4000ce64: c2 22 20 0c st %g1, [ %o0 + 0xc ] ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4000ce68: c4 22 20 08 st %g2, [ %o0 + 8 ] uintptr_t const size = block_size + next_block_size; 4000ce6c: 96 02 c0 04 add %o3, %g4, %o3 new_block->prev = prev; next->prev = new_block; 4000ce70: d0 20 a0 0c st %o0, [ %g2 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4000ce74: d6 22 00 0b st %o3, [ %o0 + %o3 ] prev->next = new_block; 4000ce78: d0 20 60 08 st %o0, [ %g1 + 8 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4000ce7c: 96 12 e0 01 or %o3, 1, %o3 4000ce80: d6 22 20 04 st %o3, [ %o0 + 4 ] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4000ce84: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 4000ce88: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 4000ce8c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4000ce90: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; stats->free_size += block_size; 4000ce94: 88 00 c0 04 add %g3, %g4, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4000ce98: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; stats->free_size += block_size; 4000ce9c: c8 26 20 30 st %g4, [ %i0 + 0x30 ] } } /* Statistics */ --stats->used_blocks; ++stats->frees; 4000cea0: 82 00 60 01 inc %g1 4000cea4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; return( true ); 4000cea8: 81 c7 e0 08 ret 4000ceac: 91 e8 20 01 restore %g0, 1, %o0 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4000ceb0: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000ceb4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4000ceb8: c6 06 20 08 ld [ %i0 + 8 ], %g3 4000cebc: 82 08 7f fe and %g1, -2, %g1 next_block->prev_size = block_size; 4000cec0: c8 22 00 04 st %g4, [ %o0 + %g4 ] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000cec4: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4000cec8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 new_block->next = next; 4000cecc: c6 22 20 08 st %g3, [ %o0 + 8 ] new_block->prev = block_before; 4000ced0: f0 22 20 0c st %i0, [ %o0 + 0xc ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4000ced4: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4000ced8: 82 00 60 01 inc %g1 block_before->next = new_block; next->prev = new_block; 4000cedc: d0 20 e0 0c st %o0, [ %g3 + 0xc ] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4000cee0: d0 26 20 08 st %o0, [ %i0 + 8 ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4000cee4: 80 a0 40 02 cmp %g1, %g2 4000cee8: 08 bf ff e7 bleu 4000ce84 <_Heap_Free+0x130> 4000ceec: c2 26 20 38 st %g1, [ %i0 + 0x38 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4000cef0: 10 bf ff e5 b 4000ce84 <_Heap_Free+0x130> 4000cef4: c2 26 20 3c st %g1, [ %i0 + 0x3c ] next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4000cef8: 82 12 a0 01 or %o2, 1, %g1 4000cefc: c2 23 60 04 st %g1, [ %o5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000cf00: c2 00 a0 04 ld [ %g2 + 4 ], %g1 next_block->prev_size = size; 4000cf04: d4 22 00 04 st %o2, [ %o0 + %g4 ] _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000cf08: 82 08 7f fe and %g1, -2, %g1 4000cf0c: 10 bf ff de b 4000ce84 <_Heap_Free+0x130> 4000cf10: c2 20 a0 04 st %g1, [ %g2 + 4 ] =============================================================================== 400125d8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 400125d8: 9d e3 bf a0 save %sp, -96, %sp return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 400125dc: c2 06 20 08 ld [ %i0 + 8 ], %g1 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 400125e0: c0 26 40 00 clr [ %i1 ] info->largest = 0; 400125e4: c0 26 60 04 clr [ %i1 + 4 ] info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 400125e8: 80 a6 00 01 cmp %i0, %g1 400125ec: 02 80 00 13 be 40012638 <_Heap_Get_free_information+0x60> <== NEVER TAKEN 400125f0: c0 26 60 08 clr [ %i1 + 8 ] 400125f4: 88 10 20 01 mov 1, %g4 400125f8: 10 80 00 03 b 40012604 <_Heap_Get_free_information+0x2c> 400125fc: 86 10 20 00 clr %g3 40012600: 88 10 00 02 mov %g2, %g4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 40012604: c4 00 60 04 ld [ %g1 + 4 ], %g2 /* 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 ) 40012608: da 06 60 04 ld [ %i1 + 4 ], %o5 4001260c: 84 08 bf fe and %g2, -2, %g2 40012610: 80 a3 40 02 cmp %o5, %g2 40012614: 1a 80 00 03 bcc 40012620 <_Heap_Get_free_information+0x48> 40012618: 86 00 c0 02 add %g3, %g2, %g3 info->largest = the_size; 4001261c: c4 26 60 04 st %g2, [ %i1 + 4 ] info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 40012620: c2 00 60 08 ld [ %g1 + 8 ], %g1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 40012624: 80 a6 00 01 cmp %i0, %g1 40012628: 12 bf ff f6 bne 40012600 <_Heap_Get_free_information+0x28> 4001262c: 84 01 20 01 add %g4, 1, %g2 40012630: c6 26 60 08 st %g3, [ %i1 + 8 ] 40012634: c8 26 40 00 st %g4, [ %i1 ] 40012638: 81 c7 e0 08 ret 4001263c: 81 e8 00 00 restore =============================================================================== 40012640 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 40012640: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 40012644: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 40012648: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 4001264c: c0 26 40 00 clr [ %i1 ] the_info->Free.total = 0; 40012650: c0 26 60 08 clr [ %i1 + 8 ] the_info->Free.largest = 0; 40012654: c0 26 60 04 clr [ %i1 + 4 ] the_info->Used.number = 0; 40012658: c0 26 60 0c clr [ %i1 + 0xc ] the_info->Used.total = 0; 4001265c: c0 26 60 14 clr [ %i1 + 0x14 ] the_info->Used.largest = 0; 40012660: c0 26 60 10 clr [ %i1 + 0x10 ] while ( the_block != end ) { 40012664: 80 a0 40 02 cmp %g1, %g2 40012668: 02 80 00 1a be 400126d0 <_Heap_Get_information+0x90> <== NEVER TAKEN 4001266c: 86 10 20 08 mov 8, %g3 40012670: da 00 60 04 ld [ %g1 + 4 ], %o5 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 40012674: 92 06 60 0c add %i1, 0xc, %o1 40012678: 88 0b 7f fe and %o5, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4001267c: 82 00 40 04 add %g1, %g4, %g1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 40012680: da 00 60 04 ld [ %g1 + 4 ], %o5 while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 40012684: 80 8b 60 01 btst 1, %o5 40012688: 12 80 00 03 bne 40012694 <_Heap_Get_information+0x54> 4001268c: 86 10 00 09 mov %o1, %g3 40012690: 86 10 00 19 mov %i1, %g3 info = &the_info->Used; else info = &the_info->Free; info->number++; 40012694: d4 00 c0 00 ld [ %g3 ], %o2 info->total += the_size; 40012698: d6 00 e0 08 ld [ %g3 + 8 ], %o3 if ( info->largest < the_size ) 4001269c: d8 00 e0 04 ld [ %g3 + 4 ], %o4 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 400126a0: 94 02 a0 01 inc %o2 info->total += the_size; 400126a4: 96 02 c0 04 add %o3, %g4, %o3 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 400126a8: d4 20 c0 00 st %o2, [ %g3 ] info->total += the_size; if ( info->largest < the_size ) 400126ac: 80 a3 00 04 cmp %o4, %g4 400126b0: 1a 80 00 03 bcc 400126bc <_Heap_Get_information+0x7c> 400126b4: d6 20 e0 08 st %o3, [ %g3 + 8 ] info->largest = the_size; 400126b8: c8 20 e0 04 st %g4, [ %g3 + 4 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 400126bc: 80 a0 80 01 cmp %g2, %g1 400126c0: 12 bf ff ef bne 4001267c <_Heap_Get_information+0x3c> 400126c4: 88 0b 7f fe and %o5, -2, %g4 400126c8: c6 06 60 14 ld [ %i1 + 0x14 ], %g3 400126cc: 86 00 e0 08 add %g3, 8, %g3 /* * 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_BLOCK_HEADER_SIZE; 400126d0: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } 400126d4: 81 c7 e0 08 ret 400126d8: 81 e8 00 00 restore =============================================================================== 4001b2e0 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 4001b2e0: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4001b2e4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4001b2e8: 7f ff f5 d2 call 40018a30 <.urem> 4001b2ec: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4001b2f0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4001b2f4: 84 06 7f f8 add %i1, -8, %g2 4001b2f8: 84 20 80 08 sub %g2, %o0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4001b2fc: 80 a0 80 01 cmp %g2, %g1 4001b300: 0a 80 00 16 bcs 4001b358 <_Heap_Size_of_alloc_area+0x78> 4001b304: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 4001b308: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4001b30c: 80 a0 80 03 cmp %g2, %g3 4001b310: 18 80 00 12 bgu 4001b358 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 4001b314: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4001b318: c8 00 a0 04 ld [ %g2 + 4 ], %g4 4001b31c: 88 09 3f fe and %g4, -2, %g4 4001b320: 84 00 80 04 add %g2, %g4, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4001b324: 80 a0 40 02 cmp %g1, %g2 4001b328: 18 80 00 0c bgu 4001b358 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 4001b32c: 80 a0 c0 02 cmp %g3, %g2 4001b330: 0a 80 00 0a bcs 4001b358 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 4001b334: 01 00 00 00 nop } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 4001b338: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4001b33c: 80 88 60 01 btst 1, %g1 4001b340: 02 80 00 06 be 4001b358 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 4001b344: 84 20 80 19 sub %g2, %i1, %g2 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 4001b348: 84 00 a0 04 add %g2, 4, %g2 4001b34c: c4 26 80 00 st %g2, [ %i2 ] return true; 4001b350: 81 c7 e0 08 ret 4001b354: 91 e8 20 01 restore %g0, 1, %o0 } 4001b358: 81 c7 e0 08 ret 4001b35c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40008d54 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 40008d54: 9d e3 bf 88 save %sp, -120, %sp uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 40008d58: 25 10 00 24 sethi %hi(0x40009000), %l2 40008d5c: 80 8e a0 ff btst 0xff, %i2 40008d60: a4 14 a3 54 or %l2, 0x354, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 40008d64: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 40008d68: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 40008d6c: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 40008d70: 12 80 00 04 bne 40008d80 <_Heap_Walk+0x2c> 40008d74: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40008d78: 25 10 00 23 sethi %hi(0x40008c00), %l2 40008d7c: a4 14 a1 4c or %l2, 0x14c, %l2 ! 40008d4c <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 40008d80: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40008d84: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 4001fd90 <_System_state_Current> 40008d88: 80 a0 60 03 cmp %g1, 3 40008d8c: 22 80 00 04 be,a 40008d9c <_Heap_Walk+0x48> 40008d90: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 40008d94: 81 c7 e0 08 ret 40008d98: 91 e8 20 01 restore %g0, 1, %o0 Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 40008d9c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008da0: c4 06 20 08 ld [ %i0 + 8 ], %g2 40008da4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40008da8: 90 10 00 19 mov %i1, %o0 40008dac: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 40008db0: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 40008db4: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40008db8: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40008dbc: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40008dc0: 92 10 20 00 clr %o1 40008dc4: 15 10 00 73 sethi %hi(0x4001cc00), %o2 40008dc8: 96 10 00 15 mov %l5, %o3 40008dcc: 94 12 a3 b0 or %o2, 0x3b0, %o2 40008dd0: 9f c4 80 00 call %l2 40008dd4: 98 10 00 13 mov %l3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 40008dd8: 80 a5 60 00 cmp %l5, 0 40008ddc: 02 80 00 36 be 40008eb4 <_Heap_Walk+0x160> 40008de0: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40008de4: 12 80 00 3c bne 40008ed4 <_Heap_Walk+0x180> 40008de8: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40008dec: 7f ff e3 36 call 40001ac4 <.urem> 40008df0: 92 10 00 15 mov %l5, %o1 40008df4: 80 a2 20 00 cmp %o0, 0 40008df8: 12 80 00 40 bne 40008ef8 <_Heap_Walk+0x1a4> 40008dfc: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 40008e00: 7f ff e3 31 call 40001ac4 <.urem> 40008e04: 92 10 00 15 mov %l5, %o1 40008e08: 80 a2 20 00 cmp %o0, 0 40008e0c: 32 80 00 44 bne,a 40008f1c <_Heap_Walk+0x1c8> 40008e10: 90 10 00 19 mov %i1, %o0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 40008e14: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 40008e18: ae 8d a0 01 andcc %l6, 1, %l7 40008e1c: 22 80 00 48 be,a 40008f3c <_Heap_Walk+0x1e8> 40008e20: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 40008e24: d6 04 00 00 ld [ %l0 ], %o3 40008e28: 80 a5 40 0b cmp %l5, %o3 40008e2c: 32 80 00 1a bne,a 40008e94 <_Heap_Walk+0x140> 40008e30: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40008e34: c2 05 20 04 ld [ %l4 + 4 ], %g1 40008e38: 82 08 7f fe and %g1, -2, %g1 40008e3c: 82 05 00 01 add %l4, %g1, %g1 40008e40: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008e44: 80 88 60 01 btst 1, %g1 40008e48: 22 80 01 23 be,a 400092d4 <_Heap_Walk+0x580> 40008e4c: 90 10 00 19 mov %i1, %o0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40008e50: e2 06 20 08 ld [ %i0 + 8 ], %l1 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 40008e54: 80 a6 00 11 cmp %i0, %l1 40008e58: 02 80 00 6f be 40009014 <_Heap_Walk+0x2c0> 40008e5c: f4 06 20 10 ld [ %i0 + 0x10 ], %i2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 40008e60: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 40008e64: 80 a7 00 11 cmp %i4, %l1 40008e68: 28 80 00 3c bleu,a 40008f58 <_Heap_Walk+0x204> <== ALWAYS TAKEN 40008e6c: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 40008e70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008e74: 96 10 00 11 mov %l1, %o3 40008e78: 92 10 20 01 mov 1, %o1 40008e7c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008e80: b0 10 20 00 clr %i0 40008e84: 9f c4 80 00 call %l2 40008e88: 94 12 a1 58 or %o2, 0x158, %o2 40008e8c: 81 c7 e0 08 ret 40008e90: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 40008e94: 98 10 00 15 mov %l5, %o4 40008e98: 92 10 20 01 mov 1, %o1 40008e9c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008ea0: b0 10 20 00 clr %i0 40008ea4: 9f c4 80 00 call %l2 40008ea8: 94 12 a1 10 or %o2, 0x110, %o2 40008eac: 81 c7 e0 08 ret 40008eb0: 81 e8 00 00 restore first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 40008eb4: 90 10 00 19 mov %i1, %o0 40008eb8: 92 10 20 01 mov 1, %o1 40008ebc: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008ec0: b0 10 20 00 clr %i0 40008ec4: 9f c4 80 00 call %l2 40008ec8: 94 12 a0 48 or %o2, 0x48, %o2 40008ecc: 81 c7 e0 08 ret 40008ed0: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 40008ed4: 90 10 00 19 mov %i1, %o0 40008ed8: 96 10 00 15 mov %l5, %o3 40008edc: 92 10 20 01 mov 1, %o1 40008ee0: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008ee4: b0 10 20 00 clr %i0 40008ee8: 9f c4 80 00 call %l2 40008eec: 94 12 a0 60 or %o2, 0x60, %o2 40008ef0: 81 c7 e0 08 ret 40008ef4: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 40008ef8: 90 10 00 19 mov %i1, %o0 40008efc: 96 10 00 13 mov %l3, %o3 40008f00: 92 10 20 01 mov 1, %o1 40008f04: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f08: b0 10 20 00 clr %i0 40008f0c: 9f c4 80 00 call %l2 40008f10: 94 12 a0 80 or %o2, 0x80, %o2 40008f14: 81 c7 e0 08 ret 40008f18: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 40008f1c: 96 10 00 10 mov %l0, %o3 40008f20: 92 10 20 01 mov 1, %o1 40008f24: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f28: b0 10 20 00 clr %i0 40008f2c: 9f c4 80 00 call %l2 40008f30: 94 12 a0 a8 or %o2, 0xa8, %o2 40008f34: 81 c7 e0 08 ret 40008f38: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 40008f3c: 92 10 20 01 mov 1, %o1 40008f40: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f44: b0 10 20 00 clr %i0 40008f48: 9f c4 80 00 call %l2 40008f4c: 94 12 a0 e0 or %o2, 0xe0, %o2 40008f50: 81 c7 e0 08 ret 40008f54: 81 e8 00 00 restore 40008f58: 80 a6 c0 11 cmp %i3, %l1 40008f5c: 0a bf ff c6 bcs 40008e74 <_Heap_Walk+0x120> <== NEVER TAKEN 40008f60: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 40008f64: 90 04 60 08 add %l1, 8, %o0 40008f68: 7f ff e2 d7 call 40001ac4 <.urem> 40008f6c: 92 10 00 1a mov %i2, %o1 40008f70: 80 a2 20 00 cmp %o0, 0 40008f74: 12 80 00 df bne 400092f0 <_Heap_Walk+0x59c> <== NEVER TAKEN 40008f78: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40008f7c: c2 04 60 04 ld [ %l1 + 4 ], %g1 40008f80: 82 08 7f fe and %g1, -2, %g1 40008f84: 82 04 40 01 add %l1, %g1, %g1 40008f88: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008f8c: 80 88 60 01 btst 1, %g1 40008f90: 12 80 00 ea bne 40009338 <_Heap_Walk+0x5e4> <== NEVER TAKEN 40008f94: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 40008f98: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40008f9c: 80 a6 00 0c cmp %i0, %o4 40008fa0: 02 80 00 19 be 40009004 <_Heap_Walk+0x2b0> <== ALWAYS TAKEN 40008fa4: ba 10 00 11 mov %l1, %i5 40008fa8: 30 80 00 dc b,a 40009318 <_Heap_Walk+0x5c4> <== NOT EXECUTED 40008fac: 0a bf ff b2 bcs 40008e74 <_Heap_Walk+0x120> 40008fb0: 90 10 00 19 mov %i1, %o0 40008fb4: 80 a6 c0 11 cmp %i3, %l1 40008fb8: 0a bf ff b0 bcs 40008e78 <_Heap_Walk+0x124> <== NEVER TAKEN 40008fbc: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 40008fc0: 90 04 60 08 add %l1, 8, %o0 40008fc4: 7f ff e2 c0 call 40001ac4 <.urem> 40008fc8: 92 10 00 1a mov %i2, %o1 40008fcc: 80 a2 20 00 cmp %o0, 0 40008fd0: 32 80 00 c8 bne,a 400092f0 <_Heap_Walk+0x59c> 40008fd4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40008fd8: c2 04 60 04 ld [ %l1 + 4 ], %g1 40008fdc: 82 08 7f fe and %g1, -2, %g1 40008fe0: 82 00 40 11 add %g1, %l1, %g1 40008fe4: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008fe8: 80 88 60 01 btst 1, %g1 40008fec: 32 80 00 d2 bne,a 40009334 <_Heap_Walk+0x5e0> 40008ff0: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 40008ff4: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40008ff8: 80 a3 00 1d cmp %o4, %i5 40008ffc: 12 80 00 c5 bne 40009310 <_Heap_Walk+0x5bc> 40009000: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 40009004: e2 04 60 08 ld [ %l1 + 8 ], %l1 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 40009008: 80 a6 00 11 cmp %i0, %l1 4000900c: 12 bf ff e8 bne 40008fac <_Heap_Walk+0x258> 40009010: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40009014: 80 a5 00 10 cmp %l4, %l0 40009018: 02 bf ff 5f be 40008d94 <_Heap_Walk+0x40> <== NEVER TAKEN 4000901c: 37 10 00 74 sethi %hi(0x4001d000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40009020: 35 10 00 74 sethi %hi(0x4001d000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40009024: 39 10 00 74 sethi %hi(0x4001d000), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40009028: ba 10 00 15 mov %l5, %i5 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)( 4000902c: b6 16 e2 00 or %i3, 0x200, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40009030: b4 16 a2 18 or %i2, 0x218, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40009034: b8 17 23 18 or %i4, 0x318, %i4 40009038: aa 10 00 14 mov %l4, %l5 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4000903c: ac 0d bf fe and %l6, -2, %l6 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 40009040: 80 a5 e0 00 cmp %l7, 0 40009044: 02 80 00 16 be 4000909c <_Heap_Walk+0x348> 40009048: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 4000904c: 90 10 00 19 mov %i1, %o0 40009050: 92 10 20 00 clr %o1 40009054: 94 10 00 1b mov %i3, %o2 40009058: 96 10 00 10 mov %l0, %o3 4000905c: 9f c4 80 00 call %l2 40009060: 98 10 00 16 mov %l6, %o4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 40009064: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40009068: 80 a0 40 11 cmp %g1, %l1 4000906c: 28 80 00 18 bleu,a 400090cc <_Heap_Walk+0x378> <== ALWAYS TAKEN 40009070: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 40009074: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40009078: 96 10 00 10 mov %l0, %o3 4000907c: 98 10 00 11 mov %l1, %o4 40009080: 92 10 20 01 mov 1, %o1 40009084: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009088: b0 10 20 00 clr %i0 4000908c: 9f c4 80 00 call %l2 40009090: 94 12 a2 40 or %o2, 0x240, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 40009094: 81 c7 e0 08 ret 40009098: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 4000909c: da 04 00 00 ld [ %l0 ], %o5 400090a0: 90 10 00 19 mov %i1, %o0 400090a4: 92 10 20 00 clr %o1 400090a8: 94 10 00 1a mov %i2, %o2 400090ac: 96 10 00 10 mov %l0, %o3 400090b0: 9f c4 80 00 call %l2 400090b4: 98 10 00 16 mov %l6, %o4 400090b8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 400090bc: 80 a0 40 11 cmp %g1, %l1 400090c0: 18 bf ff ee bgu 40009078 <_Heap_Walk+0x324> <== NEVER TAKEN 400090c4: 90 10 00 19 mov %i1, %o0 400090c8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400090cc: 80 a0 40 11 cmp %g1, %l1 400090d0: 0a bf ff ea bcs 40009078 <_Heap_Walk+0x324> 400090d4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 400090d8: 90 10 00 16 mov %l6, %o0 400090dc: 7f ff e2 7a call 40001ac4 <.urem> 400090e0: 92 10 00 1d mov %i5, %o1 400090e4: 80 a2 20 00 cmp %o0, 0 400090e8: 12 80 00 5d bne 4000925c <_Heap_Walk+0x508> 400090ec: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 400090f0: 18 80 00 65 bgu 40009284 <_Heap_Walk+0x530> 400090f4: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 400090f8: 3a 80 00 6e bcc,a 400092b0 <_Heap_Walk+0x55c> 400090fc: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 40009100: c2 04 60 04 ld [ %l1 + 4 ], %g1 40009104: 80 88 60 01 btst 1, %g1 40009108: 12 80 00 40 bne 40009208 <_Heap_Walk+0x4b4> 4000910c: 80 a5 40 11 cmp %l5, %l1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 40009110: e8 04 20 04 ld [ %l0 + 4 ], %l4 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 40009114: d8 04 20 0c ld [ %l0 + 0xc ], %o4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40009118: c2 06 20 08 ld [ %i0 + 8 ], %g1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4000911c: ac 0d 3f fe and %l4, -2, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40009120: 1b 10 00 74 sethi %hi(0x4001d000), %o5 40009124: 80 a0 40 0c cmp %g1, %o4 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 40009128: c6 06 20 0c ld [ %i0 + 0xc ], %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4000912c: ae 04 00 16 add %l0, %l6, %l7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40009130: 02 80 00 07 be 4000914c <_Heap_Walk+0x3f8> 40009134: 9a 13 63 08 or %o5, 0x308, %o5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 40009138: 1b 10 00 74 sethi %hi(0x4001d000), %o5 4000913c: 80 a3 00 18 cmp %o4, %i0 40009140: 02 80 00 03 be 4000914c <_Heap_Walk+0x3f8> 40009144: 9a 13 63 20 or %o5, 0x320, %o5 40009148: 9a 10 00 1c mov %i4, %o5 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 4000914c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40009150: 05 10 00 74 sethi %hi(0x4001d000), %g2 40009154: 80 a0 c0 01 cmp %g3, %g1 40009158: 02 80 00 07 be 40009174 <_Heap_Walk+0x420> 4000915c: 84 10 a3 30 or %g2, 0x330, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40009160: 05 10 00 74 sethi %hi(0x4001d000), %g2 40009164: 80 a0 40 18 cmp %g1, %i0 40009168: 02 80 00 03 be 40009174 <_Heap_Walk+0x420> 4000916c: 84 10 a3 40 or %g2, 0x340, %g2 40009170: 84 10 00 1c mov %i4, %g2 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 40009174: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40009178: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 4000917c: 90 10 00 19 mov %i1, %o0 40009180: 92 10 20 00 clr %o1 40009184: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009188: 96 10 00 10 mov %l0, %o3 4000918c: 9f c4 80 00 call %l2 40009190: 94 12 a3 50 or %o2, 0x350, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 40009194: da 05 c0 00 ld [ %l7 ], %o5 40009198: 80 a5 80 0d cmp %l6, %o5 4000919c: 02 80 00 0c be 400091cc <_Heap_Walk+0x478> 400091a0: 90 10 00 19 mov %i1, %o0 (*printer)( 400091a4: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 400091a8: 96 10 00 10 mov %l0, %o3 400091ac: 98 10 00 16 mov %l6, %o4 400091b0: 92 10 20 01 mov 1, %o1 400091b4: 15 10 00 74 sethi %hi(0x4001d000), %o2 400091b8: b0 10 20 00 clr %i0 400091bc: 9f c4 80 00 call %l2 400091c0: 94 12 a3 80 or %o2, 0x380, %o2 400091c4: 81 c7 e0 08 ret 400091c8: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 400091cc: 80 8d 20 01 btst 1, %l4 400091d0: 02 80 00 1c be 40009240 <_Heap_Walk+0x4ec> 400091d4: 96 10 00 10 mov %l0, %o3 400091d8: c2 06 20 08 ld [ %i0 + 8 ], %g1 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 400091dc: 80 a0 40 18 cmp %g1, %i0 400091e0: 12 80 00 07 bne 400091fc <_Heap_Walk+0x4a8> <== ALWAYS TAKEN 400091e4: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 400091e8: 10 80 00 0f b 40009224 <_Heap_Walk+0x4d0> <== NOT EXECUTED 400091ec: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 400091f0: 80 a0 40 18 cmp %g1, %i0 400091f4: 02 80 00 0a be 4000921c <_Heap_Walk+0x4c8> 400091f8: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 400091fc: 32 bf ff fd bne,a 400091f0 <_Heap_Walk+0x49c> 40009200: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40009204: 80 a5 40 11 cmp %l5, %l1 40009208: 02 bf fe e3 be 40008d94 <_Heap_Walk+0x40> 4000920c: a0 10 00 11 mov %l1, %l0 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 40009210: ec 04 60 04 ld [ %l1 + 4 ], %l6 40009214: 10 bf ff 8a b 4000903c <_Heap_Walk+0x2e8> 40009218: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4000921c: 90 10 00 19 mov %i1, %o0 40009220: 96 10 00 10 mov %l0, %o3 40009224: 92 10 20 01 mov 1, %o1 40009228: 15 10 00 74 sethi %hi(0x4001d000), %o2 4000922c: b0 10 20 00 clr %i0 40009230: 9f c4 80 00 call %l2 40009234: 94 12 a3 f0 or %o2, 0x3f0, %o2 40009238: 81 c7 e0 08 ret 4000923c: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 40009240: 92 10 20 01 mov 1, %o1 40009244: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009248: b0 10 20 00 clr %i0 4000924c: 9f c4 80 00 call %l2 40009250: 94 12 a3 c0 or %o2, 0x3c0, %o2 40009254: 81 c7 e0 08 ret 40009258: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 4000925c: 90 10 00 19 mov %i1, %o0 40009260: 96 10 00 10 mov %l0, %o3 40009264: 98 10 00 16 mov %l6, %o4 40009268: 92 10 20 01 mov 1, %o1 4000926c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009270: b0 10 20 00 clr %i0 40009274: 9f c4 80 00 call %l2 40009278: 94 12 a2 70 or %o2, 0x270, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4000927c: 81 c7 e0 08 ret 40009280: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 40009284: 90 10 00 19 mov %i1, %o0 40009288: 96 10 00 10 mov %l0, %o3 4000928c: 98 10 00 16 mov %l6, %o4 40009290: 9a 10 00 13 mov %l3, %o5 40009294: 92 10 20 01 mov 1, %o1 40009298: 15 10 00 74 sethi %hi(0x4001d000), %o2 4000929c: b0 10 20 00 clr %i0 400092a0: 9f c4 80 00 call %l2 400092a4: 94 12 a2 a0 or %o2, 0x2a0, %o2 block, block_size, min_block_size ); return false; 400092a8: 81 c7 e0 08 ret 400092ac: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 400092b0: 96 10 00 10 mov %l0, %o3 400092b4: 98 10 00 11 mov %l1, %o4 400092b8: 92 10 20 01 mov 1, %o1 400092bc: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092c0: b0 10 20 00 clr %i0 400092c4: 9f c4 80 00 call %l2 400092c8: 94 12 a2 d0 or %o2, 0x2d0, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 400092cc: 81 c7 e0 08 ret 400092d0: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 400092d4: 92 10 20 01 mov 1, %o1 400092d8: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092dc: b0 10 20 00 clr %i0 400092e0: 9f c4 80 00 call %l2 400092e4: 94 12 a1 40 or %o2, 0x140, %o2 400092e8: 81 c7 e0 08 ret 400092ec: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 400092f0: 96 10 00 11 mov %l1, %o3 400092f4: 92 10 20 01 mov 1, %o1 400092f8: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092fc: b0 10 20 00 clr %i0 40009300: 9f c4 80 00 call %l2 40009304: 94 12 a1 78 or %o2, 0x178, %o2 40009308: 81 c7 e0 08 ret 4000930c: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 40009310: 90 10 00 19 mov %i1, %o0 40009314: 96 10 00 11 mov %l1, %o3 40009318: 92 10 20 01 mov 1, %o1 4000931c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009320: b0 10 20 00 clr %i0 40009324: 9f c4 80 00 call %l2 40009328: 94 12 a1 c8 or %o2, 0x1c8, %o2 4000932c: 81 c7 e0 08 ret 40009330: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 40009334: 96 10 00 11 mov %l1, %o3 40009338: 92 10 20 01 mov 1, %o1 4000933c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009340: b0 10 20 00 clr %i0 40009344: 9f c4 80 00 call %l2 40009348: 94 12 a1 a8 or %o2, 0x1a8, %o2 4000934c: 81 c7 e0 08 ret 40009350: 81 e8 00 00 restore =============================================================================== 40007318 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 40007318: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 4000731c: 23 10 00 75 sethi %hi(0x4001d400), %l1 40007320: c2 04 62 bc ld [ %l1 + 0x2bc ], %g1 ! 4001d6bc <_IO_Number_of_drivers> 40007324: 80 a0 60 00 cmp %g1, 0 40007328: 02 80 00 0c be 40007358 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 4000732c: a2 14 62 bc or %l1, 0x2bc, %l1 40007330: a0 10 20 00 clr %l0 (void) rtems_io_initialize( major, 0, NULL ); 40007334: 90 10 00 10 mov %l0, %o0 40007338: 92 10 20 00 clr %o1 4000733c: 40 00 15 27 call 4000c7d8 40007340: 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 ++ ) 40007344: c2 04 40 00 ld [ %l1 ], %g1 40007348: a0 04 20 01 inc %l0 4000734c: 80 a0 40 10 cmp %g1, %l0 40007350: 18 bf ff fa bgu 40007338 <_IO_Initialize_all_drivers+0x20> 40007354: 90 10 00 10 mov %l0, %o0 40007358: 81 c7 e0 08 ret 4000735c: 81 e8 00 00 restore =============================================================================== 40007360 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 40007360: 9d e3 bf a0 save %sp, -96, %sp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 40007364: 03 10 00 72 sethi %hi(0x4001c800), %g1 40007368: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 4001c9b8 drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; 4000736c: e6 00 60 2c ld [ %g1 + 0x2c ], %l3 rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; 40007370: e2 00 60 30 ld [ %g1 + 0x30 ], %l1 /* * 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 ) 40007374: 80 a4 40 13 cmp %l1, %l3 40007378: 0a 80 00 08 bcs 40007398 <_IO_Manager_initialization+0x38> 4000737c: e0 00 60 34 ld [ %g1 + 0x34 ], %l0 * 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; 40007380: 03 10 00 75 sethi %hi(0x4001d400), %g1 40007384: e0 20 62 c0 st %l0, [ %g1 + 0x2c0 ] ! 4001d6c0 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 40007388: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000738c: e2 20 62 bc st %l1, [ %g1 + 0x2bc ] ! 4001d6bc <_IO_Number_of_drivers> return; 40007390: 81 c7 e0 08 ret 40007394: 81 e8 00 00 restore * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) 40007398: 83 2c e0 03 sll %l3, 3, %g1 4000739c: a5 2c e0 05 sll %l3, 5, %l2 400073a0: a4 24 80 01 sub %l2, %g1, %l2 /* * 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 *) 400073a4: 40 00 0c 05 call 4000a3b8 <_Workspace_Allocate_or_fatal_error> 400073a8: 90 10 00 12 mov %l2, %o0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 400073ac: 03 10 00 75 sethi %hi(0x4001d400), %g1 memset( 400073b0: 94 10 00 12 mov %l2, %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; 400073b4: e6 20 62 bc st %l3, [ %g1 + 0x2bc ] /* * 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 *) 400073b8: 25 10 00 75 sethi %hi(0x4001d400), %l2 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 400073bc: 92 10 20 00 clr %o1 400073c0: 40 00 21 d3 call 4000fb0c 400073c4: d0 24 a2 c0 st %o0, [ %l2 + 0x2c0 ] _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 400073c8: 80 a4 60 00 cmp %l1, 0 400073cc: 02 bf ff f1 be 40007390 <_IO_Manager_initialization+0x30> <== NEVER TAKEN 400073d0: da 04 a2 c0 ld [ %l2 + 0x2c0 ], %o5 400073d4: 82 10 20 00 clr %g1 400073d8: 88 10 20 00 clr %g4 _IO_Driver_address_table[index] = driver_table[index]; 400073dc: c4 04 00 01 ld [ %l0 + %g1 ], %g2 400073e0: 86 04 00 01 add %l0, %g1, %g3 400073e4: c4 23 40 01 st %g2, [ %o5 + %g1 ] 400073e8: d8 00 e0 04 ld [ %g3 + 4 ], %o4 400073ec: 84 03 40 01 add %o5, %g1, %g2 400073f0: d8 20 a0 04 st %o4, [ %g2 + 4 ] 400073f4: d8 00 e0 08 ld [ %g3 + 8 ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 400073f8: 88 01 20 01 inc %g4 _IO_Driver_address_table[index] = driver_table[index]; 400073fc: d8 20 a0 08 st %o4, [ %g2 + 8 ] 40007400: d8 00 e0 0c ld [ %g3 + 0xc ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007404: 82 00 60 18 add %g1, 0x18, %g1 _IO_Driver_address_table[index] = driver_table[index]; 40007408: d8 20 a0 0c st %o4, [ %g2 + 0xc ] 4000740c: d8 00 e0 10 ld [ %g3 + 0x10 ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007410: 80 a4 40 04 cmp %l1, %g4 _IO_Driver_address_table[index] = driver_table[index]; 40007414: d8 20 a0 10 st %o4, [ %g2 + 0x10 ] 40007418: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4000741c: 18 bf ff f0 bgu 400073dc <_IO_Manager_initialization+0x7c> 40007420: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 40007424: 81 c7 e0 08 ret 40007428: 81 e8 00 00 restore =============================================================================== 40007fdc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007fdc: 9d e3 bf a0 save %sp, -96, %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 ) 40007fe0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007fe4: 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 ) 40007fe8: 80 a0 60 00 cmp %g1, 0 40007fec: 02 80 00 19 be 40008050 <_Objects_Allocate+0x74> <== NEVER TAKEN 40007ff0: 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 ); 40007ff4: a2 04 20 20 add %l0, 0x20, %l1 40007ff8: 40 00 12 19 call 4000c85c <_Chain_Get> 40007ffc: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40008000: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40008004: 80 a0 60 00 cmp %g1, 0 40008008: 02 80 00 12 be 40008050 <_Objects_Allocate+0x74> 4000800c: 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 ) { 40008010: 80 a2 20 00 cmp %o0, 0 40008014: 02 80 00 11 be 40008058 <_Objects_Allocate+0x7c> 40008018: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 4000801c: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 40008020: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40008024: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1 40008028: 40 00 41 d6 call 40018780 <.udiv> 4000802c: 90 22 00 01 sub %o0, %g1, %o0 40008030: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 40008034: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40008038: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4000803c: c4 00 40 08 ld [ %g1 + %o0 ], %g2 information->inactive--; 40008040: 86 00 ff ff add %g3, -1, %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40008044: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 40008048: c6 34 20 2c sth %g3, [ %l0 + 0x2c ] block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4000804c: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; } } return the_object; } 40008050: 81 c7 e0 08 ret 40008054: 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 ); 40008058: 40 00 00 11 call 4000809c <_Objects_Extend_information> 4000805c: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40008060: 40 00 11 ff call 4000c85c <_Chain_Get> 40008064: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40008068: b0 92 20 00 orcc %o0, 0, %i0 4000806c: 32 bf ff ed bne,a 40008020 <_Objects_Allocate+0x44> 40008070: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 information->inactive--; } } return the_object; } 40008074: 81 c7 e0 08 ret 40008078: 81 e8 00 00 restore =============================================================================== 4000809c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 4000809c: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 400080a0: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 400080a4: 80 a5 20 00 cmp %l4, 0 400080a8: 02 80 00 ab be 40008354 <_Objects_Extend_information+0x2b8> 400080ac: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 400080b0: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 400080b4: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 400080b8: ab 2d 60 10 sll %l5, 0x10, %l5 400080bc: 92 10 00 12 mov %l2, %o1 400080c0: 40 00 41 b0 call 40018780 <.udiv> 400080c4: 91 35 60 10 srl %l5, 0x10, %o0 400080c8: 91 2a 20 10 sll %o0, 0x10, %o0 400080cc: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 400080d0: 80 a7 20 00 cmp %i4, 0 400080d4: 02 80 00 a7 be 40008370 <_Objects_Extend_information+0x2d4><== NEVER TAKEN 400080d8: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 400080dc: c2 05 00 00 ld [ %l4 ], %g1 400080e0: 80 a0 60 00 cmp %g1, 0 400080e4: 02 80 00 a4 be 40008374 <_Objects_Extend_information+0x2d8><== NEVER TAKEN 400080e8: a2 10 00 13 mov %l3, %l1 400080ec: 10 80 00 06 b 40008104 <_Objects_Extend_information+0x68> 400080f0: a0 10 20 00 clr %l0 400080f4: c2 05 00 01 ld [ %l4 + %g1 ], %g1 400080f8: 80 a0 60 00 cmp %g1, 0 400080fc: 22 80 00 08 be,a 4000811c <_Objects_Extend_information+0x80> 40008100: ab 35 60 10 srl %l5, 0x10, %l5 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008104: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008108: a2 04 40 12 add %l1, %l2, %l1 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4000810c: 80 a7 00 10 cmp %i4, %l0 40008110: 18 bf ff f9 bgu 400080f4 <_Objects_Extend_information+0x58> 40008114: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40008118: ab 35 60 10 srl %l5, 0x10, %l5 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 4000811c: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40008120: aa 05 40 08 add %l5, %o0, %l5 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 40008124: 82 10 63 ff or %g1, 0x3ff, %g1 40008128: 80 a5 40 01 cmp %l5, %g1 4000812c: 18 80 00 96 bgu 40008384 <_Objects_Extend_information+0x2e8><== NEVER TAKEN 40008130: 01 00 00 00 nop /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 40008134: 40 00 41 59 call 40018698 <.umul> 40008138: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 4000813c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40008140: 80 a0 60 00 cmp %g1, 0 40008144: 12 80 00 6d bne 400082f8 <_Objects_Extend_information+0x25c> 40008148: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 4000814c: 40 00 08 9b call 4000a3b8 <_Workspace_Allocate_or_fatal_error> 40008150: 01 00 00 00 nop 40008154: a4 10 00 08 mov %o0, %l2 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008158: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 4000815c: 80 a4 40 01 cmp %l1, %g1 40008160: 2a 80 00 43 bcs,a 4000826c <_Objects_Extend_information+0x1d0> 40008164: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 40008168: a8 07 20 01 add %i4, 1, %l4 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 4000816c: 91 2d 20 01 sll %l4, 1, %o0 40008170: 90 02 00 14 add %o0, %l4, %o0 40008174: 90 05 40 08 add %l5, %o0, %o0 40008178: 90 02 00 13 add %o0, %l3, %o0 4000817c: 40 00 08 9e call 4000a3f4 <_Workspace_Allocate> 40008180: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 40008184: ac 92 20 00 orcc %o0, 0, %l6 40008188: 02 80 00 7d be 4000837c <_Objects_Extend_information+0x2e0> 4000818c: a9 2d 20 02 sll %l4, 2, %l4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40008190: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008194: 80 a4 c0 01 cmp %l3, %g1 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 40008198: ae 05 80 14 add %l6, %l4, %l7 4000819c: 0a 80 00 5e bcs 40008314 <_Objects_Extend_information+0x278> 400081a0: a8 05 c0 14 add %l7, %l4, %l4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 400081a4: 80 a4 e0 00 cmp %l3, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 400081a8: 82 10 20 00 clr %g1 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 400081ac: 02 80 00 08 be 400081cc <_Objects_Extend_information+0x130><== NEVER TAKEN 400081b0: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 400081b4: 85 28 60 02 sll %g1, 2, %g2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 400081b8: 82 00 60 01 inc %g1 400081bc: 80 a4 c0 01 cmp %l3, %g1 400081c0: 18 bf ff fd bgu 400081b4 <_Objects_Extend_information+0x118><== NEVER TAKEN 400081c4: c0 20 80 14 clr [ %g2 + %l4 ] 400081c8: bb 2f 20 02 sll %i4, 2, %i5 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 400081cc: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 400081d0: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 400081d4: 86 04 40 03 add %l1, %g3, %g3 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 400081d8: 80 a4 40 03 cmp %l1, %g3 400081dc: 1a 80 00 0a bcc 40008204 <_Objects_Extend_information+0x168><== NEVER TAKEN 400081e0: c0 25 80 1d clr [ %l6 + %i5 ] 400081e4: 85 2c 60 02 sll %l1, 2, %g2 400081e8: 82 10 00 11 mov %l1, %g1 400081ec: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 400081f0: 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++ ) { 400081f4: 82 00 60 01 inc %g1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 400081f8: 80 a0 40 03 cmp %g1, %g3 400081fc: 0a bf ff fd bcs 400081f0 <_Objects_Extend_information+0x154> 40008200: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40008204: 7f ff e7 04 call 40001e14 40008208: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4000820c: c6 06 00 00 ld [ %i0 ], %g3 40008210: c4 16 20 04 lduh [ %i0 + 4 ], %g2 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 40008214: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40008218: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 4000821c: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 40008220: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40008224: 87 28 e0 18 sll %g3, 0x18, %g3 40008228: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 4000822c: ec 26 20 34 st %l6, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40008230: ab 2d 60 10 sll %l5, 0x10, %l5 40008234: 03 00 00 40 sethi %hi(0x10000), %g1 40008238: ab 35 60 10 srl %l5, 0x10, %l5 4000823c: 82 10 c0 01 or %g3, %g1, %g1 40008240: 82 10 40 02 or %g1, %g2, %g1 40008244: 82 10 40 15 or %g1, %l5, %g1 40008248: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 4000824c: 7f ff e6 f6 call 40001e24 40008250: 01 00 00 00 nop if ( old_tables ) 40008254: 80 a4 e0 00 cmp %l3, 0 40008258: 22 80 00 05 be,a 4000826c <_Objects_Extend_information+0x1d0> 4000825c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 40008260: 40 00 08 6e call 4000a418 <_Workspace_Free> 40008264: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008268: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4000826c: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 40008270: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 40008274: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008278: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4000827c: a6 06 20 20 add %i0, 0x20, %l3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008280: e4 20 40 10 st %l2, [ %g1 + %l0 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 40008284: 29 00 00 40 sethi %hi(0x10000), %l4 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008288: a4 07 bf f4 add %fp, -12, %l2 4000828c: 40 00 11 87 call 4000c8a8 <_Chain_Initialize> 40008290: 90 10 00 12 mov %l2, %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 ) { 40008294: 30 80 00 0c b,a 400082c4 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 40008298: c4 16 20 04 lduh [ %i0 + 4 ], %g2 4000829c: 83 28 60 18 sll %g1, 0x18, %g1 400082a0: 85 28 a0 1b sll %g2, 0x1b, %g2 400082a4: 82 10 40 14 or %g1, %l4, %g1 400082a8: 82 10 40 02 or %g1, %g2, %g1 400082ac: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400082b0: 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( 400082b4: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 400082b8: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400082bc: 7f ff fc e2 call 40007644 <_Chain_Append> 400082c0: 90 10 00 13 mov %l3, %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 ) { 400082c4: 40 00 11 66 call 4000c85c <_Chain_Get> 400082c8: 90 10 00 12 mov %l2, %o0 400082cc: 80 a2 20 00 cmp %o0, 0 400082d0: 32 bf ff f2 bne,a 40008298 <_Objects_Extend_information+0x1fc> 400082d4: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 400082d8: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400082dc: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 400082e0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 400082e4: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400082e8: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 400082ec: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400082f0: 81 c7 e0 08 ret 400082f4: 81 e8 00 00 restore * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 400082f8: 40 00 08 3f call 4000a3f4 <_Workspace_Allocate> 400082fc: 01 00 00 00 nop if ( !new_object_block ) 40008300: a4 92 20 00 orcc %o0, 0, %l2 40008304: 32 bf ff 96 bne,a 4000815c <_Objects_Extend_information+0xc0> 40008308: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 4000830c: 81 c7 e0 08 ret 40008310: 81 e8 00 00 restore /* * 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, 40008314: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40008318: bb 2f 20 02 sll %i4, 2, %i5 /* * 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, 4000831c: 40 00 1d bd call 4000fa10 40008320: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008324: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40008328: 94 10 00 1d mov %i5, %o2 4000832c: 40 00 1d b9 call 4000fa10 40008330: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40008334: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40008338: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 4000833c: 94 04 c0 0a add %l3, %o2, %o2 40008340: 90 10 00 14 mov %l4, %o0 40008344: 40 00 1d b3 call 4000fa10 40008348: 95 2a a0 02 sll %o2, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4000834c: 10 bf ff a1 b 400081d0 <_Objects_Extend_information+0x134> 40008350: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 40008354: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40008358: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 4000835c: ab 2d 60 10 sll %l5, 0x10, %l5 40008360: a2 10 00 13 mov %l3, %l1 40008364: b8 10 20 00 clr %i4 40008368: 10 bf ff 6c b 40008118 <_Objects_Extend_information+0x7c> 4000836c: a0 10 20 00 clr %l0 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40008370: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 40008374: 10 bf ff 69 b 40008118 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 40008378: a0 10 20 00 clr %l0 <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 4000837c: 40 00 08 27 call 4000a418 <_Workspace_Free> 40008380: 90 10 00 12 mov %l2, %o0 return; 40008384: 81 c7 e0 08 ret 40008388: 81 e8 00 00 restore =============================================================================== 40008438 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40008438: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 4000843c: 80 a6 60 00 cmp %i1, 0 40008440: 12 80 00 04 bne 40008450 <_Objects_Get_information+0x18> 40008444: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 40008448: 81 c7 e0 08 ret 4000844c: 91 e8 20 00 restore %g0, 0, %o0 /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40008450: 40 00 12 b1 call 4000cf14 <_Objects_API_maximum_class> 40008454: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 40008458: 80 a2 20 00 cmp %o0, 0 4000845c: 22 80 00 15 be,a 400084b0 <_Objects_Get_information+0x78> 40008460: b0 10 20 00 clr %i0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 40008464: 80 a6 40 08 cmp %i1, %o0 40008468: 38 80 00 12 bgu,a 400084b0 <_Objects_Get_information+0x78> 4000846c: b0 10 20 00 clr %i0 return NULL; if ( !_Objects_Information_table[ the_api ] ) 40008470: b1 2e 20 02 sll %i0, 2, %i0 40008474: 03 10 00 74 sethi %hi(0x4001d000), %g1 40008478: 82 10 63 50 or %g1, 0x350, %g1 ! 4001d350 <_Objects_Information_table> 4000847c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 40008480: 80 a0 60 00 cmp %g1, 0 40008484: 02 80 00 0b be 400084b0 <_Objects_Get_information+0x78> <== NEVER TAKEN 40008488: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 4000848c: b3 2e 60 02 sll %i1, 2, %i1 40008490: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 40008494: 80 a6 20 00 cmp %i0, 0 40008498: 02 80 00 06 be 400084b0 <_Objects_Get_information+0x78> <== NEVER TAKEN 4000849c: 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 ) 400084a0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400084a4: 80 a0 60 00 cmp %g1, 0 400084a8: 22 80 00 02 be,a 400084b0 <_Objects_Get_information+0x78> 400084ac: b0 10 20 00 clr %i0 return NULL; #endif return info; } 400084b0: 81 c7 e0 08 ret 400084b4: 81 e8 00 00 restore =============================================================================== 4000a220 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 4000a220: 9d e3 bf 90 save %sp, -112, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 4000a224: 80 a6 60 00 cmp %i1, 0 4000a228: 12 80 00 05 bne 4000a23c <_Objects_Get_name_as_string+0x1c> 4000a22c: 80 a6 a0 00 cmp %i2, 0 } } *d = '\0'; _Thread_Enable_dispatch(); return name; 4000a230: b4 10 20 00 clr %i2 } return NULL; /* unreachable path */ } 4000a234: 81 c7 e0 08 ret 4000a238: 91 e8 00 1a restore %g0, %i2, %o0 Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 4000a23c: 02 bf ff fe be 4000a234 <_Objects_Get_name_as_string+0x14> 4000a240: 80 a6 20 00 cmp %i0, 0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4000a244: 12 80 00 04 bne 4000a254 <_Objects_Get_name_as_string+0x34> 4000a248: 03 10 00 ae sethi %hi(0x4002b800), %g1 4000a24c: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 4002ba8c <_Thread_Executing> 4000a250: f0 00 60 08 ld [ %g1 + 8 ], %i0 information = _Objects_Get_information_id( tmpId ); 4000a254: 7f ff ff af call 4000a110 <_Objects_Get_information_id> 4000a258: 90 10 00 18 mov %i0, %o0 if ( !information ) 4000a25c: 80 a2 20 00 cmp %o0, 0 4000a260: 22 bf ff f5 be,a 4000a234 <_Objects_Get_name_as_string+0x14> 4000a264: b4 10 20 00 clr %i2 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 4000a268: 92 10 00 18 mov %i0, %o1 4000a26c: 40 00 00 2f call 4000a328 <_Objects_Get> 4000a270: 94 07 bf fc add %fp, -4, %o2 switch ( location ) { 4000a274: c2 07 bf fc ld [ %fp + -4 ], %g1 4000a278: 80 a0 60 00 cmp %g1, 0 4000a27c: 32 bf ff ee bne,a 4000a234 <_Objects_Get_name_as_string+0x14> 4000a280: b4 10 20 00 clr %i2 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 4000a284: c2 02 20 0c ld [ %o0 + 0xc ], %g1 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'; 4000a288: c0 2f bf f4 clrb [ %fp + -12 ] } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 4000a28c: 87 30 60 18 srl %g1, 0x18, %g3 lname[ 1 ] = (u32_name >> 16) & 0xff; 4000a290: 85 30 60 10 srl %g1, 0x10, %g2 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 4000a294: c2 2f bf f3 stb %g1, [ %fp + -13 ] #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4000a298: c4 2f bf f1 stb %g2, [ %fp + -15 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 4000a29c: 83 30 60 08 srl %g1, 8, %g1 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 4000a2a0: c6 2f bf f0 stb %g3, [ %fp + -16 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4000a2a4: c2 2f bf f2 stb %g1, [ %fp + -14 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4000a2a8: b2 86 7f ff addcc %i1, -1, %i1 4000a2ac: 02 80 00 1d be 4000a320 <_Objects_Get_name_as_string+0x100><== NEVER TAKEN 4000a2b0: 84 10 00 03 mov %g3, %g2 4000a2b4: 80 a0 e0 00 cmp %g3, 0 4000a2b8: 02 80 00 1a be 4000a320 <_Objects_Get_name_as_string+0x100> 4000a2bc: 17 10 00 8c sethi %hi(0x40023000), %o3 4000a2c0: 86 10 00 1a mov %i2, %g3 4000a2c4: 96 12 e2 b0 or %o3, 0x2b0, %o3 4000a2c8: 82 10 20 00 clr %g1 4000a2cc: 10 80 00 06 b 4000a2e4 <_Objects_Get_name_as_string+0xc4> 4000a2d0: 98 07 bf f0 add %fp, -16, %o4 4000a2d4: c8 4b 00 01 ldsb [ %o4 + %g1 ], %g4 4000a2d8: 80 a1 20 00 cmp %g4, 0 4000a2dc: 02 80 00 0e be 4000a314 <_Objects_Get_name_as_string+0xf4> 4000a2e0: c4 0b 00 01 ldub [ %o4 + %g1 ], %g2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 4000a2e4: da 02 c0 00 ld [ %o3 ], %o5 4000a2e8: 88 08 a0 ff and %g2, 0xff, %g4 4000a2ec: 88 03 40 04 add %o5, %g4, %g4 4000a2f0: c8 49 20 01 ldsb [ %g4 + 1 ], %g4 4000a2f4: 80 89 20 97 btst 0x97, %g4 4000a2f8: 12 80 00 03 bne 4000a304 <_Objects_Get_name_as_string+0xe4> 4000a2fc: 82 00 60 01 inc %g1 4000a300: 84 10 20 2a mov 0x2a, %g2 4000a304: c4 28 c0 00 stb %g2, [ %g3 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4000a308: 80 a0 40 19 cmp %g1, %i1 4000a30c: 0a bf ff f2 bcs 4000a2d4 <_Objects_Get_name_as_string+0xb4> 4000a310: 86 00 e0 01 inc %g3 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 4000a314: 40 00 02 3f call 4000ac10 <_Thread_Enable_dispatch> 4000a318: c0 28 c0 00 clrb [ %g3 ] return name; 4000a31c: 30 bf ff c6 b,a 4000a234 <_Objects_Get_name_as_string+0x14> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4000a320: 10 bf ff fd b 4000a314 <_Objects_Get_name_as_string+0xf4> 4000a324: 86 10 00 1a mov %i2, %g3 =============================================================================== 400199b4 <_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; 400199b4: c4 02 20 08 ld [ %o0 + 8 ], %g2 if ( information->maximum >= index ) { 400199b8: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1 /* * 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; 400199bc: 84 22 40 02 sub %o1, %g2, %g2 400199c0: 84 00 a0 01 inc %g2 if ( information->maximum >= index ) { 400199c4: 80 a0 80 01 cmp %g2, %g1 400199c8: 18 80 00 09 bgu 400199ec <_Objects_Get_no_protection+0x38> 400199cc: 85 28 a0 02 sll %g2, 2, %g2 if ( (the_object = information->local_table[ index ]) != NULL ) { 400199d0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400199d4: d0 00 40 02 ld [ %g1 + %g2 ], %o0 400199d8: 80 a2 20 00 cmp %o0, 0 400199dc: 02 80 00 05 be 400199f0 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 400199e0: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 400199e4: 81 c3 e0 08 retl 400199e8: 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; 400199ec: 82 10 20 01 mov 1, %g1 400199f0: 90 10 20 00 clr %o0 return NULL; } 400199f4: 81 c3 e0 08 retl 400199f8: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 40009ca8 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40009ca8: 9d e3 bf 98 save %sp, -104, %sp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40009cac: 92 96 20 00 orcc %i0, 0, %o1 40009cb0: 12 80 00 06 bne 40009cc8 <_Objects_Id_to_name+0x20> 40009cb4: 83 32 60 18 srl %o1, 0x18, %g1 40009cb8: 03 10 00 8b sethi %hi(0x40022c00), %g1 40009cbc: c2 00 62 2c ld [ %g1 + 0x22c ], %g1 ! 40022e2c <_Thread_Executing> 40009cc0: d2 00 60 08 ld [ %g1 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40009cc4: 83 32 60 18 srl %o1, 0x18, %g1 40009cc8: 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 ) 40009ccc: 84 00 7f ff add %g1, -1, %g2 40009cd0: 80 a0 a0 03 cmp %g2, 3 40009cd4: 18 80 00 18 bgu 40009d34 <_Objects_Id_to_name+0x8c> 40009cd8: 83 28 60 02 sll %g1, 2, %g1 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 40009cdc: 05 10 00 8b sethi %hi(0x40022c00), %g2 40009ce0: 84 10 a0 d0 or %g2, 0xd0, %g2 ! 40022cd0 <_Objects_Information_table> 40009ce4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40009ce8: 80 a0 60 00 cmp %g1, 0 40009cec: 02 80 00 12 be 40009d34 <_Objects_Id_to_name+0x8c> 40009cf0: 85 32 60 1b srl %o1, 0x1b, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 40009cf4: 85 28 a0 02 sll %g2, 2, %g2 40009cf8: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 40009cfc: 80 a2 20 00 cmp %o0, 0 40009d00: 02 80 00 0d be 40009d34 <_Objects_Id_to_name+0x8c> <== NEVER TAKEN 40009d04: 01 00 00 00 nop #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 40009d08: 7f ff ff cb call 40009c34 <_Objects_Get> 40009d0c: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 40009d10: 80 a2 20 00 cmp %o0, 0 40009d14: 02 80 00 08 be 40009d34 <_Objects_Id_to_name+0x8c> 40009d18: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 40009d1c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 40009d20: b0 10 20 00 clr %i0 40009d24: 40 00 02 51 call 4000a668 <_Thread_Enable_dispatch> 40009d28: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 40009d2c: 81 c7 e0 08 ret 40009d30: 81 e8 00 00 restore } 40009d34: 81 c7 e0 08 ret 40009d38: 91 e8 20 03 restore %g0, 3, %o0 =============================================================================== 400085a0 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 400085a0: 9d e3 bf a0 save %sp, -96, %sp information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400085a4: 05 10 00 74 sethi %hi(0x4001d000), %g2 400085a8: 83 2e 60 02 sll %i1, 2, %g1 400085ac: 84 10 a3 50 or %g2, 0x350, %g2 400085b0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 400085b4: 85 2f 20 10 sll %i4, 0x10, %g2 400085b8: 85 30 a0 10 srl %g2, 0x10, %g2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400085bc: 87 2e a0 02 sll %i2, 2, %g3 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 400085c0: c4 26 20 18 st %g2, [ %i0 + 0x18 ] information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400085c4: f0 20 40 03 st %i0, [ %g1 + %g3 ] /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 400085c8: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400085cc: 03 20 00 00 sethi %hi(0x80000000), %g1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 400085d0: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 400085d4: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 400085d8: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 400085dc: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 400085e0: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 400085e4: c0 36 20 2c clrh [ %i0 + 0x2c ] /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 400085e8: c0 36 20 10 clrh [ %i0 + 0x10 ] _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 400085ec: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400085f0: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 400085f4: 80 a0 a0 00 cmp %g2, 0 400085f8: 02 80 00 05 be 4000860c <_Objects_Initialize_information+0x6c> 400085fc: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 40008600: 80 a6 e0 00 cmp %i3, 0 40008604: 02 80 00 28 be 400086a4 <_Objects_Initialize_information+0x104> 40008608: 90 10 20 00 clr %o0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 4000860c: 07 10 00 74 sethi %hi(0x4001d000), %g3 40008610: 86 10 e0 5c or %g3, 0x5c, %g3 ! 4001d05c /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 40008614: 80 a0 00 1b cmp %g0, %i3 40008618: b3 2e 60 18 sll %i1, 0x18, %i1 4000861c: 84 40 20 00 addx %g0, 0, %g2 40008620: b5 2e a0 1b sll %i2, 0x1b, %i2 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 40008624: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 40008628: f6 36 20 14 sth %i3, [ %i0 + 0x14 ] /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4000862c: 07 00 00 40 sethi %hi(0x10000), %g3 40008630: b2 16 40 03 or %i1, %g3, %i1 40008634: b4 16 40 1a or %i1, %i2, %i2 40008638: b4 16 80 02 or %i2, %g2, %i2 4000863c: f4 26 20 08 st %i2, [ %i0 + 8 ] * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 40008640: 84 00 60 04 add %g1, 4, %g2 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 40008644: 80 88 60 03 btst 3, %g1 40008648: 02 80 00 0c be 40008678 <_Objects_Initialize_information+0xd8><== ALWAYS TAKEN 4000864c: 84 08 bf fc and %g2, -4, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40008650: 82 06 20 24 add %i0, 0x24, %g1 <== NOT EXECUTED name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 40008654: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED 40008658: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED the_chain->permanent_null = NULL; 4000865c: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 40008660: 82 06 20 20 add %i0, 0x20, %g1 <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 40008664: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40008668: 12 80 00 0d bne 4000869c <_Objects_Initialize_information+0xfc><== NOT EXECUTED 4000866c: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 40008670: 81 c7 e0 08 ret 40008674: 81 e8 00 00 restore /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 40008678: 84 10 00 01 mov %g1, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000867c: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 40008680: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 40008684: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 40008688: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 4000868c: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 40008690: 80 a6 e0 00 cmp %i3, 0 40008694: 02 bf ff f7 be 40008670 <_Objects_Initialize_information+0xd0> 40008698: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* * 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 ); 4000869c: 7f ff fe 80 call 4000809c <_Objects_Extend_information> 400086a0: 81 e8 00 00 restore /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 400086a4: 92 10 20 01 mov 1, %o1 400086a8: 7f ff fe 1e call 40007f20 <_Internal_error_Occurred> 400086ac: 94 10 20 14 mov 0x14, %o2 =============================================================================== 40008774 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40008774: 9d e3 bf a0 save %sp, -96, %sp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 40008778: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 4000877c: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 40008780: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40008784: 92 10 00 11 mov %l1, %o1 40008788: 40 00 3f fe call 40018780 <.udiv> 4000878c: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40008790: 80 a2 20 00 cmp %o0, 0 40008794: 02 80 00 12 be 400087dc <_Objects_Shrink_information+0x68><== NEVER TAKEN 40008798: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 4000879c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400087a0: c4 00 c0 00 ld [ %g3 ], %g2 400087a4: 80 a4 40 02 cmp %l1, %g2 400087a8: 12 80 00 09 bne 400087cc <_Objects_Shrink_information+0x58><== ALWAYS TAKEN 400087ac: 82 10 20 00 clr %g1 400087b0: 10 80 00 0d b 400087e4 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 400087b4: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400087b8: a0 04 00 11 add %l0, %l1, %l0 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 ] == 400087bc: 80 a4 40 02 cmp %l1, %g2 400087c0: 02 80 00 09 be 400087e4 <_Objects_Shrink_information+0x70> 400087c4: 84 04 a0 04 add %l2, 4, %g2 400087c8: a4 10 00 02 mov %g2, %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++ ) { 400087cc: 82 00 60 01 inc %g1 400087d0: 80 a2 00 01 cmp %o0, %g1 400087d4: 38 bf ff f9 bgu,a 400087b8 <_Objects_Shrink_information+0x44> 400087d8: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 400087dc: 81 c7 e0 08 ret 400087e0: 81 e8 00 00 restore information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 400087e4: 10 80 00 06 b 400087fc <_Objects_Shrink_information+0x88> 400087e8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 400087ec: 80 a4 60 00 cmp %l1, 0 400087f0: 22 80 00 12 be,a 40008838 <_Objects_Shrink_information+0xc4> 400087f4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400087f8: 90 10 00 11 mov %l1, %o0 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 400087fc: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 40008800: 80 a0 40 10 cmp %g1, %l0 40008804: 0a bf ff fa bcs 400087ec <_Objects_Shrink_information+0x78> 40008808: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 4000880c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 40008810: 84 04 00 02 add %l0, %g2, %g2 40008814: 80 a0 40 02 cmp %g1, %g2 40008818: 1a bf ff f6 bcc 400087f0 <_Objects_Shrink_information+0x7c> 4000881c: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 40008820: 40 00 10 05 call 4000c834 <_Chain_Extract> 40008824: 01 00 00 00 nop } } while ( the_object ); 40008828: 80 a4 60 00 cmp %l1, 0 4000882c: 12 bf ff f4 bne 400087fc <_Objects_Shrink_information+0x88><== ALWAYS TAKEN 40008830: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40008834: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40008838: 40 00 06 f8 call 4000a418 <_Workspace_Free> 4000883c: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008840: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40008844: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 40008848: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 4000884c: c4 16 20 14 lduh [ %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; information->inactive_per_block[ block ] = 0; 40008850: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 40008854: 84 20 c0 02 sub %g3, %g2, %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40008858: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4000885c: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 40008860: 81 c7 e0 08 ret 40008864: 81 e8 00 00 restore =============================================================================== 40007014 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 40007014: 9d e3 bf 98 save %sp, -104, %sp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 40007018: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000701c: 82 10 61 80 or %g1, 0x180, %g1 ! 4001c980 40007020: e0 00 60 2c ld [ %g1 + 0x2c ], %l0 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 40007024: 80 a4 20 00 cmp %l0, 0 40007028: 02 80 00 1a be 40007090 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 4000702c: e4 00 60 28 ld [ %g1 + 0x28 ], %l2 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 40007030: 80 a4 a0 00 cmp %l2, 0 40007034: 02 80 00 17 be 40007090 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN 40007038: a2 10 20 00 clr %l1 4000703c: a6 07 bf fc add %fp, -4, %l3 return_value = rtems_task_create( 40007040: d0 04 00 00 ld [ %l0 ], %o0 40007044: d2 04 20 08 ld [ %l0 + 8 ], %o1 40007048: d4 04 20 04 ld [ %l0 + 4 ], %o2 4000704c: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 40007050: d8 04 20 0c ld [ %l0 + 0xc ], %o4 40007054: 7f ff ff 6e call 40006e0c 40007058: 9a 10 00 13 mov %l3, %o5 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4000705c: 80 a2 20 00 cmp %o0, 0 40007060: 12 80 00 0f bne 4000709c <_RTEMS_tasks_Initialize_user_tasks_body+0x88> 40007064: 94 10 00 08 mov %o0, %o2 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 40007068: d0 07 bf fc ld [ %fp + -4 ], %o0 4000706c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 40007070: 40 00 00 0f call 400070ac 40007074: 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 ) ) 40007078: 80 a2 20 00 cmp %o0, 0 4000707c: 12 80 00 07 bne 40007098 <_RTEMS_tasks_Initialize_user_tasks_body+0x84> 40007080: a2 04 60 01 inc %l1 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 40007084: 80 a4 80 11 cmp %l2, %l1 40007088: 18 bf ff ee bgu 40007040 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c><== NEVER TAKEN 4000708c: a0 04 20 1c add %l0, 0x1c, %l0 40007090: 81 c7 e0 08 ret 40007094: 81 e8 00 00 restore id, 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 ); 40007098: 94 10 00 08 mov %o0, %o2 4000709c: 92 10 20 01 mov 1, %o1 400070a0: 40 00 03 a0 call 40007f20 <_Internal_error_Occurred> 400070a4: 90 10 20 01 mov 1, %o0 =============================================================================== 4000c5e4 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000c5e4: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4000c5e8: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 if ( !api ) 4000c5ec: 80 a4 20 00 cmp %l0, 0 4000c5f0: 02 80 00 1f be 4000c66c <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN 4000c5f4: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000c5f8: 7f ff d6 07 call 40001e14 4000c5fc: 01 00 00 00 nop signal_set = asr->signals_posted; 4000c600: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 4000c604: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 4000c608: 7f ff d6 07 call 40001e24 4000c60c: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000c610: 80 a4 60 00 cmp %l1, 0 4000c614: 32 80 00 04 bne,a 4000c624 <_RTEMS_tasks_Post_switch_extension+0x40><== ALWAYS TAKEN 4000c618: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4000c61c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c620: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c624: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c628: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c62c: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c630: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c634: 94 10 00 12 mov %l2, %o2 4000c638: 27 00 00 3f sethi %hi(0xfc00), %l3 4000c63c: 40 00 07 bf call 4000e538 4000c640: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000c644: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000c648: 9f c0 40 00 call %g1 4000c64c: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 4000c650: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c654: d0 07 bf fc ld [ %fp + -4 ], %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; 4000c658: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c65c: 92 14 e3 ff or %l3, 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; 4000c660: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c664: 40 00 07 b5 call 4000e538 4000c668: 94 10 00 12 mov %l2, %o2 4000c66c: 81 c7 e0 08 ret 4000c670: 81 e8 00 00 restore =============================================================================== 4000c508 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 4000c508: c2 02 21 6c ld [ %o0 + 0x16c ], %g1 while (tvp) { 4000c50c: 80 a0 60 00 cmp %g1, 0 4000c510: 22 80 00 0b be,a 4000c53c <_RTEMS_tasks_Switch_extension+0x34> 4000c514: c2 02 61 6c ld [ %o1 + 0x16c ], %g1 tvp->tval = *tvp->ptr; 4000c518: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->gval; 4000c51c: c6 00 60 08 ld [ %g1 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 4000c520: c8 00 80 00 ld [ %g2 ], %g4 4000c524: c8 20 60 0c st %g4, [ %g1 + 0xc ] *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; 4000c528: c2 00 40 00 ld [ %g1 ], %g1 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4000c52c: 80 a0 60 00 cmp %g1, 0 4000c530: 12 bf ff fa bne 4000c518 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN 4000c534: c6 20 80 00 st %g3, [ %g2 ] tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4000c538: c2 02 61 6c ld [ %o1 + 0x16c ], %g1 while (tvp) { 4000c53c: 80 a0 60 00 cmp %g1, 0 4000c540: 02 80 00 0a be 4000c568 <_RTEMS_tasks_Switch_extension+0x60> 4000c544: 01 00 00 00 nop tvp->gval = *tvp->ptr; 4000c548: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->tval; 4000c54c: c6 00 60 0c ld [ %g1 + 0xc ], %g3 tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; 4000c550: c8 00 80 00 ld [ %g2 ], %g4 4000c554: c8 20 60 08 st %g4, [ %g1 + 8 ] *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; 4000c558: c2 00 40 00 ld [ %g1 ], %g1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4000c55c: 80 a0 60 00 cmp %g1, 0 4000c560: 12 bf ff fa bne 4000c548 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN 4000c564: c6 20 80 00 st %g3, [ %g2 ] 4000c568: 81 c3 e0 08 retl =============================================================================== 4000834c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 4000834c: 9d e3 bf 98 save %sp, -104, %sp 40008350: 11 10 00 8c sethi %hi(0x40023000), %o0 40008354: 92 10 00 18 mov %i0, %o1 40008358: 90 12 21 90 or %o0, 0x190, %o0 4000835c: 40 00 07 e1 call 4000a2e0 <_Objects_Get> 40008360: 94 07 bf fc add %fp, -4, %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 ) { 40008364: c2 07 bf fc ld [ %fp + -4 ], %g1 40008368: 80 a0 60 00 cmp %g1, 0 4000836c: 12 80 00 16 bne 400083c4 <_Rate_monotonic_Timeout+0x78> <== NEVER TAKEN 40008370: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40008374: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40008378: 03 00 00 10 sethi %hi(0x4000), %g1 4000837c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40008380: 80 88 80 01 btst %g2, %g1 40008384: 22 80 00 08 be,a 400083a4 <_Rate_monotonic_Timeout+0x58> 40008388: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 the_thread->Wait.id == the_period->Object.id ) { 4000838c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40008390: c2 04 20 08 ld [ %l0 + 8 ], %g1 40008394: 80 a0 80 01 cmp %g2, %g1 40008398: 02 80 00 19 be 400083fc <_Rate_monotonic_Timeout+0xb0> 4000839c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 _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 ) { 400083a0: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 400083a4: 80 a0 60 01 cmp %g1, 1 400083a8: 02 80 00 09 be 400083cc <_Rate_monotonic_Timeout+0x80> 400083ac: 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; 400083b0: c2 24 20 38 st %g1, [ %l0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 400083b4: 03 10 00 8c sethi %hi(0x40023000), %g1 400083b8: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 40023300 <_Thread_Dispatch_disable_level> 400083bc: 84 00 bf ff add %g2, -1, %g2 400083c0: c4 20 63 00 st %g2, [ %g1 + 0x300 ] 400083c4: 81 c7 e0 08 ret 400083c8: 81 e8 00 00 restore _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; 400083cc: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 400083d0: 90 10 00 10 mov %l0, %o0 _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; 400083d4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 400083d8: 7f ff fe 24 call 40007c68 <_Rate_monotonic_Initiate_statistics> 400083dc: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400083e0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400083e4: 92 04 20 10 add %l0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400083e8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400083ec: 11 10 00 8c sethi %hi(0x40023000), %o0 400083f0: 40 00 0f 72 call 4000c1b8 <_Watchdog_Insert> 400083f4: 90 12 23 dc or %o0, 0x3dc, %o0 ! 400233dc <_Watchdog_Ticks_chain> 400083f8: 30 bf ff ef b,a 400083b4 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400083fc: 40 00 09 25 call 4000a890 <_Thread_Clear_state> 40008400: 92 12 63 f8 or %o1, 0x3f8, %o1 the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 40008404: 10 bf ff f5 b 400083d8 <_Rate_monotonic_Timeout+0x8c> 40008408: 90 10 00 10 mov %l0, %o0 =============================================================================== 40007ae0 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 40007ae0: 9d e3 bf 98 save %sp, -104, %sp /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 40007ae4: 05 10 00 75 sethi %hi(0x4001d400), %g2 40007ae8: c6 00 a1 44 ld [ %g2 + 0x144 ], %g3 ! 4001d544 <_Watchdog_Ticks_since_boot> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 40007aec: 03 10 00 72 sethi %hi(0x4001c800), %g1 40007af0: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 4001c9c4 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 40007af4: 86 00 e0 01 inc %g3 40007af8: c6 20 a1 44 st %g3, [ %g2 + 0x144 ] { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 40007afc: 87 28 60 07 sll %g1, 7, %g3 40007b00: 85 28 60 02 sll %g1, 2, %g2 40007b04: 84 20 c0 02 sub %g3, %g2, %g2 40007b08: 82 00 80 01 add %g2, %g1, %g1 40007b0c: 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 */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 40007b10: a0 07 bf f8 add %fp, -8, %l0 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 40007b14: c2 27 bf fc st %g1, [ %fp + -4 ] /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 40007b18: 92 10 00 10 mov %l0, %o1 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 40007b1c: c0 27 bf f8 clr [ %fp + -8 ] /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 40007b20: 11 10 00 75 sethi %hi(0x4001d400), %o0 40007b24: 40 00 08 6b call 40009cd0 <_Timespec_Add_to> 40007b28: 90 12 20 70 or %o0, 0x70, %o0 ! 4001d470 <_TOD_Uptime> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 40007b2c: 92 10 00 10 mov %l0, %o1 40007b30: 11 10 00 75 sethi %hi(0x4001d400), %o0 40007b34: 40 00 08 67 call 40009cd0 <_Timespec_Add_to> 40007b38: 90 12 20 80 or %o0, 0x80, %o0 ! 4001d480 <_TOD_Now> while ( seconds ) { 40007b3c: a0 92 20 00 orcc %o0, 0, %l0 40007b40: 02 80 00 08 be 40007b60 <_TOD_Tickle_ticks+0x80> 40007b44: 23 10 00 75 sethi %hi(0x4001d400), %l1 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 40007b48: a2 14 60 c0 or %l1, 0xc0, %l1 ! 4001d4c0 <_Watchdog_Seconds_chain> 40007b4c: 40 00 09 f1 call 4000a310 <_Watchdog_Tickle> 40007b50: 90 10 00 11 mov %l1, %o0 40007b54: a0 84 3f ff addcc %l0, -1, %l0 40007b58: 12 bf ff fd bne 40007b4c <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN 40007b5c: 01 00 00 00 nop 40007b60: 81 c7 e0 08 ret 40007b64: 81 e8 00 00 restore =============================================================================== 40007cc4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 40007cc4: 9d e3 bf a0 save %sp, -96, %sp uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 40007cc8: 03 10 00 8c sethi %hi(0x40023000), %g1 if ((!the_tod) || 40007ccc: 80 a6 20 00 cmp %i0, 0 40007cd0: 02 80 00 2e be 40007d88 <_TOD_Validate+0xc4> <== NEVER TAKEN 40007cd4: d2 00 61 b4 ld [ %g1 + 0x1b4 ], %o1 40007cd8: 11 00 03 d0 sethi %hi(0xf4000), %o0 40007cdc: 40 00 57 df call 4001dc58 <.udiv> 40007ce0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 (the_tod->ticks >= ticks_per_second) || 40007ce4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40007ce8: 80 a2 00 01 cmp %o0, %g1 40007cec: 08 80 00 27 bleu 40007d88 <_TOD_Validate+0xc4> 40007cf0: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 40007cf4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007cf8: 80 a0 60 3b cmp %g1, 0x3b 40007cfc: 18 80 00 23 bgu 40007d88 <_TOD_Validate+0xc4> 40007d00: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 40007d04: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40007d08: 80 a0 60 3b cmp %g1, 0x3b 40007d0c: 18 80 00 1f bgu 40007d88 <_TOD_Validate+0xc4> 40007d10: 01 00 00 00 nop (the_tod->hour >= TOD_HOURS_PER_DAY) || 40007d14: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40007d18: 80 a0 60 17 cmp %g1, 0x17 40007d1c: 18 80 00 1b bgu 40007d88 <_TOD_Validate+0xc4> 40007d20: 01 00 00 00 nop (the_tod->month == 0) || 40007d24: c2 06 20 04 ld [ %i0 + 4 ], %g1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 40007d28: 80 a0 60 00 cmp %g1, 0 40007d2c: 02 80 00 17 be 40007d88 <_TOD_Validate+0xc4> <== NEVER TAKEN 40007d30: 80 a0 60 0c cmp %g1, 0xc 40007d34: 18 80 00 15 bgu 40007d88 <_TOD_Validate+0xc4> 40007d38: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 40007d3c: c4 06 00 00 ld [ %i0 ], %g2 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 40007d40: 80 a0 a7 c3 cmp %g2, 0x7c3 40007d44: 08 80 00 11 bleu 40007d88 <_TOD_Validate+0xc4> 40007d48: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 40007d4c: c6 06 20 08 ld [ %i0 + 8 ], %g3 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 40007d50: 80 a0 e0 00 cmp %g3, 0 40007d54: 02 80 00 0d be 40007d88 <_TOD_Validate+0xc4> <== NEVER TAKEN 40007d58: 80 88 a0 03 btst 3, %g2 (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 ) 40007d5c: 32 80 00 0d bne,a 40007d90 <_TOD_Validate+0xcc> 40007d60: 83 28 60 02 sll %g1, 2, %g1 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 40007d64: 82 00 60 0d add %g1, 0xd, %g1 40007d68: 05 10 00 86 sethi %hi(0x40021800), %g2 40007d6c: 83 28 60 02 sll %g1, 2, %g1 40007d70: 84 10 a2 dc or %g2, 0x2dc, %g2 40007d74: c2 00 80 01 ld [ %g2 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 40007d78: 80 a0 40 03 cmp %g1, %g3 40007d7c: b0 60 3f ff subx %g0, -1, %i0 40007d80: 81 c7 e0 08 ret 40007d84: 81 e8 00 00 restore if ( the_tod->day > days_in_month ) return false; return true; } 40007d88: 81 c7 e0 08 ret 40007d8c: 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 ]; 40007d90: 05 10 00 86 sethi %hi(0x40021800), %g2 40007d94: 84 10 a2 dc or %g2, 0x2dc, %g2 ! 40021adc <_TOD_Days_per_month> 40007d98: 10 bf ff f8 b 40007d78 <_TOD_Validate+0xb4> 40007d9c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 =============================================================================== 400088cc <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 400088cc: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 400088d0: 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 ); 400088d4: 40 00 04 49 call 400099f8 <_Thread_Set_transient> 400088d8: 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 ) 400088dc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400088e0: 80 a0 40 19 cmp %g1, %i1 400088e4: 02 80 00 05 be 400088f8 <_Thread_Change_priority+0x2c> 400088e8: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 400088ec: 92 10 00 19 mov %i1, %o1 400088f0: 40 00 03 c6 call 40009808 <_Thread_Set_priority> 400088f4: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 400088f8: 7f ff e5 47 call 40001e14 400088fc: 01 00 00 00 nop 40008900: 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; 40008904: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 40008908: 80 a4 a0 04 cmp %l2, 4 4000890c: 02 80 00 18 be 4000896c <_Thread_Change_priority+0xa0> 40008910: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 40008914: 02 80 00 0b be 40008940 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN 40008918: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 4000891c: 7f ff e5 42 call 40001e24 <== NOT EXECUTED 40008920: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 40008924: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 40008928: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 4000892c: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 40008930: 32 80 00 0d bne,a 40008964 <_Thread_Change_priority+0x98><== NOT EXECUTED 40008934: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 40008938: 81 c7 e0 08 ret 4000893c: 81 e8 00 00 restore */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 40008940: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 40008944: 7f ff e5 38 call 40001e24 40008948: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 4000894c: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008950: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40008954: 80 8c 80 01 btst %l2, %g1 40008958: 02 bf ff f8 be 40008938 <_Thread_Change_priority+0x6c> 4000895c: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 40008960: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 40008964: 40 00 03 79 call 40009748 <_Thread_queue_Requeue> 40008968: 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 ) ) { 4000896c: 12 80 00 14 bne 400089bc <_Thread_Change_priority+0xf0> <== NEVER TAKEN 40008970: 23 10 00 75 sethi %hi(0x4001d400), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40008974: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40008978: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 4000897c: c6 10 40 00 lduh [ %g1 ], %g3 * 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 ); 40008980: c0 24 20 10 clr [ %l0 + 0x10 ] 40008984: 84 10 c0 02 or %g3, %g2, %g2 40008988: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 4000898c: c4 14 60 a0 lduh [ %l1 + 0xa0 ], %g2 40008990: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 40008994: 80 8e a0 ff btst 0xff, %i2 40008998: 82 10 80 01 or %g2, %g1, %g1 4000899c: c2 34 60 a0 sth %g1, [ %l1 + 0xa0 ] 400089a0: 02 80 00 48 be 40008ac0 <_Thread_Change_priority+0x1f4> 400089a4: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400089a8: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400089ac: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 400089b0: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 400089b4: 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; 400089b8: 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 ); 400089bc: 7f ff e5 1a call 40001e24 400089c0: 90 10 00 18 mov %i0, %o0 400089c4: 7f ff e5 14 call 40001e14 400089c8: 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 ); 400089cc: c2 14 60 a0 lduh [ %l1 + 0xa0 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 400089d0: 05 10 00 74 sethi %hi(0x4001d000), %g2 400089d4: 83 28 60 10 sll %g1, 0x10, %g1 400089d8: da 00 a3 44 ld [ %g2 + 0x344 ], %o5 400089dc: 85 30 60 10 srl %g1, 0x10, %g2 400089e0: 80 a0 a0 ff cmp %g2, 0xff 400089e4: 08 80 00 27 bleu 40008a80 <_Thread_Change_priority+0x1b4> 400089e8: 07 10 00 6e sethi %hi(0x4001b800), %g3 400089ec: 83 30 60 18 srl %g1, 0x18, %g1 400089f0: 86 10 e3 60 or %g3, 0x360, %g3 400089f4: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 400089f8: 09 10 00 75 sethi %hi(0x4001d400), %g4 400089fc: 85 28 a0 10 sll %g2, 0x10, %g2 40008a00: 88 11 21 20 or %g4, 0x120, %g4 40008a04: 83 30 a0 0f srl %g2, 0xf, %g1 40008a08: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008a0c: 83 28 60 10 sll %g1, 0x10, %g1 40008a10: 89 30 60 10 srl %g1, 0x10, %g4 40008a14: 80 a1 20 ff cmp %g4, 0xff 40008a18: 18 80 00 28 bgu 40008ab8 <_Thread_Change_priority+0x1ec> 40008a1c: 83 30 60 18 srl %g1, 0x18, %g1 40008a20: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008a24: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008a28: 85 30 a0 0c srl %g2, 0xc, %g2 40008a2c: 83 28 60 10 sll %g1, 0x10, %g1 40008a30: 83 30 60 10 srl %g1, 0x10, %g1 40008a34: 82 00 40 02 add %g1, %g2, %g1 40008a38: 85 28 60 04 sll %g1, 4, %g2 40008a3c: 83 28 60 02 sll %g1, 2, %g1 40008a40: 82 20 80 01 sub %g2, %g1, %g1 40008a44: c2 03 40 01 ld [ %o5 + %g1 ], %g1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 40008a48: 05 10 00 75 sethi %hi(0x4001d400), %g2 40008a4c: c4 00 a0 ac ld [ %g2 + 0xac ], %g2 ! 4001d4ac <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008a50: 07 10 00 75 sethi %hi(0x4001d400), %g3 * 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() && 40008a54: 80 a0 40 02 cmp %g1, %g2 40008a58: 02 80 00 08 be 40008a78 <_Thread_Change_priority+0x1ac> 40008a5c: c2 20 e0 7c st %g1, [ %g3 + 0x7c ] _Thread_Executing->is_preemptible ) 40008a60: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 40008a64: 80 a0 60 00 cmp %g1, 0 40008a68: 02 80 00 04 be 40008a78 <_Thread_Change_priority+0x1ac> 40008a6c: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 40008a70: 03 10 00 75 sethi %hi(0x4001d400), %g1 40008a74: c4 28 60 bc stb %g2, [ %g1 + 0xbc ] ! 4001d4bc <_Context_Switch_necessary> _ISR_Enable( level ); 40008a78: 7f ff e4 eb call 40001e24 40008a7c: 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 ); 40008a80: 86 10 e3 60 or %g3, 0x360, %g3 40008a84: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a88: 09 10 00 75 sethi %hi(0x4001d400), %g4 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 ); 40008a8c: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a90: 88 11 21 20 or %g4, 0x120, %g4 40008a94: 85 28 a0 10 sll %g2, 0x10, %g2 40008a98: 83 30 a0 0f srl %g2, 0xf, %g1 40008a9c: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008aa0: 83 28 60 10 sll %g1, 0x10, %g1 40008aa4: 89 30 60 10 srl %g1, 0x10, %g4 40008aa8: 80 a1 20 ff cmp %g4, 0xff 40008aac: 28 bf ff de bleu,a 40008a24 <_Thread_Change_priority+0x158> 40008ab0: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008ab4: 83 30 60 18 srl %g1, 0x18, %g1 40008ab8: 10 bf ff dc b 40008a28 <_Thread_Change_priority+0x15c> 40008abc: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008ac0: 84 00 60 04 add %g1, 4, %g2 40008ac4: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 40008ac8: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 40008acc: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008ad0: c4 24 20 04 st %g2, [ %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; 40008ad4: 10 bf ff ba b 400089bc <_Thread_Change_priority+0xf0> 40008ad8: e0 20 80 00 st %l0, [ %g2 ] =============================================================================== 40008adc <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 40008adc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 40008ae0: 7f ff e4 cd call 40001e14 40008ae4: a0 10 00 18 mov %i0, %l0 40008ae8: b0 10 00 08 mov %o0, %i0 current_state = the_thread->current_state; 40008aec: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & state ) { 40008af0: 80 8e 40 01 btst %i1, %g1 40008af4: 02 80 00 06 be 40008b0c <_Thread_Clear_state+0x30> 40008af8: 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); 40008afc: b2 28 40 19 andn %g1, %i1, %i1 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 40008b00: 80 a6 60 00 cmp %i1, 0 40008b04: 02 80 00 04 be 40008b14 <_Thread_Clear_state+0x38> 40008b08: f2 24 20 10 st %i1, [ %l0 + 0x10 ] the_thread->current_priority == 0 ) _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 40008b0c: 7f ff e4 c6 call 40001e24 40008b10: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40008b14: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 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); 40008b18: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 40008b1c: c8 10 80 00 lduh [ %g2 ], %g4 40008b20: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 40008b24: 86 11 00 03 or %g4, %g3, %g3 40008b28: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008b2c: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 40008b30: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 40008b34: c4 24 00 00 st %g2, [ %l0 ] 40008b38: 07 10 00 75 sethi %hi(0x4001d400), %g3 old_last_node = the_chain->last; 40008b3c: c4 00 60 08 ld [ %g1 + 8 ], %g2 40008b40: da 10 e0 a0 lduh [ %g3 + 0xa0 ], %o5 the_chain->last = the_node; 40008b44: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008b48: c4 24 20 04 st %g2, [ %l0 + 4 ] 40008b4c: 82 13 40 04 or %o5, %g4, %g1 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; 40008b50: e0 20 80 00 st %l0, [ %g2 ] 40008b54: c2 30 e0 a0 sth %g1, [ %g3 + 0xa0 ] _ISR_Flash( level ); 40008b58: 7f ff e4 b3 call 40001e24 40008b5c: 01 00 00 00 nop 40008b60: 7f ff e4 ad call 40001e14 40008b64: 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 ) { 40008b68: 03 10 00 75 sethi %hi(0x4001d400), %g1 40008b6c: c6 00 60 7c ld [ %g1 + 0x7c ], %g3 ! 4001d47c <_Thread_Heir> 40008b70: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 40008b74: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 40008b78: 80 a0 80 03 cmp %g2, %g3 40008b7c: 1a bf ff e4 bcc 40008b0c <_Thread_Clear_state+0x30> 40008b80: 07 10 00 75 sethi %hi(0x4001d400), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 40008b84: c6 00 e0 ac ld [ %g3 + 0xac ], %g3 ! 4001d4ac <_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; 40008b88: e0 20 60 7c st %l0, [ %g1 + 0x7c ] if ( _Thread_Executing->is_preemptible || 40008b8c: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 40008b90: 80 a0 60 00 cmp %g1, 0 40008b94: 32 80 00 05 bne,a 40008ba8 <_Thread_Clear_state+0xcc> 40008b98: 84 10 20 01 mov 1, %g2 40008b9c: 80 a0 a0 00 cmp %g2, 0 40008ba0: 12 bf ff db bne 40008b0c <_Thread_Clear_state+0x30> <== ALWAYS TAKEN 40008ba4: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 40008ba8: 03 10 00 75 sethi %hi(0x4001d400), %g1 40008bac: c4 28 60 bc stb %g2, [ %g1 + 0xbc ] ! 4001d4bc <_Context_Switch_necessary> } } } _ISR_Enable( level ); 40008bb0: 7f ff e4 9d call 40001e24 40008bb4: 81 e8 00 00 restore =============================================================================== 40008d34 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 40008d34: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 40008d38: 90 10 00 18 mov %i0, %o0 40008d3c: 40 00 00 72 call 40008f04 <_Thread_Get> 40008d40: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 40008d44: c2 07 bf fc ld [ %fp + -4 ], %g1 40008d48: 80 a0 60 00 cmp %g1, 0 40008d4c: 12 80 00 08 bne 40008d6c <_Thread_Delay_ended+0x38> <== NEVER TAKEN 40008d50: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 40008d54: 7f ff ff 62 call 40008adc <_Thread_Clear_state> 40008d58: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 40008d5c: 03 10 00 74 sethi %hi(0x4001d000), %g1 40008d60: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4001d3f0 <_Thread_Dispatch_disable_level> 40008d64: 84 00 bf ff add %g2, -1, %g2 40008d68: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ] 40008d6c: 81 c7 e0 08 ret 40008d70: 81 e8 00 00 restore =============================================================================== 40008d74 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 40008d74: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 40008d78: 2b 10 00 75 sethi %hi(0x4001d400), %l5 _ISR_Disable( level ); 40008d7c: 7f ff e4 26 call 40001e14 40008d80: e2 05 60 ac ld [ %l5 + 0xac ], %l1 ! 4001d4ac <_Thread_Executing> while ( _Context_Switch_necessary == true ) { 40008d84: 2d 10 00 75 sethi %hi(0x4001d400), %l6 40008d88: c2 0d a0 bc ldub [ %l6 + 0xbc ], %g1 ! 4001d4bc <_Context_Switch_necessary> 40008d8c: 80 a0 60 00 cmp %g1, 0 40008d90: 02 80 00 3f be 40008e8c <_Thread_Dispatch+0x118> 40008d94: 31 10 00 74 sethi %hi(0x4001d000), %i0 40008d98: 35 10 00 75 sethi %hi(0x4001d400), %i2 40008d9c: 25 10 00 75 sethi %hi(0x4001d400), %l2 40008da0: 37 10 00 75 sethi %hi(0x4001d400), %i3 40008da4: a4 14 a0 b4 or %l2, 0xb4, %l2 #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; 40008da8: 33 10 00 74 sethi %hi(0x4001d000), %i1 40008dac: ac 15 a0 bc or %l6, 0xbc, %l6 40008db0: aa 15 60 ac or %l5, 0xac, %l5 40008db4: b4 16 a0 7c or %i2, 0x7c, %i2 40008db8: b6 16 e0 78 or %i3, 0x78, %i3 40008dbc: b2 16 63 48 or %i1, 0x348, %i1 40008dc0: b8 16 23 f0 or %i0, 0x3f0, %i4 40008dc4: a8 07 bf f8 add %fp, -8, %l4 40008dc8: a6 07 bf f0 add %fp, -16, %l3 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 40008dcc: ba 10 20 01 mov 1, %i5 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 40008dd0: 10 80 00 25 b 40008e64 <_Thread_Dispatch+0xf0> 40008dd4: ae 10 00 12 mov %l2, %l7 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 ); 40008dd8: 7f ff e4 13 call 40001e24 40008ddc: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 40008de0: 40 00 0f 3e call 4000cad8 <_TOD_Get_uptime> 40008de4: 90 10 00 14 mov %l4, %o0 _Timestamp_Subtract( 40008de8: 90 10 00 17 mov %l7, %o0 40008dec: 92 10 00 14 mov %l4, %o1 40008df0: 40 00 03 d1 call 40009d34 <_Timespec_Subtract> 40008df4: 94 10 00 13 mov %l3, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 40008df8: 92 10 00 13 mov %l3, %o1 40008dfc: 40 00 03 b5 call 40009cd0 <_Timespec_Add_to> 40008e00: 90 04 60 84 add %l1, 0x84, %o0 _Thread_Time_of_last_context_switch = uptime; 40008e04: c4 07 bf f8 ld [ %fp + -8 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 40008e08: c2 06 c0 00 ld [ %i3 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 40008e0c: c4 24 80 00 st %g2, [ %l2 ] 40008e10: c4 07 bf fc ld [ %fp + -4 ], %g2 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 40008e14: 90 10 00 11 mov %l1, %o0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 40008e18: c4 24 a0 04 st %g2, [ %l2 + 4 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 40008e1c: 80 a0 60 00 cmp %g1, 0 40008e20: 02 80 00 06 be 40008e38 <_Thread_Dispatch+0xc4> <== NEVER TAKEN 40008e24: 92 10 00 10 mov %l0, %o1 executing->libc_reent = *_Thread_libc_reent; 40008e28: c4 00 40 00 ld [ %g1 ], %g2 40008e2c: c4 24 61 58 st %g2, [ %l1 + 0x158 ] *_Thread_libc_reent = heir->libc_reent; 40008e30: c4 04 21 58 ld [ %l0 + 0x158 ], %g2 40008e34: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 40008e38: 40 00 04 81 call 4000a03c <_User_extensions_Thread_switch> 40008e3c: 01 00 00 00 nop if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 40008e40: 90 04 60 d0 add %l1, 0xd0, %o0 40008e44: 40 00 05 98 call 4000a4a4 <_CPU_Context_switch> 40008e48: 92 04 20 d0 add %l0, 0xd0, %o1 #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 40008e4c: 7f ff e3 f2 call 40001e14 40008e50: e2 05 40 00 ld [ %l5 ], %l1 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 40008e54: c2 0d 80 00 ldub [ %l6 ], %g1 40008e58: 80 a0 60 00 cmp %g1, 0 40008e5c: 02 80 00 0c be 40008e8c <_Thread_Dispatch+0x118> 40008e60: 01 00 00 00 nop heir = _Thread_Heir; 40008e64: e0 06 80 00 ld [ %i2 ], %l0 _Thread_Dispatch_disable_level = 1; 40008e68: fa 27 00 00 st %i5, [ %i4 ] _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 ) 40008e6c: 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; 40008e70: c0 2d 80 00 clrb [ %l6 ] _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 ) 40008e74: 80 a0 60 01 cmp %g1, 1 40008e78: 12 bf ff d8 bne 40008dd8 <_Thread_Dispatch+0x64> 40008e7c: e0 25 40 00 st %l0, [ %l5 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 40008e80: c2 06 40 00 ld [ %i1 ], %g1 40008e84: 10 bf ff d5 b 40008dd8 <_Thread_Dispatch+0x64> 40008e88: c2 24 20 78 st %g1, [ %l0 + 0x78 ] executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 40008e8c: c0 26 23 f0 clr [ %i0 + 0x3f0 ] _ISR_Enable( level ); 40008e90: 7f ff e3 e5 call 40001e24 40008e94: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 40008e98: 03 10 00 75 sethi %hi(0x4001d400), %g1 40008e9c: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 4001d490 <_Thread_Do_post_task_switch_extension> 40008ea0: 80 a0 60 00 cmp %g1, 0 40008ea4: 12 80 00 06 bne 40008ebc <_Thread_Dispatch+0x148> <== NEVER TAKEN 40008ea8: 01 00 00 00 nop executing->do_post_task_switch_extension ) { 40008eac: c2 0c 60 74 ldub [ %l1 + 0x74 ], %g1 40008eb0: 80 a0 60 00 cmp %g1, 0 40008eb4: 02 80 00 04 be 40008ec4 <_Thread_Dispatch+0x150> 40008eb8: 01 00 00 00 nop executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 40008ebc: 7f ff f9 8f call 400074f8 <_API_extensions_Run_postswitch> 40008ec0: c0 2c 60 74 clrb [ %l1 + 0x74 ] 40008ec4: 81 c7 e0 08 ret 40008ec8: 81 e8 00 00 restore =============================================================================== 4000e9a0 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4000e9a0: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000e9a4: c2 00 60 ac ld [ %g1 + 0xac ], %g1 ! 4001d4ac <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 4000e9a8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000e9ac: 80 a0 a0 00 cmp %g2, 0 4000e9b0: 12 80 00 0b bne 4000e9dc <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 4000e9b4: 84 10 20 01 mov 1, %g2 4000e9b8: 05 10 00 75 sethi %hi(0x4001d400), %g2 4000e9bc: c4 00 a0 7c ld [ %g2 + 0x7c ], %g2 ! 4001d47c <_Thread_Heir> 4000e9c0: 80 a0 40 02 cmp %g1, %g2 4000e9c4: 02 80 00 0b be 4000e9f0 <_Thread_Evaluate_mode+0x50> 4000e9c8: 01 00 00 00 nop ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4000e9cc: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 4000e9d0: 80 a0 60 00 cmp %g1, 0 4000e9d4: 02 80 00 07 be 4000e9f0 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 4000e9d8: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 4000e9dc: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000e9e0: 90 10 20 01 mov 1, %o0 4000e9e4: c4 28 60 bc stb %g2, [ %g1 + 0xbc ] return true; 4000e9e8: 81 c3 e0 08 retl 4000e9ec: 01 00 00 00 nop } return false; } 4000e9f0: 81 c3 e0 08 retl 4000e9f4: 90 10 20 00 clr %o0 ! 0 =============================================================================== 4000e9f8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000e9f8: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4000e9fc: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000ea00: e0 00 60 ac ld [ %g1 + 0xac ], %l0 ! 4001d4ac <_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(); 4000ea04: 3f 10 00 3a sethi %hi(0x4000e800), %i7 4000ea08: be 17 e1 f8 or %i7, 0x1f8, %i7 ! 4000e9f8 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000ea0c: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 4000ea10: 7f ff cd 05 call 40001e24 4000ea14: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4000ea18: 03 10 00 74 sethi %hi(0x4001d000), %g1 doneConstructors = 1; 4000ea1c: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4000ea20: e2 08 60 6c ldub [ %g1 + 0x6c ], %l1 /* * 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 ); 4000ea24: 90 10 00 10 mov %l0, %o0 4000ea28: 7f ff ed 07 call 40009e44 <_User_extensions_Thread_begin> 4000ea2c: c4 28 60 6c stb %g2, [ %g1 + 0x6c ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000ea30: 7f ff e9 27 call 40008ecc <_Thread_Enable_dispatch> 4000ea34: a3 2c 60 18 sll %l1, 0x18, %l1 /* * _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) */ { 4000ea38: 80 a4 60 00 cmp %l1, 0 4000ea3c: 02 80 00 0c be 4000ea6c <_Thread_Handler+0x74> 4000ea40: 01 00 00 00 nop INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4000ea44: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4000ea48: 80 a0 60 00 cmp %g1, 0 4000ea4c: 22 80 00 0f be,a 4000ea88 <_Thread_Handler+0x90> <== ALWAYS TAKEN 4000ea50: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 * 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 ); 4000ea54: 7f ff ed 10 call 40009e94 <_User_extensions_Thread_exitted> 4000ea58: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 4000ea5c: 90 10 20 00 clr %o0 4000ea60: 92 10 20 01 mov 1, %o1 4000ea64: 7f ff e5 2f call 40007f20 <_Internal_error_Occurred> 4000ea68: 94 10 20 06 mov 6, %o2 * _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) */ { INIT_NAME (); 4000ea6c: 40 00 37 93 call 4001c8b8 <_init> 4000ea70: 01 00 00 00 nop } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4000ea74: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4000ea78: 80 a0 60 00 cmp %g1, 0 4000ea7c: 12 bf ff f6 bne 4000ea54 <_Thread_Handler+0x5c> <== NEVER TAKEN 4000ea80: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4000ea84: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 4000ea88: 9f c0 40 00 call %g1 4000ea8c: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4000ea90: 10 bf ff f1 b 4000ea54 <_Thread_Handler+0x5c> 4000ea94: d0 24 20 28 st %o0, [ %l0 + 0x28 ] =============================================================================== 40008fb0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008fb0: 9d e3 bf a0 save %sp, -96, %sp 40008fb4: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 40008fb8: c0 26 61 5c clr [ %i1 + 0x15c ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008fbc: e2 00 40 00 ld [ %g1 ], %l1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 40008fc0: c0 26 61 60 clr [ %i1 + 0x160 ] 40008fc4: c0 26 61 64 clr [ %i1 + 0x164 ] extensions_area = NULL; the_thread->libc_reent = NULL; 40008fc8: c0 26 61 58 clr [ %i1 + 0x158 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008fcc: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40008fd0: 90 10 00 19 mov %i1, %o0 40008fd4: 40 00 02 ad call 40009a88 <_Thread_Stack_Allocate> 40008fd8: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40008fdc: 80 a6 c0 08 cmp %i3, %o0 40008fe0: 18 80 00 4f bgu 4000911c <_Thread_Initialize+0x16c> 40008fe4: 80 a2 20 00 cmp %o0, 0 40008fe8: 02 80 00 4d be 4000911c <_Thread_Initialize+0x16c> <== NEVER TAKEN 40008fec: 25 10 00 75 sethi %hi(0x4001d400), %l2 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40008ff0: c4 06 60 c8 ld [ %i1 + 0xc8 ], %g2 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008ff4: c2 04 a0 8c ld [ %l2 + 0x8c ], %g1 40008ff8: c4 26 60 c4 st %g2, [ %i1 + 0xc4 ] the_stack->size = size; 40008ffc: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40009000: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40009004: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40009008: c0 26 60 68 clr [ %i1 + 0x68 ] 4000900c: 80 a0 60 00 cmp %g1, 0 40009010: 12 80 00 45 bne 40009124 <_Thread_Initialize+0x174> 40009014: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 40009018: c0 26 61 68 clr [ %i1 + 0x168 ] 4000901c: b6 10 20 00 clr %i3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 40009020: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40009024: 92 10 00 1d mov %i5, %o1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 40009028: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ] the_thread->Start.budget_callout = budget_callout; 4000902c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40009030: 90 10 00 19 mov %i1, %o0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40009034: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 40009038: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 4000903c: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 40009040: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40009044: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; 40009048: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 4000904c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 40009050: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 40009054: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40009058: 40 00 01 ec call 40009808 <_Thread_Set_priority> 4000905c: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40009060: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 40009064: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40009068: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000906c: e2 26 60 0c st %l1, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40009070: f2 20 80 01 st %i1, [ %g2 + %g1 ] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 40009074: c0 26 60 84 clr [ %i1 + 0x84 ] 40009078: c0 26 60 88 clr [ %i1 + 0x88 ] * 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 ); 4000907c: 90 10 00 19 mov %i1, %o0 40009080: 40 00 03 ac call 40009f30 <_User_extensions_Thread_create> 40009084: b0 10 20 01 mov 1, %i0 if ( extension_status ) 40009088: 80 8a 20 ff btst 0xff, %o0 4000908c: 12 80 00 22 bne 40009114 <_Thread_Initialize+0x164> 40009090: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 40009094: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 40009098: 80 a2 20 00 cmp %o0, 0 4000909c: 22 80 00 05 be,a 400090b0 <_Thread_Initialize+0x100> 400090a0: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( the_thread->libc_reent ); 400090a4: 40 00 04 dd call 4000a418 <_Workspace_Free> 400090a8: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 400090ac: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 400090b0: 80 a2 20 00 cmp %o0, 0 400090b4: 22 80 00 05 be,a 400090c8 <_Thread_Initialize+0x118> 400090b8: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 400090bc: 40 00 04 d7 call 4000a418 <_Workspace_Free> 400090c0: 01 00 00 00 nop failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 400090c4: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 400090c8: 80 a2 20 00 cmp %o0, 0 400090cc: 22 80 00 05 be,a 400090e0 <_Thread_Initialize+0x130> <== ALWAYS TAKEN 400090d0: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 400090d4: 40 00 04 d1 call 4000a418 <_Workspace_Free> <== NOT EXECUTED 400090d8: 01 00 00 00 nop <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 400090dc: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 <== NOT EXECUTED 400090e0: 80 a2 20 00 cmp %o0, 0 400090e4: 02 80 00 05 be 400090f8 <_Thread_Initialize+0x148> <== ALWAYS TAKEN 400090e8: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 400090ec: 40 00 04 cb call 4000a418 <_Workspace_Free> <== NOT EXECUTED 400090f0: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 400090f4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 400090f8: 02 80 00 05 be 4000910c <_Thread_Initialize+0x15c> 400090fc: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( extensions_area ); 40009100: 40 00 04 c6 call 4000a418 <_Workspace_Free> 40009104: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40009108: 90 10 00 19 mov %i1, %o0 4000910c: 40 00 02 7a call 40009af4 <_Thread_Stack_Free> 40009110: b0 10 20 00 clr %i0 return false; } 40009114: 81 c7 e0 08 ret 40009118: 81 e8 00 00 restore /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 4000911c: 81 c7 e0 08 ret 40009120: 91 e8 20 00 restore %g0, 0, %o0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 40009124: 82 00 60 01 inc %g1 40009128: 40 00 04 b3 call 4000a3f4 <_Workspace_Allocate> 4000912c: 91 28 60 02 sll %g1, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 40009130: b6 92 20 00 orcc %o0, 0, %i3 40009134: 02 bf ff d8 be 40009094 <_Thread_Initialize+0xe4> 40009138: c8 04 a0 8c ld [ %l2 + 0x8c ], %g4 goto failed; } the_thread->extensions = (void **) extensions_area; 4000913c: f6 26 61 68 st %i3, [ %i1 + 0x168 ] 40009140: 86 10 00 1b mov %i3, %g3 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 40009144: 84 10 20 00 clr %g2 40009148: 10 80 00 03 b 40009154 <_Thread_Initialize+0x1a4> 4000914c: 82 10 20 00 clr %g1 40009150: c6 06 61 68 ld [ %i1 + 0x168 ], %g3 the_thread->extensions[i] = NULL; 40009154: 85 28 a0 02 sll %g2, 2, %g2 40009158: c0 20 c0 02 clr [ %g3 + %g2 ] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 4000915c: 82 00 60 01 inc %g1 40009160: 80 a1 00 01 cmp %g4, %g1 40009164: 1a bf ff fb bcc 40009150 <_Thread_Initialize+0x1a0> 40009168: 84 10 00 01 mov %g1, %g2 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 4000916c: 10 bf ff ae b 40009024 <_Thread_Initialize+0x74> 40009170: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 =============================================================================== 4000d390 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000d390: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000d394: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000d398: e0 00 60 ac ld [ %g1 + 0xac ], %l0 ! 4001d4ac <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000d39c: 7f ff d2 9e call 40001e14 4000d3a0: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000d3a4: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000d3a8: c4 04 40 00 ld [ %l1 ], %g2 4000d3ac: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000d3b0: 80 a0 80 01 cmp %g2, %g1 4000d3b4: 02 80 00 1f be 4000d430 <_Thread_Reset_timeslice+0xa0> 4000d3b8: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d3bc: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 4000d3c0: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000d3c4: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d3c8: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d3cc: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000d3d0: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000d3d4: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d3d8: 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; 4000d3dc: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000d3e0: 7f ff d2 91 call 40001e24 4000d3e4: 01 00 00 00 nop 4000d3e8: 7f ff d2 8b call 40001e14 4000d3ec: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000d3f0: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000d3f4: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 ! 4001d47c <_Thread_Heir> 4000d3f8: 80 a4 00 02 cmp %l0, %g2 4000d3fc: 02 80 00 06 be 4000d414 <_Thread_Reset_timeslice+0x84> <== ALWAYS TAKEN 4000d400: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4000d404: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d408: c4 28 60 bc stb %g2, [ %g1 + 0xbc ] ! 4001d4bc <_Context_Switch_necessary><== NOT EXECUTED _ISR_Enable( level ); 4000d40c: 7f ff d2 86 call 40001e24 <== NOT EXECUTED 4000d410: 81 e8 00 00 restore <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4000d414: c4 04 40 00 ld [ %l1 ], %g2 4000d418: c4 20 60 7c st %g2, [ %g1 + 0x7c ] _Context_Switch_necessary = true; 4000d41c: 84 10 20 01 mov 1, %g2 4000d420: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000d424: c4 28 60 bc stb %g2, [ %g1 + 0xbc ] ! 4001d4bc <_Context_Switch_necessary> _ISR_Enable( level ); 4000d428: 7f ff d2 7f call 40001e24 4000d42c: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000d430: 7f ff d2 7d call 40001e24 4000d434: 81 e8 00 00 restore =============================================================================== 4000df8c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4000df8c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000df90: 7f ff cf fa call 40001f78 4000df94: a0 10 00 18 mov %i0, %l0 4000df98: b0 10 00 08 mov %o0, %i0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4000df9c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 4000dfa0: 80 88 60 02 btst 2, %g1 4000dfa4: 02 80 00 05 be 4000dfb8 <_Thread_Resume+0x2c> <== NEVER TAKEN 4000dfa8: 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 ) ) { 4000dfac: 80 a0 60 00 cmp %g1, 0 4000dfb0: 02 80 00 04 be 4000dfc0 <_Thread_Resume+0x34> 4000dfb4: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 4000dfb8: 7f ff cf f4 call 40001f88 4000dfbc: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000dfc0: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 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); 4000dfc4: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 4000dfc8: c8 10 80 00 lduh [ %g2 ], %g4 4000dfcc: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 4000dfd0: 86 11 00 03 or %g4, %g3, %g3 4000dfd4: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000dfd8: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000dfdc: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 4000dfe0: c4 24 00 00 st %g2, [ %l0 ] 4000dfe4: 07 10 00 8e sethi %hi(0x40023800), %g3 old_last_node = the_chain->last; 4000dfe8: c4 00 60 08 ld [ %g1 + 8 ], %g2 4000dfec: da 10 e2 90 lduh [ %g3 + 0x290 ], %o5 the_chain->last = the_node; 4000dff0: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000dff4: c4 24 20 04 st %g2, [ %l0 + 4 ] 4000dff8: 82 13 40 04 or %o5, %g4, %g1 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; 4000dffc: e0 20 80 00 st %l0, [ %g2 ] 4000e000: c2 30 e2 90 sth %g1, [ %g3 + 0x290 ] _ISR_Flash( level ); 4000e004: 7f ff cf e1 call 40001f88 4000e008: 01 00 00 00 nop 4000e00c: 7f ff cf db call 40001f78 4000e010: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000e014: 03 10 00 8e sethi %hi(0x40023800), %g1 4000e018: c6 00 62 6c ld [ %g1 + 0x26c ], %g3 ! 40023a6c <_Thread_Heir> 4000e01c: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 4000e020: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 4000e024: 80 a0 80 03 cmp %g2, %g3 4000e028: 1a bf ff e4 bcc 4000dfb8 <_Thread_Resume+0x2c> 4000e02c: 07 10 00 8e sethi %hi(0x40023800), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000e030: c6 00 e2 9c ld [ %g3 + 0x29c ], %g3 ! 40023a9c <_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; 4000e034: e0 20 62 6c st %l0, [ %g1 + 0x26c ] if ( _Thread_Executing->is_preemptible || 4000e038: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 4000e03c: 80 a0 60 00 cmp %g1, 0 4000e040: 32 80 00 05 bne,a 4000e054 <_Thread_Resume+0xc8> 4000e044: 84 10 20 01 mov 1, %g2 4000e048: 80 a0 a0 00 cmp %g2, 0 4000e04c: 12 bf ff db bne 4000dfb8 <_Thread_Resume+0x2c> <== ALWAYS TAKEN 4000e050: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4000e054: 03 10 00 8e sethi %hi(0x40023800), %g1 4000e058: c4 28 62 ac stb %g2, [ %g1 + 0x2ac ] ! 40023aac <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4000e05c: 7f ff cf cb call 40001f88 4000e060: 81 e8 00 00 restore =============================================================================== 40009c24 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 40009c24: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 40009c28: 03 10 00 75 sethi %hi(0x4001d400), %g1 40009c2c: e0 00 60 ac ld [ %g1 + 0xac ], %l0 ! 4001d4ac <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 40009c30: 7f ff e0 79 call 40001e14 40009c34: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40009c38: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40009c3c: c4 04 40 00 ld [ %l1 ], %g2 40009c40: c2 04 60 08 ld [ %l1 + 8 ], %g1 40009c44: 80 a0 80 01 cmp %g2, %g1 40009c48: 02 80 00 19 be 40009cac <_Thread_Yield_processor+0x88> 40009c4c: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40009c50: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40009c54: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40009c58: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009c5c: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40009c60: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 40009c64: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40009c68: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40009c6c: 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; 40009c70: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40009c74: 7f ff e0 6c call 40001e24 40009c78: 01 00 00 00 nop 40009c7c: 7f ff e0 66 call 40001e14 40009c80: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40009c84: 03 10 00 75 sethi %hi(0x4001d400), %g1 40009c88: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 ! 4001d47c <_Thread_Heir> 40009c8c: 80 a4 00 02 cmp %l0, %g2 40009c90: 22 80 00 0e be,a 40009cc8 <_Thread_Yield_processor+0xa4> <== ALWAYS TAKEN 40009c94: c4 04 40 00 ld [ %l1 ], %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 40009c98: 84 10 20 01 mov 1, %g2 40009c9c: 03 10 00 75 sethi %hi(0x4001d400), %g1 40009ca0: c4 28 60 bc stb %g2, [ %g1 + 0xbc ] ! 4001d4bc <_Context_Switch_necessary> _ISR_Enable( level ); 40009ca4: 7f ff e0 60 call 40001e24 40009ca8: 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 ) ) 40009cac: 03 10 00 75 sethi %hi(0x4001d400), %g1 40009cb0: c2 00 60 7c ld [ %g1 + 0x7c ], %g1 ! 4001d47c <_Thread_Heir> 40009cb4: 80 a4 00 01 cmp %l0, %g1 40009cb8: 32 bf ff f9 bne,a 40009c9c <_Thread_Yield_processor+0x78><== NEVER TAKEN 40009cbc: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 40009cc0: 7f ff e0 59 call 40001e24 40009cc4: 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; 40009cc8: 10 bf ff f4 b 40009c98 <_Thread_Yield_processor+0x74> 40009ccc: c4 20 60 7c st %g2, [ %g1 + 0x7c ] =============================================================================== 4000948c <_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 ) { 4000948c: 9d e3 bf a0 save %sp, -96, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 40009490: e0 06 60 14 ld [ %i1 + 0x14 ], %l0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009494: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40009498: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000949c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400094a0: 82 06 60 38 add %i1, 0x38, %g1 400094a4: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 400094a8: 2d 10 00 72 sethi %hi(0x4001c800), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 400094ac: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 400094b0: 80 8c 20 20 btst 0x20, %l0 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 400094b4: ab 28 60 04 sll %g1, 4, %l5 400094b8: ac 15 a1 b4 or %l6, 0x1b4, %l6 400094bc: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 400094c0: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 400094c4: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 400094c8: 12 80 00 24 bne 40009558 <_Thread_queue_Enqueue_priority+0xcc> 400094cc: aa 06 00 15 add %i0, %l5, %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400094d0: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 400094d4: 7f ff e2 50 call 40001e14 400094d8: 01 00 00 00 nop 400094dc: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 400094e0: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400094e4: 80 a0 40 16 cmp %g1, %l6 400094e8: 02 80 00 3a be 400095d0 <_Thread_queue_Enqueue_priority+0x144> 400094ec: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 400094f0: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 400094f4: 80 a4 00 13 cmp %l0, %l3 400094f8: 18 80 00 0b bgu 40009524 <_Thread_queue_Enqueue_priority+0x98> 400094fc: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40009500: 10 80 00 36 b 400095d8 <_Thread_queue_Enqueue_priority+0x14c> 40009504: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 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 ) ) { 40009508: 80 a4 40 16 cmp %l1, %l6 4000950c: 02 80 00 32 be 400095d4 <_Thread_queue_Enqueue_priority+0x148> 40009510: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 40009514: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 40009518: 80 a4 00 13 cmp %l0, %l3 4000951c: 28 80 00 2f bleu,a 400095d8 <_Thread_queue_Enqueue_priority+0x14c> 40009520: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 40009524: 7f ff e2 40 call 40001e24 40009528: 90 10 00 12 mov %l2, %o0 4000952c: 7f ff e2 3a call 40001e14 40009530: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40009534: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40009538: 80 8d 00 01 btst %l4, %g1 4000953c: 32 bf ff f3 bne,a 40009508 <_Thread_queue_Enqueue_priority+0x7c><== ALWAYS TAKEN 40009540: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40009544: 7f ff e2 38 call 40001e24 <== NOT EXECUTED 40009548: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 4000954c: 30 bf ff e2 b,a 400094d4 <_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 ); 40009550: 7f ff e2 35 call 40001e24 40009554: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40009558: 7f ff e2 2f call 40001e14 4000955c: e6 0d 80 00 ldub [ %l6 ], %l3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40009560: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 40009564: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 40009568: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4000956c: 80 a0 40 15 cmp %g1, %l5 40009570: 02 80 00 20 be 400095f0 <_Thread_queue_Enqueue_priority+0x164> 40009574: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 40009578: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 4000957c: 80 a4 00 13 cmp %l0, %l3 40009580: 0a 80 00 0b bcs 400095ac <_Thread_queue_Enqueue_priority+0x120> 40009584: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40009588: 10 80 00 1b b 400095f4 <_Thread_queue_Enqueue_priority+0x168> 4000958c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 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 ) ) { 40009590: 80 a4 40 15 cmp %l1, %l5 40009594: 02 80 00 17 be 400095f0 <_Thread_queue_Enqueue_priority+0x164> 40009598: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 4000959c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 400095a0: 80 a4 00 13 cmp %l0, %l3 400095a4: 3a 80 00 14 bcc,a 400095f4 <_Thread_queue_Enqueue_priority+0x168> 400095a8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 400095ac: 7f ff e2 1e call 40001e24 400095b0: 90 10 00 12 mov %l2, %o0 400095b4: 7f ff e2 18 call 40001e14 400095b8: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400095bc: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400095c0: 80 8d 00 01 btst %l4, %g1 400095c4: 32 bf ff f3 bne,a 40009590 <_Thread_queue_Enqueue_priority+0x104> 400095c8: e2 04 60 04 ld [ %l1 + 4 ], %l1 400095cc: 30 bf ff e1 b,a 40009550 <_Thread_queue_Enqueue_priority+0xc4> 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 ) ) { 400095d0: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400095d4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400095d8: 80 a0 a0 01 cmp %g2, 1 400095dc: 02 80 00 17 be 40009638 <_Thread_queue_Enqueue_priority+0x1ac> 400095e0: 80 a4 00 13 cmp %l0, %l3 * 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; 400095e4: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 400095e8: 81 c7 e0 08 ret 400095ec: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400095f0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400095f4: 80 a0 a0 01 cmp %g2, 1 400095f8: 32 bf ff fc bne,a 400095e8 <_Thread_queue_Enqueue_priority+0x15c> 400095fc: e4 26 80 00 st %l2, [ %i2 ] THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40009600: 80 a4 00 13 cmp %l0, %l3 40009604: 02 80 00 1a be 4000966c <_Thread_queue_Enqueue_priority+0x1e0> 40009608: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4000960c: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40009610: c2 26 60 04 st %g1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 40009614: c4 26 40 00 st %g2, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40009618: f0 26 60 44 st %i0, [ %i1 + 0x44 ] 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; 4000961c: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 40009620: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009624: b0 10 20 01 mov 1, %i0 40009628: 7f ff e1 ff call 40001e24 4000962c: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009630: 81 c7 e0 08 ret 40009634: 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 ) 40009638: 02 80 00 0d be 4000966c <_Thread_queue_Enqueue_priority+0x1e0> 4000963c: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009640: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009644: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40009648: 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; 4000964c: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40009650: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40009654: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009658: b0 10 20 01 mov 1, %i0 4000965c: 7f ff e1 f2 call 40001e24 40009660: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009664: 81 c7 e0 08 ret 40009668: 81 e8 00 00 restore 4000966c: a2 04 60 3c add %l1, 0x3c, %l1 _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; 40009670: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009674: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40009678: 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; 4000967c: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40009680: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40009684: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009688: b0 10 20 01 mov 1, %i0 4000968c: 7f ff e1 e6 call 40001e24 40009690: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009694: 81 c7 e0 08 ret 40009698: 81 e8 00 00 restore =============================================================================== 40009748 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009748: 9d e3 bf 98 save %sp, -104, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 4000974c: 80 a6 20 00 cmp %i0, 0 40009750: 02 80 00 13 be 4000979c <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 40009754: 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 ) { 40009758: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 4000975c: 80 a4 60 01 cmp %l1, 1 40009760: 02 80 00 04 be 40009770 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 40009764: 01 00 00 00 nop 40009768: 81 c7 e0 08 ret <== NOT EXECUTED 4000976c: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40009770: 7f ff e1 a9 call 40001e14 40009774: 01 00 00 00 nop 40009778: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000977c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40009780: 03 00 00 ef sethi %hi(0x3bc00), %g1 40009784: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40009788: 80 88 80 01 btst %g2, %g1 4000978c: 12 80 00 06 bne 400097a4 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 40009790: 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 ); 40009794: 7f ff e1 a4 call 40001e24 40009798: 90 10 00 10 mov %l0, %o0 4000979c: 81 c7 e0 08 ret 400097a0: 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 ); 400097a4: 92 10 00 19 mov %i1, %o1 400097a8: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 400097ac: 40 00 0e 57 call 4000d108 <_Thread_queue_Extract_priority_helper> 400097b0: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 400097b4: 90 10 00 18 mov %i0, %o0 400097b8: 92 10 00 19 mov %i1, %o1 400097bc: 7f ff ff 34 call 4000948c <_Thread_queue_Enqueue_priority> 400097c0: 94 07 bf fc add %fp, -4, %o2 400097c4: 30 bf ff f4 b,a 40009794 <_Thread_queue_Requeue+0x4c> =============================================================================== 400097c8 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 400097c8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 400097cc: 90 10 00 18 mov %i0, %o0 400097d0: 7f ff fd cd call 40008f04 <_Thread_Get> 400097d4: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 400097d8: c2 07 bf fc ld [ %fp + -4 ], %g1 400097dc: 80 a0 60 00 cmp %g1, 0 400097e0: 12 80 00 08 bne 40009800 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 400097e4: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 400097e8: 40 00 0e 83 call 4000d1f4 <_Thread_queue_Process_timeout> 400097ec: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 400097f0: 03 10 00 74 sethi %hi(0x4001d000), %g1 400097f4: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4001d3f0 <_Thread_Dispatch_disable_level> 400097f8: 84 00 bf ff add %g2, -1, %g2 400097fc: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ] 40009800: 81 c7 e0 08 ret 40009804: 81 e8 00 00 restore =============================================================================== 40017328 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40017328: 9d e3 bf 88 save %sp, -120, %sp 4001732c: 2d 10 00 fb sethi %hi(0x4003ec00), %l6 40017330: ba 07 bf f4 add %fp, -12, %i5 40017334: a8 07 bf f8 add %fp, -8, %l4 40017338: a4 07 bf e8 add %fp, -24, %l2 4001733c: ae 07 bf ec add %fp, -20, %l7 40017340: 2b 10 00 fa sethi %hi(0x4003e800), %l5 40017344: 39 10 00 fa sethi %hi(0x4003e800), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40017348: c0 27 bf f8 clr [ %fp + -8 ] 4001734c: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40017350: fa 27 bf fc st %i5, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40017354: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40017358: e4 27 bf f0 st %l2, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4001735c: ee 27 bf e8 st %l7, [ %fp + -24 ] 40017360: ac 15 a0 24 or %l6, 0x24, %l6 40017364: aa 15 63 60 or %l5, 0x360, %l5 40017368: b8 17 22 d0 or %i4, 0x2d0, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 4001736c: a2 06 20 30 add %i0, 0x30, %l1 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40017370: a6 06 20 68 add %i0, 0x68, %l3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40017374: b2 06 20 08 add %i0, 8, %i1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40017378: b4 06 20 40 add %i0, 0x40, %i2 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 4001737c: b6 10 20 01 mov 1, %i3 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 40017380: fa 26 20 78 st %i5, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40017384: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40017388: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 4001738c: 90 10 00 11 mov %l1, %o0 40017390: 92 20 40 09 sub %g1, %o1, %o1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40017394: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40017398: 40 00 11 c8 call 4001bab8 <_Watchdog_Adjust_to_chain> 4001739c: 94 10 00 12 mov %l2, %o2 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 400173a0: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 400173a4: e0 05 40 00 ld [ %l5 ], %l0 /* * 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 watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 400173a8: 80 a4 00 09 cmp %l0, %o1 400173ac: 38 80 00 2f bgu,a 40017468 <_Timer_server_Body+0x140> 400173b0: 92 24 00 09 sub %l0, %o1, %o1 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 400173b4: 80 a4 00 09 cmp %l0, %o1 400173b8: 0a 80 00 30 bcs 40017478 <_Timer_server_Body+0x150> 400173bc: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 400173c0: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 400173c4: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 400173c8: 40 00 02 98 call 40017e28 <_Chain_Get> 400173cc: 01 00 00 00 nop if ( timer == NULL ) { 400173d0: 80 a2 20 00 cmp %o0, 0 400173d4: 02 80 00 10 be 40017414 <_Timer_server_Body+0xec> 400173d8: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 400173dc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400173e0: 80 a0 60 01 cmp %g1, 1 400173e4: 02 80 00 29 be 40017488 <_Timer_server_Body+0x160> 400173e8: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 400173ec: 12 bf ff f6 bne 400173c4 <_Timer_server_Body+0x9c> <== NEVER TAKEN 400173f0: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 400173f4: 40 00 11 e7 call 4001bb90 <_Watchdog_Insert> 400173f8: 90 10 00 13 mov %l3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 400173fc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40017400: 40 00 02 8a call 40017e28 <_Chain_Get> 40017404: 01 00 00 00 nop if ( timer == NULL ) { 40017408: 80 a2 20 00 cmp %o0, 0 4001740c: 32 bf ff f5 bne,a 400173e0 <_Timer_server_Body+0xb8> <== NEVER TAKEN 40017410: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 40017414: 7f ff df 75 call 4000f1e8 40017418: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 4001741c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40017420: 80 a5 00 01 cmp %l4, %g1 40017424: 02 80 00 1d be 40017498 <_Timer_server_Body+0x170> <== ALWAYS TAKEN 40017428: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 4001742c: 7f ff df 73 call 4000f1f8 <== NOT EXECUTED 40017430: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40017434: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40017438: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 4001743c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40017440: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40017444: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40017448: 40 00 11 9c call 4001bab8 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 4001744c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40017450: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40017454: e0 05 40 00 ld [ %l5 ], %l0 <== NOT EXECUTED /* * 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 watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 40017458: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 4001745c: 08 bf ff d7 bleu 400173b8 <_Timer_server_Body+0x90> <== NOT EXECUTED 40017460: 01 00 00 00 nop <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40017464: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 40017468: 90 10 00 13 mov %l3, %o0 4001746c: 40 00 11 93 call 4001bab8 <_Watchdog_Adjust_to_chain> 40017470: 94 10 00 12 mov %l2, %o2 40017474: 30 bf ff d3 b,a 400173c0 <_Timer_server_Body+0x98> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 40017478: 90 10 00 13 mov %l3, %o0 4001747c: 40 00 11 5f call 4001b9f8 <_Watchdog_Adjust> 40017480: 92 10 20 01 mov 1, %o1 40017484: 30 bf ff cf b,a 400173c0 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 40017488: 92 02 20 10 add %o0, 0x10, %o1 4001748c: 40 00 11 c1 call 4001bb90 <_Watchdog_Insert> 40017490: 90 10 00 11 mov %l1, %o0 40017494: 30 bf ff cc b,a 400173c4 <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 40017498: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 4001749c: 7f ff df 57 call 4000f1f8 400174a0: 01 00 00 00 nop _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 400174a4: c2 07 bf e8 ld [ %fp + -24 ], %g1 400174a8: 80 a5 c0 01 cmp %l7, %g1 400174ac: 12 80 00 0c bne 400174dc <_Timer_server_Body+0x1b4> 400174b0: 01 00 00 00 nop 400174b4: 30 80 00 13 b,a 40017500 <_Timer_server_Body+0x1d8> * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 400174b8: 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; 400174bc: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 400174c0: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 400174c4: 7f ff df 4d call 4000f1f8 400174c8: 01 00 00 00 nop /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 400174cc: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 400174d0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 400174d4: 9f c0 40 00 call %g1 400174d8: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 400174dc: 7f ff df 43 call 4000f1e8 400174e0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 400174e4: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 400174e8: 80 a5 c0 10 cmp %l7, %l0 400174ec: 32 bf ff f3 bne,a 400174b8 <_Timer_server_Body+0x190> 400174f0: c2 04 00 00 ld [ %l0 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 400174f4: 7f ff df 41 call 4000f1f8 400174f8: 01 00 00 00 nop 400174fc: 30 bf ff a1 b,a 40017380 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40017500: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40017504: c2 07 00 00 ld [ %i4 ], %g1 40017508: 82 00 60 01 inc %g1 4001750c: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40017510: d0 06 00 00 ld [ %i0 ], %o0 40017514: 40 00 0e 98 call 4001af74 <_Thread_Set_state> 40017518: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 4001751c: 7f ff ff 59 call 40017280 <_Timer_server_Reset_interval_system_watchdog> 40017520: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40017524: 7f ff ff 6c call 400172d4 <_Timer_server_Reset_tod_system_watchdog> 40017528: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 4001752c: 40 00 0b c1 call 4001a430 <_Thread_Enable_dispatch> 40017530: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40017534: 90 10 00 19 mov %i1, %o0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 40017538: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 4001753c: 40 00 12 02 call 4001bd44 <_Watchdog_Remove> 40017540: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40017544: 40 00 12 00 call 4001bd44 <_Watchdog_Remove> 40017548: 90 10 00 1a mov %i2, %o0 4001754c: 30 bf ff 8d b,a 40017380 <_Timer_server_Body+0x58> =============================================================================== 40009cd0 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 40009cd0: 9d e3 bf a0 save %sp, -96, %sp 40009cd4: 82 10 00 18 mov %i0, %g1 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 40009cd8: c8 06 60 04 ld [ %i1 + 4 ], %g4 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 40009cdc: f0 06 40 00 ld [ %i1 ], %i0 /* Add the basics */ time->tv_sec += add->tv_sec; 40009ce0: c6 00 40 00 ld [ %g1 ], %g3 time->tv_nsec += add->tv_nsec; 40009ce4: c4 00 60 04 ld [ %g1 + 4 ], %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 40009ce8: 86 00 c0 18 add %g3, %i0, %g3 time->tv_nsec += add->tv_nsec; 40009cec: 84 01 00 02 add %g4, %g2, %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 40009cf0: c6 20 40 00 st %g3, [ %g1 ] time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 40009cf4: 1b 0e e6 b2 sethi %hi(0x3b9ac800), %o5 40009cf8: 9a 13 61 ff or %o5, 0x1ff, %o5 ! 3b9ac9ff 40009cfc: 80 a0 80 0d cmp %g2, %o5 40009d00: 08 80 00 0b bleu 40009d2c <_Timespec_Add_to+0x5c> 40009d04: c4 20 60 04 st %g2, [ %g1 + 4 ] time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 40009d08: 09 31 19 4d sethi %hi(0xc4653400), %g4 40009d0c: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 40009d10: 84 00 80 04 add %g2, %g4, %g2 * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 40009d14: 86 00 e0 01 inc %g3 /* 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 ) { 40009d18: 80 a0 80 0d cmp %g2, %o5 40009d1c: 18 bf ff fd bgu 40009d10 <_Timespec_Add_to+0x40> <== NEVER TAKEN 40009d20: b0 06 20 01 inc %i0 40009d24: c6 20 40 00 st %g3, [ %g1 ] 40009d28: c4 20 60 04 st %g2, [ %g1 + 4 ] time->tv_sec++; seconds++; } return seconds; } 40009d2c: 81 c7 e0 08 ret 40009d30: 81 e8 00 00 restore =============================================================================== 4000bdd8 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 4000bdd8: c6 02 00 00 ld [ %o0 ], %g3 4000bddc: c4 02 40 00 ld [ %o1 ], %g2 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 4000bde0: 82 10 00 08 mov %o0, %g1 if ( lhs->tv_sec > rhs->tv_sec ) 4000bde4: 80 a0 c0 02 cmp %g3, %g2 4000bde8: 14 80 00 0a bg 4000be10 <_Timespec_Greater_than+0x38> 4000bdec: 90 10 20 01 mov 1, %o0 return true; if ( lhs->tv_sec < rhs->tv_sec ) 4000bdf0: 80 a0 c0 02 cmp %g3, %g2 4000bdf4: 06 80 00 07 bl 4000be10 <_Timespec_Greater_than+0x38> <== NEVER TAKEN 4000bdf8: 90 10 20 00 clr %o0 #include #include #include bool _Timespec_Greater_than( 4000bdfc: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000be00: c2 02 60 04 ld [ %o1 + 4 ], %g1 4000be04: 80 a0 80 01 cmp %g2, %g1 4000be08: 04 80 00 04 ble 4000be18 <_Timespec_Greater_than+0x40> 4000be0c: 90 10 20 01 mov 1, %o0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4000be10: 81 c3 e0 08 retl 4000be14: 01 00 00 00 nop 4000be18: 81 c3 e0 08 retl 4000be1c: 90 10 20 00 clr %o0 ! 0 =============================================================================== 40009ee0 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 40009ee0: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 40009ee4: 23 10 00 75 sethi %hi(0x4001d400), %l1 40009ee8: a2 14 62 28 or %l1, 0x228, %l1 ! 4001d628 <_User_extensions_List> 40009eec: e0 04 60 08 ld [ %l1 + 8 ], %l0 40009ef0: 80 a4 00 11 cmp %l0, %l1 40009ef4: 02 80 00 0d be 40009f28 <_User_extensions_Fatal+0x48> <== NEVER TAKEN 40009ef8: 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 ) 40009efc: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 40009f00: 80 a0 60 00 cmp %g1, 0 40009f04: 02 80 00 05 be 40009f18 <_User_extensions_Fatal+0x38> 40009f08: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 40009f0c: 92 10 00 19 mov %i1, %o1 40009f10: 9f c0 40 00 call %g1 40009f14: 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 ) { 40009f18: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 40009f1c: 80 a4 00 11 cmp %l0, %l1 40009f20: 32 bf ff f8 bne,a 40009f00 <_User_extensions_Fatal+0x20> 40009f24: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 40009f28: 81 c7 e0 08 ret 40009f2c: 81 e8 00 00 restore =============================================================================== 40009d8c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 40009d8c: 9d e3 bf a0 save %sp, -96, %sp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 40009d90: 07 10 00 72 sethi %hi(0x4001c800), %g3 40009d94: 86 10 e1 b8 or %g3, 0x1b8, %g3 ! 4001c9b8 initial_extensions = Configuration.User_extension_table; 40009d98: e6 00 e0 3c ld [ %g3 + 0x3c ], %l3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009d9c: 1b 10 00 75 sethi %hi(0x4001d400), %o5 40009da0: 09 10 00 74 sethi %hi(0x4001d000), %g4 40009da4: 84 13 62 28 or %o5, 0x228, %g2 40009da8: 82 11 23 f4 or %g4, 0x3f4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009dac: 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; 40009db0: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 40009db4: 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; 40009db8: 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); 40009dbc: 84 00 a0 04 add %g2, 4, %g2 40009dc0: 82 00 60 04 add %g1, 4, %g1 40009dc4: c4 23 62 28 st %g2, [ %o5 + 0x228 ] 40009dc8: c2 21 23 f4 st %g1, [ %g4 + 0x3f4 ] _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 40009dcc: 80 a4 e0 00 cmp %l3, 0 40009dd0: 02 80 00 1b be 40009e3c <_User_extensions_Handler_initialization+0xb0> 40009dd4: e4 00 e0 38 ld [ %g3 + 0x38 ], %l2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 40009dd8: 83 2c a0 02 sll %l2, 2, %g1 40009ddc: a3 2c a0 04 sll %l2, 4, %l1 40009de0: a2 24 40 01 sub %l1, %g1, %l1 40009de4: a2 04 40 12 add %l1, %l2, %l1 40009de8: a3 2c 60 02 sll %l1, 2, %l1 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 40009dec: 40 00 01 73 call 4000a3b8 <_Workspace_Allocate_or_fatal_error> 40009df0: 90 10 00 11 mov %l1, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 40009df4: 94 10 00 11 mov %l1, %o2 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 40009df8: a0 10 00 08 mov %o0, %l0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 40009dfc: 40 00 17 44 call 4000fb0c 40009e00: 92 10 20 00 clr %o1 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 40009e04: 80 a4 a0 00 cmp %l2, 0 40009e08: 02 80 00 0d be 40009e3c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 40009e0c: a2 10 20 00 clr %l1 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 40009e10: 93 2c 60 05 sll %l1, 5, %o1 40009e14: 94 10 20 20 mov 0x20, %o2 40009e18: 92 04 c0 09 add %l3, %o1, %o1 40009e1c: 40 00 16 fd call 4000fa10 40009e20: 90 04 20 14 add %l0, 0x14, %o0 _User_extensions_Add_set( extension ); 40009e24: 40 00 0d 86 call 4000d43c <_User_extensions_Add_set> 40009e28: 90 10 00 10 mov %l0, %o0 40009e2c: a2 04 60 01 inc %l1 40009e30: 80 a4 80 11 cmp %l2, %l1 40009e34: 18 bf ff f7 bgu 40009e10 <_User_extensions_Handler_initialization+0x84> 40009e38: a0 04 20 34 add %l0, 0x34, %l0 40009e3c: 81 c7 e0 08 ret 40009e40: 81 e8 00 00 restore =============================================================================== 40009e44 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 40009e44: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 40009e48: 23 10 00 75 sethi %hi(0x4001d400), %l1 40009e4c: e0 04 62 28 ld [ %l1 + 0x228 ], %l0 ! 4001d628 <_User_extensions_List> 40009e50: a2 14 62 28 or %l1, 0x228, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40009e54: a2 04 60 04 add %l1, 4, %l1 40009e58: 80 a4 00 11 cmp %l0, %l1 40009e5c: 02 80 00 0c be 40009e8c <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 40009e60: 01 00 00 00 nop !_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_begin != NULL ) 40009e64: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40009e68: 80 a0 60 00 cmp %g1, 0 40009e6c: 02 80 00 04 be 40009e7c <_User_extensions_Thread_begin+0x38> 40009e70: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 40009e74: 9f c0 40 00 call %g1 40009e78: 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 ) { 40009e7c: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 40009e80: 80 a4 00 11 cmp %l0, %l1 40009e84: 32 bf ff f9 bne,a 40009e68 <_User_extensions_Thread_begin+0x24> 40009e88: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40009e8c: 81 c7 e0 08 ret 40009e90: 81 e8 00 00 restore =============================================================================== 40009f30 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40009f30: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 40009f34: 23 10 00 75 sethi %hi(0x4001d400), %l1 40009f38: e0 04 62 28 ld [ %l1 + 0x228 ], %l0 ! 4001d628 <_User_extensions_List> 40009f3c: a2 14 62 28 or %l1, 0x228, %l1 40009f40: a2 04 60 04 add %l1, 4, %l1 40009f44: 80 a4 00 11 cmp %l0, %l1 40009f48: 02 80 00 10 be 40009f88 <_User_extensions_Thread_create+0x58><== NEVER TAKEN 40009f4c: 25 10 00 75 sethi %hi(0x4001d400), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 40009f50: a4 14 a0 ac or %l2, 0xac, %l2 ! 4001d4ac <_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 ) { 40009f54: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40009f58: 80 a0 60 00 cmp %g1, 0 40009f5c: 02 80 00 07 be 40009f78 <_User_extensions_Thread_create+0x48> 40009f60: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40009f64: 9f c0 40 00 call %g1 40009f68: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40009f6c: 80 8a 20 ff btst 0xff, %o0 40009f70: 02 80 00 08 be 40009f90 <_User_extensions_Thread_create+0x60> 40009f74: 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 ) { 40009f78: 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 ; 40009f7c: 80 a4 00 11 cmp %l0, %l1 40009f80: 32 bf ff f6 bne,a 40009f58 <_User_extensions_Thread_create+0x28> 40009f84: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return false; } } return true; } 40009f88: 81 c7 e0 08 ret 40009f8c: 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 ) 40009f90: 81 c7 e0 08 ret 40009f94: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40009f98 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 40009f98: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 40009f9c: 23 10 00 75 sethi %hi(0x4001d400), %l1 40009fa0: a2 14 62 28 or %l1, 0x228, %l1 ! 4001d628 <_User_extensions_List> 40009fa4: e0 04 60 08 ld [ %l1 + 8 ], %l0 40009fa8: 80 a4 00 11 cmp %l0, %l1 40009fac: 02 80 00 0d be 40009fe0 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN 40009fb0: 25 10 00 75 sethi %hi(0x4001d400), %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)( 40009fb4: a4 14 a0 ac or %l2, 0xac, %l2 ! 4001d4ac <_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 ) 40009fb8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40009fbc: 80 a0 60 00 cmp %g1, 0 40009fc0: 02 80 00 04 be 40009fd0 <_User_extensions_Thread_delete+0x38> 40009fc4: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_delete)( 40009fc8: 9f c0 40 00 call %g1 40009fcc: d0 04 80 00 ld [ %l2 ], %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 ) { 40009fd0: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 40009fd4: 80 a4 00 11 cmp %l0, %l1 40009fd8: 32 bf ff f9 bne,a 40009fbc <_User_extensions_Thread_delete+0x24> 40009fdc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40009fe0: 81 c7 e0 08 ret 40009fe4: 81 e8 00 00 restore =============================================================================== 40009e94 <_User_extensions_Thread_exitted>: } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 40009e94: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 40009e98: 23 10 00 75 sethi %hi(0x4001d400), %l1 40009e9c: a2 14 62 28 or %l1, 0x228, %l1 ! 4001d628 <_User_extensions_List> 40009ea0: e0 04 60 08 ld [ %l1 + 8 ], %l0 40009ea4: 80 a4 00 11 cmp %l0, %l1 40009ea8: 02 80 00 0c be 40009ed8 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 40009eac: 01 00 00 00 nop !_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_exitted != NULL ) 40009eb0: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 40009eb4: 80 a0 60 00 cmp %g1, 0 40009eb8: 02 80 00 04 be 40009ec8 <_User_extensions_Thread_exitted+0x34> 40009ebc: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 40009ec0: 9f c0 40 00 call %g1 40009ec4: 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 ) { 40009ec8: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 40009ecc: 80 a4 00 11 cmp %l0, %l1 40009ed0: 32 bf ff f9 bne,a 40009eb4 <_User_extensions_Thread_exitted+0x20> 40009ed4: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 40009ed8: 81 c7 e0 08 ret 40009edc: 81 e8 00 00 restore =============================================================================== 4000acd0 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4000acd0: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4000acd4: 23 10 00 88 sethi %hi(0x40022000), %l1 4000acd8: e0 04 60 08 ld [ %l1 + 8 ], %l0 ! 40022008 <_User_extensions_List> 4000acdc: a2 14 60 08 or %l1, 8, %l1 4000ace0: a2 04 60 04 add %l1, 4, %l1 4000ace4: 80 a4 00 11 cmp %l0, %l1 4000ace8: 02 80 00 0d be 4000ad1c <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 4000acec: 25 10 00 87 sethi %hi(0x40021c00), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( 4000acf0: a4 14 a2 8c or %l2, 0x28c, %l2 ! 40021e8c <_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 ) 4000acf4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4000acf8: 80 a0 60 00 cmp %g1, 0 4000acfc: 02 80 00 04 be 4000ad0c <_User_extensions_Thread_restart+0x3c> 4000ad00: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_restart)( 4000ad04: 9f c0 40 00 call %g1 4000ad08: 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 ) { 4000ad0c: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4000ad10: 80 a4 00 11 cmp %l0, %l1 4000ad14: 32 bf ff f9 bne,a 4000acf8 <_User_extensions_Thread_restart+0x28> 4000ad18: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4000ad1c: 81 c7 e0 08 ret 4000ad20: 81 e8 00 00 restore =============================================================================== 40009fe8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 40009fe8: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 40009fec: 23 10 00 75 sethi %hi(0x4001d400), %l1 40009ff0: e0 04 62 28 ld [ %l1 + 0x228 ], %l0 ! 4001d628 <_User_extensions_List> 40009ff4: a2 14 62 28 or %l1, 0x228, %l1 40009ff8: a2 04 60 04 add %l1, 4, %l1 40009ffc: 80 a4 00 11 cmp %l0, %l1 4000a000: 02 80 00 0d be 4000a034 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 4000a004: 25 10 00 75 sethi %hi(0x4001d400), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( 4000a008: a4 14 a0 ac or %l2, 0xac, %l2 ! 4001d4ac <_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 ) 4000a00c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000a010: 80 a0 60 00 cmp %g1, 0 4000a014: 02 80 00 04 be 4000a024 <_User_extensions_Thread_start+0x3c> 4000a018: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_start)( 4000a01c: 9f c0 40 00 call %g1 4000a020: 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 ) { 4000a024: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4000a028: 80 a4 00 11 cmp %l0, %l1 4000a02c: 32 bf ff f9 bne,a 4000a010 <_User_extensions_Thread_start+0x28> 4000a030: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000a034: 81 c7 e0 08 ret 4000a038: 81 e8 00 00 restore =============================================================================== 4000a03c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 4000a03c: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 4000a040: 23 10 00 74 sethi %hi(0x4001d000), %l1 4000a044: e0 04 63 f4 ld [ %l1 + 0x3f4 ], %l0 ! 4001d3f4 <_User_extensions_Switches_list> 4000a048: a2 14 63 f4 or %l1, 0x3f4, %l1 4000a04c: a2 04 60 04 add %l1, 4, %l1 4000a050: 80 a4 00 11 cmp %l0, %l1 4000a054: 02 80 00 0a be 4000a07c <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 4000a058: 01 00 00 00 nop !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 4000a05c: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000a060: 90 10 00 18 mov %i0, %o0 4000a064: 9f c0 40 00 call %g1 4000a068: 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 ) { 4000a06c: 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 ; 4000a070: 80 a4 00 11 cmp %l0, %l1 4000a074: 32 bf ff fb bne,a 4000a060 <_User_extensions_Thread_switch+0x24> 4000a078: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000a07c: 81 c7 e0 08 ret 4000a080: 81 e8 00 00 restore =============================================================================== 4000c30c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000c30c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000c310: 7f ff da a2 call 40002d98 4000c314: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c318: c2 06 00 00 ld [ %i0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000c31c: a2 06 20 04 add %i0, 4, %l1 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000c320: 80 a0 40 11 cmp %g1, %l1 4000c324: 02 80 00 1f be 4000c3a0 <_Watchdog_Adjust+0x94> 4000c328: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000c32c: 12 80 00 1f bne 4000c3a8 <_Watchdog_Adjust+0x9c> 4000c330: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000c334: 80 a6 a0 00 cmp %i2, 0 4000c338: 02 80 00 1a be 4000c3a0 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 4000c33c: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c340: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c344: 80 a6 80 19 cmp %i2, %i1 4000c348: 1a 80 00 0b bcc 4000c374 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN 4000c34c: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 4000c350: 10 80 00 1d b 4000c3c4 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000c354: b4 26 40 1a sub %i1, %i2, %i2 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000c358: b4 a6 80 19 subcc %i2, %i1, %i2 4000c35c: 02 80 00 11 be 4000c3a0 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 4000c360: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c364: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c368: 80 a6 40 1a cmp %i1, %i2 4000c36c: 38 80 00 16 bgu,a 4000c3c4 <_Watchdog_Adjust+0xb8> 4000c370: b4 26 40 1a sub %i1, %i2, %i2 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4000c374: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 4000c378: 7f ff da 8c call 40002da8 4000c37c: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000c380: 40 00 00 b6 call 4000c658 <_Watchdog_Tickle> 4000c384: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000c388: 7f ff da 84 call 40002d98 4000c38c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c390: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 4000c394: 80 a4 40 02 cmp %l1, %g2 4000c398: 12 bf ff f0 bne 4000c358 <_Watchdog_Adjust+0x4c> 4000c39c: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 4000c3a0: 7f ff da 82 call 40002da8 4000c3a4: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000c3a8: 12 bf ff fe bne 4000c3a0 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 4000c3ac: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000c3b0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000c3b4: b4 00 80 1a add %g2, %i2, %i2 4000c3b8: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 4000c3bc: 7f ff da 7b call 40002da8 4000c3c0: 91 e8 00 08 restore %g0, %o0, %o0 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; 4000c3c4: 10 bf ff f7 b 4000c3a0 <_Watchdog_Adjust+0x94> 4000c3c8: f4 20 60 10 st %i2, [ %g1 + 0x10 ] =============================================================================== 4000a238 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4000a238: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000a23c: 7f ff de f6 call 40001e14 4000a240: 01 00 00 00 nop previous_state = the_watchdog->state; 4000a244: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 4000a248: 80 a4 20 01 cmp %l0, 1 4000a24c: 02 80 00 2a be 4000a2f4 <_Watchdog_Remove+0xbc> 4000a250: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000a254: 1a 80 00 09 bcc 4000a278 <_Watchdog_Remove+0x40> 4000a258: 80 a4 20 03 cmp %l0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a25c: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000a260: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 ! 4001d544 <_Watchdog_Ticks_since_boot> 4000a264: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 4000a268: 7f ff de ef call 40001e24 4000a26c: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 4000a270: 81 c7 e0 08 ret 4000a274: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4000a278: 18 bf ff fa bgu 4000a260 <_Watchdog_Remove+0x28> <== NEVER TAKEN 4000a27c: 03 10 00 75 sethi %hi(0x4001d400), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000a280: c2 06 00 00 ld [ %i0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000a284: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000a288: c4 00 40 00 ld [ %g1 ], %g2 4000a28c: 80 a0 a0 00 cmp %g2, 0 4000a290: 02 80 00 07 be 4000a2ac <_Watchdog_Remove+0x74> 4000a294: 05 10 00 75 sethi %hi(0x4001d400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000a298: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 4000a29c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 4000a2a0: 84 00 c0 02 add %g3, %g2, %g2 4000a2a4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 4000a2a8: 05 10 00 75 sethi %hi(0x4001d400), %g2 4000a2ac: c4 00 a1 40 ld [ %g2 + 0x140 ], %g2 ! 4001d540 <_Watchdog_Sync_count> 4000a2b0: 80 a0 a0 00 cmp %g2, 0 4000a2b4: 22 80 00 07 be,a 4000a2d0 <_Watchdog_Remove+0x98> 4000a2b8: c4 06 20 04 ld [ %i0 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 4000a2bc: 05 10 00 75 sethi %hi(0x4001d400), %g2 4000a2c0: c6 00 a0 88 ld [ %g2 + 0x88 ], %g3 ! 4001d488 <_ISR_Nest_level> 4000a2c4: 05 10 00 75 sethi %hi(0x4001d400), %g2 4000a2c8: c6 20 a0 a8 st %g3, [ %g2 + 0xa8 ] ! 4001d4a8 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000a2cc: c4 06 20 04 ld [ %i0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000a2d0: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000a2d4: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a2d8: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000a2dc: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 ! 4001d544 <_Watchdog_Ticks_since_boot> 4000a2e0: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 4000a2e4: 7f ff de d0 call 40001e24 4000a2e8: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 4000a2ec: 81 c7 e0 08 ret 4000a2f0: 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; 4000a2f4: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 /* * 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; 4000a2f8: c0 26 20 08 clr [ %i0 + 8 ] _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a2fc: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 4000a300: 7f ff de c9 call 40001e24 4000a304: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 4000a308: 81 c7 e0 08 ret 4000a30c: 81 e8 00 00 restore =============================================================================== 4000bb20 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4000bb20: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4000bb24: 7f ff db 74 call 400028f4 4000bb28: a0 10 00 18 mov %i0, %l0 4000bb2c: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 4000bb30: 11 10 00 84 sethi %hi(0x40021000), %o0 4000bb34: 94 10 00 19 mov %i1, %o2 4000bb38: 90 12 23 e8 or %o0, 0x3e8, %o0 4000bb3c: 7f ff e5 02 call 40004f44 4000bb40: 92 10 00 10 mov %l0, %o1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bb44: e2 06 40 00 ld [ %i1 ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000bb48: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 4000bb4c: 80 a4 40 19 cmp %l1, %i1 4000bb50: 02 80 00 0f be 4000bb8c <_Watchdog_Report_chain+0x6c> 4000bb54: 11 10 00 85 sethi %hi(0x40021400), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4000bb58: 92 10 00 11 mov %l1, %o1 4000bb5c: 40 00 00 11 call 4000bba0 <_Watchdog_Report> 4000bb60: 90 10 20 00 clr %o0 _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 4000bb64: e2 04 40 00 ld [ %l1 ], %l1 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 4000bb68: 80 a4 40 19 cmp %l1, %i1 4000bb6c: 12 bf ff fc bne 4000bb5c <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 4000bb70: 92 10 00 11 mov %l1, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4000bb74: 92 10 00 10 mov %l0, %o1 4000bb78: 11 10 00 85 sethi %hi(0x40021400), %o0 4000bb7c: 7f ff e4 f2 call 40004f44 4000bb80: 90 12 20 00 mov %o0, %o0 ! 40021400 <_Status_Object_name_errors_to_status+0x30> } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4000bb84: 7f ff db 60 call 40002904 4000bb88: 81 e8 00 00 restore _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4000bb8c: 7f ff e4 ee call 40004f44 4000bb90: 90 12 20 10 or %o0, 0x10, %o0 } _ISR_Enable( level ); 4000bb94: 7f ff db 5c call 40002904 4000bb98: 81 e8 00 00 restore =============================================================================== 4000e32c : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4000e32c: 9d e3 bf 98 save %sp, -104, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4000e330: a0 96 20 00 orcc %i0, 0, %l0 4000e334: 02 80 00 23 be 4000e3c0 4000e338: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000e33c: 80 a6 e0 00 cmp %i3, 0 4000e340: 02 80 00 20 be 4000e3c0 4000e344: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4000e348: 80 8e 60 10 btst 0x10, %i1 4000e34c: 02 80 00 1f be 4000e3c8 4000e350: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4000e354: 02 80 00 1b be 4000e3c0 4000e358: b0 10 20 0a mov 0xa, %i0 4000e35c: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000e360: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4001d3f0 <_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; 4000e364: c0 27 bf f8 clr [ %fp + -8 ] if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4000e368: f4 27 bf fc st %i2, [ %fp + -4 ] 4000e36c: 84 00 a0 01 inc %g2 4000e370: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ] * 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 ); 4000e374: 25 10 00 75 sethi %hi(0x4001d400), %l2 4000e378: 7f ff e7 19 call 40007fdc <_Objects_Allocate> 4000e37c: 90 14 a2 c4 or %l2, 0x2c4, %o0 ! 4001d6c4 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4000e380: a2 92 20 00 orcc %o0, 0, %l1 4000e384: 02 80 00 1e be 4000e3fc <== NEVER TAKEN 4000e388: 90 04 60 14 add %l1, 0x14, %o0 return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4000e38c: 92 07 bf f8 add %fp, -8, %o1 4000e390: 40 00 01 4b call 4000e8bc <_CORE_barrier_Initialize> 4000e394: f2 24 60 10 st %i1, [ %l1 + 0x10 ] 4000e398: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 4000e39c: c6 04 60 08 ld [ %l1 + 8 ], %g3 4000e3a0: a4 14 a2 c4 or %l2, 0x2c4, %l2 4000e3a4: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000e3a8: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000e3ac: 83 28 60 02 sll %g1, 2, %g1 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4000e3b0: c6 26 c0 00 st %g3, [ %i3 ] 4000e3b4: e2 20 80 01 st %l1, [ %g2 + %g1 ] _Thread_Enable_dispatch(); 4000e3b8: 7f ff ea c5 call 40008ecc <_Thread_Enable_dispatch> 4000e3bc: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000e3c0: 81 c7 e0 08 ret 4000e3c4: 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; 4000e3c8: 82 10 20 01 mov 1, %g1 4000e3cc: c2 27 bf f8 st %g1, [ %fp + -8 ] 4000e3d0: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000e3d4: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4001d3f0 <_Thread_Dispatch_disable_level> the_attributes.maximum_count = maximum_waiters; 4000e3d8: f4 27 bf fc st %i2, [ %fp + -4 ] 4000e3dc: 84 00 a0 01 inc %g2 4000e3e0: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ] 4000e3e4: 25 10 00 75 sethi %hi(0x4001d400), %l2 4000e3e8: 7f ff e6 fd call 40007fdc <_Objects_Allocate> 4000e3ec: 90 14 a2 c4 or %l2, 0x2c4, %o0 ! 4001d6c4 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4000e3f0: a2 92 20 00 orcc %o0, 0, %l1 4000e3f4: 12 bf ff e6 bne 4000e38c 4000e3f8: 90 04 60 14 add %l1, 0x14, %o0 _Thread_Enable_dispatch(); 4000e3fc: 7f ff ea b4 call 40008ecc <_Thread_Enable_dispatch> 4000e400: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 4000e404: 81 c7 e0 08 ret 4000e408: 81 e8 00 00 restore =============================================================================== 4000936c : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 4000936c: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40009370: 03 10 00 8f sethi %hi(0x40023c00), %g1 40009374: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 40023cb8 <_ISR_Nest_level> rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 40009378: 09 10 00 8f sethi %hi(0x40023c00), %g4 if ( rtems_interrupt_is_in_progress() ) 4000937c: 80 a0 60 00 cmp %g1, 0 40009380: 84 10 20 12 mov 0x12, %g2 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40009384: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40009388: 12 80 00 49 bne 400094ac 4000938c: c6 01 23 20 ld [ %g4 + 0x320 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 40009390: 80 a6 a0 00 cmp %i2, 0 40009394: 02 80 00 4b be 400094c0 40009398: 80 a6 60 00 cmp %i1, 0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 4000939c: 02 80 00 49 be 400094c0 400093a0: c6 26 80 00 st %g3, [ %i2 ] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 400093a4: c4 06 40 00 ld [ %i1 ], %g2 400093a8: 80 a0 a0 00 cmp %g2, 0 400093ac: 22 80 00 42 be,a 400094b4 400093b0: c4 06 60 04 ld [ %i1 + 4 ], %g2 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 400093b4: 80 a0 c0 18 cmp %g3, %i0 400093b8: 08 80 00 3d bleu 400094ac 400093bc: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400093c0: 05 10 00 8f sethi %hi(0x40023c00), %g2 400093c4: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 ! 40023c20 <_Thread_Dispatch_disable_level> 400093c8: 86 00 e0 01 inc %g3 400093cc: c6 20 a0 20 st %g3, [ %g2 + 0x20 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 400093d0: 80 a6 20 00 cmp %i0, 0 400093d4: 12 80 00 2b bne 40009480 400093d8: 05 10 00 8f sethi %hi(0x40023c00), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 400093dc: da 01 23 20 ld [ %g4 + 0x320 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 400093e0: 80 a3 60 00 cmp %o5, 0 400093e4: 02 80 00 3a be 400094cc <== NEVER TAKEN 400093e8: d8 00 a3 24 ld [ %g2 + 0x324 ], %o4 400093ec: 10 80 00 05 b 40009400 400093f0: 86 10 00 0c mov %o4, %g3 400093f4: 80 a3 40 18 cmp %o5, %i0 400093f8: 08 80 00 0b bleu 40009424 400093fc: 86 00 e0 18 add %g3, 0x18, %g3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009400: c8 00 c0 00 ld [ %g3 ], %g4 40009404: 80 a1 20 00 cmp %g4, 0 40009408: 32 bf ff fb bne,a 400093f4 4000940c: b0 06 20 01 inc %i0 40009410: c8 00 e0 04 ld [ %g3 + 4 ], %g4 40009414: 80 a1 20 00 cmp %g4, 0 40009418: 32 bf ff f7 bne,a 400093f4 4000941c: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 40009420: 80 a3 40 18 cmp %o5, %i0 40009424: 02 80 00 2b be 400094d0 40009428: f0 26 80 00 st %i0, [ %i2 ] 4000942c: 85 2e 20 03 sll %i0, 3, %g2 40009430: 87 2e 20 05 sll %i0, 5, %g3 40009434: 84 20 c0 02 sub %g3, %g2, %g2 40009438: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 4000943c: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40009440: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40009444: c6 20 80 00 st %g3, [ %g2 ] 40009448: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4000944c: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40009450: c6 20 a0 04 st %g3, [ %g2 + 4 ] 40009454: c6 00 60 08 ld [ %g1 + 8 ], %g3 40009458: c6 20 a0 08 st %g3, [ %g2 + 8 ] 4000945c: c6 00 60 0c ld [ %g1 + 0xc ], %g3 40009460: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 40009464: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 40009468: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 4000946c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 40009470: 40 00 07 2f call 4000b12c <_Thread_Enable_dispatch> 40009474: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 40009478: 40 00 24 30 call 40012538 4000947c: 81 e8 00 00 restore _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 40009480: c6 00 a3 24 ld [ %g2 + 0x324 ], %g3 40009484: 89 2e 20 05 sll %i0, 5, %g4 40009488: 85 2e 20 03 sll %i0, 3, %g2 4000948c: 84 21 00 02 sub %g4, %g2, %g2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009490: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 40009494: 80 a1 20 00 cmp %g4, 0 40009498: 02 80 00 12 be 400094e0 4000949c: 84 00 c0 02 add %g3, %g2, %g2 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 400094a0: 40 00 07 23 call 4000b12c <_Thread_Enable_dispatch> 400094a4: 01 00 00 00 nop 400094a8: 84 10 20 0c mov 0xc, %g2 ! c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 400094ac: 81 c7 e0 08 ret 400094b0: 91 e8 00 02 restore %g0, %g2, %o0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 400094b4: 80 a0 a0 00 cmp %g2, 0 400094b8: 12 bf ff c0 bne 400093b8 400094bc: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 400094c0: 84 10 20 09 mov 9, %g2 } 400094c4: 81 c7 e0 08 ret 400094c8: 91 e8 00 02 restore %g0, %g2, %o0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 400094cc: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 400094d0: 40 00 07 17 call 4000b12c <_Thread_Enable_dispatch> 400094d4: 01 00 00 00 nop return sc; 400094d8: 10 bf ff f5 b 400094ac 400094dc: 84 10 20 05 mov 5, %g2 ! 5 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 400094e0: c6 00 a0 04 ld [ %g2 + 4 ], %g3 400094e4: 80 a0 e0 00 cmp %g3, 0 400094e8: 12 bf ff ee bne 400094a0 400094ec: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 400094f0: 10 bf ff d3 b 4000943c 400094f4: f0 26 80 00 st %i0, [ %i2 ] =============================================================================== 40009c34 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40009c34: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40009c38: 80 a6 20 00 cmp %i0, 0 40009c3c: 02 80 00 23 be 40009cc8 <== NEVER TAKEN 40009c40: 25 10 00 ae sethi %hi(0x4002b800), %l2 40009c44: a4 14 a1 34 or %l2, 0x134, %l2 ! 4002b934 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 40009c48: a6 04 a0 10 add %l2, 0x10, %l3 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40009c4c: c2 04 80 00 ld [ %l2 ], %g1 40009c50: 80 a0 60 00 cmp %g1, 0 40009c54: 22 80 00 1a be,a 40009cbc 40009c58: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40009c5c: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 40009c60: 80 a4 60 00 cmp %l1, 0 40009c64: 22 80 00 16 be,a 40009cbc 40009c68: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40009c6c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40009c70: 84 90 60 00 orcc %g1, 0, %g2 40009c74: 22 80 00 12 be,a 40009cbc <== NEVER TAKEN 40009c78: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 40009c7c: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40009c80: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40009c84: 83 2c 20 02 sll %l0, 2, %g1 40009c88: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 40009c8c: 90 90 60 00 orcc %g1, 0, %o0 40009c90: 02 80 00 05 be 40009ca4 <== NEVER TAKEN 40009c94: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40009c98: 9f c6 00 00 call %i0 40009c9c: 01 00 00 00 nop 40009ca0: c4 14 60 10 lduh [ %l1 + 0x10 ], %g2 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40009ca4: 83 28 a0 10 sll %g2, 0x10, %g1 40009ca8: 83 30 60 10 srl %g1, 0x10, %g1 40009cac: 80 a0 40 10 cmp %g1, %l0 40009cb0: 3a bf ff f5 bcc,a 40009c84 40009cb4: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40009cb8: a4 04 a0 04 add %l2, 4, %l2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 40009cbc: 80 a4 80 13 cmp %l2, %l3 40009cc0: 32 bf ff e4 bne,a 40009c50 40009cc4: c2 04 80 00 ld [ %l2 ], %g1 40009cc8: 81 c7 e0 08 ret 40009ccc: 81 e8 00 00 restore =============================================================================== 400088b4 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 400088b4: 9d e3 bf a0 save %sp, -96, %sp 400088b8: 90 10 00 18 mov %i0, %o0 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 400088bc: 80 a6 a0 00 cmp %i2, 0 400088c0: 02 80 00 20 be 40008940 400088c4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 400088c8: 92 10 00 19 mov %i1, %o1 400088cc: 40 00 07 19 call 4000a530 <_Objects_Get_information> 400088d0: b0 10 20 0a mov 0xa, %i0 if ( !obj_info ) 400088d4: 80 a2 20 00 cmp %o0, 0 400088d8: 02 80 00 1a be 40008940 400088dc: 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; 400088e0: 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; 400088e4: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 400088e8: c4 0a 20 12 ldub [ %o0 + 0x12 ], %g2 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 400088ec: c2 26 80 00 st %g1, [ %i2 ] info->maximum_id = obj_info->maximum_id; 400088f0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 info->auto_extend = obj_info->auto_extend; 400088f4: 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; 400088f8: c2 26 a0 04 st %g1, [ %i2 + 4 ] info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 400088fc: c8 26 a0 08 st %g4, [ %i2 + 8 ] for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 40008900: 80 a1 20 00 cmp %g4, 0 40008904: 02 80 00 0d be 40008938 <== NEVER TAKEN 40008908: 84 10 20 00 clr %g2 4000890c: da 02 20 1c ld [ %o0 + 0x1c ], %o5 40008910: 86 10 20 01 mov 1, %g3 40008914: 82 10 20 01 mov 1, %g1 if ( !obj_info->local_table[i] ) 40008918: 87 28 e0 02 sll %g3, 2, %g3 4000891c: c6 03 40 03 ld [ %o5 + %g3 ], %g3 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++ ) 40008920: 82 00 60 01 inc %g1 if ( !obj_info->local_table[i] ) unallocated++; 40008924: 80 a0 00 03 cmp %g0, %g3 40008928: 84 60 bf ff subx %g2, -1, %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++ ) 4000892c: 80 a1 00 01 cmp %g4, %g1 40008930: 1a bf ff fa bcc 40008918 40008934: 86 10 00 01 mov %g1, %g3 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 40008938: c4 26 a0 10 st %g2, [ %i2 + 0x10 ] 4000893c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40008940: 81 c7 e0 08 ret 40008944: 81 e8 00 00 restore =============================================================================== 40014ae0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 40014ae0: 9d e3 bf a0 save %sp, -96, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 40014ae4: a0 96 20 00 orcc %i0, 0, %l0 40014ae8: 02 80 00 31 be 40014bac 40014aec: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 40014af0: 80 a6 60 00 cmp %i1, 0 40014af4: 02 80 00 32 be 40014bbc 40014af8: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 40014afc: 02 80 00 30 be 40014bbc <== NEVER TAKEN 40014b00: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 40014b04: 02 80 00 2c be 40014bb4 40014b08: 80 a6 a0 00 cmp %i2, 0 40014b0c: 02 80 00 2a be 40014bb4 40014b10: 80 a6 80 1b cmp %i2, %i3 40014b14: 0a 80 00 28 bcs 40014bb4 40014b18: 80 8e e0 07 btst 7, %i3 40014b1c: 12 80 00 26 bne 40014bb4 40014b20: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 40014b24: 12 80 00 26 bne 40014bbc 40014b28: 03 10 00 fa sethi %hi(0x4003e800), %g1 40014b2c: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 4003ead0 <_Thread_Dispatch_disable_level> 40014b30: 84 00 a0 01 inc %g2 40014b34: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ] * 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 ); 40014b38: 25 10 00 fa sethi %hi(0x4003e800), %l2 40014b3c: 40 00 12 4a call 40019464 <_Objects_Allocate> 40014b40: 90 14 a0 d8 or %l2, 0xd8, %o0 ! 4003e8d8 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 40014b44: a2 92 20 00 orcc %o0, 0, %l1 40014b48: 02 80 00 1f be 40014bc4 40014b4c: 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; 40014b50: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 40014b54: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 40014b58: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 40014b5c: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 40014b60: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 40014b64: 40 00 61 4b call 4002d090 <.udiv> 40014b68: 90 10 00 1a mov %i2, %o0 40014b6c: 92 10 00 19 mov %i1, %o1 40014b70: 94 10 00 08 mov %o0, %o2 40014b74: 96 10 00 1b mov %i3, %o3 40014b78: b8 04 60 24 add %l1, 0x24, %i4 40014b7c: 40 00 0c be call 40017e74 <_Chain_Initialize> 40014b80: 90 10 00 1c mov %i4, %o0 40014b84: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 40014b88: c6 04 60 08 ld [ %l1 + 8 ], %g3 40014b8c: a4 14 a0 d8 or %l2, 0xd8, %l2 40014b90: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40014b94: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40014b98: 83 28 60 02 sll %g1, 2, %g1 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 40014b9c: c6 27 40 00 st %g3, [ %i5 ] 40014ba0: e2 20 80 01 st %l1, [ %g2 + %g1 ] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40014ba4: 40 00 16 23 call 4001a430 <_Thread_Enable_dispatch> 40014ba8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 40014bac: 81 c7 e0 08 ret 40014bb0: 81 e8 00 00 restore } 40014bb4: 81 c7 e0 08 ret 40014bb8: 91 e8 20 08 restore %g0, 8, %o0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 40014bbc: 81 c7 e0 08 ret 40014bc0: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 40014bc4: 40 00 16 1b call 4001a430 <_Thread_Enable_dispatch> 40014bc8: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 40014bcc: 81 c7 e0 08 ret 40014bd0: 81 e8 00 00 restore =============================================================================== 40007e84 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 40007e84: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 40007e88: 11 10 00 8c sethi %hi(0x40023000), %o0 40007e8c: 92 10 00 18 mov %i0, %o1 40007e90: 90 12 21 90 or %o0, 0x190, %o0 40007e94: 40 00 09 13 call 4000a2e0 <_Objects_Get> 40007e98: 94 07 bf fc add %fp, -4, %o2 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40007e9c: c2 07 bf fc ld [ %fp + -4 ], %g1 40007ea0: 80 a0 60 00 cmp %g1, 0 40007ea4: 02 80 00 04 be 40007eb4 40007ea8: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007eac: 81 c7 e0 08 ret 40007eb0: 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 ) ) { 40007eb4: 23 10 00 8c sethi %hi(0x40023000), %l1 40007eb8: c4 02 20 40 ld [ %o0 + 0x40 ], %g2 40007ebc: c2 04 63 bc ld [ %l1 + 0x3bc ], %g1 40007ec0: 80 a0 80 01 cmp %g2, %g1 40007ec4: 02 80 00 06 be 40007edc 40007ec8: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 40007ecc: 40 00 0b 6d call 4000ac80 <_Thread_Enable_dispatch> 40007ed0: b0 10 20 17 mov 0x17, %i0 return RTEMS_NOT_OWNER_OF_RESOURCE; 40007ed4: 81 c7 e0 08 ret 40007ed8: 81 e8 00 00 restore } if ( length == RTEMS_PERIOD_STATUS ) { 40007edc: 12 80 00 0e bne 40007f14 40007ee0: 01 00 00 00 nop switch ( the_period->state ) { 40007ee4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40007ee8: 80 a0 60 04 cmp %g1, 4 40007eec: 18 80 00 06 bgu 40007f04 <== NEVER TAKEN 40007ef0: b0 10 20 00 clr %i0 40007ef4: 83 28 60 02 sll %g1, 2, %g1 40007ef8: 05 10 00 84 sethi %hi(0x40021000), %g2 40007efc: 84 10 a0 48 or %g2, 0x48, %g2 ! 40021048 40007f00: f0 00 80 01 ld [ %g2 + %g1 ], %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40007f04: 40 00 0b 5f call 4000ac80 <_Thread_Enable_dispatch> 40007f08: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 40007f0c: 81 c7 e0 08 ret 40007f10: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007f14: 7f ff eb 74 call 40002ce4 40007f18: 01 00 00 00 nop 40007f1c: a6 10 00 08 mov %o0, %l3 switch ( the_period->state ) { 40007f20: e4 04 20 38 ld [ %l0 + 0x38 ], %l2 40007f24: 80 a4 a0 02 cmp %l2, 2 40007f28: 02 80 00 1a be 40007f90 40007f2c: 80 a4 a0 04 cmp %l2, 4 40007f30: 02 80 00 32 be 40007ff8 40007f34: 80 a4 a0 00 cmp %l2, 0 40007f38: 12 bf ff dd bne 40007eac <== NEVER TAKEN 40007f3c: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 40007f40: 7f ff eb 6d call 40002cf4 40007f44: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40007f48: 7f ff ff 48 call 40007c68 <_Rate_monotonic_Initiate_statistics> 40007f4c: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007f50: 82 10 20 02 mov 2, %g1 40007f54: c2 24 20 38 st %g1, [ %l0 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007f58: 03 10 00 20 sethi %hi(0x40008000), %g1 40007f5c: 82 10 63 4c or %g1, 0x34c, %g1 ! 4000834c <_Rate_monotonic_Timeout> the_watchdog->id = id; 40007f60: f0 24 20 30 st %i0, [ %l0 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007f64: 92 04 20 10 add %l0, 0x10, %o1 40007f68: 11 10 00 8c sethi %hi(0x40023000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007f6c: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007f70: 90 12 23 dc or %o0, 0x3dc, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007f74: c0 24 20 18 clr [ %l0 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007f78: c0 24 20 34 clr [ %l0 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007f7c: f2 24 20 3c st %i1, [ %l0 + 0x3c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007f80: c2 24 20 2c st %g1, [ %l0 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007f84: 40 00 10 8d call 4000c1b8 <_Watchdog_Insert> 40007f88: b0 10 20 00 clr %i0 40007f8c: 30 bf ff de b,a 40007f04 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 40007f90: 7f ff ff 7d call 40007d84 <_Rate_monotonic_Update_statistics> 40007f94: 90 10 00 10 mov %l0, %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; 40007f98: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007f9c: f2 24 20 3c st %i1, [ %l0 + 0x3c ] /* * 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; 40007fa0: c2 24 20 38 st %g1, [ %l0 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40007fa4: 7f ff eb 54 call 40002cf4 40007fa8: 90 10 00 13 mov %l3, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40007fac: c2 04 63 bc ld [ %l1 + 0x3bc ], %g1 40007fb0: c4 04 20 08 ld [ %l0 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007fb4: 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; 40007fb8: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007fbc: 40 00 0d b0 call 4000b67c <_Thread_Set_state> 40007fc0: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40007fc4: 7f ff eb 48 call 40002ce4 40007fc8: 01 00 00 00 nop local_state = the_period->state; 40007fcc: e6 04 20 38 ld [ %l0 + 0x38 ], %l3 the_period->state = RATE_MONOTONIC_ACTIVE; 40007fd0: e4 24 20 38 st %l2, [ %l0 + 0x38 ] _ISR_Enable( level ); 40007fd4: 7f ff eb 48 call 40002cf4 40007fd8: 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 ) 40007fdc: 80 a4 e0 03 cmp %l3, 3 40007fe0: 02 80 00 17 be 4000803c 40007fe4: d0 04 63 bc ld [ %l1 + 0x3bc ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 40007fe8: 40 00 0b 26 call 4000ac80 <_Thread_Enable_dispatch> 40007fec: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 40007ff0: 81 c7 e0 08 ret 40007ff4: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007ff8: 7f ff ff 63 call 40007d84 <_Rate_monotonic_Update_statistics> 40007ffc: 90 10 00 10 mov %l0, %o0 _ISR_Enable( level ); 40008000: 7f ff eb 3d call 40002cf4 40008004: 90 10 00 13 mov %l3, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40008008: 82 10 20 02 mov 2, %g1 4000800c: 92 04 20 10 add %l0, 0x10, %o1 40008010: 11 10 00 8c sethi %hi(0x40023000), %o0 40008014: 90 12 23 dc or %o0, 0x3dc, %o0 ! 400233dc <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008018: f2 24 20 1c st %i1, [ %l0 + 0x1c ] the_period->next_length = length; 4000801c: f2 24 20 3c st %i1, [ %l0 + 0x3c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40008020: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008024: 40 00 10 65 call 4000c1b8 <_Watchdog_Insert> 40008028: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4000802c: 40 00 0b 15 call 4000ac80 <_Thread_Enable_dispatch> 40008030: 01 00 00 00 nop return RTEMS_TIMEOUT; 40008034: 81 c7 e0 08 ret 40008038: 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 ); 4000803c: 40 00 0a 15 call 4000a890 <_Thread_Clear_state> 40008040: 13 00 00 10 sethi %hi(0x4000), %o1 40008044: 30 bf ff e9 b,a 40007fe8 =============================================================================== 40008048 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40008048: 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 ) 4000804c: 80 a6 60 00 cmp %i1, 0 40008050: 02 80 00 4d be 40008184 <== NEVER TAKEN 40008054: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40008058: 13 10 00 84 sethi %hi(0x40021000), %o1 4000805c: 9f c6 40 00 call %i1 40008060: 92 12 60 60 or %o1, 0x60, %o1 ! 40021060 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 40008064: 90 10 00 18 mov %i0, %o0 40008068: 13 10 00 84 sethi %hi(0x40021000), %o1 4000806c: 9f c6 40 00 call %i1 40008070: 92 12 60 80 or %o1, 0x80, %o1 ! 40021080 (*print)( context, "--- Wall times are in seconds ---\n" ); 40008074: 90 10 00 18 mov %i0, %o0 40008078: 13 10 00 84 sethi %hi(0x40021000), %o1 4000807c: 9f c6 40 00 call %i1 40008080: 92 12 60 a8 or %o1, 0xa8, %o1 ! 400210a8 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40008084: 90 10 00 18 mov %i0, %o0 40008088: 13 10 00 84 sethi %hi(0x40021000), %o1 4000808c: 9f c6 40 00 call %i1 40008090: 92 12 60 d0 or %o1, 0xd0, %o1 ! 400210d0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 40008094: 90 10 00 18 mov %i0, %o0 40008098: 13 10 00 84 sethi %hi(0x40021000), %o1 4000809c: 9f c6 40 00 call %i1 400080a0: 92 12 61 20 or %o1, 0x120, %o1 ! 40021120 /* * 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 ; 400080a4: 23 10 00 8c sethi %hi(0x40023000), %l1 400080a8: a2 14 61 90 or %l1, 0x190, %l1 ! 40023190 <_Rate_monotonic_Information> 400080ac: e0 04 60 08 ld [ %l1 + 8 ], %l0 400080b0: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400080b4: 80 a4 00 01 cmp %l0, %g1 400080b8: 18 80 00 33 bgu 40008184 <== NEVER TAKEN 400080bc: 3b 10 00 84 sethi %hi(0x40021000), %i5 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 400080c0: 39 10 00 84 sethi %hi(0x40021000), %i4 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 400080c4: 35 10 00 84 sethi %hi(0x40021000), %i2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 400080c8: 2f 10 00 84 sethi %hi(0x40021000), %l7 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400080cc: ba 17 61 70 or %i5, 0x170, %i5 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 400080d0: b8 17 21 90 or %i4, 0x190, %i4 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 400080d4: b4 16 a1 b0 or %i2, 0x1b0, %i2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 400080d8: ae 15 e1 88 or %l7, 0x188, %l7 400080dc: a4 07 bf a0 add %fp, -96, %l2 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 ); 400080e0: ac 07 bf d8 add %fp, -40, %l6 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 400080e4: a6 07 bf f8 add %fp, -8, %l3 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 400080e8: aa 07 bf b8 add %fp, -72, %l5 400080ec: 10 80 00 06 b 40008104 400080f0: a8 07 bf f0 add %fp, -16, %l4 * 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++ ) { 400080f4: a0 04 20 01 inc %l0 /* * 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 ; 400080f8: 80 a0 40 10 cmp %g1, %l0 400080fc: 0a 80 00 22 bcs 40008184 40008100: 01 00 00 00 nop id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40008104: 90 10 00 10 mov %l0, %o0 40008108: 40 00 19 4b call 4000e634 4000810c: 92 10 00 12 mov %l2, %o1 if ( status != RTEMS_SUCCESSFUL ) 40008110: 80 a2 20 00 cmp %o0, 0 40008114: 32 bf ff f8 bne,a 400080f4 40008118: c2 04 60 0c ld [ %l1 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 4000811c: 92 10 00 16 mov %l6, %o1 40008120: 40 00 19 74 call 4000e6f0 40008124: 90 10 00 10 mov %l0, %o0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 40008128: d0 07 bf d8 ld [ %fp + -40 ], %o0 4000812c: 94 10 00 13 mov %l3, %o2 40008130: 40 00 00 b7 call 4000840c 40008134: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40008138: d8 1f bf a0 ldd [ %fp + -96 ], %o4 4000813c: 92 10 00 1d mov %i5, %o1 40008140: 94 10 00 10 mov %l0, %o2 40008144: 90 10 00 18 mov %i0, %o0 40008148: 9f c6 40 00 call %i1 4000814c: 96 10 00 13 mov %l3, %o3 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40008150: c2 07 bf a0 ld [ %fp + -96 ], %g1 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 40008154: 94 10 00 14 mov %l4, %o2 40008158: 90 10 00 15 mov %l5, %o0 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 4000815c: 80 a0 60 00 cmp %g1, 0 40008160: 12 80 00 0b bne 4000818c 40008164: 92 10 00 17 mov %l7, %o1 (*print)( context, "\n" ); 40008168: 9f c6 40 00 call %i1 4000816c: 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 ; 40008170: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 40008174: a0 04 20 01 inc %l0 /* * 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 ; 40008178: 80 a0 40 10 cmp %g1, %l0 4000817c: 1a bf ff e3 bcc 40008108 <== ALWAYS TAKEN 40008180: 90 10 00 10 mov %l0, %o0 40008184: 81 c7 e0 08 ret 40008188: 81 e8 00 00 restore struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 4000818c: 40 00 0e d0 call 4000bccc <_Timespec_Divide_by_integer> 40008190: 92 10 00 01 mov %g1, %o1 (*print)( context, 40008194: d0 07 bf ac ld [ %fp + -84 ], %o0 40008198: 40 00 54 e1 call 4001d51c <.div> 4000819c: 92 10 23 e8 mov 0x3e8, %o1 400081a0: 96 10 00 08 mov %o0, %o3 400081a4: d0 07 bf b4 ld [ %fp + -76 ], %o0 400081a8: d6 27 bf 9c st %o3, [ %fp + -100 ] 400081ac: 40 00 54 dc call 4001d51c <.div> 400081b0: 92 10 23 e8 mov 0x3e8, %o1 400081b4: c2 07 bf f0 ld [ %fp + -16 ], %g1 400081b8: b6 10 00 08 mov %o0, %i3 400081bc: d0 07 bf f4 ld [ %fp + -12 ], %o0 400081c0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400081c4: 40 00 54 d6 call 4001d51c <.div> 400081c8: 92 10 23 e8 mov 0x3e8, %o1 400081cc: d8 07 bf b0 ld [ %fp + -80 ], %o4 400081d0: d6 07 bf 9c ld [ %fp + -100 ], %o3 400081d4: d4 07 bf a8 ld [ %fp + -88 ], %o2 400081d8: 9a 10 00 1b mov %i3, %o5 400081dc: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 400081e0: 92 10 00 1c mov %i4, %o1 400081e4: 9f c6 40 00 call %i1 400081e8: 90 10 00 18 mov %i0, %o0 struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 400081ec: d2 07 bf a0 ld [ %fp + -96 ], %o1 400081f0: 94 10 00 14 mov %l4, %o2 400081f4: 40 00 0e b6 call 4000bccc <_Timespec_Divide_by_integer> 400081f8: 90 07 bf d0 add %fp, -48, %o0 (*print)( context, 400081fc: d0 07 bf c4 ld [ %fp + -60 ], %o0 40008200: 40 00 54 c7 call 4001d51c <.div> 40008204: 92 10 23 e8 mov 0x3e8, %o1 40008208: 96 10 00 08 mov %o0, %o3 4000820c: d0 07 bf cc ld [ %fp + -52 ], %o0 40008210: d6 27 bf 9c st %o3, [ %fp + -100 ] 40008214: 40 00 54 c2 call 4001d51c <.div> 40008218: 92 10 23 e8 mov 0x3e8, %o1 4000821c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40008220: b6 10 00 08 mov %o0, %i3 40008224: d0 07 bf f4 ld [ %fp + -12 ], %o0 40008228: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000822c: 40 00 54 bc call 4001d51c <.div> 40008230: 92 10 23 e8 mov 0x3e8, %o1 40008234: d4 07 bf c0 ld [ %fp + -64 ], %o2 40008238: d6 07 bf 9c ld [ %fp + -100 ], %o3 4000823c: d8 07 bf c8 ld [ %fp + -56 ], %o4 40008240: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40008244: 9a 10 00 1b mov %i3, %o5 40008248: 90 10 00 18 mov %i0, %o0 4000824c: 9f c6 40 00 call %i1 40008250: 92 10 00 1a mov %i2, %o1 /* * 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 ; 40008254: 10 bf ff a8 b 400080f4 40008258: c2 04 60 0c ld [ %l1 + 0xc ], %g1 =============================================================================== 40008278 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 40008278: 9d e3 bf a0 save %sp, -96, %sp 4000827c: 03 10 00 8c sethi %hi(0x40023000), %g1 40008280: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 40023300 <_Thread_Dispatch_disable_level> 40008284: 84 00 a0 01 inc %g2 40008288: c4 20 63 00 st %g2, [ %g1 + 0x300 ] /* * 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 ; 4000828c: 23 10 00 8c sethi %hi(0x40023000), %l1 40008290: a2 14 61 90 or %l1, 0x190, %l1 ! 40023190 <_Rate_monotonic_Information> 40008294: e0 04 60 08 ld [ %l1 + 8 ], %l0 40008298: c2 04 60 0c ld [ %l1 + 0xc ], %g1 4000829c: 80 a4 00 01 cmp %l0, %g1 400082a0: 18 80 00 09 bgu 400082c4 <== NEVER TAKEN 400082a4: 01 00 00 00 nop id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 400082a8: 40 00 00 0a call 400082d0 400082ac: 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 ; 400082b0: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 400082b4: 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 ; 400082b8: 80 a0 40 10 cmp %g1, %l0 400082bc: 1a bf ff fb bcc 400082a8 400082c0: 01 00 00 00 nop } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 400082c4: 40 00 0a 6f call 4000ac80 <_Thread_Enable_dispatch> 400082c8: 81 e8 00 00 restore =============================================================================== 400159c4 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 400159c4: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 400159c8: 80 a6 60 00 cmp %i1, 0 400159cc: 02 80 00 22 be 40015a54 400159d0: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( !size ) 400159d4: 02 80 00 20 be 40015a54 400159d8: 21 10 00 fa sethi %hi(0x4003e800), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 400159dc: 40 00 08 e5 call 40017d70 <_API_Mutex_Lock> 400159e0: d0 04 23 84 ld [ %l0 + 0x384 ], %o0 ! 4003eb84 <_RTEMS_Allocator_Mutex> 400159e4: 92 10 00 18 mov %i0, %o1 400159e8: 11 10 00 fa sethi %hi(0x4003e800), %o0 400159ec: 94 07 bf fc add %fp, -4, %o2 400159f0: 40 00 0f f1 call 400199b4 <_Objects_Get_no_protection> 400159f4: 90 12 21 58 or %o0, 0x158, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 400159f8: c2 07 bf fc ld [ %fp + -4 ], %g1 400159fc: 80 a0 60 00 cmp %g1, 0 40015a00: 12 80 00 0f bne 40015a3c 40015a04: 80 a0 60 01 cmp %g1, 1 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 40015a08: 90 02 20 68 add %o0, 0x68, %o0 40015a0c: 92 10 00 19 mov %i1, %o1 40015a10: 94 10 00 1a mov %i2, %o2 40015a14: 40 00 0e 45 call 40019328 <_Heap_Size_of_alloc_area> 40015a18: b0 10 20 09 mov 9, %i0 40015a1c: 80 8a 20 ff btst 0xff, %o0 40015a20: 02 80 00 03 be 40015a2c <== NEVER TAKEN 40015a24: 01 00 00 00 nop 40015a28: b0 10 20 00 clr %i0 ! 0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40015a2c: 40 00 08 e7 call 40017dc8 <_API_Mutex_Unlock> 40015a30: d0 04 23 84 ld [ %l0 + 0x384 ], %o0 return return_status; 40015a34: 81 c7 e0 08 ret 40015a38: 81 e8 00 00 restore return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40015a3c: 12 bf ff fb bne 40015a28 <== NEVER TAKEN 40015a40: b0 10 20 04 mov 4, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40015a44: 40 00 08 e1 call 40017dc8 <_API_Mutex_Unlock> 40015a48: d0 04 23 84 ld [ %l0 + 0x384 ], %o0 return return_status; 40015a4c: 81 c7 e0 08 ret 40015a50: 81 e8 00 00 restore } 40015a54: 81 c7 e0 08 ret 40015a58: 91 e8 20 09 restore %g0, 9, %o0 =============================================================================== 400160e8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 400160e8: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 400160ec: 80 a6 60 00 cmp %i1, 0 400160f0: 12 80 00 04 bne 40016100 400160f4: 82 10 20 0a mov 0xa, %g1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400160f8: 81 c7 e0 08 ret 400160fc: 91 e8 00 01 restore %g0, %g1, %o0 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 40016100: 90 10 00 18 mov %i0, %o0 40016104: 40 00 10 ef call 4001a4c0 <_Thread_Get> 40016108: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 4001610c: c4 07 bf fc ld [ %fp + -4 ], %g2 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 40016110: a2 10 00 08 mov %o0, %l1 switch ( location ) { 40016114: 80 a0 a0 00 cmp %g2, 0 40016118: 12 bf ff f8 bne 400160f8 4001611c: 82 10 20 04 mov 4, %g1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 40016120: e0 02 21 5c ld [ %o0 + 0x15c ], %l0 asr = &api->Signal; 40016124: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40016128: 80 a0 60 00 cmp %g1, 0 4001612c: 02 80 00 26 be 400161c4 40016130: 01 00 00 00 nop if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 40016134: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 40016138: 80 a0 60 00 cmp %g1, 0 4001613c: 02 80 00 16 be 40016194 40016140: 01 00 00 00 nop rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40016144: 7f ff e4 29 call 4000f1e8 40016148: 01 00 00 00 nop *signal_set |= signals; 4001614c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40016150: b2 10 40 19 or %g1, %i1, %i1 40016154: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _ISR_Enable( _level ); 40016158: 7f ff e4 28 call 4000f1f8 4001615c: 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 ) ) 40016160: 03 10 00 fa sethi %hi(0x4003e800), %g1 40016164: c4 00 63 68 ld [ %g1 + 0x368 ], %g2 ! 4003eb68 <_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; 40016168: 82 10 20 01 mov 1, %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4001616c: 80 a0 a0 00 cmp %g2, 0 40016170: 02 80 00 10 be 400161b0 40016174: c2 2c 60 74 stb %g1, [ %l1 + 0x74 ] 40016178: 05 10 00 fa sethi %hi(0x4003e800), %g2 4001617c: c4 00 a3 8c ld [ %g2 + 0x38c ], %g2 ! 4003eb8c <_Thread_Executing> 40016180: 80 a4 40 02 cmp %l1, %g2 40016184: 12 80 00 0b bne 400161b0 <== NEVER TAKEN 40016188: 05 10 00 fb sethi %hi(0x4003ec00), %g2 _ISR_Signals_to_thread_executing = true; 4001618c: 10 80 00 09 b 400161b0 40016190: c2 28 a0 28 stb %g1, [ %g2 + 0x28 ] ! 4003ec28 <_ISR_Signals_to_thread_executing> rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40016194: 7f ff e4 15 call 4000f1e8 40016198: 01 00 00 00 nop *signal_set |= signals; 4001619c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 400161a0: b2 10 40 19 or %g1, %i1, %i1 400161a4: f2 24 20 18 st %i1, [ %l0 + 0x18 ] _ISR_Enable( _level ); 400161a8: 7f ff e4 14 call 4000f1f8 400161ac: 01 00 00 00 nop } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 400161b0: 40 00 10 a0 call 4001a430 <_Thread_Enable_dispatch> 400161b4: 01 00 00 00 nop 400161b8: 82 10 20 00 clr %g1 ! 0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400161bc: 81 c7 e0 08 ret 400161c0: 91 e8 00 01 restore %g0, %g1, %o0 _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 400161c4: 40 00 10 9b call 4001a430 <_Thread_Enable_dispatch> 400161c8: 01 00 00 00 nop return RTEMS_NOT_DEFINED; 400161cc: 10 bf ff cb b 400160f8 400161d0: 82 10 20 0b mov 0xb, %g1 ! b =============================================================================== 4000e538 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4000e538: 9d e3 bf a0 save %sp, -96, %sp ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4000e53c: 80 a6 a0 00 cmp %i2, 0 4000e540: 02 80 00 44 be 4000e650 4000e544: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4000e548: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000e54c: e0 00 60 ac ld [ %g1 + 0xac ], %l0 ! 4001d4ac <_Thread_Executing> api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4000e550: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4000e554: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4000e558: 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 ]; 4000e55c: e2 04 21 5c ld [ %l0 + 0x15c ], %l1 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4000e560: a4 60 3f ff subx %g0, -1, %l2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4000e564: 80 a0 60 00 cmp %g1, 0 4000e568: 12 80 00 3c bne 4000e658 4000e56c: a5 2c a0 08 sll %l2, 8, %l2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000e570: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 4000e574: 80 a0 00 01 cmp %g0, %g1 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4000e578: 7f ff f0 d4 call 4000a8c8 <_CPU_ISR_Get_level> 4000e57c: a6 60 3f ff subx %g0, -1, %l3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000e580: a7 2c e0 0a sll %l3, 0xa, %l3 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; 4000e584: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4000e588: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4000e58c: 80 8e 61 00 btst 0x100, %i1 4000e590: 02 80 00 06 be 4000e5a8 4000e594: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4000e598: 83 36 20 08 srl %i0, 8, %g1 4000e59c: 82 18 60 01 xor %g1, 1, %g1 4000e5a0: 82 08 60 01 and %g1, 1, %g1 4000e5a4: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ] if ( mask & RTEMS_TIMESLICE_MASK ) { 4000e5a8: 80 8e 62 00 btst 0x200, %i1 4000e5ac: 02 80 00 0b be 4000e5d8 4000e5b0: 80 8e 60 0f btst 0xf, %i1 if ( _Modes_Is_timeslice(mode_set) ) { 4000e5b4: 80 8e 22 00 btst 0x200, %i0 4000e5b8: 22 80 00 07 be,a 4000e5d4 4000e5bc: c0 24 20 7c clr [ %l0 + 0x7c ] executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4000e5c0: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000e5c4: c2 00 63 48 ld [ %g1 + 0x348 ], %g1 ! 4001d348 <_Thread_Ticks_per_timeslice> 4000e5c8: c2 24 20 78 st %g1, [ %l0 + 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; 4000e5cc: 82 10 20 01 mov 1, %g1 4000e5d0: c2 24 20 7c st %g1, [ %l0 + 0x7c ] /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4000e5d4: 80 8e 60 0f btst 0xf, %i1 4000e5d8: 12 80 00 2d bne 4000e68c 4000e5dc: 01 00 00 00 nop */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4000e5e0: 80 8e 64 00 btst 0x400, %i1 4000e5e4: 22 80 00 16 be,a 4000e63c 4000e5e8: a0 10 20 00 clr %l0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000e5ec: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4000e5f0: b1 36 20 0a srl %i0, 0xa, %i0 4000e5f4: b0 1e 20 01 xor %i0, 1, %i0 4000e5f8: b0 0e 20 01 and %i0, 1, %i0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000e5fc: 80 a0 40 18 cmp %g1, %i0 4000e600: 22 80 00 0f be,a 4000e63c 4000e604: a0 10 20 00 clr %l0 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4000e608: 7f ff ce 03 call 40001e14 4000e60c: f0 2c 60 08 stb %i0, [ %l1 + 8 ] _signals = information->signals_pending; 4000e610: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 information->signals_pending = information->signals_posted; 4000e614: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 information->signals_posted = _signals; 4000e618: c4 24 60 14 st %g2, [ %l1 + 0x14 ] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 4000e61c: c2 24 60 18 st %g1, [ %l1 + 0x18 ] information->signals_posted = _signals; _ISR_Enable( _level ); 4000e620: 7f ff ce 01 call 40001e24 4000e624: 01 00 00 00 nop 4000e628: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000e62c: 80 a0 60 00 cmp %g1, 0 4000e630: 12 80 00 28 bne 4000e6d0 4000e634: 82 10 20 01 mov 1, %g1 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; 4000e638: a0 10 20 00 clr %l0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4000e63c: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000e640: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 4001d590 <_System_state_Current> 4000e644: 80 a0 60 03 cmp %g1, 3 4000e648: 02 80 00 16 be 4000e6a0 <== ALWAYS TAKEN 4000e64c: 82 10 20 00 clr %g1 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 4000e650: 81 c7 e0 08 ret 4000e654: 91 e8 00 01 restore %g0, %g1, %o0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000e658: c2 0c 60 08 ldub [ %l1 + 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; 4000e65c: a4 14 a2 00 or %l2, 0x200, %l2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000e660: 80 a0 00 01 cmp %g0, %g1 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4000e664: 7f ff f0 99 call 4000a8c8 <_CPU_ISR_Get_level> 4000e668: a6 60 3f ff subx %g0, -1, %l3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000e66c: a7 2c e0 0a sll %l3, 0xa, %l3 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; 4000e670: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4000e674: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4000e678: 80 8e 61 00 btst 0x100, %i1 4000e67c: 02 bf ff cb be 4000e5a8 4000e680: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4000e684: 10 bf ff c6 b 4000e59c 4000e688: 83 36 20 08 srl %i0, 8, %g1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4000e68c: 90 0e 20 0f and %i0, 0xf, %o0 4000e690: 7f ff cd e5 call 40001e24 4000e694: 91 2a 20 08 sll %o0, 8, %o0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4000e698: 10 bf ff d3 b 4000e5e4 4000e69c: 80 8e 64 00 btst 0x400, %i1 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4000e6a0: 40 00 00 c0 call 4000e9a0 <_Thread_Evaluate_mode> 4000e6a4: 01 00 00 00 nop 4000e6a8: 80 8a 20 ff btst 0xff, %o0 4000e6ac: 12 80 00 04 bne 4000e6bc 4000e6b0: 80 8c 20 ff btst 0xff, %l0 4000e6b4: 02 bf ff e7 be 4000e650 4000e6b8: 82 10 20 00 clr %g1 _Thread_Dispatch(); 4000e6bc: 7f ff e9 ae call 40008d74 <_Thread_Dispatch> 4000e6c0: 01 00 00 00 nop 4000e6c4: 82 10 20 00 clr %g1 ! 0 return RTEMS_SUCCESSFUL; } 4000e6c8: 81 c7 e0 08 ret 4000e6cc: 91 e8 00 01 restore %g0, %g1, %o0 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; 4000e6d0: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 4000e6d4: 10 bf ff da b 4000e63c 4000e6d8: a0 10 20 01 mov 1, %l0 =============================================================================== 4000c580 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4000c580: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4000c584: 80 a6 60 00 cmp %i1, 0 4000c588: 02 80 00 07 be 4000c5a4 4000c58c: 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 ) && 4000c590: 03 10 00 8e sethi %hi(0x40023800), %g1 4000c594: c2 08 60 44 ldub [ %g1 + 0x44 ], %g1 ! 40023844 4000c598: 80 a6 40 01 cmp %i1, %g1 4000c59c: 18 80 00 1c bgu 4000c60c 4000c5a0: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4000c5a4: 80 a6 a0 00 cmp %i2, 0 4000c5a8: 02 80 00 19 be 4000c60c 4000c5ac: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4000c5b0: 40 00 08 8f call 4000e7ec <_Thread_Get> 4000c5b4: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 4000c5b8: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c5bc: 80 a0 60 00 cmp %g1, 0 4000c5c0: 12 80 00 13 bne 4000c60c 4000c5c4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4000c5c8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4000c5cc: 80 a6 60 00 cmp %i1, 0 4000c5d0: 02 80 00 0d be 4000c604 4000c5d4: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000c5d8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000c5dc: 80 a0 60 00 cmp %g1, 0 4000c5e0: 02 80 00 06 be 4000c5f8 4000c5e4: f2 22 20 18 st %i1, [ %o0 + 0x18 ] the_thread->current_priority > new_priority ) 4000c5e8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000c5ec: 80 a6 40 01 cmp %i1, %g1 4000c5f0: 1a 80 00 05 bcc 4000c604 <== ALWAYS TAKEN 4000c5f4: 01 00 00 00 nop _Thread_Change_priority( the_thread, new_priority, false ); 4000c5f8: 92 10 00 19 mov %i1, %o1 4000c5fc: 40 00 06 d8 call 4000e15c <_Thread_Change_priority> 4000c600: 94 10 20 00 clr %o2 } _Thread_Enable_dispatch(); 4000c604: 40 00 08 56 call 4000e75c <_Thread_Enable_dispatch> 4000c608: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4000c60c: 81 c7 e0 08 ret 4000c610: 81 e8 00 00 restore =============================================================================== 40008628 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 40008628: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 4000862c: 80 a6 60 00 cmp %i1, 0 40008630: 02 80 00 09 be 40008654 40008634: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 40008638: 90 10 00 18 mov %i0, %o0 4000863c: 40 00 08 2f call 4000a6f8 <_Thread_Get> 40008640: 92 07 bf fc add %fp, -4, %o1 switch (location) { 40008644: c4 07 bf fc ld [ %fp + -4 ], %g2 40008648: 80 a0 a0 00 cmp %g2, 0 4000864c: 02 80 00 04 be 4000865c 40008650: 82 10 20 04 mov 4, %g1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40008654: 81 c7 e0 08 ret 40008658: 91 e8 00 01 restore %g0, %g1, %o0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 4000865c: d2 02 21 6c ld [ %o0 + 0x16c ], %o1 while (tvp) { 40008660: 80 a2 60 00 cmp %o1, 0 40008664: 02 80 00 10 be 400086a4 40008668: 01 00 00 00 nop if (tvp->ptr == ptr) { 4000866c: c2 02 60 04 ld [ %o1 + 4 ], %g1 40008670: 80 a0 40 19 cmp %g1, %i1 40008674: 12 80 00 08 bne 40008694 40008678: 84 10 00 09 mov %o1, %g2 if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 4000867c: 10 80 00 17 b 400086d8 40008680: c2 02 40 00 ld [ %o1 ], %g1 switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 40008684: 80 a0 40 19 cmp %g1, %i1 40008688: 22 80 00 0c be,a 400086b8 4000868c: 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; 40008690: 84 10 00 09 mov %o1, %g2 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 40008694: 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) { 40008698: 80 a2 60 00 cmp %o1, 0 4000869c: 32 bf ff fa bne,a 40008684 <== ALWAYS TAKEN 400086a0: c2 02 60 04 ld [ %o1 + 4 ], %g1 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 400086a4: 40 00 08 07 call 4000a6c0 <_Thread_Enable_dispatch> 400086a8: 01 00 00 00 nop 400086ac: 82 10 20 09 mov 9, %g1 ! 9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400086b0: 81 c7 e0 08 ret 400086b4: 91 e8 00 01 restore %g0, %g1, %o0 case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 400086b8: 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 ); 400086bc: 40 00 00 2d call 40008770 <_RTEMS_Tasks_Invoke_task_variable_dtor> 400086c0: 01 00 00 00 nop _Thread_Enable_dispatch(); 400086c4: 40 00 07 ff call 4000a6c0 <_Thread_Enable_dispatch> 400086c8: 01 00 00 00 nop 400086cc: 82 10 20 00 clr %g1 ! 0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400086d0: 81 c7 e0 08 ret 400086d4: 91 e8 00 01 restore %g0, %g1, %o0 while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 400086d8: 10 bf ff f9 b 400086bc 400086dc: c2 22 21 6c st %g1, [ %o0 + 0x16c ] =============================================================================== 400086e0 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 400086e0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 400086e4: 80 a6 60 00 cmp %i1, 0 400086e8: 02 80 00 1c be 40008758 400086ec: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( !result ) 400086f0: 02 80 00 1a be 40008758 400086f4: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 400086f8: 40 00 08 00 call 4000a6f8 <_Thread_Get> 400086fc: 92 07 bf fc add %fp, -4, %o1 switch (location) { 40008700: c2 07 bf fc ld [ %fp + -4 ], %g1 40008704: 80 a0 60 00 cmp %g1, 0 40008708: 12 80 00 12 bne 40008750 4000870c: 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; 40008710: c2 02 21 6c ld [ %o0 + 0x16c ], %g1 while (tvp) { 40008714: 80 a0 60 00 cmp %g1, 0 40008718: 32 80 00 07 bne,a 40008734 4000871c: c4 00 60 04 ld [ %g1 + 4 ], %g2 40008720: 30 80 00 10 b,a 40008760 40008724: 80 a0 60 00 cmp %g1, 0 40008728: 02 80 00 0e be 40008760 <== NEVER TAKEN 4000872c: 01 00 00 00 nop if (tvp->ptr == ptr) { 40008730: c4 00 60 04 ld [ %g1 + 4 ], %g2 40008734: 80 a0 80 19 cmp %g2, %i1 40008738: 32 bf ff fb bne,a 40008724 4000873c: c2 00 40 00 ld [ %g1 ], %g1 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 40008740: c2 00 60 0c ld [ %g1 + 0xc ], %g1 _Thread_Enable_dispatch(); 40008744: b0 10 20 00 clr %i0 40008748: 40 00 07 de call 4000a6c0 <_Thread_Enable_dispatch> 4000874c: c2 26 80 00 st %g1, [ %i2 ] return RTEMS_SUCCESSFUL; 40008750: 81 c7 e0 08 ret 40008754: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40008758: 81 c7 e0 08 ret 4000875c: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 40008760: 40 00 07 d8 call 4000a6c0 <_Thread_Enable_dispatch> 40008764: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; 40008768: 81 c7 e0 08 ret 4000876c: 81 e8 00 00 restore =============================================================================== 40016b24 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 40016b24: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40016b28: 11 10 00 fb sethi %hi(0x4003ec00), %o0 40016b2c: 92 10 00 18 mov %i0, %o1 40016b30: 90 12 21 a4 or %o0, 0x1a4, %o0 40016b34: 40 00 0b b2 call 400199fc <_Objects_Get> 40016b38: 94 07 bf fc add %fp, -4, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40016b3c: c2 07 bf fc ld [ %fp + -4 ], %g1 40016b40: 80 a0 60 00 cmp %g1, 0 40016b44: 12 80 00 0a bne 40016b6c 40016b48: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 40016b4c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40016b50: 80 a0 60 04 cmp %g1, 4 40016b54: 02 80 00 04 be 40016b64 <== NEVER TAKEN 40016b58: 01 00 00 00 nop (void) _Watchdog_Remove( &the_timer->Ticker ); 40016b5c: 40 00 14 7a call 4001bd44 <_Watchdog_Remove> 40016b60: 90 02 20 10 add %o0, 0x10, %o0 _Thread_Enable_dispatch(); 40016b64: 40 00 0e 33 call 4001a430 <_Thread_Enable_dispatch> 40016b68: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40016b6c: 81 c7 e0 08 ret 40016b70: 81 e8 00 00 restore =============================================================================== 40017030 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 40017030: 9d e3 bf 98 save %sp, -104, %sp Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 40017034: 03 10 00 fb sethi %hi(0x4003ec00), %g1 40017038: e0 00 61 e4 ld [ %g1 + 0x1e4 ], %l0 ! 4003ede4 <_Timer_server> rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 4001703c: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 40017040: 80 a4 20 00 cmp %l0, 0 40017044: 02 80 00 34 be 40017114 40017048: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 4001704c: 03 10 00 fa sethi %hi(0x4003e800), %g1 40017050: c2 08 62 e4 ldub [ %g1 + 0x2e4 ], %g1 ! 4003eae4 <_TOD_Is_set> 40017054: 80 a0 60 00 cmp %g1, 0 40017058: 02 80 00 2f be 40017114 <== NEVER TAKEN 4001705c: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !routine ) 40017060: 80 a6 a0 00 cmp %i2, 0 40017064: 02 80 00 2c be 40017114 40017068: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 4001706c: 7f ff f3 d2 call 40013fb4 <_TOD_Validate> 40017070: 90 10 00 19 mov %i1, %o0 40017074: 80 8a 20 ff btst 0xff, %o0 40017078: 12 80 00 04 bne 40017088 4001707c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40017080: 81 c7 e0 08 ret 40017084: 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 ); 40017088: 7f ff f3 95 call 40013edc <_TOD_To_seconds> 4001708c: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch() ) 40017090: 25 10 00 fa sethi %hi(0x4003e800), %l2 40017094: c2 04 a3 60 ld [ %l2 + 0x360 ], %g1 ! 4003eb60 <_TOD_Now> 40017098: 80 a2 00 01 cmp %o0, %g1 4001709c: 08 bf ff f9 bleu 40017080 400170a0: b2 10 00 08 mov %o0, %i1 400170a4: 11 10 00 fb sethi %hi(0x4003ec00), %o0 400170a8: 92 10 00 11 mov %l1, %o1 400170ac: 90 12 21 a4 or %o0, 0x1a4, %o0 400170b0: 40 00 0a 53 call 400199fc <_Objects_Get> 400170b4: 94 07 bf fc add %fp, -4, %o2 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400170b8: c2 07 bf fc ld [ %fp + -4 ], %g1 400170bc: a6 10 00 08 mov %o0, %l3 400170c0: 80 a0 60 00 cmp %g1, 0 400170c4: 12 80 00 14 bne 40017114 400170c8: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 400170cc: 40 00 13 1e call 4001bd44 <_Watchdog_Remove> 400170d0: 90 02 20 10 add %o0, 0x10, %o0 the_watchdog->routine = routine; the_watchdog->id = id; 400170d4: e2 24 e0 30 st %l1, [ %l3 + 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(); 400170d8: c4 04 a3 60 ld [ %l2 + 0x360 ], %g2 (*timer_server->schedule_operation)( timer_server, the_timer ); 400170dc: c2 04 20 04 ld [ %l0 + 4 ], %g1 400170e0: 90 10 00 10 mov %l0, %o0 400170e4: 92 10 00 13 mov %l3, %o1 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(); 400170e8: b2 26 40 02 sub %i1, %g2, %i1 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; 400170ec: 84 10 20 03 mov 3, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400170f0: f4 24 e0 2c st %i2, [ %l3 + 0x2c ] 400170f4: c4 24 e0 38 st %g2, [ %l3 + 0x38 ] the_watchdog->id = id; the_watchdog->user_data = user_data; 400170f8: f6 24 e0 34 st %i3, [ %l3 + 0x34 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 400170fc: f2 24 e0 1c st %i1, [ %l3 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40017100: c0 24 e0 18 clr [ %l3 + 0x18 ] (*timer_server->schedule_operation)( timer_server, the_timer ); 40017104: 9f c0 40 00 call %g1 40017108: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 4001710c: 40 00 0c c9 call 4001a430 <_Thread_Enable_dispatch> 40017110: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 40017114: 81 c7 e0 08 ret 40017118: 81 e8 00 00 restore