080151bc <_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 ) { 80151bc: 37 9c ff e4 addi sp,sp,-28 80151c0: 5b 8b 00 1c sw (sp+28),r11 80151c4: 5b 8c 00 18 sw (sp+24),r12 80151c8: 5b 8d 00 14 sw (sp+20),r13 80151cc: 5b 8e 00 10 sw (sp+16),r14 80151d0: 5b 8f 00 0c sw (sp+12),r15 80151d4: 5b 90 00 08 sw (sp+8),r16 80151d8: 5b 9d 00 04 sw (sp+4),ra 80151dc: b8 20 70 00 mv r14,r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 80151e0: 28 21 00 4c lw r1,(r1+76) Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 80151e4: b8 60 60 00 mv r12,r3 80151e8: b8 40 78 00 mv r15,r2 80151ec: b8 c0 80 00 mv r16,r6 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 80151f0: 50 23 00 0b bgeu r1,r3,801521c <_CORE_message_queue_Broadcast+0x60> 80151f4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 80151f8: 2b 9d 00 04 lw ra,(sp+4) 80151fc: 2b 8b 00 1c lw r11,(sp+28) 8015200: 2b 8c 00 18 lw r12,(sp+24) 8015204: 2b 8d 00 14 lw r13,(sp+20) 8015208: 2b 8e 00 10 lw r14,(sp+16) 801520c: 2b 8f 00 0c lw r15,(sp+12) 8015210: 2b 90 00 08 lw r16,(sp+8) 8015214: 37 9c 00 1c addi sp,sp,28 8015218: c3 a0 00 00 ret * 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 ) { 801521c: 29 c2 00 48 lw r2,(r14+72) 8015220: 34 01 00 00 mvi r1,0 * 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))) { 8015224: b8 40 68 00 mv r13,r2 * 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 ) { 8015228: 44 41 00 08 be r2,r1,8015248 <_CORE_message_queue_Broadcast+0x8c> *count = 0; 801522c: 58 c1 00 00 sw (r6+0),r1 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8015230: e3 ff ff f2 bi 80151f8 <_CORE_message_queue_Broadcast+0x3c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 8015234: 29 61 00 2c lw r1,(r11+44) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 8015238: 35 ad 00 01 addi r13,r13,1 801523c: f8 00 29 08 calli 801f65c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 8015240: 29 61 00 28 lw r1,(r11+40) 8015244: 58 2c 00 00 sw (r1+0),r12 * 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))) { 8015248: b9 c0 08 00 mv r1,r14 801524c: f8 00 0c 70 calli 801840c <_Thread_queue_Dequeue> 8015250: b8 20 58 00 mv r11,r1 8015254: b9 e0 10 00 mv r2,r15 8015258: b9 80 18 00 mv r3,r12 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 801525c: 5c 20 ff f6 bne r1,r0,8015234 <_CORE_message_queue_Broadcast+0x78> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 8015260: 5a 0d 00 00 sw (r16+0),r13 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8015264: e3 ff ff e5 bi 80151f8 <_CORE_message_queue_Broadcast+0x3c> 08008a38 <_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 ) { 8008a38: 37 9c ff fc addi sp,sp,-4 8008a3c: 5b 9d 00 04 sw (sp+4),ra { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 8008a40: 78 03 08 01 mvhi r3,0x801 8008a44: 38 63 c8 e0 ori r3,r3,0xc8e0 8008a48: 28 63 00 00 lw r3,(r3+0) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 8008a4c: 34 04 00 00 mvi r4,0 8008a50: 58 64 00 34 sw (r3+52),r4 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 8008a54: 28 25 00 50 lw r5,(r1+80) 8008a58: 44 a4 00 12 be r5,r4,8008aa0 <_CORE_mutex_Seize_interrupt_trylock+0x68> the_mutex->lock = CORE_MUTEX_LOCKED; 8008a5c: 58 24 00 50 sw (r1+80),r4 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 8008a60: 28 66 00 08 lw r6,(r3+8) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 8008a64: 28 25 00 48 lw r5,(r1+72) 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; 8008a68: 58 23 00 5c sw (r1+92),r3 the_mutex->holder_id = executing->Object.id; 8008a6c: 58 26 00 60 sw (r1+96),r6 the_mutex->nest_count = 1; 8008a70: 34 06 00 01 mvi r6,1 8008a74: 58 26 00 54 sw (r1+84),r6 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 8008a78: 34 07 00 02 mvi r7,2 8008a7c: 44 a7 00 0f be r5,r7,8008ab8 <_CORE_mutex_Seize_interrupt_trylock+0x80> 8008a80: 34 07 00 03 mvi r7,3 8008a84: 44 a7 00 1b be r5,r7,8008af0 <_CORE_mutex_Seize_interrupt_trylock+0xb8> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 8008a88: 28 41 00 00 lw r1,(r2+0) 8008a8c: d0 01 00 00 wcsr IE,r1 8008a90: 34 01 00 00 mvi r1,0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 8008a94: 2b 9d 00 04 lw ra,(sp+4) 8008a98: 37 9c 00 04 addi sp,sp,4 8008a9c: c3 a0 00 00 ret /* * 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 ) ) { 8008aa0: 28 24 00 5c lw r4,(r1+92) 8008aa4: 44 64 00 09 be r3,r4,8008ac8 <_CORE_mutex_Seize_interrupt_trylock+0x90> 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; _ISR_Enable( *level_p ); 8008aa8: 34 01 00 01 mvi r1,1 8008aac: 2b 9d 00 04 lw ra,(sp+4) 8008ab0: 37 9c 00 04 addi sp,sp,4 8008ab4: c3 a0 00 00 ret _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8008ab8: 28 61 00 1c lw r1,(r3+28) 8008abc: 34 21 00 01 addi r1,r1,1 8008ac0: 58 61 00 1c sw (r3+28),r1 8008ac4: e3 ff ff f1 bi 8008a88 <_CORE_mutex_Seize_interrupt_trylock+0x50> * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 8008ac8: 28 24 00 40 lw r4,(r1+64) 8008acc: 44 80 00 2d be r4,r0,8008b80 <_CORE_mutex_Seize_interrupt_trylock+0x148> 8008ad0: 34 01 00 01 mvi r1,1 8008ad4: 5c 81 ff f5 bne r4,r1,8008aa8 <_CORE_mutex_Seize_interrupt_trylock+0x70> 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; 8008ad8: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8008adc: 58 61 00 34 sw (r3+52),r1 <== NOT EXECUTED _ISR_Enable( *level_p ); 8008ae0: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8008ae4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8008ae8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8008aec: e3 ff ff f0 bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8008af0: 28 68 00 1c lw r8,(r3+28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 8008af4: 28 65 00 14 lw r5,(r3+20) _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8008af8: b5 06 38 00 add r7,r8,r6 8008afc: 58 67 00 1c sw (r3+28),r7 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 8008b00: 28 27 00 4c lw r7,(r1+76) current = executing->current_priority; if ( current == ceiling ) { 8008b04: 44 e5 00 1b be r7,r5,8008b70 <_CORE_mutex_Seize_interrupt_trylock+0x138> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 8008b08: 50 e5 00 0f bgeu r7,r5,8008b44 <_CORE_mutex_Seize_interrupt_trylock+0x10c> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8008b0c: 78 03 08 01 mvhi r3,0x801 8008b10: 38 63 c8 24 ori r3,r3,0xc824 8008b14: 28 64 00 00 lw r4,(r3+0) 8008b18: 34 84 00 01 addi r4,r4,1 8008b1c: 58 64 00 00 sw (r3+0),r4 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 8008b20: 28 42 00 00 lw r2,(r2+0) 8008b24: d0 02 00 00 wcsr IE,r2 _Thread_Change_priority( 8008b28: 28 22 00 4c lw r2,(r1+76) 8008b2c: 28 21 00 5c lw r1,(r1+92) 8008b30: 34 03 00 00 mvi r3,0 8008b34: fb ff ed 4a calli 800405c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 8008b38: fb ff ee d4 calli 8004688 <_Thread_Enable_dispatch> 8008b3c: 34 01 00 00 mvi r1,0 8008b40: e3 ff ff db bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 8008b44: 34 05 00 06 mvi r5,6 8008b48: 58 65 00 34 sw (r3+52),r5 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 8008b4c: 58 24 00 54 sw (r1+84),r4 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 8008b50: 58 26 00 50 sw (r1+80),r6 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 8008b54: 58 68 00 1c sw (r3+28),r8 _ISR_Enable( *level_p ); 8008b58: 28 41 00 00 lw r1,(r2+0) 8008b5c: d0 01 00 00 wcsr IE,r1 8008b60: 34 01 00 00 mvi r1,0 8008b64: 2b 9d 00 04 lw ra,(sp+4) 8008b68: 37 9c 00 04 addi sp,sp,4 8008b6c: c3 a0 00 00 ret Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 8008b70: 28 41 00 00 lw r1,(r2+0) 8008b74: d0 01 00 00 wcsr IE,r1 8008b78: 34 01 00 00 mvi r1,0 8008b7c: e3 ff ff cc bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> * 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++; 8008b80: 28 23 00 54 lw r3,(r1+84) 8008b84: 34 63 00 01 addi r3,r3,1 8008b88: 58 23 00 54 sw (r1+84),r3 _ISR_Enable( *level_p ); 8008b8c: 28 41 00 00 lw r1,(r2+0) 8008b90: d0 01 00 00 wcsr IE,r1 8008b94: 34 01 00 00 mvi r1,0 8008b98: e3 ff ff c5 bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> 08008bb4 <_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 ) { 8008bb4: 37 9c ff f8 addi sp,sp,-8 8008bb8: 5b 8b 00 08 sw (sp+8),r11 8008bbc: 5b 9d 00 04 sw (sp+4),ra 8008bc0: b8 20 58 00 mv r11,r1 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 8008bc4: fb ff ef d8 calli 8004b24 <_Thread_queue_Dequeue> 8008bc8: 34 02 00 00 mvi r2,0 8008bcc: 44 22 00 06 be r1,r2,8008be4 <_CORE_semaphore_Surrender+0x30> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 8008bd0: b8 40 08 00 mv r1,r2 8008bd4: 2b 9d 00 04 lw ra,(sp+4) 8008bd8: 2b 8b 00 08 lw r11,(sp+8) 8008bdc: 37 9c 00 08 addi sp,sp,8 8008be0: c3 a0 00 00 ret if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 8008be4: 90 00 08 00 rcsr r1,IE 8008be8: 34 02 ff fe mvi r2,-2 8008bec: a0 22 10 00 and r2,r1,r2 8008bf0: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 8008bf4: 29 62 00 48 lw r2,(r11+72) 8008bf8: 29 63 00 40 lw r3,(r11+64) 8008bfc: 54 62 00 08 bgu r3,r2,8008c1c <_CORE_semaphore_Surrender+0x68> 8008c00: 34 02 00 04 mvi r2,4 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8008c04: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED } return status; } 8008c08: b8 40 08 00 mv r1,r2 8008c0c: 2b 9d 00 04 lw ra,(sp+4) 8008c10: 2b 8b 00 08 lw r11,(sp+8) 8008c14: 37 9c 00 08 addi sp,sp,8 8008c18: c3 a0 00 00 ret #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 8008c1c: 34 42 00 01 addi r2,r2,1 8008c20: 59 62 00 48 sw (r11+72),r2 8008c24: 34 02 00 00 mvi r2,0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8008c28: d0 01 00 00 wcsr IE,r1 8008c2c: e3 ff ff f7 bi 8008c08 <_CORE_semaphore_Surrender+0x54> 0800e7d8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800e7d8: 37 9c ff f8 addi sp,sp,-8 800e7dc: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800e7e0: 37 82 00 08 addi r2,sp,8 800e7e4: fb ff e1 9f calli 8006e60 <_Thread_Get> switch ( location ) { 800e7e8: 2b 82 00 08 lw r2,(sp+8) 800e7ec: 44 40 00 04 be r2,r0,800e7fc <_Event_Timeout+0x24> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800e7f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800e7f4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800e7f8: c3 a0 00 00 ret <== NOT EXECUTED * * 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 ); 800e7fc: 90 00 18 00 rcsr r3,IE 800e800: 34 02 ff fe mvi r2,-2 800e804: a0 62 10 00 and r2,r3,r2 800e808: d0 02 00 00 wcsr IE,r2 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800e80c: 78 02 08 02 mvhi r2,0x802 800e810: 38 42 49 70 ori r2,r2,0x4970 800e814: 28 42 00 00 lw r2,(r2+0) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800e818: 34 04 00 00 mvi r4,0 800e81c: 58 24 00 24 sw (r1+36),r4 if ( _Thread_Is_executing( the_thread ) ) { 800e820: 44 22 00 0f be r1,r2,800e85c <_Event_Timeout+0x84> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 800e824: 34 02 00 06 mvi r2,6 800e828: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800e82c: d0 03 00 00 wcsr IE,r3 800e830: 78 02 10 03 mvhi r2,0x1003 800e834: 38 42 ff f8 ori r2,r2,0xfff8 800e838: f8 00 05 72 calli 800fe00 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800e83c: 78 01 08 02 mvhi r1,0x802 800e840: 38 21 48 b4 ori r1,r1,0x48b4 800e844: 28 22 00 00 lw r2,(r1+0) 800e848: 34 42 ff ff addi r2,r2,-1 800e84c: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800e850: 2b 9d 00 04 lw ra,(sp+4) 800e854: 37 9c 00 08 addi sp,sp,8 800e858: c3 a0 00 00 ret } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 800e85c: 78 02 08 02 mvhi r2,0x802 800e860: 38 42 4b b0 ori r2,r2,0x4bb0 800e864: 28 45 00 00 lw r5,(r2+0) 800e868: 34 04 00 01 mvi r4,1 800e86c: 5c a4 ff ee bne r5,r4,800e824 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800e870: 34 04 00 02 mvi r4,2 800e874: 58 44 00 00 sw (r2+0),r4 800e878: e3 ff ff eb bi 800e824 <_Event_Timeout+0x4c> 0800f050 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800f050: 37 9c ff e8 addi sp,sp,-24 800f054: 5b 8b 00 14 sw (sp+20),r11 800f058: 5b 8c 00 10 sw (sp+16),r12 800f05c: 5b 8d 00 0c sw (sp+12),r13 800f060: 5b 8e 00 08 sw (sp+8),r14 800f064: 5b 9d 00 04 sw (sp+4),ra 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; 800f068: 28 2c 00 18 lw r12,(r1+24) uintptr_t const heap_area_end = heap->area_end; 800f06c: 28 25 00 1c lw r5,(r1+28) Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800f070: b8 20 58 00 mv r11,r1 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; 800f074: f0 4c 60 00 cmpgeu r12,r2,r12 * 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 ) { 800f078: f4 a2 08 00 cmpgu r1,r5,r2 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; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 800f07c: 29 6d 00 24 lw r13,(r11+36) 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; 800f080: a0 2c 60 00 and r12,r1,r12 800f084: 34 01 00 01 mvi r1,1 800f088: 5d 80 00 03 bne r12,r0,800f094 <_Heap_Extend+0x44> * 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 ) { 800f08c: 34 01 00 02 mvi r1,2 800f090: 44 45 00 08 be r2,r5,800f0b0 <_Heap_Extend+0x60> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 800f094: 2b 9d 00 04 lw ra,(sp+4) 800f098: 2b 8b 00 14 lw r11,(sp+20) 800f09c: 2b 8c 00 10 lw r12,(sp+16) 800f0a0: 2b 8d 00 0c lw r13,(sp+12) 800f0a4: 2b 8e 00 08 lw r14,(sp+8) 800f0a8: 37 9c 00 18 addi sp,sp,24 800f0ac: c3 a0 00 00 ret { 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; 800f0b0: b4 43 18 00 add r3,r2,r3 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 800f0b4: c8 6d 70 00 sub r14,r3,r13 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 800f0b8: 29 62 00 10 lw r2,(r11+16) 800f0bc: 35 ce ff f8 addi r14,r14,-8 * 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; 800f0c0: 59 63 00 1c sw (r11+28),r3 800f0c4: b9 c0 08 00 mv r1,r14 800f0c8: 5b 84 00 18 sw (sp+24),r4 800f0cc: fb ff d5 13 calli 8004518 <__umodsi3> extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 800f0d0: 2b 84 00 18 lw r4,(sp+24) 800f0d4: c9 c1 08 00 sub r1,r14,r1 800f0d8: 58 81 00 00 sw (r4+0),r1 if( extend_size >= heap->min_block_size ) { 800f0dc: 29 62 00 14 lw r2,(r11+20) 800f0e0: 50 22 00 09 bgeu r1,r2,800f104 <_Heap_Extend+0xb4> /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800f0e4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 800f0e8: 2b 9d 00 04 lw ra,(sp+4) 800f0ec: 2b 8b 00 14 lw r11,(sp+20) 800f0f0: 2b 8c 00 10 lw r12,(sp+16) 800f0f4: 2b 8d 00 0c lw r13,(sp+12) 800f0f8: 2b 8e 00 08 lw r14,(sp+8) 800f0fc: 37 9c 00 18 addi sp,sp,24 800f100: c3 a0 00 00 ret uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800f104: 29 a4 00 04 lw r4,(r13+4) if( extend_size >= heap->min_block_size ) { 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 = 800f108: 29 63 00 20 lw r3,(r11+32) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 800f10c: b4 2d 10 00 add r2,r1,r13 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800f110: 20 84 00 01 andi r4,r4,0x1 800f114: b8 24 20 00 or r4,r1,r4 800f118: c8 62 18 00 sub r3,r3,r2 800f11c: 59 a4 00 04 sw (r13+4),r4 800f120: 38 63 00 01 ori r3,r3,0x1 800f124: 58 43 00 04 sw (r2+4),r3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800f128: 29 65 00 2c lw r5,(r11+44) ++stats->used_blocks; 800f12c: 29 64 00 40 lw r4,(r11+64) --stats->frees; /* Do not count subsequent call as actual free() */ 800f130: 29 63 00 50 lw r3,(r11+80) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800f134: b4 a1 08 00 add r1,r5,r1 ++stats->used_blocks; 800f138: 34 84 00 01 addi r4,r4,1 --stats->frees; /* Do not count subsequent call as actual free() */ 800f13c: 34 63 ff ff addi r3,r3,-1 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; 800f140: 59 62 00 24 sw (r11+36),r2 /* Statistics */ stats->size += extend_size; 800f144: 59 61 00 2c sw (r11+44),r1 ++stats->used_blocks; 800f148: 59 64 00 40 sw (r11+64),r4 --stats->frees; /* Do not count subsequent call as actual free() */ 800f14c: 59 63 00 50 sw (r11+80),r3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800f150: b9 60 08 00 mv r1,r11 800f154: 35 a2 00 08 addi r2,r13,8 800f158: fb ff e5 c2 calli 8008860 <_Heap_Free> 800f15c: b9 80 08 00 mv r1,r12 800f160: e3 ff ff e2 bi 800f0e8 <_Heap_Extend+0x98> 08003e80 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8003e80: 37 9c ff a8 addi sp,sp,-88 8003e84: 5b 8b 00 50 sw (sp+80),r11 8003e88: 5b 8c 00 4c sw (sp+76),r12 8003e8c: 5b 8d 00 48 sw (sp+72),r13 8003e90: 5b 8e 00 44 sw (sp+68),r14 8003e94: 5b 8f 00 40 sw (sp+64),r15 8003e98: 5b 90 00 3c sw (sp+60),r16 8003e9c: 5b 91 00 38 sw (sp+56),r17 8003ea0: 5b 92 00 34 sw (sp+52),r18 8003ea4: 5b 93 00 30 sw (sp+48),r19 8003ea8: 5b 94 00 2c sw (sp+44),r20 8003eac: 5b 95 00 28 sw (sp+40),r21 8003eb0: 5b 96 00 24 sw (sp+36),r22 8003eb4: 5b 97 00 20 sw (sp+32),r23 8003eb8: 5b 98 00 1c sw (sp+28),r24 8003ebc: 5b 99 00 18 sw (sp+24),r25 8003ec0: 5b 9b 00 14 sw (sp+20),fp 8003ec4: 5b 9d 00 10 sw (sp+16),ra 8003ec8: 20 63 00 ff andi r3,r3,0xff 8003ecc: b8 20 58 00 mv r11,r1 8003ed0: b8 40 80 00 mv r16,r2 uintptr_t const page_size = heap->page_size; 8003ed4: 28 32 00 10 lw r18,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8003ed8: 28 33 00 14 lw r19,(r1+20) Heap_Block *const last_block = heap->last_block; 8003edc: 28 34 00 24 lw r20,(r1+36) Heap_Block *block = heap->first_block; 8003ee0: 28 2c 00 20 lw r12,(r1+32) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003ee4: 5c 60 00 1c bne r3,r0,8003f54 <_Heap_Walk+0xd4> if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003ee8: 78 03 08 01 mvhi r3,0x801 8003eec: 38 63 fa 08 ori r3,r3,0xfa08 8003ef0: 28 63 00 00 lw r3,(r3+0) 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; 8003ef4: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003ef8: 34 02 00 03 mvi r2,3 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; 8003efc: 39 ef 3e 5c ori r15,r15,0x3e5c if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f00: 44 62 00 1c be r3,r2,8003f70 <_Heap_Walk+0xf0> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8003f04: 34 01 00 01 mvi r1,1 block = next_block; } return true; } 8003f08: 2b 9d 00 10 lw ra,(sp+16) 8003f0c: 2b 8b 00 50 lw r11,(sp+80) 8003f10: 2b 8c 00 4c lw r12,(sp+76) 8003f14: 2b 8d 00 48 lw r13,(sp+72) 8003f18: 2b 8e 00 44 lw r14,(sp+68) 8003f1c: 2b 8f 00 40 lw r15,(sp+64) 8003f20: 2b 90 00 3c lw r16,(sp+60) 8003f24: 2b 91 00 38 lw r17,(sp+56) 8003f28: 2b 92 00 34 lw r18,(sp+52) 8003f2c: 2b 93 00 30 lw r19,(sp+48) 8003f30: 2b 94 00 2c lw r20,(sp+44) 8003f34: 2b 95 00 28 lw r21,(sp+40) 8003f38: 2b 96 00 24 lw r22,(sp+36) 8003f3c: 2b 97 00 20 lw r23,(sp+32) 8003f40: 2b 98 00 1c lw r24,(sp+28) 8003f44: 2b 99 00 18 lw r25,(sp+24) 8003f48: 2b 9b 00 14 lw fp,(sp+20) 8003f4c: 37 9c 00 58 addi sp,sp,88 8003f50: c3 a0 00 00 ret 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; if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f54: 78 03 08 01 mvhi r3,0x801 8003f58: 38 63 fa 08 ori r3,r3,0xfa08 8003f5c: 28 63 00 00 lw r3,(r3+0) 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; 8003f60: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f64: 34 02 00 03 mvi r2,3 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; 8003f68: 39 ef 44 6c ori r15,r15,0x446c if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f6c: 5c 62 ff e6 bne r3,r2,8003f04 <_Heap_Walk+0x84> 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)( 8003f70: 29 61 00 08 lw r1,(r11+8) 8003f74: 29 66 00 18 lw r6,(r11+24) 8003f78: 29 67 00 1c lw r7,(r11+28) 8003f7c: 5b 81 00 08 sw (sp+8),r1 8003f80: 29 61 00 0c lw r1,(r11+12) 8003f84: 78 03 08 01 mvhi r3,0x801 8003f88: 5b 94 00 04 sw (sp+4),r20 8003f8c: 5b 81 00 0c sw (sp+12),r1 8003f90: 38 63 c2 b4 ori r3,r3,0xc2b4 8003f94: ba 00 08 00 mv r1,r16 8003f98: 34 02 00 00 mvi r2,0 8003f9c: ba 40 20 00 mv r4,r18 8003fa0: ba 60 28 00 mv r5,r19 8003fa4: b9 80 40 00 mv r8,r12 8003fa8: d9 e0 00 00 call r15 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 8003fac: 46 40 00 d1 be r18,r0,80042f0 <_Heap_Walk+0x470> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8003fb0: 22 4d 00 07 andi r13,r18,0x7 8003fb4: 5d a0 00 d6 bne r13,r0,800430c <_Heap_Walk+0x48c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8003fb8: ba 60 08 00 mv r1,r19 8003fbc: ba 40 10 00 mv r2,r18 8003fc0: fb ff f3 38 calli 8000ca0 <__umodsi3> 8003fc4: b8 20 88 00 mv r17,r1 8003fc8: 5c 2d 00 d9 bne r1,r13,800432c <_Heap_Walk+0x4ac> ); return false; } if ( 8003fcc: 35 81 00 08 addi r1,r12,8 8003fd0: ba 40 10 00 mv r2,r18 8003fd4: fb ff f3 33 calli 8000ca0 <__umodsi3> 8003fd8: b8 20 70 00 mv r14,r1 8003fdc: 5c 31 00 ee bne r1,r17,8004394 <_Heap_Walk+0x514> 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; 8003fe0: 29 8d 00 04 lw r13,(r12+4) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 8003fe4: 21 b1 00 01 andi r17,r13,0x1 8003fe8: 46 21 00 f3 be r17,r1,80043b4 <_Heap_Walk+0x534> ); return false; } if ( first_block->prev_size != page_size ) { 8003fec: 29 84 00 00 lw r4,(r12+0) 8003ff0: 5e 44 00 60 bne r18,r4,8004170 <_Heap_Walk+0x2f0> ); return false; } if ( _Heap_Is_free( last_block ) ) { 8003ff4: 2a 82 00 04 lw r2,(r20+4) 8003ff8: 34 01 ff fe mvi r1,-2 8003ffc: a0 41 08 00 and r1,r2,r1 8004000: b6 81 08 00 add r1,r20,r1 8004004: 28 35 00 04 lw r21,(r1+4) 8004008: 22 b5 00 01 andi r21,r21,0x1 800400c: 46 ae 00 f1 be r21,r14,80043d0 <_Heap_Walk+0x550> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8004010: 29 6e 00 08 lw r14,(r11+8) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 8004014: 29 78 00 10 lw r24,(r11+16) 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 ) { 8004018: 45 6e 00 24 be r11,r14,80040a8 <_Heap_Walk+0x228> 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; 800401c: 29 76 00 20 lw r22,(r11+32) 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 8004020: 56 ce 00 fb bgu r22,r14,800440c <_Heap_Walk+0x58c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 8004024: 29 79 00 24 lw r25,(r11+36) 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 8004028: 55 d9 00 f9 bgu r14,r25,800440c <_Heap_Walk+0x58c> ); return false; } if ( 800402c: 35 c1 00 08 addi r1,r14,8 8004030: bb 00 10 00 mv r2,r24 8004034: fb ff f3 1b calli 8000ca0 <__umodsi3> 8004038: 5c 20 00 ed bne r1,r0,80043ec <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 800403c: 29 c2 00 04 lw r2,(r14+4) 8004040: 34 17 ff fe mvi r23,-2 8004044: a0 57 10 00 and r2,r2,r23 8004048: b5 c2 10 00 add r2,r14,r2 800404c: 28 42 00 04 lw r2,(r2+4) 8004050: 20 42 00 01 andi r2,r2,0x1 8004054: 5c 41 00 fe bne r2,r1,800444c <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 8004058: 29 c5 00 0c lw r5,(r14+12) 800405c: 45 65 00 10 be r11,r5,800409c <_Heap_Walk+0x21c> 8004060: e0 00 00 f3 bi 800442c <_Heap_Walk+0x5ac> <== NOT EXECUTED 8004064: 56 ce 00 ea bgu r22,r14,800440c <_Heap_Walk+0x58c> ); return false; } if ( 8004068: 35 c1 00 08 addi r1,r14,8 800406c: bb 00 10 00 mv r2,r24 8004070: 55 d9 00 e7 bgu r14,r25,800440c <_Heap_Walk+0x58c> 8004074: fb ff f3 0b calli 8000ca0 <__umodsi3> 8004078: 5c 20 00 dd bne r1,r0,80043ec <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 800407c: 29 c3 00 04 lw r3,(r14+4) 8004080: a0 77 18 00 and r3,r3,r23 8004084: b4 6e 18 00 add r3,r3,r14 8004088: 28 63 00 04 lw r3,(r3+4) 800408c: 20 63 00 01 andi r3,r3,0x1 8004090: 5c 61 00 ef bne r3,r1,800444c <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 8004094: 29 c5 00 0c lw r5,(r14+12) 8004098: 5c b5 00 e5 bne r5,r21,800442c <_Heap_Walk+0x5ac> (*printer)( 800409c: b9 c0 a8 00 mv r21,r14 return false; } prev_block = free_block; free_block = free_block->next; 80040a0: 29 ce 00 08 lw r14,(r14+8) 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 ) { 80040a4: 5d 6e ff f0 bne r11,r14,8004064 <_Heap_Walk+0x1e4> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 80040a8: 46 8c ff 97 be r20,r12,8003f04 <_Heap_Walk+0x84> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80040ac: 78 01 08 01 mvhi r1,0x801 80040b0: 5b 81 00 54 sw (sp+84),r1 "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)" : ""), 80040b4: 78 01 08 01 mvhi r1,0x801 80040b8: 5b 81 00 58 sw (sp+88),r1 block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80040bc: 2b 81 00 54 lw r1,(sp+84) - 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; 80040c0: 34 16 ff fe mvi r22,-2 80040c4: 78 15 08 01 mvhi r21,0x801 80040c8: 38 21 c6 0c ori r1,r1,0xc60c 80040cc: 5b 81 00 54 sw (sp+84),r1 "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)" : ""), 80040d0: 2b 81 00 58 lw r1,(sp+88) 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)( 80040d4: 78 18 08 01 mvhi r24,0x801 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80040d8: 78 17 08 01 mvhi r23,0x801 "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)" : ""), 80040dc: 38 21 c5 f4 ori r1,r1,0xc5f4 - 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; 80040e0: a1 b6 68 00 and r13,r13,r22 80040e4: 5b 81 00 58 sw (sp+88),r1 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)( 80040e8: ba 20 10 00 mv r2,r17 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80040ec: 3a b5 c6 7c ori r21,r21,0xc67c 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)( 80040f0: 3b 18 c6 00 ori r24,r24,0xc600 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80040f4: 3a f7 c5 e8 ori r23,r23,0xc5e8 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 80040f8: 78 1b 08 01 mvhi fp,0x801 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80040fc: b5 ac 70 00 add r14,r13,r12 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 ) { 8004100: 44 40 00 59 be r2,r0,8004264 <_Heap_Walk+0x3e4> (*printer)( 8004104: 78 03 08 01 mvhi r3,0x801 8004108: ba 00 08 00 mv r1,r16 800410c: 34 02 00 00 mvi r2,0 8004110: 38 63 c4 e8 ori r3,r3,0xc4e8 8004114: b9 80 20 00 mv r4,r12 8004118: b9 a0 28 00 mv r5,r13 800411c: d9 e0 00 00 call r15 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 8004120: 29 63 00 20 lw r3,(r11+32) 8004124: 54 6e 00 8a bgu r3,r14,800434c <_Heap_Walk+0x4cc> 8004128: 29 61 00 24 lw r1,(r11+36) 800412c: 55 c1 00 88 bgu r14,r1,800434c <_Heap_Walk+0x4cc> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 8004130: b9 a0 08 00 mv r1,r13 8004134: ba 40 10 00 mv r2,r18 8004138: fb ff f2 da calli 8000ca0 <__umodsi3> 800413c: b8 20 88 00 mv r17,r1 8004140: 5c 20 00 8c bne r1,r0,8004370 <_Heap_Walk+0x4f0> ); return false; } if ( block_size < min_block_size ) { 8004144: 51 b3 00 13 bgeu r13,r19,8004190 <_Heap_Walk+0x310> (*printer)( 8004148: 78 03 08 01 mvhi r3,0x801 800414c: ba 00 08 00 mv r1,r16 8004150: 38 63 c5 88 ori r3,r3,0xc588 8004154: b9 80 20 00 mv r4,r12 8004158: b9 a0 28 00 mv r5,r13 800415c: ba 60 30 00 mv r6,r19 8004160: 34 02 00 01 mvi r2,1 8004164: d9 e0 00 00 call r15 8004168: ba 20 08 00 mv r1,r17 block, block_size, min_block_size ); return false; 800416c: e3 ff ff 67 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 8004170: 78 03 08 01 mvhi r3,0x801 8004174: ba 00 08 00 mv r1,r16 8004178: 38 63 c4 04 ori r3,r3,0xc404 800417c: ba 40 28 00 mv r5,r18 8004180: 34 02 00 01 mvi r2,1 8004184: d9 e0 00 00 call r15 8004188: b9 c0 08 00 mv r1,r14 800418c: e3 ff ff 5f bi 8003f08 <_Heap_Walk+0x88> ); return false; } if ( next_block_begin <= block_begin ) { 8004190: 55 cc 00 0a bgu r14,r12,80041b8 <_Heap_Walk+0x338> (*printer)( 8004194: 78 03 08 01 mvhi r3,0x801 8004198: ba 00 08 00 mv r1,r16 800419c: 38 63 c5 b4 ori r3,r3,0xc5b4 80041a0: b9 80 20 00 mv r4,r12 80041a4: b9 c0 28 00 mv r5,r14 80041a8: 34 02 00 01 mvi r2,1 80041ac: d9 e0 00 00 call r15 80041b0: ba 20 08 00 mv r1,r17 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 80041b4: e3 ff ff 55 bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_prev_used( next_block ) ) { 80041b8: 29 c3 00 04 lw r3,(r14+4) 80041bc: 20 63 00 01 andi r3,r3,0x1 80041c0: 5c 60 00 22 bne r3,r0,8004248 <_Heap_Walk+0x3c8> 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; 80041c4: 29 91 00 04 lw r17,(r12+4) 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)( 80041c8: 29 85 00 0c lw r5,(r12+12) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80041cc: 29 61 00 08 lw r1,(r11+8) - 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; 80041d0: a2 36 68 00 and r13,r17,r22 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 80041d4: 29 63 00 0c lw r3,(r11+12) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80041d8: b5 8d c8 00 add r25,r12,r13 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80041dc: ba e0 30 00 mv r6,r23 80041e0: 44 25 00 03 be r1,r5,80041ec <_Heap_Walk+0x36c> "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)" : ""), 80041e4: ba a0 30 00 mv r6,r21 80041e8: 44 ab 00 40 be r5,r11,80042e8 <_Heap_Walk+0x468> 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)( 80041ec: 29 87 00 08 lw r7,(r12+8) 80041f0: bb 00 40 00 mv r8,r24 80041f4: 44 67 00 03 be r3,r7,8004200 <_Heap_Walk+0x380> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80041f8: ba a0 40 00 mv r8,r21 80041fc: 44 eb 00 39 be r7,r11,80042e0 <_Heap_Walk+0x460> 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)( 8004200: 78 03 08 01 mvhi r3,0x801 8004204: ba 00 08 00 mv r1,r16 8004208: 34 02 00 00 mvi r2,0 800420c: 38 63 c6 18 ori r3,r3,0xc618 8004210: b9 80 20 00 mv r4,r12 8004214: d9 e0 00 00 call r15 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 8004218: 2b 26 00 00 lw r6,(r25+0) 800421c: 45 a6 00 1a be r13,r6,8004284 <_Heap_Walk+0x404> (*printer)( 8004220: 78 03 08 01 mvhi r3,0x801 8004224: ba 00 08 00 mv r1,r16 8004228: 38 63 c6 44 ori r3,r3,0xc644 800422c: b9 80 20 00 mv r4,r12 8004230: b9 a0 28 00 mv r5,r13 8004234: bb 20 38 00 mv r7,r25 8004238: 34 02 00 01 mvi r2,1 800423c: d9 e0 00 00 call r15 8004240: 34 01 00 00 mvi r1,0 8004244: e3 ff ff 31 bi 8003f08 <_Heap_Walk+0x88> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8004248: 46 8e ff 2f be r20,r14,8003f04 <_Heap_Walk+0x84> 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 ) { 800424c: 29 cd 00 04 lw r13,(r14+4) 8004250: b9 c0 60 00 mv r12,r14 8004254: 21 a2 00 01 andi r2,r13,0x1 - 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; 8004258: a1 b6 68 00 and r13,r13,r22 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 800425c: b5 ac 70 00 add r14,r13,r12 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 ) { 8004260: 5c 40 ff a9 bne r2,r0,8004104 <_Heap_Walk+0x284> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 8004264: 29 86 00 00 lw r6,(r12+0) 8004268: bb 60 18 00 mv r3,fp 800426c: ba 00 08 00 mv r1,r16 8004270: 38 63 c5 00 ori r3,r3,0xc500 8004274: b9 80 20 00 mv r4,r12 8004278: b9 a0 28 00 mv r5,r13 800427c: d9 e0 00 00 call r15 8004280: e3 ff ff a8 bi 8004120 <_Heap_Walk+0x2a0> ); return false; } if ( !prev_used ) { 8004284: 22 31 00 01 andi r17,r17,0x1 8004288: 46 20 00 0e be r17,r0,80042c0 <_Heap_Walk+0x440> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 800428c: 29 63 00 08 lw r3,(r11+8) ) { 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 ) { 8004290: 44 6b 00 04 be r3,r11,80042a0 <_Heap_Walk+0x420> if ( free_block == block ) { 8004294: 44 6c ff ed be r3,r12,8004248 <_Heap_Walk+0x3c8> return true; } free_block = free_block->next; 8004298: 28 63 00 08 lw r3,(r3+8) ) { 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 ) { 800429c: 5c 6b ff fe bne r3,r11,8004294 <_Heap_Walk+0x414> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 80042a0: 78 03 08 01 mvhi r3,0x801 80042a4: ba 00 08 00 mv r1,r16 80042a8: 38 63 c6 b0 ori r3,r3,0xc6b0 80042ac: b9 80 20 00 mv r4,r12 80042b0: 34 02 00 01 mvi r2,1 80042b4: d9 e0 00 00 call r15 80042b8: 34 01 00 00 mvi r1,0 80042bc: e3 ff ff 13 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !prev_used ) { (*printer)( 80042c0: 78 03 08 01 mvhi r3,0x801 80042c4: ba 00 08 00 mv r1,r16 80042c8: 38 63 c6 80 ori r3,r3,0xc680 80042cc: b9 80 20 00 mv r4,r12 80042d0: 34 02 00 01 mvi r2,1 80042d4: d9 e0 00 00 call r15 80042d8: ba 20 08 00 mv r1,r17 80042dc: e3 ff ff 0b bi 8003f08 <_Heap_Walk+0x88> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80042e0: 2b 88 00 54 lw r8,(sp+84) 80042e4: e3 ff ff c7 bi 8004200 <_Heap_Walk+0x380> "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)" : ""), 80042e8: 2b 86 00 58 lw r6,(sp+88) 80042ec: e3 ff ff c0 bi 80041ec <_Heap_Walk+0x36c> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 80042f0: 78 03 08 01 mvhi r3,0x801 80042f4: ba 00 08 00 mv r1,r16 80042f8: 38 63 c3 48 ori r3,r3,0xc348 80042fc: 34 02 00 01 mvi r2,1 8004300: d9 e0 00 00 call r15 8004304: ba 40 08 00 mv r1,r18 8004308: e3 ff ff 00 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 800430c: 78 03 08 01 mvhi r3,0x801 8004310: ba 00 08 00 mv r1,r16 8004314: 38 63 c3 5c ori r3,r3,0xc35c 8004318: ba 40 20 00 mv r4,r18 800431c: 34 02 00 01 mvi r2,1 8004320: d9 e0 00 00 call r15 8004324: 34 01 00 00 mvi r1,0 8004328: e3 ff fe f8 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 800432c: 78 03 08 01 mvhi r3,0x801 8004330: ba 00 08 00 mv r1,r16 8004334: 38 63 c3 7c ori r3,r3,0xc37c 8004338: ba 60 20 00 mv r4,r19 800433c: 34 02 00 01 mvi r2,1 8004340: d9 e0 00 00 call r15 8004344: b9 a0 08 00 mv r1,r13 8004348: e3 ff fe f0 bi 8003f08 <_Heap_Walk+0x88> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 800434c: 78 03 08 01 mvhi r3,0x801 8004350: ba 00 08 00 mv r1,r16 8004354: 38 63 c5 28 ori r3,r3,0xc528 8004358: b9 80 20 00 mv r4,r12 800435c: b9 c0 28 00 mv r5,r14 8004360: 34 02 00 01 mvi r2,1 8004364: d9 e0 00 00 call r15 8004368: 34 01 00 00 mvi r1,0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 800436c: e3 ff fe e7 bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 8004370: 78 03 08 01 mvhi r3,0x801 8004374: ba 00 08 00 mv r1,r16 8004378: 38 63 c5 58 ori r3,r3,0xc558 800437c: b9 80 20 00 mv r4,r12 8004380: b9 a0 28 00 mv r5,r13 8004384: 34 02 00 01 mvi r2,1 8004388: d9 e0 00 00 call r15 800438c: 34 01 00 00 mvi r1,0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 8004390: e3 ff fe de bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 8004394: 78 03 08 01 mvhi r3,0x801 8004398: ba 00 08 00 mv r1,r16 800439c: 38 63 c3 a0 ori r3,r3,0xc3a0 80043a0: b9 80 20 00 mv r4,r12 80043a4: 34 02 00 01 mvi r2,1 80043a8: d9 e0 00 00 call r15 80043ac: ba 20 08 00 mv r1,r17 80043b0: e3 ff fe d6 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 80043b4: 78 03 08 01 mvhi r3,0x801 80043b8: ba 00 08 00 mv r1,r16 80043bc: 38 63 c3 d4 ori r3,r3,0xc3d4 80043c0: 34 02 00 01 mvi r2,1 80043c4: d9 e0 00 00 call r15 80043c8: ba 20 08 00 mv r1,r17 80043cc: e3 ff fe cf bi 8003f08 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 80043d0: 78 03 08 01 mvhi r3,0x801 80043d4: ba 00 08 00 mv r1,r16 80043d8: 38 63 c4 30 ori r3,r3,0xc430 80043dc: 34 02 00 01 mvi r2,1 80043e0: d9 e0 00 00 call r15 80043e4: ba a0 08 00 mv r1,r21 80043e8: e3 ff fe c8 bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 80043ec: 78 03 08 01 mvhi r3,0x801 80043f0: ba 00 08 00 mv r1,r16 80043f4: 38 63 c4 68 ori r3,r3,0xc468 80043f8: b9 c0 20 00 mv r4,r14 80043fc: 34 02 00 01 mvi r2,1 8004400: d9 e0 00 00 call r15 8004404: 34 01 00 00 mvi r1,0 8004408: e3 ff fe c0 bi 8003f08 <_Heap_Walk+0x88> 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 ) ) { (*printer)( 800440c: 78 03 08 01 mvhi r3,0x801 8004410: ba 00 08 00 mv r1,r16 8004414: 38 63 c4 48 ori r3,r3,0xc448 8004418: b9 c0 20 00 mv r4,r14 800441c: 34 02 00 01 mvi r2,1 8004420: d9 e0 00 00 call r15 8004424: 34 01 00 00 mvi r1,0 8004428: e3 ff fe b8 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( free_block->prev != prev_block ) { (*printer)( 800442c: 78 03 08 01 mvhi r3,0x801 8004430: ba 00 08 00 mv r1,r16 8004434: 38 63 c4 b4 ori r3,r3,0xc4b4 8004438: b9 c0 20 00 mv r4,r14 800443c: 34 02 00 01 mvi r2,1 8004440: d9 e0 00 00 call r15 8004444: 34 01 00 00 mvi r1,0 8004448: e3 ff fe b0 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 800444c: 78 03 08 01 mvhi r3,0x801 8004450: ba 00 08 00 mv r1,r16 8004454: 38 63 c4 98 ori r3,r3,0xc498 8004458: b9 c0 20 00 mv r4,r14 800445c: 34 02 00 01 mvi r2,1 8004460: d9 e0 00 00 call r15 8004464: 34 01 00 00 mvi r1,0 8004468: e3 ff fe a8 bi 8003f08 <_Heap_Walk+0x88> 08003d50 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003d50: 37 9c ff e4 addi sp,sp,-28 8003d54: 5b 8b 00 1c sw (sp+28),r11 8003d58: 5b 8c 00 18 sw (sp+24),r12 8003d5c: 5b 8d 00 14 sw (sp+20),r13 8003d60: 5b 8e 00 10 sw (sp+16),r14 8003d64: 5b 8f 00 0c sw (sp+12),r15 8003d68: 5b 90 00 08 sw (sp+8),r16 8003d6c: 5b 9d 00 04 sw (sp+4),ra #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; 8003d70: 34 06 00 00 mvi r6,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003d74: b8 20 58 00 mv r11,r1 8003d78: 20 a5 ff ff andi r5,r5,0xffff 8003d7c: b8 40 78 00 mv r15,r2 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 8003d80: 58 25 00 18 sw (r1+24),r5 /* * 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; 8003d84: 0c 26 00 10 sh (r1+16),r6 #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; 8003d88: 58 26 00 1c sw (r1+28),r6 information->inactive_per_block = 0; 8003d8c: 58 26 00 30 sw (r1+48),r6 information->object_blocks = 0; 8003d90: 58 26 00 34 sw (r1+52),r6 information->inactive = 0; 8003d94: 0c 26 00 2c sh (r1+44),r6 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 8003d98: 0d 63 00 04 sh (r11+4),r3 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 8003d9c: 59 62 00 00 sw (r11+0),r2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8003da0: 78 0d 08 01 mvhi r13,0x801 8003da4: 34 02 00 02 mvi r2,2 8003da8: b9 e0 08 00 mv r1,r15 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003dac: b8 80 60 00 mv r12,r4 8003db0: b8 60 70 00 mv r14,r3 8003db4: b8 e0 80 00 mv r16,r7 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8003db8: 39 ad c7 bc ori r13,r13,0xc7bc 8003dbc: fb ff f1 0d calli 80001f0 <__ashlsi3> 8003dc0: b5 a1 08 00 add r1,r13,r1 8003dc4: 28 2d 00 00 lw r13,(r1+0) 8003dc8: 34 02 00 02 mvi r2,2 8003dcc: b9 c0 08 00 mv r1,r14 8003dd0: fb ff f1 08 calli 80001f0 <__ashlsi3> 8003dd4: b5 a1 08 00 add r1,r13,r1 8003dd8: 58 2b 00 00 sw (r1+0),r11 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 8003ddc: 34 02 00 1f mvi r2,31 8003de0: b9 80 08 00 mv r1,r12 8003de4: fb ff f1 2b calli 8000290 <__lshrsi3> 8003de8: 20 22 00 ff andi r2,r1,0xff maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003dec: 78 05 7f ff mvhi r5,0x7fff 8003df0: 38 a5 ff ff ori r5,r5,0xffff _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 8003df4: 31 62 00 12 sb (r11+18),r2 (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003df8: a1 85 60 00 and r12,r12,r5 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 8003dfc: 44 40 00 02 be r2,r0,8003e04 <_Objects_Initialize_information+0xb4> 8003e00: 45 80 00 2c be r12,r0,8003eb0 <_Objects_Initialize_information+0x160> 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; 8003e04: 78 01 08 01 mvhi r1,0x801 8003e08: 38 21 c6 20 ori r1,r1,0xc620 8003e0c: 59 61 00 1c sw (r11+28),r1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 8003e10: 34 02 00 18 mvi r2,24 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 8003e14: 0d 6c 00 14 sh (r11+20),r12 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 8003e18: b9 e0 08 00 mv r1,r15 8003e1c: fb ff f0 f5 calli 80001f0 <__ashlsi3> 8003e20: 78 02 00 01 mvhi r2,0x1 8003e24: 38 42 00 00 ori r2,r2,0x0 8003e28: b8 22 68 00 or r13,r1,r2 8003e2c: 34 02 00 1b mvi r2,27 8003e30: b9 c0 08 00 mv r1,r14 8003e34: fb ff f0 ef calli 80001f0 <__ashlsi3> 8003e38: 7d 83 00 00 cmpnei r3,r12,0 8003e3c: b9 a1 08 00 or r1,r13,r1 8003e40: b8 23 08 00 or r1,r1,r3 8003e44: 59 61 00 08 sw (r11+8),r1 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 8003e48: 22 02 00 03 andi r2,r16,0x3 8003e4c: ba 00 08 00 mv r1,r16 8003e50: 5c 40 00 14 bne r2,r0,8003ea0 <_Objects_Initialize_information+0x150> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8003e54: 35 63 00 24 addi r3,r11,36 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8003e58: 35 62 00 20 addi r2,r11,32 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 8003e5c: 0d 61 00 38 sh (r11+56),r1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8003e60: 34 01 00 00 mvi r1,0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8003e64: 59 63 00 20 sw (r11+32),r3 the_chain->permanent_null = NULL; 8003e68: 59 61 00 24 sw (r11+36),r1 the_chain->last = _Chain_Head(the_chain); 8003e6c: 59 62 00 28 sw (r11+40),r2 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 8003e70: 45 81 00 03 be r12,r1,8003e7c <_Objects_Initialize_information+0x12c> /* * 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 ); 8003e74: b9 60 08 00 mv r1,r11 8003e78: fb ff fe 84 calli 8003888 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 8003e7c: 2b 9d 00 04 lw ra,(sp+4) 8003e80: 2b 8b 00 1c lw r11,(sp+28) 8003e84: 2b 8c 00 18 lw r12,(sp+24) 8003e88: 2b 8d 00 14 lw r13,(sp+20) 8003e8c: 2b 8e 00 10 lw r14,(sp+16) 8003e90: 2b 8f 00 0c lw r15,(sp+12) 8003e94: 2b 90 00 08 lw r16,(sp+8) 8003e98: 37 9c 00 1c addi sp,sp,28 8003e9c: c3 a0 00 00 ret * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 8003ea0: 36 10 00 04 addi r16,r16,4 <== NOT EXECUTED 8003ea4: 34 01 ff fc mvi r1,-4 <== NOT EXECUTED 8003ea8: a2 01 08 00 and r1,r16,r1 <== NOT EXECUTED 8003eac: e3 ff ff ea bi 8003e54 <_Objects_Initialize_information+0x104> <== NOT EXECUTED /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 8003eb0: b9 80 08 00 mv r1,r12 8003eb4: 34 02 00 01 mvi r2,1 8003eb8: 34 03 00 14 mvi r3,20 8003ebc: fb ff fd ff calli 80036b8 <_Internal_error_Occurred> 08003f3c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 8003f3c: 37 9c ff ec addi sp,sp,-20 8003f40: 5b 8b 00 14 sw (sp+20),r11 8003f44: 5b 8c 00 10 sw (sp+16),r12 8003f48: 5b 8d 00 0c sw (sp+12),r13 8003f4c: 5b 8e 00 08 sw (sp+8),r14 8003f50: 5b 9d 00 04 sw (sp+4),ra /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 8003f54: 28 2c 00 08 lw r12,(r1+8) block_count = (information->maximum - index_base) / 8003f58: 2c 2d 00 14 lhu r13,(r1+20) */ void _Objects_Shrink_information( Objects_Information *information ) { 8003f5c: b8 20 70 00 mv r14,r1 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 8003f60: 2c 21 00 10 lhu r1,(r1+16) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 8003f64: 21 8c ff ff andi r12,r12,0xffff block_count = (information->maximum - index_base) / 8003f68: b9 a0 10 00 mv r2,r13 8003f6c: c8 2c 08 00 sub r1,r1,r12 8003f70: f8 00 57 78 calli 8019d50 <__udivsi3> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003f74: 44 20 00 09 be r1,r0,8003f98 <_Objects_Shrink_information+0x5c> if ( information->inactive_per_block[ block ] == 8003f78: 29 c5 00 30 lw r5,(r14+48) information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 8003f7c: 34 0b 00 04 mvi r11,4 8003f80: 34 03 00 00 mvi r3,0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8003f84: 28 a2 00 00 lw r2,(r5+0) 8003f88: 45 a2 00 11 be r13,r2,8003fcc <_Objects_Shrink_information+0x90> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003f8c: 34 63 00 01 addi r3,r3,1 if ( information->inactive_per_block[ block ] == 8003f90: b4 ab 10 00 add r2,r5,r11 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003f94: 54 23 00 08 bgu r1,r3,8003fb4 <_Objects_Shrink_information+0x78> return; } index_base += information->allocation_size; } } 8003f98: 2b 9d 00 04 lw ra,(sp+4) 8003f9c: 2b 8b 00 14 lw r11,(sp+20) 8003fa0: 2b 8c 00 10 lw r12,(sp+16) 8003fa4: 2b 8d 00 0c lw r13,(sp+12) 8003fa8: 2b 8e 00 08 lw r14,(sp+8) 8003fac: 37 9c 00 14 addi sp,sp,20 8003fb0: c3 a0 00 00 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8003fb4: 28 42 00 00 lw r2,(r2+0) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 8003fb8: b5 8d 60 00 add r12,r12,r13 8003fbc: 35 64 00 04 addi r4,r11,4 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8003fc0: 45 a2 00 04 be r13,r2,8003fd0 <_Objects_Shrink_information+0x94> 8003fc4: b8 80 58 00 mv r11,r4 8003fc8: e3 ff ff f1 bi 8003f8c <_Objects_Shrink_information+0x50> 8003fcc: b8 60 58 00 mv r11,r3 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 8003fd0: 29 c1 00 20 lw r1,(r14+32) do { index = _Objects_Get_index( the_object->id ); 8003fd4: 28 22 00 08 lw r2,(r1+8) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 8003fd8: 28 2d 00 00 lw r13,(r1+0) * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 8003fdc: 20 42 ff ff andi r2,r2,0xffff /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 8003fe0: 55 82 00 05 bgu r12,r2,8003ff4 <_Objects_Shrink_information+0xb8> (index < (index_base + information->allocation_size))) { 8003fe4: 2d c3 00 14 lhu r3,(r14+20) 8003fe8: b5 83 18 00 add r3,r12,r3 8003fec: 50 43 00 02 bgeu r2,r3,8003ff4 <_Objects_Shrink_information+0xb8> _Chain_Extract( &extract_me->Node ); 8003ff0: f8 00 12 63 calli 800897c <_Chain_Extract> } } while ( the_object ); 8003ff4: 45 a0 00 03 be r13,r0,8004000 <_Objects_Shrink_information+0xc4> 8003ff8: b9 a0 08 00 mv r1,r13 8003ffc: e3 ff ff f6 bi 8003fd4 <_Objects_Shrink_information+0x98> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 8004000: 29 c1 00 34 lw r1,(r14+52) 8004004: b4 2b 08 00 add r1,r1,r11 8004008: 28 21 00 00 lw r1,(r1+0) 800400c: f8 00 07 c0 calli 8005f0c <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 8004010: 2d c3 00 2c lhu r3,(r14+44) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004014: 29 c1 00 34 lw r1,(r14+52) information->inactive_per_block[ block ] = 0; 8004018: 29 c4 00 30 lw r4,(r14+48) information->inactive -= information->allocation_size; 800401c: 2d c2 00 14 lhu r2,(r14+20) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004020: b4 2b 08 00 add r1,r1,r11 information->inactive_per_block[ block ] = 0; 8004024: b4 8b 58 00 add r11,r4,r11 information->inactive -= information->allocation_size; 8004028: c8 62 10 00 sub r2,r3,r2 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 800402c: 59 6d 00 00 sw (r11+0),r13 information->inactive -= information->allocation_size; 8004030: 0d c2 00 2c sh (r14+44),r2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004034: 58 2d 00 00 sw (r1+0),r13 return; } index_base += information->allocation_size; } } 8004038: 2b 9d 00 04 lw ra,(sp+4) 800403c: 2b 8b 00 14 lw r11,(sp+20) 8004040: 2b 8c 00 10 lw r12,(sp+16) 8004044: 2b 8d 00 0c lw r13,(sp+12) 8004048: 2b 8e 00 08 lw r14,(sp+8) 800404c: 37 9c 00 14 addi sp,sp,20 8004050: c3 a0 00 00 ret 08040c28 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 8040c28: 37 9c ff f4 addi sp,sp,-12 8040c2c: 5b 8b 00 08 sw (sp+8),r11 8040c30: 5b 9d 00 04 sw (sp+4),ra 8040c34: b8 20 10 00 mv r2,r1 8040c38: 78 01 08 07 mvhi r1,0x807 8040c3c: 38 21 54 9c ori r1,r1,0x549c 8040c40: 37 83 00 0c addi r3,sp,12 8040c44: fb ff 2e bd calli 800c738 <_Objects_Get> /* * 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 ) { 8040c48: 2b 82 00 0c lw r2,(sp+12) 8040c4c: b8 20 58 00 mv r11,r1 8040c50: 44 40 00 05 be r2,r0,8040c64 <_Rate_monotonic_Timeout+0x3c> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8040c54: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8040c58: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8040c5c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8040c60: c3 a0 00 00 ret <== NOT EXECUTED */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; 8040c64: 28 21 00 40 lw r1,(r1+64) if ( _States_Is_waiting_for_period( the_thread->current_state ) && 8040c68: 28 23 00 10 lw r3,(r1+16) 8040c6c: 20 63 40 00 andi r3,r3,0x4000 8040c70: 44 62 00 04 be r3,r2,8040c80 <_Rate_monotonic_Timeout+0x58> the_thread->Wait.id == the_period->Object.id ) { 8040c74: 28 23 00 20 lw r3,(r1+32) 8040c78: 29 62 00 08 lw r2,(r11+8) 8040c7c: 44 62 00 1a be r3,r2,8040ce4 <_Rate_monotonic_Timeout+0xbc> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 8040c80: 29 62 00 38 lw r2,(r11+56) 8040c84: 34 01 00 01 mvi r1,1 8040c88: 44 41 00 0c be r2,r1,8040cb8 <_Rate_monotonic_Timeout+0x90> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 8040c8c: 34 01 00 04 mvi r1,4 8040c90: 59 61 00 38 sw (r11+56),r1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8040c94: 78 01 08 07 mvhi r1,0x807 8040c98: 38 21 50 24 ori r1,r1,0x5024 8040c9c: 28 22 00 00 lw r2,(r1+0) 8040ca0: 34 42 ff ff addi r2,r2,-1 8040ca4: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8040ca8: 2b 9d 00 04 lw ra,(sp+4) 8040cac: 2b 8b 00 08 lw r11,(sp+8) 8040cb0: 37 9c 00 0c addi sp,sp,12 8040cb4: c3 a0 00 00 ret _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; 8040cb8: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8040cbc: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 8040cc0: b9 60 08 00 mv r1,r11 8040cc4: fb ff fe a7 calli 8040760 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040cc8: 29 61 00 3c lw r1,(r11+60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040ccc: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040cd0: 59 61 00 1c sw (r11+28),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040cd4: 78 01 08 07 mvhi r1,0x807 8040cd8: 38 21 51 00 ori r1,r1,0x5100 8040cdc: fb ff 36 aa calli 800e784 <_Watchdog_Insert> 8040ce0: e3 ff ff ed bi 8040c94 <_Rate_monotonic_Timeout+0x6c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 8040ce4: 78 02 10 03 mvhi r2,0x1003 8040ce8: 38 42 ff f8 ori r2,r2,0xfff8 8040cec: fb ff b5 5c calli 802e25c <_Thread_Clear_state> 8040cf0: e3 ff ff f4 bi 8040cc0 <_Rate_monotonic_Timeout+0x98> 08008c30 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 8008c30: 37 9c ff e4 addi sp,sp,-28 8008c34: 5b 8b 00 0c sw (sp+12),r11 8008c38: 5b 8c 00 08 sw (sp+8),r12 8008c3c: 5b 9d 00 04 sw (sp+4),ra 8008c40: b8 20 58 00 mv r11,r1 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 8008c44: 90 00 60 00 rcsr r12,IE 8008c48: 34 01 ff fe mvi r1,-2 8008c4c: a1 81 08 00 and r1,r12,r1 8008c50: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 8008c54: 78 02 08 01 mvhi r2,0x801 8008c58: 38 42 c8 b4 ori r2,r2,0xc8b4 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c5c: 78 03 08 01 mvhi r3,0x801 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008c60: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c64: 38 63 c9 c4 ori r3,r3,0xc9c4 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008c68: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c6c: 28 63 00 00 lw r3,(r3+0) /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008c70: 5b 81 00 14 sw (sp+20),r1 8008c74: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c78: b8 60 20 00 mv r4,r3 8008c7c: 44 60 00 03 be r3,r0,8008c88 <_TOD_Get+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8008c80: d8 60 00 00 call r3 <== NOT EXECUTED 8008c84: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8008c88: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008c8c: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &now, &offset ); 8008c90: 37 81 00 10 addi r1,sp,16 8008c94: 37 82 00 18 addi r2,sp,24 now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 8008c98: 5b 83 00 18 sw (sp+24),r3 8008c9c: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &now, &offset ); 8008ca0: fb ff f2 7e calli 8005698 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 8008ca4: 2b 81 00 14 lw r1,(sp+20) 8008ca8: 59 61 00 04 sw (r11+4),r1 8008cac: 2b 81 00 10 lw r1,(sp+16) 8008cb0: 59 61 00 00 sw (r11+0),r1 } 8008cb4: 2b 9d 00 04 lw ra,(sp+4) 8008cb8: 2b 8b 00 0c lw r11,(sp+12) 8008cbc: 2b 8c 00 08 lw r12,(sp+8) 8008cc0: 37 9c 00 1c addi sp,sp,28 8008cc4: c3 a0 00 00 ret 08008cc8 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 8008cc8: 37 9c ff e4 addi sp,sp,-28 8008ccc: 5b 8b 00 0c sw (sp+12),r11 8008cd0: 5b 8c 00 08 sw (sp+8),r12 8008cd4: 5b 9d 00 04 sw (sp+4),ra 8008cd8: b8 20 58 00 mv r11,r1 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 8008cdc: 90 00 60 00 rcsr r12,IE 8008ce0: 34 01 ff fe mvi r1,-2 8008ce4: a1 81 08 00 and r1,r12,r1 8008ce8: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 8008cec: 78 02 08 01 mvhi r2,0x801 8008cf0: 38 42 c8 a4 ori r2,r2,0xc8a4 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008cf4: 78 03 08 01 mvhi r3,0x801 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8008cf8: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008cfc: 38 63 c9 c4 ori r3,r3,0xc9c4 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8008d00: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d04: 28 63 00 00 lw r3,(r3+0) /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8008d08: 5b 81 00 14 sw (sp+20),r1 8008d0c: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d10: b8 60 20 00 mv r4,r3 8008d14: 44 60 00 03 be r3,r0,8008d20 <_TOD_Get_uptime+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8008d18: d8 60 00 00 call r3 <== NOT EXECUTED 8008d1c: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8008d20: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008d24: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &up, &offset ); 8008d28: 37 81 00 10 addi r1,sp,16 8008d2c: 37 82 00 18 addi r2,sp,24 up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 8008d30: 5b 83 00 18 sw (sp+24),r3 8008d34: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &up, &offset ); 8008d38: fb ff f2 58 calli 8005698 <_Timespec_Add_to> *uptime = up; 8008d3c: 2b 81 00 14 lw r1,(sp+20) 8008d40: 59 61 00 04 sw (r11+4),r1 8008d44: 2b 81 00 10 lw r1,(sp+16) 8008d48: 59 61 00 00 sw (r11+0),r1 } 8008d4c: 2b 9d 00 04 lw ra,(sp+4) 8008d50: 2b 8b 00 0c lw r11,(sp+12) 8008d54: 2b 8c 00 08 lw r12,(sp+8) 8008d58: 37 9c 00 1c addi sp,sp,28 8008d5c: c3 a0 00 00 ret 0800405c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 800405c: 37 9c ff ec addi sp,sp,-20 8004060: 5b 8b 00 14 sw (sp+20),r11 8004064: 5b 8c 00 10 sw (sp+16),r12 8004068: 5b 8d 00 0c sw (sp+12),r13 800406c: 5b 8e 00 08 sw (sp+8),r14 8004070: 5b 9d 00 04 sw (sp+4),ra 8004074: b8 20 58 00 mv r11,r1 */ /* * Save original state */ original_state = the_thread->current_state; 8004078: 28 2d 00 10 lw r13,(r1+16) void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 800407c: b8 40 60 00 mv r12,r2 8004080: 20 6e 00 ff andi r14,r3,0xff /* * 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 ); 8004084: f8 00 04 e1 calli 8005408 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 8004088: 29 61 00 14 lw r1,(r11+20) 800408c: 44 2c 00 04 be r1,r12,800409c <_Thread_Change_priority+0x40> _Thread_Set_priority( the_thread, new_priority ); 8004090: b9 80 10 00 mv r2,r12 8004094: b9 60 08 00 mv r1,r11 8004098: f8 00 04 37 calli 8005174 <_Thread_Set_priority> _ISR_Disable( level ); 800409c: 90 00 60 00 rcsr r12,IE 80040a0: 34 02 ff fe mvi r2,-2 80040a4: a1 82 10 00 and r2,r12,r2 80040a8: d0 02 00 00 wcsr IE,r2 /* * 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; 80040ac: 29 61 00 10 lw r1,(r11+16) if ( state != STATES_TRANSIENT ) { 80040b0: 34 04 00 04 mvi r4,4 80040b4: 44 24 00 21 be r1,r4,8004138 <_Thread_Change_priority+0xdc> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 80040b8: a1 a4 68 00 and r13,r13,r4 80040bc: 45 a0 00 0d be r13,r0,80040f0 <_Thread_Change_priority+0x94> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 80040c0: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 80040c4: 78 02 00 03 mvhi r2,0x3 <== NOT EXECUTED 80040c8: 38 42 be e0 ori r2,r2,0xbee0 <== NOT EXECUTED 80040cc: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 80040d0: 5c 20 00 10 bne r1,r0,8004110 <_Thread_Change_priority+0xb4> <== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 80040d4: 2b 9d 00 04 lw ra,(sp+4) 80040d8: 2b 8b 00 14 lw r11,(sp+20) 80040dc: 2b 8c 00 10 lw r12,(sp+16) 80040e0: 2b 8d 00 0c lw r13,(sp+12) 80040e4: 2b 8e 00 08 lw r14,(sp+8) 80040e8: 37 9c 00 14 addi sp,sp,20 80040ec: c3 a0 00 00 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 80040f0: 34 02 ff fb mvi r2,-5 80040f4: a0 22 10 00 and r2,r1,r2 80040f8: 59 62 00 10 sw (r11+16),r2 _ISR_Enable( level ); 80040fc: d0 0c 00 00 wcsr IE,r12 if ( _States_Is_waiting_on_thread_queue( state ) ) { 8004100: 78 02 00 03 mvhi r2,0x3 8004104: 38 42 be e0 ori r2,r2,0xbee0 8004108: a0 22 08 00 and r1,r1,r2 800410c: 44 20 ff f2 be r1,r0,80040d4 <_Thread_Change_priority+0x78> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 8004110: 29 61 00 44 lw r1,(r11+68) 8004114: b9 60 10 00 mv r2,r11 8004118: f8 00 03 dc calli 8005088 <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 800411c: 2b 9d 00 04 lw ra,(sp+4) 8004120: 2b 8b 00 14 lw r11,(sp+20) 8004124: 2b 8c 00 10 lw r12,(sp+16) 8004128: 2b 8d 00 0c lw r13,(sp+12) 800412c: 2b 8e 00 08 lw r14,(sp+8) 8004130: 37 9c 00 14 addi sp,sp,20 8004134: c3 a0 00 00 ret } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 8004138: 21 ad 00 04 andi r13,r13,0x4 800413c: 45 a0 00 3a be r13,r0,8004224 <_Thread_Change_priority+0x1c8> 8004140: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8004144: 38 21 c8 d4 ori r1,r1,0xc8d4 <== NOT EXECUTED _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 8004148: d0 0c 00 00 wcsr IE,r12 800414c: d0 02 00 00 wcsr IE,r2 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 ); 8004150: 2c 21 00 00 lhu r1,(r1+0) */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 8004154: 78 02 08 01 mvhi r2,0x801 8004158: 38 42 c7 b0 ori r2,r2,0xc7b0 800415c: 28 4e 00 00 lw r14,(r2+0) 8004160: 20 21 ff ff andi r1,r1,0xffff 8004164: 34 02 00 ff mvi r2,255 8004168: 54 22 00 49 bgu r1,r2,800428c <_Thread_Change_priority+0x230> 800416c: 78 0b 08 01 mvhi r11,0x801 8004170: 39 6b b0 44 ori r11,r11,0xb044 8004174: b5 61 08 00 add r1,r11,r1 8004178: 40 2d 00 00 lbu r13,(r1+0) 800417c: 35 ad 00 08 addi r13,r13,8 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 8004180: 78 02 08 01 mvhi r2,0x801 8004184: b5 ad 08 00 add r1,r13,r13 8004188: 38 42 c9 50 ori r2,r2,0xc950 800418c: b4 41 10 00 add r2,r2,r1 8004190: 2c 41 00 00 lhu r1,(r2+0) 8004194: 34 02 00 ff mvi r2,255 8004198: 54 22 00 38 bgu r1,r2,8004278 <_Thread_Change_priority+0x21c> 800419c: b5 61 58 00 add r11,r11,r1 80041a0: 41 6b 00 00 lbu r11,(r11+0) 80041a4: 35 6b 00 08 addi r11,r11,8 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041a8: 34 02 00 04 mvi r2,4 80041ac: b9 a0 08 00 mv r1,r13 80041b0: fb ff f0 10 calli 80001f0 <__ashlsi3> 80041b4: b5 61 08 00 add r1,r11,r1 80041b8: b4 21 10 00 add r2,r1,r1 80041bc: b4 41 08 00 add r1,r2,r1 80041c0: 34 02 00 02 mvi r2,2 80041c4: fb ff f0 0b calli 80001f0 <__ashlsi3> 80041c8: b5 c1 08 00 add r1,r14,r1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 80041cc: 78 02 08 01 mvhi r2,0x801 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041d0: 28 23 00 00 lw r3,(r1+0) * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 80041d4: 38 42 c8 e0 ori r2,r2,0xc8e0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041d8: 78 01 08 01 mvhi r1,0x801 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 80041dc: 28 42 00 00 lw r2,(r2+0) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041e0: 38 21 c8 b0 ori r1,r1,0xc8b0 80041e4: 58 23 00 00 sw (r1+0),r3 * 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() && 80041e8: 44 62 00 07 be r3,r2,8004204 <_Thread_Change_priority+0x1a8> _Thread_Executing->is_preemptible ) 80041ec: 40 41 00 75 lbu r1,(r2+117) 80041f0: 44 20 00 05 be r1,r0,8004204 <_Thread_Change_priority+0x1a8> _Context_Switch_necessary = true; 80041f4: 78 01 08 01 mvhi r1,0x801 80041f8: 38 21 c8 f0 ori r1,r1,0xc8f0 80041fc: 34 02 00 01 mvi r2,1 8004200: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 8004204: d0 0c 00 00 wcsr IE,r12 } 8004208: 2b 9d 00 04 lw ra,(sp+4) 800420c: 2b 8b 00 14 lw r11,(sp+20) 8004210: 2b 8c 00 10 lw r12,(sp+16) 8004214: 2b 8d 00 0c lw r13,(sp+12) 8004218: 2b 8e 00 08 lw r14,(sp+8) 800421c: 37 9c 00 14 addi sp,sp,20 8004220: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8004224: 29 63 00 90 lw r3,(r11+144) 8004228: 2d 64 00 96 lhu r4,(r11+150) _Priority_Major_bit_map |= the_priority_map->ready_major; 800422c: 78 01 08 01 mvhi r1,0x801 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8004230: 2c 65 00 00 lhu r5,(r3+0) _Priority_Major_bit_map |= the_priority_map->ready_major; 8004234: 38 21 c8 d4 ori r1,r1,0xc8d4 * 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 ); 8004238: 59 6d 00 10 sw (r11+16),r13 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800423c: b8 a4 20 00 or r4,r5,r4 8004240: 0c 64 00 00 sh (r3+0),r4 _Priority_Major_bit_map |= the_priority_map->ready_major; 8004244: 2c 23 00 00 lhu r3,(r1+0) 8004248: 2d 64 00 94 lhu r4,(r11+148) 800424c: b8 83 18 00 or r3,r4,r3 8004250: 20 63 ff ff andi r3,r3,0xffff 8004254: 0c 23 00 00 sh (r1+0),r3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 8004258: 45 cd 00 14 be r14,r13,80042a8 <_Thread_Change_priority+0x24c> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 800425c: 29 63 00 8c lw r3,(r11+140) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 8004260: 28 64 00 00 lw r4,(r3+0) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 8004264: 59 63 00 04 sw (r11+4),r3 before_node = after_node->next; after_node->next = the_node; 8004268: 58 6b 00 00 sw (r3+0),r11 the_node->next = before_node; before_node->previous = the_node; 800426c: 58 8b 00 04 sw (r4+4),r11 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 8004270: 59 64 00 00 sw (r11+0),r4 8004274: e3 ff ff b5 bi 8004148 <_Thread_Change_priority+0xec> { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 8004278: 34 02 00 08 mvi r2,8 800427c: fb ff f0 05 calli 8000290 <__lshrsi3> 8004280: b5 61 08 00 add r1,r11,r1 8004284: 40 2b 00 00 lbu r11,(r1+0) 8004288: e3 ff ff c8 bi 80041a8 <_Thread_Change_priority+0x14c> 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 ); 800428c: 34 02 00 08 mvi r2,8 8004290: 78 0b 08 01 mvhi r11,0x801 8004294: fb ff ef ff calli 8000290 <__lshrsi3> 8004298: 39 6b b0 44 ori r11,r11,0xb044 800429c: b5 61 08 00 add r1,r11,r1 80042a0: 40 2d 00 00 lbu r13,(r1+0) 80042a4: e3 ff ff b7 bi 8004180 <_Thread_Change_priority+0x124> _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 80042a8: 29 63 00 8c lw r3,(r11+140) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 80042ac: 34 64 00 04 addi r4,r3,4 80042b0: 59 64 00 00 sw (r11+0),r4 old_last_node = the_chain->last; 80042b4: 28 64 00 08 lw r4,(r3+8) the_chain->last = the_node; 80042b8: 58 6b 00 08 sw (r3+8),r11 old_last_node->next = the_node; the_node->previous = old_last_node; 80042bc: 59 64 00 04 sw (r11+4),r4 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; 80042c0: 58 8b 00 00 sw (r4+0),r11 80042c4: e3 ff ff a1 bi 8004148 <_Thread_Change_priority+0xec> 080049fc <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 80049fc: 37 9c ff f0 addi sp,sp,-16 8004a00: 5b 8b 00 10 sw (sp+16),r11 8004a04: 5b 8c 00 0c sw (sp+12),r12 8004a08: 5b 8d 00 08 sw (sp+8),r13 8004a0c: 5b 9d 00 04 sw (sp+4),ra uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 8004a10: 78 01 08 01 mvhi r1,0x801 8004a14: 38 21 c0 c4 ori r1,r1,0xc0c4 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004a18: 28 22 00 20 lw r2,(r1+32) 8004a1c: 28 29 00 24 lw r9,(r1+36) uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 8004a20: 28 2a 00 10 lw r10,(r1+16) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004a24: 64 42 00 00 cmpei r2,r2,0 8004a28: 65 29 00 00 cmpei r9,r9,0 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; maximum_extensions = Configuration.maximum_extensions; 8004a2c: 28 2d 00 08 lw r13,(r1+8) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004a30: 99 22 48 00 xor r9,r9,r2 8004a34: b9 20 58 00 mv r11,r9 8004a38: 5d 20 00 37 bne r9,r0,8004b14 <_Thread_Handler_initialization+0x118> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a3c: 78 0c 08 01 mvhi r12,0x801 8004a40: 39 8c c0 c0 ori r12,r12,0xc0c0 8004a44: 41 81 00 00 lbu r1,(r12+0) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004a48: 78 08 08 01 mvhi r8,0x801 _Thread_Executing = NULL; 8004a4c: 78 05 08 01 mvhi r5,0x801 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a50: 34 21 00 01 addi r1,r1,1 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004a54: 78 04 08 01 mvhi r4,0x801 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004a58: 78 03 08 01 mvhi r3,0x801 _Thread_Maximum_extensions = maximum_extensions; 8004a5c: 78 07 08 01 mvhi r7,0x801 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004a60: 78 06 08 01 mvhi r6,0x801 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004a64: 38 84 c8 b0 ori r4,r4,0xc8b0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004a68: 38 63 c8 c4 ori r3,r3,0xc8c4 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004a6c: 38 c6 c7 b4 ori r6,r6,0xc7b4 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004a70: 39 08 c8 f0 ori r8,r8,0xc8f0 _Thread_Executing = NULL; 8004a74: 38 a5 c8 e0 ori r5,r5,0xc8e0 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004a78: 38 e7 c8 c0 ori r7,r7,0xc8c0 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a7c: b4 21 10 00 add r2,r1,r1 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004a80: 58 ca 00 00 sw (r6+0),r10 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004a84: 58 89 00 00 sw (r4+0),r9 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004a88: 58 69 00 00 sw (r3+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a8c: b4 41 08 00 add r1,r2,r1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004a90: 31 09 00 00 sb (r8+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a94: 34 02 00 02 mvi r2,2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004a98: 58 ed 00 00 sw (r7+0),r13 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; 8004a9c: 58 a9 00 00 sw (r5+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004aa0: fb ff ed d4 calli 80001f0 <__ashlsi3> 8004aa4: f8 00 05 00 calli 8005ea4 <_Workspace_Allocate_or_fatal_error> 8004aa8: 78 03 08 01 mvhi r3,0x801 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004aac: 41 84 00 00 lbu r4,(r12+0) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004ab0: 38 63 c7 b0 ori r3,r3,0xc7b0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004ab4: b9 60 10 00 mv r2,r11 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004ab8: 58 61 00 00 sw (r3+0),r1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8004abc: b9 60 30 00 mv r6,r11 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004ac0: 34 23 00 04 addi r3,r1,4 8004ac4: 58 23 00 00 sw (r1+0),r3 the_chain->permanent_null = NULL; 8004ac8: 58 26 00 04 sw (r1+4),r6 the_chain->last = _Chain_Head(the_chain); 8004acc: 58 21 00 08 sw (r1+8),r1 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004ad0: 34 42 00 01 addi r2,r2,1 8004ad4: 34 21 00 0c addi r1,r1,12 8004ad8: 50 82 ff fa bgeu r4,r2,8004ac0 <_Thread_Handler_initialization+0xc4> /* * Initialize this class of objects. */ _Objects_Initialize_information( 8004adc: 34 02 00 01 mvi r2,1 8004ae0: 78 01 08 01 mvhi r1,0x801 8004ae4: 38 21 c9 80 ori r1,r1,0xc980 8004ae8: b8 40 18 00 mv r3,r2 8004aec: b8 40 20 00 mv r4,r2 8004af0: 34 05 01 38 mvi r5,312 8004af4: 34 07 00 08 mvi r7,8 8004af8: fb ff fc 96 calli 8003d50 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 8004afc: 2b 9d 00 04 lw ra,(sp+4) 8004b00: 2b 8b 00 10 lw r11,(sp+16) 8004b04: 2b 8c 00 0c lw r12,(sp+12) 8004b08: 2b 8d 00 08 lw r13,(sp+8) 8004b0c: 37 9c 00 10 addi sp,sp,16 8004b10: c3 a0 00 00 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 8004b14: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004b18: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004b1c: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 8004b20: fb ff fa e6 calli 80036b8 <_Internal_error_Occurred> <== NOT EXECUTED 08009a60 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 8009a60: 78 01 08 01 mvhi r1,0x801 8009a64: 38 21 c8 e0 ori r1,r1,0xc8e0 8009a68: 28 21 00 00 lw r1,(r1+0) ready = executing->ready; 8009a6c: 28 22 00 8c lw r2,(r1+140) _ISR_Disable( level ); 8009a70: 90 00 20 00 rcsr r4,IE 8009a74: 34 03 ff fe mvi r3,-2 8009a78: a0 83 18 00 and r3,r4,r3 8009a7c: d0 03 00 00 wcsr IE,r3 if ( _Chain_Has_only_one_node( ready ) ) { 8009a80: 28 46 00 00 lw r6,(r2+0) 8009a84: 28 45 00 08 lw r5,(r2+8) 8009a88: 44 c5 00 1f be r6,r5,8009b04 <_Thread_Reset_timeslice+0xa4> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 8009a8c: 28 25 00 00 lw r5,(r1+0) previous = the_node->previous; 8009a90: 28 26 00 04 lw r6,(r1+4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8009a94: 34 47 00 04 addi r7,r2,4 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 8009a98: 58 c5 00 00 sw (r6+0),r5 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8009a9c: 58 27 00 00 sw (r1+0),r7 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 8009aa0: 58 a6 00 04 sw (r5+4),r6 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 8009aa4: 28 45 00 08 lw r5,(r2+8) the_chain->last = the_node; 8009aa8: 58 41 00 08 sw (r2+8),r1 old_last_node->next = the_node; the_node->previous = old_last_node; 8009aac: 58 25 00 04 sw (r1+4),r5 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; 8009ab0: 58 a1 00 00 sw (r5+0),r1 return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 8009ab4: d0 04 00 00 wcsr IE,r4 8009ab8: d0 03 00 00 wcsr IE,r3 if ( _Thread_Is_heir( executing ) ) 8009abc: 78 03 08 01 mvhi r3,0x801 8009ac0: 38 63 c8 b0 ori r3,r3,0xc8b0 8009ac4: 28 65 00 00 lw r5,(r3+0) 8009ac8: 44 25 00 07 be r1,r5,8009ae4 <_Thread_Reset_timeslice+0x84> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 8009acc: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8009ad0: 38 21 c8 f0 ori r1,r1,0xc8f0 <== NOT EXECUTED 8009ad4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8009ad8: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED _ISR_Enable( level ); 8009adc: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED 8009ae0: c3 a0 00 00 ret <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 8009ae4: 28 42 00 00 lw r2,(r2+0) _Context_Switch_necessary = true; 8009ae8: 78 01 08 01 mvhi r1,0x801 8009aec: 38 21 c8 f0 ori r1,r1,0xc8f0 _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 8009af0: 58 62 00 00 sw (r3+0),r2 _Context_Switch_necessary = true; 8009af4: 34 02 00 01 mvi r2,1 8009af8: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 8009afc: d0 04 00 00 wcsr IE,r4 8009b00: c3 a0 00 00 ret executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 8009b04: d0 04 00 00 wcsr IE,r4 return; 8009b08: c3 a0 00 00 ret 080060f8 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 80060f8: 37 9c ff f0 addi sp,sp,-16 80060fc: 5b 8b 00 08 sw (sp+8),r11 8006100: 5b 9d 00 04 sw (sp+4),ra if ( !_States_Is_dormant( the_thread->current_state ) ) { 8006104: 28 25 00 10 lw r5,(r1+16) 8006108: 34 04 00 00 mvi r4,0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 800610c: b8 20 58 00 mv r11,r1 if ( !_States_Is_dormant( the_thread->current_state ) ) { 8006110: 20 a5 00 01 andi r5,r5,0x1 8006114: 44 a4 00 06 be r5,r4,800612c <_Thread_Restart+0x34> return true; } return false; } 8006118: b8 80 08 00 mv r1,r4 800611c: 2b 9d 00 04 lw ra,(sp+4) 8006120: 2b 8b 00 08 lw r11,(sp+8) 8006124: 37 9c 00 10 addi sp,sp,16 8006128: c3 a0 00 00 ret Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 800612c: 5b 82 00 10 sw (sp+16),r2 8006130: 5b 83 00 0c sw (sp+12),r3 8006134: f8 00 00 b9 calli 8006418 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 8006138: 2b 82 00 10 lw r2,(sp+16) 800613c: 2b 83 00 0c lw r3,(sp+12) 8006140: b9 60 08 00 mv r1,r11 8006144: f8 00 12 ce calli 800ac7c <_Thread_Reset> _Thread_Load_environment( the_thread ); 8006148: b9 60 08 00 mv r1,r11 800614c: f8 00 11 93 calli 800a798 <_Thread_Load_environment> _Thread_Ready( the_thread ); 8006150: b9 60 08 00 mv r1,r11 8006154: f8 00 12 66 calli 800aaec <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 8006158: b9 60 08 00 mv r1,r11 800615c: f8 00 02 6f calli 8006b18 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 8006160: 78 01 08 02 mvhi r1,0x802 8006164: 38 21 19 40 ori r1,r1,0x1940 8006168: 28 21 00 00 lw r1,(r1+0) 800616c: 34 04 00 01 mvi r4,1 8006170: 5d 61 ff ea bne r11,r1,8006118 <_Thread_Restart+0x20> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 8006174: 35 61 00 cc addi r1,r11,204 8006178: f8 00 04 0a calli 80071a0 <_CPU_Context_restore> 800617c: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 8006180: e3 ff ff e6 bi 8006118 <_Thread_Restart+0x20> <== NOT EXECUTED 08004b24 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004b24: 37 9c ff f8 addi sp,sp,-8 8004b28: 5b 8b 00 08 sw (sp+8),r11 8004b2c: 5b 9d 00 04 sw (sp+4),ra Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004b30: 28 22 00 34 lw r2,(r1+52) */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004b34: b8 20 58 00 mv r11,r1 Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004b38: 34 01 00 01 mvi r1,1 8004b3c: 44 41 00 0f be r2,r1,8004b78 <_Thread_queue_Dequeue+0x54> 8004b40: 78 02 08 00 mvhi r2,0x800 8004b44: 38 42 95 d0 ori r2,r2,0x95d0 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 8004b48: b9 60 08 00 mv r1,r11 8004b4c: d8 40 00 00 call r2 _ISR_Disable( level ); 8004b50: 90 00 10 00 rcsr r2,IE 8004b54: 34 03 ff fe mvi r3,-2 8004b58: a0 43 18 00 and r3,r2,r3 8004b5c: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004b60: 44 20 00 0f be r1,r0,8004b9c <_Thread_queue_Dequeue+0x78> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 8004b64: d0 02 00 00 wcsr IE,r2 return the_thread; } 8004b68: 2b 9d 00 04 lw ra,(sp+4) 8004b6c: 2b 8b 00 08 lw r11,(sp+8) 8004b70: 37 9c 00 08 addi sp,sp,8 8004b74: c3 a0 00 00 ret Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004b78: 78 02 08 00 mvhi r2,0x800 8004b7c: 38 42 4b c4 ori r2,r2,0x4bc4 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 8004b80: b9 60 08 00 mv r1,r11 8004b84: d8 40 00 00 call r2 _ISR_Disable( level ); 8004b88: 90 00 10 00 rcsr r2,IE 8004b8c: 34 03 ff fe mvi r3,-2 8004b90: a0 43 18 00 and r3,r2,r3 8004b94: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004b98: 5c 20 ff f3 bne r1,r0,8004b64 <_Thread_queue_Dequeue+0x40> sync_state = the_thread_queue->sync_state; 8004b9c: 29 64 00 30 lw r4,(r11+48) 8004ba0: 34 03 00 01 mvi r3,1 8004ba4: 34 84 ff ff addi r4,r4,-1 8004ba8: 54 83 ff ef bgu r4,r3,8004b64 <_Thread_queue_Dequeue+0x40> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; 8004bac: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8004bb0: 38 21 c8 e0 ori r1,r1,0xc8e0 <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 8004bb4: 34 03 00 03 mvi r3,3 <== NOT EXECUTED the_thread = _Thread_Executing; 8004bb8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 8004bbc: 59 63 00 30 sw (r11+48),r3 <== NOT EXECUTED 8004bc0: e3 ff ff e9 bi 8004b64 <_Thread_queue_Dequeue+0x40> <== NOT EXECUTED 08004dcc <_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 ) { 8004dcc: 37 9c ff ec addi sp,sp,-20 8004dd0: 5b 8b 00 14 sw (sp+20),r11 8004dd4: 5b 8c 00 10 sw (sp+16),r12 8004dd8: 5b 8d 00 0c sw (sp+12),r13 8004ddc: 5b 8e 00 08 sw (sp+8),r14 8004de0: 5b 9d 00 04 sw (sp+4),ra Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 8004de4: 28 4b 00 14 lw r11,(r2+20) Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 8004de8: b8 40 60 00 mv r12,r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004dec: 34 44 00 3c addi r4,r2,60 8004df0: 59 84 00 38 sw (r12+56),r4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8004df4: 34 42 00 38 addi r2,r2,56 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8004df8: 34 04 00 00 mvi r4,0 8004dfc: b8 20 68 00 mv r13,r1 8004e00: 59 84 00 3c sw (r12+60),r4 the_chain->last = _Chain_Head(the_chain); 8004e04: 59 82 00 40 sw (r12+64),r2 _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 ]; 8004e08: b9 60 08 00 mv r1,r11 8004e0c: 34 02 00 06 mvi r2,6 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 8004e10: b8 60 70 00 mv r14,r3 _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 ]; 8004e14: fb ff ed 1f calli 8000290 <__lshrsi3> 8004e18: b4 21 10 00 add r2,r1,r1 8004e1c: b4 41 08 00 add r1,r2,r1 8004e20: 34 02 00 02 mvi r2,2 8004e24: fb ff ec f3 calli 80001f0 <__ashlsi3> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 8004e28: 21 62 00 20 andi r2,r11,0x20 _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 ]; 8004e2c: b5 a1 40 00 add r8,r13,r1 block_state = the_thread_queue->state; 8004e30: 29 a6 00 38 lw r6,(r13+56) if ( _Thread_queue_Is_reverse_search( priority ) ) 8004e34: 5c 40 00 25 bne r2,r0,8004ec8 <_Thread_queue_Enqueue_priority+0xfc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8004e38: 35 01 00 04 addi r1,r8,4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 8004e3c: 34 0a ff fe mvi r10,-2 8004e40: 90 00 10 00 rcsr r2,IE 8004e44: a0 4a 48 00 and r9,r2,r10 8004e48: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->first; 8004e4c: 29 04 00 00 lw r4,(r8+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004e50: 44 81 00 69 be r4,r1,8004ff4 <_Thread_queue_Enqueue_priority+0x228> search_priority = search_thread->current_priority; 8004e54: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004e58: 50 ab 00 10 bgeu r5,r11,8004e98 <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004e5c: d0 02 00 00 wcsr IE,r2 8004e60: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004e64: 28 83 00 10 lw r3,(r4+16) 8004e68: a0 c3 18 00 and r3,r6,r3 8004e6c: 5c 60 00 09 bne r3,r0,8004e90 <_Thread_queue_Enqueue_priority+0xc4> 8004e70: e0 00 00 43 bi 8004f7c <_Thread_queue_Enqueue_priority+0x1b0> <== 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 ) ) { search_priority = search_thread->current_priority; 8004e74: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004e78: 50 ab 00 08 bgeu r5,r11,8004e98 <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004e7c: d0 02 00 00 wcsr IE,r2 8004e80: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004e84: 28 87 00 10 lw r7,(r4+16) 8004e88: a0 c7 38 00 and r7,r6,r7 8004e8c: 44 e0 00 3c be r7,r0,8004f7c <_Thread_queue_Enqueue_priority+0x1b0> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 8004e90: 28 84 00 00 lw r4,(r4+0) 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 ) ) { 8004e94: 5c 81 ff f8 bne r4,r1,8004e74 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004e98: 29 a1 00 30 lw r1,(r13+48) 8004e9c: 34 06 00 01 mvi r6,1 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004ea0: b8 40 18 00 mv r3,r2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004ea4: 44 26 00 38 be r1,r6,8004f84 <_Thread_queue_Enqueue_priority+0x1b8> * 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; 8004ea8: 59 c3 00 00 sw (r14+0),r3 <== NOT EXECUTED return the_thread_queue->sync_state; } 8004eac: 2b 9d 00 04 lw ra,(sp+4) 8004eb0: 2b 8b 00 14 lw r11,(sp+20) 8004eb4: 2b 8c 00 10 lw r12,(sp+16) 8004eb8: 2b 8d 00 0c lw r13,(sp+12) 8004ebc: 2b 8e 00 08 lw r14,(sp+8) 8004ec0: 37 9c 00 14 addi sp,sp,20 8004ec4: c3 a0 00 00 ret 8004ec8: 78 01 08 01 mvhi r1,0x801 8004ecc: 38 21 c0 c0 ori r1,r1,0xc0c0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 8004ed0: 34 03 ff fe mvi r3,-2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 8004ed4: 40 25 00 00 lbu r5,(r1+0) 8004ed8: 34 a5 00 01 addi r5,r5,1 _ISR_Disable( level ); 8004edc: 90 00 38 00 rcsr r7,IE 8004ee0: a0 e3 48 00 and r9,r7,r3 8004ee4: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->last; 8004ee8: 29 04 00 08 lw r4,(r8+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004eec: 5c 88 00 04 bne r4,r8,8004efc <_Thread_queue_Enqueue_priority+0x130> 8004ef0: e0 00 00 0c bi 8004f20 <_Thread_queue_Enqueue_priority+0x154> _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 8004ef4: 28 84 00 04 lw r4,(r4+4) 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 ) ) { 8004ef8: 45 04 00 0a be r8,r4,8004f20 <_Thread_queue_Enqueue_priority+0x154> search_priority = search_thread->current_priority; 8004efc: 28 85 00 14 lw r5,(r4+20) if ( priority >= search_priority ) 8004f00: 51 65 00 08 bgeu r11,r5,8004f20 <_Thread_queue_Enqueue_priority+0x154> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8004f04: d0 07 00 00 wcsr IE,r7 8004f08: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004f0c: 28 82 00 10 lw r2,(r4+16) 8004f10: a0 c2 10 00 and r2,r6,r2 8004f14: 5c 40 ff f8 bne r2,r0,8004ef4 <_Thread_queue_Enqueue_priority+0x128> _ISR_Enable( level ); 8004f18: d0 07 00 00 wcsr IE,r7 <== NOT EXECUTED goto restart_reverse_search; 8004f1c: e3 ff ff ee bi 8004ed4 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8004f20: 29 a1 00 30 lw r1,(r13+48) 8004f24: 34 02 00 01 mvi r2,1 8004f28: b8 e0 18 00 mv r3,r7 8004f2c: 5c 22 ff df bne r1,r2,8004ea8 <_Thread_queue_Enqueue_priority+0xdc> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004f30: 34 01 00 00 mvi r1,0 8004f34: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8004f38: b8 e0 10 00 mv r2,r7 8004f3c: 45 65 00 24 be r11,r5,8004fcc <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8004f40: 28 81 00 00 lw r1,(r4+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8004f44: 59 84 00 04 sw (r12+4),r4 search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004f48: 59 8d 00 44 sw (r12+68),r13 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 8004f4c: 59 81 00 00 sw (r12+0),r1 the_node->previous = search_node; search_node->next = the_node; 8004f50: 58 8c 00 00 sw (r4+0),r12 next_node->previous = the_node; 8004f54: 58 2c 00 04 sw (r1+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004f58: d0 07 00 00 wcsr IE,r7 8004f5c: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8004f60: 2b 9d 00 04 lw ra,(sp+4) 8004f64: 2b 8b 00 14 lw r11,(sp+20) 8004f68: 2b 8c 00 10 lw r12,(sp+16) 8004f6c: 2b 8d 00 0c lw r13,(sp+12) 8004f70: 2b 8e 00 08 lw r14,(sp+8) 8004f74: 37 9c 00 14 addi sp,sp,20 8004f78: c3 a0 00 00 ret if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 8004f7c: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED goto restart_forward_search; 8004f80: e3 ff ff b0 bi 8004e40 <_Thread_queue_Enqueue_priority+0x74> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004f84: 34 01 00 00 mvi r1,0 8004f88: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8004f8c: 45 65 00 10 be r11,r5,8004fcc <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 8004f90: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004f94: 59 84 00 00 sw (r12+0),r4 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004f98: 59 8d 00 44 sw (r12+68),r13 search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 8004f9c: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8004fa0: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8004fa4: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004fa8: d0 02 00 00 wcsr IE,r2 8004fac: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8004fb0: 2b 9d 00 04 lw ra,(sp+4) 8004fb4: 2b 8b 00 14 lw r11,(sp+20) 8004fb8: 2b 8c 00 10 lw r12,(sp+16) 8004fbc: 2b 8d 00 0c lw r13,(sp+12) 8004fc0: 2b 8e 00 08 lw r14,(sp+8) 8004fc4: 37 9c 00 14 addi sp,sp,20 8004fc8: c3 a0 00 00 ret 8004fcc: 34 84 00 3c addi r4,r4,60 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 8004fd0: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004fd4: 59 84 00 00 sw (r12+0),r4 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004fd8: 59 8d 00 44 sw (r12+68),r13 search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 8004fdc: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8004fe0: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8004fe4: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004fe8: d0 02 00 00 wcsr IE,r2 8004fec: 34 01 00 01 mvi r1,1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004ff0: e3 ff ff af bi 8004eac <_Thread_queue_Enqueue_priority+0xe0> 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 ) ) { 8004ff4: 34 05 ff ff mvi r5,-1 8004ff8: e3 ff ff a8 bi 8004e98 <_Thread_queue_Enqueue_priority+0xcc> 08005088 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 8005088: 37 9c ff ec addi sp,sp,-20 800508c: 5b 8b 00 10 sw (sp+16),r11 8005090: 5b 8c 00 0c sw (sp+12),r12 8005094: 5b 8d 00 08 sw (sp+8),r13 8005098: 5b 9d 00 04 sw (sp+4),ra 800509c: b8 20 58 00 mv r11,r1 80050a0: b8 40 60 00 mv r12,r2 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 80050a4: 44 20 00 04 be r1,r0,80050b4 <_Thread_queue_Requeue+0x2c> /* * 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 ) { 80050a8: 28 22 00 34 lw r2,(r1+52) 80050ac: 34 01 00 01 mvi r1,1 80050b0: 44 41 00 07 be r2,r1,80050cc <_Thread_queue_Requeue+0x44> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 80050b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80050b8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80050bc: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80050c0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80050c4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80050c8: c3 a0 00 00 ret <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 80050cc: 90 00 68 00 rcsr r13,IE 80050d0: 34 01 ff fe mvi r1,-2 80050d4: a1 a1 08 00 and r1,r13,r1 80050d8: d0 01 00 00 wcsr IE,r1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 80050dc: 29 82 00 10 lw r2,(r12+16) 80050e0: 78 01 00 03 mvhi r1,0x3 80050e4: 38 21 be e0 ori r1,r1,0xbee0 80050e8: a0 41 08 00 and r1,r2,r1 80050ec: 5c 20 00 08 bne r1,r0,800510c <_Thread_queue_Requeue+0x84> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 80050f0: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED } } 80050f4: 2b 9d 00 04 lw ra,(sp+4) 80050f8: 2b 8b 00 10 lw r11,(sp+16) 80050fc: 2b 8c 00 0c lw r12,(sp+12) 8005100: 2b 8d 00 08 lw r13,(sp+8) 8005104: 37 9c 00 14 addi sp,sp,20 8005108: c3 a0 00 00 ret 800510c: 34 03 00 01 mvi r3,1 8005110: 59 63 00 30 sw (r11+48),r3 ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 8005114: b9 60 08 00 mv r1,r11 8005118: b9 80 10 00 mv r2,r12 800511c: f8 00 11 83 calli 8009728 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 8005120: b9 60 08 00 mv r1,r11 8005124: b9 80 10 00 mv r2,r12 8005128: 37 83 00 14 addi r3,sp,20 800512c: fb ff ff 28 calli 8004dcc <_Thread_queue_Enqueue_priority> } _ISR_Enable( level ); 8005130: d0 0d 00 00 wcsr IE,r13 8005134: e3 ff ff f0 bi 80050f4 <_Thread_queue_Requeue+0x6c> 080143d4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 80143d4: 37 9c ff a0 addi sp,sp,-96 80143d8: 5b 8b 00 44 sw (sp+68),r11 80143dc: 5b 8c 00 40 sw (sp+64),r12 80143e0: 5b 8d 00 3c sw (sp+60),r13 80143e4: 5b 8e 00 38 sw (sp+56),r14 80143e8: 5b 8f 00 34 sw (sp+52),r15 80143ec: 5b 90 00 30 sw (sp+48),r16 80143f0: 5b 91 00 2c sw (sp+44),r17 80143f4: 5b 92 00 28 sw (sp+40),r18 80143f8: 5b 93 00 24 sw (sp+36),r19 80143fc: 5b 94 00 20 sw (sp+32),r20 8014400: 5b 95 00 1c sw (sp+28),r21 8014404: 5b 96 00 18 sw (sp+24),r22 8014408: 5b 97 00 14 sw (sp+20),r23 801440c: 5b 98 00 10 sw (sp+16),r24 8014410: 5b 99 00 0c sw (sp+12),r25 8014414: 5b 9b 00 08 sw (sp+8),fp 8014418: 5b 9d 00 04 sw (sp+4),ra RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 801441c: 34 17 00 00 mvi r23,0 8014420: b8 20 58 00 mv r11,r1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8014424: 37 98 00 58 addi r24,sp,88 8014428: 37 96 00 5c addi r22,sp,92 801442c: 37 8f 00 4c addi r15,sp,76 8014430: 37 95 00 50 addi r21,sp,80 8014434: 78 14 08 03 mvhi r20,0x803 8014438: 78 13 08 03 mvhi r19,0x803 801443c: 78 19 08 03 mvhi r25,0x803 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014440: 34 31 00 30 addi r17,r1,48 /* * 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 ); 8014444: 34 30 00 68 addi r16,r1,104 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 8014448: 34 21 00 08 addi r1,r1,8 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 801444c: 5b 96 00 58 sw (sp+88),r22 the_chain->permanent_null = NULL; 8014450: 5b 97 00 5c sw (sp+92),r23 the_chain->last = _Chain_Head(the_chain); 8014454: 5b 98 00 60 sw (sp+96),r24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8014458: 5b 95 00 4c sw (sp+76),r21 the_chain->permanent_null = NULL; 801445c: 5b 97 00 50 sw (sp+80),r23 the_chain->last = _Chain_Head(the_chain); 8014460: 5b 8f 00 54 sw (sp+84),r15 8014464: 3a 94 ed 7c ori r20,r20,0xed7c 8014468: 3a 73 ec bc ori r19,r19,0xecbc 801446c: 3b 39 ec 2c ori r25,r25,0xec2c 8014470: 5b 81 00 48 sw (sp+72),r1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 8014474: 35 7b 00 40 addi fp,r11,64 /* * 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 ); 8014478: 34 0c 00 01 mvi r12,1 Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 801447c: 34 0d 00 03 mvi r13,3 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 8014480: 34 12 ff fe mvi r18,-2 { /* * 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; 8014484: 59 78 00 78 sw (r11+120),r24 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 8014488: 2a 82 00 00 lw r2,(r20+0) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 801448c: 29 63 00 3c lw r3,(r11+60) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014490: ba 20 08 00 mv r1,r17 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 8014494: 59 62 00 3c sw (r11+60),r2 _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014498: c8 43 10 00 sub r2,r2,r3 801449c: b9 e0 18 00 mv r3,r15 80144a0: f8 00 15 5c calli 8019a10 <_Watchdog_Adjust_to_chain> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 80144a4: 29 62 00 74 lw r2,(r11+116) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 80144a8: 2a 6e 00 00 lw r14,(r19+0) /* * 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 ) { 80144ac: 50 4e 00 19 bgeu r2,r14,8014510 <_Timer_server_Body+0x13c> /* * 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 ); 80144b0: c9 c2 10 00 sub r2,r14,r2 80144b4: ba 00 08 00 mv r1,r16 80144b8: b9 e0 18 00 mv r3,r15 80144bc: f8 00 15 55 calli 8019a10 <_Watchdog_Adjust_to_chain> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 80144c0: 59 6e 00 74 sw (r11+116),r14 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 80144c4: 29 61 00 78 lw r1,(r11+120) 80144c8: f8 00 03 1e calli 8015140 <_Chain_Get> if ( timer == NULL ) { 80144cc: 44 20 00 0a be r1,r0,80144f4 <_Timer_server_Body+0x120> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 80144d0: 28 22 00 38 lw r2,(r1+56) <== NOT EXECUTED 80144d4: 44 4c 00 15 be r2,r12,8014528 <_Timer_server_Body+0x154> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 80144d8: 5c 4d ff fb bne r2,r13,80144c4 <_Timer_server_Body+0xf0> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 80144dc: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 80144e0: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80144e4: f8 00 15 75 calli 8019ab8 <_Watchdog_Insert> <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 80144e8: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80144ec: f8 00 03 15 calli 8015140 <_Chain_Get> <== NOT EXECUTED if ( timer == NULL ) { 80144f0: 5c 20 ff f8 bne r1,r0,80144d0 <_Timer_server_Body+0xfc> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 80144f4: 90 00 10 00 rcsr r2,IE 80144f8: a0 52 18 00 and r3,r2,r18 80144fc: d0 03 00 00 wcsr IE,r3 if ( _Chain_Is_empty( insert_chain ) ) { 8014500: 2b 83 00 58 lw r3,(sp+88) 8014504: 46 c3 00 0d be r22,r3,8014538 <_Timer_server_Body+0x164> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 8014508: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED 801450c: e3 ff ff df bi 8014488 <_Timer_server_Body+0xb4> <== NOT EXECUTED * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 8014510: 51 c2 ff ec bgeu r14,r2,80144c0 <_Timer_server_Body+0xec> /* * 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 ); 8014514: c8 4e 18 00 sub r3,r2,r14 8014518: ba 00 08 00 mv r1,r16 801451c: 34 02 00 01 mvi r2,1 8014520: f8 00 14 fe calli 8019918 <_Watchdog_Adjust> 8014524: e3 ff ff e7 bi 80144c0 <_Timer_server_Body+0xec> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8014528: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 801452c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8014530: f8 00 15 62 calli 8019ab8 <_Watchdog_Insert> <== NOT EXECUTED 8014534: e3 ff ff e4 bi 80144c4 <_Timer_server_Body+0xf0> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 8014538: 59 77 00 78 sw (r11+120),r23 _ISR_Enable( level ); 801453c: d0 02 00 00 wcsr IE,r2 _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 ) ) { 8014540: 2b 82 00 4c lw r2,(sp+76) 8014544: 5e a2 00 0b bne r21,r2,8014570 <_Timer_server_Body+0x19c> 8014548: e0 00 00 11 bi 801458c <_Timer_server_Body+0x1b8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 801454c: 28 83 00 00 lw r3,(r4+0) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 8014550: 58 97 00 08 sw (r4+8),r23 the_chain->first = new_first; 8014554: 5b 83 00 4c sw (sp+76),r3 new_first->previous = _Chain_Head(the_chain); 8014558: 58 6f 00 04 sw (r3+4),r15 _ISR_Enable( level ); 801455c: d0 02 00 00 wcsr IE,r2 /* * 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 ); 8014560: 28 82 00 24 lw r2,(r4+36) 8014564: 28 83 00 1c lw r3,(r4+28) 8014568: 28 81 00 20 lw r1,(r4+32) 801456c: d8 60 00 00 call r3 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 8014570: 90 00 10 00 rcsr r2,IE 8014574: a0 52 18 00 and r3,r2,r18 8014578: d0 03 00 00 wcsr IE,r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 801457c: 2b 84 00 4c lw r4,(sp+76) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 8014580: 5e a4 ff f3 bne r21,r4,801454c <_Timer_server_Body+0x178> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 8014584: d0 02 00 00 wcsr IE,r2 8014588: e3 ff ff bf bi 8014484 <_Timer_server_Body+0xb0> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 801458c: 34 01 00 00 mvi r1,0 8014590: 31 61 00 7c sb (r11+124),r1 8014594: 2b 21 00 00 lw r1,(r25+0) 8014598: 34 21 00 01 addi r1,r1,1 801459c: 5b 21 00 00 sw (r25+0),r1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 80145a0: 29 61 00 00 lw r1,(r11+0) 80145a4: 34 02 00 08 mvi r2,8 80145a8: f8 00 11 c1 calli 8018cac <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 80145ac: b9 60 08 00 mv r1,r11 80145b0: fb ff ff 47 calli 80142cc <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 80145b4: b9 60 08 00 mv r1,r11 80145b8: fb ff ff 66 calli 8014350 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 80145bc: f8 00 0e 5a calli 8017f24 <_Thread_Enable_dispatch> ts->active = true; 80145c0: 34 01 00 01 mvi r1,1 80145c4: 31 61 00 7c sb (r11+124),r1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 80145c8: 2b 81 00 48 lw r1,(sp+72) 80145cc: f8 00 15 a2 calli 8019c54 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 80145d0: bb 60 08 00 mv r1,fp 80145d4: f8 00 15 a0 calli 8019c54 <_Watchdog_Remove> 80145d8: e3 ff ff ab bi 8014484 <_Timer_server_Body+0xb0> 080145dc <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80145dc: 37 9c ff f8 addi sp,sp,-8 80145e0: 5b 8b 00 08 sw (sp+8),r11 80145e4: 5b 9d 00 04 sw (sp+4),ra if ( ts->insert_chain == NULL ) { 80145e8: 28 23 00 78 lw r3,(r1+120) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80145ec: b8 20 58 00 mv r11,r1 80145f0: b8 40 08 00 mv r1,r2 if ( ts->insert_chain == NULL ) { 80145f4: 44 60 00 07 be r3,r0,8014610 <_Timer_server_Schedule_operation_method+0x34> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 80145f8: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80145fc: f8 00 02 c5 calli 8015110 <_Chain_Append> <== NOT EXECUTED } } 8014600: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8014604: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8014608: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 801460c: c3 a0 00 00 ret <== NOT EXECUTED 8014610: 78 02 08 03 mvhi r2,0x803 8014614: 38 42 ec 2c ori r2,r2,0xec2c 8014618: 28 43 00 00 lw r3,(r2+0) 801461c: 34 63 00 01 addi r3,r3,1 8014620: 58 43 00 00 sw (r2+0),r3 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8014624: 28 22 00 38 lw r2,(r1+56) 8014628: 34 03 00 01 mvi r3,1 801462c: 44 43 00 28 be r2,r3,80146cc <_Timer_server_Schedule_operation_method+0xf0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 8014630: 34 03 00 03 mvi r3,3 8014634: 44 43 00 06 be r2,r3,801464c <_Timer_server_Schedule_operation_method+0x70> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014638: f8 00 0e 3b calli 8017f24 <_Thread_Enable_dispatch> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 801463c: 2b 9d 00 04 lw ra,(sp+4) 8014640: 2b 8b 00 08 lw r11,(sp+8) 8014644: 37 9c 00 08 addi sp,sp,8 8014648: c3 a0 00 00 ret } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 801464c: 90 00 38 00 rcsr r7,IE 8014650: 34 02 ff fe mvi r2,-2 8014654: a0 e2 10 00 and r2,r7,r2 8014658: d0 02 00 00 wcsr IE,r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 801465c: 29 63 00 68 lw r3,(r11+104) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014660: 78 02 08 03 mvhi r2,0x803 last_snapshot = ts->TOD_watchdogs.last_snapshot; 8014664: 29 64 00 74 lw r4,(r11+116) /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014668: 38 42 ec bc ori r2,r2,0xecbc */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 801466c: 35 65 00 6c addi r5,r11,108 8014670: 28 42 00 00 lw r2,(r2+0) 8014674: 44 65 00 0b be r3,r5,80146a0 <_Timer_server_Schedule_operation_method+0xc4> last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 8014678: 28 66 00 10 lw r6,(r3+16) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 801467c: b4 c4 28 00 add r5,r6,r4 delta_interval += delta; 8014680: c8 a2 28 00 sub r5,r5,r2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 8014684: 50 82 00 06 bgeu r4,r2,801469c <_Timer_server_Schedule_operation_method+0xc0> /* * We advanced in time. */ delta = snapshot - last_snapshot; 8014688: c8 44 20 00 sub r4,r2,r4 if (delta_interval > delta) { 801468c: f4 c4 40 00 cmpgu r8,r6,r4 delta_interval -= delta; 8014690: c8 c4 28 00 sub r5,r6,r4 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 8014694: c8 08 20 00 sub r4,r0,r8 8014698: a0 a4 28 00 and r5,r5,r4 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 801469c: 58 65 00 10 sw (r3+16),r5 } ts->TOD_watchdogs.last_snapshot = snapshot; 80146a0: 59 62 00 74 sw (r11+116),r2 _ISR_Enable( level ); 80146a4: d0 07 00 00 wcsr IE,r7 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 80146a8: 34 22 00 10 addi r2,r1,16 80146ac: 35 61 00 68 addi r1,r11,104 80146b0: f8 00 15 02 calli 8019ab8 <_Watchdog_Insert> if ( !ts->active ) { 80146b4: 41 61 00 7c lbu r1,(r11+124) 80146b8: 5c 20 ff e0 bne r1,r0,8014638 <_Timer_server_Schedule_operation_method+0x5c> _Timer_server_Reset_tod_system_watchdog( ts ); 80146bc: b9 60 08 00 mv r1,r11 80146c0: fb ff ff 24 calli 8014350 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); 80146c4: f8 00 0e 18 calli 8017f24 <_Thread_Enable_dispatch> 80146c8: e3 ff ff dd bi 801463c <_Timer_server_Schedule_operation_method+0x60> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 80146cc: 90 00 20 00 rcsr r4,IE 80146d0: 34 02 ff fe mvi r2,-2 80146d4: a0 82 10 00 and r2,r4,r2 80146d8: d0 02 00 00 wcsr IE,r2 snapshot = _Watchdog_Ticks_since_boot; 80146dc: 78 03 08 03 mvhi r3,0x803 80146e0: 38 63 ed 7c ori r3,r3,0xed7c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80146e4: 29 62 00 30 lw r2,(r11+48) 80146e8: 28 65 00 00 lw r5,(r3+0) last_snapshot = ts->Interval_watchdogs.last_snapshot; 80146ec: 29 63 00 3c lw r3,(r11+60) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80146f0: 35 66 00 34 addi r6,r11,52 80146f4: 44 46 00 08 be r2,r6,8014714 <_Timer_server_Schedule_operation_method+0x138> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 80146f8: 28 47 00 10 lw r7,(r2+16) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 80146fc: c8 a3 18 00 sub r3,r5,r3 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8014700: f4 e3 30 00 cmpgu r6,r7,r3 delta_interval -= delta; 8014704: c8 e3 18 00 sub r3,r7,r3 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8014708: c8 06 30 00 sub r6,r0,r6 801470c: a0 66 18 00 and r3,r3,r6 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 8014710: 58 43 00 10 sw (r2+16),r3 } ts->Interval_watchdogs.last_snapshot = snapshot; 8014714: 59 65 00 3c sw (r11+60),r5 _ISR_Enable( level ); 8014718: d0 04 00 00 wcsr IE,r4 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 801471c: 34 22 00 10 addi r2,r1,16 8014720: 35 61 00 30 addi r1,r11,48 8014724: f8 00 14 e5 calli 8019ab8 <_Watchdog_Insert> if ( !ts->active ) { 8014728: 41 61 00 7c lbu r1,(r11+124) 801472c: 5c 20 ff c3 bne r1,r0,8014638 <_Timer_server_Schedule_operation_method+0x5c> _Timer_server_Reset_interval_system_watchdog( ts ); 8014730: b9 60 08 00 mv r1,r11 8014734: fb ff fe e6 calli 80142cc <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014738: f8 00 0d fb calli 8017f24 <_Thread_Enable_dispatch> 801473c: e3 ff ff c0 bi 801463c <_Timer_server_Schedule_operation_method+0x60> 080415a8 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 80415a8: 28 24 00 00 lw r4,(r1+0) 80415ac: 28 43 00 00 lw r3,(r2+0) 80415b0: 4c 64 00 03 bge r3,r4,80415bc <_Timespec_Greater_than+0x14> 80415b4: 34 01 00 01 mvi r1,1 80415b8: c3 a0 00 00 ret return true; if ( lhs->tv_sec < rhs->tv_sec ) 80415bc: 4c 83 00 03 bge r4,r3,80415c8 <_Timespec_Greater_than+0x20> 80415c0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80415c4: c3 a0 00 00 ret <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 80415c8: 28 23 00 04 lw r3,(r1+4) 80415cc: 28 41 00 04 lw r1,(r2+4) 80415d0: e8 61 08 00 cmpg r1,r3,r1 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 80415d4: c3 a0 00 00 ret 08007ed4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 8007ed4: 37 9c ff e4 addi sp,sp,-28 8007ed8: 5b 8b 00 1c sw (sp+28),r11 8007edc: 5b 8c 00 18 sw (sp+24),r12 8007ee0: 5b 8d 00 14 sw (sp+20),r13 8007ee4: 5b 8e 00 10 sw (sp+16),r14 8007ee8: 5b 8f 00 0c sw (sp+12),r15 8007eec: 5b 90 00 08 sw (sp+8),r16 8007ef0: 5b 9d 00 04 sw (sp+4),ra 8007ef4: b8 20 60 00 mv r12,r1 8007ef8: b8 60 58 00 mv r11,r3 ISR_Level level; _ISR_Disable( level ); 8007efc: 90 00 20 00 rcsr r4,IE 8007f00: 34 01 ff fe mvi r1,-2 8007f04: a0 81 08 00 and r1,r4,r1 8007f08: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8007f0c: 29 81 00 00 lw r1,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8007f10: 35 8e 00 04 addi r14,r12,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 8007f14: 44 2e 00 04 be r1,r14,8007f24 <_Watchdog_Adjust+0x50> switch ( direction ) { 8007f18: 44 40 00 11 be r2,r0,8007f5c <_Watchdog_Adjust+0x88> 8007f1c: 34 03 00 01 mvi r3,1 8007f20: 44 43 00 0b be r2,r3,8007f4c <_Watchdog_Adjust+0x78> } break; } } _ISR_Enable( level ); 8007f24: d0 04 00 00 wcsr IE,r4 } 8007f28: 2b 9d 00 04 lw ra,(sp+4) 8007f2c: 2b 8b 00 1c lw r11,(sp+28) 8007f30: 2b 8c 00 18 lw r12,(sp+24) 8007f34: 2b 8d 00 14 lw r13,(sp+20) 8007f38: 2b 8e 00 10 lw r14,(sp+16) 8007f3c: 2b 8f 00 0c lw r15,(sp+12) 8007f40: 2b 90 00 08 lw r16,(sp+8) 8007f44: 37 9c 00 1c addi sp,sp,28 8007f48: c3 a0 00 00 ret * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 8007f4c: 28 22 00 10 lw r2,(r1+16) 8007f50: b4 4b 58 00 add r11,r2,r11 8007f54: 58 2b 00 10 sw (r1+16),r11 break; 8007f58: e3 ff ff f3 bi 8007f24 <_Watchdog_Adjust+0x50> case WATCHDOG_FORWARD: while ( units ) { 8007f5c: 44 62 ff f2 be r3,r2,8007f24 <_Watchdog_Adjust+0x50> if ( units < _Watchdog_First( header )->delta_interval ) { 8007f60: 28 2d 00 10 lw r13,(r1+16) _Watchdog_First( header )->delta_interval -= units; break; 8007f64: b8 80 18 00 mv r3,r4 } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 8007f68: 34 10 00 01 mvi r16,1 _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 8007f6c: 34 0f ff fe mvi r15,-2 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 8007f70: 51 6d 00 02 bgeu r11,r13,8007f78 <_Watchdog_Adjust+0xa4> 8007f74: e0 00 00 11 bi 8007fb8 <_Watchdog_Adjust+0xe4> <== NOT EXECUTED _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 8007f78: 58 30 00 10 sw (r1+16),r16 _ISR_Enable( level ); 8007f7c: d0 03 00 00 wcsr IE,r3 _Watchdog_Tickle( header ); 8007f80: b9 80 08 00 mv r1,r12 8007f84: f8 00 00 b0 calli 8008244 <_Watchdog_Tickle> _ISR_Disable( level ); 8007f88: 90 00 10 00 rcsr r2,IE 8007f8c: a0 4f 08 00 and r1,r2,r15 8007f90: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8007f94: 29 84 00 00 lw r4,(r12+0) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 8007f98: c9 6d 58 00 sub r11,r11,r13 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 8007f9c: b8 40 18 00 mv r3,r2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8007fa0: b8 80 08 00 mv r1,r4 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 8007fa4: 45 c4 00 08 be r14,r4,8007fc4 <_Watchdog_Adjust+0xf0> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 8007fa8: 45 60 00 07 be r11,r0,8007fc4 <_Watchdog_Adjust+0xf0> if ( units < _Watchdog_First( header )->delta_interval ) { 8007fac: 28 2d 00 10 lw r13,(r1+16) 8007fb0: 51 6d ff f2 bgeu r11,r13,8007f78 <_Watchdog_Adjust+0xa4> 8007fb4: b8 60 20 00 mv r4,r3 _Watchdog_First( header )->delta_interval -= units; 8007fb8: c9 ab 58 00 sub r11,r13,r11 8007fbc: 58 2b 00 10 sw (r1+16),r11 break; 8007fc0: e3 ff ff d9 bi 8007f24 <_Watchdog_Adjust+0x50> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 8007fc4: b8 40 20 00 mv r4,r2 8007fc8: e3 ff ff d7 bi 8007f24 <_Watchdog_Adjust+0x50> 08005db4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 8005db4: 37 9c ff e4 addi sp,sp,-28 8005db8: 5b 8b 00 1c sw (sp+28),r11 8005dbc: 5b 8c 00 18 sw (sp+24),r12 8005dc0: 5b 8d 00 14 sw (sp+20),r13 8005dc4: 5b 8e 00 10 sw (sp+16),r14 8005dc8: 5b 8f 00 0c sw (sp+12),r15 8005dcc: 5b 90 00 08 sw (sp+8),r16 8005dd0: 5b 9d 00 04 sw (sp+4),ra 8005dd4: b8 20 60 00 mv r12,r1 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 8005dd8: 90 00 68 00 rcsr r13,IE 8005ddc: 34 01 ff fe mvi r1,-2 8005de0: a1 a1 08 00 and r1,r13,r1 8005de4: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8005de8: 29 8b 00 00 lw r11,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8005dec: 35 8e 00 04 addi r14,r12,4 if ( _Chain_Is_empty( header ) ) 8005df0: 45 6e 00 2b be r11,r14,8005e9c <_Watchdog_Tickle+0xe8> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 8005df4: 29 61 00 10 lw r1,(r11+16) 8005df8: 5c 20 00 26 bne r1,r0,8005e90 <_Watchdog_Tickle+0xdc> do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) { 8005dfc: 34 10 00 02 mvi r16,2 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005e00: 34 0f ff fe mvi r15,-2 8005e04: e0 00 00 0a bi 8005e2c <_Watchdog_Tickle+0x78> 8005e08: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8005e0c: a0 4f 08 00 and r1,r2,r15 <== NOT EXECUTED 8005e10: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8005e14: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8005e18: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8005e1c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005e20: 45 c1 00 12 be r14,r1,8005e68 <_Watchdog_Tickle+0xb4> <== NOT EXECUTED 8005e24: 28 21 00 10 lw r1,(r1+16) 8005e28: 5c 20 00 10 bne r1,r0,8005e68 <_Watchdog_Tickle+0xb4> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 8005e2c: b9 60 08 00 mv r1,r11 8005e30: fb ff ff aa calli 8005cd8 <_Watchdog_Remove> _ISR_Enable( level ); 8005e34: d0 0d 00 00 wcsr IE,r13 switch( watchdog_state ) { 8005e38: 5c 30 ff f4 bne r1,r16,8005e08 <_Watchdog_Tickle+0x54> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 8005e3c: 29 62 00 24 lw r2,(r11+36) 8005e40: 29 63 00 1c lw r3,(r11+28) 8005e44: 29 61 00 20 lw r1,(r11+32) 8005e48: d8 60 00 00 call r3 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005e4c: 90 00 10 00 rcsr r2,IE 8005e50: a0 4f 08 00 and r1,r2,r15 8005e54: d0 01 00 00 wcsr IE,r1 8005e58: 29 81 00 00 lw r1,(r12+0) 8005e5c: b8 40 68 00 mv r13,r2 8005e60: b8 20 58 00 mv r11,r1 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005e64: 5d c1 ff f0 bne r14,r1,8005e24 <_Watchdog_Tickle+0x70> leave: _ISR_Enable(level); 8005e68: d0 02 00 00 wcsr IE,r2 } 8005e6c: 2b 9d 00 04 lw ra,(sp+4) 8005e70: 2b 8b 00 1c lw r11,(sp+28) 8005e74: 2b 8c 00 18 lw r12,(sp+24) 8005e78: 2b 8d 00 14 lw r13,(sp+20) 8005e7c: 2b 8e 00 10 lw r14,(sp+16) 8005e80: 2b 8f 00 0c lw r15,(sp+12) 8005e84: 2b 90 00 08 lw r16,(sp+8) 8005e88: 37 9c 00 1c addi sp,sp,28 8005e8c: c3 a0 00 00 ret * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; 8005e90: 34 21 ff ff addi r1,r1,-1 8005e94: 59 61 00 10 sw (r11+16),r1 if ( the_watchdog->delta_interval != 0 ) 8005e98: 44 20 ff d9 be r1,r0,8005dfc <_Watchdog_Tickle+0x48> _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005e9c: b9 a0 10 00 mv r2,r13 8005ea0: e3 ff ff f2 bi 8005e68 <_Watchdog_Tickle+0xb4> 08005ea4 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 8005ea4: 37 9c ff fc addi sp,sp,-4 8005ea8: 5b 9d 00 04 sw (sp+4),ra * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8005eac: 34 03 00 00 mvi r3,0 8005eb0: b8 20 10 00 mv r2,r1 8005eb4: 78 01 08 01 mvhi r1,0x801 8005eb8: 38 21 c8 48 ori r1,r1,0xc848 8005ebc: b8 60 20 00 mv r4,r3 8005ec0: f8 00 0b a8 calli 8008d60 <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 8005ec4: 44 20 00 04 be r1,r0,8005ed4 <_Workspace_Allocate_or_fatal_error+0x30> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 8005ec8: 2b 9d 00 04 lw ra,(sp+4) 8005ecc: 37 9c 00 04 addi sp,sp,4 8005ed0: c3 a0 00 00 ret memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( 8005ed4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005ed8: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 8005edc: fb ff f5 f7 calli 80036b8 <_Internal_error_Occurred> <== NOT EXECUTED 0800fe3c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 800fe3c: b8 20 18 00 mv r3,r1 if ( !routine ) 800fe40: 34 01 00 09 mvi r1,9 800fe44: 44 60 00 05 be r3,r0,800fe58 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 800fe48: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED 800fe4c: 38 42 ed cc ori r2,r2,0xedcc <== NOT EXECUTED 800fe50: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED 800fe54: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 800fe58: c3 a0 00 00 ret 08004e04 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 8004e04: 37 9c ff ec addi sp,sp,-20 8004e08: 5b 8b 00 10 sw (sp+16),r11 8004e0c: 5b 8c 00 0c sw (sp+12),r12 8004e10: 5b 8d 00 08 sw (sp+8),r13 8004e14: 5b 9d 00 04 sw (sp+4),ra rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e18: 78 04 08 02 mvhi r4,0x802 8004e1c: 38 84 49 4c ori r4,r4,0x494c 8004e20: 28 85 00 00 lw r5,(r4+0) rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 8004e24: 78 04 08 02 mvhi r4,0x802 8004e28: 38 84 4b 68 ori r4,r4,0x4b68 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 8004e2c: b8 20 58 00 mv r11,r1 8004e30: b8 40 60 00 mv r12,r2 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e34: 34 01 00 12 mvi r1,18 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 8004e38: 28 82 00 00 lw r2,(r4+0) if ( rtems_interrupt_is_in_progress() ) 8004e3c: 5c a0 00 08 bne r5,r0,8004e5c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 8004e40: 44 65 00 52 be r3,r5,8004f88 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 8004e44: 58 62 00 00 sw (r3+0),r2 if ( driver_table == NULL ) 8004e48: 45 80 00 50 be r12,r0,8004f88 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004e4c: 29 81 00 00 lw r1,(r12+0) 8004e50: 44 20 00 4c be r1,r0,8004f80 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 8004e54: 54 4b 00 08 bgu r2,r11,8004e74 8004e58: 34 01 00 0a mvi r1,10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004e5c: 2b 9d 00 04 lw ra,(sp+4) 8004e60: 2b 8b 00 10 lw r11,(sp+16) 8004e64: 2b 8c 00 0c lw r12,(sp+12) 8004e68: 2b 8d 00 08 lw r13,(sp+8) 8004e6c: 37 9c 00 14 addi sp,sp,20 8004e70: c3 a0 00 00 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8004e74: 78 01 08 02 mvhi r1,0x802 8004e78: 38 21 48 b4 ori r1,r1,0x48b4 8004e7c: 28 22 00 00 lw r2,(r1+0) 8004e80: 34 42 00 01 addi r2,r2,1 8004e84: 58 22 00 00 sw (r1+0),r2 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 8004e88: 5d 60 00 2a bne r11,r0,8004f30 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 8004e8c: 28 84 00 00 lw r4,(r4+0) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004e90: 44 8b 00 48 be r4,r11,8004fb0 8004e94: 78 01 08 02 mvhi r1,0x802 8004e98: 38 21 4b 6c ori r1,r1,0x4b6c 8004e9c: 28 2d 00 00 lw r13,(r1+0) 8004ea0: b9 a0 08 00 mv r1,r13 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004ea4: 28 22 00 00 lw r2,(r1+0) 8004ea8: 44 40 00 3f be r2,r0,8004fa4 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004eac: 35 6b 00 01 addi r11,r11,1 8004eb0: 34 21 00 18 addi r1,r1,24 8004eb4: 54 8b ff fc bgu r4,r11,8004ea4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004eb8: 58 6b 00 00 sw (r3+0),r11 if ( m != n ) 8004ebc: 44 8b 00 3e be r4,r11,8004fb4 8004ec0: b5 6b 08 00 add r1,r11,r11 8004ec4: b4 2b 08 00 add r1,r1,r11 8004ec8: 34 02 00 03 mvi r2,3 8004ecc: fb ff ef 46 calli 8000be4 <__ashlsi3> 8004ed0: b5 a1 08 00 add r1,r13,r1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 8004ed4: 29 82 00 00 lw r2,(r12+0) 8004ed8: 58 22 00 00 sw (r1+0),r2 8004edc: 29 82 00 04 lw r2,(r12+4) 8004ee0: 58 22 00 04 sw (r1+4),r2 8004ee4: 29 82 00 08 lw r2,(r12+8) 8004ee8: 58 22 00 08 sw (r1+8),r2 8004eec: 29 82 00 0c lw r2,(r12+12) 8004ef0: 58 22 00 0c sw (r1+12),r2 8004ef4: 29 82 00 10 lw r2,(r12+16) 8004ef8: 58 22 00 10 sw (r1+16),r2 8004efc: 29 8c 00 14 lw r12,(r12+20) 8004f00: 58 2c 00 14 sw (r1+20),r12 _Thread_Enable_dispatch(); 8004f04: f8 00 07 ca calli 8006e2c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 8004f08: 34 02 00 00 mvi r2,0 8004f0c: b9 60 08 00 mv r1,r11 8004f10: b8 40 18 00 mv r3,r2 8004f14: f8 00 28 bc calli 800f204 } 8004f18: 2b 9d 00 04 lw ra,(sp+4) 8004f1c: 2b 8b 00 10 lw r11,(sp+16) 8004f20: 2b 8c 00 0c lw r12,(sp+12) 8004f24: 2b 8d 00 08 lw r13,(sp+8) 8004f28: 37 9c 00 14 addi sp,sp,20 8004f2c: c3 a0 00 00 ret _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 8004f30: b5 6b 08 00 add r1,r11,r11 8004f34: 34 02 00 03 mvi r2,3 8004f38: 78 0d 08 02 mvhi r13,0x802 8004f3c: b4 2b 08 00 add r1,r1,r11 8004f40: 5b 83 00 14 sw (sp+20),r3 8004f44: 39 ad 4b 6c ori r13,r13,0x4b6c 8004f48: fb ff ef 27 calli 8000be4 <__ashlsi3> 8004f4c: 29 a2 00 00 lw r2,(r13+0) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f50: 2b 83 00 14 lw r3,(sp+20) _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 8004f54: b4 41 08 00 add r1,r2,r1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f58: 28 22 00 00 lw r2,(r1+0) 8004f5c: 44 40 00 19 be r2,r0,8004fc0 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 8004f60: f8 00 07 b3 calli 8006e2c <_Thread_Enable_dispatch> 8004f64: 34 01 00 0c mvi r1,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004f68: 2b 9d 00 04 lw ra,(sp+4) 8004f6c: 2b 8b 00 10 lw r11,(sp+16) 8004f70: 2b 8c 00 0c lw r12,(sp+12) 8004f74: 2b 8d 00 08 lw r13,(sp+8) 8004f78: 37 9c 00 14 addi sp,sp,20 8004f7c: c3 a0 00 00 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f80: 29 85 00 04 lw r5,(r12+4) 8004f84: 5c a1 ff b4 bne r5,r1,8004e54 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 8004f88: 34 01 00 09 mvi r1,9 } 8004f8c: 2b 9d 00 04 lw ra,(sp+4) 8004f90: 2b 8b 00 10 lw r11,(sp+16) 8004f94: 2b 8c 00 0c lw r12,(sp+12) 8004f98: 2b 8d 00 08 lw r13,(sp+8) 8004f9c: 37 9c 00 14 addi sp,sp,20 8004fa0: c3 a0 00 00 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004fa4: 28 25 00 04 lw r5,(r1+4) 8004fa8: 5c a2 ff c1 bne r5,r2,8004eac 8004fac: e3 ff ff c3 bi 8004eb8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004fb0: 58 6b 00 00 sw (r3+0),r11 <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 8004fb4: f8 00 07 9e calli 8006e2c <_Thread_Enable_dispatch> 8004fb8: 34 01 00 05 mvi r1,5 return sc; 8004fbc: e3 ff ff a8 bi 8004e5c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004fc0: 28 24 00 04 lw r4,(r1+4) 8004fc4: 5c 82 ff e7 bne r4,r2,8004f60 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 8004fc8: 58 6b 00 00 sw (r3+0),r11 8004fcc: e3 ff ff c2 bi 8004ed4 08040a1c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 8040a1c: 37 9c ff e0 addi sp,sp,-32 8040a20: 5b 8b 00 18 sw (sp+24),r11 8040a24: 5b 8c 00 14 sw (sp+20),r12 8040a28: 5b 8d 00 10 sw (sp+16),r13 8040a2c: 5b 8e 00 0c sw (sp+12),r14 8040a30: 5b 8f 00 08 sw (sp+8),r15 8040a34: 5b 9d 00 04 sw (sp+4),ra 8040a38: b8 20 70 00 mv r14,r1 8040a3c: 78 01 08 07 mvhi r1,0x807 8040a40: b8 40 68 00 mv r13,r2 8040a44: 38 21 54 9c ori r1,r1,0x549c 8040a48: b9 c0 10 00 mv r2,r14 8040a4c: 37 83 00 20 addi r3,sp,32 8040a50: fb ff 2f 3a calli 800c738 <_Objects_Get> 8040a54: b8 20 58 00 mv r11,r1 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 8040a58: 2b 81 00 20 lw r1,(sp+32) 8040a5c: 44 20 00 0a be r1,r0,8040a84 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 8040a60: 34 01 00 04 mvi r1,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8040a64: 2b 9d 00 04 lw ra,(sp+4) 8040a68: 2b 8b 00 18 lw r11,(sp+24) 8040a6c: 2b 8c 00 14 lw r12,(sp+20) 8040a70: 2b 8d 00 10 lw r13,(sp+16) 8040a74: 2b 8e 00 0c lw r14,(sp+12) 8040a78: 2b 8f 00 08 lw r15,(sp+8) 8040a7c: 37 9c 00 20 addi sp,sp,32 8040a80: c3 a0 00 00 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 8040a84: 78 0c 08 07 mvhi r12,0x807 8040a88: 39 8c 50 e0 ori r12,r12,0x50e0 8040a8c: 29 62 00 40 lw r2,(r11+64) 8040a90: 29 81 00 00 lw r1,(r12+0) 8040a94: 44 41 00 0b be r2,r1,8040ac0 _Thread_Enable_dispatch(); 8040a98: fb ff 31 fe calli 800d290 <_Thread_Enable_dispatch> 8040a9c: 34 01 00 17 mvi r1,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8040aa0: 2b 9d 00 04 lw ra,(sp+4) 8040aa4: 2b 8b 00 18 lw r11,(sp+24) 8040aa8: 2b 8c 00 14 lw r12,(sp+20) 8040aac: 2b 8d 00 10 lw r13,(sp+16) 8040ab0: 2b 8e 00 0c lw r14,(sp+12) 8040ab4: 2b 8f 00 08 lw r15,(sp+8) 8040ab8: 37 9c 00 20 addi sp,sp,32 8040abc: c3 a0 00 00 ret if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 8040ac0: 45 a0 00 32 be r13,r0,8040b88 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 8040ac4: 90 00 78 00 rcsr r15,IE 8040ac8: 34 01 ff fe mvi r1,-2 8040acc: a1 e1 08 00 and r1,r15,r1 8040ad0: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 8040ad4: 29 61 00 38 lw r1,(r11+56) 8040ad8: 34 02 00 02 mvi r2,2 8040adc: 44 22 00 30 be r1,r2,8040b9c 8040ae0: 34 02 00 04 mvi r2,4 8040ae4: 44 22 00 19 be r1,r2,8040b48 8040ae8: 5c 20 ff de bne r1,r0,8040a60 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 8040aec: d0 0f 00 00 wcsr IE,r15 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 8040af0: b9 60 08 00 mv r1,r11 8040af4: fb ff ff 1b calli 8040760 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8040af8: 78 02 08 04 mvhi r2,0x804 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8040afc: 34 0c 00 00 mvi r12,0 the_watchdog->routine = routine; 8040b00: 38 42 0c 28 ori r2,r2,0xc28 the_period->state = RATE_MONOTONIC_ACTIVE; 8040b04: 34 03 00 02 mvi r3,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b08: 78 01 08 07 mvhi r1,0x807 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8040b0c: 59 62 00 2c sw (r11+44),r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b10: 38 21 51 00 ori r1,r1,0x5100 8040b14: 59 63 00 38 sw (r11+56),r3 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 8040b18: 59 6e 00 30 sw (r11+48),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040b1c: 59 6d 00 1c sw (r11+28),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b20: 35 62 00 10 addi r2,r11,16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8040b24: 59 6c 00 18 sw (r11+24),r12 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 8040b28: 59 6c 00 34 sw (r11+52),r12 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 8040b2c: 59 6d 00 3c sw (r11+60),r13 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b30: fb ff 37 15 calli 800e784 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 8040b34: b9 80 08 00 mv r1,r12 8040b38: 5b 81 00 1c sw (sp+28),r1 8040b3c: fb ff 31 d5 calli 800d290 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8040b40: 2b 81 00 1c lw r1,(sp+28) 8040b44: e3 ff ff d7 bi 8040aa0 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 8040b48: b9 60 08 00 mv r1,r11 8040b4c: fb ff ff 6a calli 80408f4 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 8040b50: d0 0f 00 00 wcsr IE,r15 the_period->state = RATE_MONOTONIC_ACTIVE; 8040b54: 34 02 00 02 mvi r2,2 8040b58: 78 01 08 07 mvhi r1,0x807 8040b5c: 59 62 00 38 sw (r11+56),r2 8040b60: 38 21 51 00 ori r1,r1,0x5100 8040b64: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040b68: 59 6d 00 1c sw (r11+28),r13 the_period->next_length = length; 8040b6c: 59 6d 00 3c sw (r11+60),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b70: fb ff 37 05 calli 800e784 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 8040b74: 34 01 00 06 mvi r1,6 8040b78: 5b 81 00 1c sw (sp+28),r1 8040b7c: fb ff 31 c5 calli 800d290 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 8040b80: 2b 81 00 1c lw r1,(sp+28) 8040b84: e3 ff ff c7 bi 8040aa0 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 8040b88: 29 61 00 38 lw r1,(r11+56) 8040b8c: 34 02 00 04 mvi r2,4 8040b90: 50 41 00 1b bgeu r2,r1,8040bfc 8040b94: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8040b98: e3 ff ff e8 bi 8040b38 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 8040b9c: b9 60 08 00 mv r1,r11 8040ba0: fb ff ff 55 calli 80408f4 <_Rate_monotonic_Update_statistics> /* * 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; 8040ba4: 34 01 00 01 mvi r1,1 the_period->next_length = length; 8040ba8: 59 6d 00 3c sw (r11+60),r13 /* * 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; 8040bac: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; _ISR_Enable( level ); 8040bb0: d0 0f 00 00 wcsr IE,r15 _Thread_Executing->Wait.id = the_period->Object.id; 8040bb4: 29 81 00 00 lw r1,(r12+0) 8040bb8: 29 63 00 08 lw r3,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8040bbc: 34 02 40 00 mvi r2,16384 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 8040bc0: 58 23 00 20 sw (r1+32),r3 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8040bc4: fb ff 34 ab calli 800de70 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 8040bc8: 90 00 08 00 rcsr r1,IE 8040bcc: 34 02 ff fe mvi r2,-2 8040bd0: a0 22 10 00 and r2,r1,r2 8040bd4: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 8040bd8: 34 03 00 02 mvi r3,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 8040bdc: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 8040be0: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 8040be4: d0 01 00 00 wcsr IE,r1 /* * 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 ) 8040be8: 34 01 00 03 mvi r1,3 8040bec: 44 41 00 0b be r2,r1,8040c18 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 8040bf0: fb ff 31 a8 calli 800d290 <_Thread_Enable_dispatch> 8040bf4: 34 01 00 00 mvi r1,0 return RTEMS_SUCCESSFUL; 8040bf8: e3 ff ff aa bi 8040aa0 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 8040bfc: 78 0b 08 06 mvhi r11,0x806 8040c00: 34 02 00 02 mvi r2,2 8040c04: fb ff 01 57 calli 8001160 <__ashlsi3> 8040c08: 39 6b dd c4 ori r11,r11,0xddc4 8040c0c: b5 61 08 00 add r1,r11,r1 8040c10: 28 21 00 00 lw r1,(r1+0) 8040c14: e3 ff ff c9 bi 8040b38 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8040c18: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8040c1c: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED 8040c20: fb ff b5 8f calli 802e25c <_Thread_Clear_state> <== NOT EXECUTED 8040c24: e3 ff ff f3 bi 8040bf0 <== NOT EXECUTED 08012244 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 8012244: 37 9c ff e8 addi sp,sp,-24 8012248: 5b 8b 00 14 sw (sp+20),r11 801224c: 5b 8c 00 10 sw (sp+16),r12 8012250: 5b 8d 00 0c sw (sp+12),r13 8012254: 5b 8e 00 08 sw (sp+8),r14 8012258: 5b 9d 00 04 sw (sp+4),ra 801225c: b8 40 60 00 mv r12,r2 8012260: b8 20 68 00 mv r13,r1 8012264: b8 60 70 00 mv r14,r3 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 8012268: 44 40 00 1b be r2,r0,80122d4 return RTEMS_INVALID_ADDRESS; if ( !size ) 801226c: 44 60 00 1a be r3,r0,80122d4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 8012270: 78 0b 08 03 mvhi r11,0x803 8012274: 39 6b ec e0 ori r11,r11,0xece0 8012278: 29 61 00 00 lw r1,(r11+0) 801227c: f8 00 0b 7a calli 8015064 <_API_Mutex_Lock> 8012280: 78 01 08 03 mvhi r1,0x803 8012284: b9 a0 10 00 mv r2,r13 8012288: 38 21 ea f4 ori r1,r1,0xeaf4 801228c: 37 83 00 18 addi r3,sp,24 8012290: f8 00 13 f3 calli 801725c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 8012294: 2b 8d 00 18 lw r13,(sp+24) 8012298: 45 a0 00 18 be r13,r0,80122f8 801229c: 34 01 00 01 mvi r1,1 80122a0: 34 0c 00 04 mvi r12,4 80122a4: 45 a1 00 02 be r13,r1,80122ac case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 80122a8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 80122ac: 29 61 00 00 lw r1,(r11+0) 80122b0: f8 00 0b 89 calli 80150d4 <_API_Mutex_Unlock> return return_status; } 80122b4: b9 80 08 00 mv r1,r12 80122b8: 2b 9d 00 04 lw ra,(sp+4) 80122bc: 2b 8b 00 14 lw r11,(sp+20) 80122c0: 2b 8c 00 10 lw r12,(sp+16) 80122c4: 2b 8d 00 0c lw r13,(sp+12) 80122c8: 2b 8e 00 08 lw r14,(sp+8) 80122cc: 37 9c 00 18 addi sp,sp,24 80122d0: c3 a0 00 00 ret return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 80122d4: 34 0c 00 09 mvi r12,9 } 80122d8: b9 80 08 00 mv r1,r12 80122dc: 2b 9d 00 04 lw ra,(sp+4) 80122e0: 2b 8b 00 14 lw r11,(sp+20) 80122e4: 2b 8c 00 10 lw r12,(sp+16) 80122e8: 2b 8d 00 0c lw r13,(sp+12) 80122ec: 2b 8e 00 08 lw r14,(sp+8) 80122f0: 37 9c 00 18 addi sp,sp,24 80122f4: c3 a0 00 00 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 80122f8: b9 80 10 00 mv r2,r12 80122fc: 34 21 00 68 addi r1,r1,104 8012300: b9 c0 18 00 mv r3,r14 8012304: f8 00 11 bc calli 80169f4 <_Heap_Size_of_alloc_area> 8012308: 34 0c 00 09 mvi r12,9 801230c: 44 2d ff e8 be r1,r13,80122ac 8012310: 34 0c 00 00 mvi r12,0 8012314: e3 ff ff e6 bi 80122ac