=============================================================================== 02016008 <_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 ) { 2016008: 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 ) { 201600c: 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 ) { 2016010: 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 ) { 2016014: 80 a6 80 01 cmp %i2, %g1 2016018: 18 80 00 17 bgu 2016074 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 201601c: 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 ) { 2016020: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2016024: 80 a0 60 00 cmp %g1, 0 2016028: 02 80 00 0a be 2016050 <_CORE_message_queue_Broadcast+0x48> 201602c: a2 10 20 00 clr %l1 *count = 0; 2016030: c0 27 40 00 clr [ %i5 ] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 2016034: 81 c7 e0 08 ret 2016038: 91 e8 20 00 restore %g0, 0, %o0 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 201603c: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 2016040: 40 00 23 21 call 201ecc4 2016044: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2016048: c2 04 a0 28 ld [ %l2 + 0x28 ], %g1 201604c: 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))) { 2016050: 40 00 0a 13 call 201889c <_Thread_queue_Dequeue> 2016054: 90 10 00 10 mov %l0, %o0 2016058: 92 10 00 19 mov %i1, %o1 201605c: a4 10 00 08 mov %o0, %l2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 2016060: 80 a2 20 00 cmp %o0, 0 2016064: 12 bf ff f6 bne 201603c <_CORE_message_queue_Broadcast+0x34> 2016068: 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; 201606c: e2 27 40 00 st %l1, [ %i5 ] 2016070: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 2016074: 81 c7 e0 08 ret 2016078: 81 e8 00 00 restore =============================================================================== 0200fb5c <_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 ) { 200fb5c: 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; 200fb60: 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; 200fb64: 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; 200fb68: 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)) { 200fb6c: 80 8e e0 03 btst 3, %i3 200fb70: 02 80 00 07 be 200fb8c <_CORE_message_queue_Initialize+0x30> 200fb74: a2 10 00 1b mov %i3, %l1 allocated_message_size += sizeof(uint32_t); 200fb78: a2 06 e0 04 add %i3, 4, %l1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 200fb7c: a2 0c 7f fc and %l1, -4, %l1 } if (allocated_message_size < maximum_message_size) 200fb80: 80 a4 40 1b cmp %l1, %i3 200fb84: 0a 80 00 23 bcs 200fc10 <_CORE_message_queue_Initialize+0xb4><== NEVER TAKEN 200fb88: 01 00 00 00 nop /* * 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)); 200fb8c: 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 * 200fb90: 92 10 00 1a mov %i2, %o1 200fb94: 40 00 4b 6e call 202294c <.umul> 200fb98: 90 10 00 10 mov %l0, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 200fb9c: 80 a2 00 11 cmp %o0, %l1 200fba0: 0a 80 00 1c bcs 200fc10 <_CORE_message_queue_Initialize+0xb4><== NEVER TAKEN 200fba4: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 200fba8: 40 00 0b b0 call 2012a68 <_Workspace_Allocate> 200fbac: 01 00 00 00 nop 200fbb0: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 200fbb4: 80 a2 20 00 cmp %o0, 0 200fbb8: 02 80 00 16 be 200fc10 <_CORE_message_queue_Initialize+0xb4> 200fbbc: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 200fbc0: 90 06 20 60 add %i0, 0x60, %o0 200fbc4: 94 10 00 1a mov %i2, %o2 200fbc8: 40 00 14 4a call 2014cf0 <_Chain_Initialize> 200fbcc: 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( 200fbd0: 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; 200fbd4: c0 26 20 54 clr [ %i0 + 0x54 ] 200fbd8: 82 18 60 01 xor %g1, 1, %g1 200fbdc: 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); 200fbe0: 82 06 20 54 add %i0, 0x54, %g1 200fbe4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200fbe8: 82 06 20 50 add %i0, 0x50, %g1 200fbec: 90 10 00 18 mov %i0, %o0 200fbf0: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 200fbf4: 92 60 3f ff subx %g0, -1, %o1 200fbf8: 94 10 20 80 mov 0x80, %o2 200fbfc: 96 10 20 06 mov 6, %o3 200fc00: 40 00 08 87 call 2011e1c <_Thread_queue_Initialize> 200fc04: 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; 200fc08: 81 c7 e0 08 ret 200fc0c: 81 e8 00 00 restore } 200fc10: 81 c7 e0 08 ret 200fc14: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200fc18 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 200fc18: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 200fc1c: 23 00 80 a4 sethi %hi(0x2029000), %l1 200fc20: e0 04 63 20 ld [ %l1 + 0x320 ], %l0 ! 2029320 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 200fc24: a4 10 00 19 mov %i1, %l2 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 200fc28: 7f ff de d7 call 2007784 200fc2c: c0 24 20 34 clr [ %l0 + 0x34 ] 200fc30: 82 10 00 08 mov %o0, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200fc34: e6 06 20 50 ld [ %i0 + 0x50 ], %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200fc38: 84 06 20 54 add %i0, 0x54, %g2 200fc3c: 80 a4 c0 02 cmp %l3, %g2 200fc40: 02 80 00 15 be 200fc94 <_CORE_message_queue_Seize+0x7c> 200fc44: 86 06 20 50 add %i0, 0x50, %g3 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 200fc48: c4 04 c0 00 ld [ %l3 ], %g2 the_chain->first = new_first; 200fc4c: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 200fc50: 80 a4 e0 00 cmp %l3, 0 200fc54: 02 80 00 10 be 200fc94 <_CORE_message_queue_Seize+0x7c> <== NEVER TAKEN 200fc58: c6 20 a0 04 st %g3, [ %g2 + 4 ] the_message_queue->number_of_pending_messages -= 1; 200fc5c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200fc60: 82 00 7f ff add %g1, -1, %g1 200fc64: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 200fc68: 7f ff de cb call 2007794 200fc6c: b0 06 20 60 add %i0, 0x60, %i0 *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 200fc70: c2 04 63 20 ld [ %l1 + 0x320 ], %g1 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 200fc74: d4 04 e0 08 ld [ %l3 + 8 ], %o2 _Thread_Executing->Wait.count = 200fc78: c0 20 60 24 clr [ %g1 + 0x24 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 200fc7c: d4 26 c0 00 st %o2, [ %i3 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 200fc80: 90 10 00 1a mov %i2, %o0 200fc84: 40 00 1f 16 call 20178dc 200fc88: 92 04 e0 0c add %l3, 0xc, %o1 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 200fc8c: 7f ff ff 83 call 200fa98 <_Chain_Append> 200fc90: 93 e8 00 13 restore %g0, %l3, %o1 return; } #endif } if ( !wait ) { 200fc94: 80 8f 20 ff btst 0xff, %i4 200fc98: 12 80 00 08 bne 200fcb8 <_CORE_message_queue_Seize+0xa0> 200fc9c: 84 10 20 01 mov 1, %g2 _ISR_Enable( level ); 200fca0: 7f ff de bd call 2007794 200fca4: 90 10 00 01 mov %g1, %o0 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 200fca8: 82 10 20 04 mov 4, %g1 200fcac: c2 24 20 34 st %g1, [ %l0 + 0x34 ] executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 200fcb0: 81 c7 e0 08 ret 200fcb4: 81 e8 00 00 restore 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; 200fcb8: c4 26 20 30 st %g2, [ %i0 + 0x30 ] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 200fcbc: f6 24 20 28 st %i3, [ %l0 + 0x28 ] return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 200fcc0: e4 24 20 20 st %l2, [ %l0 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 200fcc4: f4 24 20 2c st %i2, [ %l0 + 0x2c ] executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 200fcc8: f0 24 20 44 st %i0, [ %l0 + 0x44 ] executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 200fccc: 90 10 00 01 mov %g1, %o0 200fcd0: 7f ff de b1 call 2007794 200fcd4: 35 00 80 47 sethi %hi(0x2011c00), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 200fcd8: b2 10 00 1d mov %i5, %i1 200fcdc: 40 00 07 ab call 2011b88 <_Thread_queue_Enqueue_with_handler> 200fce0: 95 ee a2 e8 restore %i2, 0x2e8, %o2 =============================================================================== 02006568 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 2006568: 9d e3 bf a0 save %sp, -96, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 200656c: 03 00 80 69 sethi %hi(0x201a400), %g1 2006570: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201a7b0 <_Thread_Dispatch_disable_level> 2006574: 80 a0 60 00 cmp %g1, 0 2006578: 02 80 00 0d be 20065ac <_CORE_mutex_Seize+0x44> 200657c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2006580: 80 8e a0 ff btst 0xff, %i2 2006584: 02 80 00 0b be 20065b0 <_CORE_mutex_Seize+0x48> <== NEVER TAKEN 2006588: 90 10 00 18 mov %i0, %o0 200658c: 03 00 80 6a sethi %hi(0x201a800), %g1 2006590: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 201a950 <_System_state_Current> 2006594: 80 a0 60 01 cmp %g1, 1 2006598: 08 80 00 05 bleu 20065ac <_CORE_mutex_Seize+0x44> 200659c: 90 10 20 00 clr %o0 20065a0: 92 10 20 00 clr %o1 20065a4: 40 00 01 b4 call 2006c74 <_Internal_error_Occurred> 20065a8: 94 10 20 13 mov 0x13, %o2 20065ac: 90 10 00 18 mov %i0, %o0 20065b0: 40 00 13 f8 call 200b590 <_CORE_mutex_Seize_interrupt_trylock> 20065b4: 92 07 a0 54 add %fp, 0x54, %o1 20065b8: 80 a2 20 00 cmp %o0, 0 20065bc: 02 80 00 09 be 20065e0 <_CORE_mutex_Seize+0x78> 20065c0: 80 8e a0 ff btst 0xff, %i2 20065c4: 12 80 00 09 bne 20065e8 <_CORE_mutex_Seize+0x80> 20065c8: 35 00 80 6a sethi %hi(0x201a800), %i2 20065cc: 7f ff ee fd call 20021c0 20065d0: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 20065d4: c2 06 a0 70 ld [ %i2 + 0x70 ], %g1 20065d8: 84 10 20 01 mov 1, %g2 20065dc: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 20065e0: 81 c7 e0 08 ret 20065e4: 81 e8 00 00 restore 20065e8: c4 06 a0 70 ld [ %i2 + 0x70 ], %g2 20065ec: 03 00 80 69 sethi %hi(0x201a400), %g1 20065f0: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 ! 201a7b0 <_Thread_Dispatch_disable_level> 20065f4: f2 20 a0 20 st %i1, [ %g2 + 0x20 ] 20065f8: f0 20 a0 44 st %i0, [ %g2 + 0x44 ] 20065fc: 84 00 e0 01 add %g3, 1, %g2 2006600: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 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; 2006604: 82 10 20 01 mov 1, %g1 2006608: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 200660c: 7f ff ee ed call 20021c0 2006610: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006614: 90 10 00 18 mov %i0, %o0 2006618: 7f ff ff bb call 2006504 <_CORE_mutex_Seize_interrupt_blocking> 200661c: 92 10 00 1b mov %i3, %o1 2006620: 81 c7 e0 08 ret 2006624: 81 e8 00 00 restore =============================================================================== 0200b590 <_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 ) { 200b590: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 200b594: 03 00 80 6a sethi %hi(0x201a800), %g1 200b598: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201a870 <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200b59c: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200b5a0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 200b5a4: 80 a0 a0 00 cmp %g2, 0 200b5a8: 22 80 00 31 be,a 200b66c <_CORE_mutex_Seize_interrupt_trylock+0xdc> 200b5ac: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 200b5b0: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200b5b4: 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; 200b5b8: 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; 200b5bc: 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; 200b5c0: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200b5c4: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200b5c8: 80 a0 a0 02 cmp %g2, 2 200b5cc: 02 80 00 05 be 200b5e0 <_CORE_mutex_Seize_interrupt_trylock+0x50> 200b5d0: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 200b5d4: 80 a0 a0 03 cmp %g2, 3 200b5d8: 12 80 00 07 bne 200b5f4 <_CORE_mutex_Seize_interrupt_trylock+0x64> 200b5dc: 01 00 00 00 nop _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 200b5e0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b5e4: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 200b5e8: 84 00 e0 01 add %g3, 1, %g2 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b5ec: 02 80 00 03 be 200b5f8 <_CORE_mutex_Seize_interrupt_trylock+0x68> 200b5f0: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 200b5f4: 30 80 00 2d b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200b5f8: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 200b5fc: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 if ( current == ceiling ) { 200b600: 80 a0 c0 02 cmp %g3, %g2 200b604: 12 80 00 03 bne 200b610 <_CORE_mutex_Seize_interrupt_trylock+0x80> 200b608: 01 00 00 00 nop _ISR_Enable( *level_p ); 200b60c: 30 80 00 27 b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 200b610: 08 80 00 0f bleu 200b64c <_CORE_mutex_Seize_interrupt_trylock+0xbc> 200b614: 84 10 20 06 mov 6, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200b618: 03 00 80 69 sethi %hi(0x201a400), %g1 200b61c: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201a7b0 <_Thread_Dispatch_disable_level> 200b620: 84 00 a0 01 inc %g2 200b624: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 200b628: 7f ff da e6 call 20021c0 200b62c: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 200b630: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200b634: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200b638: 7f ff ef cd call 200756c <_Thread_Change_priority> 200b63c: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 200b640: 7f ff f1 56 call 2007b98 <_Thread_Enable_dispatch> 200b644: b0 10 20 00 clr %i0 200b648: 30 80 00 1b b,a 200b6b4 <_CORE_mutex_Seize_interrupt_trylock+0x124> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200b64c: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 200b650: 84 10 20 01 mov 1, %g2 the_mutex->nest_count = 0; /* undo locking above */ 200b654: c0 26 20 54 clr [ %i0 + 0x54 ] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 200b658: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200b65c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 200b660: 84 00 bf ff add %g2, -1, %g2 200b664: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 200b668: 30 80 00 10 b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118> /* * 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 ) ) { 200b66c: 80 a0 80 01 cmp %g2, %g1 200b670: 12 80 00 13 bne 200b6bc <_CORE_mutex_Seize_interrupt_trylock+0x12c> 200b674: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 200b678: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200b67c: 80 a0 60 00 cmp %g1, 0 200b680: 22 80 00 07 be,a 200b69c <_CORE_mutex_Seize_interrupt_trylock+0x10c> 200b684: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200b688: 80 a0 60 01 cmp %g1, 1 200b68c: 12 80 00 0c bne 200b6bc <_CORE_mutex_Seize_interrupt_trylock+0x12c><== ALWAYS TAKEN 200b690: 82 10 20 02 mov 2, %g1 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; 200b694: 10 80 00 05 b 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118><== NOT EXECUTED 200b698: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 200b69c: 82 00 60 01 inc %g1 200b6a0: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 200b6a4: 30 80 00 01 b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 200b6a8: 7f ff da c6 call 20021c0 200b6ac: d0 06 40 00 ld [ %i1 ], %o0 200b6b0: b0 10 20 00 clr %i0 200b6b4: 81 c7 e0 08 ret 200b6b8: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200b6bc: 81 c7 e0 08 ret 200b6c0: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 020067cc <_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 ) { 20067cc: 9d e3 bf a0 save %sp, -96, %sp 20067d0: 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)) ) { 20067d4: b0 10 20 00 clr %i0 20067d8: 40 00 05 e6 call 2007f70 <_Thread_queue_Dequeue> 20067dc: 90 10 00 10 mov %l0, %o0 20067e0: 80 a2 20 00 cmp %o0, 0 20067e4: 12 80 00 0e bne 200681c <_CORE_semaphore_Surrender+0x50> 20067e8: 01 00 00 00 nop if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 20067ec: 7f ff ee 71 call 20021b0 20067f0: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 20067f4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 20067f8: c4 04 20 40 ld [ %l0 + 0x40 ], %g2 20067fc: 80 a0 40 02 cmp %g1, %g2 2006800: 1a 80 00 05 bcc 2006814 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN 2006804: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2006808: 82 00 60 01 inc %g1 200680c: b0 10 20 00 clr %i0 2006810: c2 24 20 48 st %g1, [ %l0 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2006814: 7f ff ee 6b call 20021c0 2006818: 01 00 00 00 nop } return status; } 200681c: 81 c7 e0 08 ret 2006820: 81 e8 00 00 restore =============================================================================== 02005464 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 2005464: 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; 2005468: 03 00 80 6a sethi %hi(0x201a800), %g1 200546c: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 201a870 <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 2005470: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 2005474: 7f ff f3 4f call 20021b0 2005478: e4 04 21 60 ld [ %l0 + 0x160 ], %l2 pending_events = api->pending_events; 200547c: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 2005480: a2 8e 00 01 andcc %i0, %g1, %l1 2005484: 02 80 00 0e be 20054bc <_Event_Seize+0x58> 2005488: 80 8e 60 01 btst 1, %i1 200548c: 80 a4 40 18 cmp %l1, %i0 2005490: 02 80 00 04 be 20054a0 <_Event_Seize+0x3c> 2005494: 80 8e 60 02 btst 2, %i1 2005498: 02 80 00 09 be 20054bc <_Event_Seize+0x58> <== NEVER TAKEN 200549c: 80 8e 60 01 btst 1, %i1 (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 20054a0: 82 28 40 11 andn %g1, %l1, %g1 20054a4: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 20054a8: 7f ff f3 46 call 20021c0 20054ac: 01 00 00 00 nop 20054b0: e2 26 c0 00 st %l1, [ %i3 ] 20054b4: 81 c7 e0 08 ret 20054b8: 81 e8 00 00 restore *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 20054bc: 22 80 00 09 be,a 20054e0 <_Event_Seize+0x7c> 20054c0: f2 24 20 30 st %i1, [ %l0 + 0x30 ] _ISR_Enable( level ); 20054c4: 7f ff f3 3f call 20021c0 20054c8: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 20054cc: 82 10 20 0d mov 0xd, %g1 ! d 20054d0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 20054d4: e2 26 c0 00 st %l1, [ %i3 ] 20054d8: 81 c7 e0 08 ret 20054dc: 81 e8 00 00 restore * * 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; executing->Wait.count = (uint32_t) event_in; 20054e0: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 20054e4: f6 24 20 28 st %i3, [ %l0 + 0x28 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 20054e8: 84 10 20 01 mov 1, %g2 20054ec: 03 00 80 6a sethi %hi(0x201a800), %g1 20054f0: c4 20 62 38 st %g2, [ %g1 + 0x238 ] ! 201aa38 <_Event_Sync_state> _ISR_Enable( level ); 20054f4: 7f ff f3 33 call 20021c0 20054f8: 01 00 00 00 nop if ( ticks ) { 20054fc: 80 a6 a0 00 cmp %i2, 0 2005500: 02 80 00 0f be 200553c <_Event_Seize+0xd8> 2005504: 90 10 00 10 mov %l0, %o0 _Watchdog_Initialize( 2005508: c2 04 20 08 ld [ %l0 + 8 ], %g1 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200550c: 11 00 80 6a sethi %hi(0x201a800), %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2005510: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005514: 03 00 80 15 sethi %hi(0x2005400), %g1 2005518: 82 10 63 10 or %g1, 0x310, %g1 ! 2005710 <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200551c: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005520: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2005524: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005528: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200552c: 90 12 20 90 or %o0, 0x90, %o0 2005530: 40 00 0d ed call 2008ce4 <_Watchdog_Insert> 2005534: 92 04 20 48 add %l0, 0x48, %o1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2005538: 90 10 00 10 mov %l0, %o0 200553c: 40 00 0b f2 call 2008504 <_Thread_Set_state> 2005540: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 2005544: 7f ff f3 1b call 20021b0 2005548: 01 00 00 00 nop sync_state = _Event_Sync_state; 200554c: 03 00 80 6a sethi %hi(0x201a800), %g1 2005550: f0 00 62 38 ld [ %g1 + 0x238 ], %i0 ! 201aa38 <_Event_Sync_state> _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 2005554: c0 20 62 38 clr [ %g1 + 0x238 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 2005558: 80 a6 20 01 cmp %i0, 1 200555c: 12 80 00 04 bne 200556c <_Event_Seize+0x108> 2005560: b2 10 00 10 mov %l0, %i1 _ISR_Enable( level ); 2005564: 7f ff f3 17 call 20021c0 2005568: 91 e8 00 08 restore %g0, %o0, %o0 * 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 ); 200556c: 40 00 07 eb call 2007518 <_Thread_blocking_operation_Cancel> 2005570: 95 e8 00 08 restore %g0, %o0, %o2 =============================================================================== 020055d0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 20055d0: 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 ]; 20055d4: e2 06 21 60 ld [ %i0 + 0x160 ], %l1 option_set = (rtems_option) the_thread->Wait.option; 20055d8: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 _ISR_Disable( level ); 20055dc: 7f ff f2 f5 call 20021b0 20055e0: a0 10 00 18 mov %i0, %l0 20055e4: b0 10 00 08 mov %o0, %i0 pending_events = api->pending_events; 20055e8: c4 04 40 00 ld [ %l1 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 20055ec: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 20055f0: 82 88 c0 02 andcc %g3, %g2, %g1 20055f4: 12 80 00 03 bne 2005600 <_Event_Surrender+0x30> 20055f8: 09 00 80 6a sethi %hi(0x201a800), %g4 _ISR_Enable( level ); 20055fc: 30 80 00 42 b,a 2005704 <_Event_Surrender+0x134> /* * 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() && 2005600: c8 01 20 4c ld [ %g4 + 0x4c ], %g4 ! 201a84c <_ISR_Nest_level> 2005604: 80 a1 20 00 cmp %g4, 0 2005608: 22 80 00 1e be,a 2005680 <_Event_Surrender+0xb0> 200560c: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 2005610: 09 00 80 6a sethi %hi(0x201a800), %g4 2005614: c8 01 20 70 ld [ %g4 + 0x70 ], %g4 ! 201a870 <_Thread_Executing> 2005618: 80 a4 00 04 cmp %l0, %g4 200561c: 32 80 00 19 bne,a 2005680 <_Event_Surrender+0xb0> 2005620: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2005624: 09 00 80 6a sethi %hi(0x201a800), %g4 2005628: da 01 22 38 ld [ %g4 + 0x238 ], %o5 ! 201aa38 <_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() && 200562c: 80 a3 60 02 cmp %o5, 2 2005630: 02 80 00 07 be 200564c <_Event_Surrender+0x7c> <== NEVER TAKEN 2005634: 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)) ) { 2005638: c8 01 22 38 ld [ %g4 + 0x238 ], %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() && 200563c: 80 a1 20 01 cmp %g4, 1 2005640: 32 80 00 10 bne,a 2005680 <_Event_Surrender+0xb0> 2005644: c8 04 20 10 ld [ %l0 + 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) ) { 2005648: 80 a0 40 03 cmp %g1, %g3 200564c: 02 80 00 04 be 200565c <_Event_Surrender+0x8c> 2005650: 80 8c a0 02 btst 2, %l2 2005654: 02 80 00 0a be 200567c <_Event_Surrender+0xac> <== NEVER TAKEN 2005658: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 200565c: 84 28 80 01 andn %g2, %g1, %g2 2005660: c4 24 40 00 st %g2, [ %l1 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005664: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 _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 ); the_thread->Wait.count = 0; 2005668: c0 24 20 24 clr [ %l0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 200566c: c2 20 80 00 st %g1, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005670: 84 10 20 03 mov 3, %g2 2005674: 03 00 80 6a sethi %hi(0x201a800), %g1 2005678: c4 20 62 38 st %g2, [ %g1 + 0x238 ] ! 201aa38 <_Event_Sync_state> } _ISR_Enable( level ); 200567c: 30 80 00 22 b,a 2005704 <_Event_Surrender+0x134> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005680: 80 89 21 00 btst 0x100, %g4 2005684: 02 80 00 20 be 2005704 <_Event_Surrender+0x134> 2005688: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 200568c: 02 80 00 04 be 200569c <_Event_Surrender+0xcc> 2005690: 80 8c a0 02 btst 2, %l2 2005694: 02 80 00 1c be 2005704 <_Event_Surrender+0x134> <== NEVER TAKEN 2005698: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 200569c: 84 28 80 01 andn %g2, %g1, %g2 20056a0: c4 24 40 00 st %g2, [ %l1 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20056a4: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 20056a8: c0 24 20 24 clr [ %l0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20056ac: c2 20 80 00 st %g1, [ %g2 ] _ISR_Flash( level ); 20056b0: 7f ff f2 c4 call 20021c0 20056b4: 90 10 00 18 mov %i0, %o0 20056b8: 7f ff f2 be call 20021b0 20056bc: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 20056c0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 20056c4: 80 a0 60 02 cmp %g1, 2 20056c8: 02 80 00 06 be 20056e0 <_Event_Surrender+0x110> 20056cc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 20056d0: 7f ff f2 bc call 20021c0 20056d4: 90 10 00 18 mov %i0, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20056d8: 10 80 00 08 b 20056f8 <_Event_Surrender+0x128> 20056dc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 20056e0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 20056e4: 7f ff f2 b7 call 20021c0 20056e8: 90 10 00 18 mov %i0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 20056ec: 40 00 0d db call 2008e58 <_Watchdog_Remove> 20056f0: 90 04 20 48 add %l0, 0x48, %o0 20056f4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 20056f8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 20056fc: 40 00 08 15 call 2007750 <_Thread_Clear_state> 2005700: 91 e8 00 10 restore %g0, %l0, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2005704: 7f ff f2 af call 20021c0 2005708: 81 e8 00 00 restore =============================================================================== 02005710 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2005710: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2005714: 90 10 00 18 mov %i0, %o0 2005718: 40 00 09 2d call 2007bcc <_Thread_Get> 200571c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2005720: c2 07 bf fc ld [ %fp + -4 ], %g1 2005724: 80 a0 60 00 cmp %g1, 0 2005728: 12 80 00 1c bne 2005798 <_Event_Timeout+0x88> <== NEVER TAKEN 200572c: 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 ); 2005730: 7f ff f2 a0 call 20021b0 2005734: 01 00 00 00 nop return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005738: 03 00 80 6a sethi %hi(0x201a800), %g1 200573c: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201a870 <_Thread_Executing> 2005740: 80 a4 00 01 cmp %l0, %g1 2005744: 12 80 00 09 bne 2005768 <_Event_Timeout+0x58> 2005748: c0 24 20 24 clr [ %l0 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 200574c: 03 00 80 6a sethi %hi(0x201a800), %g1 2005750: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 ! 201aa38 <_Event_Sync_state> 2005754: 80 a0 a0 01 cmp %g2, 1 2005758: 32 80 00 05 bne,a 200576c <_Event_Timeout+0x5c> 200575c: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005760: 84 10 20 02 mov 2, %g2 2005764: c4 20 62 38 st %g2, [ %g1 + 0x238 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005768: 82 10 20 06 mov 6, %g1 200576c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] _ISR_Enable( level ); 2005770: 7f ff f2 94 call 20021c0 2005774: 01 00 00 00 nop 2005778: 90 10 00 10 mov %l0, %o0 200577c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005780: 40 00 07 f4 call 2007750 <_Thread_Clear_state> 2005784: 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; 2005788: 03 00 80 69 sethi %hi(0x201a400), %g1 200578c: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201a7b0 <_Thread_Dispatch_disable_level> 2005790: 84 00 bf ff add %g2, -1, %g2 2005794: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 2005798: 81 c7 e0 08 ret 200579c: 81 e8 00 00 restore =============================================================================== 0200b7bc <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200b7bc: 9d e3 bf 90 save %sp, -112, %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; 200b7c0: ac 06 60 04 add %i1, 4, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200b7c4: e4 06 20 08 ld [ %i0 + 8 ], %l2 uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 200b7c8: 80 a5 80 19 cmp %l6, %i1 200b7cc: 0a 80 00 6d bcs 200b980 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200b7d0: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200b7d4: 80 a6 e0 00 cmp %i3, 0 200b7d8: 02 80 00 08 be 200b7f8 <_Heap_Allocate_aligned_with_boundary+0x3c> 200b7dc: 82 10 20 04 mov 4, %g1 if ( boundary < alloc_size ) { 200b7e0: 80 a6 c0 19 cmp %i3, %i1 200b7e4: 0a 80 00 67 bcs 200b980 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200b7e8: 80 a6 a0 00 cmp %i2, 0 return NULL; } if ( alignment == 0 ) { 200b7ec: 22 80 00 03 be,a 200b7f8 <_Heap_Allocate_aligned_with_boundary+0x3c> 200b7f0: b4 10 00 14 mov %l4, %i2 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; 200b7f4: 82 10 20 04 mov 4, %g1 200b7f8: 82 20 40 19 sub %g1, %i1, %g1 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200b7fc: 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; 200b800: c2 27 bf f4 st %g1, [ %fp + -12 ] /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 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; 200b804: b8 10 3f f8 mov -8, %i4 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; 200b808: 82 05 20 07 add %l4, 7, %g1 200b80c: 10 80 00 4b b 200b938 <_Heap_Allocate_aligned_with_boundary+0x17c> 200b810: c2 27 bf f8 st %g1, [ %fp + -8 ] /* * 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 ) { 200b814: 80 a4 c0 16 cmp %l3, %l6 200b818: 08 80 00 47 bleu 200b934 <_Heap_Allocate_aligned_with_boundary+0x178> 200b81c: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200b820: 80 a6 a0 00 cmp %i2, 0 200b824: 12 80 00 04 bne 200b834 <_Heap_Allocate_aligned_with_boundary+0x78> 200b828: aa 04 a0 08 add %l2, 8, %l5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 200b82c: 10 80 00 3f b 200b928 <_Heap_Allocate_aligned_with_boundary+0x16c> 200b830: a0 10 00 15 mov %l5, %l0 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; 200b834: c4 07 bf f4 ld [ %fp + -12 ], %g2 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 200b838: ee 06 20 14 ld [ %i0 + 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; 200b83c: a6 0c ff fe and %l3, -2, %l3 200b840: 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; 200b844: a0 00 80 13 add %g2, %l3, %l0 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; 200b848: c4 07 bf f8 ld [ %fp + -8 ], %g2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200b84c: 90 10 00 10 mov %l0, %o0 200b850: 82 20 80 17 sub %g2, %l7, %g1 200b854: 92 10 00 1a mov %i2, %o1 200b858: 40 00 2e a4 call 20172e8 <.urem> 200b85c: a6 00 40 13 add %g1, %l3, %l3 200b860: a0 24 00 08 sub %l0, %o0, %l0 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 ) { 200b864: 80 a4 00 13 cmp %l0, %l3 200b868: 08 80 00 07 bleu 200b884 <_Heap_Allocate_aligned_with_boundary+0xc8> 200b86c: 80 a6 e0 00 cmp %i3, 0 200b870: 90 10 00 13 mov %l3, %o0 200b874: 40 00 2e 9d call 20172e8 <.urem> 200b878: 92 10 00 1a mov %i2, %o1 200b87c: a0 24 c0 08 sub %l3, %o0, %l0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200b880: 80 a6 e0 00 cmp %i3, 0 200b884: 02 80 00 1d be 200b8f8 <_Heap_Allocate_aligned_with_boundary+0x13c> 200b888: 80 a4 00 15 cmp %l0, %l5 /* 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; 200b88c: a6 04 00 19 add %l0, %i1, %l3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 200b890: 82 05 40 19 add %l5, %i1, %g1 200b894: 92 10 00 1b mov %i3, %o1 200b898: 90 10 00 13 mov %l3, %o0 200b89c: 10 80 00 0b b 200b8c8 <_Heap_Allocate_aligned_with_boundary+0x10c> 200b8a0: c2 27 bf fc st %g1, [ %fp + -4 ] uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 200b8a4: 80 a0 40 02 cmp %g1, %g2 200b8a8: 2a 80 00 24 bcs,a 200b938 <_Heap_Allocate_aligned_with_boundary+0x17c> 200b8ac: e4 04 a0 08 ld [ %l2 + 8 ], %l2 200b8b0: 40 00 2e 8e call 20172e8 <.urem> 200b8b4: 01 00 00 00 nop 200b8b8: 92 10 00 1b mov %i3, %o1 200b8bc: a0 27 40 08 sub %i5, %o0, %l0 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200b8c0: a6 04 00 19 add %l0, %i1, %l3 200b8c4: 90 10 00 13 mov %l3, %o0 200b8c8: 40 00 2e 88 call 20172e8 <.urem> 200b8cc: 01 00 00 00 nop 200b8d0: 92 10 00 1a mov %i2, %o1 200b8d4: 82 24 c0 08 sub %l3, %o0, %g1 while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; 200b8d8: ba 20 40 19 sub %g1, %i1, %i5 /* 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 ) { 200b8dc: 80 a0 40 13 cmp %g1, %l3 200b8e0: 1a 80 00 05 bcc 200b8f4 <_Heap_Allocate_aligned_with_boundary+0x138> 200b8e4: 90 10 00 1d mov %i5, %o0 200b8e8: 80 a4 00 01 cmp %l0, %g1 200b8ec: 0a bf ff ee bcs 200b8a4 <_Heap_Allocate_aligned_with_boundary+0xe8> 200b8f0: c4 07 bf fc ld [ %fp + -4 ], %g2 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 ) { 200b8f4: 80 a4 00 15 cmp %l0, %l5 200b8f8: 0a 80 00 0f bcs 200b934 <_Heap_Allocate_aligned_with_boundary+0x178> 200b8fc: a6 27 00 12 sub %i4, %l2, %l3 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; 200b900: 90 10 00 10 mov %l0, %o0 200b904: a6 04 c0 10 add %l3, %l0, %l3 200b908: 40 00 2e 78 call 20172e8 <.urem> 200b90c: 92 10 00 14 mov %l4, %o1 if ( free_size >= min_block_size || free_size == 0 ) { 200b910: 90 a4 c0 08 subcc %l3, %o0, %o0 200b914: 02 80 00 06 be 200b92c <_Heap_Allocate_aligned_with_boundary+0x170> 200b918: 80 a4 20 00 cmp %l0, 0 200b91c: 80 a2 00 17 cmp %o0, %l7 200b920: 2a 80 00 06 bcs,a 200b938 <_Heap_Allocate_aligned_with_boundary+0x17c> 200b924: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 200b928: 80 a4 20 00 cmp %l0, 0 200b92c: 32 80 00 08 bne,a 200b94c <_Heap_Allocate_aligned_with_boundary+0x190><== ALWAYS TAKEN 200b930: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 break; } block = block->next; 200b934: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200b938: 80 a4 80 18 cmp %l2, %i0 200b93c: 32 bf ff b6 bne,a 200b814 <_Heap_Allocate_aligned_with_boundary+0x58> 200b940: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200b944: 10 80 00 09 b 200b968 <_Heap_Allocate_aligned_with_boundary+0x1ac> 200b948: a0 10 20 00 clr %l0 if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200b94c: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200b950: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200b954: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200b958: c2 26 20 4c st %g1, [ %i0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200b95c: 90 10 00 18 mov %i0, %o0 200b960: 7f ff ec 74 call 2006b30 <_Heap_Block_allocate> 200b964: 94 10 00 10 mov %l0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200b968: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 200b96c: 80 a0 40 11 cmp %g1, %l1 200b970: 2a 80 00 02 bcs,a 200b978 <_Heap_Allocate_aligned_with_boundary+0x1bc> 200b974: e2 26 20 44 st %l1, [ %i0 + 0x44 ] /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; 200b978: 81 c7 e0 08 ret 200b97c: 91 e8 00 10 restore %g0, %l0, %o0 } 200b980: 81 c7 e0 08 ret 200b984: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0201008c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 201008c: 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; 2010090: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2010094: 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 ) { 2010098: 80 a6 40 01 cmp %i1, %g1 201009c: 1a 80 00 07 bcc 20100b8 <_Heap_Extend+0x2c> 20100a0: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 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; 20100a4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 20100a8: 80 a6 40 02 cmp %i1, %g2 20100ac: 1a 80 00 28 bcc 201014c <_Heap_Extend+0xc0> 20100b0: b0 10 20 01 mov 1, %i0 * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 20100b4: 80 a6 40 01 cmp %i1, %g1 20100b8: 12 80 00 25 bne 201014c <_Heap_Extend+0xc0> 20100bc: 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); 20100c0: 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; 20100c4: 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 20100c8: 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; 20100cc: f4 24 20 1c st %i2, [ %l0 + 0x1c ] extend_size = new_heap_area_end 20100d0: b2 06 7f f8 add %i1, -8, %i1 20100d4: 7f ff d0 1f call 2004150 <.urem> 20100d8: 90 10 00 19 mov %i1, %o0 20100dc: 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; 20100e0: d0 26 c0 00 st %o0, [ %i3 ] if( extend_size >= heap->min_block_size ) { 20100e4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 20100e8: 80 a2 00 01 cmp %o0, %g1 20100ec: 0a 80 00 18 bcs 201014c <_Heap_Extend+0xc0> <== NEVER TAKEN 20100f0: 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; 20100f4: 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 = 20100f8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 20100fc: 82 08 60 01 and %g1, 1, %g1 2010100: 82 12 00 01 or %o0, %g1, %g1 2010104: 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); 2010108: 82 02 00 11 add %o0, %l1, %g1 201010c: 84 20 80 01 sub %g2, %g1, %g2 2010110: 84 10 a0 01 or %g2, 1, %g2 2010114: c4 20 60 04 st %g2, [ %g1 + 4 ] heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2010118: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 201011c: f2 04 20 2c ld [ %l0 + 0x2c ], %i1 ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 2010120: 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; 2010124: c2 24 20 24 st %g1, [ %l0 + 0x24 ] /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2010128: 82 00 e0 01 add %g3, 1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 201012c: 90 06 40 08 add %i1, %o0, %o0 ++stats->used_blocks; 2010130: c2 24 20 40 st %g1, [ %l0 + 0x40 ] --stats->frees; /* Do not count subsequent call as actual free() */ 2010134: 82 00 bf ff add %g2, -1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2010138: d0 24 20 2c st %o0, [ %l0 + 0x2c ] ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 201013c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 2010140: 90 10 00 10 mov %l0, %o0 2010144: 7f ff ea 06 call 200a95c <_Heap_Free> 2010148: 92 04 60 08 add %l1, 8, %o1 } return HEAP_EXTEND_SUCCESSFUL; } 201014c: 81 c7 e0 08 ret 2010150: 81 e8 00 00 restore =============================================================================== 0200b988 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200b988: 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 ) 200b98c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200b990: 40 00 2e 56 call 20172e8 <.urem> 200b994: 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; 200b998: 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 ) 200b99c: b2 06 7f f8 add %i1, -8, %i1 200b9a0: 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 200b9a4: 80 a2 00 01 cmp %o0, %g1 200b9a8: 0a 80 00 05 bcs 200b9bc <_Heap_Free+0x34> 200b9ac: 84 10 20 00 clr %g2 200b9b0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200b9b4: 80 a0 80 08 cmp %g2, %o0 200b9b8: 84 60 3f ff subx %g0, -1, %g2 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 200b9bc: 80 a0 a0 00 cmp %g2, 0 200b9c0: 02 80 00 6a be 200bb68 <_Heap_Free+0x1e0> 200b9c4: 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; 200b9c8: c8 02 20 04 ld [ %o0 + 4 ], %g4 200b9cc: 86 09 3f fe and %g4, -2, %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200b9d0: 84 02 00 03 add %o0, %g3, %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 200b9d4: 80 a0 80 01 cmp %g2, %g1 200b9d8: 0a 80 00 05 bcs 200b9ec <_Heap_Free+0x64> <== NEVER TAKEN 200b9dc: 9a 10 20 00 clr %o5 200b9e0: da 06 20 24 ld [ %i0 + 0x24 ], %o5 200b9e4: 80 a3 40 02 cmp %o5, %g2 200b9e8: 9a 60 3f ff subx %g0, -1, %o5 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 200b9ec: 80 a3 60 00 cmp %o5, 0 200b9f0: 02 80 00 5e be 200bb68 <_Heap_Free+0x1e0> <== NEVER TAKEN 200b9f4: 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; 200b9f8: da 00 a0 04 ld [ %g2 + 4 ], %o5 _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200b9fc: 80 8b 60 01 btst 1, %o5 200ba00: 02 80 00 5a be 200bb68 <_Heap_Free+0x1e0> <== NEVER TAKEN 200ba04: 9a 0b 7f fe and %o5, -2, %o5 return false; } 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 )); 200ba08: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 200ba0c: 80 a0 80 09 cmp %g2, %o1 200ba10: 02 80 00 06 be 200ba28 <_Heap_Free+0xa0> 200ba14: 96 10 20 00 clr %o3 200ba18: 98 00 80 0d add %g2, %o5, %o4 200ba1c: d6 03 20 04 ld [ %o4 + 4 ], %o3 200ba20: 96 0a e0 01 and %o3, 1, %o3 200ba24: 96 1a e0 01 xor %o3, 1, %o3 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 200ba28: 80 89 20 01 btst 1, %g4 200ba2c: 12 80 00 26 bne 200bac4 <_Heap_Free+0x13c> 200ba30: 80 a2 e0 00 cmp %o3, 0 uintptr_t const prev_size = block->prev_size; 200ba34: d8 02 00 00 ld [ %o0 ], %o4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200ba38: 88 22 00 0c sub %o0, %o4, %g4 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 200ba3c: 80 a1 00 01 cmp %g4, %g1 200ba40: 0a 80 00 04 bcs 200ba50 <_Heap_Free+0xc8> <== NEVER TAKEN 200ba44: 94 10 20 00 clr %o2 200ba48: 80 a2 40 04 cmp %o1, %g4 200ba4c: 94 60 3f ff subx %g0, -1, %o2 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 200ba50: 80 a2 a0 00 cmp %o2, 0 200ba54: 02 80 00 45 be 200bb68 <_Heap_Free+0x1e0> <== NEVER TAKEN 200ba58: 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) ) { 200ba5c: c2 01 20 04 ld [ %g4 + 4 ], %g1 200ba60: 80 88 60 01 btst 1, %g1 200ba64: 02 80 00 41 be 200bb68 <_Heap_Free+0x1e0> <== NEVER TAKEN 200ba68: 80 a2 e0 00 cmp %o3, 0 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200ba6c: 22 80 00 0f be,a 200baa8 <_Heap_Free+0x120> 200ba70: 98 00 c0 0c add %g3, %o4, %o4 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200ba74: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 200ba78: d6 00 a0 0c ld [ %g2 + 0xc ], %o3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200ba7c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200ba80: 82 00 7f ff add %g1, -1, %g1 200ba84: c2 26 20 38 st %g1, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 200ba88: 9a 00 c0 0d add %g3, %o5, %o5 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 200ba8c: d6 20 a0 0c st %o3, [ %g2 + 0xc ] 200ba90: 98 03 40 0c add %o5, %o4, %o4 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 200ba94: c4 22 e0 08 st %g2, [ %o3 + 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; 200ba98: d8 21 00 0c st %o4, [ %g4 + %o4 ] 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; 200ba9c: 98 13 20 01 or %o4, 1, %o4 200baa0: 10 80 00 27 b 200bb3c <_Heap_Free+0x1b4> 200baa4: d8 21 20 04 st %o4, [ %g4 + 4 ] 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; 200baa8: 82 13 20 01 or %o4, 1, %g1 200baac: c2 21 20 04 st %g1, [ %g4 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200bab0: c2 00 a0 04 ld [ %g2 + 4 ], %g1 next_block->prev_size = size; 200bab4: d8 22 00 03 st %o4, [ %o0 + %g3 ] _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; 200bab8: 82 08 7f fe and %g1, -2, %g1 200babc: 10 80 00 20 b 200bb3c <_Heap_Free+0x1b4> 200bac0: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200bac4: 02 80 00 0d be 200baf8 <_Heap_Free+0x170> 200bac8: 82 10 e0 01 or %g3, 1, %g1 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 200bacc: 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; 200bad0: c4 00 a0 08 ld [ %g2 + 8 ], %g2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 200bad4: c2 22 20 0c st %g1, [ %o0 + 0xc ] ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 200bad8: c4 22 20 08 st %g2, [ %o0 + 8 ] new_block->prev = prev; next->prev = new_block; prev->next = new_block; 200badc: d0 20 60 08 st %o0, [ %g1 + 8 ] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 200bae0: d0 20 a0 0c st %o0, [ %g2 + 0xc ] uintptr_t const size = block_size + next_block_size; 200bae4: 82 03 40 03 add %o5, %g3, %g1 _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; 200bae8: c2 22 00 01 st %g1, [ %o0 + %g1 ] 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; 200baec: 82 10 60 01 or %g1, 1, %g1 200baf0: 10 80 00 13 b 200bb3c <_Heap_Free+0x1b4> 200baf4: c2 22 20 04 st %g1, [ %o0 + 4 ] 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; 200baf8: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200bafc: 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; 200bb00: c8 06 20 08 ld [ %i0 + 8 ], %g4 200bb04: 82 08 7f fe and %g1, -2, %g1 next_block->prev_size = block_size; 200bb08: c6 22 00 03 st %g3, [ %o0 + %g3 ] } 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; 200bb0c: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200bb10: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 new_block->next = next; 200bb14: c8 22 20 08 st %g4, [ %o0 + 8 ] new_block->prev = block_before; 200bb18: 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; 200bb1c: 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; 200bb20: 82 00 60 01 inc %g1 block_before->next = new_block; next->prev = new_block; 200bb24: d0 21 20 0c st %o0, [ %g4 + 0xc ] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 200bb28: 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; 200bb2c: 80 a0 80 01 cmp %g2, %g1 200bb30: 1a 80 00 03 bcc 200bb3c <_Heap_Free+0x1b4> 200bb34: 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; 200bb38: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200bb3c: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200bb40: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200bb44: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200bb48: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; stats->free_size += block_size; 200bb4c: 86 01 00 03 add %g4, %g3, %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200bb50: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; stats->free_size += block_size; 200bb54: c6 26 20 30 st %g3, [ %i0 + 0x30 ] } } /* Statistics */ --stats->used_blocks; ++stats->frees; 200bb58: 82 00 60 01 inc %g1 200bb5c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; return( true ); 200bb60: 81 c7 e0 08 ret 200bb64: 91 e8 20 01 restore %g0, 1, %o0 } 200bb68: 81 c7 e0 08 ret 200bb6c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02018614 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 2018614: 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 ) 2018618: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 201861c: 7f ff fb 33 call 20172e8 <.urem> 2018620: 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; 2018624: 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 ) 2018628: 84 06 7f f8 add %i1, -8, %g2 201862c: 90 20 80 08 sub %g2, %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 2018630: 80 a2 00 01 cmp %o0, %g1 2018634: 0a 80 00 05 bcs 2018648 <_Heap_Size_of_alloc_area+0x34> 2018638: 84 10 20 00 clr %g2 201863c: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 2018640: 80 a0 80 08 cmp %g2, %o0 2018644: 84 60 3f ff subx %g0, -1, %g2 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 2018648: 80 a0 a0 00 cmp %g2, 0 201864c: 02 80 00 16 be 20186a4 <_Heap_Size_of_alloc_area+0x90> 2018650: 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); 2018654: c4 02 20 04 ld [ %o0 + 4 ], %g2 2018658: 84 08 bf fe and %g2, -2, %g2 201865c: 84 02 00 02 add %o0, %g2, %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 2018660: 80 a0 80 01 cmp %g2, %g1 2018664: 0a 80 00 05 bcs 2018678 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 2018668: 86 10 20 00 clr %g3 201866c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2018670: 80 a0 40 02 cmp %g1, %g2 2018674: 86 60 3f ff subx %g0, -1, %g3 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 2018678: 80 a0 e0 00 cmp %g3, 0 201867c: 02 80 00 0a be 20186a4 <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN 2018680: 01 00 00 00 nop 2018684: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2018688: 80 88 60 01 btst 1, %g1 201868c: 02 80 00 06 be 20186a4 <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN 2018690: 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; 2018694: 84 00 a0 04 add %g2, 4, %g2 2018698: c4 26 80 00 st %g2, [ %i2 ] return true; 201869c: 81 c7 e0 08 ret 20186a0: 91 e8 20 01 restore %g0, 1, %o0 } 20186a4: 81 c7 e0 08 ret 20186a8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02007ab0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2007ab0: 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; 2007ab4: 23 00 80 1f sethi %hi(0x2007c00), %l1 2007ab8: 80 8e a0 ff btst 0xff, %i2 2007abc: a2 14 63 88 or %l1, 0x388, %l1 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2007ac0: e4 06 20 10 ld [ %i0 + 0x10 ], %l2 uintptr_t const min_block_size = heap->min_block_size; 2007ac4: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 2007ac8: 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; 2007acc: 12 80 00 04 bne 2007adc <_Heap_Walk+0x2c> 2007ad0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2007ad4: 23 00 80 1e sethi %hi(0x2007800), %l1 2007ad8: a2 14 62 a8 or %l1, 0x2a8, %l1 ! 2007aa8 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2007adc: 03 00 80 74 sethi %hi(0x201d000), %g1 2007ae0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 201d020 <_System_state_Current> 2007ae4: 80 a0 60 03 cmp %g1, 3 2007ae8: 12 80 01 1e bne 2007f60 <_Heap_Walk+0x4b0> 2007aec: 90 10 00 19 mov %i1, %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)( 2007af0: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2007af4: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007af8: c4 06 20 08 ld [ %i0 + 8 ], %g2 2007afc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2007b00: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2007b04: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2007b08: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2007b0c: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 2007b10: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 2007b14: 92 10 20 00 clr %o1 2007b18: 15 00 80 68 sethi %hi(0x201a000), %o2 2007b1c: 96 10 00 12 mov %l2, %o3 2007b20: 94 12 a1 c0 or %o2, 0x1c0, %o2 2007b24: 9f c4 40 00 call %l1 2007b28: 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 ) { 2007b2c: 80 a4 a0 00 cmp %l2, 0 2007b30: 12 80 00 07 bne 2007b4c <_Heap_Walk+0x9c> 2007b34: 80 8c a0 07 btst 7, %l2 (*printer)( source, true, "page size is zero\n" ); 2007b38: 15 00 80 68 sethi %hi(0x201a000), %o2 2007b3c: 90 10 00 19 mov %i1, %o0 2007b40: 92 10 20 01 mov 1, %o1 2007b44: 10 80 00 27 b 2007be0 <_Heap_Walk+0x130> 2007b48: 94 12 a2 58 or %o2, 0x258, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2007b4c: 22 80 00 08 be,a 2007b6c <_Heap_Walk+0xbc> 2007b50: 90 10 00 13 mov %l3, %o0 (*printer)( 2007b54: 15 00 80 68 sethi %hi(0x201a000), %o2 2007b58: 90 10 00 19 mov %i1, %o0 2007b5c: 96 10 00 12 mov %l2, %o3 2007b60: 92 10 20 01 mov 1, %o1 2007b64: 10 80 01 05 b 2007f78 <_Heap_Walk+0x4c8> 2007b68: 94 12 a2 70 or %o2, 0x270, %o2 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2007b6c: 7f ff e7 db call 2001ad8 <.urem> 2007b70: 92 10 00 12 mov %l2, %o1 2007b74: 80 a2 20 00 cmp %o0, 0 2007b78: 22 80 00 08 be,a 2007b98 <_Heap_Walk+0xe8> 2007b7c: 90 04 20 08 add %l0, 8, %o0 (*printer)( 2007b80: 15 00 80 68 sethi %hi(0x201a000), %o2 2007b84: 90 10 00 19 mov %i1, %o0 2007b88: 96 10 00 13 mov %l3, %o3 2007b8c: 92 10 20 01 mov 1, %o1 2007b90: 10 80 00 fa b 2007f78 <_Heap_Walk+0x4c8> 2007b94: 94 12 a2 90 or %o2, 0x290, %o2 ); return false; } if ( 2007b98: 7f ff e7 d0 call 2001ad8 <.urem> 2007b9c: 92 10 00 12 mov %l2, %o1 2007ba0: 80 a2 20 00 cmp %o0, 0 2007ba4: 22 80 00 08 be,a 2007bc4 <_Heap_Walk+0x114> 2007ba8: c2 04 20 04 ld [ %l0 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2007bac: 15 00 80 68 sethi %hi(0x201a000), %o2 2007bb0: 90 10 00 19 mov %i1, %o0 2007bb4: 96 10 00 10 mov %l0, %o3 2007bb8: 92 10 20 01 mov 1, %o1 2007bbc: 10 80 00 ef b 2007f78 <_Heap_Walk+0x4c8> 2007bc0: 94 12 a2 b8 or %o2, 0x2b8, %o2 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2007bc4: 80 88 60 01 btst 1, %g1 2007bc8: 32 80 00 09 bne,a 2007bec <_Heap_Walk+0x13c> 2007bcc: ea 04 00 00 ld [ %l0 ], %l5 (*printer)( 2007bd0: 15 00 80 68 sethi %hi(0x201a000), %o2 2007bd4: 90 10 00 19 mov %i1, %o0 2007bd8: 92 10 20 01 mov 1, %o1 2007bdc: 94 12 a2 f0 or %o2, 0x2f0, %o2 2007be0: 9f c4 40 00 call %l1 2007be4: b0 10 20 00 clr %i0 2007be8: 30 80 00 e6 b,a 2007f80 <_Heap_Walk+0x4d0> ); return false; } if ( first_block->prev_size != page_size ) { 2007bec: 80 a5 40 12 cmp %l5, %l2 2007bf0: 22 80 00 09 be,a 2007c14 <_Heap_Walk+0x164> 2007bf4: c2 05 20 04 ld [ %l4 + 4 ], %g1 (*printer)( 2007bf8: 15 00 80 68 sethi %hi(0x201a000), %o2 2007bfc: 90 10 00 19 mov %i1, %o0 2007c00: 96 10 00 15 mov %l5, %o3 2007c04: 98 10 00 12 mov %l2, %o4 2007c08: 92 10 20 01 mov 1, %o1 2007c0c: 10 80 00 88 b 2007e2c <_Heap_Walk+0x37c> 2007c10: 94 12 a3 20 or %o2, 0x320, %o2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2007c14: 82 08 7f fe and %g1, -2, %g1 2007c18: 82 05 00 01 add %l4, %g1, %g1 2007c1c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2007c20: 80 88 60 01 btst 1, %g1 2007c24: 32 80 00 07 bne,a 2007c40 <_Heap_Walk+0x190> 2007c28: d6 06 20 08 ld [ %i0 + 8 ], %o3 (*printer)( 2007c2c: 15 00 80 68 sethi %hi(0x201a000), %o2 2007c30: 90 10 00 19 mov %i1, %o0 2007c34: 92 10 20 01 mov 1, %o1 2007c38: 10 bf ff ea b 2007be0 <_Heap_Walk+0x130> 2007c3c: 94 12 a3 50 or %o2, 0x350, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 2007c40: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2007c44: a4 10 00 18 mov %i0, %l2 2007c48: 10 80 00 32 b 2007d10 <_Heap_Walk+0x260> 2007c4c: ae 10 00 0b mov %o3, %l7 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 2007c50: 80 a0 80 17 cmp %g2, %l7 2007c54: 18 80 00 05 bgu 2007c68 <_Heap_Walk+0x1b8> 2007c58: 82 10 20 00 clr %g1 2007c5c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2007c60: 80 a0 40 17 cmp %g1, %l7 2007c64: 82 60 3f ff subx %g0, -1, %g1 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 2007c68: 80 a0 60 00 cmp %g1, 0 2007c6c: 32 80 00 08 bne,a 2007c8c <_Heap_Walk+0x1dc> 2007c70: 90 05 e0 08 add %l7, 8, %o0 (*printer)( 2007c74: 15 00 80 68 sethi %hi(0x201a000), %o2 2007c78: 96 10 00 17 mov %l7, %o3 2007c7c: 90 10 00 19 mov %i1, %o0 2007c80: 92 10 20 01 mov 1, %o1 2007c84: 10 80 00 bd b 2007f78 <_Heap_Walk+0x4c8> 2007c88: 94 12 a3 68 or %o2, 0x368, %o2 ); return false; } if ( 2007c8c: 7f ff e7 93 call 2001ad8 <.urem> 2007c90: 92 10 00 16 mov %l6, %o1 2007c94: 80 a2 20 00 cmp %o0, 0 2007c98: 22 80 00 08 be,a 2007cb8 <_Heap_Walk+0x208> 2007c9c: c2 05 e0 04 ld [ %l7 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2007ca0: 15 00 80 68 sethi %hi(0x201a000), %o2 2007ca4: 96 10 00 17 mov %l7, %o3 2007ca8: 90 10 00 19 mov %i1, %o0 2007cac: 92 10 20 01 mov 1, %o1 2007cb0: 10 80 00 b2 b 2007f78 <_Heap_Walk+0x4c8> 2007cb4: 94 12 a3 88 or %o2, 0x388, %o2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2007cb8: 82 08 7f fe and %g1, -2, %g1 2007cbc: 82 05 c0 01 add %l7, %g1, %g1 2007cc0: c2 00 60 04 ld [ %g1 + 4 ], %g1 2007cc4: 80 88 60 01 btst 1, %g1 2007cc8: 22 80 00 08 be,a 2007ce8 <_Heap_Walk+0x238> 2007ccc: d8 05 e0 0c ld [ %l7 + 0xc ], %o4 (*printer)( 2007cd0: 15 00 80 68 sethi %hi(0x201a000), %o2 2007cd4: 96 10 00 17 mov %l7, %o3 2007cd8: 90 10 00 19 mov %i1, %o0 2007cdc: 92 10 20 01 mov 1, %o1 2007ce0: 10 80 00 a6 b 2007f78 <_Heap_Walk+0x4c8> 2007ce4: 94 12 a3 b8 or %o2, 0x3b8, %o2 ); return false; } if ( free_block->prev != prev_block ) { 2007ce8: 80 a3 00 12 cmp %o4, %l2 2007cec: 02 80 00 08 be 2007d0c <_Heap_Walk+0x25c> 2007cf0: a4 10 00 17 mov %l7, %l2 (*printer)( 2007cf4: 15 00 80 68 sethi %hi(0x201a000), %o2 2007cf8: 96 10 00 17 mov %l7, %o3 2007cfc: 90 10 00 19 mov %i1, %o0 2007d00: 92 10 20 01 mov 1, %o1 2007d04: 10 80 00 4a b 2007e2c <_Heap_Walk+0x37c> 2007d08: 94 12 a3 d8 or %o2, 0x3d8, %o2 return false; } prev_block = free_block; free_block = free_block->next; 2007d0c: ee 05 e0 08 ld [ %l7 + 8 ], %l7 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 ) { 2007d10: 80 a5 c0 18 cmp %l7, %i0 2007d14: 32 bf ff cf bne,a 2007c50 <_Heap_Walk+0x1a0> 2007d18: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007d1c: 10 80 00 89 b 2007f40 <_Heap_Walk+0x490> 2007d20: 37 00 80 69 sethi %hi(0x201a400), %i3 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 ) { 2007d24: 80 8d a0 01 btst 1, %l6 - 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; 2007d28: ac 0d bf fe and %l6, -2, %l6 2007d2c: 02 80 00 0a be 2007d54 <_Heap_Walk+0x2a4> 2007d30: a4 04 00 16 add %l0, %l6, %l2 (*printer)( 2007d34: 90 10 00 19 mov %i1, %o0 2007d38: 92 10 20 00 clr %o1 2007d3c: 94 10 00 1a mov %i2, %o2 2007d40: 96 10 00 10 mov %l0, %o3 2007d44: 9f c4 40 00 call %l1 2007d48: 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 2007d4c: 10 80 00 0a b 2007d74 <_Heap_Walk+0x2c4> 2007d50: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007d54: da 04 00 00 ld [ %l0 ], %o5 2007d58: 90 10 00 19 mov %i1, %o0 2007d5c: 92 10 20 00 clr %o1 2007d60: 94 10 00 1b mov %i3, %o2 2007d64: 96 10 00 10 mov %l0, %o3 2007d68: 9f c4 40 00 call %l1 2007d6c: 98 10 00 16 mov %l6, %o4 2007d70: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2007d74: 80 a0 80 12 cmp %g2, %l2 2007d78: 18 80 00 05 bgu 2007d8c <_Heap_Walk+0x2dc> <== NEVER TAKEN 2007d7c: 82 10 20 00 clr %g1 2007d80: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2007d84: 80 a0 40 12 cmp %g1, %l2 2007d88: 82 60 3f ff subx %g0, -1, %g1 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 2007d8c: 80 a0 60 00 cmp %g1, 0 2007d90: 32 80 00 09 bne,a 2007db4 <_Heap_Walk+0x304> 2007d94: 90 10 00 16 mov %l6, %o0 (*printer)( 2007d98: 15 00 80 69 sethi %hi(0x201a400), %o2 2007d9c: 90 10 00 19 mov %i1, %o0 2007da0: 96 10 00 10 mov %l0, %o3 2007da4: 98 10 00 12 mov %l2, %o4 2007da8: 92 10 20 01 mov 1, %o1 2007dac: 10 80 00 20 b 2007e2c <_Heap_Walk+0x37c> 2007db0: 94 12 a0 50 or %o2, 0x50, %o2 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 2007db4: 7f ff e7 49 call 2001ad8 <.urem> 2007db8: 92 10 00 15 mov %l5, %o1 2007dbc: 80 a2 20 00 cmp %o0, 0 2007dc0: 02 80 00 09 be 2007de4 <_Heap_Walk+0x334> 2007dc4: 80 a5 80 13 cmp %l6, %l3 (*printer)( 2007dc8: 15 00 80 69 sethi %hi(0x201a400), %o2 2007dcc: 90 10 00 19 mov %i1, %o0 2007dd0: 96 10 00 10 mov %l0, %o3 2007dd4: 98 10 00 16 mov %l6, %o4 2007dd8: 92 10 20 01 mov 1, %o1 2007ddc: 10 80 00 14 b 2007e2c <_Heap_Walk+0x37c> 2007de0: 94 12 a0 80 or %o2, 0x80, %o2 ); return false; } if ( block_size < min_block_size ) { 2007de4: 1a 80 00 0a bcc 2007e0c <_Heap_Walk+0x35c> 2007de8: 80 a4 80 10 cmp %l2, %l0 (*printer)( 2007dec: 15 00 80 69 sethi %hi(0x201a400), %o2 2007df0: 90 10 00 19 mov %i1, %o0 2007df4: 96 10 00 10 mov %l0, %o3 2007df8: 98 10 00 16 mov %l6, %o4 2007dfc: 9a 10 00 13 mov %l3, %o5 2007e00: 92 10 20 01 mov 1, %o1 2007e04: 10 80 00 3b b 2007ef0 <_Heap_Walk+0x440> 2007e08: 94 12 a0 b0 or %o2, 0xb0, %o2 ); return false; } if ( next_block_begin <= block_begin ) { 2007e0c: 38 80 00 0b bgu,a 2007e38 <_Heap_Walk+0x388> 2007e10: c2 04 a0 04 ld [ %l2 + 4 ], %g1 (*printer)( 2007e14: 15 00 80 69 sethi %hi(0x201a400), %o2 2007e18: 90 10 00 19 mov %i1, %o0 2007e1c: 96 10 00 10 mov %l0, %o3 2007e20: 98 10 00 12 mov %l2, %o4 2007e24: 92 10 20 01 mov 1, %o1 2007e28: 94 12 a0 e0 or %o2, 0xe0, %o2 2007e2c: 9f c4 40 00 call %l1 2007e30: b0 10 20 00 clr %i0 2007e34: 30 80 00 53 b,a 2007f80 <_Heap_Walk+0x4d0> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2007e38: 80 88 60 01 btst 1, %g1 2007e3c: 32 80 00 46 bne,a 2007f54 <_Heap_Walk+0x4a4> 2007e40: a0 10 00 12 mov %l2, %l0 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; 2007e44: fa 04 20 04 ld [ %l0 + 4 ], %i5 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)( 2007e48: 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; 2007e4c: 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; 2007e50: ac 0f 7f fe and %i5, -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; 2007e54: 1b 00 80 69 sethi %hi(0x201a400), %o5 2007e58: 80 a3 00 01 cmp %o4, %g1 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 2007e5c: 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); 2007e60: 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; 2007e64: 02 80 00 07 be 2007e80 <_Heap_Walk+0x3d0> 2007e68: 9a 13 61 18 or %o5, 0x118, %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)" : ""), 2007e6c: 1b 00 80 69 sethi %hi(0x201a400), %o5 2007e70: 80 a3 00 18 cmp %o4, %i0 2007e74: 02 80 00 03 be 2007e80 <_Heap_Walk+0x3d0> 2007e78: 9a 13 61 30 or %o5, 0x130, %o5 2007e7c: 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)( 2007e80: c4 04 20 08 ld [ %l0 + 8 ], %g2 2007e84: 03 00 80 69 sethi %hi(0x201a400), %g1 2007e88: 80 a0 80 03 cmp %g2, %g3 2007e8c: 02 80 00 07 be 2007ea8 <_Heap_Walk+0x3f8> 2007e90: 82 10 61 40 or %g1, 0x140, %g1 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007e94: 03 00 80 69 sethi %hi(0x201a400), %g1 2007e98: 80 a0 80 18 cmp %g2, %i0 2007e9c: 02 80 00 03 be 2007ea8 <_Heap_Walk+0x3f8> 2007ea0: 82 10 61 50 or %g1, 0x150, %g1 2007ea4: 82 10 00 1c mov %i4, %g1 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)( 2007ea8: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 2007eac: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 2007eb0: 90 10 00 19 mov %i1, %o0 2007eb4: 92 10 20 00 clr %o1 2007eb8: 15 00 80 69 sethi %hi(0x201a400), %o2 2007ebc: 96 10 00 10 mov %l0, %o3 2007ec0: 9f c4 40 00 call %l1 2007ec4: 94 12 a1 60 or %o2, 0x160, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2007ec8: da 05 c0 00 ld [ %l7 ], %o5 2007ecc: 80 a5 80 0d cmp %l6, %o5 2007ed0: 02 80 00 0b be 2007efc <_Heap_Walk+0x44c> 2007ed4: 15 00 80 69 sethi %hi(0x201a400), %o2 (*printer)( 2007ed8: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 2007edc: 90 10 00 19 mov %i1, %o0 2007ee0: 96 10 00 10 mov %l0, %o3 2007ee4: 98 10 00 16 mov %l6, %o4 2007ee8: 92 10 20 01 mov 1, %o1 2007eec: 94 12 a1 90 or %o2, 0x190, %o2 2007ef0: 9f c4 40 00 call %l1 2007ef4: b0 10 20 00 clr %i0 2007ef8: 30 80 00 22 b,a 2007f80 <_Heap_Walk+0x4d0> ); return false; } if ( !prev_used ) { 2007efc: 80 8f 60 01 btst 1, %i5 2007f00: 32 80 00 0b bne,a 2007f2c <_Heap_Walk+0x47c> 2007f04: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 2007f08: 15 00 80 69 sethi %hi(0x201a400), %o2 2007f0c: 90 10 00 19 mov %i1, %o0 2007f10: 96 10 00 10 mov %l0, %o3 2007f14: 92 10 20 01 mov 1, %o1 2007f18: 10 80 00 18 b 2007f78 <_Heap_Walk+0x4c8> 2007f1c: 94 12 a1 d0 or %o2, 0x1d0, %o2 { 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 ) { if ( free_block == block ) { 2007f20: 22 80 00 0d be,a 2007f54 <_Heap_Walk+0x4a4> 2007f24: a0 10 00 12 mov %l2, %l0 return true; } free_block = free_block->next; 2007f28: c2 00 60 08 ld [ %g1 + 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 ) { 2007f2c: 80 a0 40 18 cmp %g1, %i0 2007f30: 12 bf ff fc bne 2007f20 <_Heap_Walk+0x470> 2007f34: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2007f38: 10 80 00 0c b 2007f68 <_Heap_Walk+0x4b8> 2007f3c: 15 00 80 69 sethi %hi(0x201a400), %o2 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)( 2007f40: 35 00 80 69 sethi %hi(0x201a400), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007f44: 39 00 80 69 sethi %hi(0x201a400), %i4 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007f48: b6 16 e0 28 or %i3, 0x28, %i3 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)( 2007f4c: b4 16 a0 10 or %i2, 0x10, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007f50: b8 17 21 28 or %i4, 0x128, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 2007f54: 80 a4 00 14 cmp %l0, %l4 2007f58: 32 bf ff 73 bne,a 2007d24 <_Heap_Walk+0x274> 2007f5c: ec 04 20 04 ld [ %l0 + 4 ], %l6 block = next_block; } return true; } 2007f60: 81 c7 e0 08 ret 2007f64: 91 e8 20 01 restore %g0, 1, %o0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2007f68: 90 10 00 19 mov %i1, %o0 2007f6c: 96 10 00 10 mov %l0, %o3 2007f70: 92 10 20 01 mov 1, %o1 2007f74: 94 12 a2 00 or %o2, 0x200, %o2 2007f78: 9f c4 40 00 call %l1 2007f7c: b0 10 20 00 clr %i0 2007f80: 81 c7 e0 08 ret 2007f84: 81 e8 00 00 restore =============================================================================== 02006d2c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006d2c: 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 ) 2006d30: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006d34: 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 ) 2006d38: 80 a0 60 00 cmp %g1, 0 2006d3c: 02 80 00 20 be 2006dbc <_Objects_Allocate+0x90> <== NEVER TAKEN 2006d40: 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 ); 2006d44: a2 04 20 20 add %l0, 0x20, %l1 2006d48: 40 00 11 f4 call 200b518 <_Chain_Get> 2006d4c: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2006d50: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 2006d54: 80 a0 60 00 cmp %g1, 0 2006d58: 02 80 00 19 be 2006dbc <_Objects_Allocate+0x90> 2006d5c: 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 ) { 2006d60: 80 a2 20 00 cmp %o0, 0 2006d64: 32 80 00 0a bne,a 2006d8c <_Objects_Allocate+0x60> 2006d68: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 _Objects_Extend_information( information ); 2006d6c: 40 00 00 1e call 2006de4 <_Objects_Extend_information> 2006d70: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2006d74: 40 00 11 e9 call 200b518 <_Chain_Get> 2006d78: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 2006d7c: b0 92 20 00 orcc %o0, 0, %i0 2006d80: 02 80 00 0f be 2006dbc <_Objects_Allocate+0x90> 2006d84: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2006d88: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 2006d8c: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006d90: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1 2006d94: 40 00 40 a9 call 2017038 <.udiv> 2006d98: 90 22 00 01 sub %o0, %g1, %o0 2006d9c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 2006da0: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2006da4: 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 ]--; 2006da8: c4 00 40 08 ld [ %g1 + %o0 ], %g2 information->inactive--; 2006dac: 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 ]--; 2006db0: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2006db4: 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 ]--; 2006db8: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; } } return the_object; } 2006dbc: 81 c7 e0 08 ret 2006dc0: 81 e8 00 00 restore =============================================================================== 02006de4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2006de4: 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 ) 2006de8: e4 06 20 34 ld [ %i0 + 0x34 ], %l2 2006dec: 80 a4 a0 00 cmp %l2, 0 2006df0: 12 80 00 06 bne 2006e08 <_Objects_Extend_information+0x24> 2006df4: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 2006df8: a0 10 00 13 mov %l3, %l0 2006dfc: a2 10 20 00 clr %l1 2006e00: 10 80 00 15 b 2006e54 <_Objects_Extend_information+0x70> 2006e04: a8 10 20 00 clr %l4 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006e08: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 2006e0c: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2006e10: 40 00 40 8a call 2017038 <.udiv> 2006e14: 92 10 00 11 mov %l1, %o1 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 2006e18: 82 10 00 11 mov %l1, %g1 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006e1c: 91 2a 20 10 sll %o0, 0x10, %o0 2006e20: a0 10 00 13 mov %l3, %l0 2006e24: a9 32 20 10 srl %o0, 0x10, %l4 for ( ; block < block_count; block++ ) { 2006e28: 10 80 00 08 b 2006e48 <_Objects_Extend_information+0x64> 2006e2c: a2 10 20 00 clr %l1 if ( information->object_blocks[ block ] == NULL ) 2006e30: c4 04 80 02 ld [ %l2 + %g2 ], %g2 2006e34: 80 a0 a0 00 cmp %g2, 0 2006e38: 22 80 00 08 be,a 2006e58 <_Objects_Extend_information+0x74> 2006e3c: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 2006e40: a0 04 00 01 add %l0, %g1, %l0 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2006e44: a2 04 60 01 inc %l1 2006e48: 80 a4 40 14 cmp %l1, %l4 2006e4c: 0a bf ff f9 bcs 2006e30 <_Objects_Extend_information+0x4c> 2006e50: 85 2c 60 02 sll %l1, 2, %g2 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2006e54: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 2006e58: ec 16 20 10 lduh [ %i0 + 0x10 ], %l6 /* * 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 ) { 2006e5c: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2006e60: ac 02 00 16 add %o0, %l6, %l6 /* * 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 ) { 2006e64: 82 10 63 ff or %g1, 0x3ff, %g1 2006e68: 80 a5 80 01 cmp %l6, %g1 2006e6c: 18 80 00 88 bgu 200708c <_Objects_Extend_information+0x2a8><== NEVER TAKEN 2006e70: 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; 2006e74: 40 00 40 37 call 2016f50 <.umul> 2006e78: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2006e7c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006e80: 80 a0 60 00 cmp %g1, 0 2006e84: 02 80 00 09 be 2006ea8 <_Objects_Extend_information+0xc4> 2006e88: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); 2006e8c: 40 00 08 54 call 2008fdc <_Workspace_Allocate> 2006e90: 01 00 00 00 nop if ( !new_object_block ) 2006e94: a4 92 20 00 orcc %o0, 0, %l2 2006e98: 32 80 00 08 bne,a 2006eb8 <_Objects_Extend_information+0xd4> 2006e9c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006ea0: 81 c7 e0 08 ret 2006ea4: 81 e8 00 00 restore return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 2006ea8: 40 00 08 3f call 2008fa4 <_Workspace_Allocate_or_fatal_error> 2006eac: 01 00 00 00 nop 2006eb0: 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 ) { 2006eb4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006eb8: 80 a4 00 01 cmp %l0, %g1 2006ebc: 2a 80 00 53 bcs,a 2007008 <_Objects_Extend_information+0x224> 2006ec0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 * 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 ); 2006ec4: 82 05 80 13 add %l6, %l3, %g1 */ /* * Up the block count and maximum */ block_count++; 2006ec8: ae 05 20 01 add %l4, 1, %l7 * 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 ); 2006ecc: 91 2d e0 01 sll %l7, 1, %o0 2006ed0: 90 02 00 17 add %o0, %l7, %o0 2006ed4: 90 00 40 08 add %g1, %o0, %o0 2006ed8: 40 00 08 41 call 2008fdc <_Workspace_Allocate> 2006edc: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 2006ee0: aa 92 20 00 orcc %o0, 0, %l5 2006ee4: 32 80 00 06 bne,a 2006efc <_Objects_Extend_information+0x118> 2006ee8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 _Workspace_Free( new_object_block ); 2006eec: 40 00 08 45 call 2009000 <_Workspace_Free> 2006ef0: 90 10 00 12 mov %l2, %o0 return; 2006ef4: 81 c7 e0 08 ret 2006ef8: 81 e8 00 00 restore } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006efc: af 2d e0 02 sll %l7, 2, %l7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006f00: 80 a0 40 13 cmp %g1, %l3 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 2006f04: ba 05 40 17 add %l5, %l7, %i5 2006f08: 82 10 20 00 clr %g1 2006f0c: 08 80 00 14 bleu 2006f5c <_Objects_Extend_information+0x178> 2006f10: ae 07 40 17 add %i5, %l7, %l7 /* * 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, 2006f14: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 2006f18: b9 2d 20 02 sll %l4, 2, %i4 /* * 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, 2006f1c: 40 00 1d 4f call 200e458 2006f20: 94 10 00 1c mov %i4, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006f24: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2006f28: 94 10 00 1c mov %i4, %o2 2006f2c: 40 00 1d 4b call 200e458 2006f30: 90 10 00 1d mov %i5, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006f34: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006f38: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006f3c: a6 04 c0 01 add %l3, %g1, %l3 2006f40: 90 10 00 17 mov %l7, %o0 2006f44: 40 00 1d 45 call 200e458 2006f48: 95 2c e0 02 sll %l3, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006f4c: 10 80 00 08 b 2006f6c <_Objects_Extend_information+0x188> 2006f50: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006f54: 82 00 60 01 inc %g1 local_table[ index ] = NULL; 2006f58: c0 20 80 17 clr [ %g2 + %l7 ] } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006f5c: 80 a0 40 13 cmp %g1, %l3 2006f60: 2a bf ff fd bcs,a 2006f54 <_Objects_Extend_information+0x170> 2006f64: 85 28 60 02 sll %g1, 2, %g2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006f68: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2006f6c: a9 2d 20 02 sll %l4, 2, %l4 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006f70: 85 2c 20 02 sll %l0, 2, %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 2006f74: c0 27 40 14 clr [ %i5 + %l4 ] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2006f78: c0 25 40 14 clr [ %l5 + %l4 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006f7c: 86 04 00 03 add %l0, %g3, %g3 2006f80: 84 05 c0 02 add %l7, %g2, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2006f84: 10 80 00 04 b 2006f94 <_Objects_Extend_information+0x1b0> 2006f88: 82 10 00 10 mov %l0, %g1 index < ( information->allocation_size + index_base ); index++ ) { 2006f8c: 82 00 60 01 inc %g1 2006f90: 84 00 a0 04 add %g2, 4, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2006f94: 80 a0 40 03 cmp %g1, %g3 2006f98: 2a bf ff fd bcs,a 2006f8c <_Objects_Extend_information+0x1a8> 2006f9c: c0 20 80 00 clr [ %g2 ] index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2006fa0: 7f ff ec 84 call 20021b0 2006fa4: 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( 2006fa8: c8 06 00 00 ld [ %i0 ], %g4 2006fac: 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; 2006fb0: ec 36 20 10 sth %l6, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2006fb4: ad 2d a0 10 sll %l6, 0x10, %l6 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006fb8: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 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( 2006fbc: 83 35 a0 10 srl %l6, 0x10, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 2006fc0: fa 26 20 30 st %i5, [ %i0 + 0x30 ] information->local_table = local_table; 2006fc4: ee 26 20 1c st %l7, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2006fc8: 89 29 20 18 sll %g4, 0x18, %g4 2006fcc: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006fd0: ea 26 20 34 st %l5, [ %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( 2006fd4: 07 00 00 40 sethi %hi(0x10000), %g3 2006fd8: ac 11 00 03 or %g4, %g3, %l6 2006fdc: ac 15 80 02 or %l6, %g2, %l6 2006fe0: ac 15 80 01 or %l6, %g1, %l6 2006fe4: ec 26 20 0c st %l6, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006fe8: 7f ff ec 76 call 20021c0 2006fec: 01 00 00 00 nop if ( old_tables ) 2006ff0: 80 a4 e0 00 cmp %l3, 0 2006ff4: 22 80 00 05 be,a 2007008 <_Objects_Extend_information+0x224> 2006ff8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 2006ffc: 40 00 08 01 call 2009000 <_Workspace_Free> 2007000: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2007004: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2007008: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 200700c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2007010: 92 10 00 12 mov %l2, %o1 2007014: 90 07 bf f4 add %fp, -12, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2007018: a3 2c 60 02 sll %l1, 2, %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 200701c: a8 06 20 20 add %i0, 0x20, %l4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2007020: e4 20 40 11 st %l2, [ %g1 + %l1 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 2007024: 27 00 00 40 sethi %hi(0x10000), %l3 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2007028: 40 00 11 4c call 200b558 <_Chain_Initialize> 200702c: a4 10 00 08 mov %o0, %l2 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 2007030: 30 80 00 0c b,a 2007060 <_Objects_Extend_information+0x27c> the_object->id = _Objects_Build_id( 2007034: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2007038: 83 28 60 18 sll %g1, 0x18, %g1 200703c: 85 28 a0 1b sll %g2, 0x1b, %g2 2007040: 82 10 40 13 or %g1, %l3, %g1 2007044: 82 10 40 02 or %g1, %g2, %g1 2007048: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 200704c: 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( 2007050: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2007054: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007058: 7f ff fc ee call 2006410 <_Chain_Append> 200705c: 90 10 00 14 mov %l4, %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 ) { 2007060: 40 00 11 2e call 200b518 <_Chain_Get> 2007064: 90 10 00 12 mov %l2, %o0 2007068: 80 a2 20 00 cmp %o0, 0 200706c: 32 bf ff f2 bne,a 2007034 <_Objects_Extend_information+0x250> 2007070: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 2007074: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2007078: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 200707c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 2007080: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2007084: c8 20 80 11 st %g4, [ %g2 + %l1 ] information->inactive = 2007088: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 200708c: 81 c7 e0 08 ret 2007090: 81 e8 00 00 restore =============================================================================== 0200713c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 200713c: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2007140: 80 a6 60 00 cmp %i1, 0 2007144: 22 80 00 1a be,a 20071ac <_Objects_Get_information+0x70> 2007148: b0 10 20 00 clr %i0 /* * 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 ); 200714c: 40 00 12 89 call 200bb70 <_Objects_API_maximum_class> 2007150: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2007154: 80 a2 20 00 cmp %o0, 0 2007158: 22 80 00 15 be,a 20071ac <_Objects_Get_information+0x70> 200715c: b0 10 20 00 clr %i0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2007160: 80 a6 40 08 cmp %i1, %o0 2007164: 38 80 00 12 bgu,a 20071ac <_Objects_Get_information+0x70> 2007168: b0 10 20 00 clr %i0 return NULL; if ( !_Objects_Information_table[ the_api ] ) 200716c: b1 2e 20 02 sll %i0, 2, %i0 2007170: 03 00 80 69 sethi %hi(0x201a400), %g1 2007174: 82 10 63 10 or %g1, 0x310, %g1 ! 201a710 <_Objects_Information_table> 2007178: c2 00 40 18 ld [ %g1 + %i0 ], %g1 200717c: 80 a0 60 00 cmp %g1, 0 2007180: 02 80 00 0b be 20071ac <_Objects_Get_information+0x70> <== NEVER TAKEN 2007184: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2007188: b3 2e 60 02 sll %i1, 2, %i1 200718c: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 2007190: 80 a6 20 00 cmp %i0, 0 2007194: 02 80 00 06 be 20071ac <_Objects_Get_information+0x70> <== NEVER TAKEN 2007198: 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 ) 200719c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20071a0: 80 a0 60 00 cmp %g1, 0 20071a4: 22 80 00 02 be,a 20071ac <_Objects_Get_information+0x70> 20071a8: b0 10 20 00 clr %i0 return NULL; #endif return info; } 20071ac: 81 c7 e0 08 ret 20071b0: 81 e8 00 00 restore =============================================================================== 02017a18 <_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; 2017a18: c4 02 20 08 ld [ %o0 + 8 ], %g2 if ( information->maximum >= index ) { 2017a1c: 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; 2017a20: 84 22 40 02 sub %o1, %g2, %g2 2017a24: 84 00 a0 01 inc %g2 if ( information->maximum >= index ) { 2017a28: 80 a0 40 02 cmp %g1, %g2 2017a2c: 0a 80 00 09 bcs 2017a50 <_Objects_Get_no_protection+0x38> 2017a30: 85 28 a0 02 sll %g2, 2, %g2 if ( (the_object = information->local_table[ index ]) != NULL ) { 2017a34: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2017a38: d0 00 40 02 ld [ %g1 + %g2 ], %o0 2017a3c: 80 a2 20 00 cmp %o0, 0 2017a40: 02 80 00 05 be 2017a54 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 2017a44: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 2017a48: 81 c3 e0 08 retl 2017a4c: 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; 2017a50: 82 10 20 01 mov 1, %g1 2017a54: 90 10 20 00 clr %o0 return NULL; } 2017a58: 81 c3 e0 08 retl 2017a5c: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 020088b0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 20088b0: 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; 20088b4: 92 96 20 00 orcc %i0, 0, %o1 20088b8: 12 80 00 06 bne 20088d0 <_Objects_Id_to_name+0x20> 20088bc: 83 32 60 18 srl %o1, 0x18, %g1 20088c0: 03 00 80 80 sethi %hi(0x2020000), %g1 20088c4: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 2020090 <_Thread_Executing> 20088c8: 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); 20088cc: 83 32 60 18 srl %o1, 0x18, %g1 20088d0: 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 ) 20088d4: 84 00 7f ff add %g1, -1, %g2 20088d8: 80 a0 a0 03 cmp %g2, 3 20088dc: 18 80 00 14 bgu 200892c <_Objects_Id_to_name+0x7c> 20088e0: 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 ] ) 20088e4: 10 80 00 14 b 2008934 <_Objects_Id_to_name+0x84> 20088e8: 05 00 80 7f sethi %hi(0x201fc00), %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 20088ec: 85 28 a0 02 sll %g2, 2, %g2 20088f0: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 20088f4: 80 a2 20 00 cmp %o0, 0 20088f8: 02 80 00 0d be 200892c <_Objects_Id_to_name+0x7c> <== NEVER TAKEN 20088fc: 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 ); 2008900: 7f ff ff cf call 200883c <_Objects_Get> 2008904: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 2008908: 80 a2 20 00 cmp %o0, 0 200890c: 02 80 00 08 be 200892c <_Objects_Id_to_name+0x7c> 2008910: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 2008914: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 2008918: b0 10 20 00 clr %i0 200891c: 40 00 02 4b call 2009248 <_Thread_Enable_dispatch> 2008920: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008924: 81 c7 e0 08 ret 2008928: 81 e8 00 00 restore } 200892c: 81 c7 e0 08 ret 2008930: 91 e8 20 03 restore %g0, 3, %o0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 2008934: 84 10 a3 30 or %g2, 0x330, %g2 2008938: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200893c: 80 a0 60 00 cmp %g1, 0 2008940: 12 bf ff eb bne 20088ec <_Objects_Id_to_name+0x3c> 2008944: 85 32 60 1b srl %o1, 0x1b, %g2 2008948: 30 bf ff f9 b,a 200892c <_Objects_Id_to_name+0x7c> =============================================================================== 0200729c <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 200729c: 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; 20072a0: 05 00 80 69 sethi %hi(0x201a400), %g2 20072a4: 83 2e 60 02 sll %i1, 2, %g1 20072a8: 84 10 a3 10 or %g2, 0x310, %g2 20072ac: 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; 20072b0: 85 2f 20 10 sll %i4, 0x10, %g2 20072b4: 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; 20072b8: 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; 20072bc: 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; 20072c0: 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; 20072c4: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 20072c8: 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; 20072cc: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 20072d0: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 20072d4: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 20072d8: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 20072dc: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 20072e0: 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; 20072e4: 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 = 20072e8: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 20072ec: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 20072f0: 80 a0 a0 00 cmp %g2, 0 20072f4: 02 80 00 09 be 2007318 <_Objects_Initialize_information+0x7c> 20072f8: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 20072fc: 80 a6 e0 00 cmp %i3, 0 2007300: 12 80 00 07 bne 200731c <_Objects_Initialize_information+0x80> 2007304: 07 00 80 69 sethi %hi(0x201a400), %g3 _Internal_error_Occurred( 2007308: 90 10 20 00 clr %o0 200730c: 92 10 20 01 mov 1, %o1 2007310: 7f ff fe 59 call 2006c74 <_Internal_error_Occurred> 2007314: 94 10 20 14 mov 0x14, %o2 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; 2007318: 07 00 80 69 sethi %hi(0x201a400), %g3 200731c: 86 10 e0 5c or %g3, 0x5c, %g3 ! 201a45c /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 2007320: 80 a0 00 1b cmp %g0, %i3 2007324: b3 2e 60 18 sll %i1, 0x18, %i1 2007328: 84 40 20 00 addx %g0, 0, %g2 200732c: 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; 2007330: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 2007334: 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 = 2007338: 07 00 00 40 sethi %hi(0x10000), %g3 200733c: b2 16 40 03 or %i1, %g3, %i1 2007340: b4 16 40 1a or %i1, %i2, %i2 2007344: b4 16 80 02 or %i2, %g2, %i2 2007348: 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) & 200734c: 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) ) 2007350: 80 88 60 03 btst 3, %g1 2007354: 12 80 00 03 bne 2007360 <_Objects_Initialize_information+0xc4><== NEVER TAKEN 2007358: 84 08 bf fc and %g2, -4, %g2 200735c: 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); 2007360: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 2007364: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 2007368: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 200736c: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 2007370: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 2007374: 80 a6 e0 00 cmp %i3, 0 2007378: 02 80 00 04 be 2007388 <_Objects_Initialize_information+0xec> 200737c: 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 ); 2007380: 7f ff fe 99 call 2006de4 <_Objects_Extend_information> 2007384: 81 e8 00 00 restore 2007388: 81 c7 e0 08 ret 200738c: 81 e8 00 00 restore =============================================================================== 0200b2b0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200b2b0: 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 ]; 200b2b4: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 200b2b8: 80 a4 20 00 cmp %l0, 0 200b2bc: 02 80 00 1d be 200b330 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN 200b2c0: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200b2c4: 7f ff db bb call 20021b0 200b2c8: 01 00 00 00 nop signal_set = asr->signals_posted; 200b2cc: e6 04 20 14 ld [ %l0 + 0x14 ], %l3 asr->signals_posted = 0; 200b2d0: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 200b2d4: 7f ff db bb call 20021c0 200b2d8: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200b2dc: 80 a4 e0 00 cmp %l3, 0 200b2e0: 02 80 00 14 be 200b330 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN 200b2e4: a2 07 bf fc add %fp, -4, %l1 return; asr->nest_level += 1; 200b2e8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b2ec: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200b2f0: 82 00 60 01 inc %g1 200b2f4: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b2f8: 94 10 00 11 mov %l1, %o2 200b2fc: 25 00 00 3f sethi %hi(0xfc00), %l2 200b300: 40 00 07 55 call 200d054 200b304: 92 14 a3 ff or %l2, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200b308: c2 04 20 0c ld [ %l0 + 0xc ], %g1 200b30c: 9f c0 40 00 call %g1 200b310: 90 10 00 13 mov %l3, %o0 asr->nest_level -= 1; 200b314: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b318: 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; 200b31c: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b320: 92 14 a3 ff or %l2, 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; 200b324: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200b328: 40 00 07 4b call 200d054 200b32c: 94 10 00 11 mov %l1, %o2 200b330: 81 c7 e0 08 ret 200b334: 81 e8 00 00 restore =============================================================================== 020070e4 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20070e4: 9d e3 bf 98 save %sp, -104, %sp 20070e8: 11 00 80 81 sethi %hi(0x2020400), %o0 20070ec: 92 10 00 18 mov %i0, %o1 20070f0: 90 12 20 48 or %o0, 0x48, %o0 20070f4: 40 00 07 81 call 2008ef8 <_Objects_Get> 20070f8: 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 ) { 20070fc: c2 07 bf fc ld [ %fp + -4 ], %g1 2007100: 80 a0 60 00 cmp %g1, 0 2007104: 12 80 00 26 bne 200719c <_Rate_monotonic_Timeout+0xb8> <== NEVER TAKEN 2007108: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: the_thread = the_period->owner; 200710c: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2007110: 03 00 00 10 sethi %hi(0x4000), %g1 2007114: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2007118: 80 88 80 01 btst %g2, %g1 200711c: 22 80 00 0c be,a 200714c <_Rate_monotonic_Timeout+0x68> 2007120: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 the_thread->Wait.id == the_period->Object.id ) { 2007124: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2007128: c2 04 20 08 ld [ %l0 + 8 ], %g1 200712c: 80 a0 80 01 cmp %g2, %g1 2007130: 32 80 00 07 bne,a 200714c <_Rate_monotonic_Timeout+0x68> 2007134: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007138: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200713c: 40 00 08 b9 call 2009420 <_Thread_Clear_state> 2007140: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 2007144: 10 80 00 08 b 2007164 <_Rate_monotonic_Timeout+0x80> 2007148: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 200714c: 80 a0 60 01 cmp %g1, 1 2007150: 12 80 00 0e bne 2007188 <_Rate_monotonic_Timeout+0xa4> 2007154: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007158: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 200715c: 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; 2007160: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2007164: 7f ff fe 3e call 2006a5c <_Rate_monotonic_Initiate_statistics> 2007168: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200716c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007170: 92 04 20 10 add %l0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007174: c2 24 20 1c st %g1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007178: 11 00 80 81 sethi %hi(0x2020400), %o0 200717c: 40 00 0e ed call 200ad30 <_Watchdog_Insert> 2007180: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 20206a0 <_Watchdog_Ticks_chain> 2007184: 30 80 00 02 b,a 200718c <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2007188: 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; 200718c: 03 00 80 81 sethi %hi(0x2020400), %g1 2007190: c4 00 61 c0 ld [ %g1 + 0x1c0 ], %g2 ! 20205c0 <_Thread_Dispatch_disable_level> 2007194: 84 00 bf ff add %g2, -1, %g2 2007198: c4 20 61 c0 st %g2, [ %g1 + 0x1c0 ] 200719c: 81 c7 e0 08 ret 20071a0: 81 e8 00 00 restore =============================================================================== 02006af4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2006af4: 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(); 2006af8: 03 00 80 81 sethi %hi(0x2020400), %g1 if ((!the_tod) || 2006afc: 80 a6 20 00 cmp %i0, 0 2006b00: 02 80 00 2d be 2006bb4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2006b04: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 (the_tod->ticks >= ticks_per_second) || 2006b08: 11 00 03 d0 sethi %hi(0xf4000), %o0 2006b0c: 40 00 56 45 call 201c420 <.udiv> 2006b10: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 2006b14: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2006b18: 80 a0 40 08 cmp %g1, %o0 2006b1c: 1a 80 00 26 bcc 2006bb4 <_TOD_Validate+0xc0> 2006b20: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 2006b24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006b28: 80 a0 60 3b cmp %g1, 0x3b 2006b2c: 18 80 00 22 bgu 2006bb4 <_TOD_Validate+0xc0> 2006b30: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 2006b34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2006b38: 80 a0 60 3b cmp %g1, 0x3b 2006b3c: 18 80 00 1e bgu 2006bb4 <_TOD_Validate+0xc0> 2006b40: 01 00 00 00 nop (the_tod->hour >= TOD_HOURS_PER_DAY) || 2006b44: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2006b48: 80 a0 60 17 cmp %g1, 0x17 2006b4c: 18 80 00 1a bgu 2006bb4 <_TOD_Validate+0xc0> 2006b50: 01 00 00 00 nop (the_tod->month == 0) || 2006b54: 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) || 2006b58: 80 a0 60 00 cmp %g1, 0 2006b5c: 02 80 00 16 be 2006bb4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2006b60: 80 a0 60 0c cmp %g1, 0xc 2006b64: 18 80 00 14 bgu 2006bb4 <_TOD_Validate+0xc0> 2006b68: 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) || 2006b6c: c6 06 00 00 ld [ %i0 ], %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) || 2006b70: 80 a0 e7 c3 cmp %g3, 0x7c3 2006b74: 08 80 00 10 bleu 2006bb4 <_TOD_Validate+0xc0> 2006b78: 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) ) 2006b7c: c4 06 20 08 ld [ %i0 + 8 ], %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) || 2006b80: 80 a0 a0 00 cmp %g2, 0 2006b84: 02 80 00 0c be 2006bb4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2006b88: 80 88 e0 03 btst 3, %g3 2006b8c: 07 00 80 7b sethi %hi(0x201ec00), %g3 (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 ) 2006b90: 12 80 00 03 bne 2006b9c <_TOD_Validate+0xa8> 2006b94: 86 10 e1 1c or %g3, 0x11c, %g3 ! 201ed1c <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2006b98: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2006b9c: 83 28 60 02 sll %g1, 2, %g1 2006ba0: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2006ba4: 80 a0 40 02 cmp %g1, %g2 2006ba8: b0 60 3f ff subx %g0, -1, %i0 2006bac: 81 c7 e0 08 ret 2006bb0: 81 e8 00 00 restore if ( the_tod->day > days_in_month ) return false; return true; } 2006bb4: 81 c7 e0 08 ret 2006bb8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200756c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 200756c: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 2007570: 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 ); 2007574: 40 00 04 47 call 2008690 <_Thread_Set_transient> 2007578: 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 ) 200757c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007580: a0 10 00 18 mov %i0, %l0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 2007584: 80 a0 40 19 cmp %g1, %i1 2007588: 02 80 00 04 be 2007598 <_Thread_Change_priority+0x2c> 200758c: 92 10 00 19 mov %i1, %o1 _Thread_Set_priority( the_thread, new_priority ); 2007590: 40 00 03 c3 call 200849c <_Thread_Set_priority> 2007594: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 2007598: 7f ff eb 06 call 20021b0 200759c: 01 00 00 00 nop 20075a0: 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; 20075a4: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 20075a8: 80 a4 a0 04 cmp %l2, 4 20075ac: 02 80 00 10 be 20075ec <_Thread_Change_priority+0x80> 20075b0: a2 0c 60 04 and %l1, 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 20075b4: 80 a4 60 00 cmp %l1, 0 20075b8: 12 80 00 03 bne 20075c4 <_Thread_Change_priority+0x58> <== NEVER TAKEN 20075bc: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 20075c0: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 20075c4: 7f ff ea ff call 20021c0 20075c8: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 20075cc: 03 00 00 ef sethi %hi(0x3bc00), %g1 20075d0: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 20075d4: 80 8c 80 01 btst %l2, %g1 20075d8: 02 80 00 5c be 2007748 <_Thread_Change_priority+0x1dc> 20075dc: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 20075e0: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 20075e4: 40 00 03 81 call 20083e8 <_Thread_queue_Requeue> 20075e8: 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 ) ) { 20075ec: 80 a4 60 00 cmp %l1, 0 20075f0: 12 80 00 1c bne 2007660 <_Thread_Change_priority+0xf4> <== NEVER TAKEN 20075f4: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 20075f8: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 20075fc: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 2007600: c8 10 80 00 lduh [ %g2 ], %g4 _Priority_Major_bit_map |= the_priority_map->ready_major; 2007604: 03 00 80 6a sethi %hi(0x201a800), %g1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007608: 86 11 00 03 or %g4, %g3, %g3 200760c: c6 30 80 00 sth %g3, [ %g2 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 2007610: c4 10 60 64 lduh [ %g1 + 0x64 ], %g2 2007614: c6 14 20 94 lduh [ %l0 + 0x94 ], %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 ); 2007618: c0 24 20 10 clr [ %l0 + 0x10 ] 200761c: 84 10 c0 02 or %g3, %g2, %g2 2007620: c4 30 60 64 sth %g2, [ %g1 + 0x64 ] _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 2007624: 80 8e a0 ff btst 0xff, %i2 2007628: 02 80 00 08 be 2007648 <_Thread_Change_priority+0xdc> 200762c: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2007630: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2007634: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 2007638: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 200763c: 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; 2007640: 10 80 00 08 b 2007660 <_Thread_Change_priority+0xf4> 2007644: c4 24 00 00 st %g2, [ %l0 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007648: 84 00 60 04 add %g1, 4, %g2 200764c: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 2007650: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 2007654: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007658: 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; 200765c: e0 20 80 00 st %l0, [ %g2 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 2007660: 7f ff ea d8 call 20021c0 2007664: 90 10 00 18 mov %i0, %o0 2007668: 7f ff ea d2 call 20021b0 200766c: 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 ); 2007670: 03 00 80 6a sethi %hi(0x201a800), %g1 2007674: c4 10 60 64 lduh [ %g1 + 0x64 ], %g2 ! 201a864 <_Priority_Major_bit_map> */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 2007678: 03 00 80 69 sethi %hi(0x201a400), %g1 200767c: 85 28 a0 10 sll %g2, 0x10, %g2 2007680: da 00 63 04 ld [ %g1 + 0x304 ], %o5 2007684: 87 30 a0 10 srl %g2, 0x10, %g3 2007688: 03 00 80 63 sethi %hi(0x2018c00), %g1 200768c: 80 a0 e0 ff cmp %g3, 0xff 2007690: 18 80 00 05 bgu 20076a4 <_Thread_Change_priority+0x138> 2007694: 82 10 62 90 or %g1, 0x290, %g1 2007698: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 200769c: 10 80 00 04 b 20076ac <_Thread_Change_priority+0x140> 20076a0: 84 00 a0 08 add %g2, 8, %g2 20076a4: 85 30 a0 18 srl %g2, 0x18, %g2 20076a8: c4 08 40 02 ldub [ %g1 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 20076ac: 83 28 a0 10 sll %g2, 0x10, %g1 20076b0: 07 00 80 6a sethi %hi(0x201a800), %g3 20076b4: 83 30 60 0f srl %g1, 0xf, %g1 20076b8: 86 10 e0 e0 or %g3, 0xe0, %g3 20076bc: c6 10 c0 01 lduh [ %g3 + %g1 ], %g3 20076c0: 03 00 80 63 sethi %hi(0x2018c00), %g1 20076c4: 87 28 e0 10 sll %g3, 0x10, %g3 20076c8: 89 30 e0 10 srl %g3, 0x10, %g4 20076cc: 80 a1 20 ff cmp %g4, 0xff 20076d0: 18 80 00 05 bgu 20076e4 <_Thread_Change_priority+0x178> 20076d4: 82 10 62 90 or %g1, 0x290, %g1 20076d8: c2 08 40 04 ldub [ %g1 + %g4 ], %g1 20076dc: 10 80 00 04 b 20076ec <_Thread_Change_priority+0x180> 20076e0: 82 00 60 08 add %g1, 8, %g1 20076e4: 87 30 e0 18 srl %g3, 0x18, %g3 20076e8: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 20076ec: 83 28 60 10 sll %g1, 0x10, %g1 20076f0: 83 30 60 10 srl %g1, 0x10, %g1 20076f4: 85 28 a0 10 sll %g2, 0x10, %g2 20076f8: 85 30 a0 0c srl %g2, 0xc, %g2 20076fc: 84 00 40 02 add %g1, %g2, %g2 2007700: 83 28 a0 04 sll %g2, 4, %g1 2007704: 85 28 a0 02 sll %g2, 2, %g2 2007708: 84 20 40 02 sub %g1, %g2, %g2 200770c: c4 03 40 02 ld [ %o5 + %g2 ], %g2 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 2007710: 03 00 80 6a sethi %hi(0x201a800), %g1 2007714: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201a870 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007718: 07 00 80 6a sethi %hi(0x201a800), %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() && 200771c: 80 a0 40 02 cmp %g1, %g2 2007720: 02 80 00 08 be 2007740 <_Thread_Change_priority+0x1d4> 2007724: c4 20 e0 40 st %g2, [ %g3 + 0x40 ] _Thread_Executing->is_preemptible ) 2007728: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 200772c: 80 a0 60 00 cmp %g1, 0 2007730: 02 80 00 04 be 2007740 <_Thread_Change_priority+0x1d4> 2007734: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 2007738: 03 00 80 6a sethi %hi(0x201a800), %g1 200773c: c4 28 60 80 stb %g2, [ %g1 + 0x80 ] ! 201a880 <_Context_Switch_necessary> _ISR_Enable( level ); 2007740: 7f ff ea a0 call 20021c0 2007744: 81 e8 00 00 restore 2007748: 81 c7 e0 08 ret 200774c: 81 e8 00 00 restore =============================================================================== 02007750 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 2007750: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2007754: 7f ff ea 97 call 20021b0 2007758: a0 10 00 18 mov %i0, %l0 200775c: b0 10 00 08 mov %o0, %i0 current_state = the_thread->current_state; 2007760: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & state ) { 2007764: 80 8e 40 01 btst %i1, %g1 2007768: 02 80 00 2d be 200781c <_Thread_Clear_state+0xcc> 200776c: 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); 2007770: 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 ) ) { 2007774: 80 a6 60 00 cmp %i1, 0 2007778: 12 80 00 29 bne 200781c <_Thread_Clear_state+0xcc> 200777c: f2 24 20 10 st %i1, [ %l0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007780: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 2007784: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 2007788: c8 10 80 00 lduh [ %g2 ], %g4 200778c: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 2007790: 86 11 00 03 or %g4, %g3, %g3 2007794: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007798: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 200779c: da 14 20 94 lduh [ %l0 + 0x94 ], %o5 20077a0: c4 24 00 00 st %g2, [ %l0 ] 20077a4: 07 00 80 6a sethi %hi(0x201a800), %g3 old_last_node = the_chain->last; 20077a8: c4 00 60 08 ld [ %g1 + 8 ], %g2 20077ac: c8 10 e0 64 lduh [ %g3 + 0x64 ], %g4 the_chain->last = the_node; 20077b0: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 20077b4: c4 24 20 04 st %g2, [ %l0 + 4 ] 20077b8: 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; 20077bc: e0 20 80 00 st %l0, [ %g2 ] 20077c0: c2 30 e0 64 sth %g1, [ %g3 + 0x64 ] _ISR_Flash( level ); 20077c4: 7f ff ea 7f call 20021c0 20077c8: 01 00 00 00 nop 20077cc: 7f ff ea 79 call 20021b0 20077d0: 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 ) { 20077d4: 05 00 80 6a sethi %hi(0x201a800), %g2 20077d8: c6 00 a0 40 ld [ %g2 + 0x40 ], %g3 ! 201a840 <_Thread_Heir> 20077dc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 20077e0: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 20077e4: 80 a0 40 03 cmp %g1, %g3 20077e8: 1a 80 00 0d bcc 200781c <_Thread_Clear_state+0xcc> 20077ec: 07 00 80 6a sethi %hi(0x201a800), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 20077f0: c6 00 e0 70 ld [ %g3 + 0x70 ], %g3 ! 201a870 <_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; 20077f4: e0 20 a0 40 st %l0, [ %g2 + 0x40 ] if ( _Thread_Executing->is_preemptible || 20077f8: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2 20077fc: 80 a0 a0 00 cmp %g2, 0 2007800: 12 80 00 05 bne 2007814 <_Thread_Clear_state+0xc4> 2007804: 84 10 20 01 mov 1, %g2 2007808: 80 a0 60 00 cmp %g1, 0 200780c: 12 80 00 04 bne 200781c <_Thread_Clear_state+0xcc> <== ALWAYS TAKEN 2007810: 01 00 00 00 nop the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 2007814: 03 00 80 6a sethi %hi(0x201a800), %g1 2007818: c4 28 60 80 stb %g2, [ %g1 + 0x80 ] ! 201a880 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 200781c: 7f ff ea 69 call 20021c0 2007820: 81 e8 00 00 restore =============================================================================== 020079d4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 20079d4: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 20079d8: 90 10 00 18 mov %i0, %o0 20079dc: 40 00 00 7c call 2007bcc <_Thread_Get> 20079e0: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20079e4: c2 07 bf fc ld [ %fp + -4 ], %g1 20079e8: 80 a0 60 00 cmp %g1, 0 20079ec: 12 80 00 08 bne 2007a0c <_Thread_Delay_ended+0x38> <== NEVER TAKEN 20079f0: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 20079f4: 7f ff ff 57 call 2007750 <_Thread_Clear_state> 20079f8: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 20079fc: 03 00 80 69 sethi %hi(0x201a400), %g1 2007a00: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201a7b0 <_Thread_Dispatch_disable_level> 2007a04: 84 00 bf ff add %g2, -1, %g2 2007a08: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 2007a0c: 81 c7 e0 08 ret 2007a10: 81 e8 00 00 restore =============================================================================== 02007a14 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2007a14: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 2007a18: 2f 00 80 6a sethi %hi(0x201a800), %l7 _ISR_Disable( level ); 2007a1c: 7f ff e9 e5 call 20021b0 2007a20: e0 05 e0 70 ld [ %l7 + 0x70 ], %l0 ! 201a870 <_Thread_Executing> while ( _Context_Switch_necessary == true ) { 2007a24: 2d 00 80 6a sethi %hi(0x201a800), %l6 2007a28: 33 00 80 69 sethi %hi(0x201a400), %i1 heir = _Thread_Heir; 2007a2c: 35 00 80 6a sethi %hi(0x201a800), %i2 #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; 2007a30: 37 00 80 69 sethi %hi(0x201a400), %i3 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2007a34: 25 00 80 6a sethi %hi(0x201a800), %l2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007a38: 39 00 80 6a sethi %hi(0x201a800), %i4 #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 ); 2007a3c: 2b 00 80 6a sethi %hi(0x201a800), %l5 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; 2007a40: ae 15 e0 70 or %l7, 0x70, %l7 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2007a44: ac 15 a0 80 or %l6, 0x80, %l6 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2007a48: b2 16 63 b0 or %i1, 0x3b0, %i1 ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 2007a4c: b4 16 a0 40 or %i2, 0x40, %i2 #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; 2007a50: b6 16 e3 08 or %i3, 0x308, %i3 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2007a54: a4 14 a0 78 or %l2, 0x78, %l2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007a58: b8 17 20 3c or %i4, 0x3c, %i4 2007a5c: aa 15 60 38 or %l5, 0x38, %l5 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2007a60: ba 10 20 01 mov 1, %i5 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2007a64: a8 07 bf f8 add %fp, -8, %l4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2007a68: 10 80 00 37 b 2007b44 <_Thread_Dispatch+0x130> 2007a6c: a6 07 bf f0 add %fp, -16, %l3 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2007a70: fa 26 40 00 st %i5, [ %i1 ] _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 2007a74: 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; 2007a78: 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 ) 2007a7c: 80 a0 60 01 cmp %g1, 1 2007a80: 12 80 00 04 bne 2007a90 <_Thread_Dispatch+0x7c> 2007a84: e2 25 c0 00 st %l1, [ %l7 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007a88: c2 06 c0 00 ld [ %i3 ], %g1 2007a8c: c2 24 60 78 st %g1, [ %l1 + 0x78 ] _ISR_Enable( level ); 2007a90: 7f ff e9 cc call 20021c0 2007a94: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2007a98: 40 00 0f 2a call 200b740 <_TOD_Get_uptime> 2007a9c: 90 10 00 14 mov %l4, %o0 _Timestamp_Subtract( 2007aa0: 90 10 00 12 mov %l2, %o0 2007aa4: 92 10 00 14 mov %l4, %o1 2007aa8: 40 00 03 ca call 20089d0 <_Timespec_Subtract> 2007aac: 94 10 00 13 mov %l3, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2007ab0: 90 04 20 84 add %l0, 0x84, %o0 2007ab4: 40 00 03 ad call 2008968 <_Timespec_Add_to> 2007ab8: 92 10 00 13 mov %l3, %o1 _Thread_Time_of_last_context_switch = uptime; 2007abc: c4 07 bf f8 ld [ %fp + -8 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007ac0: c2 07 00 00 ld [ %i4 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2007ac4: c4 24 80 00 st %g2, [ %l2 ] 2007ac8: c4 07 bf fc ld [ %fp + -4 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007acc: 80 a0 60 00 cmp %g1, 0 2007ad0: 02 80 00 06 be 2007ae8 <_Thread_Dispatch+0xd4> <== NEVER TAKEN 2007ad4: c4 24 a0 04 st %g2, [ %l2 + 4 ] executing->libc_reent = *_Thread_libc_reent; 2007ad8: c4 00 40 00 ld [ %g1 ], %g2 2007adc: c4 24 21 5c st %g2, [ %l0 + 0x15c ] *_Thread_libc_reent = heir->libc_reent; 2007ae0: c4 04 61 5c ld [ %l1 + 0x15c ], %g2 2007ae4: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2007ae8: 90 10 00 10 mov %l0, %o0 2007aec: 40 00 04 6e call 2008ca4 <_User_extensions_Thread_switch> 2007af0: 92 10 00 11 mov %l1, %o1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 2007af4: 92 04 60 d0 add %l1, 0xd0, %o1 2007af8: 40 00 05 9c call 2009168 <_CPU_Context_switch> 2007afc: 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) && 2007b00: c2 04 21 58 ld [ %l0 + 0x158 ], %g1 2007b04: 80 a0 60 00 cmp %g1, 0 2007b08: 02 80 00 0d be 2007b3c <_Thread_Dispatch+0x128> 2007b0c: 01 00 00 00 nop 2007b10: d0 05 40 00 ld [ %l5 ], %o0 2007b14: 80 a4 00 08 cmp %l0, %o0 2007b18: 02 80 00 09 be 2007b3c <_Thread_Dispatch+0x128> 2007b1c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2007b20: 02 80 00 04 be 2007b30 <_Thread_Dispatch+0x11c> 2007b24: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2007b28: 40 00 05 56 call 2009080 <_CPU_Context_save_fp> 2007b2c: 90 02 21 58 add %o0, 0x158, %o0 _Context_Restore_fp( &executing->fp_context ); 2007b30: 40 00 05 71 call 20090f4 <_CPU_Context_restore_fp> 2007b34: 90 04 21 58 add %l0, 0x158, %o0 _Thread_Allocated_fp = executing; 2007b38: e0 25 40 00 st %l0, [ %l5 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 2007b3c: 7f ff e9 9d call 20021b0 2007b40: e0 05 c0 00 ld [ %l7 ], %l0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2007b44: c2 0d 80 00 ldub [ %l6 ], %g1 2007b48: 80 a0 60 00 cmp %g1, 0 2007b4c: 32 bf ff c9 bne,a 2007a70 <_Thread_Dispatch+0x5c> 2007b50: e2 06 80 00 ld [ %i2 ], %l1 executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 2007b54: 03 00 80 69 sethi %hi(0x201a400), %g1 2007b58: c0 20 63 b0 clr [ %g1 + 0x3b0 ] ! 201a7b0 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 2007b5c: 7f ff e9 99 call 20021c0 2007b60: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 2007b64: 03 00 80 6a sethi %hi(0x201a800), %g1 2007b68: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201a854 <_Thread_Do_post_task_switch_extension> 2007b6c: 80 a0 60 00 cmp %g1, 0 2007b70: 12 80 00 06 bne 2007b88 <_Thread_Dispatch+0x174> <== NEVER TAKEN 2007b74: 01 00 00 00 nop executing->do_post_task_switch_extension ) { 2007b78: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1 2007b7c: 80 a0 60 00 cmp %g1, 0 2007b80: 02 80 00 04 be 2007b90 <_Thread_Dispatch+0x17c> 2007b84: 01 00 00 00 nop executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 2007b88: 7f ff f9 d0 call 20062c8 <_API_extensions_Run_postswitch> 2007b8c: c0 2c 20 74 clrb [ %l0 + 0x74 ] 2007b90: 81 c7 e0 08 ret 2007b94: 81 e8 00 00 restore =============================================================================== 0200d454 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200d454: 03 00 80 6a sethi %hi(0x201a800), %g1 200d458: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201a870 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200d45c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200d460: 80 a0 a0 00 cmp %g2, 0 200d464: 12 80 00 0b bne 200d490 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 200d468: 84 10 20 01 mov 1, %g2 200d46c: 05 00 80 6a sethi %hi(0x201a800), %g2 200d470: c4 00 a0 40 ld [ %g2 + 0x40 ], %g2 ! 201a840 <_Thread_Heir> 200d474: 80 a0 40 02 cmp %g1, %g2 200d478: 02 80 00 0b be 200d4a4 <_Thread_Evaluate_mode+0x50> 200d47c: 01 00 00 00 nop ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 200d480: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 200d484: 80 a0 60 00 cmp %g1, 0 200d488: 02 80 00 07 be 200d4a4 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 200d48c: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 200d490: 03 00 80 6a sethi %hi(0x201a800), %g1 200d494: 90 10 20 01 mov 1, %o0 200d498: c4 28 60 80 stb %g2, [ %g1 + 0x80 ] return true; 200d49c: 81 c3 e0 08 retl 200d4a0: 01 00 00 00 nop } return false; } 200d4a4: 81 c3 e0 08 retl 200d4a8: 90 10 20 00 clr %o0 ! 0 =============================================================================== 0200d4ac <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200d4ac: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200d4b0: 03 00 80 6a sethi %hi(0x201a800), %g1 200d4b4: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 201a870 <_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(); 200d4b8: 3f 00 80 35 sethi %hi(0x200d400), %i7 200d4bc: be 17 e0 ac or %i7, 0xac, %i7 ! 200d4ac <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200d4c0: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200d4c4: 7f ff d3 3f call 20021c0 200d4c8: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200d4cc: 03 00 80 69 sethi %hi(0x201a400), %g1 doneConstructors = 1; 200d4d0: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200d4d4: e2 08 60 6c ldub [ %g1 + 0x6c ], %l1 doneConstructors = 1; 200d4d8: c4 28 60 6c stb %g2, [ %g1 + 0x6c ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200d4dc: c2 04 21 58 ld [ %l0 + 0x158 ], %g1 200d4e0: 80 a0 60 00 cmp %g1, 0 200d4e4: 02 80 00 0c be 200d514 <_Thread_Handler+0x68> 200d4e8: 03 00 80 6a sethi %hi(0x201a800), %g1 #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 ); 200d4ec: d0 00 60 38 ld [ %g1 + 0x38 ], %o0 ! 201a838 <_Thread_Allocated_fp> 200d4f0: 80 a4 00 08 cmp %l0, %o0 200d4f4: 02 80 00 08 be 200d514 <_Thread_Handler+0x68> 200d4f8: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200d4fc: 22 80 00 06 be,a 200d514 <_Thread_Handler+0x68> 200d500: e0 20 60 38 st %l0, [ %g1 + 0x38 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200d504: 7f ff ee df call 2009080 <_CPU_Context_save_fp> 200d508: 90 02 21 58 add %o0, 0x158, %o0 _Thread_Allocated_fp = executing; 200d50c: 03 00 80 6a sethi %hi(0x201a800), %g1 200d510: e0 20 60 38 st %l0, [ %g1 + 0x38 ] ! 201a838 <_Thread_Allocated_fp> /* * 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 ); 200d514: 7f ff ed 71 call 2008ad8 <_User_extensions_Thread_begin> 200d518: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200d51c: 7f ff e9 9f call 2007b98 <_Thread_Enable_dispatch> 200d520: a3 2c 60 18 sll %l1, 0x18, %l1 /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 200d524: 80 a4 60 00 cmp %l1, 0 200d528: 32 80 00 05 bne,a 200d53c <_Thread_Handler+0x90> 200d52c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 INIT_NAME (); 200d530: 40 00 31 bc call 2019c20 <_init> 200d534: 01 00 00 00 nop } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200d538: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200d53c: 80 a0 60 00 cmp %g1, 0 200d540: 12 80 00 06 bne 200d558 <_Thread_Handler+0xac> <== NEVER TAKEN 200d544: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200d548: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200d54c: 9f c0 40 00 call %g1 200d550: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200d554: d0 24 20 28 st %o0, [ %l0 + 0x28 ] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 200d558: 7f ff ed 71 call 2008b1c <_User_extensions_Thread_exitted> 200d55c: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200d560: 90 10 20 00 clr %o0 200d564: 92 10 20 01 mov 1, %o1 200d568: 7f ff e5 c3 call 2006c74 <_Internal_error_Occurred> 200d56c: 94 10 20 06 mov 6, %o2 =============================================================================== 02007c78 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007c78: 9d e3 bf a0 save %sp, -96, %sp 2007c7c: 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; 2007c80: 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 ) { 2007c84: e0 00 40 00 ld [ %g1 ], %l0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 2007c88: c0 26 61 64 clr [ %i1 + 0x164 ] 2007c8c: c0 26 61 68 clr [ %i1 + 0x168 ] extensions_area = NULL; the_thread->libc_reent = NULL; 2007c90: 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 ) { 2007c94: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 /* * 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 ); 2007c98: 90 10 00 19 mov %i1, %o0 2007c9c: 40 00 02 a2 call 2008724 <_Thread_Stack_Allocate> 2007ca0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2007ca4: 80 a2 00 1b cmp %o0, %i3 2007ca8: 0a 80 00 04 bcs 2007cb8 <_Thread_Initialize+0x40> 2007cac: 80 a2 20 00 cmp %o0, 0 2007cb0: 32 80 00 04 bne,a 2007cc0 <_Thread_Initialize+0x48> <== ALWAYS TAKEN 2007cb4: c2 06 60 cc ld [ %i1 + 0xcc ], %g1 2007cb8: 81 c7 e0 08 ret 2007cbc: 91 e8 20 00 restore %g0, 0, %o0 void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size; 2007cc0: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2007cc4: 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 ) { 2007cc8: 80 8f 20 ff btst 0xff, %i4 2007ccc: 02 80 00 08 be 2007cec <_Thread_Initialize+0x74> 2007cd0: a4 10 20 00 clr %l2 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2007cd4: 90 10 20 88 mov 0x88, %o0 2007cd8: 40 00 04 c1 call 2008fdc <_Workspace_Allocate> 2007cdc: b6 10 20 00 clr %i3 if ( !fp_area ) 2007ce0: a4 92 20 00 orcc %o0, 0, %l2 2007ce4: 22 80 00 3e be,a 2007ddc <_Thread_Initialize+0x164> 2007ce8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007cec: 03 00 80 6a sethi %hi(0x201a800), %g1 2007cf0: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 ! 201a850 <_Thread_Maximum_extensions> 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; 2007cf4: e4 26 61 58 st %l2, [ %i1 + 0x158 ] the_thread->Start.fp_context = fp_area; 2007cf8: e4 26 60 c8 st %l2, [ %i1 + 0xc8 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007cfc: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2007d00: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007d04: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007d08: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007d0c: 80 a2 20 00 cmp %o0, 0 2007d10: 02 80 00 08 be 2007d30 <_Thread_Initialize+0xb8> 2007d14: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 2007d18: 90 02 20 01 inc %o0 2007d1c: 40 00 04 b0 call 2008fdc <_Workspace_Allocate> 2007d20: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 2007d24: b6 92 20 00 orcc %o0, 0, %i3 2007d28: 22 80 00 2d be,a 2007ddc <_Thread_Initialize+0x164> 2007d2c: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 2007d30: 80 a6 e0 00 cmp %i3, 0 2007d34: 02 80 00 0c be 2007d64 <_Thread_Initialize+0xec> 2007d38: f6 26 61 6c st %i3, [ %i1 + 0x16c ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2007d3c: 03 00 80 6a sethi %hi(0x201a800), %g1 2007d40: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 201a850 <_Thread_Maximum_extensions> 2007d44: 10 80 00 05 b 2007d58 <_Thread_Initialize+0xe0> 2007d48: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 2007d4c: 87 28 60 02 sll %g1, 2, %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++ ) 2007d50: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 2007d54: c0 21 00 03 clr [ %g4 + %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++ ) 2007d58: 80 a0 40 02 cmp %g1, %g2 2007d5c: 28 bf ff fc bleu,a 2007d4c <_Thread_Initialize+0xd4> 2007d60: c8 06 61 6c ld [ %i1 + 0x16c ], %g4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2007d64: 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 ); 2007d68: 92 10 00 1d mov %i5, %o1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2007d6c: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ] the_thread->Start.budget_callout = budget_callout; 2007d70: 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 ); 2007d74: 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; 2007d78: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2007d7c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2007d80: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2007d84: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2007d88: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; 2007d8c: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2007d90: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 2007d94: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 2007d98: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007d9c: 40 00 01 c0 call 200849c <_Thread_Set_priority> 2007da0: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007da4: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 2007da8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2007dac: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2007db0: e0 26 60 0c st %l0, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007db4: 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 ); 2007db8: c0 26 60 84 clr [ %i1 + 0x84 ] 2007dbc: 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 ); 2007dc0: 90 10 00 19 mov %i1, %o0 2007dc4: 40 00 03 7a call 2008bac <_User_extensions_Thread_create> 2007dc8: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2007dcc: 80 8a 20 ff btst 0xff, %o0 2007dd0: 12 80 00 27 bne 2007e6c <_Thread_Initialize+0x1f4> 2007dd4: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 2007dd8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 2007ddc: 80 a2 20 00 cmp %o0, 0 2007de0: 22 80 00 05 be,a 2007df4 <_Thread_Initialize+0x17c> 2007de4: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 _Workspace_Free( the_thread->libc_reent ); 2007de8: 40 00 04 86 call 2009000 <_Workspace_Free> 2007dec: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2007df0: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 2007df4: 80 a2 20 00 cmp %o0, 0 2007df8: 22 80 00 05 be,a 2007e0c <_Thread_Initialize+0x194> 2007dfc: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2007e00: 40 00 04 80 call 2009000 <_Workspace_Free> 2007e04: 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] ) 2007e08: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 2007e0c: 80 a2 20 00 cmp %o0, 0 2007e10: 22 80 00 05 be,a 2007e24 <_Thread_Initialize+0x1ac> <== ALWAYS TAKEN 2007e14: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2007e18: 40 00 04 7a call 2009000 <_Workspace_Free> <== NOT EXECUTED 2007e1c: 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] ) 2007e20: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 <== NOT EXECUTED 2007e24: 80 a2 20 00 cmp %o0, 0 2007e28: 02 80 00 05 be 2007e3c <_Thread_Initialize+0x1c4> <== ALWAYS TAKEN 2007e2c: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 2007e30: 40 00 04 74 call 2009000 <_Workspace_Free> <== NOT EXECUTED 2007e34: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 2007e38: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2007e3c: 02 80 00 05 be 2007e50 <_Thread_Initialize+0x1d8> 2007e40: 80 a4 a0 00 cmp %l2, 0 (void) _Workspace_Free( extensions_area ); 2007e44: 40 00 04 6f call 2009000 <_Workspace_Free> 2007e48: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007e4c: 80 a4 a0 00 cmp %l2, 0 2007e50: 02 80 00 05 be 2007e64 <_Thread_Initialize+0x1ec> 2007e54: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( fp_area ); 2007e58: 40 00 04 6a call 2009000 <_Workspace_Free> 2007e5c: 90 10 00 12 mov %l2, %o0 #endif _Thread_Stack_Free( the_thread ); 2007e60: 90 10 00 19 mov %i1, %o0 2007e64: 40 00 02 47 call 2008780 <_Thread_Stack_Free> 2007e68: b0 10 20 00 clr %i0 return false; } 2007e6c: 81 c7 e0 08 ret 2007e70: 81 e8 00 00 restore =============================================================================== 0200c000 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200c000: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200c004: 03 00 80 6a sethi %hi(0x201a800), %g1 200c008: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 201a870 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200c00c: 7f ff d8 69 call 20021b0 200c010: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200c014: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200c018: c4 04 40 00 ld [ %l1 ], %g2 200c01c: c2 04 60 08 ld [ %l1 + 8 ], %g1 200c020: 80 a0 80 01 cmp %g2, %g1 200c024: 32 80 00 03 bne,a 200c030 <_Thread_Reset_timeslice+0x30> 200c028: c2 04 00 00 ld [ %l0 ], %g1 _ISR_Enable( level ); 200c02c: 30 80 00 18 b,a 200c08c <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200c030: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c034: 86 04 60 04 add %l1, 4, %g3 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 200c038: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c03c: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c040: 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; 200c044: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200c048: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c04c: 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; 200c050: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200c054: 7f ff d8 5b call 20021c0 200c058: 01 00 00 00 nop 200c05c: 7f ff d8 55 call 20021b0 200c060: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200c064: 03 00 80 6a sethi %hi(0x201a800), %g1 200c068: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 201a840 <_Thread_Heir> 200c06c: 80 a4 00 02 cmp %l0, %g2 200c070: 12 80 00 05 bne 200c084 <_Thread_Reset_timeslice+0x84> <== NEVER TAKEN 200c074: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; 200c078: c4 04 40 00 ld [ %l1 ], %g2 200c07c: c4 20 60 40 st %g2, [ %g1 + 0x40 ] _Context_Switch_necessary = true; 200c080: 84 10 20 01 mov 1, %g2 200c084: 03 00 80 6a sethi %hi(0x201a800), %g1 200c088: c4 28 60 80 stb %g2, [ %g1 + 0x80 ] ! 201a880 <_Context_Switch_necessary> _ISR_Enable( level ); 200c08c: 7f ff d8 4d call 20021c0 200c090: 81 e8 00 00 restore =============================================================================== 0200c650 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 200c650: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 200c654: 7f ff d7 55 call 20023a8 200c658: a0 10 00 18 mov %i0, %l0 200c65c: b0 10 00 08 mov %o0, %i0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 200c660: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 200c664: 80 88 60 02 btst 2, %g1 200c668: 02 80 00 2c be 200c718 <_Thread_Resume+0xc8> <== NEVER TAKEN 200c66c: 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 ) ) { 200c670: 80 a0 60 00 cmp %g1, 0 200c674: 12 80 00 29 bne 200c718 <_Thread_Resume+0xc8> 200c678: c2 24 20 10 st %g1, [ %l0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 200c67c: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 200c680: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 200c684: c8 10 80 00 lduh [ %g2 ], %g4 200c688: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 200c68c: 86 11 00 03 or %g4, %g3, %g3 200c690: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c694: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 200c698: da 14 20 94 lduh [ %l0 + 0x94 ], %o5 200c69c: c4 24 00 00 st %g2, [ %l0 ] 200c6a0: 07 00 80 81 sethi %hi(0x2020400), %g3 old_last_node = the_chain->last; 200c6a4: c4 00 60 08 ld [ %g1 + 8 ], %g2 200c6a8: c8 10 e1 d4 lduh [ %g3 + 0x1d4 ], %g4 the_chain->last = the_node; 200c6ac: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c6b0: c4 24 20 04 st %g2, [ %l0 + 4 ] 200c6b4: 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; 200c6b8: e0 20 80 00 st %l0, [ %g2 ] 200c6bc: c2 30 e1 d4 sth %g1, [ %g3 + 0x1d4 ] _ISR_Flash( level ); 200c6c0: 7f ff d7 3e call 20023b8 200c6c4: 01 00 00 00 nop 200c6c8: 7f ff d7 38 call 20023a8 200c6cc: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 200c6d0: 05 00 80 81 sethi %hi(0x2020400), %g2 200c6d4: c6 00 a1 b0 ld [ %g2 + 0x1b0 ], %g3 ! 20205b0 <_Thread_Heir> 200c6d8: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 200c6dc: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 200c6e0: 80 a0 40 03 cmp %g1, %g3 200c6e4: 1a 80 00 0d bcc 200c718 <_Thread_Resume+0xc8> 200c6e8: 07 00 80 81 sethi %hi(0x2020400), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200c6ec: c6 00 e1 e0 ld [ %g3 + 0x1e0 ], %g3 ! 20205e0 <_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; 200c6f0: e0 20 a1 b0 st %l0, [ %g2 + 0x1b0 ] if ( _Thread_Executing->is_preemptible || 200c6f4: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2 200c6f8: 80 a0 a0 00 cmp %g2, 0 200c6fc: 12 80 00 05 bne 200c710 <_Thread_Resume+0xc0> 200c700: 84 10 20 01 mov 1, %g2 200c704: 80 a0 60 00 cmp %g1, 0 200c708: 12 80 00 04 bne 200c718 <_Thread_Resume+0xc8> <== ALWAYS TAKEN 200c70c: 01 00 00 00 nop the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 200c710: 03 00 80 81 sethi %hi(0x2020400), %g1 200c714: c4 28 61 f0 stb %g2, [ %g1 + 0x1f0 ] ! 20205f0 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 200c718: 7f ff d7 28 call 20023b8 200c71c: 81 e8 00 00 restore =============================================================================== 020088c4 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 20088c4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 20088c8: 03 00 80 6a sethi %hi(0x201a800), %g1 20088cc: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 201a870 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 20088d0: 7f ff e6 38 call 20021b0 20088d4: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 20088d8: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 20088dc: c4 04 40 00 ld [ %l1 ], %g2 20088e0: c2 04 60 08 ld [ %l1 + 8 ], %g1 20088e4: 80 a0 80 01 cmp %g2, %g1 20088e8: 02 80 00 17 be 2008944 <_Thread_Yield_processor+0x80> 20088ec: 25 00 80 6a sethi %hi(0x201a800), %l2 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 20088f0: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 20088f4: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 20088f8: 86 04 60 04 add %l1, 4, %g3 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 20088fc: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2008900: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2008904: 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; 2008908: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200890c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2008910: 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; 2008914: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2008918: 7f ff e6 2a call 20021c0 200891c: 01 00 00 00 nop 2008920: 7f ff e6 24 call 20021b0 2008924: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2008928: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 200892c: 80 a4 00 01 cmp %l0, %g1 2008930: 12 80 00 09 bne 2008954 <_Thread_Yield_processor+0x90> <== NEVER TAKEN 2008934: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; 2008938: c2 04 40 00 ld [ %l1 ], %g1 200893c: 10 80 00 06 b 2008954 <_Thread_Yield_processor+0x90> 2008940: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 2008944: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 2008948: 80 a4 00 01 cmp %l0, %g1 200894c: 02 80 00 04 be 200895c <_Thread_Yield_processor+0x98> <== ALWAYS TAKEN 2008950: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 2008954: 03 00 80 6a sethi %hi(0x201a800), %g1 2008958: c4 28 60 80 stb %g2, [ %g1 + 0x80 ] ! 201a880 <_Context_Switch_necessary> _ISR_Enable( level ); 200895c: 7f ff e6 19 call 20021c0 2008960: 81 e8 00 00 restore =============================================================================== 02008190 <_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 ) { 2008190: 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; 2008194: 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); 2008198: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 200819c: 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); 20081a0: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20081a4: 82 06 60 38 add %i1, 0x38, %g1 20081a8: c2 26 60 40 st %g1, [ %i1 + 0x40 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 20081ac: 2d 00 80 67 sethi %hi(0x2019c00), %l6 _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 ]; 20081b0: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 20081b4: 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 ]; 20081b8: a7 28 60 04 sll %g1, 4, %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; 20081bc: ac 15 a1 14 or %l6, 0x114, %l6 _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 ]; 20081c0: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 20081c4: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 _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 ]; 20081c8: a6 24 c0 01 sub %l3, %g1, %l3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 20081cc: 12 80 00 28 bne 200826c <_Thread_queue_Enqueue_priority+0xdc> 20081d0: a6 06 00 13 add %i0, %l3, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20081d4: ac 04 e0 04 add %l3, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 20081d8: 7f ff e7 f6 call 20021b0 20081dc: 01 00 00 00 nop 20081e0: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 20081e4: a8 10 3f ff mov -1, %l4 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 20081e8: 10 80 00 10 b 2008228 <_Thread_queue_Enqueue_priority+0x98> 20081ec: e2 04 c0 00 ld [ %l3 ], %l1 search_priority = search_thread->current_priority; if ( priority <= search_priority ) 20081f0: 80 a4 00 14 cmp %l0, %l4 20081f4: 28 80 00 11 bleu,a 2008238 <_Thread_queue_Enqueue_priority+0xa8> 20081f8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 20081fc: 7f ff e7 f1 call 20021c0 2008200: 90 10 00 12 mov %l2, %o0 2008204: 7f ff e7 eb call 20021b0 2008208: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 200820c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2008210: 80 8d 40 01 btst %l5, %g1 2008214: 32 80 00 05 bne,a 2008228 <_Thread_queue_Enqueue_priority+0x98><== ALWAYS TAKEN 2008218: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 200821c: 7f ff e7 e9 call 20021c0 <== NOT EXECUTED 2008220: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 2008224: 30 bf ff ed b,a 20081d8 <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED 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 ) ) { 2008228: 80 a4 40 16 cmp %l1, %l6 200822c: 32 bf ff f1 bne,a 20081f0 <_Thread_queue_Enqueue_priority+0x60> 2008230: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008234: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2008238: 80 a0 60 01 cmp %g1, 1 200823c: 12 80 00 3c bne 200832c <_Thread_queue_Enqueue_priority+0x19c> 2008240: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2008244: 80 a4 00 14 cmp %l0, %l4 2008248: 02 80 00 2e be 2008300 <_Thread_queue_Enqueue_priority+0x170> 200824c: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008250: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008254: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 2008258: 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; 200825c: 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; 2008260: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2008264: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008268: 30 80 00 2d b,a 200831c <_Thread_queue_Enqueue_priority+0x18c> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 200826c: 7f ff e7 d1 call 20021b0 2008270: e8 0d 80 00 ldub [ %l6 ], %l4 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2008274: a8 05 20 01 inc %l4 _ISR_Disable( level ); 2008278: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 200827c: 10 80 00 10 b 20082bc <_Thread_queue_Enqueue_priority+0x12c> 2008280: e2 04 e0 08 ld [ %l3 + 8 ], %l1 search_priority = search_thread->current_priority; if ( priority >= search_priority ) 2008284: 80 a4 00 14 cmp %l0, %l4 2008288: 3a 80 00 11 bcc,a 20082cc <_Thread_queue_Enqueue_priority+0x13c> 200828c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2008290: 7f ff e7 cc call 20021c0 2008294: 90 10 00 12 mov %l2, %o0 2008298: 7f ff e7 c6 call 20021b0 200829c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20082a0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20082a4: 80 8d 40 01 btst %l5, %g1 20082a8: 32 80 00 05 bne,a 20082bc <_Thread_queue_Enqueue_priority+0x12c> 20082ac: e2 04 60 04 ld [ %l1 + 4 ], %l1 _ISR_Enable( level ); 20082b0: 7f ff e7 c4 call 20021c0 20082b4: 90 10 00 12 mov %l2, %o0 goto restart_reverse_search; 20082b8: 30 bf ff ed b,a 200826c <_Thread_queue_Enqueue_priority+0xdc> 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 ) ) { 20082bc: 80 a4 40 13 cmp %l1, %l3 20082c0: 32 bf ff f1 bne,a 2008284 <_Thread_queue_Enqueue_priority+0xf4> 20082c4: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 20082c8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 20082cc: 80 a0 60 01 cmp %g1, 1 20082d0: 12 80 00 17 bne 200832c <_Thread_queue_Enqueue_priority+0x19c> 20082d4: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 20082d8: 80 a4 00 14 cmp %l0, %l4 20082dc: 02 80 00 09 be 2008300 <_Thread_queue_Enqueue_priority+0x170> 20082e0: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 20082e4: c2 04 40 00 ld [ %l1 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 20082e8: e2 26 60 04 st %l1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 20082ec: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 20082f0: 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; 20082f4: f2 24 40 00 st %i1, [ %l1 ] next_node->previous = the_node; 20082f8: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20082fc: 30 80 00 08 b,a 200831c <_Thread_queue_Enqueue_priority+0x18c> 2008300: a2 04 60 3c add %l1, 0x3c, %l1 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; 2008304: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008308: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 200830c: 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; 2008310: 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; 2008314: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2008318: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 200831c: 7f ff e7 a9 call 20021c0 2008320: b0 10 20 01 mov 1, %i0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008324: 81 c7 e0 08 ret 2008328: 81 e8 00 00 restore * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 200832c: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 * 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; 2008330: d0 26 80 00 st %o0, [ %i2 ] return the_thread_queue->sync_state; } 2008334: 81 c7 e0 08 ret 2008338: 81 e8 00 00 restore =============================================================================== 020083e8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20083e8: 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 ) 20083ec: 80 a6 20 00 cmp %i0, 0 20083f0: 02 80 00 19 be 2008454 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 20083f4: 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 ) { 20083f8: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 20083fc: 80 a4 60 01 cmp %l1, 1 2008400: 12 80 00 15 bne 2008454 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2008404: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2008408: 7f ff e7 6a call 20021b0 200840c: 01 00 00 00 nop 2008410: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2008414: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2008418: 03 00 00 ef sethi %hi(0x3bc00), %g1 200841c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008420: 80 88 80 01 btst %g2, %g1 2008424: 02 80 00 0a be 200844c <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 2008428: 94 10 20 01 mov 1, %o2 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200842c: 90 10 00 18 mov %i0, %o0 2008430: 92 10 00 19 mov %i1, %o1 2008434: 40 00 0e 51 call 200bd78 <_Thread_queue_Extract_priority_helper> 2008438: e2 26 20 30 st %l1, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200843c: 90 10 00 18 mov %i0, %o0 2008440: 92 10 00 19 mov %i1, %o1 2008444: 7f ff ff 53 call 2008190 <_Thread_queue_Enqueue_priority> 2008448: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 200844c: 7f ff e7 5d call 20021c0 2008450: 90 10 00 10 mov %l0, %o0 2008454: 81 c7 e0 08 ret 2008458: 81 e8 00 00 restore =============================================================================== 0200845c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200845c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008460: 90 10 00 18 mov %i0, %o0 2008464: 7f ff fd da call 2007bcc <_Thread_Get> 2008468: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200846c: c2 07 bf fc ld [ %fp + -4 ], %g1 2008470: 80 a0 60 00 cmp %g1, 0 2008474: 12 80 00 08 bne 2008494 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 2008478: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200847c: 40 00 0e 77 call 200be58 <_Thread_queue_Process_timeout> 2008480: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2008484: 03 00 80 69 sethi %hi(0x201a400), %g1 2008488: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201a7b0 <_Thread_Dispatch_disable_level> 200848c: 84 00 bf ff add %g2, -1, %g2 2008490: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 2008494: 81 c7 e0 08 ret 2008498: 81 e8 00 00 restore =============================================================================== 02015554 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2015554: 9d e3 bf 88 save %sp, -120, %sp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2015558: 35 00 80 ec sethi %hi(0x203b000), %i2 201555c: b2 07 bf f4 add %fp, -12, %i1 2015560: ac 07 bf f8 add %fp, -8, %l6 2015564: a2 07 bf e8 add %fp, -24, %l1 2015568: a6 07 bf ec add %fp, -20, %l3 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 201556c: 37 00 80 ec sethi %hi(0x203b000), %i3 2015570: 2b 00 80 ec sethi %hi(0x203b000), %l5 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2015574: c0 27 bf f8 clr [ %fp + -8 ] 2015578: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 201557c: f2 27 bf fc st %i1, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2015580: ec 27 bf f4 st %l6, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2015584: e2 27 bf f0 st %l1, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2015588: e6 27 bf e8 st %l3, [ %fp + -24 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 201558c: b4 16 a3 44 or %i2, 0x344, %i2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2015590: b6 16 e2 84 or %i3, 0x284, %i3 2015594: aa 15 61 f0 or %l5, 0x1f0, %l5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2015598: a8 06 20 30 add %i0, 0x30, %l4 /* * 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 ); 201559c: a4 06 20 68 add %i0, 0x68, %l2 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 20155a0: b8 06 20 08 add %i0, 8, %i4 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 20155a4: ba 06 20 40 add %i0, 0x40, %i5 _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; 20155a8: ae 10 20 01 mov 1, %l7 { /* * 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; 20155ac: f2 26 20 78 st %i1, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 20155b0: c2 06 80 00 ld [ %i2 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 20155b4: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20155b8: 94 10 00 11 mov %l1, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 20155bc: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20155c0: 92 20 40 09 sub %g1, %o1, %o1 20155c4: 40 00 11 2c call 2019a74 <_Watchdog_Adjust_to_chain> 20155c8: 90 10 00 14 mov %l4, %o0 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 20155cc: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 20155d0: e0 06 c0 00 ld [ %i3 ], %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 ) { 20155d4: 80 a4 00 0a cmp %l0, %o2 20155d8: 08 80 00 06 bleu 20155f0 <_Timer_server_Body+0x9c> 20155dc: 92 24 00 0a sub %l0, %o2, %o1 /* * 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 ); 20155e0: 90 10 00 12 mov %l2, %o0 20155e4: 40 00 11 24 call 2019a74 <_Watchdog_Adjust_to_chain> 20155e8: 94 10 00 11 mov %l1, %o2 20155ec: 30 80 00 06 b,a 2015604 <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 20155f0: 1a 80 00 05 bcc 2015604 <_Timer_server_Body+0xb0> 20155f4: 94 22 80 10 sub %o2, %l0, %o2 /* * 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 ); 20155f8: 90 10 00 12 mov %l2, %o0 20155fc: 40 00 10 f7 call 20199d8 <_Watchdog_Adjust> 2015600: 92 10 20 01 mov 1, %o1 } watchdogs->last_snapshot = snapshot; 2015604: 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 ); 2015608: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 201560c: 40 00 02 61 call 2015f90 <_Chain_Get> 2015610: 01 00 00 00 nop if ( timer == NULL ) { 2015614: 80 a2 20 00 cmp %o0, 0 2015618: 02 80 00 0f be 2015654 <_Timer_server_Body+0x100> 201561c: 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 ) { 2015620: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2015624: 80 a0 60 01 cmp %g1, 1 2015628: 12 80 00 05 bne 201563c <_Timer_server_Body+0xe8> 201562c: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2015630: 92 02 20 10 add %o0, 0x10, %o1 2015634: 10 80 00 05 b 2015648 <_Timer_server_Body+0xf4> 2015638: 90 10 00 14 mov %l4, %o0 } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 201563c: 12 bf ff f3 bne 2015608 <_Timer_server_Body+0xb4> <== NEVER TAKEN 2015640: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2015644: 90 10 00 12 mov %l2, %o0 2015648: 40 00 11 40 call 2019b48 <_Watchdog_Insert> 201564c: 01 00 00 00 nop 2015650: 30 bf ff ee b,a 2015608 <_Timer_server_Body+0xb4> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 2015654: 7f ff e5 06 call 200ea6c 2015658: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 201565c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2015660: 80 a0 40 16 cmp %g1, %l6 2015664: 12 80 00 0a bne 201568c <_Timer_server_Body+0x138> <== NEVER TAKEN 2015668: 01 00 00 00 nop ts->insert_chain = NULL; 201566c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2015670: 7f ff e5 03 call 200ea7c 2015674: 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 ) ) { 2015678: c2 07 bf e8 ld [ %fp + -24 ], %g1 201567c: 80 a0 40 13 cmp %g1, %l3 2015680: 12 80 00 06 bne 2015698 <_Timer_server_Body+0x144> 2015684: 01 00 00 00 nop 2015688: 30 80 00 1a b,a 20156f0 <_Timer_server_Body+0x19c> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 201568c: 7f ff e4 fc call 200ea7c <== NOT EXECUTED 2015690: 01 00 00 00 nop <== NOT EXECUTED 2015694: 30 bf ff c7 b,a 20155b0 <_Timer_server_Body+0x5c> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 2015698: 7f ff e4 f5 call 200ea6c 201569c: 01 00 00 00 nop 20156a0: 84 10 00 08 mov %o0, %g2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20156a4: 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)) 20156a8: 80 a4 00 13 cmp %l0, %l3 20156ac: 02 80 00 0e be 20156e4 <_Timer_server_Body+0x190> 20156b0: 80 a4 20 00 cmp %l0, 0 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 20156b4: c2 04 00 00 ld [ %l0 ], %g1 the_chain->first = new_first; 20156b8: c2 27 bf e8 st %g1, [ %fp + -24 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 20156bc: 02 80 00 0a be 20156e4 <_Timer_server_Body+0x190> <== NEVER TAKEN 20156c0: e2 20 60 04 st %l1, [ %g1 + 4 ] watchdog->state = WATCHDOG_INACTIVE; 20156c4: c0 24 20 08 clr [ %l0 + 8 ] _ISR_Enable( level ); 20156c8: 7f ff e4 ed call 200ea7c 20156cc: 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 ); 20156d0: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 20156d4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 20156d8: 9f c0 40 00 call %g1 20156dc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 } 20156e0: 30 bf ff ee b,a 2015698 <_Timer_server_Body+0x144> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 20156e4: 7f ff e4 e6 call 200ea7c 20156e8: 90 10 00 02 mov %g2, %o0 20156ec: 30 bf ff b0 b,a 20155ac <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 20156f0: c0 2e 20 7c clrb [ %i0 + 0x7c ] 20156f4: c2 05 40 00 ld [ %l5 ], %g1 20156f8: 82 00 60 01 inc %g1 20156fc: c2 25 40 00 st %g1, [ %l5 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2015700: d0 06 00 00 ld [ %i0 ], %o0 2015704: 40 00 0e 24 call 2018f94 <_Thread_Set_state> 2015708: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 201570c: 7f ff ff 68 call 20154ac <_Timer_server_Reset_interval_system_watchdog> 2015710: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2015714: 7f ff ff 7b call 2015500 <_Timer_server_Reset_tod_system_watchdog> 2015718: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 201571c: 40 00 0b 54 call 201846c <_Thread_Enable_dispatch> 2015720: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2015724: 90 10 00 1c mov %i4, %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; 2015728: ee 2e 20 7c stb %l7, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201572c: 40 00 11 64 call 2019cbc <_Watchdog_Remove> 2015730: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2015734: 40 00 11 62 call 2019cbc <_Watchdog_Remove> 2015738: 90 10 00 1d mov %i5, %o0 201573c: 30 bf ff 9c b,a 20155ac <_Timer_server_Body+0x58> =============================================================================== 0200a994 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 200a994: c6 02 00 00 ld [ %o0 ], %g3 200a998: c4 02 40 00 ld [ %o1 ], %g2 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 200a99c: 82 10 00 08 mov %o0, %g1 if ( lhs->tv_sec > rhs->tv_sec ) 200a9a0: 80 a0 c0 02 cmp %g3, %g2 200a9a4: 14 80 00 0b bg 200a9d0 <_Timespec_Greater_than+0x3c> 200a9a8: 90 10 20 01 mov 1, %o0 return true; if ( lhs->tv_sec < rhs->tv_sec ) 200a9ac: 80 a0 c0 02 cmp %g3, %g2 200a9b0: 06 80 00 08 bl 200a9d0 <_Timespec_Greater_than+0x3c> <== NEVER TAKEN 200a9b4: 90 10 20 00 clr %o0 #include #include #include bool _Timespec_Greater_than( 200a9b8: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a9bc: c2 02 60 04 ld [ %o1 + 4 ], %g1 200a9c0: 80 a0 80 01 cmp %g2, %g1 200a9c4: 14 80 00 03 bg 200a9d0 <_Timespec_Greater_than+0x3c> 200a9c8: 90 10 20 01 mov 1, %o0 200a9cc: 90 10 20 00 clr %o0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 200a9d0: 81 c3 e0 08 retl =============================================================================== 0200aec4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200aec4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200aec8: 7f ff e0 a4 call 2003158 200aecc: 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)); 200aed0: 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; 200aed4: 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 ) ) { 200aed8: 80 a0 40 11 cmp %g1, %l1 200aedc: 02 80 00 1e be 200af54 <_Watchdog_Adjust+0x90> 200aee0: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200aee4: 02 80 00 19 be 200af48 <_Watchdog_Adjust+0x84> 200aee8: a4 10 20 01 mov 1, %l2 200aeec: 80 a6 60 01 cmp %i1, 1 200aef0: 12 80 00 19 bne 200af54 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200aef4: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200aef8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200aefc: 10 80 00 07 b 200af18 <_Watchdog_Adjust+0x54> 200af00: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200af04: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200af08: 80 a6 80 19 cmp %i2, %i1 200af0c: 3a 80 00 05 bcc,a 200af20 <_Watchdog_Adjust+0x5c> 200af10: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200af14: b4 26 40 1a sub %i1, %i2, %i2 break; 200af18: 10 80 00 0f b 200af54 <_Watchdog_Adjust+0x90> 200af1c: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200af20: 7f ff e0 92 call 2003168 200af24: 01 00 00 00 nop _Watchdog_Tickle( header ); 200af28: 40 00 00 95 call 200b17c <_Watchdog_Tickle> 200af2c: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 200af30: 7f ff e0 8a call 2003158 200af34: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200af38: c2 04 00 00 ld [ %l0 ], %g1 200af3c: 80 a0 40 11 cmp %g1, %l1 200af40: 02 80 00 05 be 200af54 <_Watchdog_Adjust+0x90> 200af44: b4 26 80 19 sub %i2, %i1, %i2 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200af48: 80 a6 a0 00 cmp %i2, 0 200af4c: 32 bf ff ee bne,a 200af04 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200af50: c2 04 00 00 ld [ %l0 ], %g1 } break; } } _ISR_Enable( level ); 200af54: 7f ff e0 85 call 2003168 200af58: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02008e58 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2008e58: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2008e5c: 7f ff e4 d5 call 20021b0 2008e60: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 2008e64: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2008e68: 80 a6 20 01 cmp %i0, 1 2008e6c: 22 80 00 1e be,a 2008ee4 <_Watchdog_Remove+0x8c> 2008e70: c0 24 20 08 clr [ %l0 + 8 ] 2008e74: 0a 80 00 1d bcs 2008ee8 <_Watchdog_Remove+0x90> 2008e78: 03 00 80 6a sethi %hi(0x201a800), %g1 2008e7c: 80 a6 20 03 cmp %i0, 3 2008e80: 18 80 00 1a bgu 2008ee8 <_Watchdog_Remove+0x90> <== NEVER TAKEN 2008e84: 01 00 00 00 nop 2008e88: c2 04 00 00 ld [ %l0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2008e8c: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2008e90: c4 00 40 00 ld [ %g1 ], %g2 2008e94: 80 a0 a0 00 cmp %g2, 0 2008e98: 22 80 00 07 be,a 2008eb4 <_Watchdog_Remove+0x5c> 2008e9c: 03 00 80 6a sethi %hi(0x201a800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2008ea0: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 201a810 <_Workspace_Area+0x3c> 2008ea4: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 2008ea8: 84 00 c0 02 add %g3, %g2, %g2 2008eac: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 2008eb0: 03 00 80 6a sethi %hi(0x201a800), %g1 2008eb4: c2 00 61 00 ld [ %g1 + 0x100 ], %g1 ! 201a900 <_Watchdog_Sync_count> 2008eb8: 80 a0 60 00 cmp %g1, 0 2008ebc: 22 80 00 07 be,a 2008ed8 <_Watchdog_Remove+0x80> 2008ec0: c2 04 00 00 ld [ %l0 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 2008ec4: 03 00 80 6a sethi %hi(0x201a800), %g1 2008ec8: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 ! 201a84c <_ISR_Nest_level> 2008ecc: 03 00 80 6a sethi %hi(0x201a800), %g1 2008ed0: c4 20 60 6c st %g2, [ %g1 + 0x6c ] ! 201a86c <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2008ed4: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2008ed8: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 2008edc: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2008ee0: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2008ee4: 03 00 80 6a sethi %hi(0x201a800), %g1 2008ee8: c2 00 61 04 ld [ %g1 + 0x104 ], %g1 ! 201a904 <_Watchdog_Ticks_since_boot> 2008eec: c2 24 20 18 st %g1, [ %l0 + 0x18 ] _ISR_Enable( level ); 2008ef0: 7f ff e4 b4 call 20021c0 2008ef4: 01 00 00 00 nop return( previous_state ); } 2008ef8: 81 c7 e0 08 ret 2008efc: 81 e8 00 00 restore =============================================================================== 0200a690 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200a690: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200a694: 7f ff e1 7f call 2002c90 200a698: a0 10 00 18 mov %i0, %l0 200a69c: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200a6a0: 11 00 80 79 sethi %hi(0x201e400), %o0 200a6a4: 94 10 00 19 mov %i1, %o2 200a6a8: 90 12 21 f8 or %o0, 0x1f8, %o0 200a6ac: 7f ff e6 3a call 2003f94 200a6b0: 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)); 200a6b4: 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; 200a6b8: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200a6bc: 80 a4 40 19 cmp %l1, %i1 200a6c0: 02 80 00 0e be 200a6f8 <_Watchdog_Report_chain+0x68> 200a6c4: 11 00 80 79 sethi %hi(0x201e400), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200a6c8: 92 10 00 11 mov %l1, %o1 200a6cc: 40 00 00 10 call 200a70c <_Watchdog_Report> 200a6d0: 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 ) 200a6d4: 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 ; 200a6d8: 80 a4 40 19 cmp %l1, %i1 200a6dc: 12 bf ff fc bne 200a6cc <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200a6e0: 92 10 00 11 mov %l1, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200a6e4: 92 10 00 10 mov %l0, %o1 200a6e8: 11 00 80 79 sethi %hi(0x201e400), %o0 200a6ec: 7f ff e6 2a call 2003f94 200a6f0: 90 12 22 10 or %o0, 0x210, %o0 ! 201e610 200a6f4: 30 80 00 03 b,a 200a700 <_Watchdog_Report_chain+0x70> } else { printk( "Chain is empty\n" ); 200a6f8: 7f ff e6 27 call 2003f94 200a6fc: 90 12 22 20 or %o0, 0x220, %o0 } _ISR_Enable( level ); 200a700: 7f ff e1 68 call 2002ca0 200a704: 81 e8 00 00 restore =============================================================================== 02008900 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2008900: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2008904: 80 a6 20 00 cmp %i0, 0 2008908: 02 80 00 1d be 200897c <== NEVER TAKEN 200890c: 21 00 80 a3 sethi %hi(0x2028c00), %l0 2008910: a0 14 20 14 or %l0, 0x14, %l0 ! 2028c14 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 2008914: a6 04 20 10 add %l0, 0x10, %l3 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2008918: c2 04 00 00 ld [ %l0 ], %g1 200891c: 80 a0 60 00 cmp %g1, 0 2008920: 22 80 00 14 be,a 2008970 2008924: a0 04 20 04 add %l0, 4, %l0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2008928: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( !information ) 200892c: 80 a4 a0 00 cmp %l2, 0 2008930: 12 80 00 0b bne 200895c 2008934: a2 10 20 01 mov 1, %l1 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 2008938: 10 80 00 0e b 2008970 200893c: a0 04 20 04 add %l0, 4, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 2008940: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 2008944: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !the_thread ) 2008948: 80 a2 20 00 cmp %o0, 0 200894c: 02 80 00 04 be 200895c <== NEVER TAKEN 2008950: a2 04 60 01 inc %l1 continue; (*routine)(the_thread); 2008954: 9f c6 00 00 call %i0 2008958: 01 00 00 00 nop information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 200895c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 2008960: 80 a4 40 01 cmp %l1, %g1 2008964: 08 bf ff f7 bleu 2008940 2008968: 85 2c 60 02 sll %l1, 2, %g2 200896c: a0 04 20 04 add %l0, 4, %l0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 2008970: 80 a4 00 13 cmp %l0, %l3 2008974: 32 bf ff ea bne,a 200891c 2008978: c2 04 00 00 ld [ %l0 ], %g1 200897c: 81 c7 e0 08 ret 2008980: 81 e8 00 00 restore =============================================================================== 02012dcc : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 2012dcc: 9d e3 bf a0 save %sp, -96, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 2012dd0: a0 96 20 00 orcc %i0, 0, %l0 2012dd4: 02 80 00 1c be 2012e44 2012dd8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 2012ddc: 80 a6 60 00 cmp %i1, 0 2012de0: 02 80 00 34 be 2012eb0 2012de4: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 2012de8: 02 80 00 32 be 2012eb0 <== NEVER TAKEN 2012dec: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 2012df0: 02 80 00 32 be 2012eb8 2012df4: 80 a6 a0 00 cmp %i2, 0 2012df8: 02 80 00 30 be 2012eb8 2012dfc: 80 a6 80 1b cmp %i2, %i3 2012e00: 0a 80 00 2e bcs 2012eb8 2012e04: 80 8e e0 07 btst 7, %i3 2012e08: 12 80 00 2c bne 2012eb8 2012e0c: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 2012e10: 12 80 00 28 bne 2012eb0 2012e14: 03 00 80 ec sethi %hi(0x203b000), %g1 2012e18: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 203b1f0 <_Thread_Dispatch_disable_level> 2012e1c: 84 00 a0 01 inc %g2 2012e20: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] * 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 ); 2012e24: 25 00 80 eb sethi %hi(0x203ac00), %l2 2012e28: 40 00 11 bd call 201751c <_Objects_Allocate> 2012e2c: 90 14 a3 f8 or %l2, 0x3f8, %o0 ! 203aff8 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 2012e30: a2 92 20 00 orcc %o0, 0, %l1 2012e34: 32 80 00 06 bne,a 2012e4c 2012e38: f4 24 60 14 st %i2, [ %l1 + 0x14 ] _Thread_Enable_dispatch(); 2012e3c: 40 00 15 8c call 201846c <_Thread_Enable_dispatch> 2012e40: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 2012e44: 81 c7 e0 08 ret 2012e48: 81 e8 00 00 restore the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 2012e4c: 90 10 00 1a mov %i2, %o0 2012e50: 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; 2012e54: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 2012e58: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; the_partition->buffer_size = buffer_size; 2012e5c: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 2012e60: 40 00 5f 96 call 202acb8 <.udiv> 2012e64: c0 24 60 20 clr [ %l1 + 0x20 ] 2012e68: 92 10 00 19 mov %i1, %o1 2012e6c: 94 10 00 08 mov %o0, %o2 2012e70: 96 10 00 1b mov %i3, %o3 2012e74: b4 04 60 24 add %l1, 0x24, %i2 2012e78: 40 00 0c 56 call 2015fd0 <_Chain_Initialize> 2012e7c: 90 10 00 1a mov %i2, %o0 2012e80: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 2012e84: c6 04 60 08 ld [ %l1 + 8 ], %g3 2012e88: a4 14 a3 f8 or %l2, 0x3f8, %l2 2012e8c: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2012e90: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2012e94: 83 28 60 02 sll %g1, 2, %g1 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 2012e98: c6 27 40 00 st %g3, [ %i5 ] 2012e9c: e2 20 80 01 st %l1, [ %g2 + %g1 ] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2012ea0: 40 00 15 73 call 201846c <_Thread_Enable_dispatch> 2012ea4: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 2012ea8: 81 c7 e0 08 ret 2012eac: 81 e8 00 00 restore 2012eb0: 81 c7 e0 08 ret 2012eb4: 91 e8 20 09 restore %g0, 9, %o0 2012eb8: b0 10 20 08 mov 8, %i0 } 2012ebc: 81 c7 e0 08 ret 2012ec0: 81 e8 00 00 restore =============================================================================== 02006c6c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 2006c6c: 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 *) 2006c70: 11 00 80 81 sethi %hi(0x2020400), %o0 2006c74: 92 10 00 18 mov %i0, %o1 2006c78: 90 12 20 48 or %o0, 0x48, %o0 2006c7c: 40 00 08 9f call 2008ef8 <_Objects_Get> 2006c80: 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 ) { 2006c84: c2 07 bf fc ld [ %fp + -4 ], %g1 2006c88: 80 a0 60 00 cmp %g1, 0 2006c8c: 12 80 00 63 bne 2006e18 2006c90: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 2006c94: 25 00 80 81 sethi %hi(0x2020400), %l2 2006c98: c4 02 20 40 ld [ %o0 + 0x40 ], %g2 2006c9c: c2 04 a2 80 ld [ %l2 + 0x280 ], %g1 2006ca0: 80 a0 80 01 cmp %g2, %g1 2006ca4: 02 80 00 06 be 2006cbc 2006ca8: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2006cac: 40 00 0a ef call 2009868 <_Thread_Enable_dispatch> 2006cb0: b0 10 20 17 mov 0x17, %i0 return RTEMS_NOT_OWNER_OF_RESOURCE; 2006cb4: 81 c7 e0 08 ret 2006cb8: 81 e8 00 00 restore } if ( length == RTEMS_PERIOD_STATUS ) { 2006cbc: 12 80 00 0b bne 2006ce8 2006cc0: 01 00 00 00 nop switch ( the_period->state ) { 2006cc4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2006cc8: 80 a0 60 04 cmp %g1, 4 2006ccc: 18 80 00 4f bgu 2006e08 <== NEVER TAKEN 2006cd0: b0 10 20 00 clr %i0 2006cd4: 83 28 60 02 sll %g1, 2, %g1 2006cd8: 05 00 80 78 sethi %hi(0x201e000), %g2 2006cdc: 84 10 a2 58 or %g2, 0x258, %g2 ! 201e258 2006ce0: 10 80 00 4a b 2006e08 2006ce4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 2006ce8: 7f ff f0 dc call 2003058 2006cec: 01 00 00 00 nop 2006cf0: a6 10 00 08 mov %o0, %l3 switch ( the_period->state ) { 2006cf4: e2 04 20 38 ld [ %l0 + 0x38 ], %l1 2006cf8: 80 a4 60 02 cmp %l1, 2 2006cfc: 02 80 00 1a be 2006d64 2006d00: 80 a4 60 04 cmp %l1, 4 2006d04: 02 80 00 34 be 2006dd4 2006d08: 80 a4 60 00 cmp %l1, 0 2006d0c: 12 80 00 43 bne 2006e18 <== NEVER TAKEN 2006d10: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2006d14: 7f ff f0 d5 call 2003068 2006d18: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 2006d1c: 7f ff ff 50 call 2006a5c <_Rate_monotonic_Initiate_statistics> 2006d20: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006d24: 82 10 20 02 mov 2, %g1 2006d28: c2 24 20 38 st %g1, [ %l0 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006d2c: 03 00 80 1c sethi %hi(0x2007000), %g1 2006d30: 82 10 60 e4 or %g1, 0xe4, %g1 ! 20070e4 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006d34: f0 24 20 30 st %i0, [ %l0 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006d38: 92 04 20 10 add %l0, 0x10, %o1 2006d3c: 11 00 80 81 sethi %hi(0x2020400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006d40: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006d44: 90 12 22 a0 or %o0, 0x2a0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006d48: c0 24 20 18 clr [ %l0 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006d4c: c0 24 20 34 clr [ %l0 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2006d50: f2 24 20 3c st %i1, [ %l0 + 0x3c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006d54: c2 24 20 2c st %g1, [ %l0 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006d58: 40 00 0f f6 call 200ad30 <_Watchdog_Insert> 2006d5c: b0 10 20 00 clr %i0 2006d60: 30 80 00 2a b,a 2006e08 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006d64: 7f ff ff 84 call 2006b74 <_Rate_monotonic_Update_statistics> 2006d68: 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; 2006d6c: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2006d70: 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; 2006d74: c2 24 20 38 st %g1, [ %l0 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006d78: 7f ff f0 bc call 2003068 2006d7c: 90 10 00 13 mov %l3, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2006d80: c2 04 a2 80 ld [ %l2 + 0x280 ], %g1 2006d84: c4 04 20 08 ld [ %l0 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006d88: 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; 2006d8c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006d90: 40 00 0d 27 call 200a22c <_Thread_Set_state> 2006d94: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006d98: 7f ff f0 b0 call 2003058 2006d9c: 01 00 00 00 nop local_state = the_period->state; 2006da0: e6 04 20 38 ld [ %l0 + 0x38 ], %l3 the_period->state = RATE_MONOTONIC_ACTIVE; 2006da4: e2 24 20 38 st %l1, [ %l0 + 0x38 ] _ISR_Enable( level ); 2006da8: 7f ff f0 b0 call 2003068 2006dac: 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 ) 2006db0: 80 a4 e0 03 cmp %l3, 3 2006db4: 12 80 00 04 bne 2006dc4 2006db8: d0 04 a2 80 ld [ %l2 + 0x280 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006dbc: 40 00 09 99 call 2009420 <_Thread_Clear_state> 2006dc0: 13 00 00 10 sethi %hi(0x4000), %o1 _Thread_Enable_dispatch(); 2006dc4: 40 00 0a a9 call 2009868 <_Thread_Enable_dispatch> 2006dc8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 2006dcc: 81 c7 e0 08 ret 2006dd0: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 2006dd4: 7f ff ff 68 call 2006b74 <_Rate_monotonic_Update_statistics> 2006dd8: 90 10 00 10 mov %l0, %o0 _ISR_Enable( level ); 2006ddc: 7f ff f0 a3 call 2003068 2006de0: 90 10 00 13 mov %l3, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006de4: 82 10 20 02 mov 2, %g1 2006de8: 92 04 20 10 add %l0, 0x10, %o1 2006dec: 11 00 80 81 sethi %hi(0x2020400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006df0: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006df4: 90 12 22 a0 or %o0, 0x2a0, %o0 the_period->next_length = length; 2006df8: f2 24 20 3c st %i1, [ %l0 + 0x3c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 2006dfc: c2 24 20 38 st %g1, [ %l0 + 0x38 ] 2006e00: 40 00 0f cc call 200ad30 <_Watchdog_Insert> 2006e04: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 2006e08: 40 00 0a 98 call 2009868 <_Thread_Enable_dispatch> 2006e0c: 01 00 00 00 nop return RTEMS_TIMEOUT; 2006e10: 81 c7 e0 08 ret 2006e14: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006e18: 81 c7 e0 08 ret 2006e1c: 91 e8 20 04 restore %g0, 4, %o0 =============================================================================== 02006e20 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 2006e20: 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 ) 2006e24: 80 a6 60 00 cmp %i1, 0 2006e28: 02 80 00 7a be 2007010 <== NEVER TAKEN 2006e2c: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 2006e30: 13 00 80 78 sethi %hi(0x201e000), %o1 2006e34: 9f c6 40 00 call %i1 2006e38: 92 12 62 70 or %o1, 0x270, %o1 ! 201e270 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 2006e3c: 90 10 00 18 mov %i0, %o0 2006e40: 13 00 80 78 sethi %hi(0x201e000), %o1 2006e44: 9f c6 40 00 call %i1 2006e48: 92 12 62 90 or %o1, 0x290, %o1 ! 201e290 (*print)( context, "--- Wall times are in seconds ---\n" ); 2006e4c: 90 10 00 18 mov %i0, %o0 2006e50: 13 00 80 78 sethi %hi(0x201e000), %o1 2006e54: 9f c6 40 00 call %i1 2006e58: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 201e2b8 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2006e5c: 90 10 00 18 mov %i0, %o0 2006e60: 13 00 80 78 sethi %hi(0x201e000), %o1 2006e64: 9f c6 40 00 call %i1 2006e68: 92 12 62 e0 or %o1, 0x2e0, %o1 ! 201e2e0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 2006e6c: 90 10 00 18 mov %i0, %o0 2006e70: 13 00 80 78 sethi %hi(0x201e000), %o1 2006e74: 9f c6 40 00 call %i1 2006e78: 92 12 63 30 or %o1, 0x330, %o1 ! 201e330 /* * 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 ; 2006e7c: 03 00 80 81 sethi %hi(0x2020400), %g1 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006e80: 2d 00 80 78 sethi %hi(0x201e000), %l6 /* * 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 ; 2006e84: 82 10 60 48 or %g1, 0x48, %g1 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, 2006e88: 2b 00 80 78 sethi %hi(0x201e000), %l5 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, 2006e8c: 29 00 80 78 sethi %hi(0x201e000), %l4 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2006e90: 27 00 80 78 sethi %hi(0x201e000), %l3 * 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++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 2006e94: ba 07 bf a0 add %fp, -96, %i5 /* * 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 ; 2006e98: ae 10 00 01 mov %g1, %l7 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006e9c: ac 15 a3 80 or %l6, 0x380, %l6 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, 2006ea0: aa 15 63 a0 or %l5, 0x3a0, %l5 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, 2006ea4: a8 15 23 c0 or %l4, 0x3c0, %l4 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2006ea8: a6 14 e3 98 or %l3, 0x398, %l3 /* * 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 ; 2006eac: e0 00 60 08 ld [ %g1 + 8 ], %l0 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 ); 2006eb0: b8 07 bf d8 add %fp, -40, %i4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 2006eb4: a4 07 bf f8 add %fp, -8, %l2 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 ); 2006eb8: b4 07 bf b8 add %fp, -72, %i2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2006ebc: 10 80 00 51 b 2007000 2006ec0: a2 07 bf f0 add %fp, -16, %l1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 2006ec4: 40 00 18 cd call 200d1f8 2006ec8: 92 10 00 1d mov %i5, %o1 if ( status != RTEMS_SUCCESSFUL ) 2006ecc: 80 a2 20 00 cmp %o0, 0 2006ed0: 32 80 00 4c bne,a 2007000 2006ed4: a0 04 20 01 inc %l0 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 2006ed8: 92 10 00 1c mov %i4, %o1 2006edc: 40 00 18 f4 call 200d2ac 2006ee0: 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 ); 2006ee4: d0 07 bf d8 ld [ %fp + -40 ], %o0 2006ee8: 94 10 00 12 mov %l2, %o2 2006eec: 40 00 00 ae call 20071a4 2006ef0: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006ef4: d8 1f bf a0 ldd [ %fp + -96 ], %o4 2006ef8: 92 10 00 16 mov %l6, %o1 2006efc: 94 10 00 10 mov %l0, %o2 2006f00: 90 10 00 18 mov %i0, %o0 2006f04: 9f c6 40 00 call %i1 2006f08: 96 10 00 12 mov %l2, %o3 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2006f0c: 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 ); 2006f10: 94 10 00 11 mov %l1, %o2 2006f14: 90 10 00 1a mov %i2, %o0 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2006f18: 80 a0 60 00 cmp %g1, 0 2006f1c: 12 80 00 06 bne 2006f34 2006f20: 92 10 00 13 mov %l3, %o1 (*print)( context, "\n" ); 2006f24: 9f c6 40 00 call %i1 2006f28: 90 10 00 18 mov %i0, %o0 continue; 2006f2c: 10 80 00 35 b 2007000 2006f30: a0 04 20 01 inc %l0 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 ); 2006f34: 40 00 0e 55 call 200a888 <_Timespec_Divide_by_integer> 2006f38: 92 10 00 01 mov %g1, %o1 (*print)( context, 2006f3c: d0 07 bf ac ld [ %fp + -84 ], %o0 2006f40: 40 00 53 5e call 201bcb8 <.div> 2006f44: 92 10 23 e8 mov 0x3e8, %o1 2006f48: 96 10 00 08 mov %o0, %o3 2006f4c: d0 07 bf b4 ld [ %fp + -76 ], %o0 2006f50: d6 27 bf 9c st %o3, [ %fp + -100 ] 2006f54: 40 00 53 59 call 201bcb8 <.div> 2006f58: 92 10 23 e8 mov 0x3e8, %o1 2006f5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006f60: b6 10 00 08 mov %o0, %i3 2006f64: d0 07 bf f4 ld [ %fp + -12 ], %o0 2006f68: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2006f6c: 40 00 53 53 call 201bcb8 <.div> 2006f70: 92 10 23 e8 mov 0x3e8, %o1 2006f74: d8 07 bf b0 ld [ %fp + -80 ], %o4 2006f78: d6 07 bf 9c ld [ %fp + -100 ], %o3 2006f7c: d4 07 bf a8 ld [ %fp + -88 ], %o2 2006f80: 9a 10 00 1b mov %i3, %o5 2006f84: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2006f88: 92 10 00 15 mov %l5, %o1 2006f8c: 9f c6 40 00 call %i1 2006f90: 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); 2006f94: d2 07 bf a0 ld [ %fp + -96 ], %o1 2006f98: 94 10 00 11 mov %l1, %o2 2006f9c: 40 00 0e 3b call 200a888 <_Timespec_Divide_by_integer> 2006fa0: 90 07 bf d0 add %fp, -48, %o0 (*print)( context, 2006fa4: d0 07 bf c4 ld [ %fp + -60 ], %o0 2006fa8: 40 00 53 44 call 201bcb8 <.div> 2006fac: 92 10 23 e8 mov 0x3e8, %o1 2006fb0: 96 10 00 08 mov %o0, %o3 2006fb4: d0 07 bf cc ld [ %fp + -52 ], %o0 2006fb8: d6 27 bf 9c st %o3, [ %fp + -100 ] 2006fbc: 40 00 53 3f call 201bcb8 <.div> 2006fc0: 92 10 23 e8 mov 0x3e8, %o1 2006fc4: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006fc8: b6 10 00 08 mov %o0, %i3 2006fcc: d0 07 bf f4 ld [ %fp + -12 ], %o0 2006fd0: 92 10 23 e8 mov 0x3e8, %o1 2006fd4: 40 00 53 39 call 201bcb8 <.div> 2006fd8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2006fdc: d4 07 bf c0 ld [ %fp + -64 ], %o2 2006fe0: d6 07 bf 9c ld [ %fp + -100 ], %o3 2006fe4: d8 07 bf c8 ld [ %fp + -56 ], %o4 2006fe8: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2006fec: 9a 10 00 1b mov %i3, %o5 2006ff0: 90 10 00 18 mov %i0, %o0 2006ff4: 9f c6 40 00 call %i1 2006ff8: 92 10 00 14 mov %l4, %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 ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 2006ffc: 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 ; 2007000: c2 05 e0 0c ld [ %l7 + 0xc ], %g1 2007004: 80 a4 00 01 cmp %l0, %g1 2007008: 08 bf ff af bleu 2006ec4 200700c: 90 10 00 10 mov %l0, %o0 2007010: 81 c7 e0 08 ret 2007014: 81 e8 00 00 restore =============================================================================== 020143b4 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 20143b4: 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 ) 20143b8: 82 10 20 0a mov 0xa, %g1 20143bc: 80 a6 60 00 cmp %i1, 0 20143c0: 02 80 00 2a be 2014468 20143c4: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20143c8: 40 00 10 4c call 20184f8 <_Thread_Get> 20143cc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20143d0: c4 07 bf fc ld [ %fp + -4 ], %g2 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20143d4: a0 10 00 08 mov %o0, %l0 switch ( location ) { 20143d8: 80 a0 a0 00 cmp %g2, 0 20143dc: 12 80 00 23 bne 2014468 20143e0: 82 10 20 04 mov 4, %g1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 20143e4: d2 02 21 60 ld [ %o0 + 0x160 ], %o1 asr = &api->Signal; 20143e8: c2 02 60 0c ld [ %o1 + 0xc ], %g1 20143ec: 80 a0 60 00 cmp %g1, 0 20143f0: 02 80 00 1b be 201445c 20143f4: 01 00 00 00 nop if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 20143f8: c2 0a 60 08 ldub [ %o1 + 8 ], %g1 20143fc: 80 a0 60 00 cmp %g1, 0 2014400: 02 80 00 11 be 2014444 2014404: 90 10 00 19 mov %i1, %o0 _ASR_Post_signals( signal_set, &asr->signals_posted ); 2014408: 7f ff ff e2 call 2014390 <_ASR_Post_signals> 201440c: 92 02 60 14 add %o1, 0x14, %o1 the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2014410: 03 00 80 ec sethi %hi(0x203b000), %g1 2014414: c4 00 62 8c ld [ %g1 + 0x28c ], %g2 ! 203b28c <_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; 2014418: 82 10 20 01 mov 1, %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 201441c: 80 a0 a0 00 cmp %g2, 0 2014420: 02 80 00 0b be 201444c 2014424: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 2014428: 05 00 80 ec sethi %hi(0x203b000), %g2 201442c: c4 00 a2 b0 ld [ %g2 + 0x2b0 ], %g2 ! 203b2b0 <_Thread_Executing> 2014430: 80 a4 00 02 cmp %l0, %g2 2014434: 12 80 00 06 bne 201444c <== NEVER TAKEN 2014438: 05 00 80 ec sethi %hi(0x203b000), %g2 _ISR_Signals_to_thread_executing = true; 201443c: 10 80 00 04 b 201444c 2014440: c2 28 a3 48 stb %g1, [ %g2 + 0x348 ] ! 203b348 <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); 2014444: 7f ff ff d3 call 2014390 <_ASR_Post_signals> 2014448: 92 02 60 18 add %o1, 0x18, %o1 } _Thread_Enable_dispatch(); 201444c: 40 00 10 08 call 201846c <_Thread_Enable_dispatch> 2014450: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 2014454: 10 80 00 05 b 2014468 2014458: 82 10 20 00 clr %g1 ! 0 } _Thread_Enable_dispatch(); 201445c: 40 00 10 04 call 201846c <_Thread_Enable_dispatch> 2014460: 01 00 00 00 nop 2014464: 82 10 20 0b mov 0xb, %g1 ! b case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2014468: 81 c7 e0 08 ret 201446c: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200d054 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 200d054: 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 ) 200d058: 80 a6 a0 00 cmp %i2, 0 200d05c: 02 80 00 54 be 200d1ac 200d060: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 200d064: 03 00 80 6a sethi %hi(0x201a800), %g1 200d068: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 201a870 <_Thread_Executing> api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200d06c: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200d070: 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; 200d074: 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 ]; 200d078: e2 04 21 60 ld [ %l0 + 0x160 ], %l1 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200d07c: a4 60 3f ff subx %g0, -1, %l2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200d080: 80 a0 60 00 cmp %g1, 0 200d084: 02 80 00 03 be 200d090 200d088: a5 2c a0 08 sll %l2, 8, %l2 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 200d08c: 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; 200d090: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 200d094: 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(); 200d098: 7f ff f1 39 call 200957c <_CPU_ISR_Get_level> 200d09c: 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; 200d0a0: 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; 200d0a4: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200d0a8: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200d0ac: 80 8e 61 00 btst 0x100, %i1 200d0b0: 02 80 00 06 be 200d0c8 200d0b4: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 200d0b8: 83 36 20 08 srl %i0, 8, %g1 200d0bc: 82 18 60 01 xor %g1, 1, %g1 200d0c0: 82 08 60 01 and %g1, 1, %g1 200d0c4: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ] if ( mask & RTEMS_TIMESLICE_MASK ) { 200d0c8: 80 8e 62 00 btst 0x200, %i1 200d0cc: 02 80 00 0b be 200d0f8 200d0d0: 80 8e 60 0f btst 0xf, %i1 if ( _Modes_Is_timeslice(mode_set) ) { 200d0d4: 80 8e 22 00 btst 0x200, %i0 200d0d8: 22 80 00 07 be,a 200d0f4 200d0dc: c0 24 20 7c clr [ %l0 + 0x7c ] executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200d0e0: 03 00 80 69 sethi %hi(0x201a400), %g1 200d0e4: c2 00 63 08 ld [ %g1 + 0x308 ], %g1 ! 201a708 <_Thread_Ticks_per_timeslice> 200d0e8: 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; 200d0ec: 82 10 20 01 mov 1, %g1 200d0f0: c2 24 20 7c st %g1, [ %l0 + 0x7c ] /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 200d0f4: 80 8e 60 0f btst 0xf, %i1 200d0f8: 02 80 00 06 be 200d110 200d0fc: 80 8e 64 00 btst 0x400, %i1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 200d100: 90 0e 20 0f and %i0, 0xf, %o0 200d104: 7f ff d4 2f call 20021c0 200d108: 91 2a 20 08 sll %o0, 8, %o0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 200d10c: 80 8e 64 00 btst 0x400, %i1 200d110: 22 80 00 18 be,a 200d170 200d114: 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; 200d118: 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( 200d11c: b1 36 20 0a srl %i0, 0xa, %i0 200d120: b0 1e 20 01 xor %i0, 1, %i0 200d124: 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; 200d128: 80 a6 00 01 cmp %i0, %g1 200d12c: 22 80 00 11 be,a 200d170 200d130: a0 10 20 00 clr %l0 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 200d134: 7f ff d4 1f call 20021b0 200d138: f0 2c 60 08 stb %i0, [ %l1 + 8 ] _signals = information->signals_pending; 200d13c: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 information->signals_pending = information->signals_posted; 200d140: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 information->signals_posted = _signals; 200d144: 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; 200d148: c2 24 60 18 st %g1, [ %l1 + 0x18 ] information->signals_posted = _signals; _ISR_Enable( _level ); 200d14c: 7f ff d4 1d call 20021c0 200d150: 01 00 00 00 nop 200d154: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 200d158: 80 a0 60 00 cmp %g1, 0 200d15c: 22 80 00 05 be,a 200d170 200d160: a0 10 20 00 clr %l0 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; 200d164: 82 10 20 01 mov 1, %g1 200d168: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 200d16c: a0 10 20 01 mov 1, %l0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 200d170: 03 00 80 6a sethi %hi(0x201a800), %g1 200d174: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 201a950 <_System_state_Current> 200d178: 80 a0 60 03 cmp %g1, 3 200d17c: 12 80 00 0c bne 200d1ac <== NEVER TAKEN 200d180: 82 10 20 00 clr %g1 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 200d184: 40 00 00 b4 call 200d454 <_Thread_Evaluate_mode> 200d188: 01 00 00 00 nop 200d18c: 80 8a 20 ff btst 0xff, %o0 200d190: 12 80 00 04 bne 200d1a0 200d194: 80 8c 20 ff btst 0xff, %l0 200d198: 02 80 00 05 be 200d1ac 200d19c: 82 10 20 00 clr %g1 _Thread_Dispatch(); 200d1a0: 7f ff ea 1d call 2007a14 <_Thread_Dispatch> 200d1a4: 01 00 00 00 nop 200d1a8: 82 10 20 00 clr %g1 ! 0 return RTEMS_SUCCESSFUL; } 200d1ac: 81 c7 e0 08 ret 200d1b0: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200afcc : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 200afcc: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 200afd0: 80 a6 60 00 cmp %i1, 0 200afd4: 02 80 00 07 be 200aff0 200afd8: 90 10 00 18 mov %i0, %o0 200afdc: 03 00 80 82 sethi %hi(0x2020800), %g1 200afe0: c2 08 60 24 ldub [ %g1 + 0x24 ], %g1 ! 2020824 200afe4: 80 a6 40 01 cmp %i1, %g1 200afe8: 18 80 00 1c bgu 200b058 200afec: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 200aff0: 80 a6 a0 00 cmp %i2, 0 200aff4: 02 80 00 19 be 200b058 200aff8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 200affc: 40 00 08 2f call 200d0b8 <_Thread_Get> 200b000: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200b004: c2 07 bf fc ld [ %fp + -4 ], %g1 200b008: 80 a0 60 00 cmp %g1, 0 200b00c: 12 80 00 13 bne 200b058 200b010: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 200b014: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 200b018: 80 a6 60 00 cmp %i1, 0 200b01c: 02 80 00 0d be 200b050 200b020: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b024: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200b028: 80 a0 60 00 cmp %g1, 0 200b02c: 02 80 00 06 be 200b044 200b030: f2 22 20 18 st %i1, [ %o0 + 0x18 ] the_thread->current_priority > new_priority ) 200b034: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200b038: 80 a0 40 19 cmp %g1, %i1 200b03c: 08 80 00 05 bleu 200b050 <== ALWAYS TAKEN 200b040: 01 00 00 00 nop _Thread_Change_priority( the_thread, new_priority, false ); 200b044: 92 10 00 19 mov %i1, %o1 200b048: 40 00 06 6e call 200ca00 <_Thread_Change_priority> 200b04c: 94 10 20 00 clr %o2 } _Thread_Enable_dispatch(); 200b050: 40 00 07 f7 call 200d02c <_Thread_Enable_dispatch> 200b054: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200b058: 81 c7 e0 08 ret 200b05c: 81 e8 00 00 restore =============================================================================== 02014d6c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 2014d6c: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 2014d70: 11 00 80 ed sethi %hi(0x203b400), %o0 2014d74: 92 10 00 18 mov %i0, %o1 2014d78: 90 12 20 c4 or %o0, 0xc4, %o0 2014d7c: 40 00 0b 39 call 2017a60 <_Objects_Get> 2014d80: 94 07 bf fc add %fp, -4, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2014d84: c2 07 bf fc ld [ %fp + -4 ], %g1 2014d88: 80 a0 60 00 cmp %g1, 0 2014d8c: 12 80 00 0a bne 2014db4 2014d90: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 2014d94: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2014d98: 80 a0 60 04 cmp %g1, 4 2014d9c: 02 80 00 04 be 2014dac <== NEVER TAKEN 2014da0: 01 00 00 00 nop (void) _Watchdog_Remove( &the_timer->Ticker ); 2014da4: 40 00 13 c6 call 2019cbc <_Watchdog_Remove> 2014da8: 90 02 20 10 add %o0, 0x10, %o0 _Thread_Enable_dispatch(); 2014dac: 40 00 0d b0 call 201846c <_Thread_Enable_dispatch> 2014db0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2014db4: 81 c7 e0 08 ret 2014db8: 81 e8 00 00 restore =============================================================================== 0201525c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 201525c: 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; 2015260: 03 00 80 ed sethi %hi(0x203b400), %g1 2015264: e0 00 61 04 ld [ %g1 + 0x104 ], %l0 ! 203b504 <_Timer_server> rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 2015268: 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 ) 201526c: 80 a4 20 00 cmp %l0, 0 2015270: 02 80 00 32 be 2015338 2015274: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 2015278: 03 00 80 ec sethi %hi(0x203b000), %g1 201527c: c2 08 62 04 ldub [ %g1 + 0x204 ], %g1 ! 203b204 <_TOD_Is_set> 2015280: 80 a0 60 00 cmp %g1, 0 2015284: 02 80 00 2d be 2015338 <== NEVER TAKEN 2015288: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !routine ) 201528c: 80 a6 a0 00 cmp %i2, 0 2015290: 02 80 00 2a be 2015338 2015294: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 2015298: 7f ff f4 0d call 20122cc <_TOD_Validate> 201529c: 90 10 00 19 mov %i1, %o0 20152a0: 80 8a 20 ff btst 0xff, %o0 20152a4: 22 80 00 25 be,a 2015338 20152a8: b0 10 20 14 mov 0x14, %i0 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 20152ac: 7f ff f3 d4 call 20121fc <_TOD_To_seconds> 20152b0: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch() ) 20152b4: 27 00 80 ec sethi %hi(0x203b000), %l3 20152b8: c2 04 e2 84 ld [ %l3 + 0x284 ], %g1 ! 203b284 <_TOD_Now> 20152bc: 80 a2 00 01 cmp %o0, %g1 20152c0: 08 80 00 20 bleu 2015340 20152c4: a4 10 00 08 mov %o0, %l2 20152c8: 11 00 80 ed sethi %hi(0x203b400), %o0 20152cc: 92 10 00 11 mov %l1, %o1 20152d0: 90 12 20 c4 or %o0, 0xc4, %o0 20152d4: 40 00 09 e3 call 2017a60 <_Objects_Get> 20152d8: 94 07 bf fc add %fp, -4, %o2 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20152dc: c2 07 bf fc ld [ %fp + -4 ], %g1 20152e0: b2 10 00 08 mov %o0, %i1 20152e4: 80 a0 60 00 cmp %g1, 0 20152e8: 12 80 00 14 bne 2015338 20152ec: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 20152f0: 40 00 12 73 call 2019cbc <_Watchdog_Remove> 20152f4: 90 02 20 10 add %o0, 0x10, %o0 the_watchdog->routine = routine; the_watchdog->id = id; 20152f8: e2 26 60 30 st %l1, [ %i1 + 0x30 ] the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 20152fc: c4 04 e2 84 ld [ %l3 + 0x284 ], %g2 (*timer_server->schedule_operation)( timer_server, the_timer ); 2015300: c2 04 20 04 ld [ %l0 + 4 ], %g1 2015304: 90 10 00 10 mov %l0, %o0 2015308: 92 10 00 19 mov %i1, %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(); 201530c: a4 24 80 02 sub %l2, %g2, %l2 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; 2015310: 84 10 20 03 mov 3, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2015314: f4 26 60 2c st %i2, [ %i1 + 0x2c ] 2015318: c4 26 60 38 st %g2, [ %i1 + 0x38 ] the_watchdog->id = id; the_watchdog->user_data = user_data; 201531c: f6 26 60 34 st %i3, [ %i1 + 0x34 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 2015320: e4 26 60 1c st %l2, [ %i1 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2015324: c0 26 60 18 clr [ %i1 + 0x18 ] (*timer_server->schedule_operation)( timer_server, the_timer ); 2015328: 9f c0 40 00 call %g1 201532c: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2015330: 40 00 0c 4f call 201846c <_Thread_Enable_dispatch> 2015334: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 2015338: 81 c7 e0 08 ret 201533c: 81 e8 00 00 restore 2015340: b0 10 20 14 mov 0x14, %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2015344: 81 c7 e0 08 ret 2015348: 81 e8 00 00 restore