08015214 <_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 ) { 8015214: 37 9c ff e4 addi sp,sp,-28 8015218: 5b 8b 00 1c sw (sp+28),r11 801521c: 5b 8c 00 18 sw (sp+24),r12 8015220: 5b 8d 00 14 sw (sp+20),r13 8015224: 5b 8e 00 10 sw (sp+16),r14 8015228: 5b 8f 00 0c sw (sp+12),r15 801522c: 5b 90 00 08 sw (sp+8),r16 8015230: 5b 9d 00 04 sw (sp+4),ra 8015234: 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 ) { 8015238: 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 ) { 801523c: b8 60 60 00 mv r12,r3 8015240: b8 40 78 00 mv r15,r2 8015244: 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 ) { 8015248: 50 23 00 0b bgeu r1,r3,8015274 <_CORE_message_queue_Broadcast+0x60> 801524c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 8015250: 2b 9d 00 04 lw ra,(sp+4) 8015254: 2b 8b 00 1c lw r11,(sp+28) 8015258: 2b 8c 00 18 lw r12,(sp+24) 801525c: 2b 8d 00 14 lw r13,(sp+20) 8015260: 2b 8e 00 10 lw r14,(sp+16) 8015264: 2b 8f 00 0c lw r15,(sp+12) 8015268: 2b 90 00 08 lw r16,(sp+8) 801526c: 37 9c 00 1c addi sp,sp,28 8015270: 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 ) { 8015274: 29 c2 00 48 lw r2,(r14+72) 8015278: 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))) { 801527c: 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 ) { 8015280: 44 41 00 08 be r2,r1,80152a0 <_CORE_message_queue_Broadcast+0x8c> *count = 0; 8015284: 58 c1 00 00 sw (r6+0),r1 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8015288: e3 ff ff f2 bi 8015250 <_CORE_message_queue_Broadcast+0x3c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 801528c: 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; 8015290: 35 ad 00 01 addi r13,r13,1 8015294: f8 00 2f d8 calli 80211f4 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 8015298: 29 61 00 28 lw r1,(r11+40) 801529c: 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))) { 80152a0: b9 c0 08 00 mv r1,r14 80152a4: f8 00 0c d1 calli 80185e8 <_Thread_queue_Dequeue> 80152a8: b8 20 58 00 mv r11,r1 80152ac: b9 e0 10 00 mv r2,r15 80152b0: 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 = 80152b4: 5c 20 ff f6 bne r1,r0,801528c <_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; 80152b8: 5a 0d 00 00 sw (r16+0),r13 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 80152bc: e3 ff ff e5 bi 8015250 <_CORE_message_queue_Broadcast+0x3c> 080096b4 <_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 ) { 80096b4: 37 9c ff f8 addi sp,sp,-8 80096b8: 5b 8b 00 08 sw (sp+8),r11 80096bc: 5b 9d 00 04 sw (sp+4),ra 80096c0: 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)) ) { 80096c4: fb ff ed 41 calli 8004bc8 <_Thread_queue_Dequeue> 80096c8: 34 02 00 00 mvi r2,0 80096cc: 44 22 00 06 be r1,r2,80096e4 <_CORE_semaphore_Surrender+0x30> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 80096d0: b8 40 08 00 mv r1,r2 80096d4: 2b 9d 00 04 lw ra,(sp+4) 80096d8: 2b 8b 00 08 lw r11,(sp+8) 80096dc: 37 9c 00 08 addi sp,sp,8 80096e0: 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 ); 80096e4: 90 00 08 00 rcsr r1,IE 80096e8: 34 02 ff fe mvi r2,-2 80096ec: a0 22 10 00 and r2,r1,r2 80096f0: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 80096f4: 29 62 00 48 lw r2,(r11+72) 80096f8: 29 63 00 40 lw r3,(r11+64) 80096fc: 54 62 00 08 bgu r3,r2,800971c <_CORE_semaphore_Surrender+0x68> 8009700: 34 02 00 04 mvi r2,4 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8009704: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED } return status; } 8009708: b8 40 08 00 mv r1,r2 800970c: 2b 9d 00 04 lw ra,(sp+4) 8009710: 2b 8b 00 08 lw r11,(sp+8) 8009714: 37 9c 00 08 addi sp,sp,8 8009718: c3 a0 00 00 ret #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 800971c: 34 42 00 01 addi r2,r2,1 8009720: 59 62 00 48 sw (r11+72),r2 8009724: 34 02 00 00 mvi r2,0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8009728: d0 01 00 00 wcsr IE,r1 800972c: e3 ff ff f7 bi 8009708 <_CORE_semaphore_Surrender+0x54> 0800f3bc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800f3bc: 37 9c ff f8 addi sp,sp,-8 800f3c0: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800f3c4: 37 82 00 08 addi r2,sp,8 800f3c8: fb ff de c8 calli 8006ee8 <_Thread_Get> switch ( location ) { 800f3cc: 2b 82 00 08 lw r2,(sp+8) 800f3d0: 44 40 00 04 be r2,r0,800f3e0 <_Event_Timeout+0x24> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800f3d4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800f3d8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800f3dc: 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 ); 800f3e0: 90 00 18 00 rcsr r3,IE 800f3e4: 34 02 ff fe mvi r2,-2 800f3e8: a0 62 10 00 and r2,r3,r2 800f3ec: d0 02 00 00 wcsr IE,r2 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800f3f0: 78 02 08 02 mvhi r2,0x802 800f3f4: 38 42 6a 00 ori r2,r2,0x6a00 800f3f8: 28 42 00 00 lw r2,(r2+0) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800f3fc: 34 04 00 00 mvi r4,0 800f400: 58 24 00 24 sw (r1+36),r4 if ( _Thread_Is_executing( the_thread ) ) { 800f404: 44 22 00 0f be r1,r2,800f440 <_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; 800f408: 34 02 00 06 mvi r2,6 800f40c: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800f410: d0 03 00 00 wcsr IE,r3 800f414: 78 02 10 03 mvhi r2,0x1003 800f418: 38 42 ff f8 ori r2,r2,0xfff8 800f41c: f8 00 05 72 calli 80109e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800f420: 78 01 08 02 mvhi r1,0x802 800f424: 38 21 69 44 ori r1,r1,0x6944 800f428: 28 22 00 00 lw r2,(r1+0) 800f42c: 34 42 ff ff addi r2,r2,-1 800f430: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800f434: 2b 9d 00 04 lw ra,(sp+4) 800f438: 37 9c 00 08 addi sp,sp,8 800f43c: 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 ) 800f440: 78 02 08 02 mvhi r2,0x802 800f444: 38 42 72 ec ori r2,r2,0x72ec 800f448: 28 45 00 00 lw r5,(r2+0) 800f44c: 34 04 00 01 mvi r4,1 800f450: 5c a4 ff ee bne r5,r4,800f408 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800f454: 34 04 00 02 mvi r4,2 800f458: 58 44 00 00 sw (r2+0),r4 800f45c: e3 ff ff eb bi 800f408 <_Event_Timeout+0x4c> 0800fb50 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800fb50: 37 9c ff e8 addi sp,sp,-24 800fb54: 5b 8b 00 14 sw (sp+20),r11 800fb58: 5b 8c 00 10 sw (sp+16),r12 800fb5c: 5b 8d 00 0c sw (sp+12),r13 800fb60: 5b 8e 00 08 sw (sp+8),r14 800fb64: 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; 800fb68: 28 2c 00 18 lw r12,(r1+24) uintptr_t const heap_area_end = heap->area_end; 800fb6c: 28 25 00 1c lw r5,(r1+28) Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800fb70: 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; 800fb74: 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 ) { 800fb78: 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; 800fb7c: 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; 800fb80: a0 2c 60 00 and r12,r1,r12 800fb84: 34 01 00 01 mvi r1,1 800fb88: 5d 80 00 03 bne r12,r0,800fb94 <_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 ) { 800fb8c: 34 01 00 02 mvi r1,2 800fb90: 44 45 00 08 be r2,r5,800fbb0 <_Heap_Extend+0x60> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 800fb94: 2b 9d 00 04 lw ra,(sp+4) 800fb98: 2b 8b 00 14 lw r11,(sp+20) 800fb9c: 2b 8c 00 10 lw r12,(sp+16) 800fba0: 2b 8d 00 0c lw r13,(sp+12) 800fba4: 2b 8e 00 08 lw r14,(sp+8) 800fba8: 37 9c 00 18 addi sp,sp,24 800fbac: 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; 800fbb0: 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 800fbb4: 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); 800fbb8: 29 62 00 10 lw r2,(r11+16) 800fbbc: 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; 800fbc0: 59 63 00 1c sw (r11+28),r3 800fbc4: b9 c0 08 00 mv r1,r14 800fbc8: 5b 84 00 18 sw (sp+24),r4 800fbcc: fb ff d2 53 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; 800fbd0: 2b 84 00 18 lw r4,(sp+24) 800fbd4: c9 c1 08 00 sub r1,r14,r1 800fbd8: 58 81 00 00 sw (r4+0),r1 if( extend_size >= heap->min_block_size ) { 800fbdc: 29 62 00 14 lw r2,(r11+20) 800fbe0: 50 22 00 09 bgeu r1,r2,800fc04 <_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 )); 800fbe4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 800fbe8: 2b 9d 00 04 lw ra,(sp+4) 800fbec: 2b 8b 00 14 lw r11,(sp+20) 800fbf0: 2b 8c 00 10 lw r12,(sp+16) 800fbf4: 2b 8d 00 0c lw r13,(sp+12) 800fbf8: 2b 8e 00 08 lw r14,(sp+8) 800fbfc: 37 9c 00 18 addi sp,sp,24 800fc00: 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; 800fc04: 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 = 800fc08: 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); 800fc0c: 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; 800fc10: 20 84 00 01 andi r4,r4,0x1 800fc14: b8 24 20 00 or r4,r1,r4 800fc18: c8 62 18 00 sub r3,r3,r2 800fc1c: 59 a4 00 04 sw (r13+4),r4 800fc20: 38 63 00 01 ori r3,r3,0x1 800fc24: 58 43 00 04 sw (r2+4),r3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800fc28: 29 65 00 2c lw r5,(r11+44) ++stats->used_blocks; 800fc2c: 29 64 00 40 lw r4,(r11+64) --stats->frees; /* Do not count subsequent call as actual free() */ 800fc30: 29 63 00 50 lw r3,(r11+80) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800fc34: b4 a1 08 00 add r1,r5,r1 ++stats->used_blocks; 800fc38: 34 84 00 01 addi r4,r4,1 --stats->frees; /* Do not count subsequent call as actual free() */ 800fc3c: 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; 800fc40: 59 62 00 24 sw (r11+36),r2 /* Statistics */ stats->size += extend_size; 800fc44: 59 61 00 2c sw (r11+44),r1 ++stats->used_blocks; 800fc48: 59 64 00 40 sw (r11+64),r4 --stats->frees; /* Do not count subsequent call as actual free() */ 800fc4c: 59 63 00 50 sw (r11+80),r3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800fc50: b9 60 08 00 mv r1,r11 800fc54: 35 a2 00 08 addi r2,r13,8 800fc58: fb ff e3 18 calli 80088b8 <_Heap_Free> 800fc5c: b9 80 08 00 mv r1,r12 800fc60: e3 ff ff e2 bi 800fbe8 <_Heap_Extend+0x98> 08003ed8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8003ed8: 37 9c ff a8 addi sp,sp,-88 8003edc: 5b 8b 00 50 sw (sp+80),r11 8003ee0: 5b 8c 00 4c sw (sp+76),r12 8003ee4: 5b 8d 00 48 sw (sp+72),r13 8003ee8: 5b 8e 00 44 sw (sp+68),r14 8003eec: 5b 8f 00 40 sw (sp+64),r15 8003ef0: 5b 90 00 3c sw (sp+60),r16 8003ef4: 5b 91 00 38 sw (sp+56),r17 8003ef8: 5b 92 00 34 sw (sp+52),r18 8003efc: 5b 93 00 30 sw (sp+48),r19 8003f00: 5b 94 00 2c sw (sp+44),r20 8003f04: 5b 95 00 28 sw (sp+40),r21 8003f08: 5b 96 00 24 sw (sp+36),r22 8003f0c: 5b 97 00 20 sw (sp+32),r23 8003f10: 5b 98 00 1c sw (sp+28),r24 8003f14: 5b 99 00 18 sw (sp+24),r25 8003f18: 5b 9b 00 14 sw (sp+20),fp 8003f1c: 5b 9d 00 10 sw (sp+16),ra 8003f20: 20 63 00 ff andi r3,r3,0xff 8003f24: b8 20 58 00 mv r11,r1 8003f28: b8 40 80 00 mv r16,r2 uintptr_t const page_size = heap->page_size; 8003f2c: 28 32 00 10 lw r18,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8003f30: 28 33 00 14 lw r19,(r1+20) Heap_Block *const last_block = heap->last_block; 8003f34: 28 34 00 24 lw r20,(r1+36) Heap_Block *block = heap->first_block; 8003f38: 28 2c 00 20 lw r12,(r1+32) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003f3c: 5c 60 00 1c bne r3,r0,8003fac <_Heap_Walk+0xd4> if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f40: 78 03 08 02 mvhi r3,0x802 8003f44: 38 63 1a 88 ori r3,r3,0x1a88 8003f48: 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; 8003f4c: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f50: 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; 8003f54: 39 ef 3e b4 ori r15,r15,0x3eb4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f58: 44 62 00 1c be r3,r2,8003fc8 <_Heap_Walk+0xf0> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8003f5c: 34 01 00 01 mvi r1,1 block = next_block; } return true; } 8003f60: 2b 9d 00 10 lw ra,(sp+16) 8003f64: 2b 8b 00 50 lw r11,(sp+80) 8003f68: 2b 8c 00 4c lw r12,(sp+76) 8003f6c: 2b 8d 00 48 lw r13,(sp+72) 8003f70: 2b 8e 00 44 lw r14,(sp+68) 8003f74: 2b 8f 00 40 lw r15,(sp+64) 8003f78: 2b 90 00 3c lw r16,(sp+60) 8003f7c: 2b 91 00 38 lw r17,(sp+56) 8003f80: 2b 92 00 34 lw r18,(sp+52) 8003f84: 2b 93 00 30 lw r19,(sp+48) 8003f88: 2b 94 00 2c lw r20,(sp+44) 8003f8c: 2b 95 00 28 lw r21,(sp+40) 8003f90: 2b 96 00 24 lw r22,(sp+36) 8003f94: 2b 97 00 20 lw r23,(sp+32) 8003f98: 2b 98 00 1c lw r24,(sp+28) 8003f9c: 2b 99 00 18 lw r25,(sp+24) 8003fa0: 2b 9b 00 14 lw fp,(sp+20) 8003fa4: 37 9c 00 58 addi sp,sp,88 8003fa8: 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() ) ) { 8003fac: 78 03 08 02 mvhi r3,0x802 8003fb0: 38 63 1a 88 ori r3,r3,0x1a88 8003fb4: 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; 8003fb8: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003fbc: 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; 8003fc0: 39 ef 44 c4 ori r15,r15,0x44c4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003fc4: 5c 62 ff e6 bne r3,r2,8003f5c <_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)( 8003fc8: 29 61 00 08 lw r1,(r11+8) 8003fcc: 29 66 00 18 lw r6,(r11+24) 8003fd0: 29 67 00 1c lw r7,(r11+28) 8003fd4: 5b 81 00 08 sw (sp+8),r1 8003fd8: 29 61 00 0c lw r1,(r11+12) 8003fdc: 78 03 08 01 mvhi r3,0x801 8003fe0: 5b 94 00 04 sw (sp+4),r20 8003fe4: 5b 81 00 0c sw (sp+12),r1 8003fe8: 38 63 de 24 ori r3,r3,0xde24 8003fec: ba 00 08 00 mv r1,r16 8003ff0: 34 02 00 00 mvi r2,0 8003ff4: ba 40 20 00 mv r4,r18 8003ff8: ba 60 28 00 mv r5,r19 8003ffc: b9 80 40 00 mv r8,r12 8004000: 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 ) { 8004004: 46 40 00 d1 be r18,r0,8004348 <_Heap_Walk+0x470> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8004008: 22 4d 00 07 andi r13,r18,0x7 800400c: 5d a0 00 d6 bne r13,r0,8004364 <_Heap_Walk+0x48c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8004010: ba 60 08 00 mv r1,r19 8004014: ba 40 10 00 mv r2,r18 8004018: fb ff f3 22 calli 8000ca0 <__umodsi3> 800401c: b8 20 88 00 mv r17,r1 8004020: 5c 2d 00 d9 bne r1,r13,8004384 <_Heap_Walk+0x4ac> ); return false; } if ( 8004024: 35 81 00 08 addi r1,r12,8 8004028: ba 40 10 00 mv r2,r18 800402c: fb ff f3 1d calli 8000ca0 <__umodsi3> 8004030: b8 20 70 00 mv r14,r1 8004034: 5c 31 00 ee bne r1,r17,80043ec <_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; 8004038: 29 8d 00 04 lw r13,(r12+4) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 800403c: 21 b1 00 01 andi r17,r13,0x1 8004040: 46 21 00 f3 be r17,r1,800440c <_Heap_Walk+0x534> ); return false; } if ( first_block->prev_size != page_size ) { 8004044: 29 84 00 00 lw r4,(r12+0) 8004048: 5e 44 00 60 bne r18,r4,80041c8 <_Heap_Walk+0x2f0> ); return false; } if ( _Heap_Is_free( last_block ) ) { 800404c: 2a 82 00 04 lw r2,(r20+4) 8004050: 34 01 ff fe mvi r1,-2 8004054: a0 41 08 00 and r1,r2,r1 8004058: b6 81 08 00 add r1,r20,r1 800405c: 28 35 00 04 lw r21,(r1+4) 8004060: 22 b5 00 01 andi r21,r21,0x1 8004064: 46 ae 00 f1 be r21,r14,8004428 <_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; 8004068: 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; 800406c: 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 ) { 8004070: 45 6e 00 24 be r11,r14,8004100 <_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; 8004074: 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 8004078: 56 ce 00 fb bgu r22,r14,8004464 <_Heap_Walk+0x58c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 800407c: 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 8004080: 55 d9 00 f9 bgu r14,r25,8004464 <_Heap_Walk+0x58c> ); return false; } if ( 8004084: 35 c1 00 08 addi r1,r14,8 8004088: bb 00 10 00 mv r2,r24 800408c: fb ff f3 05 calli 8000ca0 <__umodsi3> 8004090: 5c 20 00 ed bne r1,r0,8004444 <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 8004094: 29 c2 00 04 lw r2,(r14+4) 8004098: 34 17 ff fe mvi r23,-2 800409c: a0 57 10 00 and r2,r2,r23 80040a0: b5 c2 10 00 add r2,r14,r2 80040a4: 28 42 00 04 lw r2,(r2+4) 80040a8: 20 42 00 01 andi r2,r2,0x1 80040ac: 5c 41 00 fe bne r2,r1,80044a4 <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 80040b0: 29 c5 00 0c lw r5,(r14+12) 80040b4: 45 65 00 10 be r11,r5,80040f4 <_Heap_Walk+0x21c> 80040b8: e0 00 00 f3 bi 8004484 <_Heap_Walk+0x5ac> <== NOT EXECUTED 80040bc: 56 ce 00 ea bgu r22,r14,8004464 <_Heap_Walk+0x58c> ); return false; } if ( 80040c0: 35 c1 00 08 addi r1,r14,8 80040c4: bb 00 10 00 mv r2,r24 80040c8: 55 d9 00 e7 bgu r14,r25,8004464 <_Heap_Walk+0x58c> 80040cc: fb ff f2 f5 calli 8000ca0 <__umodsi3> 80040d0: 5c 20 00 dd bne r1,r0,8004444 <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 80040d4: 29 c3 00 04 lw r3,(r14+4) 80040d8: a0 77 18 00 and r3,r3,r23 80040dc: b4 6e 18 00 add r3,r3,r14 80040e0: 28 63 00 04 lw r3,(r3+4) 80040e4: 20 63 00 01 andi r3,r3,0x1 80040e8: 5c 61 00 ef bne r3,r1,80044a4 <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 80040ec: 29 c5 00 0c lw r5,(r14+12) 80040f0: 5c b5 00 e5 bne r5,r21,8004484 <_Heap_Walk+0x5ac> (*printer)( 80040f4: b9 c0 a8 00 mv r21,r14 return false; } prev_block = free_block; free_block = free_block->next; 80040f8: 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 ) { 80040fc: 5d 6e ff f0 bne r11,r14,80040bc <_Heap_Walk+0x1e4> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8004100: 46 8c ff 97 be r20,r12,8003f5c <_Heap_Walk+0x84> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004104: 78 01 08 01 mvhi r1,0x801 8004108: 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)" : ""), 800410c: 78 01 08 01 mvhi r1,0x801 8004110: 5b 81 00 58 sw (sp+88),r1 block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004114: 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; 8004118: 34 16 ff fe mvi r22,-2 800411c: 78 15 08 01 mvhi r21,0x801 8004120: 38 21 e1 7c ori r1,r1,0xe17c 8004124: 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)" : ""), 8004128: 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)( 800412c: 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; 8004130: 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)" : ""), 8004134: 38 21 e1 64 ori r1,r1,0xe164 - 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; 8004138: a1 b6 68 00 and r13,r13,r22 800413c: 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)( 8004140: 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)" : "") 8004144: 3a b5 e1 ec ori r21,r21,0xe1ec 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)( 8004148: 3b 18 e1 70 ori r24,r24,0xe170 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 800414c: 3a f7 e1 58 ori r23,r23,0xe158 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 8004150: 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); 8004154: 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 ) { 8004158: 44 40 00 59 be r2,r0,80042bc <_Heap_Walk+0x3e4> (*printer)( 800415c: 78 03 08 01 mvhi r3,0x801 8004160: ba 00 08 00 mv r1,r16 8004164: 34 02 00 00 mvi r2,0 8004168: 38 63 e0 58 ori r3,r3,0xe058 800416c: b9 80 20 00 mv r4,r12 8004170: b9 a0 28 00 mv r5,r13 8004174: 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 8004178: 29 63 00 20 lw r3,(r11+32) 800417c: 54 6e 00 8a bgu r3,r14,80043a4 <_Heap_Walk+0x4cc> 8004180: 29 61 00 24 lw r1,(r11+36) 8004184: 55 c1 00 88 bgu r14,r1,80043a4 <_Heap_Walk+0x4cc> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 8004188: b9 a0 08 00 mv r1,r13 800418c: ba 40 10 00 mv r2,r18 8004190: fb ff f2 c4 calli 8000ca0 <__umodsi3> 8004194: b8 20 88 00 mv r17,r1 8004198: 5c 20 00 8c bne r1,r0,80043c8 <_Heap_Walk+0x4f0> ); return false; } if ( block_size < min_block_size ) { 800419c: 51 b3 00 13 bgeu r13,r19,80041e8 <_Heap_Walk+0x310> (*printer)( 80041a0: 78 03 08 01 mvhi r3,0x801 80041a4: ba 00 08 00 mv r1,r16 80041a8: 38 63 e0 f8 ori r3,r3,0xe0f8 80041ac: b9 80 20 00 mv r4,r12 80041b0: b9 a0 28 00 mv r5,r13 80041b4: ba 60 30 00 mv r6,r19 80041b8: 34 02 00 01 mvi r2,1 80041bc: d9 e0 00 00 call r15 80041c0: ba 20 08 00 mv r1,r17 block, block_size, min_block_size ); return false; 80041c4: e3 ff ff 67 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 80041c8: 78 03 08 01 mvhi r3,0x801 80041cc: ba 00 08 00 mv r1,r16 80041d0: 38 63 df 74 ori r3,r3,0xdf74 80041d4: ba 40 28 00 mv r5,r18 80041d8: 34 02 00 01 mvi r2,1 80041dc: d9 e0 00 00 call r15 80041e0: b9 c0 08 00 mv r1,r14 80041e4: e3 ff ff 5f bi 8003f60 <_Heap_Walk+0x88> ); return false; } if ( next_block_begin <= block_begin ) { 80041e8: 55 cc 00 0a bgu r14,r12,8004210 <_Heap_Walk+0x338> (*printer)( 80041ec: 78 03 08 01 mvhi r3,0x801 80041f0: ba 00 08 00 mv r1,r16 80041f4: 38 63 e1 24 ori r3,r3,0xe124 80041f8: b9 80 20 00 mv r4,r12 80041fc: b9 c0 28 00 mv r5,r14 8004200: 34 02 00 01 mvi r2,1 8004204: d9 e0 00 00 call r15 8004208: ba 20 08 00 mv r1,r17 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 800420c: e3 ff ff 55 bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_prev_used( next_block ) ) { 8004210: 29 c3 00 04 lw r3,(r14+4) 8004214: 20 63 00 01 andi r3,r3,0x1 8004218: 5c 60 00 22 bne r3,r0,80042a0 <_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; 800421c: 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)( 8004220: 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; 8004224: 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; 8004228: 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; 800422c: 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); 8004230: 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; 8004234: ba e0 30 00 mv r6,r23 8004238: 44 25 00 03 be r1,r5,8004244 <_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)" : ""), 800423c: ba a0 30 00 mv r6,r21 8004240: 44 ab 00 40 be r5,r11,8004340 <_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)( 8004244: 29 87 00 08 lw r7,(r12+8) 8004248: bb 00 40 00 mv r8,r24 800424c: 44 67 00 03 be r3,r7,8004258 <_Heap_Walk+0x380> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004250: ba a0 40 00 mv r8,r21 8004254: 44 eb 00 39 be r7,r11,8004338 <_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)( 8004258: 78 03 08 01 mvhi r3,0x801 800425c: ba 00 08 00 mv r1,r16 8004260: 34 02 00 00 mvi r2,0 8004264: 38 63 e1 88 ori r3,r3,0xe188 8004268: b9 80 20 00 mv r4,r12 800426c: 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 ) { 8004270: 2b 26 00 00 lw r6,(r25+0) 8004274: 45 a6 00 1a be r13,r6,80042dc <_Heap_Walk+0x404> (*printer)( 8004278: 78 03 08 01 mvhi r3,0x801 800427c: ba 00 08 00 mv r1,r16 8004280: 38 63 e1 b4 ori r3,r3,0xe1b4 8004284: b9 80 20 00 mv r4,r12 8004288: b9 a0 28 00 mv r5,r13 800428c: bb 20 38 00 mv r7,r25 8004290: 34 02 00 01 mvi r2,1 8004294: d9 e0 00 00 call r15 8004298: 34 01 00 00 mvi r1,0 800429c: e3 ff ff 31 bi 8003f60 <_Heap_Walk+0x88> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 80042a0: 46 8e ff 2f be r20,r14,8003f5c <_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 ) { 80042a4: 29 cd 00 04 lw r13,(r14+4) 80042a8: b9 c0 60 00 mv r12,r14 80042ac: 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; 80042b0: 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); 80042b4: 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 ) { 80042b8: 5c 40 ff a9 bne r2,r0,800415c <_Heap_Walk+0x284> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 80042bc: 29 86 00 00 lw r6,(r12+0) 80042c0: bb 60 18 00 mv r3,fp 80042c4: ba 00 08 00 mv r1,r16 80042c8: 38 63 e0 70 ori r3,r3,0xe070 80042cc: b9 80 20 00 mv r4,r12 80042d0: b9 a0 28 00 mv r5,r13 80042d4: d9 e0 00 00 call r15 80042d8: e3 ff ff a8 bi 8004178 <_Heap_Walk+0x2a0> ); return false; } if ( !prev_used ) { 80042dc: 22 31 00 01 andi r17,r17,0x1 80042e0: 46 20 00 0e be r17,r0,8004318 <_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; 80042e4: 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 ) { 80042e8: 44 6b 00 04 be r3,r11,80042f8 <_Heap_Walk+0x420> if ( free_block == block ) { 80042ec: 44 6c ff ed be r3,r12,80042a0 <_Heap_Walk+0x3c8> return true; } free_block = free_block->next; 80042f0: 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 ) { 80042f4: 5c 6b ff fe bne r3,r11,80042ec <_Heap_Walk+0x414> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 80042f8: 78 03 08 01 mvhi r3,0x801 80042fc: ba 00 08 00 mv r1,r16 8004300: 38 63 e2 20 ori r3,r3,0xe220 8004304: b9 80 20 00 mv r4,r12 8004308: 34 02 00 01 mvi r2,1 800430c: d9 e0 00 00 call r15 8004310: 34 01 00 00 mvi r1,0 8004314: e3 ff ff 13 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !prev_used ) { (*printer)( 8004318: 78 03 08 01 mvhi r3,0x801 800431c: ba 00 08 00 mv r1,r16 8004320: 38 63 e1 f0 ori r3,r3,0xe1f0 8004324: b9 80 20 00 mv r4,r12 8004328: 34 02 00 01 mvi r2,1 800432c: d9 e0 00 00 call r15 8004330: ba 20 08 00 mv r1,r17 8004334: e3 ff ff 0b bi 8003f60 <_Heap_Walk+0x88> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004338: 2b 88 00 54 lw r8,(sp+84) 800433c: e3 ff ff c7 bi 8004258 <_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)" : ""), 8004340: 2b 86 00 58 lw r6,(sp+88) 8004344: e3 ff ff c0 bi 8004244 <_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" ); 8004348: 78 03 08 01 mvhi r3,0x801 800434c: ba 00 08 00 mv r1,r16 8004350: 38 63 de b8 ori r3,r3,0xdeb8 8004354: 34 02 00 01 mvi r2,1 8004358: d9 e0 00 00 call r15 800435c: ba 40 08 00 mv r1,r18 8004360: e3 ff ff 00 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 8004364: 78 03 08 01 mvhi r3,0x801 8004368: ba 00 08 00 mv r1,r16 800436c: 38 63 de cc ori r3,r3,0xdecc 8004370: ba 40 20 00 mv r4,r18 8004374: 34 02 00 01 mvi r2,1 8004378: d9 e0 00 00 call r15 800437c: 34 01 00 00 mvi r1,0 8004380: e3 ff fe f8 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 8004384: 78 03 08 01 mvhi r3,0x801 8004388: ba 00 08 00 mv r1,r16 800438c: 38 63 de ec ori r3,r3,0xdeec 8004390: ba 60 20 00 mv r4,r19 8004394: 34 02 00 01 mvi r2,1 8004398: d9 e0 00 00 call r15 800439c: b9 a0 08 00 mv r1,r13 80043a0: e3 ff fe f0 bi 8003f60 <_Heap_Walk+0x88> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 80043a4: 78 03 08 01 mvhi r3,0x801 80043a8: ba 00 08 00 mv r1,r16 80043ac: 38 63 e0 98 ori r3,r3,0xe098 80043b0: b9 80 20 00 mv r4,r12 80043b4: b9 c0 28 00 mv r5,r14 80043b8: 34 02 00 01 mvi r2,1 80043bc: d9 e0 00 00 call r15 80043c0: 34 01 00 00 mvi r1,0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 80043c4: e3 ff fe e7 bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 80043c8: 78 03 08 01 mvhi r3,0x801 80043cc: ba 00 08 00 mv r1,r16 80043d0: 38 63 e0 c8 ori r3,r3,0xe0c8 80043d4: b9 80 20 00 mv r4,r12 80043d8: b9 a0 28 00 mv r5,r13 80043dc: 34 02 00 01 mvi r2,1 80043e0: d9 e0 00 00 call r15 80043e4: 34 01 00 00 mvi r1,0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 80043e8: e3 ff fe de bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 80043ec: 78 03 08 01 mvhi r3,0x801 80043f0: ba 00 08 00 mv r1,r16 80043f4: 38 63 df 10 ori r3,r3,0xdf10 80043f8: b9 80 20 00 mv r4,r12 80043fc: 34 02 00 01 mvi r2,1 8004400: d9 e0 00 00 call r15 8004404: ba 20 08 00 mv r1,r17 8004408: e3 ff fe d6 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 800440c: 78 03 08 01 mvhi r3,0x801 8004410: ba 00 08 00 mv r1,r16 8004414: 38 63 df 44 ori r3,r3,0xdf44 8004418: 34 02 00 01 mvi r2,1 800441c: d9 e0 00 00 call r15 8004420: ba 20 08 00 mv r1,r17 8004424: e3 ff fe cf bi 8003f60 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 8004428: 78 03 08 01 mvhi r3,0x801 800442c: ba 00 08 00 mv r1,r16 8004430: 38 63 df a0 ori r3,r3,0xdfa0 8004434: 34 02 00 01 mvi r2,1 8004438: d9 e0 00 00 call r15 800443c: ba a0 08 00 mv r1,r21 8004440: e3 ff fe c8 bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 8004444: 78 03 08 01 mvhi r3,0x801 8004448: ba 00 08 00 mv r1,r16 800444c: 38 63 df d8 ori r3,r3,0xdfd8 8004450: b9 c0 20 00 mv r4,r14 8004454: 34 02 00 01 mvi r2,1 8004458: d9 e0 00 00 call r15 800445c: 34 01 00 00 mvi r1,0 8004460: e3 ff fe c0 bi 8003f60 <_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)( 8004464: 78 03 08 01 mvhi r3,0x801 8004468: ba 00 08 00 mv r1,r16 800446c: 38 63 df b8 ori r3,r3,0xdfb8 8004470: b9 c0 20 00 mv r4,r14 8004474: 34 02 00 01 mvi r2,1 8004478: d9 e0 00 00 call r15 800447c: 34 01 00 00 mvi r1,0 8004480: e3 ff fe b8 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( free_block->prev != prev_block ) { (*printer)( 8004484: 78 03 08 01 mvhi r3,0x801 8004488: ba 00 08 00 mv r1,r16 800448c: 38 63 e0 24 ori r3,r3,0xe024 8004490: b9 c0 20 00 mv r4,r14 8004494: 34 02 00 01 mvi r2,1 8004498: d9 e0 00 00 call r15 800449c: 34 01 00 00 mvi r1,0 80044a0: e3 ff fe b0 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 80044a4: 78 03 08 01 mvhi r3,0x801 80044a8: ba 00 08 00 mv r1,r16 80044ac: 38 63 e0 08 ori r3,r3,0xe008 80044b0: b9 c0 20 00 mv r4,r14 80044b4: 34 02 00 01 mvi r2,1 80044b8: d9 e0 00 00 call r15 80044bc: 34 01 00 00 mvi r1,0 80044c0: e3 ff fe a8 bi 8003f60 <_Heap_Walk+0x88> 0800374c <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 800374c: 37 9c ff f4 addi sp,sp,-12 8003750: 5b 8b 00 0c sw (sp+12),r11 8003754: 5b 8c 00 08 sw (sp+8),r12 8003758: 5b 9d 00 04 sw (sp+4),ra _ISR_Signals_to_thread_executing = false; 800375c: 78 03 08 01 mvhi r3,0x801 _ISR_Nest_level = 0; 8003760: 78 02 08 01 mvhi r2,0x801 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 8003764: 34 04 00 00 mvi r4,0 8003768: 38 63 e9 f8 ori r3,r3,0xe9f8 _ISR_Nest_level = 0; 800376c: 38 42 e9 3c ori r2,r2,0xe93c * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 8003770: 30 64 00 00 sb (r3+0),r4 _ISR_Nest_level = 0; 8003774: 58 44 00 00 sw (r2+0),r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 8003778: 34 01 00 80 mvi r1,128 void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0; 800377c: b8 80 60 00 mv r12,r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 8003780: f8 00 09 fe calli 8005f78 <_Workspace_Allocate_or_fatal_error> _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 8003784: 78 0b 08 01 mvhi r11,0x801 8003788: 78 02 08 01 mvhi r2,0x801 800378c: 38 42 e0 bc ori r2,r2,0xe0bc 8003790: 39 6b e0 c4 ori r11,r11,0xe0c4 8003794: 28 44 00 00 lw r4,(r2+0) 8003798: 29 63 00 1c lw r3,(r11+28) _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0; #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 800379c: 78 02 08 01 mvhi r2,0x801 80037a0: 38 42 e9 20 ori r2,r2,0xe920 80037a4: 58 41 00 00 sw (r2+0),r1 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 80037a8: 50 64 00 05 bgeu r3,r4,80037bc <_ISR_Handler_initialization+0x70> _Internal_error_Occurred( 80037ac: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80037b0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80037b4: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 80037b8: fb ff ff d6 calli 8003710 <_Internal_error_Occurred> <== NOT EXECUTED INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 80037bc: b8 60 08 00 mv r1,r3 80037c0: f8 00 09 ee calli 8005f78 <_Workspace_Allocate_or_fatal_error> Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 80037c4: 29 64 00 1c lw r4,(r11+28) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 80037c8: 78 02 08 01 mvhi r2,0x801 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 80037cc: 78 03 08 01 mvhi r3,0x801 80037d0: b4 24 20 00 add r4,r1,r4 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 80037d4: 38 42 e8 b4 ori r2,r2,0xe8b4 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 80037d8: 38 63 e8 38 ori r3,r3,0xe838 80037dc: 58 64 00 00 sw (r3+0),r4 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 80037e0: 58 41 00 00 sw (r2+0),r1 #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 80037e4: 2b 9d 00 04 lw ra,(sp+4) 80037e8: 2b 8b 00 0c lw r11,(sp+12) 80037ec: 2b 8c 00 08 lw r12,(sp+8) 80037f0: 37 9c 00 0c addi sp,sp,12 80037f4: c3 a0 00 00 ret 08003f98 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 8003f98: 37 9c ff ec addi sp,sp,-20 8003f9c: 5b 8b 00 14 sw (sp+20),r11 8003fa0: 5b 8c 00 10 sw (sp+16),r12 8003fa4: 5b 8d 00 0c sw (sp+12),r13 8003fa8: 5b 8e 00 08 sw (sp+8),r14 8003fac: 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 ); 8003fb0: 28 2c 00 08 lw r12,(r1+8) block_count = (information->maximum - index_base) / 8003fb4: 2c 2d 00 14 lhu r13,(r1+20) */ void _Objects_Shrink_information( Objects_Information *information ) { 8003fb8: 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) / 8003fbc: 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 ); 8003fc0: 21 8c ff ff andi r12,r12,0xffff block_count = (information->maximum - index_base) / 8003fc4: b9 a0 10 00 mv r2,r13 8003fc8: c8 2c 08 00 sub r1,r1,r12 8003fcc: f8 00 5d db calli 801b738 <__udivsi3> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003fd0: 44 20 00 09 be r1,r0,8003ff4 <_Objects_Shrink_information+0x5c> if ( information->inactive_per_block[ block ] == 8003fd4: 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; 8003fd8: 34 0b 00 04 mvi r11,4 8003fdc: 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 ] == 8003fe0: 28 a2 00 00 lw r2,(r5+0) 8003fe4: 45 a2 00 11 be r13,r2,8004028 <_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++ ) { 8003fe8: 34 63 00 01 addi r3,r3,1 if ( information->inactive_per_block[ block ] == 8003fec: 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++ ) { 8003ff0: 54 23 00 08 bgu r1,r3,8004010 <_Objects_Shrink_information+0x78> return; } index_base += information->allocation_size; } } 8003ff4: 2b 9d 00 04 lw ra,(sp+4) 8003ff8: 2b 8b 00 14 lw r11,(sp+20) 8003ffc: 2b 8c 00 10 lw r12,(sp+16) 8004000: 2b 8d 00 0c lw r13,(sp+12) 8004004: 2b 8e 00 08 lw r14,(sp+8) 8004008: 37 9c 00 14 addi sp,sp,20 800400c: 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 ] == 8004010: 28 42 00 00 lw r2,(r2+0) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 8004014: b5 8d 60 00 add r12,r12,r13 8004018: 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 ] == 800401c: 45 a2 00 04 be r13,r2,800402c <_Objects_Shrink_information+0x94> 8004020: b8 80 58 00 mv r11,r4 8004024: e3 ff ff f1 bi 8003fe8 <_Objects_Shrink_information+0x50> 8004028: 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; 800402c: 29 c1 00 20 lw r1,(r14+32) do { index = _Objects_Get_index( the_object->id ); 8004030: 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; 8004034: 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 ); 8004038: 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) && 800403c: 55 82 00 05 bgu r12,r2,8004050 <_Objects_Shrink_information+0xb8> (index < (index_base + information->allocation_size))) { 8004040: 2d c3 00 14 lhu r3,(r14+20) 8004044: b5 83 18 00 add r3,r12,r3 8004048: 50 43 00 02 bgeu r2,r3,8004050 <_Objects_Shrink_information+0xb8> _Chain_Extract( &extract_me->Node ); 800404c: f8 00 15 0c calli 800947c <_Chain_Extract> } } while ( the_object ); 8004050: 45 a0 00 03 be r13,r0,800405c <_Objects_Shrink_information+0xc4> 8004054: b9 a0 08 00 mv r1,r13 8004058: e3 ff ff f6 bi 8004030 <_Objects_Shrink_information+0x98> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 800405c: 29 c1 00 34 lw r1,(r14+52) 8004060: b4 2b 08 00 add r1,r1,r11 8004064: 28 21 00 00 lw r1,(r1+0) 8004068: f8 00 07 de calli 8005fe0 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 800406c: 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; 8004070: 29 c1 00 34 lw r1,(r14+52) information->inactive_per_block[ block ] = 0; 8004074: 29 c4 00 30 lw r4,(r14+48) information->inactive -= information->allocation_size; 8004078: 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; 800407c: b4 2b 08 00 add r1,r1,r11 information->inactive_per_block[ block ] = 0; 8004080: b4 8b 58 00 add r11,r4,r11 information->inactive -= information->allocation_size; 8004084: 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; 8004088: 59 6d 00 00 sw (r11+0),r13 information->inactive -= information->allocation_size; 800408c: 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; 8004090: 58 2d 00 00 sw (r1+0),r13 return; } index_base += information->allocation_size; } } 8004094: 2b 9d 00 04 lw ra,(sp+4) 8004098: 2b 8b 00 14 lw r11,(sp+20) 800409c: 2b 8c 00 10 lw r12,(sp+16) 80040a0: 2b 8d 00 0c lw r13,(sp+12) 80040a4: 2b 8e 00 08 lw r14,(sp+8) 80040a8: 37 9c 00 14 addi sp,sp,20 80040ac: c3 a0 00 00 ret 08003d60 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 8003d60: 37 9c ff e0 addi sp,sp,-32 8003d64: 5b 8b 00 1c sw (sp+28),r11 8003d68: 5b 8c 00 18 sw (sp+24),r12 8003d6c: 5b 8d 00 14 sw (sp+20),r13 8003d70: 5b 8e 00 10 sw (sp+16),r14 8003d74: 5b 8f 00 0c sw (sp+12),r15 8003d78: 5b 90 00 08 sw (sp+8),r16 8003d7c: 5b 9d 00 04 sw (sp+4),ra 8003d80: b8 40 58 00 mv r11,r2 8003d84: b8 20 70 00 mv r14,r1 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 8003d88: 37 82 00 20 addi r2,sp,32 8003d8c: b9 60 08 00 mv r1,r11 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 8003d90: b8 60 78 00 mv r15,r3 8003d94: 20 8d 00 ff andi r13,r4,0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 8003d98: f8 00 00 90 calli 8003fd8 <_POSIX_Mutex_Get> 8003d9c: 44 20 00 0c be r1,r0,8003dcc <_POSIX_Condition_variables_Wait_support+0x6c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8003da0: 78 05 08 02 mvhi r5,0x802 8003da4: 38 a5 18 74 ori r5,r5,0x1874 8003da8: 28 a4 00 00 lw r4,(r5+0) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 8003dac: b9 c0 08 00 mv r1,r14 8003db0: 37 82 00 20 addi r2,sp,32 8003db4: 34 84 ff ff addi r4,r4,-1 8003db8: 58 a4 00 00 sw (r5+0),r4 8003dbc: fb ff ff 39 calli 8003aa0 <_POSIX_Condition_variables_Get> switch ( location ) { 8003dc0: 2b 85 00 20 lw r5,(sp+32) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 8003dc4: b8 20 60 00 mv r12,r1 switch ( location ) { 8003dc8: 44 a0 00 0c be r5,r0,8003df8 <_POSIX_Condition_variables_Wait_support+0x98> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 8003dcc: 34 0c 00 16 mvi r12,22 case OBJECTS_ERROR: break; } return EINVAL; } 8003dd0: b9 80 08 00 mv r1,r12 8003dd4: 2b 9d 00 04 lw ra,(sp+4) 8003dd8: 2b 8b 00 1c lw r11,(sp+28) 8003ddc: 2b 8c 00 18 lw r12,(sp+24) 8003de0: 2b 8d 00 14 lw r13,(sp+20) 8003de4: 2b 8e 00 10 lw r14,(sp+16) 8003de8: 2b 8f 00 0c lw r15,(sp+12) 8003dec: 2b 90 00 08 lw r16,(sp+8) 8003df0: 37 9c 00 20 addi sp,sp,32 8003df4: c3 a0 00 00 ret the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 8003df8: 28 21 00 14 lw r1,(r1+20) 8003dfc: 44 25 00 06 be r1,r5,8003e14 <_POSIX_Condition_variables_Wait_support+0xb4> 8003e00: 29 62 00 00 lw r2,(r11+0) 8003e04: 44 22 00 04 be r1,r2,8003e14 <_POSIX_Condition_variables_Wait_support+0xb4> _Thread_Enable_dispatch(); 8003e08: f8 00 0c a5 calli 800709c <_Thread_Enable_dispatch> 8003e0c: 34 0c 00 16 mvi r12,22 return EINVAL; 8003e10: e3 ff ff f0 bi 8003dd0 <_POSIX_Condition_variables_Wait_support+0x70> } (void) pthread_mutex_unlock( mutex ); 8003e14: b9 60 08 00 mv r1,r11 8003e18: f8 00 01 20 calli 8004298 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 8003e1c: 45 a0 00 07 be r13,r0,8003e38 <_POSIX_Condition_variables_Wait_support+0xd8> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 8003e20: f8 00 0c 9f calli 800709c <_Thread_Enable_dispatch> 8003e24: 34 0c 00 74 mvi r12,116 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 8003e28: b9 60 08 00 mv r1,r11 8003e2c: f8 00 00 e9 calli 80041d0 if ( mutex_status ) 8003e30: 44 20 ff e8 be r1,r0,8003dd0 <_POSIX_Condition_variables_Wait_support+0x70> 8003e34: e3 ff ff e6 bi 8003dcc <_POSIX_Condition_variables_Wait_support+0x6c> if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 8003e38: 78 10 08 02 mvhi r16,0x802 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 8003e3c: 29 61 00 00 lw r1,(r11+0) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 8003e40: 3a 10 19 30 ori r16,r16,0x1930 8003e44: 2a 04 00 00 lw r4,(r16+0) return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 8003e48: 59 81 00 14 sw (r12+20),r1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 8003e4c: 35 85 00 18 addi r5,r12,24 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 8003e50: 58 8d 00 34 sw (r4+52),r13 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 8003e54: 29 ce 00 00 lw r14,(r14+0) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8003e58: 34 01 00 01 mvi r1,1 _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003e5c: 78 03 08 00 mvhi r3,0x800 8003e60: 59 81 00 48 sw (r12+72),r1 8003e64: b9 e0 10 00 mv r2,r15 8003e68: b8 a0 08 00 mv r1,r5 the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 8003e6c: 58 8e 00 20 sw (r4+32),r14 _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003e70: 38 63 7b 44 ori r3,r3,0x7b44 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 8003e74: 58 85 00 44 sw (r4+68),r5 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003e78: f8 00 0d e5 calli 800760c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 8003e7c: f8 00 0c 88 calli 800709c <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 8003e80: 2a 01 00 00 lw r1,(r16+0) 8003e84: 28 2c 00 34 lw r12,(r1+52) if ( status && status != ETIMEDOUT ) 8003e88: 7d 82 00 74 cmpnei r2,r12,116 8003e8c: 7d 81 00 00 cmpnei r1,r12,0 8003e90: a0 41 08 00 and r1,r2,r1 8003e94: 44 2d ff e5 be r1,r13,8003e28 <_POSIX_Condition_variables_Wait_support+0xc8> 8003e98: e3 ff ff ce bi 8003dd0 <_POSIX_Condition_variables_Wait_support+0x70> <== NOT EXECUTED 080085cc <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 80085cc: 37 9c ff f8 addi sp,sp,-8 80085d0: 5b 8b 00 08 sw (sp+8),r11 80085d4: 5b 9d 00 04 sw (sp+4),ra 80085d8: b8 20 58 00 mv r11,r1 /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) 80085dc: 28 21 00 08 lw r1,(r1+8) 80085e0: 34 02 00 18 mvi r2,24 80085e4: fb ff df 2b calli 8000290 <__lshrsi3> 80085e8: 20 21 00 07 andi r1,r1,0x7 80085ec: 34 02 00 03 mvi r2,3 80085f0: 44 22 00 05 be r1,r2,8008604 <_POSIX_Threads_Exitted_extension+0x38> pthread_exit( executing->Wait.return_argument ); } 80085f4: 2b 9d 00 04 lw ra,(sp+4) 80085f8: 2b 8b 00 08 lw r11,(sp+8) 80085fc: 37 9c 00 08 addi sp,sp,8 8008600: c3 a0 00 00 ret /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 8008604: 29 61 00 28 lw r1,(r11+40) 8008608: f8 00 0d f3 calli 800bdd4 } 800860c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8008610: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8008614: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8008618: c3 a0 00 00 ret <== NOT EXECUTED 08002bbc <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 8002bbc: 37 9c ff f8 addi sp,sp,-8 8002bc0: 5b 8b 00 08 sw (sp+8),r11 8002bc4: 5b 9d 00 04 sw (sp+4),ra 8002bc8: b8 40 58 00 mv r11,r2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 8002bcc: 28 42 00 68 lw r2,(r2+104) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 8002bd0: 29 61 00 54 lw r1,(r11+84) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 8002bd4: 34 42 00 01 addi r2,r2,1 8002bd8: 59 62 00 68 sw (r11+104),r2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 8002bdc: 5c 20 00 0e bne r1,r0,8002c14 <_POSIX_Timer_TSR+0x58> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 8002be0: 29 62 00 58 lw r2,(r11+88) 8002be4: 5c 41 00 0c bne r2,r1,8002c14 <_POSIX_Timer_TSR+0x58> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 8002be8: 34 01 00 04 mvi r1,4 <== NOT EXECUTED 8002bec: 31 61 00 3c sb (r11+60),r1 <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 8002bf0: 29 61 00 38 lw r1,(r11+56) 8002bf4: 29 62 00 44 lw r2,(r11+68) 8002bf8: f8 00 15 9c calli 8008268 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 8002bfc: 34 01 00 00 mvi r1,0 8002c00: 59 61 00 68 sw (r11+104),r1 } 8002c04: 2b 9d 00 04 lw ra,(sp+4) 8002c08: 2b 8b 00 08 lw r11,(sp+8) 8002c0c: 37 9c 00 08 addi sp,sp,8 8002c10: c3 a0 00 00 ret ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 8002c14: 29 62 00 64 lw r2,(r11+100) 8002c18: 29 63 00 08 lw r3,(r11+8) 8002c1c: 78 04 08 00 mvhi r4,0x800 8002c20: 38 84 2b bc ori r4,r4,0x2bbc 8002c24: 35 61 00 10 addi r1,r11,16 8002c28: b9 60 28 00 mv r5,r11 8002c2c: f8 00 16 f8 calli 800880c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 8002c30: 44 20 ff f5 be r1,r0,8002c04 <_POSIX_Timer_TSR+0x48> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 8002c34: 35 61 00 6c addi r1,r11,108 8002c38: f8 00 03 46 calli 8003950 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002c3c: 34 01 00 03 mvi r1,3 8002c40: 31 61 00 3c sb (r11+60),r1 /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 8002c44: e3 ff ff eb bi 8002bf0 <_POSIX_Timer_TSR+0x34> 0800d094 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 800d094: 37 9c ff f0 addi sp,sp,-16 800d098: 5b 8b 00 10 sw (sp+16),r11 800d09c: 5b 8c 00 0c sw (sp+12),r12 800d0a0: 5b 8d 00 08 sw (sp+8),r13 800d0a4: 5b 9d 00 04 sw (sp+4),ra 800d0a8: b8 20 58 00 mv r11,r1 clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 800d0ac: 90 00 68 00 rcsr r13,IE 800d0b0: 34 01 ff fe mvi r1,-2 800d0b4: a1 a1 08 00 and r1,r13,r1 800d0b8: d0 01 00 00 wcsr IE,r1 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 800d0bc: b5 6b 08 00 add r1,r11,r11 800d0c0: 34 02 00 02 mvi r2,2 800d0c4: b4 2b 08 00 add r1,r1,r11 800d0c8: 78 0c 08 01 mvhi r12,0x801 800d0cc: fb ff cc 49 calli 80001f0 <__ashlsi3> 800d0d0: 39 8c ed b0 ori r12,r12,0xedb0 800d0d4: b5 81 60 00 add r12,r12,r1 800d0d8: 29 83 00 00 lw r3,(r12+0) 800d0dc: 34 02 00 02 mvi r2,2 800d0e0: 44 62 00 17 be r3,r2,800d13c <_POSIX_signals_Clear_process_signals+0xa8> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 800d0e4: 35 62 ff ff addi r2,r11,-1 800d0e8: 34 01 00 01 mvi r1,1 800d0ec: fb ff cc 41 calli 80001f0 <__ashlsi3> 800d0f0: 78 02 08 01 mvhi r2,0x801 800d0f4: 38 42 ef 7c ori r2,r2,0xef7c 800d0f8: 28 43 00 00 lw r3,(r2+0) 800d0fc: a4 20 08 00 not r1,r1 800d100: a0 23 08 00 and r1,r1,r3 800d104: 58 41 00 00 sw (r2+0),r1 if ( !_POSIX_signals_Pending ) 800d108: 5c 20 00 06 bne r1,r0,800d120 <_POSIX_signals_Clear_process_signals+0x8c> _Thread_Do_post_task_switch_extension--; 800d10c: 78 01 08 01 mvhi r1,0x801 800d110: 38 21 e9 44 ori r1,r1,0xe944 800d114: 28 22 00 00 lw r2,(r1+0) 800d118: 34 42 ff ff addi r2,r2,-1 800d11c: 58 22 00 00 sw (r1+0),r2 } _ISR_Enable( level ); 800d120: d0 0d 00 00 wcsr IE,r13 } 800d124: 2b 9d 00 04 lw ra,(sp+4) 800d128: 2b 8b 00 10 lw r11,(sp+16) 800d12c: 2b 8c 00 0c lw r12,(sp+12) 800d130: 2b 8d 00 08 lw r13,(sp+8) 800d134: 37 9c 00 10 addi sp,sp,16 800d138: c3 a0 00 00 ret ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 800d13c: 78 02 08 01 mvhi r2,0x801 800d140: 38 42 ef 80 ori r2,r2,0xef80 800d144: b4 22 08 00 add r1,r1,r2 800d148: 28 22 00 00 lw r2,(r1+0) 800d14c: 34 21 00 04 addi r1,r1,4 800d150: 44 41 ff e5 be r2,r1,800d0e4 <_POSIX_signals_Clear_process_signals+0x50> if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 800d154: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED } 800d158: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800d15c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800d160: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 800d164: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 800d168: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800d16c: c3 a0 00 00 ret <== NOT EXECUTED 080423e8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 80423e8: 37 9c ff f4 addi sp,sp,-12 80423ec: 5b 8b 00 08 sw (sp+8),r11 80423f0: 5b 9d 00 04 sw (sp+4),ra 80423f4: b8 20 10 00 mv r2,r1 80423f8: 78 01 08 07 mvhi r1,0x807 80423fc: 38 21 7b c0 ori r1,r1,0x7bc0 8042400: 37 83 00 0c addi r3,sp,12 8042404: fb ff 28 e7 calli 800c7a0 <_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 ) { 8042408: 2b 82 00 0c lw r2,(sp+12) 804240c: b8 20 58 00 mv r11,r1 8042410: 44 40 00 05 be r2,r0,8042424 <_Rate_monotonic_Timeout+0x3c> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8042414: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8042418: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 804241c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8042420: c3 a0 00 00 ret <== NOT EXECUTED */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; 8042424: 28 21 00 40 lw r1,(r1+64) if ( _States_Is_waiting_for_period( the_thread->current_state ) && 8042428: 28 23 00 10 lw r3,(r1+16) 804242c: 20 63 40 00 andi r3,r3,0x4000 8042430: 44 62 00 04 be r3,r2,8042440 <_Rate_monotonic_Timeout+0x58> the_thread->Wait.id == the_period->Object.id ) { 8042434: 28 23 00 20 lw r3,(r1+32) 8042438: 29 62 00 08 lw r2,(r11+8) 804243c: 44 62 00 1a be r3,r2,80424a4 <_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 ) { 8042440: 29 62 00 38 lw r2,(r11+56) 8042444: 34 01 00 01 mvi r1,1 8042448: 44 41 00 0c be r2,r1,8042478 <_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; 804244c: 34 01 00 04 mvi r1,4 8042450: 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; 8042454: 78 01 08 07 mvhi r1,0x807 8042458: 38 21 70 9c ori r1,r1,0x709c 804245c: 28 22 00 00 lw r2,(r1+0) 8042460: 34 42 ff ff addi r2,r2,-1 8042464: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8042468: 2b 9d 00 04 lw ra,(sp+4) 804246c: 2b 8b 00 08 lw r11,(sp+8) 8042470: 37 9c 00 0c addi sp,sp,12 8042474: 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; 8042478: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 804247c: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 8042480: b9 60 08 00 mv r1,r11 8042484: fb ff fe a7 calli 8041f20 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8042488: 29 61 00 3c lw r1,(r11+60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 804248c: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8042490: 59 61 00 1c sw (r11+28),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8042494: 78 01 08 07 mvhi r1,0x807 8042498: 38 21 71 78 ori r1,r1,0x7178 804249c: fb ff 30 fe calli 800e894 <_Watchdog_Insert> 80424a0: e3 ff ff ed bi 8042454 <_Rate_monotonic_Timeout+0x6c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 80424a4: 78 02 10 03 mvhi r2,0x1003 80424a8: 38 42 ff f8 ori r2,r2,0xfff8 80424ac: fb ff b2 68 calli 802ee4c <_Thread_Clear_state> 80424b0: e3 ff ff f4 bi 8042480 <_Rate_monotonic_Timeout+0x98> 08009730 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 8009730: 37 9c ff e4 addi sp,sp,-28 8009734: 5b 8b 00 0c sw (sp+12),r11 8009738: 5b 8c 00 08 sw (sp+8),r12 800973c: 5b 9d 00 04 sw (sp+4),ra 8009740: 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 ); 8009744: 90 00 60 00 rcsr r12,IE 8009748: 34 01 ff fe mvi r1,-2 800974c: a1 81 08 00 and r1,r12,r1 8009750: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 8009754: 78 02 08 01 mvhi r2,0x801 8009758: 38 42 e9 34 ori r2,r2,0xe934 if ( _Watchdog_Nanoseconds_since_tick_handler ) 800975c: 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; 8009760: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009764: 38 63 ea 44 ori r3,r3,0xea44 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8009768: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 800976c: 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; 8009770: 5b 81 00 14 sw (sp+20),r1 8009774: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009778: b8 60 20 00 mv r4,r3 800977c: 44 60 00 03 be r3,r0,8009788 <_TOD_Get+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8009780: d8 60 00 00 call r3 <== NOT EXECUTED 8009784: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8009788: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 800978c: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &now, &offset ); 8009790: 37 81 00 10 addi r1,sp,16 8009794: 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 ); 8009798: 5b 83 00 18 sw (sp+24),r3 800979c: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &now, &offset ); 80097a0: fb ff ef f3 calli 800576c <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 80097a4: 2b 81 00 14 lw r1,(sp+20) 80097a8: 59 61 00 04 sw (r11+4),r1 80097ac: 2b 81 00 10 lw r1,(sp+16) 80097b0: 59 61 00 00 sw (r11+0),r1 } 80097b4: 2b 9d 00 04 lw ra,(sp+4) 80097b8: 2b 8b 00 0c lw r11,(sp+12) 80097bc: 2b 8c 00 08 lw r12,(sp+8) 80097c0: 37 9c 00 1c addi sp,sp,28 80097c4: c3 a0 00 00 ret 080097c8 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 80097c8: 37 9c ff e4 addi sp,sp,-28 80097cc: 5b 8b 00 0c sw (sp+12),r11 80097d0: 5b 8c 00 08 sw (sp+8),r12 80097d4: 5b 9d 00 04 sw (sp+4),ra 80097d8: 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 ); 80097dc: 90 00 60 00 rcsr r12,IE 80097e0: 34 01 ff fe mvi r1,-2 80097e4: a1 81 08 00 and r1,r12,r1 80097e8: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 80097ec: 78 02 08 01 mvhi r2,0x801 80097f0: 38 42 e9 24 ori r2,r2,0xe924 if ( _Watchdog_Nanoseconds_since_tick_handler ) 80097f4: 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; 80097f8: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 80097fc: 38 63 ea 44 ori r3,r3,0xea44 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8009800: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009804: 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; 8009808: 5b 81 00 14 sw (sp+20),r1 800980c: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009810: b8 60 20 00 mv r4,r3 8009814: 44 60 00 03 be r3,r0,8009820 <_TOD_Get_uptime+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8009818: d8 60 00 00 call r3 <== NOT EXECUTED 800981c: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8009820: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8009824: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &up, &offset ); 8009828: 37 81 00 10 addi r1,sp,16 800982c: 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 ); 8009830: 5b 83 00 18 sw (sp+24),r3 8009834: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &up, &offset ); 8009838: fb ff ef cd calli 800576c <_Timespec_Add_to> *uptime = up; 800983c: 2b 81 00 14 lw r1,(sp+20) 8009840: 59 61 00 04 sw (r11+4),r1 8009844: 2b 81 00 10 lw r1,(sp+16) 8009848: 59 61 00 00 sw (r11+0),r1 } 800984c: 2b 9d 00 04 lw ra,(sp+4) 8009850: 2b 8b 00 0c lw r11,(sp+12) 8009854: 2b 8c 00 08 lw r12,(sp+8) 8009858: 37 9c 00 1c addi sp,sp,28 800985c: c3 a0 00 00 ret 080040b8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 80040b8: 37 9c ff ec addi sp,sp,-20 80040bc: 5b 8b 00 14 sw (sp+20),r11 80040c0: 5b 8c 00 10 sw (sp+16),r12 80040c4: 5b 8d 00 0c sw (sp+12),r13 80040c8: 5b 8e 00 08 sw (sp+8),r14 80040cc: 5b 9d 00 04 sw (sp+4),ra 80040d0: b8 20 58 00 mv r11,r1 */ /* * Save original state */ original_state = the_thread->current_state; 80040d4: 28 2d 00 10 lw r13,(r1+16) void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 80040d8: b8 40 60 00 mv r12,r2 80040dc: 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 ); 80040e0: f8 00 04 f3 calli 80054ac <_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 ) 80040e4: 29 61 00 14 lw r1,(r11+20) 80040e8: 44 2c 00 04 be r1,r12,80040f8 <_Thread_Change_priority+0x40> _Thread_Set_priority( the_thread, new_priority ); 80040ec: b9 80 10 00 mv r2,r12 80040f0: b9 60 08 00 mv r1,r11 80040f4: f8 00 04 49 calli 8005218 <_Thread_Set_priority> _ISR_Disable( level ); 80040f8: 90 00 60 00 rcsr r12,IE 80040fc: 34 02 ff fe mvi r2,-2 8004100: a1 82 10 00 and r2,r12,r2 8004104: 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; 8004108: 29 61 00 10 lw r1,(r11+16) if ( state != STATES_TRANSIENT ) { 800410c: 34 04 00 04 mvi r4,4 8004110: 44 24 00 21 be r1,r4,8004194 <_Thread_Change_priority+0xdc> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 8004114: a1 a4 68 00 and r13,r13,r4 8004118: 45 a0 00 0d be r13,r0,800414c <_Thread_Change_priority+0x94> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 800411c: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 8004120: 78 02 00 03 mvhi r2,0x3 <== NOT EXECUTED 8004124: 38 42 be e0 ori r2,r2,0xbee0 <== NOT EXECUTED 8004128: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 800412c: 5c 20 00 10 bne r1,r0,800416c <_Thread_Change_priority+0xb4> <== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 8004130: 2b 9d 00 04 lw ra,(sp+4) 8004134: 2b 8b 00 14 lw r11,(sp+20) 8004138: 2b 8c 00 10 lw r12,(sp+16) 800413c: 2b 8d 00 0c lw r13,(sp+12) 8004140: 2b 8e 00 08 lw r14,(sp+8) 8004144: 37 9c 00 14 addi sp,sp,20 8004148: 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 ); 800414c: 34 02 ff fb mvi r2,-5 8004150: a0 22 10 00 and r2,r1,r2 8004154: 59 62 00 10 sw (r11+16),r2 _ISR_Enable( level ); 8004158: d0 0c 00 00 wcsr IE,r12 if ( _States_Is_waiting_on_thread_queue( state ) ) { 800415c: 78 02 00 03 mvhi r2,0x3 8004160: 38 42 be e0 ori r2,r2,0xbee0 8004164: a0 22 08 00 and r1,r1,r2 8004168: 44 20 ff f2 be r1,r0,8004130 <_Thread_Change_priority+0x78> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 800416c: 29 61 00 44 lw r1,(r11+68) 8004170: b9 60 10 00 mv r2,r11 8004174: f8 00 03 ee calli 800512c <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 8004178: 2b 9d 00 04 lw ra,(sp+4) 800417c: 2b 8b 00 14 lw r11,(sp+20) 8004180: 2b 8c 00 10 lw r12,(sp+16) 8004184: 2b 8d 00 0c lw r13,(sp+12) 8004188: 2b 8e 00 08 lw r14,(sp+8) 800418c: 37 9c 00 14 addi sp,sp,20 8004190: c3 a0 00 00 ret } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 8004194: 21 ad 00 04 andi r13,r13,0x4 8004198: 45 a0 00 3a be r13,r0,8004280 <_Thread_Change_priority+0x1c8> 800419c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80041a0: 38 21 e9 54 ori r1,r1,0xe954 <== 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 ); 80041a4: d0 0c 00 00 wcsr IE,r12 80041a8: 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 ); 80041ac: 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; 80041b0: 78 02 08 01 mvhi r2,0x801 80041b4: 38 42 e8 30 ori r2,r2,0xe830 80041b8: 28 4e 00 00 lw r14,(r2+0) 80041bc: 20 21 ff ff andi r1,r1,0xffff 80041c0: 34 02 00 ff mvi r2,255 80041c4: 54 22 00 49 bgu r1,r2,80042e8 <_Thread_Change_priority+0x230> 80041c8: 78 0b 08 01 mvhi r11,0x801 80041cc: 39 6b ca 34 ori r11,r11,0xca34 80041d0: b5 61 08 00 add r1,r11,r1 80041d4: 40 2d 00 00 lbu r13,(r1+0) 80041d8: 35 ad 00 08 addi r13,r13,8 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 80041dc: 78 02 08 01 mvhi r2,0x801 80041e0: b5 ad 08 00 add r1,r13,r13 80041e4: 38 42 e9 d0 ori r2,r2,0xe9d0 80041e8: b4 41 10 00 add r2,r2,r1 80041ec: 2c 41 00 00 lhu r1,(r2+0) 80041f0: 34 02 00 ff mvi r2,255 80041f4: 54 22 00 38 bgu r1,r2,80042d4 <_Thread_Change_priority+0x21c> 80041f8: b5 61 58 00 add r11,r11,r1 80041fc: 41 6b 00 00 lbu r11,(r11+0) 8004200: 35 6b 00 08 addi r11,r11,8 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8004204: 34 02 00 04 mvi r2,4 8004208: b9 a0 08 00 mv r1,r13 800420c: fb ff ef f9 calli 80001f0 <__ashlsi3> 8004210: b5 61 08 00 add r1,r11,r1 8004214: b4 21 10 00 add r2,r1,r1 8004218: b4 41 08 00 add r1,r2,r1 800421c: 34 02 00 02 mvi r2,2 8004220: fb ff ef f4 calli 80001f0 <__ashlsi3> 8004224: 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 ); 8004228: 78 02 08 01 mvhi r2,0x801 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 800422c: 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 ); 8004230: 38 42 e9 60 ori r2,r2,0xe960 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8004234: 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 ); 8004238: 28 42 00 00 lw r2,(r2+0) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 800423c: 38 21 e9 30 ori r1,r1,0xe930 8004240: 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() && 8004244: 44 62 00 07 be r3,r2,8004260 <_Thread_Change_priority+0x1a8> _Thread_Executing->is_preemptible ) 8004248: 40 41 00 75 lbu r1,(r2+117) 800424c: 44 20 00 05 be r1,r0,8004260 <_Thread_Change_priority+0x1a8> _Context_Switch_necessary = true; 8004250: 78 01 08 01 mvhi r1,0x801 8004254: 38 21 e9 70 ori r1,r1,0xe970 8004258: 34 02 00 01 mvi r2,1 800425c: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 8004260: d0 0c 00 00 wcsr IE,r12 } 8004264: 2b 9d 00 04 lw ra,(sp+4) 8004268: 2b 8b 00 14 lw r11,(sp+20) 800426c: 2b 8c 00 10 lw r12,(sp+16) 8004270: 2b 8d 00 0c lw r13,(sp+12) 8004274: 2b 8e 00 08 lw r14,(sp+8) 8004278: 37 9c 00 14 addi sp,sp,20 800427c: 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; 8004280: 29 63 00 90 lw r3,(r11+144) 8004284: 2d 64 00 96 lhu r4,(r11+150) _Priority_Major_bit_map |= the_priority_map->ready_major; 8004288: 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; 800428c: 2c 65 00 00 lhu r5,(r3+0) _Priority_Major_bit_map |= the_priority_map->ready_major; 8004290: 38 21 e9 54 ori r1,r1,0xe954 * 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 ); 8004294: 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; 8004298: b8 a4 20 00 or r4,r5,r4 800429c: 0c 64 00 00 sh (r3+0),r4 _Priority_Major_bit_map |= the_priority_map->ready_major; 80042a0: 2c 23 00 00 lhu r3,(r1+0) 80042a4: 2d 64 00 94 lhu r4,(r11+148) 80042a8: b8 83 18 00 or r3,r4,r3 80042ac: 20 63 ff ff andi r3,r3,0xffff 80042b0: 0c 23 00 00 sh (r1+0),r3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 80042b4: 45 cd 00 14 be r14,r13,8004304 <_Thread_Change_priority+0x24c> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 80042b8: 29 63 00 8c lw r3,(r11+140) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 80042bc: 28 64 00 00 lw r4,(r3+0) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 80042c0: 59 63 00 04 sw (r11+4),r3 before_node = after_node->next; after_node->next = the_node; 80042c4: 58 6b 00 00 sw (r3+0),r11 the_node->next = before_node; before_node->previous = the_node; 80042c8: 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; 80042cc: 59 64 00 00 sw (r11+0),r4 80042d0: e3 ff ff b5 bi 80041a4 <_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 ); 80042d4: 34 02 00 08 mvi r2,8 80042d8: fb ff ef ee calli 8000290 <__lshrsi3> 80042dc: b5 61 08 00 add r1,r11,r1 80042e0: 40 2b 00 00 lbu r11,(r1+0) 80042e4: e3 ff ff c8 bi 8004204 <_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 ); 80042e8: 34 02 00 08 mvi r2,8 80042ec: 78 0b 08 01 mvhi r11,0x801 80042f0: fb ff ef e8 calli 8000290 <__lshrsi3> 80042f4: 39 6b ca 34 ori r11,r11,0xca34 80042f8: b5 61 08 00 add r1,r11,r1 80042fc: 40 2d 00 00 lbu r13,(r1+0) 8004300: e3 ff ff b7 bi 80041dc <_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 ); 8004304: 29 63 00 8c lw r3,(r11+140) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8004308: 34 64 00 04 addi r4,r3,4 800430c: 59 64 00 00 sw (r11+0),r4 old_last_node = the_chain->last; 8004310: 28 64 00 08 lw r4,(r3+8) the_chain->last = the_node; 8004314: 58 6b 00 08 sw (r3+8),r11 old_last_node->next = the_node; the_node->previous = old_last_node; 8004318: 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; 800431c: 58 8b 00 00 sw (r4+0),r11 8004320: e3 ff ff a1 bi 80041a4 <_Thread_Change_priority+0xec> 08004aa0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 8004aa0: 37 9c ff f0 addi sp,sp,-16 8004aa4: 5b 8b 00 10 sw (sp+16),r11 8004aa8: 5b 8c 00 0c sw (sp+12),r12 8004aac: 5b 8d 00 08 sw (sp+8),r13 8004ab0: 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; 8004ab4: 78 01 08 01 mvhi r1,0x801 8004ab8: 38 21 e0 c4 ori r1,r1,0xe0c4 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004abc: 28 22 00 20 lw r2,(r1+32) 8004ac0: 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; 8004ac4: 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) 8004ac8: 64 42 00 00 cmpei r2,r2,0 8004acc: 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; 8004ad0: 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) 8004ad4: 99 22 48 00 xor r9,r9,r2 8004ad8: b9 20 58 00 mv r11,r9 8004adc: 5d 20 00 37 bne r9,r0,8004bb8 <_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( 8004ae0: 78 0c 08 01 mvhi r12,0x801 8004ae4: 39 8c e0 c0 ori r12,r12,0xe0c0 8004ae8: 41 81 00 00 lbu r1,(r12+0) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004aec: 78 08 08 01 mvhi r8,0x801 _Thread_Executing = NULL; 8004af0: 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( 8004af4: 34 21 00 01 addi r1,r1,1 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004af8: 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; 8004afc: 78 03 08 01 mvhi r3,0x801 _Thread_Maximum_extensions = maximum_extensions; 8004b00: 78 07 08 01 mvhi r7,0x801 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004b04: 78 06 08 01 mvhi r6,0x801 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004b08: 38 84 e9 30 ori r4,r4,0xe930 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004b0c: 38 63 e9 44 ori r3,r3,0xe944 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004b10: 38 c6 e8 34 ori r6,r6,0xe834 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004b14: 39 08 e9 70 ori r8,r8,0xe970 _Thread_Executing = NULL; 8004b18: 38 a5 e9 60 ori r5,r5,0xe960 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004b1c: 38 e7 e9 40 ori r7,r7,0xe940 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004b20: 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; 8004b24: 58 ca 00 00 sw (r6+0),r10 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004b28: 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; 8004b2c: 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( 8004b30: b4 41 08 00 add r1,r2,r1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004b34: 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( 8004b38: 34 02 00 02 mvi r2,2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004b3c: 58 ed 00 00 sw (r7+0),r13 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; 8004b40: 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( 8004b44: fb ff ed ab calli 80001f0 <__ashlsi3> 8004b48: f8 00 05 0c calli 8005f78 <_Workspace_Allocate_or_fatal_error> 8004b4c: 78 03 08 01 mvhi r3,0x801 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004b50: 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( 8004b54: 38 63 e8 30 ori r3,r3,0xe830 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004b58: 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( 8004b5c: 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; 8004b60: 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); 8004b64: 34 23 00 04 addi r3,r1,4 8004b68: 58 23 00 00 sw (r1+0),r3 the_chain->permanent_null = NULL; 8004b6c: 58 26 00 04 sw (r1+4),r6 the_chain->last = _Chain_Head(the_chain); 8004b70: 58 21 00 08 sw (r1+8),r1 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004b74: 34 42 00 01 addi r2,r2,1 8004b78: 34 21 00 0c addi r1,r1,12 8004b7c: 50 82 ff fa bgeu r4,r2,8004b64 <_Thread_Handler_initialization+0xc4> /* * Initialize this class of objects. */ _Objects_Initialize_information( 8004b80: 34 02 00 01 mvi r2,1 8004b84: 78 01 08 01 mvhi r1,0x801 8004b88: 38 21 ea 00 ori r1,r1,0xea00 8004b8c: b8 40 18 00 mv r3,r2 8004b90: b8 40 20 00 mv r4,r2 8004b94: 34 05 01 3c mvi r5,316 8004b98: 34 07 00 08 mvi r7,8 8004b9c: fb ff fc 83 calli 8003da8 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 8004ba0: 2b 9d 00 04 lw ra,(sp+4) 8004ba4: 2b 8b 00 10 lw r11,(sp+16) 8004ba8: 2b 8c 00 0c lw r12,(sp+12) 8004bac: 2b 8d 00 08 lw r13,(sp+8) 8004bb0: 37 9c 00 10 addi sp,sp,16 8004bb4: 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( 8004bb8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004bbc: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004bc0: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 8004bc4: fb ff fa d3 calli 8003710 <_Internal_error_Occurred> <== NOT EXECUTED 0800619c <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 800619c: 37 9c ff f0 addi sp,sp,-16 80061a0: 5b 8b 00 08 sw (sp+8),r11 80061a4: 5b 9d 00 04 sw (sp+4),ra if ( !_States_Is_dormant( the_thread->current_state ) ) { 80061a8: 28 25 00 10 lw r5,(r1+16) 80061ac: 34 04 00 00 mvi r4,0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 80061b0: b8 20 58 00 mv r11,r1 if ( !_States_Is_dormant( the_thread->current_state ) ) { 80061b4: 20 a5 00 01 andi r5,r5,0x1 80061b8: 44 a4 00 06 be r5,r4,80061d0 <_Thread_Restart+0x34> return true; } return false; } 80061bc: b8 80 08 00 mv r1,r4 80061c0: 2b 9d 00 04 lw ra,(sp+4) 80061c4: 2b 8b 00 08 lw r11,(sp+8) 80061c8: 37 9c 00 10 addi sp,sp,16 80061cc: c3 a0 00 00 ret Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 80061d0: 5b 82 00 10 sw (sp+16),r2 80061d4: 5b 83 00 0c sw (sp+12),r3 80061d8: f8 00 00 b9 calli 80064bc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 80061dc: 2b 82 00 10 lw r2,(sp+16) 80061e0: 2b 83 00 0c lw r3,(sp+12) 80061e4: b9 60 08 00 mv r1,r11 80061e8: f8 00 15 70 calli 800b7a8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 80061ec: b9 60 08 00 mv r1,r11 80061f0: f8 00 14 35 calli 800b2c4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 80061f4: b9 60 08 00 mv r1,r11 80061f8: f8 00 15 08 calli 800b618 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 80061fc: b9 60 08 00 mv r1,r11 8006200: f8 00 02 7b calli 8006bec <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 8006204: 78 01 08 02 mvhi r1,0x802 8006208: 38 21 39 b8 ori r1,r1,0x39b8 800620c: 28 21 00 00 lw r1,(r1+0) 8006210: 34 04 00 01 mvi r4,1 8006214: 5d 61 ff ea bne r11,r1,80061bc <_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 ); 8006218: 35 61 00 d0 addi r1,r11,208 800621c: f8 00 04 16 calli 8007274 <_CPU_Context_restore> 8006220: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 8006224: e3 ff ff e6 bi 80061bc <_Thread_Restart+0x20> <== NOT EXECUTED 08004bc8 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004bc8: 37 9c ff f8 addi sp,sp,-8 8004bcc: 5b 8b 00 08 sw (sp+8),r11 8004bd0: 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 ) 8004bd4: 28 22 00 34 lw r2,(r1+52) */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004bd8: 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 ) 8004bdc: 34 01 00 01 mvi r1,1 8004be0: 44 41 00 0f be r2,r1,8004c1c <_Thread_queue_Dequeue+0x54> 8004be4: 78 02 08 00 mvhi r2,0x800 8004be8: 38 42 a0 fc ori r2,r2,0xa0fc 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 ); 8004bec: b9 60 08 00 mv r1,r11 8004bf0: d8 40 00 00 call r2 _ISR_Disable( level ); 8004bf4: 90 00 10 00 rcsr r2,IE 8004bf8: 34 03 ff fe mvi r3,-2 8004bfc: a0 43 18 00 and r3,r2,r3 8004c00: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004c04: 44 20 00 0f be r1,r0,8004c40 <_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 ); 8004c08: d0 02 00 00 wcsr IE,r2 return the_thread; } 8004c0c: 2b 9d 00 04 lw ra,(sp+4) 8004c10: 2b 8b 00 08 lw r11,(sp+8) 8004c14: 37 9c 00 08 addi sp,sp,8 8004c18: 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 ) 8004c1c: 78 02 08 00 mvhi r2,0x800 8004c20: 38 42 4c 68 ori r2,r2,0x4c68 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 ); 8004c24: b9 60 08 00 mv r1,r11 8004c28: d8 40 00 00 call r2 _ISR_Disable( level ); 8004c2c: 90 00 10 00 rcsr r2,IE 8004c30: 34 03 ff fe mvi r3,-2 8004c34: a0 43 18 00 and r3,r2,r3 8004c38: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004c3c: 5c 20 ff f3 bne r1,r0,8004c08 <_Thread_queue_Dequeue+0x40> sync_state = the_thread_queue->sync_state; 8004c40: 29 64 00 30 lw r4,(r11+48) 8004c44: 34 03 00 01 mvi r3,1 8004c48: 34 84 ff ff addi r4,r4,-1 8004c4c: 54 83 ff ef bgu r4,r3,8004c08 <_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; 8004c50: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8004c54: 38 21 e9 60 ori r1,r1,0xe960 <== 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; 8004c58: 34 03 00 03 mvi r3,3 <== NOT EXECUTED the_thread = _Thread_Executing; 8004c5c: 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; 8004c60: 59 63 00 30 sw (r11+48),r3 <== NOT EXECUTED 8004c64: e3 ff ff e9 bi 8004c08 <_Thread_queue_Dequeue+0x40> <== NOT EXECUTED 08004e70 <_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 ) { 8004e70: 37 9c ff ec addi sp,sp,-20 8004e74: 5b 8b 00 14 sw (sp+20),r11 8004e78: 5b 8c 00 10 sw (sp+16),r12 8004e7c: 5b 8d 00 0c sw (sp+12),r13 8004e80: 5b 8e 00 08 sw (sp+8),r14 8004e84: 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; 8004e88: 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 ) { 8004e8c: 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); 8004e90: 34 44 00 3c addi r4,r2,60 8004e94: 59 84 00 38 sw (r12+56),r4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8004e98: 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; 8004e9c: 34 04 00 00 mvi r4,0 8004ea0: b8 20 68 00 mv r13,r1 8004ea4: 59 84 00 3c sw (r12+60),r4 the_chain->last = _Chain_Head(the_chain); 8004ea8: 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 ]; 8004eac: b9 60 08 00 mv r1,r11 8004eb0: 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 ) { 8004eb4: 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 ]; 8004eb8: fb ff ec f6 calli 8000290 <__lshrsi3> 8004ebc: b4 21 10 00 add r2,r1,r1 8004ec0: b4 41 08 00 add r1,r2,r1 8004ec4: 34 02 00 02 mvi r2,2 8004ec8: fb ff ec ca calli 80001f0 <__ashlsi3> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 8004ecc: 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 ]; 8004ed0: b5 a1 40 00 add r8,r13,r1 block_state = the_thread_queue->state; 8004ed4: 29 a6 00 38 lw r6,(r13+56) if ( _Thread_queue_Is_reverse_search( priority ) ) 8004ed8: 5c 40 00 25 bne r2,r0,8004f6c <_Thread_queue_Enqueue_priority+0xfc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8004edc: 35 01 00 04 addi r1,r8,4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 8004ee0: 34 0a ff fe mvi r10,-2 8004ee4: 90 00 10 00 rcsr r2,IE 8004ee8: a0 4a 48 00 and r9,r2,r10 8004eec: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->first; 8004ef0: 29 04 00 00 lw r4,(r8+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004ef4: 44 81 00 69 be r4,r1,8005098 <_Thread_queue_Enqueue_priority+0x228> search_priority = search_thread->current_priority; 8004ef8: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004efc: 50 ab 00 10 bgeu r5,r11,8004f3c <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004f00: d0 02 00 00 wcsr IE,r2 8004f04: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004f08: 28 83 00 10 lw r3,(r4+16) 8004f0c: a0 c3 18 00 and r3,r6,r3 8004f10: 5c 60 00 09 bne r3,r0,8004f34 <_Thread_queue_Enqueue_priority+0xc4> 8004f14: e0 00 00 43 bi 8005020 <_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; 8004f18: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004f1c: 50 ab 00 08 bgeu r5,r11,8004f3c <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004f20: d0 02 00 00 wcsr IE,r2 8004f24: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004f28: 28 87 00 10 lw r7,(r4+16) 8004f2c: a0 c7 38 00 and r7,r6,r7 8004f30: 44 e0 00 3c be r7,r0,8005020 <_Thread_queue_Enqueue_priority+0x1b0> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 8004f34: 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 ) ) { 8004f38: 5c 81 ff f8 bne r4,r1,8004f18 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004f3c: 29 a1 00 30 lw r1,(r13+48) 8004f40: 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; 8004f44: b8 40 18 00 mv r3,r2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004f48: 44 26 00 38 be r1,r6,8005028 <_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; 8004f4c: 59 c3 00 00 sw (r14+0),r3 <== NOT EXECUTED return the_thread_queue->sync_state; } 8004f50: 2b 9d 00 04 lw ra,(sp+4) 8004f54: 2b 8b 00 14 lw r11,(sp+20) 8004f58: 2b 8c 00 10 lw r12,(sp+16) 8004f5c: 2b 8d 00 0c lw r13,(sp+12) 8004f60: 2b 8e 00 08 lw r14,(sp+8) 8004f64: 37 9c 00 14 addi sp,sp,20 8004f68: c3 a0 00 00 ret 8004f6c: 78 01 08 01 mvhi r1,0x801 8004f70: 38 21 e0 c0 ori r1,r1,0xe0c0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 8004f74: 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; 8004f78: 40 25 00 00 lbu r5,(r1+0) 8004f7c: 34 a5 00 01 addi r5,r5,1 _ISR_Disable( level ); 8004f80: 90 00 38 00 rcsr r7,IE 8004f84: a0 e3 48 00 and r9,r7,r3 8004f88: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->last; 8004f8c: 29 04 00 08 lw r4,(r8+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004f90: 5c 88 00 04 bne r4,r8,8004fa0 <_Thread_queue_Enqueue_priority+0x130> 8004f94: e0 00 00 0c bi 8004fc4 <_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 *) 8004f98: 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 ) ) { 8004f9c: 45 04 00 0a be r8,r4,8004fc4 <_Thread_queue_Enqueue_priority+0x154> search_priority = search_thread->current_priority; 8004fa0: 28 85 00 14 lw r5,(r4+20) if ( priority >= search_priority ) 8004fa4: 51 65 00 08 bgeu r11,r5,8004fc4 <_Thread_queue_Enqueue_priority+0x154> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8004fa8: d0 07 00 00 wcsr IE,r7 8004fac: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004fb0: 28 82 00 10 lw r2,(r4+16) 8004fb4: a0 c2 10 00 and r2,r6,r2 8004fb8: 5c 40 ff f8 bne r2,r0,8004f98 <_Thread_queue_Enqueue_priority+0x128> _ISR_Enable( level ); 8004fbc: d0 07 00 00 wcsr IE,r7 <== NOT EXECUTED goto restart_reverse_search; 8004fc0: e3 ff ff ee bi 8004f78 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8004fc4: 29 a1 00 30 lw r1,(r13+48) 8004fc8: 34 02 00 01 mvi r2,1 8004fcc: b8 e0 18 00 mv r3,r7 8004fd0: 5c 22 ff df bne r1,r2,8004f4c <_Thread_queue_Enqueue_priority+0xdc> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004fd4: 34 01 00 00 mvi r1,0 8004fd8: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8004fdc: b8 e0 10 00 mv r2,r7 8004fe0: 45 65 00 24 be r11,r5,8005070 <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8004fe4: 28 81 00 00 lw r1,(r4+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8004fe8: 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; 8004fec: 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; 8004ff0: 59 81 00 00 sw (r12+0),r1 the_node->previous = search_node; search_node->next = the_node; 8004ff4: 58 8c 00 00 sw (r4+0),r12 next_node->previous = the_node; 8004ff8: 58 2c 00 04 sw (r1+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004ffc: d0 07 00 00 wcsr IE,r7 8005000: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8005004: 2b 9d 00 04 lw ra,(sp+4) 8005008: 2b 8b 00 14 lw r11,(sp+20) 800500c: 2b 8c 00 10 lw r12,(sp+16) 8005010: 2b 8d 00 0c lw r13,(sp+12) 8005014: 2b 8e 00 08 lw r14,(sp+8) 8005018: 37 9c 00 14 addi sp,sp,20 800501c: 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 ); 8005020: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED goto restart_forward_search; 8005024: e3 ff ff b0 bi 8004ee4 <_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; 8005028: 34 01 00 00 mvi r1,0 800502c: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8005030: 45 65 00 10 be r11,r5,8005070 <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 8005034: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8005038: 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; 800503c: 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; 8005040: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8005044: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8005048: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 800504c: d0 02 00 00 wcsr IE,r2 8005050: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8005054: 2b 9d 00 04 lw ra,(sp+4) 8005058: 2b 8b 00 14 lw r11,(sp+20) 800505c: 2b 8c 00 10 lw r12,(sp+16) 8005060: 2b 8d 00 0c lw r13,(sp+12) 8005064: 2b 8e 00 08 lw r14,(sp+8) 8005068: 37 9c 00 14 addi sp,sp,20 800506c: c3 a0 00 00 ret 8005070: 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; 8005074: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8005078: 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; 800507c: 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; 8005080: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8005084: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8005088: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 800508c: d0 02 00 00 wcsr IE,r2 8005090: 34 01 00 01 mvi r1,1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8005094: e3 ff ff af bi 8004f50 <_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 ) ) { 8005098: 34 05 ff ff mvi r5,-1 800509c: e3 ff ff a8 bi 8004f3c <_Thread_queue_Enqueue_priority+0xcc> 0800512c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 800512c: 37 9c ff ec addi sp,sp,-20 8005130: 5b 8b 00 10 sw (sp+16),r11 8005134: 5b 8c 00 0c sw (sp+12),r12 8005138: 5b 8d 00 08 sw (sp+8),r13 800513c: 5b 9d 00 04 sw (sp+4),ra 8005140: b8 20 58 00 mv r11,r1 8005144: 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 ) 8005148: 44 20 00 04 be r1,r0,8005158 <_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 ) { 800514c: 28 22 00 34 lw r2,(r1+52) 8005150: 34 01 00 01 mvi r1,1 8005154: 44 41 00 07 be r2,r1,8005170 <_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 ); } } 8005158: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800515c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8005160: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8005164: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8005168: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800516c: 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 ); 8005170: 90 00 68 00 rcsr r13,IE 8005174: 34 01 ff fe mvi r1,-2 8005178: a1 a1 08 00 and r1,r13,r1 800517c: d0 01 00 00 wcsr IE,r1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 8005180: 29 82 00 10 lw r2,(r12+16) 8005184: 78 01 00 03 mvhi r1,0x3 8005188: 38 21 be e0 ori r1,r1,0xbee0 800518c: a0 41 08 00 and r1,r2,r1 8005190: 5c 20 00 08 bne r1,r0,80051b0 <_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 ); 8005194: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED } } 8005198: 2b 9d 00 04 lw ra,(sp+4) 800519c: 2b 8b 00 10 lw r11,(sp+16) 80051a0: 2b 8c 00 0c lw r12,(sp+12) 80051a4: 2b 8d 00 08 lw r13,(sp+8) 80051a8: 37 9c 00 14 addi sp,sp,20 80051ac: c3 a0 00 00 ret 80051b0: 34 03 00 01 mvi r3,1 80051b4: 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 ); 80051b8: b9 60 08 00 mv r1,r11 80051bc: b9 80 10 00 mv r2,r12 80051c0: f8 00 14 25 calli 800a254 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 80051c4: b9 60 08 00 mv r1,r11 80051c8: b9 80 10 00 mv r2,r12 80051cc: 37 83 00 14 addi r3,sp,20 80051d0: fb ff ff 28 calli 8004e70 <_Thread_queue_Enqueue_priority> } _ISR_Enable( level ); 80051d4: d0 0d 00 00 wcsr IE,r13 80051d8: e3 ff ff f0 bi 8005198 <_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 04 mvhi r20,0x804 8014438: 78 13 08 04 mvhi r19,0x804 801443c: 78 19 08 04 mvhi r25,0x804 */ 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 0d fc ori r20,r20,0xdfc 8014468: 3a 73 0d 3c ori r19,r19,0xd3c 801446c: 3b 39 0c ac ori r25,r25,0xcac 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 df calli 8019c1c <_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 d8 calli 8019c1c <_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 34 calli 8015198 <_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 f8 calli 8019cc4 <_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 2b calli 8015198 <_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 15 81 calli 8019b24 <_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 e5 calli 8019cc4 <_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 12 38 calli 8018e88 <_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 bf calli 80180b8 <_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 16 25 calli 8019e60 <_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 16 23 calli 8019e60 <_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 db calli 8015168 <_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 04 mvhi r2,0x804 8014614: 38 42 0c ac ori r2,r2,0xcac 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 a0 calli 80180b8 <_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 04 mvhi r2,0x804 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 0d 3c ori r2,r2,0xd3c */ 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 85 calli 8019cc4 <_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 7d calli 80180b8 <_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 04 mvhi r3,0x804 80146e0: 38 63 0d fc ori r3,r3,0xdfc */ 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 15 68 calli 8019cc4 <_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 0e 60 calli 80180b8 <_Thread_Enable_dispatch> 801473c: e3 ff ff c0 bi 801463c <_Timer_server_Schedule_operation_method+0x60> 08007fb8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 8007fb8: 37 9c ff e4 addi sp,sp,-28 8007fbc: 5b 8b 00 1c sw (sp+28),r11 8007fc0: 5b 8c 00 18 sw (sp+24),r12 8007fc4: 5b 8d 00 14 sw (sp+20),r13 8007fc8: 5b 8e 00 10 sw (sp+16),r14 8007fcc: 5b 8f 00 0c sw (sp+12),r15 8007fd0: 5b 90 00 08 sw (sp+8),r16 8007fd4: 5b 9d 00 04 sw (sp+4),ra 8007fd8: b8 20 60 00 mv r12,r1 8007fdc: b8 60 58 00 mv r11,r3 ISR_Level level; _ISR_Disable( level ); 8007fe0: 90 00 20 00 rcsr r4,IE 8007fe4: 34 01 ff fe mvi r1,-2 8007fe8: a0 81 08 00 and r1,r4,r1 8007fec: 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)); 8007ff0: 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; 8007ff4: 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 ) ) { 8007ff8: 44 2e 00 04 be r1,r14,8008008 <_Watchdog_Adjust+0x50> switch ( direction ) { 8007ffc: 44 40 00 11 be r2,r0,8008040 <_Watchdog_Adjust+0x88> 8008000: 34 03 00 01 mvi r3,1 8008004: 44 43 00 0b be r2,r3,8008030 <_Watchdog_Adjust+0x78> } break; } } _ISR_Enable( level ); 8008008: d0 04 00 00 wcsr IE,r4 } 800800c: 2b 9d 00 04 lw ra,(sp+4) 8008010: 2b 8b 00 1c lw r11,(sp+28) 8008014: 2b 8c 00 18 lw r12,(sp+24) 8008018: 2b 8d 00 14 lw r13,(sp+20) 800801c: 2b 8e 00 10 lw r14,(sp+16) 8008020: 2b 8f 00 0c lw r15,(sp+12) 8008024: 2b 90 00 08 lw r16,(sp+8) 8008028: 37 9c 00 1c addi sp,sp,28 800802c: 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; 8008030: 28 22 00 10 lw r2,(r1+16) 8008034: b4 4b 58 00 add r11,r2,r11 8008038: 58 2b 00 10 sw (r1+16),r11 break; 800803c: e3 ff ff f3 bi 8008008 <_Watchdog_Adjust+0x50> case WATCHDOG_FORWARD: while ( units ) { 8008040: 44 62 ff f2 be r3,r2,8008008 <_Watchdog_Adjust+0x50> if ( units < _Watchdog_First( header )->delta_interval ) { 8008044: 28 2d 00 10 lw r13,(r1+16) _Watchdog_First( header )->delta_interval -= units; break; 8008048: b8 80 18 00 mv r3,r4 } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 800804c: 34 10 00 01 mvi r16,1 _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 8008050: 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 ) { 8008054: 51 6d 00 02 bgeu r11,r13,800805c <_Watchdog_Adjust+0xa4> 8008058: e0 00 00 11 bi 800809c <_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; 800805c: 58 30 00 10 sw (r1+16),r16 _ISR_Enable( level ); 8008060: d0 03 00 00 wcsr IE,r3 _Watchdog_Tickle( header ); 8008064: b9 80 08 00 mv r1,r12 8008068: f8 00 00 b0 calli 8008328 <_Watchdog_Tickle> _ISR_Disable( level ); 800806c: 90 00 10 00 rcsr r2,IE 8008070: a0 4f 08 00 and r1,r2,r15 8008074: 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)); 8008078: 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; 800807c: 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 ) { 8008080: b8 40 18 00 mv r3,r2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8008084: b8 80 08 00 mv r1,r4 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 8008088: 45 c4 00 08 be r14,r4,80080a8 <_Watchdog_Adjust+0xf0> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 800808c: 45 60 00 07 be r11,r0,80080a8 <_Watchdog_Adjust+0xf0> if ( units < _Watchdog_First( header )->delta_interval ) { 8008090: 28 2d 00 10 lw r13,(r1+16) 8008094: 51 6d ff f2 bgeu r11,r13,800805c <_Watchdog_Adjust+0xa4> 8008098: b8 60 20 00 mv r4,r3 _Watchdog_First( header )->delta_interval -= units; 800809c: c9 ab 58 00 sub r11,r13,r11 80080a0: 58 2b 00 10 sw (r1+16),r11 break; 80080a4: e3 ff ff d9 bi 8008008 <_Watchdog_Adjust+0x50> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 80080a8: b8 40 20 00 mv r4,r2 80080ac: e3 ff ff d7 bi 8008008 <_Watchdog_Adjust+0x50> 08005e88 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 8005e88: 37 9c ff e4 addi sp,sp,-28 8005e8c: 5b 8b 00 1c sw (sp+28),r11 8005e90: 5b 8c 00 18 sw (sp+24),r12 8005e94: 5b 8d 00 14 sw (sp+20),r13 8005e98: 5b 8e 00 10 sw (sp+16),r14 8005e9c: 5b 8f 00 0c sw (sp+12),r15 8005ea0: 5b 90 00 08 sw (sp+8),r16 8005ea4: 5b 9d 00 04 sw (sp+4),ra 8005ea8: 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 ); 8005eac: 90 00 68 00 rcsr r13,IE 8005eb0: 34 01 ff fe mvi r1,-2 8005eb4: a1 a1 08 00 and r1,r13,r1 8005eb8: 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)); 8005ebc: 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; 8005ec0: 35 8e 00 04 addi r14,r12,4 if ( _Chain_Is_empty( header ) ) 8005ec4: 45 6e 00 2b be r11,r14,8005f70 <_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) { 8005ec8: 29 61 00 10 lw r1,(r11+16) 8005ecc: 5c 20 00 26 bne r1,r0,8005f64 <_Watchdog_Tickle+0xdc> do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) { 8005ed0: 34 10 00 02 mvi r16,2 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005ed4: 34 0f ff fe mvi r15,-2 8005ed8: e0 00 00 0a bi 8005f00 <_Watchdog_Tickle+0x78> 8005edc: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8005ee0: a0 4f 08 00 and r1,r2,r15 <== NOT EXECUTED 8005ee4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8005ee8: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8005eec: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8005ef0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005ef4: 45 c1 00 12 be r14,r1,8005f3c <_Watchdog_Tickle+0xb4> <== NOT EXECUTED 8005ef8: 28 21 00 10 lw r1,(r1+16) 8005efc: 5c 20 00 10 bne r1,r0,8005f3c <_Watchdog_Tickle+0xb4> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 8005f00: b9 60 08 00 mv r1,r11 8005f04: fb ff ff aa calli 8005dac <_Watchdog_Remove> _ISR_Enable( level ); 8005f08: d0 0d 00 00 wcsr IE,r13 switch( watchdog_state ) { 8005f0c: 5c 30 ff f4 bne r1,r16,8005edc <_Watchdog_Tickle+0x54> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 8005f10: 29 62 00 24 lw r2,(r11+36) 8005f14: 29 63 00 1c lw r3,(r11+28) 8005f18: 29 61 00 20 lw r1,(r11+32) 8005f1c: d8 60 00 00 call r3 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005f20: 90 00 10 00 rcsr r2,IE 8005f24: a0 4f 08 00 and r1,r2,r15 8005f28: d0 01 00 00 wcsr IE,r1 8005f2c: 29 81 00 00 lw r1,(r12+0) 8005f30: b8 40 68 00 mv r13,r2 8005f34: b8 20 58 00 mv r11,r1 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005f38: 5d c1 ff f0 bne r14,r1,8005ef8 <_Watchdog_Tickle+0x70> leave: _ISR_Enable(level); 8005f3c: d0 02 00 00 wcsr IE,r2 } 8005f40: 2b 9d 00 04 lw ra,(sp+4) 8005f44: 2b 8b 00 1c lw r11,(sp+28) 8005f48: 2b 8c 00 18 lw r12,(sp+24) 8005f4c: 2b 8d 00 14 lw r13,(sp+20) 8005f50: 2b 8e 00 10 lw r14,(sp+16) 8005f54: 2b 8f 00 0c lw r15,(sp+12) 8005f58: 2b 90 00 08 lw r16,(sp+8) 8005f5c: 37 9c 00 1c addi sp,sp,28 8005f60: 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--; 8005f64: 34 21 ff ff addi r1,r1,-1 8005f68: 59 61 00 10 sw (r11+16),r1 if ( the_watchdog->delta_interval != 0 ) 8005f6c: 44 20 ff d9 be r1,r0,8005ed0 <_Watchdog_Tickle+0x48> _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005f70: b9 a0 10 00 mv r2,r13 8005f74: e3 ff ff f2 bi 8005f3c <_Watchdog_Tickle+0xb4> 08005f78 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 8005f78: 37 9c ff fc addi sp,sp,-4 8005f7c: 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 ); 8005f80: 34 03 00 00 mvi r3,0 8005f84: b8 20 10 00 mv r2,r1 8005f88: 78 01 08 01 mvhi r1,0x801 8005f8c: 38 21 e8 c8 ori r1,r1,0xe8c8 8005f90: b8 60 20 00 mv r4,r3 8005f94: f8 00 0e 33 calli 8009860 <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 8005f98: 44 20 00 04 be r1,r0,8005fa8 <_Workspace_Allocate_or_fatal_error+0x30> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 8005f9c: 2b 9d 00 04 lw ra,(sp+4) 8005fa0: 37 9c 00 04 addi sp,sp,4 8005fa4: c3 a0 00 00 ret memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( 8005fa8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005fac: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 8005fb0: fb ff f5 d8 calli 8003710 <_Internal_error_Occurred> <== NOT EXECUTED 0800cd94 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 800cd94: 37 9c ff d8 addi sp,sp,-40 800cd98: 5b 8b 00 1c sw (sp+28),r11 800cd9c: 5b 8c 00 18 sw (sp+24),r12 800cda0: 5b 8d 00 14 sw (sp+20),r13 800cda4: 5b 8e 00 10 sw (sp+16),r14 800cda8: 5b 8f 00 0c sw (sp+12),r15 800cdac: 5b 90 00 08 sw (sp+8),r16 800cdb0: 5b 9d 00 04 sw (sp+4),ra 800cdb4: b8 20 58 00 mv r11,r1 800cdb8: b8 40 60 00 mv r12,r2 800cdbc: b8 60 78 00 mv r15,r3 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 800cdc0: fb ff fa 9a calli 800b828 800cdc4: 5c 2b 00 a9 bne r1,r11,800d068 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 800cdc8: 45 80 00 04 be r12,r0,800cdd8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 800cdcc: 35 8b ff ff addi r11,r12,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 800cdd0: 34 01 00 1f mvi r1,31 800cdd4: 50 2b 00 06 bgeu r1,r11,800cdec rtems_set_errno_and_return_minus_one( EINVAL ); 800cdd8: f8 00 01 f4 calli 800d5a8 <__errno> 800cddc: 34 02 00 16 mvi r2,22 800cde0: 58 22 00 00 sw (r1+0),r2 800cde4: 34 01 ff ff mvi r1,-1 800cde8: e0 00 00 50 bi 800cf28 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 800cdec: b5 8c 80 00 add r16,r12,r12 800cdf0: 34 02 00 02 mvi r2,2 800cdf4: 78 0d 08 01 mvhi r13,0x801 800cdf8: b6 0c 08 00 add r1,r16,r12 800cdfc: fb ff cc fd calli 80001f0 <__ashlsi3> 800ce00: 39 ad ed b0 ori r13,r13,0xedb0 800ce04: b5 a1 08 00 add r1,r13,r1 800ce08: 28 22 00 08 lw r2,(r1+8) 800ce0c: 34 0e 00 01 mvi r14,1 800ce10: 34 01 00 00 mvi r1,0 800ce14: 44 4e 00 45 be r2,r14,800cf28 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 800ce18: 65 82 00 04 cmpei r2,r12,4 800ce1c: 65 81 00 08 cmpei r1,r12,8 800ce20: b8 41 08 00 or r1,r2,r1 800ce24: 5c 20 00 4a bne r1,r0,800cf4c 800ce28: 34 01 00 0b mvi r1,11 800ce2c: 45 81 00 48 be r12,r1,800cf4c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 800ce30: b9 60 10 00 mv r2,r11 800ce34: b9 c0 08 00 mv r1,r14 800ce38: fb ff cc ee calli 80001f0 <__ashlsi3> /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 800ce3c: 5b 8e 00 24 sw (sp+36),r14 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 800ce40: 5b 8c 00 20 sw (sp+32),r12 800ce44: b8 20 58 00 mv r11,r1 siginfo->si_code = SI_USER; if ( !value ) { 800ce48: 45 e0 00 02 be r15,r0,800ce50 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 800ce4c: 29 ef 00 00 lw r15,(r15+0) 800ce50: 78 02 08 01 mvhi r2,0x801 800ce54: 5b 8f 00 28 sw (sp+40),r15 800ce58: 38 42 e8 a4 ori r2,r2,0xe8a4 800ce5c: 28 41 00 00 lw r1,(r2+0) 800ce60: 34 21 00 01 addi r1,r1,1 800ce64: 58 41 00 00 sw (r2+0),r1 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 800ce68: 78 02 08 01 mvhi r2,0x801 800ce6c: 38 42 e9 60 ori r2,r2,0xe960 800ce70: 28 41 00 00 lw r1,(r2+0) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800ce74: 28 22 01 2c lw r2,(r1+300) 800ce78: 28 42 00 cc lw r2,(r2+204) 800ce7c: a4 40 10 00 not r2,r2 800ce80: a1 62 10 00 and r2,r11,r2 800ce84: 5c 40 00 17 bne r2,r0,800cee0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 800ce88: 78 05 08 01 mvhi r5,0x801 800ce8c: 38 a5 ef 3c ori r5,r5,0xef3c 800ce90: 28 a3 00 00 lw r3,(r5+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800ce94: 34 a5 00 04 addi r5,r5,4 800ce98: 44 65 00 42 be r3,r5,800cfa0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800ce9c: 28 62 00 30 lw r2,(r3+48) for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 800cea0: b8 60 08 00 mv r1,r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800cea4: 28 64 01 2c lw r4,(r3+300) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800cea8: a1 62 10 00 and r2,r11,r2 800ceac: 44 40 00 09 be r2,r0,800ced0 800ceb0: e0 00 00 0c bi 800cee0 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 800ceb4: 28 63 00 00 lw r3,(r3+0) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 800ceb8: 44 65 00 3a be r3,r5,800cfa0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800cebc: 28 62 00 30 lw r2,(r3+48) <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800cec0: 28 64 01 2c lw r4,(r3+300) <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 800cec4: b8 60 08 00 mv r1,r3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800cec8: a1 62 10 00 and r2,r11,r2 <== NOT EXECUTED 800cecc: 5c 40 00 05 bne r2,r0,800cee0 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 800ced0: 28 84 00 cc lw r4,(r4+204) 800ced4: a4 80 20 00 not r4,r4 800ced8: a1 64 20 00 and r4,r11,r4 800cedc: 44 82 ff f6 be r4,r2,800ceb4 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 800cee0: 34 02 00 01 mvi r2,1 800cee4: 30 22 00 74 sb (r1+116),r2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 800cee8: 37 83 00 20 addi r3,sp,32 800ceec: b9 80 10 00 mv r2,r12 800cef0: f8 00 00 b1 calli 800d1b4 <_POSIX_signals_Unblock_thread> 800cef4: 5c 20 00 0b bne r1,r0,800cf20 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 800cef8: b9 60 08 00 mv r1,r11 800cefc: f8 00 00 9d calli 800d170 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 800cf00: 34 02 00 02 mvi r2,2 800cf04: b6 0c 08 00 add r1,r16,r12 800cf08: fb ff cc ba calli 80001f0 <__ashlsi3> 800cf0c: b5 a1 68 00 add r13,r13,r1 800cf10: 29 a2 00 00 lw r2,(r13+0) 800cf14: b8 20 58 00 mv r11,r1 800cf18: 34 01 00 02 mvi r1,2 800cf1c: 44 41 00 10 be r2,r1,800cf5c _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 800cf20: fb ff dd f1 calli 80046e4 <_Thread_Enable_dispatch> 800cf24: 34 01 00 00 mvi r1,0 return 0; } 800cf28: 2b 9d 00 04 lw ra,(sp+4) 800cf2c: 2b 8b 00 1c lw r11,(sp+28) 800cf30: 2b 8c 00 18 lw r12,(sp+24) 800cf34: 2b 8d 00 14 lw r13,(sp+20) 800cf38: 2b 8e 00 10 lw r14,(sp+16) 800cf3c: 2b 8f 00 0c lw r15,(sp+12) 800cf40: 2b 90 00 08 lw r16,(sp+8) 800cf44: 37 9c 00 28 addi sp,sp,40 800cf48: c3 a0 00 00 ret * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 800cf4c: f8 00 01 4e calli 800d484 800cf50: b9 80 10 00 mv r2,r12 800cf54: f8 00 00 fd calli 800d348 800cf58: e3 ff ff f4 bi 800cf28 */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 800cf5c: 78 01 08 01 mvhi r1,0x801 800cf60: 38 21 ef 30 ori r1,r1,0xef30 800cf64: fb ff f1 50 calli 80094a4 <_Chain_Get> 800cf68: b8 20 18 00 mv r3,r1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 800cf6c: 44 20 00 44 be r1,r0,800d07c _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 800cf70: 2b 81 00 20 lw r1,(sp+32) 800cf74: 58 61 00 08 sw (r3+8),r1 800cf78: 2b 82 00 24 lw r2,(sp+36) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 800cf7c: 78 01 08 01 mvhi r1,0x801 800cf80: 38 21 ef 80 ori r1,r1,0xef80 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 800cf84: 58 62 00 0c sw (r3+12),r2 800cf88: 2b 84 00 28 lw r4,(sp+40) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 800cf8c: b5 61 08 00 add r1,r11,r1 800cf90: b8 60 10 00 mv r2,r3 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 800cf94: 58 64 00 10 sw (r3+16),r4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 800cf98: fb ff d7 84 calli 8002da8 <_Chain_Append> 800cf9c: e3 ff ff e1 bi 800cf20 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 800cfa0: 78 01 08 01 mvhi r1,0x801 800cfa4: 38 21 e0 c0 ori r1,r1,0xe0c0 800cfa8: 40 26 00 00 lbu r6,(r1+0) 800cfac: 78 07 08 01 mvhi r7,0x801 800cfb0: 38 e7 e8 44 ori r7,r7,0xe844 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800cfb4: 78 0a 10 00 mvhi r10,0x1000 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 800cfb8: 34 c6 00 01 addi r6,r6,1 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800cfbc: 39 4a 00 00 ori r10,r10,0x0 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 800cfc0: 34 ee 00 0c addi r14,r7,12 800cfc4: 34 01 00 00 mvi r1,0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 800cfc8: 28 e2 00 00 lw r2,(r7+0) 800cfcc: 44 40 00 1d be r2,r0,800d040 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 800cfd0: 28 42 00 04 lw r2,(r2+4) */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 800cfd4: 2c 48 00 10 lhu r8,(r2+16) object_table = the_info->local_table; 800cfd8: 28 44 00 1c lw r4,(r2+28) for ( index = 1 ; index <= maximum ; index++ ) { 800cfdc: 45 00 00 19 be r8,r0,800d040 800cfe0: 34 03 00 01 mvi r3,1 the_thread = (Thread_Control *) object_table[ index ]; 800cfe4: 28 82 00 04 lw r2,(r4+4) #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 800cfe8: 34 63 00 01 addi r3,r3,1 800cfec: 34 84 00 04 addi r4,r4,4 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 800cff0: 44 40 00 13 be r2,r0,800d03c /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 800cff4: 28 45 00 14 lw r5,(r2+20) 800cff8: 54 a6 00 11 bgu r5,r6,800d03c DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800cffc: 28 49 01 2c lw r9,(r2+300) 800d000: 29 29 00 cc lw r9,(r9+204) 800d004: a5 20 48 00 not r9,r9 800d008: a1 69 48 00 and r9,r11,r9 800d00c: 45 20 00 0c be r9,r0,800d03c * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 800d010: 54 c5 00 09 bgu r6,r5,800d034 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 800d014: 28 29 00 10 lw r9,(r1+16) 800d018: 45 20 00 09 be r9,r0,800d03c /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 800d01c: 28 4f 00 10 lw r15,(r2+16) continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800d020: a1 2a 48 00 and r9,r9,r10 */ if ( !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 800d024: 45 e0 00 04 be r15,r0,800d034 DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 800d028: a1 ea 78 00 and r15,r15,r10 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800d02c: 5d 20 00 04 bne r9,r0,800d03c DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 800d030: 45 e9 00 03 be r15,r9,800d03c 800d034: b8 a0 30 00 mv r6,r5 800d038: b8 40 08 00 mv r1,r2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 800d03c: 51 03 ff ea bgeu r8,r3,800cfe4 800d040: 34 e7 00 04 addi r7,r7,4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 800d044: 5c ee ff e1 bne r7,r14,800cfc8 } } } } if ( interested ) { 800d048: 44 20 ff ac be r1,r0,800cef8 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 800d04c: 34 02 00 01 mvi r2,1 800d050: 30 22 00 74 sb (r1+116),r2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 800d054: 37 83 00 20 addi r3,sp,32 800d058: b9 80 10 00 mv r2,r12 800d05c: f8 00 00 56 calli 800d1b4 <_POSIX_signals_Unblock_thread> 800d060: 44 20 ff a6 be r1,r0,800cef8 800d064: e3 ff ff af bi 800cf20 <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 800d068: f8 00 01 50 calli 800d5a8 <__errno> 800d06c: 34 02 00 03 mvi r2,3 800d070: 58 22 00 00 sw (r1+0),r2 800d074: 34 01 ff ff mvi r1,-1 800d078: e3 ff ff ac bi 800cf28 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 800d07c: fb ff dd 9a calli 80046e4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 800d080: f8 00 01 4a calli 800d5a8 <__errno> 800d084: 34 02 00 0b mvi r2,11 800d088: 58 22 00 00 sw (r1+0),r2 800d08c: 34 01 ff ff mvi r1,-1 800d090: e3 ff ff a6 bi 800cf28 0800bdd4 : void pthread_exit( void *value_ptr ) { 800bdd4: 37 9c ff fc addi sp,sp,-4 800bdd8: 5b 9d 00 04 sw (sp+4),ra _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 800bddc: 78 03 08 01 mvhi r3,0x801 800bde0: 38 63 e9 60 ori r3,r3,0xe960 } void pthread_exit( void *value_ptr ) { 800bde4: b8 20 10 00 mv r2,r1 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 800bde8: 28 61 00 00 lw r1,(r3+0) 800bdec: fb ff ff d4 calli 800bd3c <_POSIX_Thread_Exit> } 800bdf0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bdf4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800bdf8: c3 a0 00 00 ret <== NOT EXECUTED 08006314 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 8006314: 37 9c ff dc addi sp,sp,-36 8006318: 5b 8b 00 18 sw (sp+24),r11 800631c: 5b 8c 00 14 sw (sp+20),r12 8006320: 5b 8d 00 10 sw (sp+16),r13 8006324: 5b 8e 00 0c sw (sp+12),r14 8006328: 5b 8f 00 08 sw (sp+8),r15 800632c: 5b 9d 00 04 sw (sp+4),ra int rc; /* * Check all the parameters */ if ( !param ) 8006330: 34 0c 00 16 mvi r12,22 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 8006334: b8 60 58 00 mv r11,r3 8006338: b8 20 68 00 mv r13,r1 800633c: b8 40 70 00 mv r14,r2 int rc; /* * Check all the parameters */ if ( !param ) 8006340: 44 60 00 08 be r3,r0,8006360 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 8006344: b8 40 08 00 mv r1,r2 8006348: 37 84 00 20 addi r4,sp,32 800634c: b8 60 10 00 mv r2,r3 8006350: 37 83 00 24 addi r3,sp,36 8006354: f8 00 19 ba calli 800ca3c <_POSIX_Thread_Translate_sched_param> 8006358: b8 20 60 00 mv r12,r1 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 800635c: 44 20 00 0a be r1,r0,8006384 case OBJECTS_ERROR: break; } return ESRCH; } 8006360: b9 80 08 00 mv r1,r12 8006364: 2b 9d 00 04 lw ra,(sp+4) 8006368: 2b 8b 00 18 lw r11,(sp+24) 800636c: 2b 8c 00 14 lw r12,(sp+20) 8006370: 2b 8d 00 10 lw r13,(sp+16) 8006374: 2b 8e 00 0c lw r14,(sp+12) 8006378: 2b 8f 00 08 lw r15,(sp+8) 800637c: 37 9c 00 24 addi sp,sp,36 8006380: c3 a0 00 00 ret 8006384: 78 01 08 02 mvhi r1,0x802 8006388: 38 21 4a c4 ori r1,r1,0x4ac4 800638c: b9 a0 10 00 mv r2,r13 8006390: 37 83 00 1c addi r3,sp,28 8006394: f8 00 07 1a calli 8007ffc <_Objects_Get> 8006398: b8 20 78 00 mv r15,r1 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 800639c: 2b 81 00 1c lw r1,(sp+28) 80063a0: 44 2c 00 03 be r1,r12,80063ac 80063a4: 34 0c 00 03 mvi r12,3 80063a8: e3 ff ff ee bi 8006360 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 80063ac: 29 ed 01 2c lw r13,(r15+300) if ( api->schedpolicy == SCHED_SPORADIC ) 80063b0: 34 01 00 04 mvi r1,4 80063b4: 29 a2 00 80 lw r2,(r13+128) 80063b8: 44 41 00 32 be r2,r1,8006480 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 80063bc: 2b 82 00 24 lw r2,(sp+36) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 80063c0: 59 ae 00 80 sw (r13+128),r14 api->schedparam = *param; 80063c4: 29 61 00 00 lw r1,(r11+0) the_thread->budget_algorithm = budget_algorithm; 80063c8: 59 e2 00 7c sw (r15+124),r2 the_thread->budget_callout = budget_callout; 80063cc: 2b 82 00 20 lw r2,(sp+32) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 80063d0: 59 a1 00 84 sw (r13+132),r1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 80063d4: 59 e2 00 80 sw (r15+128),r2 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 80063d8: 29 62 00 04 lw r2,(r11+4) 80063dc: 59 a2 00 88 sw (r13+136),r2 80063e0: 29 62 00 08 lw r2,(r11+8) 80063e4: 59 a2 00 8c sw (r13+140),r2 80063e8: 29 62 00 0c lw r2,(r11+12) 80063ec: 59 a2 00 90 sw (r13+144),r2 80063f0: 29 62 00 10 lw r2,(r11+16) 80063f4: 59 a2 00 94 sw (r13+148),r2 80063f8: 29 62 00 14 lw r2,(r11+20) 80063fc: 59 a2 00 98 sw (r13+152),r2 8006400: 29 6b 00 18 lw r11,(r11+24) 8006404: 59 ab 00 9c sw (r13+156),r11 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 8006408: 48 0e 00 05 bg r0,r14,800641c 800640c: 34 02 00 02 mvi r2,2 8006410: 4c 4e 00 0d bge r2,r14,8006444 8006414: 34 02 00 04 mvi r2,4 8006418: 45 c2 00 03 be r14,r2,8006424 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 800641c: f8 00 09 63 calli 80089a8 <_Thread_Enable_dispatch> <== NOT EXECUTED return 0; 8006420: e3 ff ff d0 bi 8006360 <== NOT EXECUTED true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 8006424: 59 a1 00 a0 sw (r13+160),r1 _Watchdog_Remove( &api->Sporadic_timer ); 8006428: 35 a1 00 a4 addi r1,r13,164 800642c: f8 00 0f 5b calli 800a198 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 8006430: b9 e0 10 00 mv r2,r15 8006434: 34 01 00 00 mvi r1,0 8006438: fb ff ff 90 calli 8006278 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); 800643c: f8 00 09 5b calli 80089a8 <_Thread_Enable_dispatch> 8006440: e3 ff ff c8 bi 8006360 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 8006444: 78 01 08 02 mvhi r1,0x802 8006448: 38 21 48 54 ori r1,r1,0x4854 800644c: 28 21 00 00 lw r1,(r1+0) 8006450: 29 a2 00 84 lw r2,(r13+132) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 8006454: 34 03 00 01 mvi r3,1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 8006458: 59 e1 00 78 sw (r15+120),r1 800645c: 78 01 08 02 mvhi r1,0x802 8006460: 38 21 40 e4 ori r1,r1,0x40e4 8006464: 40 24 00 00 lbu r4,(r1+0) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 8006468: b9 e0 08 00 mv r1,r15 800646c: c8 82 10 00 sub r2,r4,r2 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; the_thread->real_priority = 8006470: 59 e2 00 18 sw (r15+24),r2 _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 8006474: f8 00 07 c2 calli 800837c <_Thread_Change_priority> _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 8006478: f8 00 09 4c calli 80089a8 <_Thread_Enable_dispatch> 800647c: e3 ff ff b9 bi 8006360 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 8006480: 35 a1 00 a4 addi r1,r13,164 8006484: f8 00 0f 45 calli 800a198 <_Watchdog_Remove> 8006488: e3 ff ff cd bi 80063bc 08003058 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 8003058: 37 9c ff f8 addi sp,sp,-8 800305c: 5b 8b 00 08 sw (sp+8),r11 8003060: 5b 9d 00 04 sw (sp+4),ra * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 8003064: 78 01 08 02 mvhi r1,0x802 8003068: 38 21 08 f4 ori r1,r1,0x8f4 800306c: 28 22 00 00 lw r2,(r1+0) 8003070: 5c 40 00 12 bne r2,r0,80030b8 8003074: 78 01 08 02 mvhi r1,0x802 8003078: 38 21 08 5c ori r1,r1,0x85c return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 800307c: 78 0b 08 02 mvhi r11,0x802 8003080: 28 23 00 00 lw r3,(r1+0) 8003084: 39 6b 09 18 ori r11,r11,0x918 8003088: 29 64 00 00 lw r4,(r11+0) 800308c: 34 63 00 01 addi r3,r3,1 8003090: 58 23 00 00 sw (r1+0),r3 8003094: 28 83 01 2c lw r3,(r4+300) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 8003098: 28 61 00 d4 lw r1,(r3+212) 800309c: 5c 22 00 0b bne r1,r2,80030c8 thread_support->cancelation_requested ) 80030a0: 28 62 00 dc lw r2,(r3+220) 80030a4: 44 41 00 09 be r2,r1,80030c8 cancel = true; _Thread_Enable_dispatch(); 80030a8: f8 00 08 2b calli 8005154 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 80030ac: 29 61 00 00 lw r1,(r11+0) 80030b0: 34 02 ff ff mvi r2,-1 80030b4: f8 00 18 92 calli 80092fc <_POSIX_Thread_Exit> } 80030b8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80030bc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80030c0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80030c4: c3 a0 00 00 ret <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 80030c8: f8 00 08 23 calli 8005154 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); } 80030cc: 2b 9d 00 04 lw ra,(sp+4) 80030d0: 2b 8b 00 08 lw r11,(sp+8) 80030d4: 37 9c 00 08 addi sp,sp,8 80030d8: c3 a0 00 00 ret 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 04 mvhi r2,0x804 <== NOT EXECUTED 800fe4c: 38 42 0e 4c ori r2,r2,0xe4c <== 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 08004e08 : 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 ) { 8004e08: 37 9c ff ec addi sp,sp,-20 8004e0c: 5b 8b 00 10 sw (sp+16),r11 8004e10: 5b 8c 00 0c sw (sp+12),r12 8004e14: 5b 8d 00 08 sw (sp+8),r13 8004e18: 5b 9d 00 04 sw (sp+4),ra rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e1c: 78 04 08 02 mvhi r4,0x802 8004e20: 38 84 69 dc ori r4,r4,0x69dc 8004e24: 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; 8004e28: 78 04 08 02 mvhi r4,0x802 8004e2c: 38 84 72 7c ori r4,r4,0x727c 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 ) { 8004e30: b8 20 58 00 mv r11,r1 8004e34: b8 40 60 00 mv r12,r2 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e38: 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; 8004e3c: 28 82 00 00 lw r2,(r4+0) if ( rtems_interrupt_is_in_progress() ) 8004e40: 5c a0 00 08 bne r5,r0,8004e60 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 8004e44: 44 65 00 52 be r3,r5,8004f8c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 8004e48: 58 62 00 00 sw (r3+0),r2 if ( driver_table == NULL ) 8004e4c: 45 80 00 50 be r12,r0,8004f8c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004e50: 29 81 00 00 lw r1,(r12+0) 8004e54: 44 20 00 4c be r1,r0,8004f84 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 8004e58: 54 4b 00 08 bgu r2,r11,8004e78 8004e5c: 34 01 00 0a mvi r1,10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004e60: 2b 9d 00 04 lw ra,(sp+4) 8004e64: 2b 8b 00 10 lw r11,(sp+16) 8004e68: 2b 8c 00 0c lw r12,(sp+12) 8004e6c: 2b 8d 00 08 lw r13,(sp+8) 8004e70: 37 9c 00 14 addi sp,sp,20 8004e74: c3 a0 00 00 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8004e78: 78 01 08 02 mvhi r1,0x802 8004e7c: 38 21 69 44 ori r1,r1,0x6944 8004e80: 28 22 00 00 lw r2,(r1+0) 8004e84: 34 42 00 01 addi r2,r2,1 8004e88: 58 22 00 00 sw (r1+0),r2 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 8004e8c: 5d 60 00 2a bne r11,r0,8004f34 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 8004e90: 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 ) { 8004e94: 44 8b 00 48 be r4,r11,8004fb4 8004e98: 78 01 08 02 mvhi r1,0x802 8004e9c: 38 21 72 80 ori r1,r1,0x7280 8004ea0: 28 2d 00 00 lw r13,(r1+0) 8004ea4: 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; 8004ea8: 28 22 00 00 lw r2,(r1+0) 8004eac: 44 40 00 3f be r2,r0,8004fa8 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 ) { 8004eb0: 35 6b 00 01 addi r11,r11,1 8004eb4: 34 21 00 18 addi r1,r1,24 8004eb8: 54 8b ff fc bgu r4,r11,8004ea8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004ebc: 58 6b 00 00 sw (r3+0),r11 if ( m != n ) 8004ec0: 44 8b 00 3e be r4,r11,8004fb8 8004ec4: b5 6b 08 00 add r1,r11,r11 8004ec8: b4 2b 08 00 add r1,r1,r11 8004ecc: 34 02 00 03 mvi r2,3 8004ed0: fb ff ef 45 calli 8000be4 <__ashlsi3> 8004ed4: b5 a1 08 00 add r1,r13,r1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 8004ed8: 29 82 00 00 lw r2,(r12+0) 8004edc: 58 22 00 00 sw (r1+0),r2 8004ee0: 29 82 00 04 lw r2,(r12+4) 8004ee4: 58 22 00 04 sw (r1+4),r2 8004ee8: 29 82 00 08 lw r2,(r12+8) 8004eec: 58 22 00 08 sw (r1+8),r2 8004ef0: 29 82 00 0c lw r2,(r12+12) 8004ef4: 58 22 00 0c sw (r1+12),r2 8004ef8: 29 82 00 10 lw r2,(r12+16) 8004efc: 58 22 00 10 sw (r1+16),r2 8004f00: 29 8c 00 14 lw r12,(r12+20) 8004f04: 58 2c 00 14 sw (r1+20),r12 _Thread_Enable_dispatch(); 8004f08: f8 00 07 eb calli 8006eb4 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 8004f0c: 34 02 00 00 mvi r2,0 8004f10: b9 60 08 00 mv r1,r11 8004f14: b8 40 18 00 mv r3,r2 8004f18: f8 00 2b b4 calli 800fde8 } 8004f1c: 2b 9d 00 04 lw ra,(sp+4) 8004f20: 2b 8b 00 10 lw r11,(sp+16) 8004f24: 2b 8c 00 0c lw r12,(sp+12) 8004f28: 2b 8d 00 08 lw r13,(sp+8) 8004f2c: 37 9c 00 14 addi sp,sp,20 8004f30: 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; 8004f34: b5 6b 08 00 add r1,r11,r11 8004f38: 34 02 00 03 mvi r2,3 8004f3c: 78 0d 08 02 mvhi r13,0x802 8004f40: b4 2b 08 00 add r1,r1,r11 8004f44: 5b 83 00 14 sw (sp+20),r3 8004f48: 39 ad 72 80 ori r13,r13,0x7280 8004f4c: fb ff ef 26 calli 8000be4 <__ashlsi3> 8004f50: 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; 8004f54: 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; 8004f58: 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; 8004f5c: 28 22 00 00 lw r2,(r1+0) 8004f60: 44 40 00 19 be r2,r0,8004fc4 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(); 8004f64: f8 00 07 d4 calli 8006eb4 <_Thread_Enable_dispatch> 8004f68: 34 01 00 0c mvi r1,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004f6c: 2b 9d 00 04 lw ra,(sp+4) 8004f70: 2b 8b 00 10 lw r11,(sp+16) 8004f74: 2b 8c 00 0c lw r12,(sp+12) 8004f78: 2b 8d 00 08 lw r13,(sp+8) 8004f7c: 37 9c 00 14 addi sp,sp,20 8004f80: 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; 8004f84: 29 85 00 04 lw r5,(r12+4) 8004f88: 5c a1 ff b4 bne r5,r1,8004e58 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 8004f8c: 34 01 00 09 mvi r1,9 } 8004f90: 2b 9d 00 04 lw ra,(sp+4) 8004f94: 2b 8b 00 10 lw r11,(sp+16) 8004f98: 2b 8c 00 0c lw r12,(sp+12) 8004f9c: 2b 8d 00 08 lw r13,(sp+8) 8004fa0: 37 9c 00 14 addi sp,sp,20 8004fa4: 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; 8004fa8: 28 25 00 04 lw r5,(r1+4) 8004fac: 5c a2 ff c1 bne r5,r2,8004eb0 8004fb0: e3 ff ff c3 bi 8004ebc if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004fb4: 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(); 8004fb8: f8 00 07 bf calli 8006eb4 <_Thread_Enable_dispatch> 8004fbc: 34 01 00 05 mvi r1,5 return sc; 8004fc0: e3 ff ff a8 bi 8004e60 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004fc4: 28 24 00 04 lw r4,(r1+4) 8004fc8: 5c 82 ff e7 bne r4,r2,8004f64 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 8004fcc: 58 6b 00 00 sw (r3+0),r11 8004fd0: e3 ff ff c2 bi 8004ed8 080421dc : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 80421dc: 37 9c ff e0 addi sp,sp,-32 80421e0: 5b 8b 00 18 sw (sp+24),r11 80421e4: 5b 8c 00 14 sw (sp+20),r12 80421e8: 5b 8d 00 10 sw (sp+16),r13 80421ec: 5b 8e 00 0c sw (sp+12),r14 80421f0: 5b 8f 00 08 sw (sp+8),r15 80421f4: 5b 9d 00 04 sw (sp+4),ra 80421f8: b8 20 70 00 mv r14,r1 80421fc: 78 01 08 07 mvhi r1,0x807 8042200: b8 40 68 00 mv r13,r2 8042204: 38 21 7b c0 ori r1,r1,0x7bc0 8042208: b9 c0 10 00 mv r2,r14 804220c: 37 83 00 20 addi r3,sp,32 8042210: fb ff 29 64 calli 800c7a0 <_Objects_Get> 8042214: 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 ) { 8042218: 2b 81 00 20 lw r1,(sp+32) 804221c: 44 20 00 0a be r1,r0,8042244 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 8042220: 34 01 00 04 mvi r1,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8042224: 2b 9d 00 04 lw ra,(sp+4) 8042228: 2b 8b 00 18 lw r11,(sp+24) 804222c: 2b 8c 00 14 lw r12,(sp+20) 8042230: 2b 8d 00 10 lw r13,(sp+16) 8042234: 2b 8e 00 0c lw r14,(sp+12) 8042238: 2b 8f 00 08 lw r15,(sp+8) 804223c: 37 9c 00 20 addi sp,sp,32 8042240: c3 a0 00 00 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 8042244: 78 0c 08 07 mvhi r12,0x807 8042248: 39 8c 71 58 ori r12,r12,0x7158 804224c: 29 62 00 40 lw r2,(r11+64) 8042250: 29 81 00 00 lw r1,(r12+0) 8042254: 44 41 00 0b be r2,r1,8042280 _Thread_Enable_dispatch(); 8042258: fb ff 2c 34 calli 800d328 <_Thread_Enable_dispatch> 804225c: 34 01 00 17 mvi r1,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8042260: 2b 9d 00 04 lw ra,(sp+4) 8042264: 2b 8b 00 18 lw r11,(sp+24) 8042268: 2b 8c 00 14 lw r12,(sp+20) 804226c: 2b 8d 00 10 lw r13,(sp+16) 8042270: 2b 8e 00 0c lw r14,(sp+12) 8042274: 2b 8f 00 08 lw r15,(sp+8) 8042278: 37 9c 00 20 addi sp,sp,32 804227c: 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 ) { 8042280: 45 a0 00 32 be r13,r0,8042348 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 8042284: 90 00 78 00 rcsr r15,IE 8042288: 34 01 ff fe mvi r1,-2 804228c: a1 e1 08 00 and r1,r15,r1 8042290: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 8042294: 29 61 00 38 lw r1,(r11+56) 8042298: 34 02 00 02 mvi r2,2 804229c: 44 22 00 30 be r1,r2,804235c 80422a0: 34 02 00 04 mvi r2,4 80422a4: 44 22 00 19 be r1,r2,8042308 80422a8: 5c 20 ff de bne r1,r0,8042220 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 80422ac: d0 0f 00 00 wcsr IE,r15 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 80422b0: b9 60 08 00 mv r1,r11 80422b4: fb ff ff 1b calli 8041f20 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 80422b8: 78 02 08 04 mvhi r2,0x804 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80422bc: 34 0c 00 00 mvi r12,0 the_watchdog->routine = routine; 80422c0: 38 42 23 e8 ori r2,r2,0x23e8 the_period->state = RATE_MONOTONIC_ACTIVE; 80422c4: 34 03 00 02 mvi r3,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422c8: 78 01 08 07 mvhi r1,0x807 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 80422cc: 59 62 00 2c sw (r11+44),r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422d0: 38 21 71 78 ori r1,r1,0x7178 80422d4: 59 63 00 38 sw (r11+56),r3 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 80422d8: 59 6e 00 30 sw (r11+48),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 80422dc: 59 6d 00 1c sw (r11+28),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422e0: 35 62 00 10 addi r2,r11,16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80422e4: 59 6c 00 18 sw (r11+24),r12 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 80422e8: 59 6c 00 34 sw (r11+52),r12 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 80422ec: 59 6d 00 3c sw (r11+60),r13 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422f0: fb ff 31 69 calli 800e894 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 80422f4: b9 80 08 00 mv r1,r12 80422f8: 5b 81 00 1c sw (sp+28),r1 80422fc: fb ff 2c 0b calli 800d328 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8042300: 2b 81 00 1c lw r1,(sp+28) 8042304: e3 ff ff d7 bi 8042260 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 8042308: b9 60 08 00 mv r1,r11 804230c: fb ff ff 6a calli 80420b4 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 8042310: d0 0f 00 00 wcsr IE,r15 the_period->state = RATE_MONOTONIC_ACTIVE; 8042314: 34 02 00 02 mvi r2,2 8042318: 78 01 08 07 mvhi r1,0x807 804231c: 59 62 00 38 sw (r11+56),r2 8042320: 38 21 71 78 ori r1,r1,0x7178 8042324: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8042328: 59 6d 00 1c sw (r11+28),r13 the_period->next_length = length; 804232c: 59 6d 00 3c sw (r11+60),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8042330: fb ff 31 59 calli 800e894 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 8042334: 34 01 00 06 mvi r1,6 8042338: 5b 81 00 1c sw (sp+28),r1 804233c: fb ff 2b fb calli 800d328 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 8042340: 2b 81 00 1c lw r1,(sp+28) 8042344: e3 ff ff c7 bi 8042260 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 8042348: 29 61 00 38 lw r1,(r11+56) 804234c: 34 02 00 04 mvi r2,4 8042350: 50 41 00 1b bgeu r2,r1,80423bc 8042354: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8042358: e3 ff ff e8 bi 80422f8 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 804235c: b9 60 08 00 mv r1,r11 8042360: fb ff ff 55 calli 80420b4 <_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; 8042364: 34 01 00 01 mvi r1,1 the_period->next_length = length; 8042368: 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; 804236c: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; _ISR_Enable( level ); 8042370: d0 0f 00 00 wcsr IE,r15 _Thread_Executing->Wait.id = the_period->Object.id; 8042374: 29 81 00 00 lw r1,(r12+0) 8042378: 29 63 00 08 lw r3,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 804237c: 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; 8042380: 58 23 00 20 sw (r1+32),r3 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8042384: fb ff 2e f3 calli 800df50 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 8042388: 90 00 08 00 rcsr r1,IE 804238c: 34 02 ff fe mvi r2,-2 8042390: a0 22 10 00 and r2,r1,r2 8042394: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 8042398: 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; 804239c: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 80423a0: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 80423a4: 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 ) 80423a8: 34 01 00 03 mvi r1,3 80423ac: 44 41 00 0b be r2,r1,80423d8 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 80423b0: fb ff 2b de calli 800d328 <_Thread_Enable_dispatch> 80423b4: 34 01 00 00 mvi r1,0 return RTEMS_SUCCESSFUL; 80423b8: e3 ff ff aa bi 8042260 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 80423bc: 78 0b 08 06 mvhi r11,0x806 80423c0: 34 02 00 02 mvi r2,2 80423c4: fb fe fb 67 calli 8001160 <__ashlsi3> 80423c8: 39 6b fa 38 ori r11,r11,0xfa38 80423cc: b5 61 08 00 add r1,r11,r1 80423d0: 28 21 00 00 lw r1,(r1+0) 80423d4: e3 ff ff c9 bi 80422f8 /* * 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 ); 80423d8: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80423dc: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED 80423e0: fb ff b2 9b calli 802ee4c <_Thread_Clear_state> <== NOT EXECUTED 80423e4: e3 ff ff f3 bi 80423b0 <== 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 04 mvhi r11,0x804 8012274: 39 6b 0d 60 ori r11,r11,0xd60 8012278: 29 61 00 00 lw r1,(r11+0) 801227c: f8 00 0b 90 calli 80150bc <_API_Mutex_Lock> 8012280: 78 01 08 04 mvhi r1,0x804 8012284: b9 a0 10 00 mv r2,r13 8012288: 38 21 0b 74 ori r1,r1,0xb74 801228c: 37 83 00 18 addi r3,sp,24 8012290: f8 00 14 4a calli 80173b8 <_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 9f calli 801512c <_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 12 13 calli 8016b50 <_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 08003598 : #include int sched_get_priority_min( int policy ) { 8003598: 37 9c ff fc addi sp,sp,-4 800359c: 5b 9d 00 04 sw (sp+4),ra switch ( policy ) { 80035a0: 48 01 00 05 bg r0,r1,80035b4 80035a4: 34 02 00 02 mvi r2,2 80035a8: 4c 41 00 08 bge r2,r1,80035c8 80035ac: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 80035b0: 44 22 00 06 be r1,r2,80035c8 <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 80035b4: f8 00 2b d6 calli 800e50c <__errno> 80035b8: 34 02 00 16 mvi r2,22 80035bc: 58 22 00 00 sw (r1+0),r2 80035c0: 34 01 ff ff mvi r1,-1 80035c4: e0 00 00 02 bi 80035cc int sched_get_priority_min( int policy ) { switch ( policy ) { 80035c8: 34 01 00 01 mvi r1,1 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 80035cc: 2b 9d 00 04 lw ra,(sp+4) 80035d0: 37 9c 00 04 addi sp,sp,4 80035d4: c3 a0 00 00 ret 08005994 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 8005994: 37 9c ff f4 addi sp,sp,-12 8005998: 5b 8b 00 08 sw (sp+8),r11 800599c: 5b 9d 00 04 sw (sp+4),ra 80059a0: b8 20 58 00 mv r11,r1 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 80059a4: b8 40 08 00 mv r1,r2 80059a8: 37 82 00 0c addi r2,sp,12 80059ac: f8 00 14 2c calli 800aa5c <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 80059b0: 34 02 00 03 mvi r2,3 80059b4: 44 22 00 09 be r1,r2,80059d8 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 80059b8: 2b 83 00 0c lw r3,(sp+12) <== NOT EXECUTED 80059bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80059c0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80059c4: f8 00 17 a8 calli 800b864 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 80059c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80059cc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80059d0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80059d4: c3 a0 00 00 ret <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 80059d8: 2b 83 00 0c lw r3,(sp+12) 80059dc: b9 60 08 00 mv r1,r11 80059e0: 34 02 00 01 mvi r2,1 80059e4: f8 00 17 a0 calli 800b864 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 80059e8: 2b 9d 00 04 lw ra,(sp+4) 80059ec: 2b 8b 00 08 lw r11,(sp+8) 80059f0: 37 9c 00 0c addi sp,sp,12 80059f4: c3 a0 00 00 ret 080027dc : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 80027dc: 37 9c ff e8 addi sp,sp,-24 80027e0: 5b 8b 00 18 sw (sp+24),r11 80027e4: 5b 8c 00 14 sw (sp+20),r12 80027e8: 5b 8d 00 10 sw (sp+16),r13 80027ec: 5b 8e 00 0c sw (sp+12),r14 80027f0: 5b 8f 00 08 sw (sp+8),r15 80027f4: 5b 9d 00 04 sw (sp+4),ra 80027f8: b8 40 60 00 mv r12,r2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 80027fc: 34 02 00 01 mvi r2,1 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 8002800: b8 60 68 00 mv r13,r3 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 8002804: 5c 22 00 06 bne r1,r2,800281c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 8002808: 44 60 00 05 be r3,r0,800281c /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 800280c: 45 80 00 16 be r12,r0,8002864 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 8002810: 29 82 00 00 lw r2,(r12+0) 8002814: 34 42 ff ff addi r2,r2,-1 8002818: 50 22 00 0d bgeu r1,r2,800284c if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 800281c: f8 00 2e b3 calli 800e2e8 <__errno> 8002820: 34 02 00 16 mvi r2,22 8002824: 58 22 00 00 sw (r1+0),r2 8002828: 34 01 ff ff mvi r1,-1 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 800282c: 2b 9d 00 04 lw ra,(sp+4) 8002830: 2b 8b 00 18 lw r11,(sp+24) 8002834: 2b 8c 00 14 lw r12,(sp+20) 8002838: 2b 8d 00 10 lw r13,(sp+16) 800283c: 2b 8e 00 0c lw r14,(sp+12) 8002840: 2b 8f 00 08 lw r15,(sp+8) 8002844: 37 9c 00 18 addi sp,sp,24 8002848: c3 a0 00 00 ret ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 800284c: 29 81 00 04 lw r1,(r12+4) 8002850: 44 20 ff f3 be r1,r0,800281c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 8002854: 34 21 ff ff addi r1,r1,-1 8002858: 34 02 00 1f mvi r2,31 800285c: 50 41 00 02 bgeu r2,r1,8002864 8002860: e3 ff ff ef bi 800281c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8002864: 78 01 08 02 mvhi r1,0x802 8002868: 38 21 38 b4 ori r1,r1,0x38b4 800286c: 28 22 00 00 lw r2,(r1+0) 8002870: 34 42 00 01 addi r2,r2,1 8002874: 58 22 00 00 sw (r1+0),r2 * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 8002878: 78 01 08 02 mvhi r1,0x802 800287c: 38 21 3b 74 ori r1,r1,0x3b74 8002880: f8 00 05 e8 calli 8004020 <_Objects_Allocate> 8002884: b8 20 58 00 mv r11,r1 /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 8002888: 44 20 00 2e be r1,r0,8002940 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 800288c: 34 02 00 02 mvi r2,2 ptimer->thread_id = _Thread_Executing->Object.id; 8002890: 78 01 08 02 mvhi r1,0x802 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 8002894: 31 62 00 3c sb (r11+60),r2 ptimer->thread_id = _Thread_Executing->Object.id; 8002898: 38 21 39 70 ori r1,r1,0x3970 800289c: 28 21 00 00 lw r1,(r1+0) 80028a0: 28 21 00 08 lw r1,(r1+8) 80028a4: 59 61 00 38 sw (r11+56),r1 if ( evp != NULL ) { 80028a8: 45 80 00 07 be r12,r0,80028c4 ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 80028ac: 29 81 00 08 lw r1,(r12+8) 80028b0: 59 61 00 48 sw (r11+72),r1 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 80028b4: 29 81 00 00 lw r1,(r12+0) ptimer->inf.sigev_signo = evp->sigev_signo; 80028b8: 29 8c 00 04 lw r12,(r12+4) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 80028bc: 59 61 00 40 sw (r11+64),r1 ptimer->inf.sigev_signo = evp->sigev_signo; 80028c0: 59 6c 00 44 sw (r11+68),r12 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 80028c4: 29 6e 00 08 lw r14,(r11+8) 80028c8: 78 01 08 02 mvhi r1,0x802 80028cc: 38 21 3b 74 ori r1,r1,0x3b74 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 80028d0: 34 0c 00 00 mvi r12,0 80028d4: 28 2f 00 1c lw r15,(r1+28) 80028d8: 34 02 00 02 mvi r2,2 80028dc: 59 6c 00 68 sw (r11+104),r12 ptimer->timer_data.it_value.tv_sec = 0; 80028e0: 59 6c 00 5c sw (r11+92),r12 ptimer->timer_data.it_value.tv_nsec = 0; 80028e4: 59 6c 00 60 sw (r11+96),r12 ptimer->timer_data.it_interval.tv_sec = 0; 80028e8: 59 6c 00 54 sw (r11+84),r12 ptimer->timer_data.it_interval.tv_nsec = 0; 80028ec: 59 6c 00 58 sw (r11+88),r12 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80028f0: 59 6c 00 18 sw (r11+24),r12 the_watchdog->routine = routine; 80028f4: 59 6c 00 2c sw (r11+44),r12 the_watchdog->id = id; 80028f8: 59 6c 00 30 sw (r11+48),r12 the_watchdog->user_data = user_data; 80028fc: 59 6c 00 34 sw (r11+52),r12 8002900: 21 c1 ff ff andi r1,r14,0xffff 8002904: fb ff f7 2c calli 80005b4 <__ashlsi3> 8002908: b5 e1 08 00 add r1,r15,r1 800290c: 58 2b 00 00 sw (r1+0),r11 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 8002910: 59 6c 00 0c sw (r11+12),r12 _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 8002914: 59 ae 00 00 sw (r13+0),r14 _Thread_Enable_dispatch(); 8002918: f8 00 08 85 calli 8004b2c <_Thread_Enable_dispatch> 800291c: b9 80 08 00 mv r1,r12 return 0; } 8002920: 2b 9d 00 04 lw ra,(sp+4) 8002924: 2b 8b 00 18 lw r11,(sp+24) 8002928: 2b 8c 00 14 lw r12,(sp+20) 800292c: 2b 8d 00 10 lw r13,(sp+16) 8002930: 2b 8e 00 0c lw r14,(sp+12) 8002934: 2b 8f 00 08 lw r15,(sp+8) 8002938: 37 9c 00 18 addi sp,sp,24 800293c: c3 a0 00 00 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 8002940: f8 00 08 7b calli 8004b2c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 8002944: f8 00 2e 69 calli 800e2e8 <__errno> 8002948: 34 02 00 0b mvi r2,11 800294c: 58 22 00 00 sw (r1+0),r2 8002950: 34 01 ff ff mvi r1,-1 8002954: e3 ff ff f3 bi 8002920 08002958 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 8002958: 37 9c ff c8 addi sp,sp,-56 800295c: 5b 8b 00 18 sw (sp+24),r11 8002960: 5b 8c 00 14 sw (sp+20),r12 8002964: 5b 8d 00 10 sw (sp+16),r13 8002968: 5b 8e 00 0c sw (sp+12),r14 800296c: 5b 8f 00 08 sw (sp+8),r15 8002970: 5b 9d 00 04 sw (sp+4),ra 8002974: b8 60 60 00 mv r12,r3 8002978: b8 20 58 00 mv r11,r1 800297c: b8 80 68 00 mv r13,r4 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 8002980: 44 60 00 1c be r3,r0,80029f0 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 8002984: 28 64 00 0c lw r4,(r3+12) 8002988: 78 03 3b 9a mvhi r3,0x3b9a 800298c: 38 63 c9 ff ori r3,r3,0xc9ff 8002990: 54 83 00 18 bgu r4,r3,80029f0 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 8002994: 29 85 00 04 lw r5,(r12+4) 8002998: 50 65 00 02 bgeu r3,r5,80029a0 800299c: e0 00 00 15 bi 80029f0 <== NOT EXECUTED ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 80029a0: 7c 43 00 00 cmpnei r3,r2,0 80029a4: 7c 41 00 04 cmpnei r1,r2,4 80029a8: a0 61 08 00 and r1,r3,r1 80029ac: 5c 20 00 11 bne r1,r0,80029f0 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 80029b0: 29 81 00 00 lw r1,(r12+0) 80029b4: 5b 81 00 20 sw (sp+32),r1 80029b8: 29 83 00 08 lw r3,(r12+8) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 80029bc: 34 01 00 04 mvi r1,4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 80029c0: 5b 85 00 24 sw (sp+36),r5 80029c4: 5b 83 00 28 sw (sp+40),r3 80029c8: 5b 84 00 2c sw (sp+44),r4 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 80029cc: 44 41 00 45 be r2,r1,8002ae0 RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 80029d0: 78 01 08 02 mvhi r1,0x802 80029d4: b9 60 10 00 mv r2,r11 80029d8: 38 21 3b 74 ori r1,r1,0x3b74 80029dc: 37 83 00 38 addi r3,sp,56 80029e0: f8 00 06 c8 calli 8004500 <_Objects_Get> 80029e4: b8 20 58 00 mv r11,r1 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 80029e8: 2b 81 00 38 lw r1,(sp+56) 80029ec: 44 20 00 0d be r1,r0,8002a20 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 80029f0: f8 00 2e 3e calli 800e2e8 <__errno> 80029f4: 34 02 00 16 mvi r2,22 80029f8: 58 22 00 00 sw (r1+0),r2 80029fc: 34 01 ff ff mvi r1,-1 } 8002a00: 2b 9d 00 04 lw ra,(sp+4) 8002a04: 2b 8b 00 18 lw r11,(sp+24) 8002a08: 2b 8c 00 14 lw r12,(sp+20) 8002a0c: 2b 8d 00 10 lw r13,(sp+16) 8002a10: 2b 8e 00 0c lw r14,(sp+12) 8002a14: 2b 8f 00 08 lw r15,(sp+8) 8002a18: 37 9c 00 38 addi sp,sp,56 8002a1c: c3 a0 00 00 ret ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 8002a20: 2b 82 00 28 lw r2,(sp+40) 8002a24: 5c 41 00 03 bne r2,r1,8002a30 8002a28: 2b 8e 00 2c lw r14,(sp+44) 8002a2c: 45 c2 00 3a be r14,r2,8002b14 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 8002a30: b9 80 08 00 mv r1,r12 8002a34: f8 00 0a 79 calli 8005418 <_Timespec_To_ticks> 8002a38: 59 61 00 64 sw (r11+100),r1 initial_period = _Timespec_To_ticks( &normalize.it_value ); 8002a3c: 37 81 00 28 addi r1,sp,40 8002a40: f8 00 0a 76 calli 8005418 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 8002a44: 29 63 00 08 lw r3,(r11+8) 8002a48: 78 04 08 00 mvhi r4,0x800 8002a4c: b8 20 10 00 mv r2,r1 8002a50: 38 84 2b bc ori r4,r4,0x2bbc 8002a54: 35 61 00 10 addi r1,r11,16 8002a58: b9 60 28 00 mv r5,r11 8002a5c: f8 00 17 6c calli 800880c <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 8002a60: 44 20 00 4c be r1,r0,8002b90 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 8002a64: 45 a0 00 09 be r13,r0,8002a88 *ovalue = ptimer->timer_data; 8002a68: 29 61 00 54 lw r1,(r11+84) 8002a6c: 59 a1 00 00 sw (r13+0),r1 8002a70: 29 62 00 58 lw r2,(r11+88) 8002a74: 59 a2 00 04 sw (r13+4),r2 8002a78: 29 63 00 5c lw r3,(r11+92) 8002a7c: 59 a3 00 08 sw (r13+8),r3 8002a80: 29 61 00 60 lw r1,(r11+96) 8002a84: 59 a1 00 0c sw (r13+12),r1 ptimer->timer_data = normalize; 8002a88: 2b 82 00 20 lw r2,(sp+32) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 8002a8c: 35 61 00 6c addi r1,r11,108 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 8002a90: 59 62 00 54 sw (r11+84),r2 8002a94: 2b 83 00 24 lw r3,(sp+36) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002a98: 34 02 00 03 mvi r2,3 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 8002a9c: 59 63 00 58 sw (r11+88),r3 8002aa0: 2b 83 00 28 lw r3,(sp+40) 8002aa4: 59 63 00 5c sw (r11+92),r3 8002aa8: 2b 83 00 2c lw r3,(sp+44) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002aac: 31 62 00 3c sb (r11+60),r2 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 8002ab0: 59 63 00 60 sw (r11+96),r3 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 8002ab4: f8 00 03 a7 calli 8003950 <_TOD_Get> _Thread_Enable_dispatch(); 8002ab8: f8 00 08 1d calli 8004b2c <_Thread_Enable_dispatch> 8002abc: 34 01 00 00 mvi r1,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 8002ac0: 2b 9d 00 04 lw ra,(sp+4) 8002ac4: 2b 8b 00 18 lw r11,(sp+24) 8002ac8: 2b 8c 00 14 lw r12,(sp+20) 8002acc: 2b 8d 00 10 lw r13,(sp+16) 8002ad0: 2b 8e 00 0c lw r14,(sp+12) 8002ad4: 2b 8f 00 08 lw r15,(sp+8) 8002ad8: 37 9c 00 38 addi sp,sp,56 8002adc: c3 a0 00 00 ret normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 8002ae0: 37 8e 00 30 addi r14,sp,48 8002ae4: b9 c0 08 00 mv r1,r14 8002ae8: f8 00 03 9a calli 8003950 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 8002aec: 37 8f 00 28 addi r15,sp,40 8002af0: b9 c0 08 00 mv r1,r14 8002af4: b9 e0 10 00 mv r2,r15 8002af8: f8 00 0a 27 calli 8005394 <_Timespec_Greater_than> 8002afc: 5c 20 ff bd bne r1,r0,80029f0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 8002b00: b9 e0 10 00 mv r2,r15 8002b04: b9 c0 08 00 mv r1,r14 8002b08: b9 e0 18 00 mv r3,r15 8002b0c: f8 00 0a 2e calli 80053c4 <_Timespec_Subtract> 8002b10: e3 ff ff b0 bi 80029d0 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 8002b14: 35 61 00 10 addi r1,r11,16 8002b18: f8 00 0b ae calli 80059d0 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 8002b1c: 45 ae 00 09 be r13,r14,8002b40 *ovalue = ptimer->timer_data; 8002b20: 29 61 00 54 lw r1,(r11+84) 8002b24: 59 a1 00 00 sw (r13+0),r1 8002b28: 29 62 00 58 lw r2,(r11+88) 8002b2c: 59 a2 00 04 sw (r13+4),r2 8002b30: 29 63 00 5c lw r3,(r11+92) 8002b34: 59 a3 00 08 sw (r13+8),r3 8002b38: 29 61 00 60 lw r1,(r11+96) 8002b3c: 59 a1 00 0c sw (r13+12),r1 /* The new data are set */ ptimer->timer_data = normalize; 8002b40: 2b 82 00 20 lw r2,(sp+32) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 8002b44: 34 01 00 04 mvi r1,4 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 8002b48: 59 62 00 54 sw (r11+84),r2 8002b4c: 2b 83 00 24 lw r3,(sp+36) 8002b50: 59 63 00 58 sw (r11+88),r3 8002b54: 2b 82 00 28 lw r2,(sp+40) 8002b58: 59 62 00 5c sw (r11+92),r2 8002b5c: 2b 83 00 2c lw r3,(sp+44) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 8002b60: 31 61 00 3c sb (r11+60),r1 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 8002b64: 59 63 00 60 sw (r11+96),r3 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 8002b68: f8 00 07 f1 calli 8004b2c <_Thread_Enable_dispatch> 8002b6c: 34 01 00 00 mvi r1,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 8002b70: 2b 9d 00 04 lw ra,(sp+4) 8002b74: 2b 8b 00 18 lw r11,(sp+24) 8002b78: 2b 8c 00 14 lw r12,(sp+20) 8002b7c: 2b 8d 00 10 lw r13,(sp+16) 8002b80: 2b 8e 00 0c lw r14,(sp+12) 8002b84: 2b 8f 00 08 lw r15,(sp+8) 8002b88: 37 9c 00 38 addi sp,sp,56 8002b8c: c3 a0 00 00 ret ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 8002b90: 5b 81 00 1c sw (sp+28),r1 8002b94: f8 00 07 e6 calli 8004b2c <_Thread_Enable_dispatch> 8002b98: 2b 81 00 1c lw r1,(sp+28) case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 8002b9c: 2b 9d 00 04 lw ra,(sp+4) 8002ba0: 2b 8b 00 18 lw r11,(sp+24) 8002ba4: 2b 8c 00 14 lw r12,(sp+20) 8002ba8: 2b 8d 00 10 lw r13,(sp+16) 8002bac: 2b 8e 00 0c lw r14,(sp+12) 8002bb0: 2b 8f 00 08 lw r15,(sp+8) 8002bb4: 37 9c 00 38 addi sp,sp,56 8002bb8: c3 a0 00 00 ret 080089b4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 80089b4: 37 9c ff e8 addi sp,sp,-24 80089b8: 5b 8b 00 10 sw (sp+16),r11 80089bc: 5b 8c 00 0c sw (sp+12),r12 80089c0: 5b 8d 00 08 sw (sp+8),r13 80089c4: 5b 9d 00 04 sw (sp+4),ra /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 80089c8: 78 0b 08 01 mvhi r11,0x801 80089cc: 39 6b f1 00 ori r11,r11,0xf100 80089d0: 29 62 00 1c lw r2,(r11+28) useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 80089d4: b8 20 60 00 mv r12,r1 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 80089d8: 44 40 00 25 be r2,r0,8008a6c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 80089dc: b9 60 08 00 mv r1,r11 80089e0: fb ff f4 f3 calli 8005dac <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 80089e4: 34 21 ff fe addi r1,r1,-2 80089e8: 34 02 00 01 mvi r2,1 80089ec: 50 41 00 28 bgeu r2,r1,8008a8c 80089f0: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 80089f4: 45 80 00 17 be r12,r0,8008a50 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 80089f8: 78 02 00 0f mvhi r2,0xf 80089fc: 38 42 42 40 ori r2,r2,0x4240 8008a00: b9 80 08 00 mv r1,r12 8008a04: f8 00 4b 4d calli 801b738 <__udivsi3> tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008a08: 78 02 00 0f mvhi r2,0xf * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 8008a0c: 5b 81 00 14 sw (sp+20),r1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008a10: 38 42 42 40 ori r2,r2,0x4240 8008a14: b9 80 08 00 mv r1,r12 8008a18: f8 00 4b 58 calli 801b778 <__umodsi3> 8008a1c: 34 02 03 e8 mvi r2,1000 8008a20: f8 00 4a c7 calli 801b53c <__mulsi3> ticks = _Timespec_To_ticks( &tp ); 8008a24: 37 8c 00 14 addi r12,sp,20 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008a28: 5b 81 00 18 sw (sp+24),r1 ticks = _Timespec_To_ticks( &tp ); 8008a2c: b9 80 08 00 mv r1,r12 8008a30: f8 00 07 1c calli 800a6a0 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 8008a34: b9 80 08 00 mv r1,r12 8008a38: f8 00 07 1a calli 800a6a0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8008a3c: 59 61 00 0c sw (r11+12),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8008a40: 78 01 08 01 mvhi r1,0x801 8008a44: 38 21 e9 80 ori r1,r1,0xe980 8008a48: b9 60 10 00 mv r2,r11 8008a4c: fb ff f4 71 calli 8005c10 <_Watchdog_Insert> } return remaining; } 8008a50: b9 a0 08 00 mv r1,r13 8008a54: 2b 9d 00 04 lw ra,(sp+4) 8008a58: 2b 8b 00 10 lw r11,(sp+16) 8008a5c: 2b 8c 00 0c lw r12,(sp+12) 8008a60: 2b 8d 00 08 lw r13,(sp+8) 8008a64: 37 9c 00 18 addi sp,sp,24 8008a68: c3 a0 00 00 ret Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8008a6c: 78 01 08 00 mvhi r1,0x800 8008a70: 38 21 8a d0 ori r1,r1,0x8ad0 8008a74: 59 61 00 1c sw (r11+28),r1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8008a78: 59 62 00 08 sw (r11+8),r2 the_watchdog->routine = routine; the_watchdog->id = id; 8008a7c: 59 62 00 20 sw (r11+32),r2 the_watchdog->user_data = user_data; 8008a80: 59 62 00 24 sw (r11+36),r2 8008a84: b8 40 68 00 mv r13,r2 8008a88: e3 ff ff db bi 80089f4 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 8008a8c: 29 64 00 14 lw r4,(r11+20) 8008a90: 29 61 00 0c lw r1,(r11+12) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 8008a94: 29 63 00 18 lw r3,(r11+24) 8008a98: 37 82 00 14 addi r2,sp,20 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 8008a9c: b4 81 08 00 add r1,r4,r1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 8008aa0: c8 23 08 00 sub r1,r1,r3 8008aa4: f8 00 06 e5 calli 800a638 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 8008aa8: 2b 81 00 14 lw r1,(sp+20) 8008aac: 78 02 00 0f mvhi r2,0xf 8008ab0: 38 42 42 40 ori r2,r2,0x4240 8008ab4: f8 00 4a a2 calli 801b53c <__mulsi3> 8008ab8: b8 20 68 00 mv r13,r1 remaining += tp.tv_nsec / 1000; 8008abc: 2b 81 00 18 lw r1,(sp+24) 8008ac0: 34 02 03 e8 mvi r2,1000 8008ac4: f8 00 4a be calli 801b5bc <__divsi3> 8008ac8: b4 2d 68 00 add r13,r1,r13 8008acc: e3 ff ff ca bi 80089f4