=============================================================================== 02006878 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2006878: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 200687c: 23 00 80 6e sethi %hi(0x201b800), %l1 2006880: e0 04 60 54 ld [ %l1 + 0x54 ], %l0 ! 201b854 <_API_extensions_List> 2006884: a2 14 60 54 or %l1, 0x54, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2006888: a2 04 60 04 add %l1, 4, %l1 200688c: 80 a4 00 11 cmp %l0, %l1 2006890: 02 80 00 09 be 20068b4 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 2006894: 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)(); 2006898: c2 04 20 08 ld [ %l0 + 8 ], %g1 200689c: 9f c0 40 00 call %g1 20068a0: 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 ) { 20068a4: 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 ; 20068a8: 80 a4 00 11 cmp %l0, %l1 20068ac: 32 bf ff fc bne,a 200689c <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN 20068b0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 20068b4: 81 c7 e0 08 ret 20068b8: 81 e8 00 00 restore =============================================================================== 020068bc <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 20068bc: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20068c0: 23 00 80 6e sethi %hi(0x201b800), %l1 20068c4: e0 04 60 54 ld [ %l1 + 0x54 ], %l0 ! 201b854 <_API_extensions_List> 20068c8: a2 14 60 54 or %l1, 0x54, %l1 20068cc: a2 04 60 04 add %l1, 4, %l1 20068d0: 80 a4 00 11 cmp %l0, %l1 20068d4: 02 80 00 0a be 20068fc <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 20068d8: 25 00 80 6d sethi %hi(0x201b400), %l2 20068dc: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 20068e0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20068e4: 9f c0 40 00 call %g1 20068e8: 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 ) { 20068ec: 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 ; 20068f0: 80 a4 00 11 cmp %l0, %l1 20068f4: 32 bf ff fc bne,a 20068e4 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN 20068f8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 20068fc: 81 c7 e0 08 ret 2006900: 81 e8 00 00 restore =============================================================================== 02017270 <_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 ) { 2017270: 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 ) { 2017274: 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 ) { 2017278: 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 ) { 201727c: 80 a0 40 1a cmp %g1, %i2 2017280: 0a 80 00 17 bcs 20172dc <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 2017284: 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 ) { 2017288: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 201728c: 80 a0 60 00 cmp %g1, 0 2017290: 02 80 00 0a be 20172b8 <_CORE_message_queue_Broadcast+0x48> 2017294: a4 10 20 00 clr %l2 *count = 0; 2017298: c0 27 40 00 clr [ %i5 ] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 201729c: 81 c7 e0 08 ret 20172a0: 91 e8 20 00 restore %g0, 0, %o0 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20172a4: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 20172a8: 40 00 25 0e call 20206e0 20172ac: a4 04 a0 01 inc %l2 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 20172b0: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 20172b4: 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))) { 20172b8: 40 00 0a 88 call 2019cd8 <_Thread_queue_Dequeue> 20172bc: 90 10 00 10 mov %l0, %o0 20172c0: 92 10 00 19 mov %i1, %o1 20172c4: 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 = 20172c8: 80 a2 20 00 cmp %o0, 0 20172cc: 12 bf ff f6 bne 20172a4 <_CORE_message_queue_Broadcast+0x34> 20172d0: 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; 20172d4: e4 27 40 00 st %l2, [ %i5 ] 20172d8: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 20172dc: 81 c7 e0 08 ret 20172e0: 81 e8 00 00 restore =============================================================================== 02010c38 <_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 ) { 2010c38: 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; 2010c3c: 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; 2010c40: 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; 2010c44: 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)) { 2010c48: 80 8e e0 03 btst 3, %i3 2010c4c: 02 80 00 09 be 2010c70 <_CORE_message_queue_Initialize+0x38> 2010c50: a2 10 00 1b mov %i3, %l1 allocated_message_size += sizeof(uint32_t); 2010c54: a2 06 e0 04 add %i3, 4, %l1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2010c58: a2 0c 7f fc and %l1, -4, %l1 } if (allocated_message_size < maximum_message_size) 2010c5c: 80 a6 c0 11 cmp %i3, %l1 2010c60: 08 80 00 05 bleu 2010c74 <_CORE_message_queue_Initialize+0x3c><== ALWAYS TAKEN 2010c64: a0 04 60 10 add %l1, 0x10, %l0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2010c68: 81 c7 e0 08 ret 2010c6c: 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)); 2010c70: 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 * 2010c74: 92 10 00 1a mov %i2, %o1 2010c78: 40 00 4d 33 call 2024144 <.umul> 2010c7c: 90 10 00 10 mov %l0, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 2010c80: 80 a2 00 11 cmp %o0, %l1 2010c84: 0a bf ff f9 bcs 2010c68 <_CORE_message_queue_Initialize+0x30><== NEVER TAKEN 2010c88: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2010c8c: 40 00 0c 63 call 2013e18 <_Workspace_Allocate> 2010c90: 01 00 00 00 nop _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2010c94: 80 a2 20 00 cmp %o0, 0 2010c98: 02 bf ff f4 be 2010c68 <_CORE_message_queue_Initialize+0x30> 2010c9c: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2010ca0: 92 10 00 08 mov %o0, %o1 2010ca4: 94 10 00 1a mov %i2, %o2 2010ca8: 90 06 20 60 add %i0, 0x60, %o0 2010cac: 40 00 15 8b call 20162d8 <_Chain_Initialize> 2010cb0: 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( 2010cb4: 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; 2010cb8: c0 26 20 54 clr [ %i0 + 0x54 ] 2010cbc: 82 18 60 01 xor %g1, 1, %g1 2010cc0: 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); 2010cc4: 82 06 20 54 add %i0, 0x54, %g1 2010cc8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2010ccc: 82 06 20 50 add %i0, 0x50, %g1 2010cd0: 90 10 00 18 mov %i0, %o0 2010cd4: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 2010cd8: 92 60 3f ff subx %g0, -1, %o1 2010cdc: 94 10 20 80 mov 0x80, %o2 2010ce0: 96 10 20 06 mov 6, %o3 2010ce4: 40 00 09 07 call 2013100 <_Thread_queue_Initialize> 2010ce8: 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; 2010cec: 81 c7 e0 08 ret 2010cf0: 81 e8 00 00 restore =============================================================================== 02006bb0 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 2006bb0: 9d e3 bf a0 save %sp, -96, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 2006bb4: 21 00 80 6d sethi %hi(0x201b400), %l0 2006bb8: c2 04 22 10 ld [ %l0 + 0x210 ], %g1 ! 201b610 <_Thread_Dispatch_disable_level> 2006bbc: 80 a0 60 00 cmp %g1, 0 2006bc0: 02 80 00 05 be 2006bd4 <_CORE_mutex_Seize+0x24> 2006bc4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2006bc8: 80 8e a0 ff btst 0xff, %i2 2006bcc: 12 80 00 1a bne 2006c34 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN 2006bd0: 03 00 80 6d sethi %hi(0x201b400), %g1 2006bd4: 90 10 00 18 mov %i0, %o0 2006bd8: 40 00 15 34 call 200c0a8 <_CORE_mutex_Seize_interrupt_trylock> 2006bdc: 92 07 a0 54 add %fp, 0x54, %o1 2006be0: 80 a2 20 00 cmp %o0, 0 2006be4: 02 80 00 12 be 2006c2c <_CORE_mutex_Seize+0x7c> 2006be8: 80 8e a0 ff btst 0xff, %i2 2006bec: 02 80 00 1a be 2006c54 <_CORE_mutex_Seize+0xa4> 2006bf0: 01 00 00 00 nop 2006bf4: c4 04 22 10 ld [ %l0 + 0x210 ], %g2 2006bf8: 03 00 80 6d sethi %hi(0x201b400), %g1 2006bfc: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing> 2006c00: f2 20 60 20 st %i1, [ %g1 + 0x20 ] 2006c04: f0 20 60 44 st %i0, [ %g1 + 0x44 ] 2006c08: 82 00 a0 01 add %g2, 1, %g1 2006c0c: c2 24 22 10 st %g1, [ %l0 + 0x210 ] 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; 2006c10: 82 10 20 01 mov 1, %g1 2006c14: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 2006c18: 7f ff ed a9 call 20022bc 2006c1c: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006c20: 90 10 00 18 mov %i0, %o0 2006c24: 7f ff ff c0 call 2006b24 <_CORE_mutex_Seize_interrupt_blocking> 2006c28: 92 10 00 1b mov %i3, %o1 2006c2c: 81 c7 e0 08 ret 2006c30: 81 e8 00 00 restore 2006c34: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 2006c38: 80 a0 60 01 cmp %g1, 1 2006c3c: 28 bf ff e7 bleu,a 2006bd8 <_CORE_mutex_Seize+0x28> 2006c40: 90 10 00 18 mov %i0, %o0 2006c44: 90 10 20 00 clr %o0 2006c48: 92 10 20 00 clr %o1 2006c4c: 40 00 01 a6 call 20072e4 <_Internal_error_Occurred> 2006c50: 94 10 20 13 mov 0x13, %o2 2006c54: 7f ff ed 9a call 20022bc 2006c58: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006c5c: 03 00 80 6d sethi %hi(0x201b400), %g1 2006c60: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing> 2006c64: 84 10 20 01 mov 1, %g2 2006c68: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 2006c6c: 81 c7 e0 08 ret 2006c70: 81 e8 00 00 restore =============================================================================== 0200c0a8 <_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 ) { 200c0a8: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 200c0ac: 03 00 80 6d sethi %hi(0x201b400), %g1 200c0b0: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200c0b4: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200c0b8: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 200c0bc: 80 a0 a0 00 cmp %g2, 0 200c0c0: 22 80 00 13 be,a 200c10c <_CORE_mutex_Seize_interrupt_trylock+0x64> 200c0c4: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 200c0c8: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200c0cc: 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; 200c0d0: 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; 200c0d4: 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; 200c0d8: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200c0dc: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200c0e0: 80 a0 a0 02 cmp %g2, 2 200c0e4: 02 80 00 0f be 200c120 <_CORE_mutex_Seize_interrupt_trylock+0x78> 200c0e8: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 200c0ec: 80 a0 a0 03 cmp %g2, 3 200c0f0: 22 80 00 1f be,a 200c16c <_CORE_mutex_Seize_interrupt_trylock+0xc4> 200c0f4: da 00 60 1c ld [ %g1 + 0x1c ], %o5 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 200c0f8: d0 06 40 00 ld [ %i1 ], %o0 200c0fc: 7f ff d8 70 call 20022bc 200c100: b0 10 20 00 clr %i0 200c104: 81 c7 e0 08 ret 200c108: 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 ) ) { 200c10c: 80 a0 40 02 cmp %g1, %g2 200c110: 22 80 00 0c be,a 200c140 <_CORE_mutex_Seize_interrupt_trylock+0x98> 200c114: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200c118: 81 c7 e0 08 ret 200c11c: 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++; 200c120: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 200c124: 84 00 a0 01 inc %g2 200c128: c4 20 60 1c st %g2, [ %g1 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 200c12c: d0 06 40 00 ld [ %i1 ], %o0 200c130: 7f ff d8 63 call 20022bc 200c134: b0 10 20 00 clr %i0 200c138: 81 c7 e0 08 ret 200c13c: 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 ) { 200c140: 80 a0 a0 00 cmp %g2, 0 200c144: 12 80 00 2b bne 200c1f0 <_CORE_mutex_Seize_interrupt_trylock+0x148> 200c148: 80 a0 a0 01 cmp %g2, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 200c14c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200c150: 82 00 60 01 inc %g1 200c154: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 200c158: d0 06 40 00 ld [ %i1 ], %o0 200c15c: 7f ff d8 58 call 20022bc 200c160: b0 10 20 00 clr %i0 200c164: 81 c7 e0 08 ret 200c168: 81 e8 00 00 restore { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 200c16c: 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++; 200c170: 88 03 60 01 add %o5, 1, %g4 200c174: c8 20 60 1c st %g4, [ %g1 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200c178: c8 06 20 4c ld [ %i0 + 0x4c ], %g4 current = executing->current_priority; if ( current == ceiling ) { 200c17c: 80 a1 00 02 cmp %g4, %g2 200c180: 02 80 00 24 be 200c210 <_CORE_mutex_Seize_interrupt_trylock+0x168> 200c184: 01 00 00 00 nop _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 200c188: 1a 80 00 11 bcc 200c1cc <_CORE_mutex_Seize_interrupt_trylock+0x124> 200c18c: 84 10 20 06 mov 6, %g2 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200c190: 03 00 80 6d sethi %hi(0x201b400), %g1 200c194: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level> 200c198: 84 00 a0 01 inc %g2 200c19c: c4 20 62 10 st %g2, [ %g1 + 0x210 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 200c1a0: 7f ff d8 47 call 20022bc 200c1a4: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 200c1a8: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200c1ac: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200c1b0: 94 10 20 00 clr %o2 200c1b4: 7f ff ee b7 call 2007c90 <_Thread_Change_priority> 200c1b8: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 200c1bc: 7f ff f0 53 call 2008308 <_Thread_Enable_dispatch> 200c1c0: 01 00 00 00 nop 200c1c4: 81 c7 e0 08 ret 200c1c8: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200c1cc: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 200c1d0: c6 26 20 50 st %g3, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ 200c1d4: c0 26 20 54 clr [ %i0 + 0x54 ] executing->resource_count--; /* undo locking above */ 200c1d8: da 20 60 1c st %o5, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 200c1dc: d0 06 40 00 ld [ %i1 ], %o0 200c1e0: 7f ff d8 37 call 20022bc 200c1e4: b0 10 20 00 clr %i0 200c1e8: 81 c7 e0 08 ret 200c1ec: 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 ) { 200c1f0: 12 bf ff ca bne 200c118 <_CORE_mutex_Seize_interrupt_trylock+0x70><== ALWAYS TAKEN 200c1f4: 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; 200c1f8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED _ISR_Enable( *level_p ); 200c1fc: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 200c200: 7f ff d8 2f call 20022bc <== NOT EXECUTED 200c204: b0 10 20 00 clr %i0 <== NOT EXECUTED 200c208: 81 c7 e0 08 ret <== NOT EXECUTED 200c20c: 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 ); 200c210: d0 06 40 00 ld [ %i1 ], %o0 200c214: 7f ff d8 2a call 20022bc 200c218: b0 10 20 00 clr %i0 200c21c: 81 c7 e0 08 ret 200c220: 81 e8 00 00 restore =============================================================================== 02006e10 <_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 ) { 2006e10: 9d e3 bf a0 save %sp, -96, %sp 2006e14: 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)) ) { 2006e18: b0 10 20 00 clr %i0 2006e1c: 40 00 06 40 call 200871c <_Thread_queue_Dequeue> 2006e20: 90 10 00 10 mov %l0, %o0 2006e24: 80 a2 20 00 cmp %o0, 0 2006e28: 02 80 00 04 be 2006e38 <_CORE_semaphore_Surrender+0x28> 2006e2c: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 2006e30: 81 c7 e0 08 ret 2006e34: 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 ); 2006e38: 7f ff ed 1d call 20022ac 2006e3c: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 2006e40: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2006e44: c4 04 20 40 ld [ %l0 + 0x40 ], %g2 2006e48: 80 a0 40 02 cmp %g1, %g2 2006e4c: 1a 80 00 05 bcc 2006e60 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN 2006e50: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2006e54: 82 00 60 01 inc %g1 2006e58: b0 10 20 00 clr %i0 2006e5c: c2 24 20 48 st %g1, [ %l0 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2006e60: 7f ff ed 17 call 20022bc 2006e64: 01 00 00 00 nop } return status; } 2006e68: 81 c7 e0 08 ret 2006e6c: 81 e8 00 00 restore =============================================================================== 0200c070 <_Chain_Initialize>: Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 200c070: c0 22 20 04 clr [ %o0 + 4 ] next = starting_address; while ( count-- ) { 200c074: 80 a2 a0 00 cmp %o2, 0 200c078: 02 80 00 08 be 200c098 <_Chain_Initialize+0x28> <== NEVER TAKEN 200c07c: 82 10 00 08 mov %o0, %g1 current->next = next; next->previous = current; 200c080: 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; 200c084: 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-- ) { 200c088: 94 82 bf ff addcc %o2, -1, %o2 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 200c08c: 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-- ) { 200c090: 12 bf ff fc bne 200c080 <_Chain_Initialize+0x10> 200c094: 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 ); 200c098: 84 02 20 04 add %o0, 4, %g2 200c09c: c4 20 40 00 st %g2, [ %g1 ] the_chain->last = current; } 200c0a0: 81 c3 e0 08 retl 200c0a4: c2 22 20 08 st %g1, [ %o0 + 8 ] =============================================================================== 020059ec <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 20059ec: 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; 20059f0: 03 00 80 6d sethi %hi(0x201b400), %g1 20059f4: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 20059f8: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 20059fc: 7f ff f2 2c call 20022ac 2005a00: e4 04 21 60 ld [ %l0 + 0x160 ], %l2 pending_events = api->pending_events; 2005a04: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 2005a08: a2 8e 00 01 andcc %i0, %g1, %l1 2005a0c: 02 80 00 07 be 2005a28 <_Event_Seize+0x3c> 2005a10: 80 8e 60 01 btst 1, %i1 2005a14: 80 a6 00 11 cmp %i0, %l1 2005a18: 02 80 00 23 be 2005aa4 <_Event_Seize+0xb8> 2005a1c: 80 8e 60 02 btst 2, %i1 2005a20: 12 80 00 21 bne 2005aa4 <_Event_Seize+0xb8> <== ALWAYS TAKEN 2005a24: 80 8e 60 01 btst 1, %i1 _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 2005a28: 12 80 00 18 bne 2005a88 <_Event_Seize+0x9c> 2005a2c: 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; 2005a30: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t) event_in; 2005a34: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 2005a38: f6 24 20 28 st %i3, [ %l0 + 0x28 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2005a3c: 33 00 80 6e sethi %hi(0x201b800), %i1 2005a40: c2 26 60 98 st %g1, [ %i1 + 0x98 ] ! 201b898 <_Event_Sync_state> _ISR_Enable( level ); 2005a44: 7f ff f2 1e call 20022bc 2005a48: 01 00 00 00 nop if ( ticks ) { 2005a4c: 80 a6 a0 00 cmp %i2, 0 2005a50: 32 80 00 1c bne,a 2005ac0 <_Event_Seize+0xd4> 2005a54: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2005a58: 90 10 00 10 mov %l0, %o0 2005a5c: 40 00 0c b1 call 2008d20 <_Thread_Set_state> 2005a60: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 2005a64: 7f ff f2 12 call 20022ac 2005a68: 01 00 00 00 nop sync_state = _Event_Sync_state; 2005a6c: f0 06 60 98 ld [ %i1 + 0x98 ], %i0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 2005a70: c0 26 60 98 clr [ %i1 + 0x98 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 2005a74: 80 a6 20 01 cmp %i0, 1 2005a78: 02 80 00 1f be 2005af4 <_Event_Seize+0x108> 2005a7c: 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 ); 2005a80: 40 00 08 6d call 2007c34 <_Thread_blocking_operation_Cancel> 2005a84: 95 e8 00 08 restore %g0, %o0, %o2 *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 2005a88: 7f ff f2 0d call 20022bc 2005a8c: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 2005a90: 82 10 20 0d mov 0xd, %g1 ! d 2005a94: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 2005a98: e2 26 c0 00 st %l1, [ %i3 ] 2005a9c: 81 c7 e0 08 ret 2005aa0: 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 = 2005aa4: 82 28 40 11 andn %g1, %l1, %g1 2005aa8: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 2005aac: 7f ff f2 04 call 20022bc 2005ab0: 01 00 00 00 nop *event_out = seized_events; 2005ab4: e2 26 c0 00 st %l1, [ %i3 ] return; 2005ab8: 81 c7 e0 08 ret 2005abc: 81 e8 00 00 restore Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2005ac0: f4 24 20 54 st %i2, [ %l0 + 0x54 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2005ac4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005ac8: 03 00 80 17 sethi %hi(0x2005c00), %g1 2005acc: 82 10 60 a0 or %g1, 0xa0, %g1 ! 2005ca0 <_Event_Timeout> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005ad0: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2005ad4: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005ad8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005adc: 11 00 80 6d sethi %hi(0x201b400), %o0 2005ae0: 92 04 20 48 add %l0, 0x48, %o1 2005ae4: 40 00 0e 99 call 2009548 <_Watchdog_Insert> 2005ae8: 90 12 22 f0 or %o0, 0x2f0, %o0 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2005aec: 10 bf ff dc b 2005a5c <_Event_Seize+0x70> 2005af0: 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 ); 2005af4: 7f ff f1 f2 call 20022bc 2005af8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02005b58 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2005b58: 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 ]; 2005b5c: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2005b60: 7f ff f1 d3 call 20022ac 2005b64: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 2005b68: a2 10 00 08 mov %o0, %l1 pending_events = api->pending_events; 2005b6c: c4 04 00 00 ld [ %l0 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 2005b70: 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 ) ) { 2005b74: 86 88 40 02 andcc %g1, %g2, %g3 2005b78: 02 80 00 3e be 2005c70 <_Event_Surrender+0x118> 2005b7c: 09 00 80 6d sethi %hi(0x201b400), %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() && 2005b80: c8 01 22 ac ld [ %g4 + 0x2ac ], %g4 ! 201b6ac <_ISR_Nest_level> 2005b84: 80 a1 20 00 cmp %g4, 0 2005b88: 12 80 00 1d bne 2005bfc <_Event_Surrender+0xa4> 2005b8c: 09 00 80 6d sethi %hi(0x201b400), %g4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005b90: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 2005b94: 80 89 21 00 btst 0x100, %g4 2005b98: 02 80 00 34 be 2005c68 <_Event_Surrender+0x110> 2005b9c: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005ba0: 02 80 00 04 be 2005bb0 <_Event_Surrender+0x58> 2005ba4: 80 8c a0 02 btst 2, %l2 2005ba8: 02 80 00 30 be 2005c68 <_Event_Surrender+0x110> <== NEVER TAKEN 2005bac: 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; 2005bb0: 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 ); 2005bb4: 84 28 80 03 andn %g2, %g3, %g2 2005bb8: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 2005bbc: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005bc0: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 2005bc4: 7f ff f1 be call 20022bc 2005bc8: 90 10 00 11 mov %l1, %o0 2005bcc: 7f ff f1 b8 call 20022ac 2005bd0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005bd4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2005bd8: 80 a0 60 02 cmp %g1, 2 2005bdc: 02 80 00 27 be 2005c78 <_Event_Surrender+0x120> 2005be0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005be4: 90 10 00 11 mov %l1, %o0 2005be8: 7f ff f1 b5 call 20022bc 2005bec: 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 ); 2005bf0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005bf4: 40 00 08 ab call 2007ea0 <_Thread_Clear_state> 2005bf8: 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() && 2005bfc: c8 01 22 d0 ld [ %g4 + 0x2d0 ], %g4 2005c00: 80 a6 00 04 cmp %i0, %g4 2005c04: 32 bf ff e4 bne,a 2005b94 <_Event_Surrender+0x3c> 2005c08: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2005c0c: 09 00 80 6e sethi %hi(0x201b800), %g4 2005c10: da 01 20 98 ld [ %g4 + 0x98 ], %o5 ! 201b898 <_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() && 2005c14: 80 a3 60 02 cmp %o5, 2 2005c18: 02 80 00 07 be 2005c34 <_Event_Surrender+0xdc> <== NEVER TAKEN 2005c1c: 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)) ) { 2005c20: da 01 20 98 ld [ %g4 + 0x98 ], %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() && 2005c24: 80 a3 60 01 cmp %o5, 1 2005c28: 32 bf ff db bne,a 2005b94 <_Event_Surrender+0x3c> 2005c2c: 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) ) { 2005c30: 80 a0 40 03 cmp %g1, %g3 2005c34: 02 80 00 04 be 2005c44 <_Event_Surrender+0xec> 2005c38: 80 8c a0 02 btst 2, %l2 2005c3c: 02 80 00 09 be 2005c60 <_Event_Surrender+0x108> <== NEVER TAKEN 2005c40: 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; 2005c44: 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 ); 2005c48: 84 28 80 03 andn %g2, %g3, %g2 2005c4c: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 2005c50: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005c54: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005c58: 82 10 20 03 mov 3, %g1 2005c5c: c2 21 20 98 st %g1, [ %g4 + 0x98 ] } _ISR_Enable( level ); 2005c60: 7f ff f1 97 call 20022bc 2005c64: 91 e8 00 11 restore %g0, %l1, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2005c68: 7f ff f1 95 call 20022bc 2005c6c: 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 ); 2005c70: 7f ff f1 93 call 20022bc 2005c74: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2005c78: 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 ); 2005c7c: 7f ff f1 90 call 20022bc 2005c80: 90 10 00 11 mov %l1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 2005c84: 40 00 0e 9e call 20096fc <_Watchdog_Remove> 2005c88: 90 06 20 48 add %i0, 0x48, %o0 2005c8c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 2005c90: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005c94: 40 00 08 83 call 2007ea0 <_Thread_Clear_state> 2005c98: 81 e8 00 00 restore =============================================================================== 02005ca0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2005ca0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2005ca4: 90 10 00 18 mov %i0, %o0 2005ca8: 40 00 09 a6 call 2008340 <_Thread_Get> 2005cac: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2005cb0: c2 07 bf fc ld [ %fp + -4 ], %g1 2005cb4: 80 a0 60 00 cmp %g1, 0 2005cb8: 12 80 00 15 bne 2005d0c <_Event_Timeout+0x6c> <== NEVER TAKEN 2005cbc: 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 ); 2005cc0: 7f ff f1 7b call 20022ac 2005cc4: 01 00 00 00 nop return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005cc8: 03 00 80 6d sethi %hi(0x201b400), %g1 2005ccc: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing> 2005cd0: 80 a4 00 01 cmp %l0, %g1 2005cd4: 02 80 00 10 be 2005d14 <_Event_Timeout+0x74> 2005cd8: 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; 2005cdc: 82 10 20 06 mov 6, %g1 2005ce0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] _ISR_Enable( level ); 2005ce4: 7f ff f1 76 call 20022bc 2005ce8: 01 00 00 00 nop 2005cec: 90 10 00 10 mov %l0, %o0 2005cf0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005cf4: 40 00 08 6b call 2007ea0 <_Thread_Clear_state> 2005cf8: 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; 2005cfc: 03 00 80 6d sethi %hi(0x201b400), %g1 2005d00: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level> 2005d04: 84 00 bf ff add %g2, -1, %g2 2005d08: c4 20 62 10 st %g2, [ %g1 + 0x210 ] 2005d0c: 81 c7 e0 08 ret 2005d10: 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 ) 2005d14: 03 00 80 6e sethi %hi(0x201b800), %g1 2005d18: c4 00 60 98 ld [ %g1 + 0x98 ], %g2 ! 201b898 <_Event_Sync_state> 2005d1c: 80 a0 a0 01 cmp %g2, 1 2005d20: 32 bf ff f0 bne,a 2005ce0 <_Event_Timeout+0x40> 2005d24: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005d28: 84 10 20 02 mov 2, %g2 2005d2c: c4 20 60 98 st %g2, [ %g1 + 0x98 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005d30: 10 bf ff ec b 2005ce0 <_Event_Timeout+0x40> 2005d34: 82 10 20 06 mov 6, %g1 =============================================================================== 0200c31c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c31c: 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; 200c320: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c324: 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 ) { 200c328: 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; 200c32c: e4 06 20 08 ld [ %i0 + 8 ], %l2 200c330: 18 80 00 72 bgu 200c4f8 <_Heap_Allocate_aligned_with_boundary+0x1dc> 200c334: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200c338: 80 a6 e0 00 cmp %i3, 0 200c33c: 12 80 00 6d bne 200c4f0 <_Heap_Allocate_aligned_with_boundary+0x1d4> 200c340: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c344: 80 a4 00 12 cmp %l0, %l2 200c348: 02 80 00 6f be 200c504 <_Heap_Allocate_aligned_with_boundary+0x1e8> 200c34c: 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; 200c350: 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; 200c354: 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; 200c358: 82 20 40 19 sub %g1, %i1, %g1 200c35c: 10 80 00 09 b 200c380 <_Heap_Allocate_aligned_with_boundary+0x64> 200c360: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 200c364: 80 a6 20 00 cmp %i0, 0 200c368: 32 80 00 54 bne,a 200c4b8 <_Heap_Allocate_aligned_with_boundary+0x19c><== ALWAYS TAKEN 200c36c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 200c370: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c374: 80 a4 00 12 cmp %l0, %l2 200c378: 22 80 00 57 be,a 200c4d4 <_Heap_Allocate_aligned_with_boundary+0x1b8> 200c37c: 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 ) { 200c380: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200c384: 80 a5 00 13 cmp %l4, %l3 200c388: 1a bf ff fa bcc 200c370 <_Heap_Allocate_aligned_with_boundary+0x54> 200c38c: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200c390: 80 a6 a0 00 cmp %i2, 0 200c394: 02 bf ff f4 be 200c364 <_Heap_Allocate_aligned_with_boundary+0x48> 200c398: 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; 200c39c: 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; 200c3a0: 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; 200c3a4: a6 0c ff fe and %l3, -2, %l3 200c3a8: 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; 200c3ac: 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; 200c3b0: 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); 200c3b4: 90 10 00 18 mov %i0, %o0 200c3b8: a6 00 40 13 add %g1, %l3, %l3 200c3bc: 40 00 2f 40 call 20180bc <.urem> 200c3c0: 92 10 00 1a mov %i2, %o1 200c3c4: 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 ) { 200c3c8: 80 a4 c0 18 cmp %l3, %i0 200c3cc: 1a 80 00 06 bcc 200c3e4 <_Heap_Allocate_aligned_with_boundary+0xc8> 200c3d0: ac 04 a0 08 add %l2, 8, %l6 200c3d4: 90 10 00 13 mov %l3, %o0 200c3d8: 40 00 2f 39 call 20180bc <.urem> 200c3dc: 92 10 00 1a mov %i2, %o1 200c3e0: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200c3e4: 80 a6 e0 00 cmp %i3, 0 200c3e8: 02 80 00 24 be 200c478 <_Heap_Allocate_aligned_with_boundary+0x15c> 200c3ec: 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; 200c3f0: a6 06 00 19 add %i0, %i1, %l3 200c3f4: 92 10 00 1b mov %i3, %o1 200c3f8: 40 00 2f 31 call 20180bc <.urem> 200c3fc: 90 10 00 13 mov %l3, %o0 200c400: 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 ) { 200c404: 80 a4 c0 08 cmp %l3, %o0 200c408: 08 80 00 1b bleu 200c474 <_Heap_Allocate_aligned_with_boundary+0x158> 200c40c: 80 a6 00 08 cmp %i0, %o0 200c410: 1a 80 00 1a bcc 200c478 <_Heap_Allocate_aligned_with_boundary+0x15c> 200c414: 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; 200c418: 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 ) { 200c41c: 80 a5 40 08 cmp %l5, %o0 200c420: 28 80 00 09 bleu,a 200c444 <_Heap_Allocate_aligned_with_boundary+0x128> 200c424: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 200c428: 10 bf ff d3 b 200c374 <_Heap_Allocate_aligned_with_boundary+0x58> 200c42c: 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 ) { 200c430: 1a 80 00 11 bcc 200c474 <_Heap_Allocate_aligned_with_boundary+0x158> 200c434: 80 a5 40 08 cmp %l5, %o0 if ( boundary_line < boundary_floor ) { 200c438: 38 bf ff cf bgu,a 200c374 <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 200c43c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 200c440: b0 22 00 19 sub %o0, %i1, %i0 200c444: 92 10 00 1a mov %i2, %o1 200c448: 40 00 2f 1d call 20180bc <.urem> 200c44c: 90 10 00 18 mov %i0, %o0 200c450: 92 10 00 1b mov %i3, %o1 200c454: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200c458: a6 06 00 19 add %i0, %i1, %l3 200c45c: 40 00 2f 18 call 20180bc <.urem> 200c460: 90 10 00 13 mov %l3, %o0 200c464: 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 ) { 200c468: 80 a4 c0 08 cmp %l3, %o0 200c46c: 18 bf ff f1 bgu 200c430 <_Heap_Allocate_aligned_with_boundary+0x114> 200c470: 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 ) { 200c474: 80 a5 80 18 cmp %l6, %i0 200c478: 18 bf ff be bgu 200c370 <_Heap_Allocate_aligned_with_boundary+0x54> 200c47c: 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; 200c480: 90 10 00 18 mov %i0, %o0 200c484: a6 20 40 12 sub %g1, %l2, %l3 200c488: 92 10 00 1d mov %i5, %o1 200c48c: 40 00 2f 0c call 20180bc <.urem> 200c490: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 200c494: 90 a4 c0 08 subcc %l3, %o0, %o0 200c498: 02 bf ff b4 be 200c368 <_Heap_Allocate_aligned_with_boundary+0x4c> 200c49c: 80 a6 20 00 cmp %i0, 0 200c4a0: 80 a5 c0 08 cmp %l7, %o0 200c4a4: 18 bf ff b3 bgu 200c370 <_Heap_Allocate_aligned_with_boundary+0x54> 200c4a8: 80 a6 20 00 cmp %i0, 0 boundary ); } } if ( alloc_begin != 0 ) { 200c4ac: 22 bf ff b2 be,a 200c374 <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 200c4b0: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c4b4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c4b8: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c4bc: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c4c0: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c4c4: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c4c8: 90 10 00 10 mov %l0, %o0 200c4cc: 7f ff eb 35 call 20071a0 <_Heap_Block_allocate> 200c4d0: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200c4d4: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 200c4d8: 80 a0 40 11 cmp %g1, %l1 200c4dc: 1a 80 00 08 bcc 200c4fc <_Heap_Allocate_aligned_with_boundary+0x1e0> 200c4e0: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c4e4: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 200c4e8: 81 c7 e0 08 ret 200c4ec: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200c4f0: 08 80 00 07 bleu 200c50c <_Heap_Allocate_aligned_with_boundary+0x1f0> 200c4f4: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c4f8: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 200c4fc: 81 c7 e0 08 ret 200c500: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c504: 10 bf ff f4 b 200c4d4 <_Heap_Allocate_aligned_with_boundary+0x1b8> 200c508: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200c50c: 22 bf ff 8e be,a 200c344 <_Heap_Allocate_aligned_with_boundary+0x28> 200c510: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 200c514: 10 bf ff 8d b 200c348 <_Heap_Allocate_aligned_with_boundary+0x2c> 200c518: 80 a4 00 12 cmp %l0, %l2 =============================================================================== 02010fa8 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2010fa8: 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; 2010fac: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2010fb0: 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 ) { 2010fb4: 80 a6 40 01 cmp %i1, %g1 2010fb8: 0a 80 00 2a bcs 2011060 <_Heap_Extend+0xb8> 2010fbc: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 2010fc0: 80 a6 40 01 cmp %i1, %g1 2010fc4: 12 80 00 25 bne 2011058 <_Heap_Extend+0xb0> 2010fc8: 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); 2010fcc: 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; 2010fd0: 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 2010fd4: 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; 2010fd8: f4 24 20 1c st %i2, [ %l0 + 0x1c ] extend_size = new_heap_area_end 2010fdc: b2 06 7f f8 add %i1, -8, %i1 2010fe0: 7f ff cc d7 call 200433c <.urem> 2010fe4: 90 10 00 19 mov %i1, %o0 2010fe8: 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; 2010fec: d0 26 c0 00 st %o0, [ %i3 ] if( extend_size >= heap->min_block_size ) { 2010ff0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2010ff4: 80 a0 40 08 cmp %g1, %o0 2010ff8: 18 80 00 18 bgu 2011058 <_Heap_Extend+0xb0> <== NEVER TAKEN 2010ffc: 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; 2011000: 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 = 2011004: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 2011008: 82 08 60 01 and %g1, 1, %g1 201100c: 82 12 00 01 or %o0, %g1, %g1 2011010: 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); 2011014: 82 02 00 11 add %o0, %l1, %g1 2011018: 84 20 80 01 sub %g2, %g1, %g2 201101c: 84 10 a0 01 or %g2, 1, %g2 2011020: c4 20 60 04 st %g2, [ %g1 + 4 ] heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2011024: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2011028: f2 04 20 2c ld [ %l0 + 0x2c ], %i1 ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 201102c: 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; 2011030: c2 24 20 24 st %g1, [ %l0 + 0x24 ] /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2011034: 82 00 e0 01 add %g3, 1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2011038: 90 06 40 08 add %i1, %o0, %o0 ++stats->used_blocks; 201103c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] --stats->frees; /* Do not count subsequent call as actual free() */ 2011040: 82 00 bf ff add %g2, -1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2011044: d0 24 20 2c st %o0, [ %l0 + 0x2c ] ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 2011048: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 201104c: 90 10 00 10 mov %l0, %o0 2011050: 7f ff e8 6f call 200b20c <_Heap_Free> 2011054: 92 04 60 08 add %l1, 8, %o1 } return HEAP_EXTEND_SUCCESSFUL; } 2011058: 81 c7 e0 08 ret 201105c: 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; 2011060: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 2011064: 80 a6 40 02 cmp %i1, %g2 2011068: 0a bf ff d6 bcs 2010fc0 <_Heap_Extend+0x18> 201106c: b0 10 20 01 mov 1, %i0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 2011070: 81 c7 e0 08 ret 2011074: 81 e8 00 00 restore =============================================================================== 0200c51c <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200c51c: 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 ) 200c520: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200c524: 40 00 2e e6 call 20180bc <.urem> 200c528: 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; 200c52c: 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 ) 200c530: b2 06 7f f8 add %i1, -8, %i1 200c534: 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 200c538: 80 a2 00 01 cmp %o0, %g1 200c53c: 0a 80 00 36 bcs 200c614 <_Heap_Free+0xf8> 200c540: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 200c544: 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 200c548: 80 a2 00 03 cmp %o0, %g3 200c54c: 18 80 00 32 bgu 200c614 <_Heap_Free+0xf8> 200c550: 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; 200c554: da 02 20 04 ld [ %o0 + 4 ], %o5 200c558: 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); 200c55c: 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 200c560: 80 a0 40 02 cmp %g1, %g2 200c564: 18 80 00 2c bgu 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN 200c568: 80 a0 c0 02 cmp %g3, %g2 200c56c: 0a 80 00 2a bcs 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN 200c570: 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; 200c574: 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 ) ) { 200c578: 80 8b 20 01 btst 1, %o4 200c57c: 02 80 00 26 be 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN 200c580: 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 200c584: 80 a0 c0 02 cmp %g3, %g2 200c588: 02 80 00 06 be 200c5a0 <_Heap_Free+0x84> 200c58c: 98 10 20 00 clr %o4 #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 200c590: 98 00 80 0b add %g2, %o3, %o4 200c594: d8 03 20 04 ld [ %o4 + 4 ], %o4 200c598: 98 0b 20 01 and %o4, 1, %o4 200c59c: 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 ) ) { 200c5a0: 80 8b 60 01 btst 1, %o5 200c5a4: 12 80 00 1e bne 200c61c <_Heap_Free+0x100> 200c5a8: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200c5ac: 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); 200c5b0: 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 200c5b4: 80 a0 40 0d cmp %g1, %o5 200c5b8: 18 80 00 17 bgu 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN 200c5bc: 80 a0 c0 0d cmp %g3, %o5 200c5c0: 0a 80 00 15 bcs 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN 200c5c4: 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) ) { 200c5c8: c2 03 60 04 ld [ %o5 + 4 ], %g1 200c5cc: 80 88 60 01 btst 1, %g1 200c5d0: 02 80 00 11 be 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN 200c5d4: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200c5d8: 22 80 00 3a be,a 200c6c0 <_Heap_Free+0x1a4> 200c5dc: 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; 200c5e0: 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; 200c5e4: 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; 200c5e8: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200c5ec: 86 00 ff ff add %g3, -1, %g3 200c5f0: 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; 200c5f4: 96 01 00 0b add %g4, %o3, %o3 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 200c5f8: c2 20 a0 0c st %g1, [ %g2 + 0xc ] 200c5fc: 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; 200c600: 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; 200c604: 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; 200c608: 94 12 a0 01 or %o2, 1, %o2 200c60c: 10 80 00 10 b 200c64c <_Heap_Free+0x130> 200c610: d4 23 60 04 st %o2, [ %o5 + 4 ] --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c614: 81 c7 e0 08 ret 200c618: 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 */ 200c61c: 02 80 00 17 be 200c678 <_Heap_Free+0x15c> 200c620: 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; 200c624: 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; 200c628: c4 00 a0 08 ld [ %g2 + 8 ], %g2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 200c62c: c2 22 20 0c st %g1, [ %o0 + 0xc ] ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 200c630: c4 22 20 08 st %g2, [ %o0 + 8 ] uintptr_t const size = block_size + next_block_size; 200c634: 96 02 c0 04 add %o3, %g4, %o3 new_block->prev = prev; next->prev = new_block; 200c638: 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; 200c63c: d6 22 00 0b st %o3, [ %o0 + %o3 ] prev->next = new_block; 200c640: 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; 200c644: 96 12 e0 01 or %o3, 1, %o3 200c648: d6 22 20 04 st %o3, [ %o0 + 4 ] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c64c: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200c650: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200c654: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c658: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; stats->free_size += block_size; 200c65c: 88 00 c0 04 add %g3, %g4, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c660: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; stats->free_size += block_size; 200c664: c8 26 20 30 st %g4, [ %i0 + 0x30 ] } } /* Statistics */ --stats->used_blocks; ++stats->frees; 200c668: 82 00 60 01 inc %g1 200c66c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; return( true ); 200c670: 81 c7 e0 08 ret 200c674: 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; 200c678: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c67c: 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; 200c680: c6 06 20 08 ld [ %i0 + 8 ], %g3 200c684: 82 08 7f fe and %g1, -2, %g1 next_block->prev_size = block_size; 200c688: 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; 200c68c: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200c690: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 new_block->next = next; 200c694: c6 22 20 08 st %g3, [ %o0 + 8 ] new_block->prev = block_before; 200c698: 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; 200c69c: 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; 200c6a0: 82 00 60 01 inc %g1 block_before->next = new_block; next->prev = new_block; 200c6a4: 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; 200c6a8: 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; 200c6ac: 80 a0 40 02 cmp %g1, %g2 200c6b0: 08 bf ff e7 bleu 200c64c <_Heap_Free+0x130> 200c6b4: 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; 200c6b8: 10 bf ff e5 b 200c64c <_Heap_Free+0x130> 200c6bc: 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; 200c6c0: 82 12 a0 01 or %o2, 1, %g1 200c6c4: c2 23 60 04 st %g1, [ %o5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c6c8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 next_block->prev_size = size; 200c6cc: 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; 200c6d0: 82 08 7f fe and %g1, -2, %g1 200c6d4: 10 bf ff de b 200c64c <_Heap_Free+0x130> 200c6d8: c2 20 a0 04 st %g1, [ %g2 + 4 ] =============================================================================== 02011078 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 2011078: 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; 201107c: 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; 2011080: c0 26 40 00 clr [ %i1 ] info->largest = 0; 2011084: c0 26 60 04 clr [ %i1 + 4 ] info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 2011088: 80 a6 00 01 cmp %i0, %g1 201108c: 02 80 00 13 be 20110d8 <_Heap_Get_free_information+0x60> <== NEVER TAKEN 2011090: c0 26 60 08 clr [ %i1 + 8 ] 2011094: 88 10 20 01 mov 1, %g4 2011098: 10 80 00 03 b 20110a4 <_Heap_Get_free_information+0x2c> 201109c: 86 10 20 00 clr %g3 20110a0: 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; 20110a4: 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 ) 20110a8: da 06 60 04 ld [ %i1 + 4 ], %o5 20110ac: 84 08 bf fe and %g2, -2, %g2 20110b0: 80 a3 40 02 cmp %o5, %g2 20110b4: 1a 80 00 03 bcc 20110c0 <_Heap_Get_free_information+0x48> 20110b8: 86 00 c0 02 add %g3, %g2, %g3 info->largest = the_size; 20110bc: 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) 20110c0: 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); 20110c4: 80 a6 00 01 cmp %i0, %g1 20110c8: 12 bf ff f6 bne 20110a0 <_Heap_Get_free_information+0x28> 20110cc: 84 01 20 01 add %g4, 1, %g2 20110d0: c6 26 60 08 st %g3, [ %i1 + 8 ] 20110d4: c8 26 40 00 st %g4, [ %i1 ] 20110d8: 81 c7 e0 08 ret 20110dc: 81 e8 00 00 restore =============================================================================== 020110e0 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 20110e0: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 20110e4: 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; 20110e8: 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; 20110ec: c0 26 40 00 clr [ %i1 ] the_info->Free.total = 0; 20110f0: c0 26 60 08 clr [ %i1 + 8 ] the_info->Free.largest = 0; 20110f4: c0 26 60 04 clr [ %i1 + 4 ] the_info->Used.number = 0; 20110f8: c0 26 60 0c clr [ %i1 + 0xc ] the_info->Used.total = 0; 20110fc: c0 26 60 14 clr [ %i1 + 0x14 ] the_info->Used.largest = 0; 2011100: c0 26 60 10 clr [ %i1 + 0x10 ] while ( the_block != end ) { 2011104: 80 a0 40 02 cmp %g1, %g2 2011108: 02 80 00 1a be 2011170 <_Heap_Get_information+0x90> <== NEVER TAKEN 201110c: 86 10 20 08 mov 8, %g3 2011110: 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; 2011114: 92 06 60 0c add %i1, 0xc, %o1 2011118: 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); 201111c: 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; 2011120: 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) ) 2011124: 80 8b 60 01 btst 1, %o5 2011128: 12 80 00 03 bne 2011134 <_Heap_Get_information+0x54> 201112c: 86 10 00 09 mov %o1, %g3 2011130: 86 10 00 19 mov %i1, %g3 info = &the_info->Used; else info = &the_info->Free; info->number++; 2011134: d4 00 c0 00 ld [ %g3 ], %o2 info->total += the_size; 2011138: d6 00 e0 08 ld [ %g3 + 8 ], %o3 if ( info->largest < the_size ) 201113c: 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++; 2011140: 94 02 a0 01 inc %o2 info->total += the_size; 2011144: 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++; 2011148: d4 20 c0 00 st %o2, [ %g3 ] info->total += the_size; if ( info->largest < the_size ) 201114c: 80 a3 00 04 cmp %o4, %g4 2011150: 1a 80 00 03 bcc 201115c <_Heap_Get_information+0x7c> 2011154: d6 20 e0 08 st %o3, [ %g3 + 8 ] info->largest = the_size; 2011158: 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 ) { 201115c: 80 a0 80 01 cmp %g2, %g1 2011160: 12 bf ff ef bne 201111c <_Heap_Get_information+0x3c> 2011164: 88 0b 7f fe and %o5, -2, %g4 2011168: c6 06 60 14 ld [ %i1 + 0x14 ], %g3 201116c: 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; 2011170: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } 2011174: 81 c7 e0 08 ret 2011178: 81 e8 00 00 restore =============================================================================== 020194a0 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 20194a0: 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 ) 20194a4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 20194a8: 7f ff fb 05 call 20180bc <.urem> 20194ac: 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; 20194b0: 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 ) 20194b4: 84 06 7f f8 add %i1, -8, %g2 20194b8: 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 20194bc: 80 a0 80 01 cmp %g2, %g1 20194c0: 0a 80 00 16 bcs 2019518 <_Heap_Size_of_alloc_area+0x78> 20194c4: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 20194c8: 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 20194cc: 80 a0 80 03 cmp %g2, %g3 20194d0: 18 80 00 12 bgu 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 20194d4: 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); 20194d8: c8 00 a0 04 ld [ %g2 + 4 ], %g4 20194dc: 88 09 3f fe and %g4, -2, %g4 20194e0: 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 20194e4: 80 a0 40 02 cmp %g1, %g2 20194e8: 18 80 00 0c bgu 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 20194ec: 80 a0 c0 02 cmp %g3, %g2 20194f0: 0a 80 00 0a bcs 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 20194f4: 01 00 00 00 nop } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 20194f8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20194fc: 80 88 60 01 btst 1, %g1 2019500: 02 80 00 06 be 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 2019504: 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; 2019508: 84 00 a0 04 add %g2, 4, %g2 201950c: c4 26 80 00 st %g2, [ %i2 ] return true; 2019510: 81 c7 e0 08 ret 2019514: 91 e8 20 01 restore %g0, 1, %o0 } 2019518: 81 c7 e0 08 ret 201951c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02008118 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2008118: 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; 200811c: 25 00 80 21 sethi %hi(0x2008400), %l2 2008120: 80 8e a0 ff btst 0xff, %i2 2008124: a4 14 a3 18 or %l2, 0x318, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2008128: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 200812c: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 2008130: 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; 2008134: 12 80 00 04 bne 2008144 <_Heap_Walk+0x2c> 2008138: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 200813c: 25 00 80 20 sethi %hi(0x2008000), %l2 2008140: a4 14 a1 10 or %l2, 0x110, %l2 ! 2008110 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2008144: 03 00 80 77 sethi %hi(0x201dc00), %g1 2008148: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201dfb0 <_System_state_Current> 200814c: 80 a0 60 03 cmp %g1, 3 2008150: 22 80 00 04 be,a 2008160 <_Heap_Walk+0x48> 2008154: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 2008158: 81 c7 e0 08 ret 200815c: 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)( 2008160: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2008164: c4 06 20 08 ld [ %i0 + 8 ], %g2 2008168: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200816c: 90 10 00 19 mov %i1, %o0 2008170: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2008174: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2008178: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 200817c: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 2008180: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 2008184: 92 10 20 00 clr %o1 2008188: 15 00 80 6c sethi %hi(0x201b000), %o2 200818c: 96 10 00 15 mov %l5, %o3 2008190: 94 12 a1 50 or %o2, 0x150, %o2 2008194: 9f c4 80 00 call %l2 2008198: 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 ) { 200819c: 80 a5 60 00 cmp %l5, 0 20081a0: 02 80 00 36 be 2008278 <_Heap_Walk+0x160> 20081a4: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 20081a8: 12 80 00 3c bne 2008298 <_Heap_Walk+0x180> 20081ac: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 20081b0: 7f ff e6 45 call 2001ac4 <.urem> 20081b4: 92 10 00 15 mov %l5, %o1 20081b8: 80 a2 20 00 cmp %o0, 0 20081bc: 12 80 00 40 bne 20082bc <_Heap_Walk+0x1a4> 20081c0: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 20081c4: 7f ff e6 40 call 2001ac4 <.urem> 20081c8: 92 10 00 15 mov %l5, %o1 20081cc: 80 a2 20 00 cmp %o0, 0 20081d0: 32 80 00 44 bne,a 20082e0 <_Heap_Walk+0x1c8> 20081d4: 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; 20081d8: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 20081dc: ae 8d a0 01 andcc %l6, 1, %l7 20081e0: 22 80 00 48 be,a 2008300 <_Heap_Walk+0x1e8> 20081e4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 20081e8: d6 04 00 00 ld [ %l0 ], %o3 20081ec: 80 a5 40 0b cmp %l5, %o3 20081f0: 32 80 00 1a bne,a 2008258 <_Heap_Walk+0x140> 20081f4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 20081f8: c2 05 20 04 ld [ %l4 + 4 ], %g1 20081fc: 82 08 7f fe and %g1, -2, %g1 2008200: 82 05 00 01 add %l4, %g1, %g1 2008204: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008208: 80 88 60 01 btst 1, %g1 200820c: 22 80 01 23 be,a 2008698 <_Heap_Walk+0x580> 2008210: 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; 2008214: 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 ) { 2008218: 80 a6 00 11 cmp %i0, %l1 200821c: 02 80 00 6f be 20083d8 <_Heap_Walk+0x2c0> 2008220: 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; 2008224: 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 2008228: 80 a7 00 11 cmp %i4, %l1 200822c: 28 80 00 3c bleu,a 200831c <_Heap_Walk+0x204> <== ALWAYS TAKEN 2008230: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 2008234: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2008238: 96 10 00 11 mov %l1, %o3 200823c: 92 10 20 01 mov 1, %o1 2008240: 15 00 80 6c sethi %hi(0x201b000), %o2 2008244: b0 10 20 00 clr %i0 2008248: 9f c4 80 00 call %l2 200824c: 94 12 a2 f8 or %o2, 0x2f8, %o2 2008250: 81 c7 e0 08 ret 2008254: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 2008258: 98 10 00 15 mov %l5, %o4 200825c: 92 10 20 01 mov 1, %o1 2008260: 15 00 80 6c sethi %hi(0x201b000), %o2 2008264: b0 10 20 00 clr %i0 2008268: 9f c4 80 00 call %l2 200826c: 94 12 a2 b0 or %o2, 0x2b0, %o2 2008270: 81 c7 e0 08 ret 2008274: 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" ); 2008278: 90 10 00 19 mov %i1, %o0 200827c: 92 10 20 01 mov 1, %o1 2008280: 15 00 80 6c sethi %hi(0x201b000), %o2 2008284: b0 10 20 00 clr %i0 2008288: 9f c4 80 00 call %l2 200828c: 94 12 a1 e8 or %o2, 0x1e8, %o2 2008290: 81 c7 e0 08 ret 2008294: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 2008298: 90 10 00 19 mov %i1, %o0 200829c: 96 10 00 15 mov %l5, %o3 20082a0: 92 10 20 01 mov 1, %o1 20082a4: 15 00 80 6c sethi %hi(0x201b000), %o2 20082a8: b0 10 20 00 clr %i0 20082ac: 9f c4 80 00 call %l2 20082b0: 94 12 a2 00 or %o2, 0x200, %o2 20082b4: 81 c7 e0 08 ret 20082b8: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 20082bc: 90 10 00 19 mov %i1, %o0 20082c0: 96 10 00 13 mov %l3, %o3 20082c4: 92 10 20 01 mov 1, %o1 20082c8: 15 00 80 6c sethi %hi(0x201b000), %o2 20082cc: b0 10 20 00 clr %i0 20082d0: 9f c4 80 00 call %l2 20082d4: 94 12 a2 20 or %o2, 0x220, %o2 20082d8: 81 c7 e0 08 ret 20082dc: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 20082e0: 96 10 00 10 mov %l0, %o3 20082e4: 92 10 20 01 mov 1, %o1 20082e8: 15 00 80 6c sethi %hi(0x201b000), %o2 20082ec: b0 10 20 00 clr %i0 20082f0: 9f c4 80 00 call %l2 20082f4: 94 12 a2 48 or %o2, 0x248, %o2 20082f8: 81 c7 e0 08 ret 20082fc: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 2008300: 92 10 20 01 mov 1, %o1 2008304: 15 00 80 6c sethi %hi(0x201b000), %o2 2008308: b0 10 20 00 clr %i0 200830c: 9f c4 80 00 call %l2 2008310: 94 12 a2 80 or %o2, 0x280, %o2 2008314: 81 c7 e0 08 ret 2008318: 81 e8 00 00 restore 200831c: 80 a6 c0 11 cmp %i3, %l1 2008320: 0a bf ff c6 bcs 2008238 <_Heap_Walk+0x120> <== NEVER TAKEN 2008324: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 2008328: 90 04 60 08 add %l1, 8, %o0 200832c: 7f ff e5 e6 call 2001ac4 <.urem> 2008330: 92 10 00 1a mov %i2, %o1 2008334: 80 a2 20 00 cmp %o0, 0 2008338: 12 80 00 df bne 20086b4 <_Heap_Walk+0x59c> <== NEVER TAKEN 200833c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2008340: c2 04 60 04 ld [ %l1 + 4 ], %g1 2008344: 82 08 7f fe and %g1, -2, %g1 2008348: 82 04 40 01 add %l1, %g1, %g1 200834c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008350: 80 88 60 01 btst 1, %g1 2008354: 12 80 00 ea bne 20086fc <_Heap_Walk+0x5e4> <== NEVER TAKEN 2008358: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 200835c: d8 04 60 0c ld [ %l1 + 0xc ], %o4 2008360: 80 a6 00 0c cmp %i0, %o4 2008364: 02 80 00 19 be 20083c8 <_Heap_Walk+0x2b0> <== ALWAYS TAKEN 2008368: ba 10 00 11 mov %l1, %i5 200836c: 30 80 00 dc b,a 20086dc <_Heap_Walk+0x5c4> <== NOT EXECUTED 2008370: 0a bf ff b2 bcs 2008238 <_Heap_Walk+0x120> 2008374: 90 10 00 19 mov %i1, %o0 2008378: 80 a6 c0 11 cmp %i3, %l1 200837c: 0a bf ff b0 bcs 200823c <_Heap_Walk+0x124> <== NEVER TAKEN 2008380: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 2008384: 90 04 60 08 add %l1, 8, %o0 2008388: 7f ff e5 cf call 2001ac4 <.urem> 200838c: 92 10 00 1a mov %i2, %o1 2008390: 80 a2 20 00 cmp %o0, 0 2008394: 32 80 00 c8 bne,a 20086b4 <_Heap_Walk+0x59c> 2008398: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200839c: c2 04 60 04 ld [ %l1 + 4 ], %g1 20083a0: 82 08 7f fe and %g1, -2, %g1 20083a4: 82 00 40 11 add %g1, %l1, %g1 20083a8: c2 00 60 04 ld [ %g1 + 4 ], %g1 20083ac: 80 88 60 01 btst 1, %g1 20083b0: 32 80 00 d2 bne,a 20086f8 <_Heap_Walk+0x5e0> 20083b4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 20083b8: d8 04 60 0c ld [ %l1 + 0xc ], %o4 20083bc: 80 a3 00 1d cmp %o4, %i5 20083c0: 12 80 00 c5 bne 20086d4 <_Heap_Walk+0x5bc> 20083c4: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 20083c8: 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 ) { 20083cc: 80 a6 00 11 cmp %i0, %l1 20083d0: 12 bf ff e8 bne 2008370 <_Heap_Walk+0x258> 20083d4: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 20083d8: 80 a5 00 10 cmp %l4, %l0 20083dc: 02 bf ff 5f be 2008158 <_Heap_Walk+0x40> <== NEVER TAKEN 20083e0: 37 00 80 6c sethi %hi(0x201b000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20083e4: 35 00 80 6c sethi %hi(0x201b000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 20083e8: 39 00 80 6d sethi %hi(0x201b400), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 20083ec: 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)( 20083f0: b6 16 e3 a0 or %i3, 0x3a0, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20083f4: b4 16 a3 b8 or %i2, 0x3b8, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 20083f8: b8 17 20 b8 or %i4, 0xb8, %i4 20083fc: 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; 2008400: 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 ) { 2008404: 80 a5 e0 00 cmp %l7, 0 2008408: 02 80 00 16 be 2008460 <_Heap_Walk+0x348> 200840c: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 2008410: 90 10 00 19 mov %i1, %o0 2008414: 92 10 20 00 clr %o1 2008418: 94 10 00 1b mov %i3, %o2 200841c: 96 10 00 10 mov %l0, %o3 2008420: 9f c4 80 00 call %l2 2008424: 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 2008428: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 200842c: 80 a0 40 11 cmp %g1, %l1 2008430: 28 80 00 18 bleu,a 2008490 <_Heap_Walk+0x378> <== ALWAYS TAKEN 2008434: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 2008438: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200843c: 96 10 00 10 mov %l0, %o3 2008440: 98 10 00 11 mov %l1, %o4 2008444: 92 10 20 01 mov 1, %o1 2008448: 15 00 80 6c sethi %hi(0x201b000), %o2 200844c: b0 10 20 00 clr %i0 2008450: 9f c4 80 00 call %l2 2008454: 94 12 a3 e0 or %o2, 0x3e0, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 2008458: 81 c7 e0 08 ret 200845c: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008460: da 04 00 00 ld [ %l0 ], %o5 2008464: 90 10 00 19 mov %i1, %o0 2008468: 92 10 20 00 clr %o1 200846c: 94 10 00 1a mov %i2, %o2 2008470: 96 10 00 10 mov %l0, %o3 2008474: 9f c4 80 00 call %l2 2008478: 98 10 00 16 mov %l6, %o4 200847c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2008480: 80 a0 40 11 cmp %g1, %l1 2008484: 18 bf ff ee bgu 200843c <_Heap_Walk+0x324> <== NEVER TAKEN 2008488: 90 10 00 19 mov %i1, %o0 200848c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2008490: 80 a0 40 11 cmp %g1, %l1 2008494: 0a bf ff ea bcs 200843c <_Heap_Walk+0x324> 2008498: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 200849c: 90 10 00 16 mov %l6, %o0 20084a0: 7f ff e5 89 call 2001ac4 <.urem> 20084a4: 92 10 00 1d mov %i5, %o1 20084a8: 80 a2 20 00 cmp %o0, 0 20084ac: 12 80 00 5d bne 2008620 <_Heap_Walk+0x508> 20084b0: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 20084b4: 18 80 00 65 bgu 2008648 <_Heap_Walk+0x530> 20084b8: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 20084bc: 3a 80 00 6e bcc,a 2008674 <_Heap_Walk+0x55c> 20084c0: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 20084c4: c2 04 60 04 ld [ %l1 + 4 ], %g1 20084c8: 80 88 60 01 btst 1, %g1 20084cc: 12 80 00 40 bne 20085cc <_Heap_Walk+0x4b4> 20084d0: 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; 20084d4: 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)( 20084d8: 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; 20084dc: 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; 20084e0: 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; 20084e4: 1b 00 80 6d sethi %hi(0x201b400), %o5 20084e8: 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; 20084ec: 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); 20084f0: 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; 20084f4: 02 80 00 07 be 2008510 <_Heap_Walk+0x3f8> 20084f8: 9a 13 60 a8 or %o5, 0xa8, %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)" : ""), 20084fc: 1b 00 80 6d sethi %hi(0x201b400), %o5 2008500: 80 a3 00 18 cmp %o4, %i0 2008504: 02 80 00 03 be 2008510 <_Heap_Walk+0x3f8> 2008508: 9a 13 60 c0 or %o5, 0xc0, %o5 200850c: 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)( 2008510: c2 04 20 08 ld [ %l0 + 8 ], %g1 2008514: 05 00 80 6d sethi %hi(0x201b400), %g2 2008518: 80 a0 c0 01 cmp %g3, %g1 200851c: 02 80 00 07 be 2008538 <_Heap_Walk+0x420> 2008520: 84 10 a0 d0 or %g2, 0xd0, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2008524: 05 00 80 6d sethi %hi(0x201b400), %g2 2008528: 80 a0 40 18 cmp %g1, %i0 200852c: 02 80 00 03 be 2008538 <_Heap_Walk+0x420> 2008530: 84 10 a0 e0 or %g2, 0xe0, %g2 2008534: 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)( 2008538: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200853c: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2008540: 90 10 00 19 mov %i1, %o0 2008544: 92 10 20 00 clr %o1 2008548: 15 00 80 6d sethi %hi(0x201b400), %o2 200854c: 96 10 00 10 mov %l0, %o3 2008550: 9f c4 80 00 call %l2 2008554: 94 12 a0 f0 or %o2, 0xf0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2008558: da 05 c0 00 ld [ %l7 ], %o5 200855c: 80 a5 80 0d cmp %l6, %o5 2008560: 02 80 00 0c be 2008590 <_Heap_Walk+0x478> 2008564: 90 10 00 19 mov %i1, %o0 (*printer)( 2008568: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 200856c: 96 10 00 10 mov %l0, %o3 2008570: 98 10 00 16 mov %l6, %o4 2008574: 92 10 20 01 mov 1, %o1 2008578: 15 00 80 6d sethi %hi(0x201b400), %o2 200857c: b0 10 20 00 clr %i0 2008580: 9f c4 80 00 call %l2 2008584: 94 12 a1 20 or %o2, 0x120, %o2 2008588: 81 c7 e0 08 ret 200858c: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 2008590: 80 8d 20 01 btst 1, %l4 2008594: 02 80 00 1c be 2008604 <_Heap_Walk+0x4ec> 2008598: 96 10 00 10 mov %l0, %o3 200859c: 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 ) { 20085a0: 80 a0 40 18 cmp %g1, %i0 20085a4: 12 80 00 07 bne 20085c0 <_Heap_Walk+0x4a8> <== ALWAYS TAKEN 20085a8: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085ac: 10 80 00 0f b 20085e8 <_Heap_Walk+0x4d0> <== NOT EXECUTED 20085b0: 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 ) { 20085b4: 80 a0 40 18 cmp %g1, %i0 20085b8: 02 80 00 0a be 20085e0 <_Heap_Walk+0x4c8> 20085bc: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 20085c0: 32 bf ff fd bne,a 20085b4 <_Heap_Walk+0x49c> 20085c4: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 20085c8: 80 a5 40 11 cmp %l5, %l1 20085cc: 02 bf fe e3 be 2008158 <_Heap_Walk+0x40> 20085d0: 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 ) { 20085d4: ec 04 60 04 ld [ %l1 + 4 ], %l6 20085d8: 10 bf ff 8a b 2008400 <_Heap_Walk+0x2e8> 20085dc: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085e0: 90 10 00 19 mov %i1, %o0 20085e4: 96 10 00 10 mov %l0, %o3 20085e8: 92 10 20 01 mov 1, %o1 20085ec: 15 00 80 6d sethi %hi(0x201b400), %o2 20085f0: b0 10 20 00 clr %i0 20085f4: 9f c4 80 00 call %l2 20085f8: 94 12 a1 90 or %o2, 0x190, %o2 20085fc: 81 c7 e0 08 ret 2008600: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 2008604: 92 10 20 01 mov 1, %o1 2008608: 15 00 80 6d sethi %hi(0x201b400), %o2 200860c: b0 10 20 00 clr %i0 2008610: 9f c4 80 00 call %l2 2008614: 94 12 a1 60 or %o2, 0x160, %o2 2008618: 81 c7 e0 08 ret 200861c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 2008620: 90 10 00 19 mov %i1, %o0 2008624: 96 10 00 10 mov %l0, %o3 2008628: 98 10 00 16 mov %l6, %o4 200862c: 92 10 20 01 mov 1, %o1 2008630: 15 00 80 6d sethi %hi(0x201b400), %o2 2008634: b0 10 20 00 clr %i0 2008638: 9f c4 80 00 call %l2 200863c: 94 12 a0 10 or %o2, 0x10, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 2008640: 81 c7 e0 08 ret 2008644: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 2008648: 90 10 00 19 mov %i1, %o0 200864c: 96 10 00 10 mov %l0, %o3 2008650: 98 10 00 16 mov %l6, %o4 2008654: 9a 10 00 13 mov %l3, %o5 2008658: 92 10 20 01 mov 1, %o1 200865c: 15 00 80 6d sethi %hi(0x201b400), %o2 2008660: b0 10 20 00 clr %i0 2008664: 9f c4 80 00 call %l2 2008668: 94 12 a0 40 or %o2, 0x40, %o2 block, block_size, min_block_size ); return false; 200866c: 81 c7 e0 08 ret 2008670: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 2008674: 96 10 00 10 mov %l0, %o3 2008678: 98 10 00 11 mov %l1, %o4 200867c: 92 10 20 01 mov 1, %o1 2008680: 15 00 80 6d sethi %hi(0x201b400), %o2 2008684: b0 10 20 00 clr %i0 2008688: 9f c4 80 00 call %l2 200868c: 94 12 a0 70 or %o2, 0x70, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 2008690: 81 c7 e0 08 ret 2008694: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 2008698: 92 10 20 01 mov 1, %o1 200869c: 15 00 80 6c sethi %hi(0x201b000), %o2 20086a0: b0 10 20 00 clr %i0 20086a4: 9f c4 80 00 call %l2 20086a8: 94 12 a2 e0 or %o2, 0x2e0, %o2 20086ac: 81 c7 e0 08 ret 20086b0: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 20086b4: 96 10 00 11 mov %l1, %o3 20086b8: 92 10 20 01 mov 1, %o1 20086bc: 15 00 80 6c sethi %hi(0x201b000), %o2 20086c0: b0 10 20 00 clr %i0 20086c4: 9f c4 80 00 call %l2 20086c8: 94 12 a3 18 or %o2, 0x318, %o2 20086cc: 81 c7 e0 08 ret 20086d0: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 20086d4: 90 10 00 19 mov %i1, %o0 20086d8: 96 10 00 11 mov %l1, %o3 20086dc: 92 10 20 01 mov 1, %o1 20086e0: 15 00 80 6c sethi %hi(0x201b000), %o2 20086e4: b0 10 20 00 clr %i0 20086e8: 9f c4 80 00 call %l2 20086ec: 94 12 a3 68 or %o2, 0x368, %o2 20086f0: 81 c7 e0 08 ret 20086f4: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 20086f8: 96 10 00 11 mov %l1, %o3 20086fc: 92 10 20 01 mov 1, %o1 2008700: 15 00 80 6c sethi %hi(0x201b000), %o2 2008704: b0 10 20 00 clr %i0 2008708: 9f c4 80 00 call %l2 200870c: 94 12 a3 48 or %o2, 0x348, %o2 2008710: 81 c7 e0 08 ret 2008714: 81 e8 00 00 restore =============================================================================== 020066dc <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 20066dc: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 20066e0: 23 00 80 6e sethi %hi(0x201b800), %l1 20066e4: c2 04 60 dc ld [ %l1 + 0xdc ], %g1 ! 201b8dc <_IO_Number_of_drivers> 20066e8: 80 a0 60 00 cmp %g1, 0 20066ec: 02 80 00 0c be 200671c <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 20066f0: a2 14 60 dc or %l1, 0xdc, %l1 20066f4: a0 10 20 00 clr %l0 (void) rtems_io_initialize( major, 0, NULL ); 20066f8: 90 10 00 10 mov %l0, %o0 20066fc: 92 10 20 00 clr %o1 2006700: 40 00 16 28 call 200bfa0 2006704: 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 ++ ) 2006708: c2 04 40 00 ld [ %l1 ], %g1 200670c: a0 04 20 01 inc %l0 2006710: 80 a0 40 10 cmp %g1, %l0 2006714: 18 bf ff fa bgu 20066fc <_IO_Initialize_all_drivers+0x20> 2006718: 90 10 00 10 mov %l0, %o0 200671c: 81 c7 e0 08 ret 2006720: 81 e8 00 00 restore =============================================================================== 02006724 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 2006724: 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; 2006728: 03 00 80 6a sethi %hi(0x201a800), %g1 200672c: 82 10 63 78 or %g1, 0x378, %g1 ! 201ab78 drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; 2006730: 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; 2006734: 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 ) 2006738: 80 a4 40 13 cmp %l1, %l3 200673c: 0a 80 00 08 bcs 200675c <_IO_Manager_initialization+0x38> 2006740: 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; 2006744: 03 00 80 6e sethi %hi(0x201b800), %g1 2006748: e0 20 60 e0 st %l0, [ %g1 + 0xe0 ] ! 201b8e0 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 200674c: 03 00 80 6e sethi %hi(0x201b800), %g1 2006750: e2 20 60 dc st %l1, [ %g1 + 0xdc ] ! 201b8dc <_IO_Number_of_drivers> return; 2006754: 81 c7 e0 08 ret 2006758: 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 ) 200675c: 83 2c e0 03 sll %l3, 3, %g1 2006760: a5 2c e0 05 sll %l3, 5, %l2 2006764: 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 *) 2006768: 40 00 0c 45 call 200987c <_Workspace_Allocate_or_fatal_error> 200676c: 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; 2006770: 03 00 80 6e sethi %hi(0x201b800), %g1 memset( 2006774: 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; 2006778: e6 20 60 dc st %l3, [ %g1 + 0xdc ] /* * 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 *) 200677c: 25 00 80 6e sethi %hi(0x201b800), %l2 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 2006780: 92 10 20 00 clr %o1 2006784: 40 00 22 e9 call 200f328 2006788: d0 24 a0 e0 st %o0, [ %l2 + 0xe0 ] _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 200678c: 80 a4 60 00 cmp %l1, 0 2006790: 02 bf ff f1 be 2006754 <_IO_Manager_initialization+0x30> <== NEVER TAKEN 2006794: da 04 a0 e0 ld [ %l2 + 0xe0 ], %o5 2006798: 82 10 20 00 clr %g1 200679c: 88 10 20 00 clr %g4 _IO_Driver_address_table[index] = driver_table[index]; 20067a0: c4 04 00 01 ld [ %l0 + %g1 ], %g2 20067a4: 86 04 00 01 add %l0, %g1, %g3 20067a8: c4 23 40 01 st %g2, [ %o5 + %g1 ] 20067ac: d8 00 e0 04 ld [ %g3 + 4 ], %o4 20067b0: 84 03 40 01 add %o5, %g1, %g2 20067b4: d8 20 a0 04 st %o4, [ %g2 + 4 ] 20067b8: 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++ ) 20067bc: 88 01 20 01 inc %g4 _IO_Driver_address_table[index] = driver_table[index]; 20067c0: d8 20 a0 08 st %o4, [ %g2 + 8 ] 20067c4: 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++ ) 20067c8: 82 00 60 18 add %g1, 0x18, %g1 _IO_Driver_address_table[index] = driver_table[index]; 20067cc: d8 20 a0 0c st %o4, [ %g2 + 0xc ] 20067d0: 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++ ) 20067d4: 80 a4 40 04 cmp %l1, %g4 _IO_Driver_address_table[index] = driver_table[index]; 20067d8: d8 20 a0 10 st %o4, [ %g2 + 0x10 ] 20067dc: 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++ ) 20067e0: 18 bf ff f0 bgu 20067a0 <_IO_Manager_initialization+0x7c> 20067e4: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 20067e8: 81 c7 e0 08 ret 20067ec: 81 e8 00 00 restore =============================================================================== 020073a0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20073a0: 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 ) 20073a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20073a8: 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 ) 20073ac: 80 a0 60 00 cmp %g1, 0 20073b0: 02 80 00 19 be 2007414 <_Objects_Allocate+0x74> <== NEVER TAKEN 20073b4: 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 ); 20073b8: a2 04 20 20 add %l0, 0x20, %l1 20073bc: 40 00 13 1a call 200c024 <_Chain_Get> 20073c0: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 20073c4: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 20073c8: 80 a0 60 00 cmp %g1, 0 20073cc: 02 80 00 12 be 2007414 <_Objects_Allocate+0x74> 20073d0: 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 ) { 20073d4: 80 a2 20 00 cmp %o0, 0 20073d8: 02 80 00 11 be 200741c <_Objects_Allocate+0x7c> 20073dc: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 20073e0: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 20073e4: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 20073e8: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1 20073ec: 40 00 42 88 call 2017e0c <.udiv> 20073f0: 90 22 00 01 sub %o0, %g1, %o0 20073f4: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 20073f8: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 20073fc: 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 ]--; 2007400: c4 00 40 08 ld [ %g1 + %o0 ], %g2 information->inactive--; 2007404: 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 ]--; 2007408: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 200740c: 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 ]--; 2007410: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; } } return the_object; } 2007414: 81 c7 e0 08 ret 2007418: 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 ); 200741c: 40 00 00 11 call 2007460 <_Objects_Extend_information> 2007420: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2007424: 40 00 13 00 call 200c024 <_Chain_Get> 2007428: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 200742c: b0 92 20 00 orcc %o0, 0, %i0 2007430: 32 bf ff ed bne,a 20073e4 <_Objects_Allocate+0x44> 2007434: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 information->inactive--; } } return the_object; } 2007438: 81 c7 e0 08 ret 200743c: 81 e8 00 00 restore =============================================================================== 02007460 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2007460: 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 ) 2007464: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 2007468: 80 a5 20 00 cmp %l4, 0 200746c: 02 80 00 ab be 2007718 <_Objects_Extend_information+0x2b8> 2007470: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2007474: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2007478: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 200747c: ab 2d 60 10 sll %l5, 0x10, %l5 2007480: 92 10 00 12 mov %l2, %o1 2007484: 40 00 42 62 call 2017e0c <.udiv> 2007488: 91 35 60 10 srl %l5, 0x10, %o0 200748c: 91 2a 20 10 sll %o0, 0x10, %o0 2007490: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 2007494: 80 a7 20 00 cmp %i4, 0 2007498: 02 80 00 a7 be 2007734 <_Objects_Extend_information+0x2d4><== NEVER TAKEN 200749c: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 20074a0: c2 05 00 00 ld [ %l4 ], %g1 20074a4: 80 a0 60 00 cmp %g1, 0 20074a8: 02 80 00 a4 be 2007738 <_Objects_Extend_information+0x2d8><== NEVER TAKEN 20074ac: a2 10 00 13 mov %l3, %l1 20074b0: 10 80 00 06 b 20074c8 <_Objects_Extend_information+0x68> 20074b4: a0 10 20 00 clr %l0 20074b8: c2 05 00 01 ld [ %l4 + %g1 ], %g1 20074bc: 80 a0 60 00 cmp %g1, 0 20074c0: 22 80 00 08 be,a 20074e0 <_Objects_Extend_information+0x80> 20074c4: 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++ ) { 20074c8: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 20074cc: 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++ ) { 20074d0: 80 a7 00 10 cmp %i4, %l0 20074d4: 18 bf ff f9 bgu 20074b8 <_Objects_Extend_information+0x58> 20074d8: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 20074dc: 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 ) { 20074e0: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 20074e4: 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 ) { 20074e8: 82 10 63 ff or %g1, 0x3ff, %g1 20074ec: 80 a5 40 01 cmp %l5, %g1 20074f0: 18 80 00 96 bgu 2007748 <_Objects_Extend_information+0x2e8><== NEVER TAKEN 20074f4: 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; 20074f8: 40 00 42 0b call 2017d24 <.umul> 20074fc: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2007500: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2007504: 80 a0 60 00 cmp %g1, 0 2007508: 12 80 00 6d bne 20076bc <_Objects_Extend_information+0x25c> 200750c: 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 ); 2007510: 40 00 08 db call 200987c <_Workspace_Allocate_or_fatal_error> 2007514: 01 00 00 00 nop 2007518: 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 ) { 200751c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007520: 80 a4 40 01 cmp %l1, %g1 2007524: 2a 80 00 43 bcs,a 2007630 <_Objects_Extend_information+0x1d0> 2007528: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 200752c: 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 ); 2007530: 91 2d 20 01 sll %l4, 1, %o0 2007534: 90 02 00 14 add %o0, %l4, %o0 2007538: 90 05 40 08 add %l5, %o0, %o0 200753c: 90 02 00 13 add %o0, %l3, %o0 2007540: 40 00 08 de call 20098b8 <_Workspace_Allocate> 2007544: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 2007548: ac 92 20 00 orcc %o0, 0, %l6 200754c: 02 80 00 7d be 2007740 <_Objects_Extend_information+0x2e0> 2007550: 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 ) { 2007554: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007558: 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); 200755c: ae 05 80 14 add %l6, %l4, %l7 2007560: 0a 80 00 5e bcs 20076d8 <_Objects_Extend_information+0x278> 2007564: 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++ ) { 2007568: 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, 200756c: 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++ ) { 2007570: 02 80 00 08 be 2007590 <_Objects_Extend_information+0x130><== NEVER TAKEN 2007574: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 2007578: 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++ ) { 200757c: 82 00 60 01 inc %g1 2007580: 80 a4 c0 01 cmp %l3, %g1 2007584: 18 bf ff fd bgu 2007578 <_Objects_Extend_information+0x118><== NEVER TAKEN 2007588: c0 20 80 14 clr [ %g2 + %l4 ] 200758c: 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 ); 2007590: 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; 2007594: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2007598: 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 ; 200759c: 80 a4 40 03 cmp %l1, %g3 20075a0: 1a 80 00 0a bcc 20075c8 <_Objects_Extend_information+0x168><== NEVER TAKEN 20075a4: c0 25 80 1d clr [ %l6 + %i5 ] 20075a8: 85 2c 60 02 sll %l1, 2, %g2 20075ac: 82 10 00 11 mov %l1, %g1 20075b0: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 20075b4: 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++ ) { 20075b8: 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 ; 20075bc: 80 a0 40 03 cmp %g1, %g3 20075c0: 0a bf ff fd bcs 20075b4 <_Objects_Extend_information+0x154> 20075c4: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 20075c8: 7f ff eb 39 call 20022ac 20075cc: 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( 20075d0: c6 06 00 00 ld [ %i0 ], %g3 20075d4: 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; 20075d8: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 20075dc: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 20075e0: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 20075e4: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 20075e8: 87 28 e0 18 sll %g3, 0x18, %g3 20075ec: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 20075f0: 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( 20075f4: ab 2d 60 10 sll %l5, 0x10, %l5 20075f8: 03 00 00 40 sethi %hi(0x10000), %g1 20075fc: ab 35 60 10 srl %l5, 0x10, %l5 2007600: 82 10 c0 01 or %g3, %g1, %g1 2007604: 82 10 40 02 or %g1, %g2, %g1 2007608: 82 10 40 15 or %g1, %l5, %g1 200760c: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2007610: 7f ff eb 2b call 20022bc 2007614: 01 00 00 00 nop if ( old_tables ) 2007618: 80 a4 e0 00 cmp %l3, 0 200761c: 22 80 00 05 be,a 2007630 <_Objects_Extend_information+0x1d0> 2007620: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 2007624: 40 00 08 ae call 20098dc <_Workspace_Free> 2007628: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 200762c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2007630: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2007634: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2007638: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 200763c: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007640: 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; 2007644: 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( 2007648: 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( 200764c: a4 07 bf f4 add %fp, -12, %l2 2007650: 40 00 12 88 call 200c070 <_Chain_Initialize> 2007654: 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 ) { 2007658: 30 80 00 0c b,a 2007688 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 200765c: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2007660: 83 28 60 18 sll %g1, 0x18, %g1 2007664: 85 28 a0 1b sll %g2, 0x1b, %g2 2007668: 82 10 40 14 or %g1, %l4, %g1 200766c: 82 10 40 02 or %g1, %g2, %g1 2007670: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007674: 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( 2007678: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 200767c: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007680: 7f ff fc e2 call 2006a08 <_Chain_Append> 2007684: 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 ) { 2007688: 40 00 12 67 call 200c024 <_Chain_Get> 200768c: 90 10 00 12 mov %l2, %o0 2007690: 80 a2 20 00 cmp %o0, 0 2007694: 32 bf ff f2 bne,a 200765c <_Objects_Extend_information+0x1fc> 2007698: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 200769c: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20076a0: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 20076a4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 20076a8: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20076ac: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 20076b0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 20076b4: 81 c7 e0 08 ret 20076b8: 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 ); 20076bc: 40 00 08 7f call 20098b8 <_Workspace_Allocate> 20076c0: 01 00 00 00 nop if ( !new_object_block ) 20076c4: a4 92 20 00 orcc %o0, 0, %l2 20076c8: 32 bf ff 96 bne,a 2007520 <_Objects_Extend_information+0xc0> 20076cc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20076d0: 81 c7 e0 08 ret 20076d4: 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, 20076d8: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 20076dc: 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, 20076e0: 40 00 1e d3 call 200f22c 20076e4: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 20076e8: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 20076ec: 94 10 00 1d mov %i5, %o2 20076f0: 40 00 1e cf call 200f22c 20076f4: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 20076f8: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 20076fc: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2007700: 94 04 c0 0a add %l3, %o2, %o2 2007704: 90 10 00 14 mov %l4, %o0 2007708: 40 00 1e c9 call 200f22c 200770c: 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 ); 2007710: 10 bf ff a1 b 2007594 <_Objects_Extend_information+0x134> 2007714: 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 ) 2007718: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 200771c: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 2007720: ab 2d 60 10 sll %l5, 0x10, %l5 2007724: a2 10 00 13 mov %l3, %l1 2007728: a0 10 20 00 clr %l0 200772c: 10 bf ff 6c b 20074dc <_Objects_Extend_information+0x7c> 2007730: b8 10 20 00 clr %i4 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 2007734: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 2007738: 10 bf ff 69 b 20074dc <_Objects_Extend_information+0x7c> <== NOT EXECUTED 200773c: 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 ); 2007740: 40 00 08 67 call 20098dc <_Workspace_Free> 2007744: 90 10 00 12 mov %l2, %o0 return; 2007748: 81 c7 e0 08 ret 200774c: 81 e8 00 00 restore =============================================================================== 020077fc <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 20077fc: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2007800: 80 a6 60 00 cmp %i1, 0 2007804: 12 80 00 04 bne 2007814 <_Objects_Get_information+0x18> 2007808: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 200780c: 81 c7 e0 08 ret 2007810: 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 ); 2007814: 40 00 13 b2 call 200c6dc <_Objects_API_maximum_class> 2007818: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 200781c: 80 a2 20 00 cmp %o0, 0 2007820: 22 80 00 15 be,a 2007874 <_Objects_Get_information+0x78> 2007824: b0 10 20 00 clr %i0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2007828: 80 a6 40 08 cmp %i1, %o0 200782c: 38 80 00 12 bgu,a 2007874 <_Objects_Get_information+0x78> 2007830: b0 10 20 00 clr %i0 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2007834: b1 2e 20 02 sll %i0, 2, %i0 2007838: 03 00 80 6d sethi %hi(0x201b400), %g1 200783c: 82 10 61 70 or %g1, 0x170, %g1 ! 201b570 <_Objects_Information_table> 2007840: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2007844: 80 a0 60 00 cmp %g1, 0 2007848: 02 80 00 0b be 2007874 <_Objects_Get_information+0x78> <== NEVER TAKEN 200784c: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2007850: b3 2e 60 02 sll %i1, 2, %i1 2007854: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 2007858: 80 a6 20 00 cmp %i0, 0 200785c: 02 80 00 06 be 2007874 <_Objects_Get_information+0x78> <== NEVER TAKEN 2007860: 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 ) 2007864: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007868: 80 a0 60 00 cmp %g1, 0 200786c: 22 80 00 02 be,a 2007874 <_Objects_Get_information+0x78> 2007870: b0 10 20 00 clr %i0 return NULL; #endif return info; } 2007874: 81 c7 e0 08 ret 2007878: 81 e8 00 00 restore =============================================================================== 020095e4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 20095e4: 9d e3 bf 90 save %sp, -112, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 20095e8: 80 a6 60 00 cmp %i1, 0 20095ec: 12 80 00 05 bne 2009600 <_Objects_Get_name_as_string+0x1c> 20095f0: 80 a6 a0 00 cmp %i2, 0 } } *d = '\0'; _Thread_Enable_dispatch(); return name; 20095f4: b4 10 20 00 clr %i2 } return NULL; /* unreachable path */ } 20095f8: 81 c7 e0 08 ret 20095fc: 91 e8 00 1a restore %g0, %i2, %o0 Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 2009600: 02 bf ff fe be 20095f8 <_Objects_Get_name_as_string+0x14> 2009604: 80 a6 20 00 cmp %i0, 0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2009608: 12 80 00 04 bne 2009618 <_Objects_Get_name_as_string+0x34> 200960c: 03 00 80 a7 sethi %hi(0x2029c00), %g1 2009610: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 2029c60 <_Thread_Executing> 2009614: f0 00 60 08 ld [ %g1 + 8 ], %i0 information = _Objects_Get_information_id( tmpId ); 2009618: 7f ff ff af call 20094d4 <_Objects_Get_information_id> 200961c: 90 10 00 18 mov %i0, %o0 if ( !information ) 2009620: 80 a2 20 00 cmp %o0, 0 2009624: 22 bf ff f5 be,a 20095f8 <_Objects_Get_name_as_string+0x14> 2009628: b4 10 20 00 clr %i2 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 200962c: 92 10 00 18 mov %i0, %o1 2009630: 40 00 00 2f call 20096ec <_Objects_Get> 2009634: 94 07 bf fc add %fp, -4, %o2 switch ( location ) { 2009638: c2 07 bf fc ld [ %fp + -4 ], %g1 200963c: 80 a0 60 00 cmp %g1, 0 2009640: 32 bf ff ee bne,a 20095f8 <_Objects_Get_name_as_string+0x14> 2009644: 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; 2009648: 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'; 200964c: 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; 2009650: 87 30 60 18 srl %g1, 0x18, %g3 lname[ 1 ] = (u32_name >> 16) & 0xff; 2009654: 85 30 60 10 srl %g1, 0x10, %g2 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 2009658: 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; 200965c: c4 2f bf f1 stb %g2, [ %fp + -15 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 2009660: 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; 2009664: c6 2f bf f0 stb %g3, [ %fp + -16 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 2009668: c2 2f bf f2 stb %g1, [ %fp + -14 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 200966c: b2 86 7f ff addcc %i1, -1, %i1 2009670: 02 80 00 1d be 20096e4 <_Objects_Get_name_as_string+0x100><== NEVER TAKEN 2009674: 84 10 00 03 mov %g3, %g2 2009678: 80 a0 e0 00 cmp %g3, 0 200967c: 02 80 00 1a be 20096e4 <_Objects_Get_name_as_string+0x100> 2009680: 17 00 80 85 sethi %hi(0x2021400), %o3 2009684: 86 10 00 1a mov %i2, %g3 2009688: 96 12 e0 b8 or %o3, 0xb8, %o3 200968c: 82 10 20 00 clr %g1 2009690: 10 80 00 06 b 20096a8 <_Objects_Get_name_as_string+0xc4> 2009694: 98 07 bf f0 add %fp, -16, %o4 2009698: c8 4b 00 01 ldsb [ %o4 + %g1 ], %g4 200969c: 80 a1 20 00 cmp %g4, 0 20096a0: 02 80 00 0e be 20096d8 <_Objects_Get_name_as_string+0xf4> 20096a4: c4 0b 00 01 ldub [ %o4 + %g1 ], %g2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 20096a8: da 02 c0 00 ld [ %o3 ], %o5 20096ac: 88 08 a0 ff and %g2, 0xff, %g4 20096b0: 88 03 40 04 add %o5, %g4, %g4 20096b4: c8 49 20 01 ldsb [ %g4 + 1 ], %g4 20096b8: 80 89 20 97 btst 0x97, %g4 20096bc: 12 80 00 03 bne 20096c8 <_Objects_Get_name_as_string+0xe4> 20096c0: 82 00 60 01 inc %g1 20096c4: 84 10 20 2a mov 0x2a, %g2 20096c8: c4 28 c0 00 stb %g2, [ %g3 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 20096cc: 80 a0 40 19 cmp %g1, %i1 20096d0: 0a bf ff f2 bcs 2009698 <_Objects_Get_name_as_string+0xb4> 20096d4: 86 00 e0 01 inc %g3 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 20096d8: 40 00 02 5d call 200a04c <_Thread_Enable_dispatch> 20096dc: c0 28 c0 00 clrb [ %g3 ] return name; 20096e0: 30 bf ff c6 b,a 20095f8 <_Objects_Get_name_as_string+0x14> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 20096e4: 10 bf ff fd b 20096d8 <_Objects_Get_name_as_string+0xf4> 20096e8: 86 10 00 1a mov %i2, %g3 =============================================================================== 02018d78 <_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; 2018d78: c4 02 20 08 ld [ %o0 + 8 ], %g2 if ( information->maximum >= index ) { 2018d7c: 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; 2018d80: 84 22 40 02 sub %o1, %g2, %g2 2018d84: 84 00 a0 01 inc %g2 if ( information->maximum >= index ) { 2018d88: 80 a0 80 01 cmp %g2, %g1 2018d8c: 18 80 00 09 bgu 2018db0 <_Objects_Get_no_protection+0x38> 2018d90: 85 28 a0 02 sll %g2, 2, %g2 if ( (the_object = information->local_table[ index ]) != NULL ) { 2018d94: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2018d98: d0 00 40 02 ld [ %g1 + %g2 ], %o0 2018d9c: 80 a2 20 00 cmp %o0, 0 2018da0: 02 80 00 05 be 2018db4 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 2018da4: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 2018da8: 81 c3 e0 08 retl 2018dac: 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; 2018db0: 82 10 20 01 mov 1, %g1 2018db4: 90 10 20 00 clr %o0 return NULL; } 2018db8: 81 c3 e0 08 retl 2018dbc: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 0200906c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200906c: 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; 2009070: 92 96 20 00 orcc %i0, 0, %o1 2009074: 12 80 00 06 bne 200908c <_Objects_Id_to_name+0x20> 2009078: 83 32 60 18 srl %o1, 0x18, %g1 200907c: 03 00 80 83 sethi %hi(0x2020c00), %g1 2009080: c2 00 63 e0 ld [ %g1 + 0x3e0 ], %g1 ! 2020fe0 <_Thread_Executing> 2009084: 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); 2009088: 83 32 60 18 srl %o1, 0x18, %g1 200908c: 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 ) 2009090: 84 00 7f ff add %g1, -1, %g2 2009094: 80 a0 a0 03 cmp %g2, 3 2009098: 18 80 00 18 bgu 20090f8 <_Objects_Id_to_name+0x8c> 200909c: 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 ] ) 20090a0: 05 00 80 83 sethi %hi(0x2020c00), %g2 20090a4: 84 10 a2 80 or %g2, 0x280, %g2 ! 2020e80 <_Objects_Information_table> 20090a8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 20090ac: 80 a0 60 00 cmp %g1, 0 20090b0: 02 80 00 12 be 20090f8 <_Objects_Id_to_name+0x8c> 20090b4: 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 ]; 20090b8: 85 28 a0 02 sll %g2, 2, %g2 20090bc: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 20090c0: 80 a2 20 00 cmp %o0, 0 20090c4: 02 80 00 0d be 20090f8 <_Objects_Id_to_name+0x8c> <== NEVER TAKEN 20090c8: 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 ); 20090cc: 7f ff ff cb call 2008ff8 <_Objects_Get> 20090d0: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 20090d4: 80 a2 20 00 cmp %o0, 0 20090d8: 02 80 00 08 be 20090f8 <_Objects_Id_to_name+0x8c> 20090dc: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 20090e0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 20090e4: b0 10 20 00 clr %i0 20090e8: 40 00 02 6f call 2009aa4 <_Thread_Enable_dispatch> 20090ec: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 20090f0: 81 c7 e0 08 ret 20090f4: 81 e8 00 00 restore } 20090f8: 81 c7 e0 08 ret 20090fc: 91 e8 20 03 restore %g0, 3, %o0 =============================================================================== 02007964 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 2007964: 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; 2007968: 05 00 80 6d sethi %hi(0x201b400), %g2 200796c: 83 2e 60 02 sll %i1, 2, %g1 2007970: 84 10 a1 70 or %g2, 0x170, %g2 2007974: 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; 2007978: 85 2f 20 10 sll %i4, 0x10, %g2 200797c: 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; 2007980: 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; 2007984: 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; 2007988: 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; 200798c: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 2007990: 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; 2007994: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 2007998: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 200799c: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 20079a0: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 20079a4: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 20079a8: 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; 20079ac: 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 = 20079b0: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 20079b4: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 20079b8: 80 a0 a0 00 cmp %g2, 0 20079bc: 02 80 00 05 be 20079d0 <_Objects_Initialize_information+0x6c> 20079c0: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 20079c4: 80 a6 e0 00 cmp %i3, 0 20079c8: 02 80 00 28 be 2007a68 <_Objects_Initialize_information+0x104> 20079cc: 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; 20079d0: 07 00 80 6c sethi %hi(0x201b000), %g3 20079d4: 86 10 e2 bc or %g3, 0x2bc, %g3 ! 201b2bc /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 20079d8: 80 a0 00 1b cmp %g0, %i3 20079dc: b3 2e 60 18 sll %i1, 0x18, %i1 20079e0: 84 40 20 00 addx %g0, 0, %g2 20079e4: 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; 20079e8: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 20079ec: 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 = 20079f0: 07 00 00 40 sethi %hi(0x10000), %g3 20079f4: b2 16 40 03 or %i1, %g3, %i1 20079f8: b4 16 40 1a or %i1, %i2, %i2 20079fc: b4 16 80 02 or %i2, %g2, %i2 2007a00: 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) & 2007a04: 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) ) 2007a08: 80 88 60 03 btst 3, %g1 2007a0c: 02 80 00 0c be 2007a3c <_Objects_Initialize_information+0xd8><== ALWAYS TAKEN 2007a10: 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); 2007a14: 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; 2007a18: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED 2007a1c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED the_chain->permanent_null = NULL; 2007a20: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 2007a24: 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 ) { 2007a28: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2007a2c: 12 80 00 0d bne 2007a60 <_Objects_Initialize_information+0xfc><== NOT EXECUTED 2007a30: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 2007a34: 81 c7 e0 08 ret 2007a38: 81 e8 00 00 restore /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 2007a3c: 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); 2007a40: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 2007a44: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 2007a48: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 2007a4c: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 2007a50: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 2007a54: 80 a6 e0 00 cmp %i3, 0 2007a58: 02 bf ff f7 be 2007a34 <_Objects_Initialize_information+0xd0> 2007a5c: 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 ); 2007a60: 7f ff fe 80 call 2007460 <_Objects_Extend_information> 2007a64: 81 e8 00 00 restore /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 2007a68: 92 10 20 01 mov 1, %o1 2007a6c: 7f ff fe 1e call 20072e4 <_Internal_error_Occurred> 2007a70: 94 10 20 14 mov 0x14, %o2 =============================================================================== 02007b38 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2007b38: 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 ); 2007b3c: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 2007b40: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 2007b44: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2007b48: 92 10 00 11 mov %l1, %o1 2007b4c: 40 00 40 b0 call 2017e0c <.udiv> 2007b50: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2007b54: 80 a2 20 00 cmp %o0, 0 2007b58: 02 80 00 12 be 2007ba0 <_Objects_Shrink_information+0x68> <== NEVER TAKEN 2007b5c: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 2007b60: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2007b64: c4 00 c0 00 ld [ %g3 ], %g2 2007b68: 80 a4 40 02 cmp %l1, %g2 2007b6c: 12 80 00 09 bne 2007b90 <_Objects_Shrink_information+0x58><== ALWAYS TAKEN 2007b70: 82 10 20 00 clr %g1 2007b74: 10 80 00 0d b 2007ba8 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 2007b78: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 2007b7c: 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 ] == 2007b80: 80 a4 40 02 cmp %l1, %g2 2007b84: 02 80 00 09 be 2007ba8 <_Objects_Shrink_information+0x70> 2007b88: 84 04 a0 04 add %l2, 4, %g2 2007b8c: 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++ ) { 2007b90: 82 00 60 01 inc %g1 2007b94: 80 a2 00 01 cmp %o0, %g1 2007b98: 38 bf ff f9 bgu,a 2007b7c <_Objects_Shrink_information+0x44> 2007b9c: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 2007ba0: 81 c7 e0 08 ret 2007ba4: 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; 2007ba8: 10 80 00 06 b 2007bc0 <_Objects_Shrink_information+0x88> 2007bac: 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 ); 2007bb0: 80 a4 60 00 cmp %l1, 0 2007bb4: 22 80 00 12 be,a 2007bfc <_Objects_Shrink_information+0xc4> 2007bb8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2007bbc: 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 ); 2007bc0: 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) && 2007bc4: 80 a0 40 10 cmp %g1, %l0 2007bc8: 0a bf ff fa bcs 2007bb0 <_Objects_Shrink_information+0x78> 2007bcc: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 2007bd0: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2007bd4: 84 04 00 02 add %l0, %g2, %g2 2007bd8: 80 a0 40 02 cmp %g1, %g2 2007bdc: 1a bf ff f6 bcc 2007bb4 <_Objects_Shrink_information+0x7c> 2007be0: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 2007be4: 40 00 11 06 call 200bffc <_Chain_Extract> 2007be8: 01 00 00 00 nop } } while ( the_object ); 2007bec: 80 a4 60 00 cmp %l1, 0 2007bf0: 12 bf ff f4 bne 2007bc0 <_Objects_Shrink_information+0x88><== ALWAYS TAKEN 2007bf4: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2007bf8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2007bfc: 40 00 07 38 call 20098dc <_Workspace_Free> 2007c00: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007c04: 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; 2007c08: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 2007c0c: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 2007c10: 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; 2007c14: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 2007c18: 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; 2007c1c: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007c20: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 2007c24: 81 c7 e0 08 ret 2007c28: 81 e8 00 00 restore =============================================================================== 020063d8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 20063d8: 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; 20063dc: 03 00 80 6a sethi %hi(0x201a800), %g1 20063e0: 82 10 63 40 or %g1, 0x340, %g1 ! 201ab40 20063e4: 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 ) 20063e8: 80 a4 20 00 cmp %l0, 0 20063ec: 02 80 00 1a be 2006454 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 20063f0: 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++ ) { 20063f4: 80 a4 a0 00 cmp %l2, 0 20063f8: 02 80 00 17 be 2006454 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN 20063fc: a2 10 20 00 clr %l1 2006400: a6 07 bf fc add %fp, -4, %l3 return_value = rtems_task_create( 2006404: d0 04 00 00 ld [ %l0 ], %o0 2006408: d2 04 20 08 ld [ %l0 + 8 ], %o1 200640c: d4 04 20 04 ld [ %l0 + 4 ], %o2 2006410: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 2006414: d8 04 20 0c ld [ %l0 + 0xc ], %o4 2006418: 7f ff ff 6e call 20061d0 200641c: 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 ) ) 2006420: 80 a2 20 00 cmp %o0, 0 2006424: 12 80 00 0f bne 2006460 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> 2006428: 94 10 00 08 mov %o0, %o2 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 200642c: d0 07 bf fc ld [ %fp + -4 ], %o0 2006430: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 2006434: 40 00 00 0f call 2006470 2006438: 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 ) ) 200643c: 80 a2 20 00 cmp %o0, 0 2006440: 12 80 00 07 bne 200645c <_RTEMS_tasks_Initialize_user_tasks_body+0x84> 2006444: a2 04 60 01 inc %l1 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 2006448: 80 a4 80 11 cmp %l2, %l1 200644c: 18 bf ff ee bgu 2006404 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c><== NEVER TAKEN 2006450: a0 04 20 1c add %l0, 0x1c, %l0 2006454: 81 c7 e0 08 ret 2006458: 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 ); 200645c: 94 10 00 08 mov %o0, %o2 2006460: 92 10 20 01 mov 1, %o1 2006464: 40 00 03 a0 call 20072e4 <_Internal_error_Occurred> 2006468: 90 10 20 01 mov 1, %o0 =============================================================================== 0200bdac <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200bdac: 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 ]; 200bdb0: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 200bdb4: 80 a4 20 00 cmp %l0, 0 200bdb8: 02 80 00 1f be 200be34 <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN 200bdbc: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200bdc0: 7f ff d9 3b call 20022ac 200bdc4: 01 00 00 00 nop signal_set = asr->signals_posted; 200bdc8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 200bdcc: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 200bdd0: 7f ff d9 3b call 20022bc 200bdd4: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200bdd8: 80 a4 60 00 cmp %l1, 0 200bddc: 32 80 00 04 bne,a 200bdec <_RTEMS_tasks_Post_switch_extension+0x40><== ALWAYS TAKEN 200bde0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200bde4: 81 c7 e0 08 ret <== NOT EXECUTED 200bde8: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bdec: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200bdf0: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bdf4: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200bdf8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bdfc: 94 10 00 12 mov %l2, %o2 200be00: 27 00 00 3f sethi %hi(0xfc00), %l3 200be04: 40 00 07 c7 call 200dd20 200be08: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200be0c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 200be10: 9f c0 40 00 call %g1 200be14: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 200be18: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200be1c: 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; 200be20: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200be24: 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; 200be28: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200be2c: 40 00 07 bd call 200dd20 200be30: 94 10 00 12 mov %l2, %o2 200be34: 81 c7 e0 08 ret 200be38: 81 e8 00 00 restore =============================================================================== 0200bcd0 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 200bcd0: c2 02 21 70 ld [ %o0 + 0x170 ], %g1 while (tvp) { 200bcd4: 80 a0 60 00 cmp %g1, 0 200bcd8: 22 80 00 0b be,a 200bd04 <_RTEMS_tasks_Switch_extension+0x34> 200bcdc: c2 02 61 70 ld [ %o1 + 0x170 ], %g1 tvp->tval = *tvp->ptr; 200bce0: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->gval; 200bce4: c6 00 60 08 ld [ %g1 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 200bce8: c8 00 80 00 ld [ %g2 ], %g4 200bcec: c8 20 60 0c st %g4, [ %g1 + 0xc ] *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; 200bcf0: c2 00 40 00 ld [ %g1 ], %g1 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 200bcf4: 80 a0 60 00 cmp %g1, 0 200bcf8: 12 bf ff fa bne 200bce0 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN 200bcfc: 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; 200bd00: c2 02 61 70 ld [ %o1 + 0x170 ], %g1 while (tvp) { 200bd04: 80 a0 60 00 cmp %g1, 0 200bd08: 02 80 00 0a be 200bd30 <_RTEMS_tasks_Switch_extension+0x60> 200bd0c: 01 00 00 00 nop tvp->gval = *tvp->ptr; 200bd10: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->tval; 200bd14: 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; 200bd18: c8 00 80 00 ld [ %g2 ], %g4 200bd1c: c8 20 60 08 st %g4, [ %g1 + 8 ] *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; 200bd20: c2 00 40 00 ld [ %g1 ], %g1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 200bd24: 80 a0 60 00 cmp %g1, 0 200bd28: 12 bf ff fa bne 200bd10 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN 200bd2c: c6 20 80 00 st %g3, [ %g2 ] 200bd30: 81 c3 e0 08 retl =============================================================================== 02007710 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2007710: 9d e3 bf 98 save %sp, -104, %sp 2007714: 11 00 80 84 sethi %hi(0x2021000), %o0 2007718: 92 10 00 18 mov %i0, %o1 200771c: 90 12 23 58 or %o0, 0x358, %o0 2007720: 40 00 07 e1 call 20096a4 <_Objects_Get> 2007724: 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 ) { 2007728: c2 07 bf fc ld [ %fp + -4 ], %g1 200772c: 80 a0 60 00 cmp %g1, 0 2007730: 12 80 00 16 bne 2007788 <_Rate_monotonic_Timeout+0x78> <== NEVER TAKEN 2007734: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2007738: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 200773c: 03 00 00 10 sethi %hi(0x4000), %g1 2007740: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2007744: 80 88 80 01 btst %g2, %g1 2007748: 22 80 00 08 be,a 2007768 <_Rate_monotonic_Timeout+0x58> 200774c: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 the_thread->Wait.id == the_period->Object.id ) { 2007750: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2007754: c2 04 20 08 ld [ %l0 + 8 ], %g1 2007758: 80 a0 80 01 cmp %g2, %g1 200775c: 02 80 00 19 be 20077c0 <_Rate_monotonic_Timeout+0xb0> 2007760: 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 ) { 2007764: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 2007768: 80 a0 60 01 cmp %g1, 1 200776c: 02 80 00 09 be 2007790 <_Rate_monotonic_Timeout+0x80> 2007770: 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; 2007774: 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; 2007778: 03 00 80 85 sethi %hi(0x2021400), %g1 200777c: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 20214d0 <_Thread_Dispatch_disable_level> 2007780: 84 00 bf ff add %g2, -1, %g2 2007784: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ] 2007788: 81 c7 e0 08 ret 200778c: 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; 2007790: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 2007794: 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; 2007798: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 200779c: 7f ff fe 24 call 200702c <_Rate_monotonic_Initiate_statistics> 20077a0: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20077a4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20077a8: 92 04 20 10 add %l0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20077ac: c2 24 20 1c st %g1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20077b0: 11 00 80 85 sethi %hi(0x2021400), %o0 20077b4: 40 00 0f b2 call 200b67c <_Watchdog_Insert> 20077b8: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 20215b0 <_Watchdog_Ticks_chain> 20077bc: 30 bf ff ef b,a 2007778 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20077c0: 40 00 09 25 call 2009c54 <_Thread_Clear_state> 20077c4: 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 ); 20077c8: 10 bf ff f5 b 200779c <_Rate_monotonic_Timeout+0x8c> 20077cc: 90 10 00 10 mov %l0, %o0 =============================================================================== 02006ea4 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 2006ea4: 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; 2006ea8: 05 00 80 6d sethi %hi(0x201b400), %g2 2006eac: c6 00 a3 64 ld [ %g2 + 0x364 ], %g3 ! 201b764 <_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() ); 2006eb0: 03 00 80 6a sethi %hi(0x201a800), %g1 2006eb4: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201ab84 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2006eb8: 86 00 e0 01 inc %g3 2006ebc: c6 20 a3 64 st %g3, [ %g2 + 0x364 ] { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2006ec0: 87 28 60 07 sll %g1, 7, %g3 2006ec4: 85 28 60 02 sll %g1, 2, %g2 2006ec8: 84 20 c0 02 sub %g3, %g2, %g2 2006ecc: 82 00 80 01 add %g2, %g1, %g1 2006ed0: 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 ); 2006ed4: 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() ); 2006ed8: 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 ); 2006edc: 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() ); 2006ee0: 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 ); 2006ee4: 11 00 80 6d sethi %hi(0x201b400), %o0 2006ee8: 40 00 08 ab call 2009194 <_Timespec_Add_to> 2006eec: 90 12 22 90 or %o0, 0x290, %o0 ! 201b690 <_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 ); 2006ef0: 92 10 00 10 mov %l0, %o1 2006ef4: 11 00 80 6d sethi %hi(0x201b400), %o0 2006ef8: 40 00 08 a7 call 2009194 <_Timespec_Add_to> 2006efc: 90 12 22 a4 or %o0, 0x2a4, %o0 ! 201b6a4 <_TOD_Now> while ( seconds ) { 2006f00: a0 92 20 00 orcc %o0, 0, %l0 2006f04: 02 80 00 08 be 2006f24 <_TOD_Tickle_ticks+0x80> 2006f08: 23 00 80 6d sethi %hi(0x201b400), %l1 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 2006f0c: a2 14 62 e4 or %l1, 0x2e4, %l1 ! 201b6e4 <_Watchdog_Seconds_chain> 2006f10: 40 00 0a 31 call 20097d4 <_Watchdog_Tickle> 2006f14: 90 10 00 11 mov %l1, %o0 2006f18: a0 84 3f ff addcc %l0, -1, %l0 2006f1c: 12 bf ff fd bne 2006f10 <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN 2006f20: 01 00 00 00 nop 2006f24: 81 c7 e0 08 ret 2006f28: 81 e8 00 00 restore =============================================================================== 02007088 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2007088: 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(); 200708c: 03 00 80 84 sethi %hi(0x2021000), %g1 if ((!the_tod) || 2007090: 80 a6 20 00 cmp %i0, 0 2007094: 02 80 00 2e be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN 2007098: d2 00 63 14 ld [ %g1 + 0x314 ], %o1 200709c: 11 00 03 d0 sethi %hi(0xf4000), %o0 20070a0: 40 00 58 77 call 201d27c <.udiv> 20070a4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 (the_tod->ticks >= ticks_per_second) || 20070a8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20070ac: 80 a2 00 01 cmp %o0, %g1 20070b0: 08 80 00 27 bleu 200714c <_TOD_Validate+0xc4> 20070b4: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 20070b8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20070bc: 80 a0 60 3b cmp %g1, 0x3b 20070c0: 18 80 00 23 bgu 200714c <_TOD_Validate+0xc4> 20070c4: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 20070c8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20070cc: 80 a0 60 3b cmp %g1, 0x3b 20070d0: 18 80 00 1f bgu 200714c <_TOD_Validate+0xc4> 20070d4: 01 00 00 00 nop (the_tod->hour >= TOD_HOURS_PER_DAY) || 20070d8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20070dc: 80 a0 60 17 cmp %g1, 0x17 20070e0: 18 80 00 1b bgu 200714c <_TOD_Validate+0xc4> 20070e4: 01 00 00 00 nop (the_tod->month == 0) || 20070e8: 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) || 20070ec: 80 a0 60 00 cmp %g1, 0 20070f0: 02 80 00 17 be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN 20070f4: 80 a0 60 0c cmp %g1, 0xc 20070f8: 18 80 00 15 bgu 200714c <_TOD_Validate+0xc4> 20070fc: 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) || 2007100: 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) || 2007104: 80 a0 a7 c3 cmp %g2, 0x7c3 2007108: 08 80 00 11 bleu 200714c <_TOD_Validate+0xc4> 200710c: 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) ) 2007110: 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) || 2007114: 80 a0 e0 00 cmp %g3, 0 2007118: 02 80 00 0d be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN 200711c: 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 ) 2007120: 32 80 00 0d bne,a 2007154 <_TOD_Validate+0xcc> 2007124: 83 28 60 02 sll %g1, 2, %g1 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2007128: 82 00 60 0d add %g1, 0xd, %g1 200712c: 05 00 80 7f sethi %hi(0x201fc00), %g2 2007130: 83 28 60 02 sll %g1, 2, %g1 2007134: 84 10 a0 1c or %g2, 0x1c, %g2 2007138: 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( 200713c: 80 a0 40 03 cmp %g1, %g3 2007140: b0 60 3f ff subx %g0, -1, %i0 2007144: 81 c7 e0 08 ret 2007148: 81 e8 00 00 restore if ( the_tod->day > days_in_month ) return false; return true; } 200714c: 81 c7 e0 08 ret 2007150: 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 ]; 2007154: 05 00 80 7f sethi %hi(0x201fc00), %g2 2007158: 84 10 a0 1c or %g2, 0x1c, %g2 ! 201fc1c <_TOD_Days_per_month> 200715c: 10 bf ff f8 b 200713c <_TOD_Validate+0xb4> 2007160: c2 00 80 01 ld [ %g2 + %g1 ], %g1 =============================================================================== 02007c90 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007c90: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 2007c94: 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 ); 2007c98: 40 00 04 84 call 2008ea8 <_Thread_Set_transient> 2007c9c: 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 ) 2007ca0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2007ca4: 80 a0 40 19 cmp %g1, %i1 2007ca8: 02 80 00 05 be 2007cbc <_Thread_Change_priority+0x2c> 2007cac: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 2007cb0: 92 10 00 19 mov %i1, %o1 2007cb4: 40 00 04 01 call 2008cb8 <_Thread_Set_priority> 2007cb8: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 2007cbc: 7f ff e9 7c call 20022ac 2007cc0: 01 00 00 00 nop 2007cc4: 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; 2007cc8: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 2007ccc: 80 a4 a0 04 cmp %l2, 4 2007cd0: 02 80 00 18 be 2007d30 <_Thread_Change_priority+0xa0> 2007cd4: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2007cd8: 02 80 00 0b be 2007d04 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN 2007cdc: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 2007ce0: 7f ff e9 77 call 20022bc <== NOT EXECUTED 2007ce4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007ce8: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 2007cec: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 2007cf0: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 2007cf4: 32 80 00 0d bne,a 2007d28 <_Thread_Change_priority+0x98> <== NOT EXECUTED 2007cf8: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 2007cfc: 81 c7 e0 08 ret 2007d00: 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 ); 2007d04: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 2007d08: 7f ff e9 6d call 20022bc 2007d0c: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007d10: 03 00 00 ef sethi %hi(0x3bc00), %g1 2007d14: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2007d18: 80 8c 80 01 btst %l2, %g1 2007d1c: 02 bf ff f8 be 2007cfc <_Thread_Change_priority+0x6c> 2007d20: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2007d24: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 2007d28: 40 00 03 b4 call 2008bf8 <_Thread_queue_Requeue> 2007d2c: 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 ) ) { 2007d30: 12 80 00 14 bne 2007d80 <_Thread_Change_priority+0xf0> <== NEVER TAKEN 2007d34: 23 00 80 6d sethi %hi(0x201b400), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007d38: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 2007d3c: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 2007d40: 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 ); 2007d44: c0 24 20 10 clr [ %l0 + 0x10 ] 2007d48: 84 10 c0 02 or %g3, %g2, %g2 2007d4c: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 2007d50: c4 14 62 c4 lduh [ %l1 + 0x2c4 ], %g2 2007d54: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 2007d58: 80 8e a0 ff btst 0xff, %i2 2007d5c: 82 10 80 01 or %g2, %g1, %g1 2007d60: c2 34 62 c4 sth %g1, [ %l1 + 0x2c4 ] 2007d64: 02 80 00 48 be 2007e84 <_Thread_Change_priority+0x1f4> 2007d68: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2007d6c: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2007d70: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 2007d74: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 2007d78: 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; 2007d7c: 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 ); 2007d80: 7f ff e9 4f call 20022bc 2007d84: 90 10 00 18 mov %i0, %o0 2007d88: 7f ff e9 49 call 20022ac 2007d8c: 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 ); 2007d90: c2 14 62 c4 lduh [ %l1 + 0x2c4 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 2007d94: 05 00 80 6d sethi %hi(0x201b400), %g2 2007d98: 83 28 60 10 sll %g1, 0x10, %g1 2007d9c: da 00 a1 64 ld [ %g2 + 0x164 ], %o5 2007da0: 85 30 60 10 srl %g1, 0x10, %g2 2007da4: 80 a0 a0 ff cmp %g2, 0xff 2007da8: 08 80 00 27 bleu 2007e44 <_Thread_Change_priority+0x1b4> 2007dac: 07 00 80 67 sethi %hi(0x2019c00), %g3 2007db0: 83 30 60 18 srl %g1, 0x18, %g1 2007db4: 86 10 e1 00 or %g3, 0x100, %g3 2007db8: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007dbc: 09 00 80 6d sethi %hi(0x201b400), %g4 2007dc0: 85 28 a0 10 sll %g2, 0x10, %g2 2007dc4: 88 11 23 40 or %g4, 0x340, %g4 2007dc8: 83 30 a0 0f srl %g2, 0xf, %g1 2007dcc: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 2007dd0: 83 28 60 10 sll %g1, 0x10, %g1 2007dd4: 89 30 60 10 srl %g1, 0x10, %g4 2007dd8: 80 a1 20 ff cmp %g4, 0xff 2007ddc: 18 80 00 28 bgu 2007e7c <_Thread_Change_priority+0x1ec> 2007de0: 83 30 60 18 srl %g1, 0x18, %g1 2007de4: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2007de8: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007dec: 85 30 a0 0c srl %g2, 0xc, %g2 2007df0: 83 28 60 10 sll %g1, 0x10, %g1 2007df4: 83 30 60 10 srl %g1, 0x10, %g1 2007df8: 82 00 40 02 add %g1, %g2, %g1 2007dfc: 85 28 60 04 sll %g1, 4, %g2 2007e00: 83 28 60 02 sll %g1, 2, %g1 2007e04: 82 20 80 01 sub %g2, %g1, %g1 2007e08: 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 ); 2007e0c: 05 00 80 6d sethi %hi(0x201b400), %g2 2007e10: c4 00 a2 d0 ld [ %g2 + 0x2d0 ], %g2 ! 201b6d0 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007e14: 07 00 80 6d sethi %hi(0x201b400), %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() && 2007e18: 80 a0 40 02 cmp %g1, %g2 2007e1c: 02 80 00 08 be 2007e3c <_Thread_Change_priority+0x1ac> 2007e20: c2 20 e2 a0 st %g1, [ %g3 + 0x2a0 ] _Thread_Executing->is_preemptible ) 2007e24: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 2007e28: 80 a0 60 00 cmp %g1, 0 2007e2c: 02 80 00 04 be 2007e3c <_Thread_Change_priority+0x1ac> 2007e30: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 2007e34: 03 00 80 6d sethi %hi(0x201b400), %g1 2007e38: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary> _ISR_Enable( level ); 2007e3c: 7f ff e9 20 call 20022bc 2007e40: 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 ); 2007e44: 86 10 e1 00 or %g3, 0x100, %g3 2007e48: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007e4c: 09 00 80 6d sethi %hi(0x201b400), %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 ); 2007e50: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007e54: 88 11 23 40 or %g4, 0x340, %g4 2007e58: 85 28 a0 10 sll %g2, 0x10, %g2 2007e5c: 83 30 a0 0f srl %g2, 0xf, %g1 2007e60: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 2007e64: 83 28 60 10 sll %g1, 0x10, %g1 2007e68: 89 30 60 10 srl %g1, 0x10, %g4 2007e6c: 80 a1 20 ff cmp %g4, 0xff 2007e70: 28 bf ff de bleu,a 2007de8 <_Thread_Change_priority+0x158> 2007e74: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2007e78: 83 30 60 18 srl %g1, 0x18, %g1 2007e7c: 10 bf ff dc b 2007dec <_Thread_Change_priority+0x15c> 2007e80: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007e84: 84 00 60 04 add %g1, 4, %g2 2007e88: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 2007e8c: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 2007e90: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007e94: 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; 2007e98: 10 bf ff ba b 2007d80 <_Thread_Change_priority+0xf0> 2007e9c: e0 20 80 00 st %l0, [ %g2 ] =============================================================================== 02007ea0 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 2007ea0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2007ea4: 7f ff e9 02 call 20022ac 2007ea8: a0 10 00 18 mov %i0, %l0 2007eac: b0 10 00 08 mov %o0, %i0 current_state = the_thread->current_state; 2007eb0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & state ) { 2007eb4: 80 8e 40 01 btst %i1, %g1 2007eb8: 02 80 00 06 be 2007ed0 <_Thread_Clear_state+0x30> 2007ebc: 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); 2007ec0: 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 ) ) { 2007ec4: 80 a6 60 00 cmp %i1, 0 2007ec8: 02 80 00 04 be 2007ed8 <_Thread_Clear_state+0x38> 2007ecc: f2 24 20 10 st %i1, [ %l0 + 0x10 ] the_thread->current_priority == 0 ) _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 2007ed0: 7f ff e8 fb call 20022bc 2007ed4: 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; 2007ed8: 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); 2007edc: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 2007ee0: c8 10 80 00 lduh [ %g2 ], %g4 2007ee4: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 2007ee8: 86 11 00 03 or %g4, %g3, %g3 2007eec: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007ef0: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 2007ef4: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 2007ef8: c4 24 00 00 st %g2, [ %l0 ] 2007efc: 07 00 80 6d sethi %hi(0x201b400), %g3 old_last_node = the_chain->last; 2007f00: c4 00 60 08 ld [ %g1 + 8 ], %g2 2007f04: da 10 e2 c4 lduh [ %g3 + 0x2c4 ], %o5 the_chain->last = the_node; 2007f08: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007f0c: c4 24 20 04 st %g2, [ %l0 + 4 ] 2007f10: 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; 2007f14: e0 20 80 00 st %l0, [ %g2 ] 2007f18: c2 30 e2 c4 sth %g1, [ %g3 + 0x2c4 ] _ISR_Flash( level ); 2007f1c: 7f ff e8 e8 call 20022bc 2007f20: 01 00 00 00 nop 2007f24: 7f ff e8 e2 call 20022ac 2007f28: 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 ) { 2007f2c: 03 00 80 6d sethi %hi(0x201b400), %g1 2007f30: c6 00 62 a0 ld [ %g1 + 0x2a0 ], %g3 ! 201b6a0 <_Thread_Heir> 2007f34: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 2007f38: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 2007f3c: 80 a0 80 03 cmp %g2, %g3 2007f40: 1a bf ff e4 bcc 2007ed0 <_Thread_Clear_state+0x30> 2007f44: 07 00 80 6d sethi %hi(0x201b400), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2007f48: c6 00 e2 d0 ld [ %g3 + 0x2d0 ], %g3 ! 201b6d0 <_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; 2007f4c: e0 20 62 a0 st %l0, [ %g1 + 0x2a0 ] if ( _Thread_Executing->is_preemptible || 2007f50: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 2007f54: 80 a0 60 00 cmp %g1, 0 2007f58: 32 80 00 05 bne,a 2007f6c <_Thread_Clear_state+0xcc> 2007f5c: 84 10 20 01 mov 1, %g2 2007f60: 80 a0 a0 00 cmp %g2, 0 2007f64: 12 bf ff db bne 2007ed0 <_Thread_Clear_state+0x30> <== ALWAYS TAKEN 2007f68: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 2007f6c: 03 00 80 6d sethi %hi(0x201b400), %g1 2007f70: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 2007f74: 7f ff e8 d2 call 20022bc 2007f78: 81 e8 00 00 restore =============================================================================== 02008128 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008128: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200812c: 90 10 00 18 mov %i0, %o0 2008130: 40 00 00 84 call 2008340 <_Thread_Get> 2008134: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008138: c2 07 bf fc ld [ %fp + -4 ], %g1 200813c: 80 a0 60 00 cmp %g1, 0 2008140: 12 80 00 08 bne 2008160 <_Thread_Delay_ended+0x38> <== NEVER TAKEN 2008144: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2008148: 7f ff ff 56 call 2007ea0 <_Thread_Clear_state> 200814c: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 2008150: 03 00 80 6d sethi %hi(0x201b400), %g1 2008154: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level> 2008158: 84 00 bf ff add %g2, -1, %g2 200815c: c4 20 62 10 st %g2, [ %g1 + 0x210 ] 2008160: 81 c7 e0 08 ret 2008164: 81 e8 00 00 restore =============================================================================== 02008168 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008168: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 200816c: 2b 00 80 6d sethi %hi(0x201b400), %l5 _ISR_Disable( level ); 2008170: 7f ff e8 4f call 20022ac 2008174: e0 05 62 d0 ld [ %l5 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing> while ( _Context_Switch_necessary == true ) { 2008178: 2d 00 80 6d sethi %hi(0x201b400), %l6 200817c: c2 0d a2 e0 ldub [ %l6 + 0x2e0 ], %g1 ! 201b6e0 <_Context_Switch_necessary> 2008180: 80 a0 60 00 cmp %g1, 0 2008184: 02 80 00 50 be 20082c4 <_Thread_Dispatch+0x15c> 2008188: 33 00 80 6d sethi %hi(0x201b400), %i1 200818c: 25 00 80 6d sethi %hi(0x201b400), %l2 2008190: 35 00 80 6d sethi %hi(0x201b400), %i2 2008194: a4 14 a2 d8 or %l2, 0x2d8, %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; 2008198: 31 00 80 6d sethi %hi(0x201b400), %i0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200819c: 2f 00 80 6d sethi %hi(0x201b400), %l7 20081a0: 03 00 80 6d sethi %hi(0x201b400), %g1 20081a4: ac 15 a2 e0 or %l6, 0x2e0, %l6 20081a8: aa 15 62 d0 or %l5, 0x2d0, %l5 20081ac: b2 16 62 a0 or %i1, 0x2a0, %i1 20081b0: b4 16 a2 9c or %i2, 0x29c, %i2 20081b4: b0 16 21 68 or %i0, 0x168, %i0 20081b8: ae 15 e2 98 or %l7, 0x298, %l7 20081bc: b6 10 62 10 or %g1, 0x210, %i3 20081c0: a8 07 bf f8 add %fp, -8, %l4 20081c4: 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; 20081c8: b8 10 20 01 mov 1, %i4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 20081cc: 10 80 00 34 b 200829c <_Thread_Dispatch+0x134> 20081d0: ba 10 00 12 mov %l2, %i5 executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 20081d4: 7f ff e8 3a call 20022bc 20081d8: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 20081dc: 40 00 10 31 call 200c2a0 <_TOD_Get_uptime> 20081e0: 90 10 00 14 mov %l4, %o0 _Timestamp_Subtract( 20081e4: 90 10 00 1d mov %i5, %o0 20081e8: 92 10 00 14 mov %l4, %o1 20081ec: 40 00 04 03 call 20091f8 <_Timespec_Subtract> 20081f0: 94 10 00 13 mov %l3, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 20081f4: 92 10 00 13 mov %l3, %o1 20081f8: 40 00 03 e7 call 2009194 <_Timespec_Add_to> 20081fc: 90 04 20 84 add %l0, 0x84, %o0 _Thread_Time_of_last_context_switch = uptime; 2008200: c4 07 bf f8 ld [ %fp + -8 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008204: c2 06 80 00 ld [ %i2 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008208: c4 24 80 00 st %g2, [ %l2 ] 200820c: 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 ); 2008210: 90 10 00 10 mov %l0, %o0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008214: c4 24 a0 04 st %g2, [ %l2 + 4 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008218: 80 a0 60 00 cmp %g1, 0 200821c: 02 80 00 06 be 2008234 <_Thread_Dispatch+0xcc> <== NEVER TAKEN 2008220: 92 10 00 11 mov %l1, %o1 executing->libc_reent = *_Thread_libc_reent; 2008224: c4 00 40 00 ld [ %g1 ], %g2 2008228: c4 24 21 5c st %g2, [ %l0 + 0x15c ] *_Thread_libc_reent = heir->libc_reent; 200822c: c4 04 61 5c ld [ %l1 + 0x15c ], %g2 2008230: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2008234: 40 00 04 b3 call 2009500 <_User_extensions_Thread_switch> 2008238: 01 00 00 00 nop if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 200823c: 92 04 60 d0 add %l1, 0xd0, %o1 2008240: 40 00 06 04 call 2009a50 <_CPU_Context_switch> 2008244: 90 04 20 d0 add %l0, 0xd0, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2008248: c2 04 21 58 ld [ %l0 + 0x158 ], %g1 200824c: 80 a0 60 00 cmp %g1, 0 2008250: 02 80 00 0d be 2008284 <_Thread_Dispatch+0x11c> 2008254: 01 00 00 00 nop 2008258: d0 05 c0 00 ld [ %l7 ], %o0 200825c: 80 a4 00 08 cmp %l0, %o0 2008260: 02 80 00 09 be 2008284 <_Thread_Dispatch+0x11c> 2008264: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008268: 02 80 00 04 be 2008278 <_Thread_Dispatch+0x110> 200826c: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008270: 40 00 05 be call 2009968 <_CPU_Context_save_fp> 2008274: 90 02 21 58 add %o0, 0x158, %o0 _Context_Restore_fp( &executing->fp_context ); 2008278: 40 00 05 d9 call 20099dc <_CPU_Context_restore_fp> 200827c: 90 04 21 58 add %l0, 0x158, %o0 _Thread_Allocated_fp = executing; 2008280: e0 25 c0 00 st %l0, [ %l7 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 2008284: 7f ff e8 0a call 20022ac 2008288: e0 05 40 00 ld [ %l5 ], %l0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 200828c: c2 0d 80 00 ldub [ %l6 ], %g1 2008290: 80 a0 60 00 cmp %g1, 0 2008294: 02 80 00 0d be 20082c8 <_Thread_Dispatch+0x160> 2008298: 03 00 80 6d sethi %hi(0x201b400), %g1 heir = _Thread_Heir; 200829c: e2 06 40 00 ld [ %i1 ], %l1 _Thread_Dispatch_disable_level = 1; 20082a0: f8 26 c0 00 st %i4, [ %i3 ] _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 ) 20082a4: c2 04 60 7c ld [ %l1 + 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; 20082a8: 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 ) 20082ac: 80 a0 60 01 cmp %g1, 1 20082b0: 12 bf ff c9 bne 20081d4 <_Thread_Dispatch+0x6c> 20082b4: e2 25 40 00 st %l1, [ %l5 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 20082b8: c2 06 00 00 ld [ %i0 ], %g1 20082bc: 10 bf ff c6 b 20081d4 <_Thread_Dispatch+0x6c> 20082c0: c2 24 60 78 st %g1, [ %l1 + 0x78 ] executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 20082c4: 03 00 80 6d sethi %hi(0x201b400), %g1 20082c8: c0 20 62 10 clr [ %g1 + 0x210 ] ! 201b610 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 20082cc: 7f ff e7 fc call 20022bc 20082d0: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 20082d4: 03 00 80 6d sethi %hi(0x201b400), %g1 20082d8: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 201b6b4 <_Thread_Do_post_task_switch_extension> 20082dc: 80 a0 60 00 cmp %g1, 0 20082e0: 12 80 00 06 bne 20082f8 <_Thread_Dispatch+0x190> <== NEVER TAKEN 20082e4: 01 00 00 00 nop executing->do_post_task_switch_extension ) { 20082e8: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1 20082ec: 80 a0 60 00 cmp %g1, 0 20082f0: 02 80 00 04 be 2008300 <_Thread_Dispatch+0x198> 20082f4: 01 00 00 00 nop executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 20082f8: 7f ff f9 71 call 20068bc <_API_extensions_Run_postswitch> 20082fc: c0 2c 20 74 clrb [ %l0 + 0x74 ] 2008300: 81 c7 e0 08 ret 2008304: 81 e8 00 00 restore =============================================================================== 0200e188 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200e188: 03 00 80 6d sethi %hi(0x201b400), %g1 200e18c: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200e190: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200e194: 80 a0 a0 00 cmp %g2, 0 200e198: 12 80 00 0b bne 200e1c4 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 200e19c: 84 10 20 01 mov 1, %g2 200e1a0: 05 00 80 6d sethi %hi(0x201b400), %g2 200e1a4: c4 00 a2 a0 ld [ %g2 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir> 200e1a8: 80 a0 40 02 cmp %g1, %g2 200e1ac: 02 80 00 0b be 200e1d8 <_Thread_Evaluate_mode+0x50> 200e1b0: 01 00 00 00 nop ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 200e1b4: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 200e1b8: 80 a0 60 00 cmp %g1, 0 200e1bc: 02 80 00 07 be 200e1d8 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 200e1c0: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 200e1c4: 03 00 80 6d sethi %hi(0x201b400), %g1 200e1c8: 90 10 20 01 mov 1, %o0 200e1cc: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] return true; 200e1d0: 81 c3 e0 08 retl 200e1d4: 01 00 00 00 nop } return false; } 200e1d8: 81 c3 e0 08 retl 200e1dc: 90 10 20 00 clr %o0 ! 0 =============================================================================== 0200e1e0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200e1e0: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200e1e4: 03 00 80 6d sethi %hi(0x201b400), %g1 200e1e8: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_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(); 200e1ec: 3f 00 80 38 sethi %hi(0x200e000), %i7 200e1f0: be 17 e1 e0 or %i7, 0x1e0, %i7 ! 200e1e0 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200e1f4: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200e1f8: 7f ff d0 31 call 20022bc 200e1fc: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200e200: 03 00 80 6c sethi %hi(0x201b000), %g1 doneConstructors = 1; 200e204: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200e208: e4 08 62 cc ldub [ %g1 + 0x2cc ], %l2 doneConstructors = 1; 200e20c: c4 28 62 cc stb %g2, [ %g1 + 0x2cc ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200e210: c2 04 21 58 ld [ %l0 + 0x158 ], %g1 200e214: 80 a0 60 00 cmp %g1, 0 200e218: 02 80 00 0b be 200e244 <_Thread_Handler+0x64> 200e21c: 23 00 80 6d sethi %hi(0x201b400), %l1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200e220: d0 04 62 98 ld [ %l1 + 0x298 ], %o0 ! 201b698 <_Thread_Allocated_fp> 200e224: 80 a4 00 08 cmp %l0, %o0 200e228: 02 80 00 07 be 200e244 <_Thread_Handler+0x64> 200e22c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200e230: 22 80 00 05 be,a 200e244 <_Thread_Handler+0x64> 200e234: e0 24 62 98 st %l0, [ %l1 + 0x298 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200e238: 7f ff ed cc call 2009968 <_CPU_Context_save_fp> 200e23c: 90 02 21 58 add %o0, 0x158, %o0 _Thread_Allocated_fp = executing; 200e240: e0 24 62 98 st %l0, [ %l1 + 0x298 ] /* * 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 ); 200e244: 7f ff ec 31 call 2009308 <_User_extensions_Thread_begin> 200e248: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200e24c: 7f ff e8 2f call 2008308 <_Thread_Enable_dispatch> 200e250: a5 2c a0 18 sll %l2, 0x18, %l2 /* * _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) */ { 200e254: 80 a4 a0 00 cmp %l2, 0 200e258: 02 80 00 0c be 200e288 <_Thread_Handler+0xa8> 200e25c: 01 00 00 00 nop INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200e260: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200e264: 80 a0 60 00 cmp %g1, 0 200e268: 22 80 00 0f be,a 200e2a4 <_Thread_Handler+0xc4> <== ALWAYS TAKEN 200e26c: 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 ); 200e270: 7f ff ec 3a call 2009358 <_User_extensions_Thread_exitted> 200e274: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200e278: 90 10 20 00 clr %o0 200e27c: 92 10 20 01 mov 1, %o1 200e280: 7f ff e4 19 call 20072e4 <_Internal_error_Occurred> 200e284: 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 (); 200e288: 40 00 31 fe call 201aa80 <_init> 200e28c: 01 00 00 00 nop } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200e290: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200e294: 80 a0 60 00 cmp %g1, 0 200e298: 12 bf ff f6 bne 200e270 <_Thread_Handler+0x90> <== NEVER TAKEN 200e29c: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200e2a0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200e2a4: 9f c0 40 00 call %g1 200e2a8: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200e2ac: 10 bf ff f1 b 200e270 <_Thread_Handler+0x90> 200e2b0: d0 24 20 28 st %o0, [ %l0 + 0x28 ] =============================================================================== 020083ec <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20083ec: 9d e3 bf a0 save %sp, -96, %sp 20083f0: 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; 20083f4: c0 26 61 60 clr [ %i1 + 0x160 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20083f8: 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; 20083fc: c0 26 61 64 clr [ %i1 + 0x164 ] 2008400: c0 26 61 68 clr [ %i1 + 0x168 ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008404: 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 ) { 2008408: 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 ); 200840c: 90 10 00 19 mov %i1, %o0 2008410: 40 00 02 ca call 2008f38 <_Thread_Stack_Allocate> 2008414: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2008418: 80 a6 c0 08 cmp %i3, %o0 200841c: 18 80 00 5a bgu 2008584 <_Thread_Initialize+0x198> 2008420: 80 a2 20 00 cmp %o0, 0 2008424: 02 80 00 58 be 2008584 <_Thread_Initialize+0x198> <== NEVER TAKEN 2008428: 80 8f 20 ff btst 0xff, %i4 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200842c: c2 06 60 cc ld [ %i1 + 0xcc ], %g1 the_stack->size = size; 2008430: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008434: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2008438: 82 10 20 00 clr %g1 200843c: 12 80 00 54 bne 200858c <_Thread_Initialize+0x1a0> 2008440: a4 10 20 00 clr %l2 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008444: 27 00 80 6d sethi %hi(0x201b400), %l3 2008448: c4 04 e2 b0 ld [ %l3 + 0x2b0 ], %g2 ! 201b6b0 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 200844c: c2 26 60 c8 st %g1, [ %i1 + 0xc8 ] fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 2008450: c2 26 61 58 st %g1, [ %i1 + 0x158 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008454: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008458: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200845c: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008460: 80 a0 a0 00 cmp %g2, 0 2008464: 12 80 00 5a bne 20085cc <_Thread_Initialize+0x1e0> 2008468: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 200846c: c0 26 61 6c clr [ %i1 + 0x16c ] 2008470: b6 10 20 00 clr %i3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2008474: 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 ); 2008478: 92 10 00 1d mov %i5, %o1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 200847c: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ] the_thread->Start.budget_callout = budget_callout; 2008480: 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 ); 2008484: 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; 2008488: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200848c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008490: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008494: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2008498: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; 200849c: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 20084a0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 20084a4: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 20084a8: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 20084ac: 40 00 02 03 call 2008cb8 <_Thread_Set_priority> 20084b0: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 20084b4: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 20084b8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 20084bc: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 20084c0: e2 26 60 0c st %l1, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 20084c4: 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 ); 20084c8: c0 26 60 84 clr [ %i1 + 0x84 ] 20084cc: 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 ); 20084d0: 90 10 00 19 mov %i1, %o0 20084d4: 40 00 03 c8 call 20093f4 <_User_extensions_Thread_create> 20084d8: b0 10 20 01 mov 1, %i0 if ( extension_status ) 20084dc: 80 8a 20 ff btst 0xff, %o0 20084e0: 12 80 00 27 bne 200857c <_Thread_Initialize+0x190> 20084e4: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 20084e8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 20084ec: 80 a2 20 00 cmp %o0, 0 20084f0: 22 80 00 05 be,a 2008504 <_Thread_Initialize+0x118> 20084f4: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 _Workspace_Free( the_thread->libc_reent ); 20084f8: 40 00 04 f9 call 20098dc <_Workspace_Free> 20084fc: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2008500: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 2008504: 80 a2 20 00 cmp %o0, 0 2008508: 22 80 00 05 be,a 200851c <_Thread_Initialize+0x130> 200850c: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008510: 40 00 04 f3 call 20098dc <_Workspace_Free> 2008514: 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] ) 2008518: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 200851c: 80 a2 20 00 cmp %o0, 0 2008520: 22 80 00 05 be,a 2008534 <_Thread_Initialize+0x148> <== ALWAYS TAKEN 2008524: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008528: 40 00 04 ed call 20098dc <_Workspace_Free> <== NOT EXECUTED 200852c: 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] ) 2008530: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 <== NOT EXECUTED 2008534: 80 a2 20 00 cmp %o0, 0 2008538: 02 80 00 05 be 200854c <_Thread_Initialize+0x160> <== ALWAYS TAKEN 200853c: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008540: 40 00 04 e7 call 20098dc <_Workspace_Free> <== NOT EXECUTED 2008544: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 2008548: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 200854c: 02 80 00 05 be 2008560 <_Thread_Initialize+0x174> 2008550: 80 a4 a0 00 cmp %l2, 0 (void) _Workspace_Free( extensions_area ); 2008554: 40 00 04 e2 call 20098dc <_Workspace_Free> 2008558: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 200855c: 80 a4 a0 00 cmp %l2, 0 2008560: 02 80 00 05 be 2008574 <_Thread_Initialize+0x188> 2008564: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( fp_area ); 2008568: 40 00 04 dd call 20098dc <_Workspace_Free> 200856c: 90 10 00 12 mov %l2, %o0 #endif _Thread_Stack_Free( the_thread ); 2008570: 90 10 00 19 mov %i1, %o0 2008574: 40 00 02 8c call 2008fa4 <_Thread_Stack_Free> 2008578: b0 10 20 00 clr %i0 return false; } 200857c: 81 c7 e0 08 ret 2008580: 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 ) 2008584: 81 c7 e0 08 ret 2008588: 91 e8 20 00 restore %g0, 0, %o0 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200858c: 40 00 04 cb call 20098b8 <_Workspace_Allocate> 2008590: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008594: b6 10 20 00 clr %i3 2008598: a4 92 20 00 orcc %o0, 0, %l2 200859c: 02 bf ff d3 be 20084e8 <_Thread_Initialize+0xfc> 20085a0: 82 10 00 12 mov %l2, %g1 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 20085a4: 27 00 80 6d sethi %hi(0x201b400), %l3 20085a8: c4 04 e2 b0 ld [ %l3 + 0x2b0 ], %g2 ! 201b6b0 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 20085ac: c2 26 60 c8 st %g1, [ %i1 + 0xc8 ] fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 20085b0: c2 26 61 58 st %g1, [ %i1 + 0x158 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20085b4: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 20085b8: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 20085bc: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 20085c0: 80 a0 a0 00 cmp %g2, 0 20085c4: 02 bf ff aa be 200846c <_Thread_Initialize+0x80> 20085c8: c0 26 60 6c clr [ %i1 + 0x6c ] extensions_area = _Workspace_Allocate( 20085cc: 84 00 a0 01 inc %g2 20085d0: 40 00 04 ba call 20098b8 <_Workspace_Allocate> 20085d4: 91 28 a0 02 sll %g2, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 20085d8: b6 92 20 00 orcc %o0, 0, %i3 20085dc: 02 bf ff c3 be 20084e8 <_Thread_Initialize+0xfc> 20085e0: c8 04 e2 b0 ld [ %l3 + 0x2b0 ], %g4 goto failed; } the_thread->extensions = (void **) extensions_area; 20085e4: f6 26 61 6c st %i3, [ %i1 + 0x16c ] 20085e8: 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++ ) 20085ec: 84 10 20 00 clr %g2 20085f0: 10 80 00 03 b 20085fc <_Thread_Initialize+0x210> 20085f4: 82 10 20 00 clr %g1 20085f8: c6 06 61 6c ld [ %i1 + 0x16c ], %g3 the_thread->extensions[i] = NULL; 20085fc: 85 28 a0 02 sll %g2, 2, %g2 2008600: 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++ ) 2008604: 82 00 60 01 inc %g1 2008608: 80 a1 00 01 cmp %g4, %g1 200860c: 1a bf ff fb bcc 20085f8 <_Thread_Initialize+0x20c> 2008610: 84 10 00 01 mov %g1, %g2 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2008614: 10 bf ff 99 b 2008478 <_Thread_Initialize+0x8c> 2008618: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 =============================================================================== 0200cb78 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200cb78: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200cb7c: 03 00 80 6d sethi %hi(0x201b400), %g1 200cb80: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200cb84: 7f ff d5 ca call 20022ac 200cb88: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200cb8c: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200cb90: c4 04 40 00 ld [ %l1 ], %g2 200cb94: c2 04 60 08 ld [ %l1 + 8 ], %g1 200cb98: 80 a0 80 01 cmp %g2, %g1 200cb9c: 02 80 00 1f be 200cc18 <_Thread_Reset_timeslice+0xa0> 200cba0: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200cba4: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 200cba8: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200cbac: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200cbb0: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cbb4: 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; 200cbb8: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200cbbc: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200cbc0: 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; 200cbc4: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200cbc8: 7f ff d5 bd call 20022bc 200cbcc: 01 00 00 00 nop 200cbd0: 7f ff d5 b7 call 20022ac 200cbd4: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200cbd8: 03 00 80 6d sethi %hi(0x201b400), %g1 200cbdc: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir> 200cbe0: 80 a4 00 02 cmp %l0, %g2 200cbe4: 02 80 00 06 be 200cbfc <_Thread_Reset_timeslice+0x84> <== ALWAYS TAKEN 200cbe8: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 200cbec: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED 200cbf0: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary><== NOT EXECUTED _ISR_Enable( level ); 200cbf4: 7f ff d5 b2 call 20022bc <== NOT EXECUTED 200cbf8: 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; 200cbfc: c4 04 40 00 ld [ %l1 ], %g2 200cc00: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ] _Context_Switch_necessary = true; 200cc04: 84 10 20 01 mov 1, %g2 200cc08: 03 00 80 6d sethi %hi(0x201b400), %g1 200cc0c: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary> _ISR_Enable( level ); 200cc10: 7f ff d5 ab call 20022bc 200cc14: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 200cc18: 7f ff d5 a9 call 20022bc 200cc1c: 81 e8 00 00 restore =============================================================================== 0200d1dc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 200d1dc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 200d1e0: 7f ff d4 b8 call 20024c0 200d1e4: a0 10 00 18 mov %i0, %l0 200d1e8: b0 10 00 08 mov %o0, %i0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 200d1ec: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 200d1f0: 80 88 60 02 btst 2, %g1 200d1f4: 02 80 00 05 be 200d208 <_Thread_Resume+0x2c> <== NEVER TAKEN 200d1f8: 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 ) ) { 200d1fc: 80 a0 60 00 cmp %g1, 0 200d200: 02 80 00 04 be 200d210 <_Thread_Resume+0x34> 200d204: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 200d208: 7f ff d4 b2 call 20024d0 200d20c: 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; 200d210: 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); 200d214: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 200d218: c8 10 80 00 lduh [ %g2 ], %g4 200d21c: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 200d220: 86 11 00 03 or %g4, %g3, %g3 200d224: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200d228: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 200d22c: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 200d230: c4 24 00 00 st %g2, [ %l0 ] 200d234: 07 00 80 86 sethi %hi(0x2021800), %g3 old_last_node = the_chain->last; 200d238: c4 00 60 08 ld [ %g1 + 8 ], %g2 200d23c: da 10 e0 34 lduh [ %g3 + 0x34 ], %o5 the_chain->last = the_node; 200d240: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200d244: c4 24 20 04 st %g2, [ %l0 + 4 ] 200d248: 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; 200d24c: e0 20 80 00 st %l0, [ %g2 ] 200d250: c2 30 e0 34 sth %g1, [ %g3 + 0x34 ] _ISR_Flash( level ); 200d254: 7f ff d4 9f call 20024d0 200d258: 01 00 00 00 nop 200d25c: 7f ff d4 99 call 20024c0 200d260: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 200d264: 03 00 80 86 sethi %hi(0x2021800), %g1 200d268: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 2021810 <_Thread_Heir> 200d26c: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 200d270: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 200d274: 80 a0 80 03 cmp %g2, %g3 200d278: 1a bf ff e4 bcc 200d208 <_Thread_Resume+0x2c> 200d27c: 07 00 80 86 sethi %hi(0x2021800), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200d280: c6 00 e0 40 ld [ %g3 + 0x40 ], %g3 ! 2021840 <_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; 200d284: e0 20 60 10 st %l0, [ %g1 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200d288: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 200d28c: 80 a0 60 00 cmp %g1, 0 200d290: 32 80 00 05 bne,a 200d2a4 <_Thread_Resume+0xc8> 200d294: 84 10 20 01 mov 1, %g2 200d298: 80 a0 a0 00 cmp %g2, 0 200d29c: 12 bf ff db bne 200d208 <_Thread_Resume+0x2c> <== ALWAYS TAKEN 200d2a0: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 200d2a4: 03 00 80 86 sethi %hi(0x2021800), %g1 200d2a8: c4 28 60 50 stb %g2, [ %g1 + 0x50 ] ! 2021850 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 200d2ac: 7f ff d4 89 call 20024d0 200d2b0: 81 e8 00 00 restore =============================================================================== 020090e8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 20090e8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 20090ec: 03 00 80 6d sethi %hi(0x201b400), %g1 20090f0: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 20090f4: 7f ff e4 6e call 20022ac 20090f8: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 20090fc: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 2009100: c4 04 40 00 ld [ %l1 ], %g2 2009104: c2 04 60 08 ld [ %l1 + 8 ], %g1 2009108: 80 a0 80 01 cmp %g2, %g1 200910c: 02 80 00 19 be 2009170 <_Thread_Yield_processor+0x88> 2009110: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2009114: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2009118: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200911c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009120: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009124: 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; 2009128: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200912c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2009130: 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; 2009134: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2009138: 7f ff e4 61 call 20022bc 200913c: 01 00 00 00 nop 2009140: 7f ff e4 5b call 20022ac 2009144: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2009148: 03 00 80 6d sethi %hi(0x201b400), %g1 200914c: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir> 2009150: 80 a4 00 02 cmp %l0, %g2 2009154: 22 80 00 0e be,a 200918c <_Thread_Yield_processor+0xa4> <== ALWAYS TAKEN 2009158: 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; 200915c: 84 10 20 01 mov 1, %g2 2009160: 03 00 80 6d sethi %hi(0x201b400), %g1 2009164: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary> _ISR_Enable( level ); 2009168: 7f ff e4 55 call 20022bc 200916c: 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 ) ) 2009170: 03 00 80 6d sethi %hi(0x201b400), %g1 2009174: c2 00 62 a0 ld [ %g1 + 0x2a0 ], %g1 ! 201b6a0 <_Thread_Heir> 2009178: 80 a4 00 01 cmp %l0, %g1 200917c: 32 bf ff f9 bne,a 2009160 <_Thread_Yield_processor+0x78> <== NEVER TAKEN 2009180: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 2009184: 7f ff e4 4e call 20022bc 2009188: 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; 200918c: 10 bf ff f4 b 200915c <_Thread_Yield_processor+0x74> 2009190: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ] =============================================================================== 0200893c <_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 ) { 200893c: 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; 2008940: 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); 2008944: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2008948: 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); 200894c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2008950: 82 06 60 38 add %i1, 0x38, %g1 2008954: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 2008958: 2d 00 80 6a sethi %hi(0x201a800), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 200895c: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2008960: 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 ]; 2008964: ab 28 60 04 sll %g1, 4, %l5 2008968: ac 15 a3 74 or %l6, 0x374, %l6 200896c: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 2008970: 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 ]; 2008974: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2008978: 12 80 00 24 bne 2008a08 <_Thread_queue_Enqueue_priority+0xcc> 200897c: 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; 2008980: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 2008984: 7f ff e6 4a call 20022ac 2008988: 01 00 00 00 nop 200898c: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 2008990: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2008994: 80 a0 40 16 cmp %g1, %l6 2008998: 02 80 00 3a be 2008a80 <_Thread_queue_Enqueue_priority+0x144> 200899c: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 20089a0: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 20089a4: 80 a4 00 13 cmp %l0, %l3 20089a8: 18 80 00 0b bgu 20089d4 <_Thread_queue_Enqueue_priority+0x98> 20089ac: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 20089b0: 10 80 00 36 b 2008a88 <_Thread_queue_Enqueue_priority+0x14c> 20089b4: 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 ) ) { 20089b8: 80 a4 40 16 cmp %l1, %l6 20089bc: 02 80 00 32 be 2008a84 <_Thread_queue_Enqueue_priority+0x148> 20089c0: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 20089c4: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 20089c8: 80 a4 00 13 cmp %l0, %l3 20089cc: 28 80 00 2f bleu,a 2008a88 <_Thread_queue_Enqueue_priority+0x14c> 20089d0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 20089d4: 7f ff e6 3a call 20022bc 20089d8: 90 10 00 12 mov %l2, %o0 20089dc: 7f ff e6 34 call 20022ac 20089e0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20089e4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20089e8: 80 8d 00 01 btst %l4, %g1 20089ec: 32 bf ff f3 bne,a 20089b8 <_Thread_queue_Enqueue_priority+0x7c><== ALWAYS TAKEN 20089f0: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 20089f4: 7f ff e6 32 call 20022bc <== NOT EXECUTED 20089f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 20089fc: 30 bf ff e2 b,a 2008984 <_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 ); 2008a00: 7f ff e6 2f call 20022bc 2008a04: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 2008a08: 7f ff e6 29 call 20022ac 2008a0c: 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; 2008a10: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 2008a14: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 2008a18: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2008a1c: 80 a0 40 15 cmp %g1, %l5 2008a20: 02 80 00 20 be 2008aa0 <_Thread_queue_Enqueue_priority+0x164> 2008a24: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 2008a28: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 2008a2c: 80 a4 00 13 cmp %l0, %l3 2008a30: 0a 80 00 0b bcs 2008a5c <_Thread_queue_Enqueue_priority+0x120> 2008a34: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008a38: 10 80 00 1b b 2008aa4 <_Thread_queue_Enqueue_priority+0x168> 2008a3c: 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 ) ) { 2008a40: 80 a4 40 15 cmp %l1, %l5 2008a44: 02 80 00 17 be 2008aa0 <_Thread_queue_Enqueue_priority+0x164> 2008a48: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 2008a4c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 2008a50: 80 a4 00 13 cmp %l0, %l3 2008a54: 3a 80 00 14 bcc,a 2008aa4 <_Thread_queue_Enqueue_priority+0x168> 2008a58: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2008a5c: 7f ff e6 18 call 20022bc 2008a60: 90 10 00 12 mov %l2, %o0 2008a64: 7f ff e6 12 call 20022ac 2008a68: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008a6c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2008a70: 80 8d 00 01 btst %l4, %g1 2008a74: 32 bf ff f3 bne,a 2008a40 <_Thread_queue_Enqueue_priority+0x104> 2008a78: e2 04 60 04 ld [ %l1 + 4 ], %l1 2008a7c: 30 bf ff e1 b,a 2008a00 <_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 ) ) { 2008a80: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008a84: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008a88: 80 a0 a0 01 cmp %g2, 1 2008a8c: 02 80 00 17 be 2008ae8 <_Thread_queue_Enqueue_priority+0x1ac> 2008a90: 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; 2008a94: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 2008a98: 81 c7 e0 08 ret 2008a9c: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008aa0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008aa4: 80 a0 a0 01 cmp %g2, 1 2008aa8: 32 bf ff fc bne,a 2008a98 <_Thread_queue_Enqueue_priority+0x15c> 2008aac: 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 ) 2008ab0: 80 a4 00 13 cmp %l0, %l3 2008ab4: 02 80 00 1a be 2008b1c <_Thread_queue_Enqueue_priority+0x1e0> 2008ab8: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2008abc: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2008ac0: 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; 2008ac4: 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; 2008ac8: 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; 2008acc: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 2008ad0: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008ad4: b0 10 20 01 mov 1, %i0 2008ad8: 7f ff e5 f9 call 20022bc 2008adc: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008ae0: 81 c7 e0 08 ret 2008ae4: 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 ) 2008ae8: 02 80 00 0d be 2008b1c <_Thread_queue_Enqueue_priority+0x1e0> 2008aec: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008af0: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008af4: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2008af8: 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; 2008afc: 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; 2008b00: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 2008b04: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008b08: b0 10 20 01 mov 1, %i0 2008b0c: 7f ff e5 ec call 20022bc 2008b10: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008b14: 81 c7 e0 08 ret 2008b18: 81 e8 00 00 restore 2008b1c: 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; 2008b20: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008b24: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 2008b28: 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; 2008b2c: 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; 2008b30: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2008b34: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008b38: b0 10 20 01 mov 1, %i0 2008b3c: 7f ff e5 e0 call 20022bc 2008b40: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008b44: 81 c7 e0 08 ret 2008b48: 81 e8 00 00 restore =============================================================================== 02008bf8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 2008bf8: 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 ) 2008bfc: 80 a6 20 00 cmp %i0, 0 2008c00: 02 80 00 13 be 2008c4c <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 2008c04: 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 ) { 2008c08: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 2008c0c: 80 a4 60 01 cmp %l1, 1 2008c10: 02 80 00 04 be 2008c20 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 2008c14: 01 00 00 00 nop 2008c18: 81 c7 e0 08 ret <== NOT EXECUTED 2008c1c: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2008c20: 7f ff e5 a3 call 20022ac 2008c24: 01 00 00 00 nop 2008c28: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2008c2c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2008c30: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008c34: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008c38: 80 88 80 01 btst %g2, %g1 2008c3c: 12 80 00 06 bne 2008c54 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 2008c40: 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 ); 2008c44: 7f ff e5 9e call 20022bc 2008c48: 90 10 00 10 mov %l0, %o0 2008c4c: 81 c7 e0 08 ret 2008c50: 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 ); 2008c54: 92 10 00 19 mov %i1, %o1 2008c58: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 2008c5c: 40 00 0f 25 call 200c8f0 <_Thread_queue_Extract_priority_helper> 2008c60: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2008c64: 90 10 00 18 mov %i0, %o0 2008c68: 92 10 00 19 mov %i1, %o1 2008c6c: 7f ff ff 34 call 200893c <_Thread_queue_Enqueue_priority> 2008c70: 94 07 bf fc add %fp, -4, %o2 2008c74: 30 bf ff f4 b,a 2008c44 <_Thread_queue_Requeue+0x4c> =============================================================================== 02008c78 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008c78: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008c7c: 90 10 00 18 mov %i0, %o0 2008c80: 7f ff fd b0 call 2008340 <_Thread_Get> 2008c84: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008c88: c2 07 bf fc ld [ %fp + -4 ], %g1 2008c8c: 80 a0 60 00 cmp %g1, 0 2008c90: 12 80 00 08 bne 2008cb0 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 2008c94: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2008c98: 40 00 0f 51 call 200c9dc <_Thread_queue_Process_timeout> 2008c9c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2008ca0: 03 00 80 6d sethi %hi(0x201b400), %g1 2008ca4: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level> 2008ca8: 84 00 bf ff add %g2, -1, %g2 2008cac: c4 20 62 10 st %g2, [ %g1 + 0x210 ] 2008cb0: 81 c7 e0 08 ret 2008cb4: 81 e8 00 00 restore =============================================================================== 020166ec <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20166ec: 9d e3 bf 88 save %sp, -120, %sp 20166f0: 2d 00 80 f3 sethi %hi(0x203cc00), %l6 20166f4: ba 07 bf f4 add %fp, -12, %i5 20166f8: a8 07 bf f8 add %fp, -8, %l4 20166fc: a4 07 bf e8 add %fp, -24, %l2 2016700: ae 07 bf ec add %fp, -20, %l7 2016704: 2b 00 80 f3 sethi %hi(0x203cc00), %l5 2016708: 39 00 80 f3 sethi %hi(0x203cc00), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 201670c: c0 27 bf f8 clr [ %fp + -8 ] 2016710: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 2016714: 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); 2016718: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 201671c: 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); 2016720: ee 27 bf e8 st %l7, [ %fp + -24 ] 2016724: ac 15 a2 14 or %l6, 0x214, %l6 2016728: aa 15 61 54 or %l5, 0x154, %l5 201672c: b8 17 20 c0 or %i4, 0xc0, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016730: 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 ); 2016734: 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 ); 2016738: 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 ); 201673c: 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; 2016740: 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; 2016744: 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; 2016748: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 201674c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016750: 90 10 00 11 mov %l1, %o0 2016754: 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; 2016758: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201675c: 40 00 12 10 call 201af9c <_Watchdog_Adjust_to_chain> 2016760: 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; 2016764: 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(); 2016768: 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 ) { 201676c: 80 a4 00 09 cmp %l0, %o1 2016770: 38 80 00 2f bgu,a 201682c <_Timer_server_Body+0x140> 2016774: 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 ) { 2016778: 80 a4 00 09 cmp %l0, %o1 201677c: 0a 80 00 30 bcs 201683c <_Timer_server_Body+0x150> 2016780: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2016784: 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 ); 2016788: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 201678c: 40 00 02 98 call 20171ec <_Chain_Get> 2016790: 01 00 00 00 nop if ( timer == NULL ) { 2016794: 80 a2 20 00 cmp %o0, 0 2016798: 02 80 00 10 be 20167d8 <_Timer_server_Body+0xec> 201679c: 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 ) { 20167a0: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20167a4: 80 a0 60 01 cmp %g1, 1 20167a8: 02 80 00 29 be 201684c <_Timer_server_Body+0x160> 20167ac: 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 ) { 20167b0: 12 bf ff f6 bne 2016788 <_Timer_server_Body+0x9c> <== NEVER TAKEN 20167b4: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20167b8: 40 00 12 2f call 201b074 <_Watchdog_Insert> 20167bc: 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 ); 20167c0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 20167c4: 40 00 02 8a call 20171ec <_Chain_Get> 20167c8: 01 00 00 00 nop if ( timer == NULL ) { 20167cc: 80 a2 20 00 cmp %o0, 0 20167d0: 32 bf ff f5 bne,a 20167a4 <_Timer_server_Body+0xb8> <== NEVER TAKEN 20167d4: 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 ); 20167d8: 7f ff e3 aa call 200f680 20167dc: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 20167e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20167e4: 80 a5 00 01 cmp %l4, %g1 20167e8: 02 80 00 1d be 201685c <_Timer_server_Body+0x170> <== ALWAYS TAKEN 20167ec: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20167f0: 7f ff e3 a8 call 200f690 <== NOT EXECUTED 20167f4: 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; 20167f8: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 20167fc: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016800: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2016804: 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; 2016808: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201680c: 40 00 11 e4 call 201af9c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 2016810: 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; 2016814: 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(); 2016818: 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 ) { 201681c: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 2016820: 08 bf ff d7 bleu 201677c <_Timer_server_Body+0x90> <== NOT EXECUTED 2016824: 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 ); 2016828: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 201682c: 90 10 00 13 mov %l3, %o0 2016830: 40 00 11 db call 201af9c <_Watchdog_Adjust_to_chain> 2016834: 94 10 00 12 mov %l2, %o2 2016838: 30 bf ff d3 b,a 2016784 <_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 ); 201683c: 90 10 00 13 mov %l3, %o0 2016840: 40 00 11 a7 call 201aedc <_Watchdog_Adjust> 2016844: 92 10 20 01 mov 1, %o1 2016848: 30 bf ff cf b,a 2016784 <_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 ); 201684c: 92 02 20 10 add %o0, 0x10, %o1 2016850: 40 00 12 09 call 201b074 <_Watchdog_Insert> 2016854: 90 10 00 11 mov %l1, %o0 2016858: 30 bf ff cc b,a 2016788 <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 201685c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2016860: 7f ff e3 8c call 200f690 2016864: 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 ) ) { 2016868: c2 07 bf e8 ld [ %fp + -24 ], %g1 201686c: 80 a5 c0 01 cmp %l7, %g1 2016870: 12 80 00 0c bne 20168a0 <_Timer_server_Body+0x1b4> 2016874: 01 00 00 00 nop 2016878: 30 80 00 13 b,a 20168c4 <_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; 201687c: 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; 2016880: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 2016884: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 2016888: 7f ff e3 82 call 200f690 201688c: 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 ); 2016890: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 2016894: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2016898: 9f c0 40 00 call %g1 201689c: 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 ); 20168a0: 7f ff e3 78 call 200f680 20168a4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20168a8: 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)) 20168ac: 80 a5 c0 10 cmp %l7, %l0 20168b0: 32 bf ff f3 bne,a 201687c <_Timer_server_Body+0x190> 20168b4: 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 ); 20168b8: 7f ff e3 76 call 200f690 20168bc: 01 00 00 00 nop 20168c0: 30 bf ff a1 b,a 2016744 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 20168c4: c0 2e 20 7c clrb [ %i0 + 0x7c ] 20168c8: c2 07 00 00 ld [ %i4 ], %g1 20168cc: 82 00 60 01 inc %g1 20168d0: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 20168d4: d0 06 00 00 ld [ %i0 ], %o0 20168d8: 40 00 0e db call 201a444 <_Thread_Set_state> 20168dc: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 20168e0: 7f ff ff 59 call 2016644 <_Timer_server_Reset_interval_system_watchdog> 20168e4: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 20168e8: 7f ff ff 6c call 2016698 <_Timer_server_Reset_tod_system_watchdog> 20168ec: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 20168f0: 40 00 0b df call 201986c <_Thread_Enable_dispatch> 20168f4: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 20168f8: 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; 20168fc: 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 ); 2016900: 40 00 12 4a call 201b228 <_Watchdog_Remove> 2016904: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2016908: 40 00 12 48 call 201b228 <_Watchdog_Remove> 201690c: 90 10 00 1a mov %i2, %o0 2016910: 30 bf ff 8d b,a 2016744 <_Timer_server_Body+0x58> =============================================================================== 02009194 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 2009194: 9d e3 bf a0 save %sp, -96, %sp 2009198: 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; 200919c: 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; 20091a0: f0 06 40 00 ld [ %i1 ], %i0 /* Add the basics */ time->tv_sec += add->tv_sec; 20091a4: c6 00 40 00 ld [ %g1 ], %g3 time->tv_nsec += add->tv_nsec; 20091a8: c4 00 60 04 ld [ %g1 + 4 ], %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 20091ac: 86 00 c0 18 add %g3, %i0, %g3 time->tv_nsec += add->tv_nsec; 20091b0: 84 01 00 02 add %g4, %g2, %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 20091b4: 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 ) { 20091b8: 1b 0e e6 b2 sethi %hi(0x3b9ac800), %o5 20091bc: 9a 13 61 ff or %o5, 0x1ff, %o5 ! 3b9ac9ff 20091c0: 80 a0 80 0d cmp %g2, %o5 20091c4: 08 80 00 0b bleu 20091f0 <_Timespec_Add_to+0x5c> 20091c8: c4 20 60 04 st %g2, [ %g1 + 4 ] time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 20091cc: 09 31 19 4d sethi %hi(0xc4653400), %g4 20091d0: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 20091d4: 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( 20091d8: 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 ) { 20091dc: 80 a0 80 0d cmp %g2, %o5 20091e0: 18 bf ff fd bgu 20091d4 <_Timespec_Add_to+0x40> <== NEVER TAKEN 20091e4: b0 06 20 01 inc %i0 20091e8: c6 20 40 00 st %g3, [ %g1 ] 20091ec: c4 20 60 04 st %g2, [ %g1 + 4 ] time->tv_sec++; seconds++; } return seconds; } 20091f0: 81 c7 e0 08 ret 20091f4: 81 e8 00 00 restore =============================================================================== 0200b29c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 200b29c: c6 02 00 00 ld [ %o0 ], %g3 200b2a0: c4 02 40 00 ld [ %o1 ], %g2 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 200b2a4: 82 10 00 08 mov %o0, %g1 if ( lhs->tv_sec > rhs->tv_sec ) 200b2a8: 80 a0 c0 02 cmp %g3, %g2 200b2ac: 14 80 00 0a bg 200b2d4 <_Timespec_Greater_than+0x38> 200b2b0: 90 10 20 01 mov 1, %o0 return true; if ( lhs->tv_sec < rhs->tv_sec ) 200b2b4: 80 a0 c0 02 cmp %g3, %g2 200b2b8: 06 80 00 07 bl 200b2d4 <_Timespec_Greater_than+0x38> <== NEVER TAKEN 200b2bc: 90 10 20 00 clr %o0 #include #include #include bool _Timespec_Greater_than( 200b2c0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200b2c4: c2 02 60 04 ld [ %o1 + 4 ], %g1 200b2c8: 80 a0 80 01 cmp %g2, %g1 200b2cc: 04 80 00 04 ble 200b2dc <_Timespec_Greater_than+0x40> 200b2d0: 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; } 200b2d4: 81 c3 e0 08 retl 200b2d8: 01 00 00 00 nop 200b2dc: 81 c3 e0 08 retl 200b2e0: 90 10 20 00 clr %o0 ! 0 =============================================================================== 020093a4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 20093a4: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 20093a8: 23 00 80 6e sethi %hi(0x201b800), %l1 20093ac: a2 14 60 48 or %l1, 0x48, %l1 ! 201b848 <_User_extensions_List> 20093b0: e0 04 60 08 ld [ %l1 + 8 ], %l0 20093b4: 80 a4 00 11 cmp %l0, %l1 20093b8: 02 80 00 0d be 20093ec <_User_extensions_Fatal+0x48> <== NEVER TAKEN 20093bc: 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 ) 20093c0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 20093c4: 80 a0 60 00 cmp %g1, 0 20093c8: 02 80 00 05 be 20093dc <_User_extensions_Fatal+0x38> 20093cc: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 20093d0: 92 10 00 19 mov %i1, %o1 20093d4: 9f c0 40 00 call %g1 20093d8: 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 ) { 20093dc: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 20093e0: 80 a4 00 11 cmp %l0, %l1 20093e4: 32 bf ff f8 bne,a 20093c4 <_User_extensions_Fatal+0x20> 20093e8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 20093ec: 81 c7 e0 08 ret 20093f0: 81 e8 00 00 restore =============================================================================== 02009250 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 2009250: 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; 2009254: 07 00 80 6a sethi %hi(0x201a800), %g3 2009258: 86 10 e3 78 or %g3, 0x378, %g3 ! 201ab78 initial_extensions = Configuration.User_extension_table; 200925c: 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); 2009260: 1b 00 80 6e sethi %hi(0x201b800), %o5 2009264: 09 00 80 6d sethi %hi(0x201b400), %g4 2009268: 84 13 60 48 or %o5, 0x48, %g2 200926c: 82 11 22 14 or %g4, 0x214, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2009270: 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; 2009274: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2009278: 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; 200927c: 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); 2009280: 84 00 a0 04 add %g2, 4, %g2 2009284: 82 00 60 04 add %g1, 4, %g1 2009288: c4 23 60 48 st %g2, [ %o5 + 0x48 ] 200928c: c2 21 22 14 st %g1, [ %g4 + 0x214 ] _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 2009290: 80 a4 e0 00 cmp %l3, 0 2009294: 02 80 00 1b be 2009300 <_User_extensions_Handler_initialization+0xb0> 2009298: e4 00 e0 38 ld [ %g3 + 0x38 ], %l2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200929c: 83 2c a0 02 sll %l2, 2, %g1 20092a0: a3 2c a0 04 sll %l2, 4, %l1 20092a4: a2 24 40 01 sub %l1, %g1, %l1 20092a8: a2 04 40 12 add %l1, %l2, %l1 20092ac: 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 *) 20092b0: 40 00 01 73 call 200987c <_Workspace_Allocate_or_fatal_error> 20092b4: 90 10 00 11 mov %l1, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20092b8: 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 *) 20092bc: a0 10 00 08 mov %o0, %l0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20092c0: 40 00 18 1a call 200f328 20092c4: 92 10 20 00 clr %o1 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 20092c8: 80 a4 a0 00 cmp %l2, 0 20092cc: 02 80 00 0d be 2009300 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 20092d0: 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; 20092d4: 93 2c 60 05 sll %l1, 5, %o1 20092d8: 94 10 20 20 mov 0x20, %o2 20092dc: 92 04 c0 09 add %l3, %o1, %o1 20092e0: 40 00 17 d3 call 200f22c 20092e4: 90 04 20 14 add %l0, 0x14, %o0 _User_extensions_Add_set( extension ); 20092e8: 40 00 0e 4f call 200cc24 <_User_extensions_Add_set> 20092ec: 90 10 00 10 mov %l0, %o0 20092f0: a2 04 60 01 inc %l1 20092f4: 80 a4 80 11 cmp %l2, %l1 20092f8: 18 bf ff f7 bgu 20092d4 <_User_extensions_Handler_initialization+0x84> 20092fc: a0 04 20 34 add %l0, 0x34, %l0 2009300: 81 c7 e0 08 ret 2009304: 81 e8 00 00 restore =============================================================================== 02009308 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 2009308: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200930c: 23 00 80 6e sethi %hi(0x201b800), %l1 2009310: e0 04 60 48 ld [ %l1 + 0x48 ], %l0 ! 201b848 <_User_extensions_List> 2009314: a2 14 60 48 or %l1, 0x48, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2009318: a2 04 60 04 add %l1, 4, %l1 200931c: 80 a4 00 11 cmp %l0, %l1 2009320: 02 80 00 0c be 2009350 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 2009324: 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 ) 2009328: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 200932c: 80 a0 60 00 cmp %g1, 0 2009330: 02 80 00 04 be 2009340 <_User_extensions_Thread_begin+0x38> 2009334: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 2009338: 9f c0 40 00 call %g1 200933c: 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 ) { 2009340: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2009344: 80 a4 00 11 cmp %l0, %l1 2009348: 32 bf ff f9 bne,a 200932c <_User_extensions_Thread_begin+0x24> 200934c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2009350: 81 c7 e0 08 ret 2009354: 81 e8 00 00 restore =============================================================================== 020093f4 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 20093f4: 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 ; 20093f8: 23 00 80 6e sethi %hi(0x201b800), %l1 20093fc: e0 04 60 48 ld [ %l1 + 0x48 ], %l0 ! 201b848 <_User_extensions_List> 2009400: a2 14 60 48 or %l1, 0x48, %l1 2009404: a2 04 60 04 add %l1, 4, %l1 2009408: 80 a4 00 11 cmp %l0, %l1 200940c: 02 80 00 10 be 200944c <_User_extensions_Thread_create+0x58><== NEVER TAKEN 2009410: 25 00 80 6d sethi %hi(0x201b400), %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)( 2009414: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_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 ) { 2009418: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 200941c: 80 a0 60 00 cmp %g1, 0 2009420: 02 80 00 07 be 200943c <_User_extensions_Thread_create+0x48> 2009424: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2009428: 9f c0 40 00 call %g1 200942c: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 2009430: 80 8a 20 ff btst 0xff, %o0 2009434: 02 80 00 08 be 2009454 <_User_extensions_Thread_create+0x60> 2009438: 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 ) { 200943c: 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 ; 2009440: 80 a4 00 11 cmp %l0, %l1 2009444: 32 bf ff f6 bne,a 200941c <_User_extensions_Thread_create+0x28> 2009448: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return false; } } return true; } 200944c: 81 c7 e0 08 ret 2009450: 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 ) 2009454: 81 c7 e0 08 ret 2009458: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200945c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 200945c: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009460: 23 00 80 6e sethi %hi(0x201b800), %l1 2009464: a2 14 60 48 or %l1, 0x48, %l1 ! 201b848 <_User_extensions_List> 2009468: e0 04 60 08 ld [ %l1 + 8 ], %l0 200946c: 80 a4 00 11 cmp %l0, %l1 2009470: 02 80 00 0d be 20094a4 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN 2009474: 25 00 80 6d sethi %hi(0x201b400), %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)( 2009478: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_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 ) 200947c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 2009480: 80 a0 60 00 cmp %g1, 0 2009484: 02 80 00 04 be 2009494 <_User_extensions_Thread_delete+0x38> 2009488: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_delete)( 200948c: 9f c0 40 00 call %g1 2009490: 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 ) { 2009494: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009498: 80 a4 00 11 cmp %l0, %l1 200949c: 32 bf ff f9 bne,a 2009480 <_User_extensions_Thread_delete+0x24> 20094a0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 20094a4: 81 c7 e0 08 ret 20094a8: 81 e8 00 00 restore =============================================================================== 02009358 <_User_extensions_Thread_exitted>: } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 2009358: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 200935c: 23 00 80 6e sethi %hi(0x201b800), %l1 2009360: a2 14 60 48 or %l1, 0x48, %l1 ! 201b848 <_User_extensions_List> 2009364: e0 04 60 08 ld [ %l1 + 8 ], %l0 2009368: 80 a4 00 11 cmp %l0, %l1 200936c: 02 80 00 0c be 200939c <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 2009370: 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 ) 2009374: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 2009378: 80 a0 60 00 cmp %g1, 0 200937c: 02 80 00 04 be 200938c <_User_extensions_Thread_exitted+0x34> 2009380: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 2009384: 9f c0 40 00 call %g1 2009388: 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 ) { 200938c: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009390: 80 a4 00 11 cmp %l0, %l1 2009394: 32 bf ff f9 bne,a 2009378 <_User_extensions_Thread_exitted+0x20> 2009398: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 200939c: 81 c7 e0 08 ret 20093a0: 81 e8 00 00 restore =============================================================================== 0200a1b4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 200a1b4: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200a1b8: 23 00 80 80 sethi %hi(0x2020000), %l1 200a1bc: e0 04 61 e8 ld [ %l1 + 0x1e8 ], %l0 ! 20201e8 <_User_extensions_List> 200a1c0: a2 14 61 e8 or %l1, 0x1e8, %l1 200a1c4: a2 04 60 04 add %l1, 4, %l1 200a1c8: 80 a4 00 11 cmp %l0, %l1 200a1cc: 02 80 00 0d be 200a200 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 200a1d0: 25 00 80 80 sethi %hi(0x2020000), %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)( 200a1d4: a4 14 a0 70 or %l2, 0x70, %l2 ! 2020070 <_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 ) 200a1d8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200a1dc: 80 a0 60 00 cmp %g1, 0 200a1e0: 02 80 00 04 be 200a1f0 <_User_extensions_Thread_restart+0x3c> 200a1e4: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_restart)( 200a1e8: 9f c0 40 00 call %g1 200a1ec: 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 ) { 200a1f0: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200a1f4: 80 a4 00 11 cmp %l0, %l1 200a1f8: 32 bf ff f9 bne,a 200a1dc <_User_extensions_Thread_restart+0x28> 200a1fc: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200a200: 81 c7 e0 08 ret 200a204: 81 e8 00 00 restore =============================================================================== 020094ac <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 20094ac: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 20094b0: 23 00 80 6e sethi %hi(0x201b800), %l1 20094b4: e0 04 60 48 ld [ %l1 + 0x48 ], %l0 ! 201b848 <_User_extensions_List> 20094b8: a2 14 60 48 or %l1, 0x48, %l1 20094bc: a2 04 60 04 add %l1, 4, %l1 20094c0: 80 a4 00 11 cmp %l0, %l1 20094c4: 02 80 00 0d be 20094f8 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 20094c8: 25 00 80 6d sethi %hi(0x201b400), %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)( 20094cc: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_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 ) 20094d0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 20094d4: 80 a0 60 00 cmp %g1, 0 20094d8: 02 80 00 04 be 20094e8 <_User_extensions_Thread_start+0x3c> 20094dc: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_start)( 20094e0: 9f c0 40 00 call %g1 20094e4: 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 ) { 20094e8: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 20094ec: 80 a4 00 11 cmp %l0, %l1 20094f0: 32 bf ff f9 bne,a 20094d4 <_User_extensions_Thread_start+0x28> 20094f4: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 20094f8: 81 c7 e0 08 ret 20094fc: 81 e8 00 00 restore =============================================================================== 02009500 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 2009500: 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 ; 2009504: 23 00 80 6d sethi %hi(0x201b400), %l1 2009508: e0 04 62 14 ld [ %l1 + 0x214 ], %l0 ! 201b614 <_User_extensions_Switches_list> 200950c: a2 14 62 14 or %l1, 0x214, %l1 2009510: a2 04 60 04 add %l1, 4, %l1 2009514: 80 a4 00 11 cmp %l0, %l1 2009518: 02 80 00 0a be 2009540 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 200951c: 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 ); 2009520: c2 04 20 08 ld [ %l0 + 8 ], %g1 2009524: 90 10 00 18 mov %i0, %o0 2009528: 9f c0 40 00 call %g1 200952c: 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 ) { 2009530: 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 ; 2009534: 80 a4 00 11 cmp %l0, %l1 2009538: 32 bf ff fb bne,a 2009524 <_User_extensions_Thread_switch+0x24> 200953c: c2 04 20 08 ld [ %l0 + 8 ], %g1 2009540: 81 c7 e0 08 ret 2009544: 81 e8 00 00 restore =============================================================================== 0200b7d0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b7d0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b7d4: 7f ff de 97 call 2003230 200b7d8: 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)); 200b7dc: 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; 200b7e0: 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 ) ) { 200b7e4: 80 a0 40 11 cmp %g1, %l1 200b7e8: 02 80 00 1f be 200b864 <_Watchdog_Adjust+0x94> 200b7ec: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b7f0: 12 80 00 1f bne 200b86c <_Watchdog_Adjust+0x9c> 200b7f4: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b7f8: 80 a6 a0 00 cmp %i2, 0 200b7fc: 02 80 00 1a be 200b864 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b800: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b804: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b808: 80 a6 80 19 cmp %i2, %i1 200b80c: 1a 80 00 0b bcc 200b838 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN 200b810: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 200b814: 10 80 00 1d b 200b888 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200b818: 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 ) { 200b81c: b4 a6 80 19 subcc %i2, %i1, %i2 200b820: 02 80 00 11 be 200b864 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b824: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b828: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b82c: 80 a6 40 1a cmp %i1, %i2 200b830: 38 80 00 16 bgu,a 200b888 <_Watchdog_Adjust+0xb8> 200b834: 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; 200b838: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 200b83c: 7f ff de 81 call 2003240 200b840: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b844: 40 00 00 b6 call 200bb1c <_Watchdog_Tickle> 200b848: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 200b84c: 7f ff de 79 call 2003230 200b850: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200b854: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 200b858: 80 a4 40 02 cmp %l1, %g2 200b85c: 12 bf ff f0 bne 200b81c <_Watchdog_Adjust+0x4c> 200b860: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 200b864: 7f ff de 77 call 2003240 200b868: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200b86c: 12 bf ff fe bne 200b864 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b870: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b874: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b878: b4 00 80 1a add %g2, %i2, %i2 200b87c: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200b880: 7f ff de 70 call 2003240 200b884: 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; 200b888: 10 bf ff f7 b 200b864 <_Watchdog_Adjust+0x94> 200b88c: f4 20 60 10 st %i2, [ %g1 + 0x10 ] =============================================================================== 020096fc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 20096fc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009700: 7f ff e2 eb call 20022ac 2009704: 01 00 00 00 nop previous_state = the_watchdog->state; 2009708: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 200970c: 80 a4 20 01 cmp %l0, 1 2009710: 02 80 00 2a be 20097b8 <_Watchdog_Remove+0xbc> 2009714: 03 00 80 6d sethi %hi(0x201b400), %g1 2009718: 1a 80 00 09 bcc 200973c <_Watchdog_Remove+0x40> 200971c: 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; 2009720: 03 00 80 6d sethi %hi(0x201b400), %g1 2009724: c2 00 63 64 ld [ %g1 + 0x364 ], %g1 ! 201b764 <_Watchdog_Ticks_since_boot> 2009728: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200972c: 7f ff e2 e4 call 20022bc 2009730: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 2009734: 81 c7 e0 08 ret 2009738: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 200973c: 18 bf ff fa bgu 2009724 <_Watchdog_Remove+0x28> <== NEVER TAKEN 2009740: 03 00 80 6d sethi %hi(0x201b400), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 2009744: c2 06 00 00 ld [ %i0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009748: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200974c: c4 00 40 00 ld [ %g1 ], %g2 2009750: 80 a0 a0 00 cmp %g2, 0 2009754: 02 80 00 07 be 2009770 <_Watchdog_Remove+0x74> 2009758: 05 00 80 6d sethi %hi(0x201b400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200975c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009760: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 2009764: 84 00 c0 02 add %g3, %g2, %g2 2009768: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200976c: 05 00 80 6d sethi %hi(0x201b400), %g2 2009770: c4 00 a3 60 ld [ %g2 + 0x360 ], %g2 ! 201b760 <_Watchdog_Sync_count> 2009774: 80 a0 a0 00 cmp %g2, 0 2009778: 22 80 00 07 be,a 2009794 <_Watchdog_Remove+0x98> 200977c: c4 06 20 04 ld [ %i0 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2009780: 05 00 80 6d sethi %hi(0x201b400), %g2 2009784: c6 00 a2 ac ld [ %g2 + 0x2ac ], %g3 ! 201b6ac <_ISR_Nest_level> 2009788: 05 00 80 6d sethi %hi(0x201b400), %g2 200978c: c6 20 a2 cc st %g3, [ %g2 + 0x2cc ] ! 201b6cc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2009790: c4 06 20 04 ld [ %i0 + 4 ], %g2 next->previous = previous; previous->next = next; 2009794: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009798: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200979c: 03 00 80 6d sethi %hi(0x201b400), %g1 20097a0: c2 00 63 64 ld [ %g1 + 0x364 ], %g1 ! 201b764 <_Watchdog_Ticks_since_boot> 20097a4: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 20097a8: 7f ff e2 c5 call 20022bc 20097ac: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 20097b0: 81 c7 e0 08 ret 20097b4: 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; 20097b8: c2 00 63 64 ld [ %g1 + 0x364 ], %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; 20097bc: 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; 20097c0: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 20097c4: 7f ff e2 be call 20022bc 20097c8: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 20097cc: 81 c7 e0 08 ret 20097d0: 81 e8 00 00 restore =============================================================================== 0200afe4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200afe4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200afe8: 7f ff df 69 call 2002d8c 200afec: a0 10 00 18 mov %i0, %l0 200aff0: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200aff4: 11 00 80 7d sethi %hi(0x201f400), %o0 200aff8: 94 10 00 19 mov %i1, %o2 200affc: 90 12 21 18 or %o0, 0x118, %o0 200b000: 7f ff e4 b3 call 20042cc 200b004: 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)); 200b008: 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; 200b00c: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200b010: 80 a4 40 19 cmp %l1, %i1 200b014: 02 80 00 0f be 200b050 <_Watchdog_Report_chain+0x6c> 200b018: 11 00 80 7d sethi %hi(0x201f400), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200b01c: 92 10 00 11 mov %l1, %o1 200b020: 40 00 00 11 call 200b064 <_Watchdog_Report> 200b024: 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 ) 200b028: 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 ; 200b02c: 80 a4 40 19 cmp %l1, %i1 200b030: 12 bf ff fc bne 200b020 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200b034: 92 10 00 11 mov %l1, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200b038: 92 10 00 10 mov %l0, %o1 200b03c: 11 00 80 7d sethi %hi(0x201f400), %o0 200b040: 7f ff e4 a3 call 20042cc 200b044: 90 12 21 30 or %o0, 0x130, %o0 ! 201f530 <_Status_Object_name_errors_to_status+0x30> } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 200b048: 7f ff df 55 call 2002d9c 200b04c: 81 e8 00 00 restore _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200b050: 7f ff e4 9f call 20042cc 200b054: 90 12 21 40 or %o0, 0x140, %o0 } _ISR_Enable( level ); 200b058: 7f ff df 51 call 2002d9c 200b05c: 81 e8 00 00 restore =============================================================================== 0200db14 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 200db14: 9d e3 bf 98 save %sp, -104, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 200db18: a0 96 20 00 orcc %i0, 0, %l0 200db1c: 02 80 00 23 be 200dba8 200db20: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 200db24: 80 a6 e0 00 cmp %i3, 0 200db28: 02 80 00 20 be 200dba8 200db2c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 200db30: 80 8e 60 10 btst 0x10, %i1 200db34: 02 80 00 1f be 200dbb0 200db38: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 200db3c: 02 80 00 1b be 200dba8 200db40: b0 10 20 0a mov 0xa, %i0 200db44: 03 00 80 6d sethi %hi(0x201b400), %g1 200db48: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_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; 200db4c: 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; 200db50: f4 27 bf fc st %i2, [ %fp + -4 ] 200db54: 84 00 a0 01 inc %g2 200db58: c4 20 62 10 st %g2, [ %g1 + 0x210 ] * 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 ); 200db5c: 25 00 80 6e sethi %hi(0x201b800), %l2 200db60: 7f ff e6 10 call 20073a0 <_Objects_Allocate> 200db64: 90 14 a0 e4 or %l2, 0xe4, %o0 ! 201b8e4 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 200db68: a2 92 20 00 orcc %o0, 0, %l1 200db6c: 02 80 00 1e be 200dbe4 <== NEVER TAKEN 200db70: 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 ); 200db74: 92 07 bf f8 add %fp, -8, %o1 200db78: 40 00 01 4b call 200e0a4 <_CORE_barrier_Initialize> 200db7c: f2 24 60 10 st %i1, [ %l1 + 0x10 ] 200db80: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 200db84: c6 04 60 08 ld [ %l1 + 8 ], %g3 200db88: a4 14 a0 e4 or %l2, 0xe4, %l2 200db8c: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200db90: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200db94: 83 28 60 02 sll %g1, 2, %g1 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 200db98: c6 26 c0 00 st %g3, [ %i3 ] 200db9c: e2 20 80 01 st %l1, [ %g2 + %g1 ] _Thread_Enable_dispatch(); 200dba0: 7f ff e9 da call 2008308 <_Thread_Enable_dispatch> 200dba4: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 200dba8: 81 c7 e0 08 ret 200dbac: 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; 200dbb0: 82 10 20 01 mov 1, %g1 200dbb4: c2 27 bf f8 st %g1, [ %fp + -8 ] 200dbb8: 03 00 80 6d sethi %hi(0x201b400), %g1 200dbbc: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level> the_attributes.maximum_count = maximum_waiters; 200dbc0: f4 27 bf fc st %i2, [ %fp + -4 ] 200dbc4: 84 00 a0 01 inc %g2 200dbc8: c4 20 62 10 st %g2, [ %g1 + 0x210 ] 200dbcc: 25 00 80 6e sethi %hi(0x201b800), %l2 200dbd0: 7f ff e5 f4 call 20073a0 <_Objects_Allocate> 200dbd4: 90 14 a0 e4 or %l2, 0xe4, %o0 ! 201b8e4 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 200dbd8: a2 92 20 00 orcc %o0, 0, %l1 200dbdc: 12 bf ff e6 bne 200db74 200dbe0: 90 04 60 14 add %l1, 0x14, %o0 _Thread_Enable_dispatch(); 200dbe4: 7f ff e9 c9 call 2008308 <_Thread_Enable_dispatch> 200dbe8: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 200dbec: 81 c7 e0 08 ret 200dbf0: 81 e8 00 00 restore =============================================================================== 02008558 : 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 ) { 2008558: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 200855c: 03 00 80 86 sethi %hi(0x2021800), %g1 2008560: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 ! 2021a6c <_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; 2008564: 09 00 80 87 sethi %hi(0x2021c00), %g4 if ( rtems_interrupt_is_in_progress() ) 2008568: 80 a0 60 00 cmp %g1, 0 200856c: 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 ) { 2008570: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 2008574: 12 80 00 49 bne 2008698 2008578: c6 01 20 d0 ld [ %g4 + 0xd0 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 200857c: 80 a6 a0 00 cmp %i2, 0 2008580: 02 80 00 4b be 20086ac 2008584: 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 ) 2008588: 02 80 00 49 be 20086ac 200858c: 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; 2008590: c4 06 40 00 ld [ %i1 ], %g2 2008594: 80 a0 a0 00 cmp %g2, 0 2008598: 22 80 00 42 be,a 20086a0 200859c: 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 ) 20085a0: 80 a0 c0 18 cmp %g3, %i0 20085a4: 08 80 00 3d bleu 2008698 20085a8: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20085ac: 05 00 80 86 sethi %hi(0x2021800), %g2 20085b0: c6 00 a1 d0 ld [ %g2 + 0x1d0 ], %g3 ! 20219d0 <_Thread_Dispatch_disable_level> 20085b4: 86 00 e0 01 inc %g3 20085b8: c6 20 a1 d0 st %g3, [ %g2 + 0x1d0 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 20085bc: 80 a6 20 00 cmp %i0, 0 20085c0: 12 80 00 2b bne 200866c 20085c4: 05 00 80 87 sethi %hi(0x2021c00), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 20085c8: da 01 20 d0 ld [ %g4 + 0xd0 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 20085cc: 80 a3 60 00 cmp %o5, 0 20085d0: 02 80 00 3a be 20086b8 <== NEVER TAKEN 20085d4: d8 00 a0 d4 ld [ %g2 + 0xd4 ], %o4 20085d8: 10 80 00 05 b 20085ec 20085dc: 86 10 00 0c mov %o4, %g3 20085e0: 80 a3 40 18 cmp %o5, %i0 20085e4: 08 80 00 0b bleu 2008610 20085e8: 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; 20085ec: c8 00 c0 00 ld [ %g3 ], %g4 20085f0: 80 a1 20 00 cmp %g4, 0 20085f4: 32 bf ff fb bne,a 20085e0 20085f8: b0 06 20 01 inc %i0 20085fc: c8 00 e0 04 ld [ %g3 + 4 ], %g4 2008600: 80 a1 20 00 cmp %g4, 0 2008604: 32 bf ff f7 bne,a 20085e0 2008608: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 200860c: 80 a3 40 18 cmp %o5, %i0 2008610: 02 80 00 2b be 20086bc 2008614: f0 26 80 00 st %i0, [ %i2 ] 2008618: 85 2e 20 03 sll %i0, 3, %g2 200861c: 87 2e 20 05 sll %i0, 5, %g3 2008620: 84 20 c0 02 sub %g3, %g2, %g2 2008624: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 2008628: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 200862c: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 2008630: c6 20 80 00 st %g3, [ %g2 ] 2008634: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 2008638: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 200863c: c6 20 a0 04 st %g3, [ %g2 + 4 ] 2008640: c6 00 60 08 ld [ %g1 + 8 ], %g3 2008644: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008648: c6 00 60 0c ld [ %g1 + 0xc ], %g3 200864c: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 2008650: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2008654: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 2008658: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 200865c: 40 00 07 2b call 200a308 <_Thread_Enable_dispatch> 2008660: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 2008664: 40 00 24 c9 call 2011988 2008668: 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; 200866c: c6 00 a0 d4 ld [ %g2 + 0xd4 ], %g3 2008670: 89 2e 20 05 sll %i0, 5, %g4 2008674: 85 2e 20 03 sll %i0, 3, %g2 2008678: 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; 200867c: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 2008680: 80 a1 20 00 cmp %g4, 0 2008684: 02 80 00 12 be 20086cc 2008688: 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(); 200868c: 40 00 07 1f call 200a308 <_Thread_Enable_dispatch> 2008690: 01 00 00 00 nop 2008694: 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 ); } 2008698: 81 c7 e0 08 ret 200869c: 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; 20086a0: 80 a0 a0 00 cmp %g2, 0 20086a4: 12 bf ff c0 bne 20085a4 20086a8: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 20086ac: 84 10 20 09 mov 9, %g2 } 20086b0: 81 c7 e0 08 ret 20086b4: 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; 20086b8: 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(); 20086bc: 40 00 07 13 call 200a308 <_Thread_Enable_dispatch> 20086c0: 01 00 00 00 nop return sc; 20086c4: 10 bf ff f5 b 2008698 20086c8: 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; 20086cc: c6 00 a0 04 ld [ %g2 + 4 ], %g3 20086d0: 80 a0 e0 00 cmp %g3, 0 20086d4: 12 bf ff ee bne 200868c 20086d8: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 20086dc: 10 bf ff d3 b 2008628 20086e0: f0 26 80 00 st %i0, [ %i2 ] =============================================================================== 02008ff8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2008ff8: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2008ffc: 80 a6 20 00 cmp %i0, 0 2009000: 02 80 00 23 be 200908c <== NEVER TAKEN 2009004: 25 00 80 a6 sethi %hi(0x2029800), %l2 2009008: a4 14 a3 04 or %l2, 0x304, %l2 ! 2029b04 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 200900c: 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 ] ) 2009010: c2 04 80 00 ld [ %l2 ], %g1 2009014: 80 a0 60 00 cmp %g1, 0 2009018: 22 80 00 1a be,a 2009080 200901c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2009020: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 2009024: 80 a4 60 00 cmp %l1, 0 2009028: 22 80 00 16 be,a 2009080 200902c: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 2009030: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 2009034: 84 90 60 00 orcc %g1, 0, %g2 2009038: 22 80 00 12 be,a 2009080 <== NEVER TAKEN 200903c: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 2009040: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 2009044: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 2009048: 83 2c 20 02 sll %l0, 2, %g1 200904c: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 2009050: 90 90 60 00 orcc %g1, 0, %o0 2009054: 02 80 00 05 be 2009068 <== NEVER TAKEN 2009058: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 200905c: 9f c6 00 00 call %i0 2009060: 01 00 00 00 nop 2009064: 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++ ) { 2009068: 83 28 a0 10 sll %g2, 0x10, %g1 200906c: 83 30 60 10 srl %g1, 0x10, %g1 2009070: 80 a0 40 10 cmp %g1, %l0 2009074: 3a bf ff f5 bcc,a 2009048 2009078: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 200907c: 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++ ) { 2009080: 80 a4 80 13 cmp %l2, %l3 2009084: 32 bf ff e4 bne,a 2009014 2009088: c2 04 80 00 ld [ %l2 ], %g1 200908c: 81 c7 e0 08 ret 2009090: 81 e8 00 00 restore =============================================================================== 02007c78 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 2007c78: 9d e3 bf a0 save %sp, -96, %sp 2007c7c: 90 10 00 18 mov %i0, %o0 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 2007c80: 80 a6 a0 00 cmp %i2, 0 2007c84: 02 80 00 20 be 2007d04 2007c88: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 2007c8c: 92 10 00 19 mov %i1, %o1 2007c90: 40 00 07 19 call 20098f4 <_Objects_Get_information> 2007c94: b0 10 20 0a mov 0xa, %i0 if ( !obj_info ) 2007c98: 80 a2 20 00 cmp %o0, 0 2007c9c: 02 80 00 1a be 2007d04 2007ca0: 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; 2007ca4: 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; 2007ca8: 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; 2007cac: 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; 2007cb0: c2 26 80 00 st %g1, [ %i2 ] info->maximum_id = obj_info->maximum_id; 2007cb4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 info->auto_extend = obj_info->auto_extend; 2007cb8: 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; 2007cbc: c2 26 a0 04 st %g1, [ %i2 + 4 ] info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 2007cc0: c8 26 a0 08 st %g4, [ %i2 + 8 ] for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 2007cc4: 80 a1 20 00 cmp %g4, 0 2007cc8: 02 80 00 0d be 2007cfc <== NEVER TAKEN 2007ccc: 84 10 20 00 clr %g2 2007cd0: da 02 20 1c ld [ %o0 + 0x1c ], %o5 2007cd4: 86 10 20 01 mov 1, %g3 2007cd8: 82 10 20 01 mov 1, %g1 if ( !obj_info->local_table[i] ) 2007cdc: 87 28 e0 02 sll %g3, 2, %g3 2007ce0: 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++ ) 2007ce4: 82 00 60 01 inc %g1 if ( !obj_info->local_table[i] ) unallocated++; 2007ce8: 80 a0 00 03 cmp %g0, %g3 2007cec: 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++ ) 2007cf0: 80 a1 00 01 cmp %g4, %g1 2007cf4: 1a bf ff fa bcc 2007cdc 2007cf8: 86 10 00 01 mov %g1, %g3 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 2007cfc: c4 26 a0 10 st %g2, [ %i2 + 0x10 ] 2007d00: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 2007d04: 81 c7 e0 08 ret 2007d08: 81 e8 00 00 restore =============================================================================== 02013ea4 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 2013ea4: 9d e3 bf a0 save %sp, -96, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 2013ea8: a0 96 20 00 orcc %i0, 0, %l0 2013eac: 02 80 00 31 be 2013f70 2013eb0: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 2013eb4: 80 a6 60 00 cmp %i1, 0 2013eb8: 02 80 00 32 be 2013f80 2013ebc: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 2013ec0: 02 80 00 30 be 2013f80 <== NEVER TAKEN 2013ec4: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 2013ec8: 02 80 00 2c be 2013f78 2013ecc: 80 a6 a0 00 cmp %i2, 0 2013ed0: 02 80 00 2a be 2013f78 2013ed4: 80 a6 80 1b cmp %i2, %i3 2013ed8: 0a 80 00 28 bcs 2013f78 2013edc: 80 8e e0 07 btst 7, %i3 2013ee0: 12 80 00 26 bne 2013f78 2013ee4: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 2013ee8: 12 80 00 26 bne 2013f80 2013eec: 03 00 80 f3 sethi %hi(0x203cc00), %g1 2013ef0: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 203ccc0 <_Thread_Dispatch_disable_level> 2013ef4: 84 00 a0 01 inc %g2 2013ef8: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ] * 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 ); 2013efc: 25 00 80 f2 sethi %hi(0x203c800), %l2 2013f00: 40 00 12 4a call 2018828 <_Objects_Allocate> 2013f04: 90 14 a2 c8 or %l2, 0x2c8, %o0 ! 203cac8 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 2013f08: a2 92 20 00 orcc %o0, 0, %l1 2013f0c: 02 80 00 1f be 2013f88 2013f10: 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; 2013f14: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 2013f18: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 2013f1c: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 2013f20: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 2013f24: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 2013f28: 40 00 61 eb call 202c6d4 <.udiv> 2013f2c: 90 10 00 1a mov %i2, %o0 2013f30: 92 10 00 19 mov %i1, %o1 2013f34: 94 10 00 08 mov %o0, %o2 2013f38: 96 10 00 1b mov %i3, %o3 2013f3c: b8 04 60 24 add %l1, 0x24, %i4 2013f40: 40 00 0c be call 2017238 <_Chain_Initialize> 2013f44: 90 10 00 1c mov %i4, %o0 2013f48: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 2013f4c: c6 04 60 08 ld [ %l1 + 8 ], %g3 2013f50: a4 14 a2 c8 or %l2, 0x2c8, %l2 2013f54: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2013f58: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2013f5c: 83 28 60 02 sll %g1, 2, %g1 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 2013f60: c6 27 40 00 st %g3, [ %i5 ] 2013f64: e2 20 80 01 st %l1, [ %g2 + %g1 ] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2013f68: 40 00 16 41 call 201986c <_Thread_Enable_dispatch> 2013f6c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 2013f70: 81 c7 e0 08 ret 2013f74: 81 e8 00 00 restore } 2013f78: 81 c7 e0 08 ret 2013f7c: 91 e8 20 08 restore %g0, 8, %o0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 2013f80: 81 c7 e0 08 ret 2013f84: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 2013f88: 40 00 16 39 call 201986c <_Thread_Enable_dispatch> 2013f8c: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 2013f90: 81 c7 e0 08 ret 2013f94: 81 e8 00 00 restore =============================================================================== 02007248 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 2007248: 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 *) 200724c: 11 00 80 84 sethi %hi(0x2021000), %o0 2007250: 92 10 00 18 mov %i0, %o1 2007254: 90 12 23 58 or %o0, 0x358, %o0 2007258: 40 00 09 13 call 20096a4 <_Objects_Get> 200725c: 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 ) { 2007260: c2 07 bf fc ld [ %fp + -4 ], %g1 2007264: 80 a0 60 00 cmp %g1, 0 2007268: 02 80 00 04 be 2007278 200726c: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007270: 81 c7 e0 08 ret 2007274: 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 ) ) { 2007278: 23 00 80 85 sethi %hi(0x2021400), %l1 200727c: c4 02 20 40 ld [ %o0 + 0x40 ], %g2 2007280: c2 04 61 90 ld [ %l1 + 0x190 ], %g1 2007284: 80 a0 80 01 cmp %g2, %g1 2007288: 02 80 00 06 be 20072a0 200728c: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2007290: 40 00 0b 8b call 200a0bc <_Thread_Enable_dispatch> 2007294: b0 10 20 17 mov 0x17, %i0 return RTEMS_NOT_OWNER_OF_RESOURCE; 2007298: 81 c7 e0 08 ret 200729c: 81 e8 00 00 restore } if ( length == RTEMS_PERIOD_STATUS ) { 20072a0: 12 80 00 0e bne 20072d8 20072a4: 01 00 00 00 nop switch ( the_period->state ) { 20072a8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20072ac: 80 a0 60 04 cmp %g1, 4 20072b0: 18 80 00 06 bgu 20072c8 <== NEVER TAKEN 20072b4: b0 10 20 00 clr %i0 20072b8: 83 28 60 02 sll %g1, 2, %g1 20072bc: 05 00 80 7c sethi %hi(0x201f000), %g2 20072c0: 84 10 a1 78 or %g2, 0x178, %g2 ! 201f178 20072c4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20072c8: 40 00 0b 7d call 200a0bc <_Thread_Enable_dispatch> 20072cc: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 20072d0: 81 c7 e0 08 ret 20072d4: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20072d8: 7f ff ef a9 call 200317c 20072dc: 01 00 00 00 nop 20072e0: a6 10 00 08 mov %o0, %l3 switch ( the_period->state ) { 20072e4: e4 04 20 38 ld [ %l0 + 0x38 ], %l2 20072e8: 80 a4 a0 02 cmp %l2, 2 20072ec: 02 80 00 1a be 2007354 20072f0: 80 a4 a0 04 cmp %l2, 4 20072f4: 02 80 00 32 be 20073bc 20072f8: 80 a4 a0 00 cmp %l2, 0 20072fc: 12 bf ff dd bne 2007270 <== NEVER TAKEN 2007300: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2007304: 7f ff ef a2 call 200318c 2007308: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 200730c: 7f ff ff 48 call 200702c <_Rate_monotonic_Initiate_statistics> 2007310: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2007314: 82 10 20 02 mov 2, %g1 2007318: c2 24 20 38 st %g1, [ %l0 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 200731c: 03 00 80 1d sethi %hi(0x2007400), %g1 2007320: 82 10 63 10 or %g1, 0x310, %g1 ! 2007710 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2007324: f0 24 20 30 st %i0, [ %l0 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007328: 92 04 20 10 add %l0, 0x10, %o1 200732c: 11 00 80 85 sethi %hi(0x2021400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007330: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007334: 90 12 21 b0 or %o0, 0x1b0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007338: c0 24 20 18 clr [ %l0 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 200733c: c0 24 20 34 clr [ %l0 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2007340: f2 24 20 3c st %i1, [ %l0 + 0x3c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2007344: c2 24 20 2c st %g1, [ %l0 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007348: 40 00 10 cd call 200b67c <_Watchdog_Insert> 200734c: b0 10 20 00 clr %i0 2007350: 30 bf ff de b,a 20072c8 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2007354: 7f ff ff 7d call 2007148 <_Rate_monotonic_Update_statistics> 2007358: 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; 200735c: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2007360: 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; 2007364: c2 24 20 38 st %g1, [ %l0 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2007368: 7f ff ef 89 call 200318c 200736c: 90 10 00 13 mov %l3, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2007370: c2 04 61 90 ld [ %l1 + 0x190 ], %g1 2007374: c4 04 20 08 ld [ %l0 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2007378: 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; 200737c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2007380: 40 00 0d eb call 200ab2c <_Thread_Set_state> 2007384: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2007388: 7f ff ef 7d call 200317c 200738c: 01 00 00 00 nop local_state = the_period->state; 2007390: e6 04 20 38 ld [ %l0 + 0x38 ], %l3 the_period->state = RATE_MONOTONIC_ACTIVE; 2007394: e4 24 20 38 st %l2, [ %l0 + 0x38 ] _ISR_Enable( level ); 2007398: 7f ff ef 7d call 200318c 200739c: 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 ) 20073a0: 80 a4 e0 03 cmp %l3, 3 20073a4: 02 80 00 17 be 2007400 20073a8: d0 04 61 90 ld [ %l1 + 0x190 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 20073ac: 40 00 0b 44 call 200a0bc <_Thread_Enable_dispatch> 20073b0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 20073b4: 81 c7 e0 08 ret 20073b8: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 20073bc: 7f ff ff 63 call 2007148 <_Rate_monotonic_Update_statistics> 20073c0: 90 10 00 10 mov %l0, %o0 _ISR_Enable( level ); 20073c4: 7f ff ef 72 call 200318c 20073c8: 90 10 00 13 mov %l3, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 20073cc: 82 10 20 02 mov 2, %g1 20073d0: 92 04 20 10 add %l0, 0x10, %o1 20073d4: 11 00 80 85 sethi %hi(0x2021400), %o0 20073d8: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 20215b0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20073dc: f2 24 20 1c st %i1, [ %l0 + 0x1c ] the_period->next_length = length; 20073e0: f2 24 20 3c st %i1, [ %l0 + 0x3c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 20073e4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20073e8: 40 00 10 a5 call 200b67c <_Watchdog_Insert> 20073ec: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20073f0: 40 00 0b 33 call 200a0bc <_Thread_Enable_dispatch> 20073f4: 01 00 00 00 nop return RTEMS_TIMEOUT; 20073f8: 81 c7 e0 08 ret 20073fc: 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 ); 2007400: 40 00 0a 15 call 2009c54 <_Thread_Clear_state> 2007404: 13 00 00 10 sethi %hi(0x4000), %o1 2007408: 30 bf ff e9 b,a 20073ac =============================================================================== 0200740c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 200740c: 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 ) 2007410: 80 a6 60 00 cmp %i1, 0 2007414: 02 80 00 4d be 2007548 <== NEVER TAKEN 2007418: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 200741c: 13 00 80 7c sethi %hi(0x201f000), %o1 2007420: 9f c6 40 00 call %i1 2007424: 92 12 61 90 or %o1, 0x190, %o1 ! 201f190 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 2007428: 90 10 00 18 mov %i0, %o0 200742c: 13 00 80 7c sethi %hi(0x201f000), %o1 2007430: 9f c6 40 00 call %i1 2007434: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 201f1b0 (*print)( context, "--- Wall times are in seconds ---\n" ); 2007438: 90 10 00 18 mov %i0, %o0 200743c: 13 00 80 7c sethi %hi(0x201f000), %o1 2007440: 9f c6 40 00 call %i1 2007444: 92 12 61 d8 or %o1, 0x1d8, %o1 ! 201f1d8 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2007448: 90 10 00 18 mov %i0, %o0 200744c: 13 00 80 7c sethi %hi(0x201f000), %o1 2007450: 9f c6 40 00 call %i1 2007454: 92 12 62 00 or %o1, 0x200, %o1 ! 201f200 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 2007458: 90 10 00 18 mov %i0, %o0 200745c: 13 00 80 7c sethi %hi(0x201f000), %o1 2007460: 9f c6 40 00 call %i1 2007464: 92 12 62 50 or %o1, 0x250, %o1 ! 201f250 /* * 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 ; 2007468: 23 00 80 84 sethi %hi(0x2021000), %l1 200746c: a2 14 63 58 or %l1, 0x358, %l1 ! 2021358 <_Rate_monotonic_Information> 2007470: e0 04 60 08 ld [ %l1 + 8 ], %l0 2007474: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2007478: 80 a4 00 01 cmp %l0, %g1 200747c: 18 80 00 33 bgu 2007548 <== NEVER TAKEN 2007480: 3b 00 80 7c sethi %hi(0x201f000), %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, 2007484: 39 00 80 7c sethi %hi(0x201f000), %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, 2007488: 35 00 80 7c sethi %hi(0x201f000), %i2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 200748c: 2f 00 80 7c sethi %hi(0x201f000), %l7 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2007490: ba 17 62 a0 or %i5, 0x2a0, %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, 2007494: b8 17 22 c0 or %i4, 0x2c0, %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, 2007498: b4 16 a2 e0 or %i2, 0x2e0, %i2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 200749c: ae 15 e2 b8 or %l7, 0x2b8, %l7 20074a0: 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 ); 20074a4: 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 ); 20074a8: 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 ); 20074ac: aa 07 bf b8 add %fp, -72, %l5 20074b0: 10 80 00 06 b 20074c8 20074b4: 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++ ) { 20074b8: 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 ; 20074bc: 80 a0 40 10 cmp %g1, %l0 20074c0: 0a 80 00 22 bcs 2007548 20074c4: 01 00 00 00 nop id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 20074c8: 90 10 00 10 mov %l0, %o0 20074cc: 40 00 1a 4c call 200ddfc 20074d0: 92 10 00 12 mov %l2, %o1 if ( status != RTEMS_SUCCESSFUL ) 20074d4: 80 a2 20 00 cmp %o0, 0 20074d8: 32 bf ff f8 bne,a 20074b8 20074dc: 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 ); 20074e0: 92 10 00 16 mov %l6, %o1 20074e4: 40 00 1a 75 call 200deb8 20074e8: 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 ); 20074ec: d0 07 bf d8 ld [ %fp + -40 ], %o0 20074f0: 94 10 00 13 mov %l3, %o2 20074f4: 40 00 00 b7 call 20077d0 20074f8: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 20074fc: d8 1f bf a0 ldd [ %fp + -96 ], %o4 2007500: 92 10 00 1d mov %i5, %o1 2007504: 94 10 00 10 mov %l0, %o2 2007508: 90 10 00 18 mov %i0, %o0 200750c: 9f c6 40 00 call %i1 2007510: 96 10 00 13 mov %l3, %o3 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2007514: 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 ); 2007518: 94 10 00 14 mov %l4, %o2 200751c: 90 10 00 15 mov %l5, %o0 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2007520: 80 a0 60 00 cmp %g1, 0 2007524: 12 80 00 0b bne 2007550 2007528: 92 10 00 17 mov %l7, %o1 (*print)( context, "\n" ); 200752c: 9f c6 40 00 call %i1 2007530: 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 ; 2007534: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 2007538: 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 ; 200753c: 80 a0 40 10 cmp %g1, %l0 2007540: 1a bf ff e3 bcc 20074cc <== ALWAYS TAKEN 2007544: 90 10 00 10 mov %l0, %o0 2007548: 81 c7 e0 08 ret 200754c: 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 ); 2007550: 40 00 0f 10 call 200b190 <_Timespec_Divide_by_integer> 2007554: 92 10 00 01 mov %g1, %o1 (*print)( context, 2007558: d0 07 bf ac ld [ %fp + -84 ], %o0 200755c: 40 00 55 79 call 201cb40 <.div> 2007560: 92 10 23 e8 mov 0x3e8, %o1 2007564: 96 10 00 08 mov %o0, %o3 2007568: d0 07 bf b4 ld [ %fp + -76 ], %o0 200756c: d6 27 bf 9c st %o3, [ %fp + -100 ] 2007570: 40 00 55 74 call 201cb40 <.div> 2007574: 92 10 23 e8 mov 0x3e8, %o1 2007578: c2 07 bf f0 ld [ %fp + -16 ], %g1 200757c: b6 10 00 08 mov %o0, %i3 2007580: d0 07 bf f4 ld [ %fp + -12 ], %o0 2007584: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2007588: 40 00 55 6e call 201cb40 <.div> 200758c: 92 10 23 e8 mov 0x3e8, %o1 2007590: d8 07 bf b0 ld [ %fp + -80 ], %o4 2007594: d6 07 bf 9c ld [ %fp + -100 ], %o3 2007598: d4 07 bf a8 ld [ %fp + -88 ], %o2 200759c: 9a 10 00 1b mov %i3, %o5 20075a0: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 20075a4: 92 10 00 1c mov %i4, %o1 20075a8: 9f c6 40 00 call %i1 20075ac: 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); 20075b0: d2 07 bf a0 ld [ %fp + -96 ], %o1 20075b4: 94 10 00 14 mov %l4, %o2 20075b8: 40 00 0e f6 call 200b190 <_Timespec_Divide_by_integer> 20075bc: 90 07 bf d0 add %fp, -48, %o0 (*print)( context, 20075c0: d0 07 bf c4 ld [ %fp + -60 ], %o0 20075c4: 40 00 55 5f call 201cb40 <.div> 20075c8: 92 10 23 e8 mov 0x3e8, %o1 20075cc: 96 10 00 08 mov %o0, %o3 20075d0: d0 07 bf cc ld [ %fp + -52 ], %o0 20075d4: d6 27 bf 9c st %o3, [ %fp + -100 ] 20075d8: 40 00 55 5a call 201cb40 <.div> 20075dc: 92 10 23 e8 mov 0x3e8, %o1 20075e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 20075e4: b6 10 00 08 mov %o0, %i3 20075e8: d0 07 bf f4 ld [ %fp + -12 ], %o0 20075ec: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20075f0: 40 00 55 54 call 201cb40 <.div> 20075f4: 92 10 23 e8 mov 0x3e8, %o1 20075f8: d4 07 bf c0 ld [ %fp + -64 ], %o2 20075fc: d6 07 bf 9c ld [ %fp + -100 ], %o3 2007600: d8 07 bf c8 ld [ %fp + -56 ], %o4 2007604: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2007608: 9a 10 00 1b mov %i3, %o5 200760c: 90 10 00 18 mov %i0, %o0 2007610: 9f c6 40 00 call %i1 2007614: 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 ; 2007618: 10 bf ff a8 b 20074b8 200761c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 =============================================================================== 0200763c : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 200763c: 9d e3 bf a0 save %sp, -96, %sp 2007640: 03 00 80 85 sethi %hi(0x2021400), %g1 2007644: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 20214d0 <_Thread_Dispatch_disable_level> 2007648: 84 00 a0 01 inc %g2 200764c: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ] /* * 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 ; 2007650: 23 00 80 84 sethi %hi(0x2021000), %l1 2007654: a2 14 63 58 or %l1, 0x358, %l1 ! 2021358 <_Rate_monotonic_Information> 2007658: e0 04 60 08 ld [ %l1 + 8 ], %l0 200765c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2007660: 80 a4 00 01 cmp %l0, %g1 2007664: 18 80 00 09 bgu 2007688 <== NEVER TAKEN 2007668: 01 00 00 00 nop id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 200766c: 40 00 00 0a call 2007694 2007670: 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 ; 2007674: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 2007678: 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 ; 200767c: 80 a0 40 10 cmp %g1, %l0 2007680: 1a bf ff fb bcc 200766c 2007684: 01 00 00 00 nop } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 2007688: 40 00 0a 8d call 200a0bc <_Thread_Enable_dispatch> 200768c: 81 e8 00 00 restore =============================================================================== 02014d88 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 2014d88: 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 ) 2014d8c: 80 a6 60 00 cmp %i1, 0 2014d90: 02 80 00 22 be 2014e18 2014d94: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( !size ) 2014d98: 02 80 00 20 be 2014e18 2014d9c: 21 00 80 f3 sethi %hi(0x203cc00), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 2014da0: 40 00 08 e5 call 2017134 <_API_Mutex_Lock> 2014da4: d0 04 21 78 ld [ %l0 + 0x178 ], %o0 ! 203cd78 <_RTEMS_Allocator_Mutex> 2014da8: 92 10 00 18 mov %i0, %o1 2014dac: 11 00 80 f2 sethi %hi(0x203c800), %o0 2014db0: 94 07 bf fc add %fp, -4, %o2 2014db4: 40 00 0f f1 call 2018d78 <_Objects_Get_no_protection> 2014db8: 90 12 23 48 or %o0, 0x348, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 2014dbc: c2 07 bf fc ld [ %fp + -4 ], %g1 2014dc0: 80 a0 60 00 cmp %g1, 0 2014dc4: 12 80 00 0f bne 2014e00 2014dc8: 80 a0 60 01 cmp %g1, 1 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 2014dcc: 90 02 20 68 add %o0, 0x68, %o0 2014dd0: 92 10 00 19 mov %i1, %o1 2014dd4: 94 10 00 1a mov %i2, %o2 2014dd8: 40 00 0e 45 call 20186ec <_Heap_Size_of_alloc_area> 2014ddc: b0 10 20 09 mov 9, %i0 2014de0: 80 8a 20 ff btst 0xff, %o0 2014de4: 02 80 00 03 be 2014df0 <== NEVER TAKEN 2014de8: 01 00 00 00 nop 2014dec: b0 10 20 00 clr %i0 ! 0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2014df0: 40 00 08 e7 call 201718c <_API_Mutex_Unlock> 2014df4: d0 04 21 78 ld [ %l0 + 0x178 ], %o0 return return_status; 2014df8: 81 c7 e0 08 ret 2014dfc: 81 e8 00 00 restore return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 2014e00: 12 bf ff fb bne 2014dec <== NEVER TAKEN 2014e04: b0 10 20 04 mov 4, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2014e08: 40 00 08 e1 call 201718c <_API_Mutex_Unlock> 2014e0c: d0 04 21 78 ld [ %l0 + 0x178 ], %o0 return return_status; 2014e10: 81 c7 e0 08 ret 2014e14: 81 e8 00 00 restore } 2014e18: 81 c7 e0 08 ret 2014e1c: 91 e8 20 09 restore %g0, 9, %o0 =============================================================================== 020154ac : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 20154ac: 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 ) 20154b0: 80 a6 60 00 cmp %i1, 0 20154b4: 12 80 00 04 bne 20154c4 20154b8: 82 10 20 0a mov 0xa, %g1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20154bc: 81 c7 e0 08 ret 20154c0: 91 e8 00 01 restore %g0, %g1, %o0 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20154c4: 90 10 00 18 mov %i0, %o0 20154c8: 40 00 11 0d call 20198fc <_Thread_Get> 20154cc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20154d0: c4 07 bf fc ld [ %fp + -4 ], %g2 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20154d4: a2 10 00 08 mov %o0, %l1 switch ( location ) { 20154d8: 80 a0 a0 00 cmp %g2, 0 20154dc: 12 bf ff f8 bne 20154bc 20154e0: 82 10 20 04 mov 4, %g1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 20154e4: e0 02 21 60 ld [ %o0 + 0x160 ], %l0 asr = &api->Signal; 20154e8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20154ec: 80 a0 60 00 cmp %g1, 0 20154f0: 02 80 00 26 be 2015588 20154f4: 01 00 00 00 nop if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 20154f8: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 20154fc: 80 a0 60 00 cmp %g1, 0 2015500: 02 80 00 16 be 2015558 2015504: 01 00 00 00 nop rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 2015508: 7f ff e8 5e call 200f680 201550c: 01 00 00 00 nop *signal_set |= signals; 2015510: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2015514: b2 10 40 19 or %g1, %i1, %i1 2015518: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _ISR_Enable( _level ); 201551c: 7f ff e8 5d call 200f690 2015520: 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 ) ) 2015524: 03 00 80 f3 sethi %hi(0x203cc00), %g1 2015528: c4 00 61 5c ld [ %g1 + 0x15c ], %g2 ! 203cd5c <_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; 201552c: 82 10 20 01 mov 1, %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2015530: 80 a0 a0 00 cmp %g2, 0 2015534: 02 80 00 10 be 2015574 2015538: c2 2c 60 74 stb %g1, [ %l1 + 0x74 ] 201553c: 05 00 80 f3 sethi %hi(0x203cc00), %g2 2015540: c4 00 a1 80 ld [ %g2 + 0x180 ], %g2 ! 203cd80 <_Thread_Executing> 2015544: 80 a4 40 02 cmp %l1, %g2 2015548: 12 80 00 0b bne 2015574 <== NEVER TAKEN 201554c: 05 00 80 f3 sethi %hi(0x203cc00), %g2 _ISR_Signals_to_thread_executing = true; 2015550: 10 80 00 09 b 2015574 2015554: c2 28 a2 18 stb %g1, [ %g2 + 0x218 ] ! 203ce18 <_ISR_Signals_to_thread_executing> rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 2015558: 7f ff e8 4a call 200f680 201555c: 01 00 00 00 nop *signal_set |= signals; 2015560: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2015564: b2 10 40 19 or %g1, %i1, %i1 2015568: f2 24 20 18 st %i1, [ %l0 + 0x18 ] _ISR_Enable( _level ); 201556c: 7f ff e8 49 call 200f690 2015570: 01 00 00 00 nop } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 2015574: 40 00 10 be call 201986c <_Thread_Enable_dispatch> 2015578: 01 00 00 00 nop 201557c: 82 10 20 00 clr %g1 ! 0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2015580: 81 c7 e0 08 ret 2015584: 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(); 2015588: 40 00 10 b9 call 201986c <_Thread_Enable_dispatch> 201558c: 01 00 00 00 nop return RTEMS_NOT_DEFINED; 2015590: 10 bf ff cb b 20154bc 2015594: 82 10 20 0b mov 0xb, %g1 ! b =============================================================================== 0200dd20 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 200dd20: 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 ) 200dd24: 80 a6 a0 00 cmp %i2, 0 200dd28: 02 80 00 44 be 200de38 200dd2c: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 200dd30: 03 00 80 6d sethi %hi(0x201b400), %g1 200dd34: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing> api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200dd38: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200dd3c: 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; 200dd40: 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 ]; 200dd44: e2 04 21 60 ld [ %l0 + 0x160 ], %l1 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200dd48: a4 60 3f ff subx %g0, -1, %l2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200dd4c: 80 a0 60 00 cmp %g1, 0 200dd50: 12 80 00 3c bne 200de40 200dd54: 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; 200dd58: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 200dd5c: 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(); 200dd60: 7f ff f0 41 call 2009e64 <_CPU_ISR_Get_level> 200dd64: 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; 200dd68: 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; 200dd6c: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200dd70: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200dd74: 80 8e 61 00 btst 0x100, %i1 200dd78: 02 80 00 06 be 200dd90 200dd7c: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 200dd80: 83 36 20 08 srl %i0, 8, %g1 200dd84: 82 18 60 01 xor %g1, 1, %g1 200dd88: 82 08 60 01 and %g1, 1, %g1 200dd8c: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ] if ( mask & RTEMS_TIMESLICE_MASK ) { 200dd90: 80 8e 62 00 btst 0x200, %i1 200dd94: 02 80 00 0b be 200ddc0 200dd98: 80 8e 60 0f btst 0xf, %i1 if ( _Modes_Is_timeslice(mode_set) ) { 200dd9c: 80 8e 22 00 btst 0x200, %i0 200dda0: 22 80 00 07 be,a 200ddbc 200dda4: c0 24 20 7c clr [ %l0 + 0x7c ] executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200dda8: 03 00 80 6d sethi %hi(0x201b400), %g1 200ddac: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 201b568 <_Thread_Ticks_per_timeslice> 200ddb0: 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; 200ddb4: 82 10 20 01 mov 1, %g1 200ddb8: c2 24 20 7c st %g1, [ %l0 + 0x7c ] /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 200ddbc: 80 8e 60 0f btst 0xf, %i1 200ddc0: 12 80 00 2d bne 200de74 200ddc4: 01 00 00 00 nop */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 200ddc8: 80 8e 64 00 btst 0x400, %i1 200ddcc: 22 80 00 16 be,a 200de24 200ddd0: 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; 200ddd4: 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( 200ddd8: b1 36 20 0a srl %i0, 0xa, %i0 200dddc: b0 1e 20 01 xor %i0, 1, %i0 200dde0: 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; 200dde4: 80 a0 40 18 cmp %g1, %i0 200dde8: 22 80 00 0f be,a 200de24 200ddec: a0 10 20 00 clr %l0 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 200ddf0: 7f ff d1 2f call 20022ac 200ddf4: f0 2c 60 08 stb %i0, [ %l1 + 8 ] _signals = information->signals_pending; 200ddf8: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 information->signals_pending = information->signals_posted; 200ddfc: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 information->signals_posted = _signals; 200de00: 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; 200de04: c2 24 60 18 st %g1, [ %l1 + 0x18 ] information->signals_posted = _signals; _ISR_Enable( _level ); 200de08: 7f ff d1 2d call 20022bc 200de0c: 01 00 00 00 nop 200de10: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 200de14: 80 a0 60 00 cmp %g1, 0 200de18: 12 80 00 28 bne 200deb8 200de1c: 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; 200de20: a0 10 20 00 clr %l0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 200de24: 03 00 80 6d sethi %hi(0x201b400), %g1 200de28: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201b7b0 <_System_state_Current> 200de2c: 80 a0 60 03 cmp %g1, 3 200de30: 02 80 00 16 be 200de88 <== ALWAYS TAKEN 200de34: 82 10 20 00 clr %g1 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 200de38: 81 c7 e0 08 ret 200de3c: 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; 200de40: 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; 200de44: 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; 200de48: 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(); 200de4c: 7f ff f0 06 call 2009e64 <_CPU_ISR_Get_level> 200de50: 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; 200de54: 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; 200de58: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200de5c: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200de60: 80 8e 61 00 btst 0x100, %i1 200de64: 02 bf ff cb be 200dd90 200de68: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 200de6c: 10 bf ff c6 b 200dd84 200de70: 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 ) ); 200de74: 90 0e 20 0f and %i0, 0xf, %o0 200de78: 7f ff d1 11 call 20022bc 200de7c: 91 2a 20 08 sll %o0, 8, %o0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 200de80: 10 bf ff d3 b 200ddcc 200de84: 80 8e 64 00 btst 0x400, %i1 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 200de88: 40 00 00 c0 call 200e188 <_Thread_Evaluate_mode> 200de8c: 01 00 00 00 nop 200de90: 80 8a 20 ff btst 0xff, %o0 200de94: 12 80 00 04 bne 200dea4 200de98: 80 8c 20 ff btst 0xff, %l0 200de9c: 02 bf ff e7 be 200de38 200dea0: 82 10 20 00 clr %g1 _Thread_Dispatch(); 200dea4: 7f ff e8 b1 call 2008168 <_Thread_Dispatch> 200dea8: 01 00 00 00 nop 200deac: 82 10 20 00 clr %g1 ! 0 return RTEMS_SUCCESSFUL; } 200deb0: 81 c7 e0 08 ret 200deb4: 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; 200deb8: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 200debc: 10 bf ff da b 200de24 200dec0: a0 10 20 01 mov 1, %l0 =============================================================================== 0200b944 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 200b944: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 200b948: 80 a6 60 00 cmp %i1, 0 200b94c: 02 80 00 07 be 200b968 200b950: 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 ) && 200b954: 03 00 80 86 sethi %hi(0x2021800), %g1 200b958: c2 08 62 c4 ldub [ %g1 + 0x2c4 ], %g1 ! 2021ac4 200b95c: 80 a6 40 01 cmp %i1, %g1 200b960: 18 80 00 1c bgu 200b9d0 200b964: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 200b968: 80 a6 a0 00 cmp %i2, 0 200b96c: 02 80 00 19 be 200b9d0 200b970: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 200b974: 40 00 08 ad call 200dc28 <_Thread_Get> 200b978: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200b97c: c2 07 bf fc ld [ %fp + -4 ], %g1 200b980: 80 a0 60 00 cmp %g1, 0 200b984: 12 80 00 13 bne 200b9d0 200b988: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 200b98c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 200b990: 80 a6 60 00 cmp %i1, 0 200b994: 02 80 00 0d be 200b9c8 200b998: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b99c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200b9a0: 80 a0 60 00 cmp %g1, 0 200b9a4: 02 80 00 06 be 200b9bc 200b9a8: f2 22 20 18 st %i1, [ %o0 + 0x18 ] the_thread->current_priority > new_priority ) 200b9ac: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200b9b0: 80 a6 40 01 cmp %i1, %g1 200b9b4: 1a 80 00 05 bcc 200b9c8 <== ALWAYS TAKEN 200b9b8: 01 00 00 00 nop _Thread_Change_priority( the_thread, new_priority, false ); 200b9bc: 92 10 00 19 mov %i1, %o1 200b9c0: 40 00 06 d8 call 200d520 <_Thread_Change_priority> 200b9c4: 94 10 20 00 clr %o2 } _Thread_Enable_dispatch(); 200b9c8: 40 00 08 74 call 200db98 <_Thread_Enable_dispatch> 200b9cc: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200b9d0: 81 c7 e0 08 ret 200b9d4: 81 e8 00 00 restore =============================================================================== 02007814 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 2007814: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 2007818: 80 a6 60 00 cmp %i1, 0 200781c: 02 80 00 09 be 2007840 2007820: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 2007824: 90 10 00 18 mov %i0, %o0 2007828: 40 00 08 2b call 20098d4 <_Thread_Get> 200782c: 92 07 bf fc add %fp, -4, %o1 switch (location) { 2007830: c4 07 bf fc ld [ %fp + -4 ], %g2 2007834: 80 a0 a0 00 cmp %g2, 0 2007838: 02 80 00 04 be 2007848 200783c: 82 10 20 04 mov 4, %g1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007840: 81 c7 e0 08 ret 2007844: 91 e8 00 01 restore %g0, %g1, %o0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 2007848: d2 02 21 70 ld [ %o0 + 0x170 ], %o1 while (tvp) { 200784c: 80 a2 60 00 cmp %o1, 0 2007850: 02 80 00 10 be 2007890 2007854: 01 00 00 00 nop if (tvp->ptr == ptr) { 2007858: c2 02 60 04 ld [ %o1 + 4 ], %g1 200785c: 80 a0 40 19 cmp %g1, %i1 2007860: 12 80 00 08 bne 2007880 2007864: 84 10 00 09 mov %o1, %g2 if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 2007868: 10 80 00 17 b 20078c4 200786c: c2 02 40 00 ld [ %o1 ], %g1 switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 2007870: 80 a0 40 19 cmp %g1, %i1 2007874: 22 80 00 0c be,a 20078a4 2007878: 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; 200787c: 84 10 00 09 mov %o1, %g2 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 2007880: 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) { 2007884: 80 a2 60 00 cmp %o1, 0 2007888: 32 bf ff fa bne,a 2007870 <== ALWAYS TAKEN 200788c: c2 02 60 04 ld [ %o1 + 4 ], %g1 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 2007890: 40 00 08 03 call 200989c <_Thread_Enable_dispatch> 2007894: 01 00 00 00 nop 2007898: 82 10 20 09 mov 9, %g1 ! 9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200789c: 81 c7 e0 08 ret 20078a0: 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; 20078a4: 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 ); 20078a8: 40 00 00 2d call 200795c <_RTEMS_Tasks_Invoke_task_variable_dtor> 20078ac: 01 00 00 00 nop _Thread_Enable_dispatch(); 20078b0: 40 00 07 fb call 200989c <_Thread_Enable_dispatch> 20078b4: 01 00 00 00 nop 20078b8: 82 10 20 00 clr %g1 ! 0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20078bc: 81 c7 e0 08 ret 20078c0: 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; 20078c4: 10 bf ff f9 b 20078a8 20078c8: c2 22 21 70 st %g1, [ %o0 + 0x170 ] =============================================================================== 020078cc : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 20078cc: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 20078d0: 80 a6 60 00 cmp %i1, 0 20078d4: 02 80 00 1c be 2007944 20078d8: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( !result ) 20078dc: 02 80 00 1a be 2007944 20078e0: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 20078e4: 40 00 07 fc call 20098d4 <_Thread_Get> 20078e8: 92 07 bf fc add %fp, -4, %o1 switch (location) { 20078ec: c2 07 bf fc ld [ %fp + -4 ], %g1 20078f0: 80 a0 60 00 cmp %g1, 0 20078f4: 12 80 00 12 bne 200793c 20078f8: 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; 20078fc: c2 02 21 70 ld [ %o0 + 0x170 ], %g1 while (tvp) { 2007900: 80 a0 60 00 cmp %g1, 0 2007904: 32 80 00 07 bne,a 2007920 2007908: c4 00 60 04 ld [ %g1 + 4 ], %g2 200790c: 30 80 00 10 b,a 200794c 2007910: 80 a0 60 00 cmp %g1, 0 2007914: 02 80 00 0e be 200794c <== NEVER TAKEN 2007918: 01 00 00 00 nop if (tvp->ptr == ptr) { 200791c: c4 00 60 04 ld [ %g1 + 4 ], %g2 2007920: 80 a0 80 19 cmp %g2, %i1 2007924: 32 bf ff fb bne,a 2007910 2007928: 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; 200792c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 _Thread_Enable_dispatch(); 2007930: b0 10 20 00 clr %i0 2007934: 40 00 07 da call 200989c <_Thread_Enable_dispatch> 2007938: c2 26 80 00 st %g1, [ %i2 ] return RTEMS_SUCCESSFUL; 200793c: 81 c7 e0 08 ret 2007940: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007944: 81 c7 e0 08 ret 2007948: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 200794c: 40 00 07 d4 call 200989c <_Thread_Enable_dispatch> 2007950: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; 2007954: 81 c7 e0 08 ret 2007958: 81 e8 00 00 restore =============================================================================== 02015ee8 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 2015ee8: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 2015eec: 11 00 80 f3 sethi %hi(0x203cc00), %o0 2015ef0: 92 10 00 18 mov %i0, %o1 2015ef4: 90 12 23 94 or %o0, 0x394, %o0 2015ef8: 40 00 0b b2 call 2018dc0 <_Objects_Get> 2015efc: 94 07 bf fc add %fp, -4, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2015f00: c2 07 bf fc ld [ %fp + -4 ], %g1 2015f04: 80 a0 60 00 cmp %g1, 0 2015f08: 12 80 00 0a bne 2015f30 2015f0c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 2015f10: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2015f14: 80 a0 60 04 cmp %g1, 4 2015f18: 02 80 00 04 be 2015f28 <== NEVER TAKEN 2015f1c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_timer->Ticker ); 2015f20: 40 00 14 c2 call 201b228 <_Watchdog_Remove> 2015f24: 90 02 20 10 add %o0, 0x10, %o0 _Thread_Enable_dispatch(); 2015f28: 40 00 0e 51 call 201986c <_Thread_Enable_dispatch> 2015f2c: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2015f30: 81 c7 e0 08 ret 2015f34: 81 e8 00 00 restore =============================================================================== 020163f4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 20163f4: 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; 20163f8: 03 00 80 f3 sethi %hi(0x203cc00), %g1 20163fc: e0 00 63 d4 ld [ %g1 + 0x3d4 ], %l0 ! 203cfd4 <_Timer_server> rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 2016400: 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 ) 2016404: 80 a4 20 00 cmp %l0, 0 2016408: 02 80 00 34 be 20164d8 201640c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 2016410: 03 00 80 f3 sethi %hi(0x203cc00), %g1 2016414: c2 08 60 d4 ldub [ %g1 + 0xd4 ], %g1 ! 203ccd4 <_TOD_Is_set> 2016418: 80 a0 60 00 cmp %g1, 0 201641c: 02 80 00 2f be 20164d8 <== NEVER TAKEN 2016420: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !routine ) 2016424: 80 a6 a0 00 cmp %i2, 0 2016428: 02 80 00 2c be 20164d8 201642c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 2016430: 7f ff f3 d2 call 2013378 <_TOD_Validate> 2016434: 90 10 00 19 mov %i1, %o0 2016438: 80 8a 20 ff btst 0xff, %o0 201643c: 12 80 00 04 bne 201644c 2016440: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2016444: 81 c7 e0 08 ret 2016448: 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 ); 201644c: 7f ff f3 95 call 20132a0 <_TOD_To_seconds> 2016450: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch() ) 2016454: 25 00 80 f3 sethi %hi(0x203cc00), %l2 2016458: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1 ! 203cd54 <_TOD_Now> 201645c: 80 a2 00 01 cmp %o0, %g1 2016460: 08 bf ff f9 bleu 2016444 2016464: b2 10 00 08 mov %o0, %i1 2016468: 11 00 80 f3 sethi %hi(0x203cc00), %o0 201646c: 92 10 00 11 mov %l1, %o1 2016470: 90 12 23 94 or %o0, 0x394, %o0 2016474: 40 00 0a 53 call 2018dc0 <_Objects_Get> 2016478: 94 07 bf fc add %fp, -4, %o2 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 201647c: c2 07 bf fc ld [ %fp + -4 ], %g1 2016480: a6 10 00 08 mov %o0, %l3 2016484: 80 a0 60 00 cmp %g1, 0 2016488: 12 80 00 14 bne 20164d8 201648c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2016490: 40 00 13 66 call 201b228 <_Watchdog_Remove> 2016494: 90 02 20 10 add %o0, 0x10, %o0 the_watchdog->routine = routine; the_watchdog->id = id; 2016498: 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(); 201649c: c4 04 a1 54 ld [ %l2 + 0x154 ], %g2 (*timer_server->schedule_operation)( timer_server, the_timer ); 20164a0: c2 04 20 04 ld [ %l0 + 4 ], %g1 20164a4: 90 10 00 10 mov %l0, %o0 20164a8: 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(); 20164ac: 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; 20164b0: 84 10 20 03 mov 3, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20164b4: f4 24 e0 2c st %i2, [ %l3 + 0x2c ] 20164b8: c4 24 e0 38 st %g2, [ %l3 + 0x38 ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20164bc: 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(); 20164c0: f2 24 e0 1c st %i1, [ %l3 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20164c4: c0 24 e0 18 clr [ %l3 + 0x18 ] (*timer_server->schedule_operation)( timer_server, the_timer ); 20164c8: 9f c0 40 00 call %g1 20164cc: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 20164d0: 40 00 0c e7 call 201986c <_Thread_Enable_dispatch> 20164d4: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 20164d8: 81 c7 e0 08 ret 20164dc: 81 e8 00 00 restore