ffc09a18 <_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 ) { ffc09a18: 94 21 ff f0 stwu r1,-16(r1) ffc09a1c: 7c 08 02 a6 mflr r0 ffc09a20: 93 e1 00 0c stw r31,12(r1) ffc09a24: 7c 7f 1b 78 mr r31,r3 ffc09a28: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc09a2c: 48 00 1c 11 bl ffc0b63c <_Thread_queue_Dequeue> ffc09a30: 2f 83 00 00 cmpwi cr7,r3,0 ffc09a34: 38 60 00 00 li r3,0 ffc09a38: 41 9e 00 18 beq- cr7,ffc09a50 <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc09a3c: 80 01 00 14 lwz r0,20(r1) ffc09a40: 83 e1 00 0c lwz r31,12(r1) ffc09a44: 38 21 00 10 addi r1,r1,16 ffc09a48: 7c 08 03 a6 mtlr r0 ffc09a4c: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09a50: 7c 00 00 a6 mfmsr r0 ffc09a54: 7d 30 42 a6 mfsprg r9,0 ffc09a58: 7c 09 48 78 andc r9,r0,r9 ffc09a5c: 7d 20 01 24 mtmsr r9 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc09a60: 81 3f 00 48 lwz r9,72(r31) ffc09a64: 38 60 00 04 li r3,4 ffc09a68: 81 7f 00 40 lwz r11,64(r31) ffc09a6c: 7f 89 58 40 cmplw cr7,r9,r11 ffc09a70: 41 9c 00 1c blt- cr7,ffc09a8c <_CORE_semaphore_Surrender+0x74> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09a74: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc09a78: 80 01 00 14 lwz r0,20(r1) ffc09a7c: 83 e1 00 0c lwz r31,12(r1) ffc09a80: 38 21 00 10 addi r1,r1,16 ffc09a84: 7c 08 03 a6 mtlr r0 ffc09a88: 4e 80 00 20 blr #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; ffc09a8c: 39 29 00 01 addi r9,r9,1 ffc09a90: 91 3f 00 48 stw r9,72(r31) ffc09a94: 38 60 00 00 li r3,0 ffc09a98: 7c 00 01 24 mtmsr r0 ffc09a9c: 4b ff ff dc b ffc09a78 <_CORE_semaphore_Surrender+0x60> ffc0abd8 <_Heap_Walk>: 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; ffc0abd8: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0abdc: 94 21 ff 98 stwu r1,-104(r1) ffc0abe0: 7c 08 02 a6 mflr r0 ffc0abe4: 93 21 00 4c stw r25,76(r1) ffc0abe8: 90 01 00 6c stw r0,108(r1) ffc0abec: 93 41 00 50 stw r26,80(r1) ffc0abf0: 93 61 00 54 stw r27,84(r1) ffc0abf4: 93 81 00 58 stw r28,88(r1) ffc0abf8: 7c 9c 23 78 mr r28,r4 ffc0abfc: 93 c1 00 60 stw r30,96(r1) ffc0ac00: 93 e1 00 64 stw r31,100(r1) ffc0ac04: 7c 7f 1b 78 mr r31,r3 ffc0ac08: 91 c1 00 20 stw r14,32(r1) ffc0ac0c: 91 e1 00 24 stw r15,36(r1) ffc0ac10: 92 01 00 28 stw r16,40(r1) ffc0ac14: 92 21 00 2c stw r17,44(r1) ffc0ac18: 92 41 00 30 stw r18,48(r1) ffc0ac1c: 92 61 00 34 stw r19,52(r1) ffc0ac20: 92 81 00 38 stw r20,56(r1) ffc0ac24: 92 a1 00 3c stw r21,60(r1) ffc0ac28: 92 c1 00 40 stw r22,64(r1) ffc0ac2c: 92 e1 00 44 stw r23,68(r1) ffc0ac30: 93 01 00 48 stw r24,72(r1) ffc0ac34: 93 a1 00 5c stw r29,92(r1) uintptr_t const page_size = heap->page_size; ffc0ac38: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0ac3c: 83 43 00 14 lwz r26,20(r3) Heap_Block *const last_block = heap->last_block; ffc0ac40: 83 23 00 24 lwz r25,36(r3) Heap_Block *block = heap->first_block; ffc0ac44: 83 c3 00 20 lwz r30,32(r3) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0ac48: 40 9e 00 7c bne- cr7,ffc0acc4 <_Heap_Walk+0xec> ffc0ac4c: 3d 20 ff c1 lis r9,-63 ffc0ac50: 39 29 ab d4 addi r9,r9,-21548 ffc0ac54: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0ac58: 3d 20 00 00 lis r9,0 ffc0ac5c: 80 09 27 d4 lwz r0,10196(r9) ffc0ac60: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ac64: 41 9e 00 7c beq- cr7,ffc0ace0 <_Heap_Walk+0x108> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0ac68: 38 60 00 01 li r3,1 block = next_block; } return true; } ffc0ac6c: 80 01 00 6c lwz r0,108(r1) ffc0ac70: 81 c1 00 20 lwz r14,32(r1) ffc0ac74: 7c 08 03 a6 mtlr r0 ffc0ac78: 81 e1 00 24 lwz r15,36(r1) ffc0ac7c: 82 01 00 28 lwz r16,40(r1) ffc0ac80: 82 21 00 2c lwz r17,44(r1) ffc0ac84: 82 41 00 30 lwz r18,48(r1) ffc0ac88: 82 61 00 34 lwz r19,52(r1) ffc0ac8c: 82 81 00 38 lwz r20,56(r1) ffc0ac90: 82 a1 00 3c lwz r21,60(r1) ffc0ac94: 82 c1 00 40 lwz r22,64(r1) ffc0ac98: 82 e1 00 44 lwz r23,68(r1) ffc0ac9c: 83 01 00 48 lwz r24,72(r1) ffc0aca0: 83 21 00 4c lwz r25,76(r1) ffc0aca4: 83 41 00 50 lwz r26,80(r1) ffc0aca8: 83 61 00 54 lwz r27,84(r1) ffc0acac: 83 81 00 58 lwz r28,88(r1) ffc0acb0: 83 a1 00 5c lwz r29,92(r1) ffc0acb4: 83 c1 00 60 lwz r30,96(r1) ffc0acb8: 83 e1 00 64 lwz r31,100(r1) ffc0acbc: 38 21 00 68 addi r1,r1,104 ffc0acc0: 4e 80 00 20 blr 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; ffc0acc4: 3d 20 ff c1 lis r9,-63 ffc0acc8: 39 29 b1 f0 addi r9,r9,-19984 ffc0accc: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0acd0: 3d 20 00 00 lis r9,0 ffc0acd4: 80 09 27 d4 lwz r0,10196(r9) ffc0acd8: 2f 80 00 03 cmpwi cr7,r0,3 ffc0acdc: 40 9e ff 8c bne+ cr7,ffc0ac68 <_Heap_Walk+0x90> 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)( ffc0ace0: 80 1f 00 0c lwz r0,12(r31) ffc0ace4: 3c a0 ff c2 lis r5,-62 ffc0ace8: 81 1f 00 18 lwz r8,24(r31) ffc0acec: 38 a5 0e c0 addi r5,r5,3776 ffc0acf0: 81 3f 00 1c lwz r9,28(r31) ffc0acf4: 7f 83 e3 78 mr r3,r28 ffc0acf8: 81 7f 00 08 lwz r11,8(r31) ffc0acfc: 38 80 00 00 li r4,0 ffc0ad00: 90 01 00 10 stw r0,16(r1) ffc0ad04: 7f 66 db 78 mr r6,r27 ffc0ad08: 7f 47 d3 78 mr r7,r26 ffc0ad0c: 80 01 00 18 lwz r0,24(r1) ffc0ad10: 7f ca f3 78 mr r10,r30 ffc0ad14: 91 61 00 0c stw r11,12(r1) ffc0ad18: 7c 09 03 a6 mtctr r0 ffc0ad1c: 93 21 00 08 stw r25,8(r1) ffc0ad20: 4c c6 31 82 crclr 4*cr1+eq ffc0ad24: 4e 80 04 21 bctrl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { ffc0ad28: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0ad2c: 41 9e 00 d0 beq- cr7,ffc0adfc <_Heap_Walk+0x224> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0ad30: 73 67 00 07 andi. r7,r27,7 ffc0ad34: 40 82 00 f0 bne- ffc0ae24 <_Heap_Walk+0x24c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0ad38: 7c 1a db 96 divwu r0,r26,r27 ffc0ad3c: 7c 00 d9 d6 mullw r0,r0,r27 ffc0ad40: 7f 9a 00 00 cmpw cr7,r26,r0 ffc0ad44: 40 9e 00 f4 bne- cr7,ffc0ae38 <_Heap_Walk+0x260> ); return false; } if ( ffc0ad48: 38 1e 00 08 addi r0,r30,8 ffc0ad4c: 7d 20 db 96 divwu r9,r0,r27 ffc0ad50: 7d 29 d9 d6 mullw r9,r9,r27 ffc0ad54: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ad58: 40 9e 00 f4 bne- cr7,ffc0ae4c <_Heap_Walk+0x274> 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; ffc0ad5c: 83 1e 00 04 lwz r24,4(r30) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0ad60: 73 00 00 01 andi. r0,r24,1 ffc0ad64: 41 82 00 fc beq- ffc0ae60 <_Heap_Walk+0x288> ); return false; } if ( first_block->prev_size != page_size ) { ffc0ad68: 80 de 00 00 lwz r6,0(r30) ffc0ad6c: 7f 9b 30 00 cmpw cr7,r27,r6 ffc0ad70: 40 9e 00 60 bne- cr7,ffc0add0 <_Heap_Walk+0x1f8> ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0ad74: 81 39 00 04 lwz r9,4(r25) ffc0ad78: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0ad7c: 7d 39 4a 14 add r9,r25,r9 ffc0ad80: 81 29 00 04 lwz r9,4(r9) ffc0ad84: 71 27 00 01 andi. r7,r9,1 ffc0ad88: 41 82 04 28 beq- ffc0b1b0 <_Heap_Walk+0x5d8> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0ad8c: 80 df 00 08 lwz r6,8(r31) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0ad90: 80 bf 00 10 lwz r5,16(r31) 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 ) { ffc0ad94: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0ad98: 41 9e 01 78 beq- cr7,ffc0af10 <_Heap_Walk+0x338> 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; ffc0ad9c: 81 5f 00 20 lwz r10,32(r31) 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 ffc0ada0: 7f 8a 30 40 cmplw cr7,r10,r6 ffc0ada4: 40 9d 00 cc ble- cr7,ffc0ae70 <_Heap_Walk+0x298> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0ada8: 3c a0 ff c2 lis r5,-62 ffc0adac: 7f 83 e3 78 mr r3,r28 ffc0adb0: 38 a5 10 54 addi r5,r5,4180 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0adb4: 80 01 00 18 lwz r0,24(r1) ffc0adb8: 38 80 00 01 li r4,1 ffc0adbc: 7c 09 03 a6 mtctr r0 ffc0adc0: 4c c6 31 82 crclr 4*cr1+eq ffc0adc4: 4e 80 04 21 bctrl ffc0adc8: 38 60 00 00 li r3,0 ffc0adcc: 4b ff fe a0 b ffc0ac6c <_Heap_Walk+0x94> return false; } if ( first_block->prev_size != page_size ) { (*printer)( ffc0add0: 3c a0 ff c2 lis r5,-62 ffc0add4: 7f 83 e3 78 mr r3,r28 ffc0add8: 38 a5 10 10 addi r5,r5,4112 ffc0addc: 7f 67 db 78 mr r7,r27 return false; } if ( next_block_begin <= block_begin ) { (*printer)( ffc0ade0: 80 01 00 18 lwz r0,24(r1) ffc0ade4: 38 80 00 01 li r4,1 ffc0ade8: 7c 09 03 a6 mtctr r0 ffc0adec: 4c c6 31 82 crclr 4*cr1+eq ffc0adf0: 4e 80 04 21 bctrl ffc0adf4: 38 60 00 00 li r3,0 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0adf8: 4b ff fe 74 b ffc0ac6c <_Heap_Walk+0x94> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0adfc: 3c a0 ff c2 lis r5,-62 ffc0ae00: 7f 83 e3 78 mr r3,r28 ffc0ae04: 38 a5 0f 54 addi r5,r5,3924 return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0ae08: 80 01 00 18 lwz r0,24(r1) ffc0ae0c: 38 80 00 01 li r4,1 ffc0ae10: 7c 09 03 a6 mtctr r0 ffc0ae14: 4c c6 31 82 crclr 4*cr1+eq ffc0ae18: 4e 80 04 21 bctrl ffc0ae1c: 38 60 00 00 li r3,0 ffc0ae20: 4b ff fe 4c b ffc0ac6c <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0ae24: 3c a0 ff c2 lis r5,-62 ffc0ae28: 7f 83 e3 78 mr r3,r28 ffc0ae2c: 38 a5 0f 68 addi r5,r5,3944 ffc0ae30: 7f 66 db 78 mr r6,r27 ffc0ae34: 4b ff ff 80 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0ae38: 3c a0 ff c2 lis r5,-62 ffc0ae3c: 7f 83 e3 78 mr r3,r28 ffc0ae40: 38 a5 0f 88 addi r5,r5,3976 ffc0ae44: 7f 46 d3 78 mr r6,r26 ffc0ae48: 4b ff ff 6c b ffc0adb4 <_Heap_Walk+0x1dc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0ae4c: 3c a0 ff c2 lis r5,-62 ffc0ae50: 7f 83 e3 78 mr r3,r28 ffc0ae54: 38 a5 0f ac addi r5,r5,4012 ffc0ae58: 7f c6 f3 78 mr r6,r30 ffc0ae5c: 4b ff ff 58 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0ae60: 3c a0 ff c2 lis r5,-62 ffc0ae64: 7f 83 e3 78 mr r3,r28 ffc0ae68: 38 a5 0f e0 addi r5,r5,4064 ffc0ae6c: 4b ff ff 9c b ffc0ae08 <_Heap_Walk+0x230> && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0ae70: 81 1f 00 24 lwz r8,36(r31) 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 ffc0ae74: 7f 88 30 40 cmplw cr7,r8,r6 ffc0ae78: 41 bc ff 30 blt- cr7,ffc0ada8 <_Heap_Walk+0x1d0> ); return false; } if ( ffc0ae7c: 39 26 00 08 addi r9,r6,8 ffc0ae80: 7d 69 2b 96 divwu r11,r9,r5 ffc0ae84: 7d 6b 29 d6 mullw r11,r11,r5 ffc0ae88: 7f 89 58 00 cmpw cr7,r9,r11 ffc0ae8c: 40 9e 03 34 bne- cr7,ffc0b1c0 <_Heap_Walk+0x5e8> ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ae90: 81 26 00 04 lwz r9,4(r6) ffc0ae94: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0ae98: 7d 26 4a 14 add r9,r6,r9 ffc0ae9c: 81 29 00 04 lwz r9,4(r9) ffc0aea0: 71 27 00 01 andi. r7,r9,1 ffc0aea4: 40 82 03 3c bne- ffc0b1e0 <_Heap_Walk+0x608> ); return false; } if ( free_block->prev != prev_block ) { ffc0aea8: 80 e6 00 0c lwz r7,12(r6) ffc0aeac: 7f 9f 38 00 cmpw cr7,r31,r7 ffc0aeb0: 41 be 00 48 beq+ cr7,ffc0aef8 <_Heap_Walk+0x320> ffc0aeb4: 48 00 03 1c b ffc0b1d0 <_Heap_Walk+0x5f8> <== NOT EXECUTED ffc0aeb8: 41 b8 fe f0 blt- cr6,ffc0ada8 <_Heap_Walk+0x1d0> ); return false; } if ( ffc0aebc: 39 66 00 08 addi r11,r6,8 ffc0aec0: 41 a4 fe e8 blt- cr1,ffc0ada8 <_Heap_Walk+0x1d0> ffc0aec4: 7c eb 2b 96 divwu r7,r11,r5 ffc0aec8: 7c e7 29 d6 mullw r7,r7,r5 ffc0aecc: 7f 8b 38 00 cmpw cr7,r11,r7 ffc0aed0: 40 9e 02 f0 bne- cr7,ffc0b1c0 <_Heap_Walk+0x5e8> ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0aed4: 81 66 00 04 lwz r11,4(r6) ffc0aed8: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc0aedc: 7d 6b 32 14 add r11,r11,r6 ffc0aee0: 81 6b 00 04 lwz r11,4(r11) ffc0aee4: 71 67 00 01 andi. r7,r11,1 ffc0aee8: 40 82 02 f8 bne- ffc0b1e0 <_Heap_Walk+0x608> ); return false; } if ( free_block->prev != prev_block ) { ffc0aeec: 80 e6 00 0c lwz r7,12(r6) ffc0aef0: 7f 87 48 00 cmpw cr7,r7,r9 ffc0aef4: 40 9e 02 dc bne- cr7,ffc0b1d0 <_Heap_Walk+0x5f8> (*printer)( ffc0aef8: 7c c9 33 78 mr r9,r6 return false; } prev_block = free_block; free_block = free_block->next; ffc0aefc: 80 c6 00 08 lwz r6,8(r6) 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 ) { ffc0af00: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0af04: 7f 06 50 40 cmplw cr6,r6,r10 ffc0af08: 7c 88 30 40 cmplw cr1,r8,r6 ffc0af0c: 40 9e ff ac bne+ cr7,ffc0aeb8 <_Heap_Walk+0x2e0> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0af10: 7f 99 f0 00 cmpw cr7,r25,r30 ffc0af14: 41 be fd 54 beq- cr7,ffc0ac68 <_Heap_Walk+0x90> bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)( ffc0af18: 3e 60 ff c2 lis r19,-62 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0af1c: 3e 80 ff c2 lis r20,-62 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)( ffc0af20: 3e 40 ff c2 lis r18,-62 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0af24: 3d e0 ff c2 lis r15,-62 ffc0af28: 3e a0 ff c2 lis r21,-62 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)( ffc0af2c: 3e 20 ff c2 lis r17,-62 "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)" : ""), ffc0af30: 3d c0 ff c2 lis r14,-62 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0af34: 3e 00 ff c2 lis r16,-62 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)( ffc0af38: 3a 73 10 f4 addi r19,r19,4340 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0af3c: 3a 94 11 0c addi r20,r20,4364 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)( ffc0af40: 3a 52 12 24 addi r18,r18,4644 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0af44: 39 ef 12 18 addi r15,r15,4632 ffc0af48: 3a b5 12 88 addi r21,r21,4744 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)( ffc0af4c: 3a 31 12 0c addi r17,r17,4620 "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)" : ""), ffc0af50: 39 ce 12 00 addi r14,r14,4608 ffc0af54: 3a 10 11 f4 addi r16,r16,4596 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 ) { ffc0af58: 2f 80 00 00 cmpwi cr7,r0,0 - 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; ffc0af5c: 57 18 00 3c rlwinm r24,r24,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0af60: 7f b8 f2 14 add r29,r24,r30 ffc0af64: 41 9e 00 4c beq- cr7,ffc0afb0 <_Heap_Walk+0x3d8> (*printer)( ffc0af68: 80 01 00 18 lwz r0,24(r1) ffc0af6c: 7f 83 e3 78 mr r3,r28 ffc0af70: 38 80 00 00 li r4,0 ffc0af74: 7c 09 03 a6 mtctr r0 ffc0af78: 7e 65 9b 78 mr r5,r19 ffc0af7c: 7f c6 f3 78 mr r6,r30 ffc0af80: 7f 07 c3 78 mr r7,r24 ffc0af84: 4c c6 31 82 crclr 4*cr1+eq ffc0af88: 4e 80 04 21 bctrl 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 ffc0af8c: 80 1f 00 20 lwz r0,32(r31) ffc0af90: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0af94: 40 9d 00 50 ble- cr7,ffc0afe4 <_Heap_Walk+0x40c> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( ffc0af98: 3c a0 ff c2 lis r5,-62 ffc0af9c: 7f 83 e3 78 mr r3,r28 ffc0afa0: 38 a5 11 34 addi r5,r5,4404 ffc0afa4: 7f c6 f3 78 mr r6,r30 ffc0afa8: 7f a7 eb 78 mr r7,r29 ffc0afac: 4b ff fe 34 b ffc0ade0 <_Heap_Walk+0x208> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0afb0: 80 01 00 18 lwz r0,24(r1) ffc0afb4: 7f 83 e3 78 mr r3,r28 ffc0afb8: 38 80 00 00 li r4,0 ffc0afbc: 81 1e 00 00 lwz r8,0(r30) ffc0afc0: 7c 09 03 a6 mtctr r0 ffc0afc4: 7e 85 a3 78 mr r5,r20 ffc0afc8: 7f c6 f3 78 mr r6,r30 ffc0afcc: 7f 07 c3 78 mr r7,r24 ffc0afd0: 4c c6 31 82 crclr 4*cr1+eq ffc0afd4: 4e 80 04 21 bctrl ffc0afd8: 80 1f 00 20 lwz r0,32(r31) ffc0afdc: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0afe0: 41 bd ff b8 bgt- cr7,ffc0af98 <_Heap_Walk+0x3c0> ffc0afe4: 80 1f 00 24 lwz r0,36(r31) ffc0afe8: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0afec: 41 bc ff ac blt- cr7,ffc0af98 <_Heap_Walk+0x3c0> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { ffc0aff0: 7c 18 db 96 divwu r0,r24,r27 ffc0aff4: 7c 00 d9 d6 mullw r0,r0,r27 ffc0aff8: 7f 98 00 00 cmpw cr7,r24,r0 ffc0affc: 40 9e 01 50 bne- cr7,ffc0b14c <_Heap_Walk+0x574> ); return false; } if ( block_size < min_block_size ) { ffc0b000: 7f 9a c0 40 cmplw cr7,r26,r24 ffc0b004: 41 9d 01 60 bgt- cr7,ffc0b164 <_Heap_Walk+0x58c> ); return false; } if ( next_block_begin <= block_begin ) { ffc0b008: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0b00c: 40 9c 01 8c bge- cr7,ffc0b198 <_Heap_Walk+0x5c0> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0b010: 80 1d 00 04 lwz r0,4(r29) ffc0b014: 70 07 00 01 andi. r7,r0,1 ffc0b018: 40 82 00 b0 bne- ffc0b0c8 <_Heap_Walk+0x4f0> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b01c: 80 1f 00 08 lwz r0,8(r31) ffc0b020: 7e 08 83 78 mr r8,r16 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)( ffc0b024: 80 fe 00 0c lwz r7,12(r30) 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; ffc0b028: 82 de 00 04 lwz r22,4(r30) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b02c: 7f 80 38 00 cmpw cr7,r0,r7 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0b030: 80 1f 00 0c lwz r0,12(r31) - 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; ffc0b034: 56 d8 00 3c rlwinm r24,r22,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0b038: 7e fe c2 14 add r23,r30,r24 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b03c: 41 9e 00 10 beq- cr7,ffc0b04c <_Heap_Walk+0x474> "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)" : ""), ffc0b040: 7f 87 f8 00 cmpw cr7,r7,r31 ffc0b044: 7e a8 ab 78 mr r8,r21 ffc0b048: 41 9e 00 fc beq- cr7,ffc0b144 <_Heap_Walk+0x56c> 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)( ffc0b04c: 81 3e 00 08 lwz r9,8(r30) ffc0b050: 7e 2a 8b 78 mr r10,r17 ffc0b054: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b058: 41 9e 00 10 beq- cr7,ffc0b068 <_Heap_Walk+0x490> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b05c: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0b060: 7e aa ab 78 mr r10,r21 ffc0b064: 41 9e 00 d8 beq- cr7,ffc0b13c <_Heap_Walk+0x564> 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)( ffc0b068: 80 01 00 18 lwz r0,24(r1) ffc0b06c: 7f 83 e3 78 mr r3,r28 ffc0b070: 38 80 00 00 li r4,0 ffc0b074: 7e 45 93 78 mr r5,r18 ffc0b078: 7c 09 03 a6 mtctr r0 ffc0b07c: 7f c6 f3 78 mr r6,r30 ffc0b080: 4c c6 31 82 crclr 4*cr1+eq ffc0b084: 4e 80 04 21 bctrl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0b088: 81 17 00 00 lwz r8,0(r23) ffc0b08c: 7f 98 40 00 cmpw cr7,r24,r8 ffc0b090: 41 9e 00 50 beq- cr7,ffc0b0e0 <_Heap_Walk+0x508> (*printer)( ffc0b094: 80 01 00 18 lwz r0,24(r1) ffc0b098: 3c a0 ff c2 lis r5,-62 ffc0b09c: 7f 83 e3 78 mr r3,r28 ffc0b0a0: 38 a5 12 50 addi r5,r5,4688 ffc0b0a4: 7c 09 03 a6 mtctr r0 ffc0b0a8: 7f c6 f3 78 mr r6,r30 ffc0b0ac: 7f 07 c3 78 mr r7,r24 ffc0b0b0: 7e e9 bb 78 mr r9,r23 ffc0b0b4: 38 80 00 01 li r4,1 ffc0b0b8: 4c c6 31 82 crclr 4*cr1+eq ffc0b0bc: 4e 80 04 21 bctrl ffc0b0c0: 38 60 00 00 li r3,0 ffc0b0c4: 4b ff fb a8 b ffc0ac6c <_Heap_Walk+0x94> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0b0c8: 7f 99 e8 00 cmpw cr7,r25,r29 ffc0b0cc: 41 be fb 9c beq- cr7,ffc0ac68 <_Heap_Walk+0x90> 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 ) { ffc0b0d0: 83 1d 00 04 lwz r24,4(r29) ffc0b0d4: 7f be eb 78 mr r30,r29 ffc0b0d8: 57 00 07 fe clrlwi r0,r24,31 ffc0b0dc: 4b ff fe 7c b ffc0af58 <_Heap_Walk+0x380> ); return false; } if ( !prev_used ) { ffc0b0e0: 72 c7 00 01 andi. r7,r22,1 ffc0b0e4: 41 82 00 44 beq- ffc0b128 <_Heap_Walk+0x550> ffc0b0e8: 81 3f 00 08 lwz r9,8(r31) ) { 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 ) { ffc0b0ec: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0b0f0: 41 9e 00 24 beq- cr7,ffc0b114 <_Heap_Walk+0x53c> if ( free_block == block ) { ffc0b0f4: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0b0f8: 40 be 00 0c bne+ cr7,ffc0b104 <_Heap_Walk+0x52c> ffc0b0fc: 4b ff ff cc b ffc0b0c8 <_Heap_Walk+0x4f0> ffc0b100: 41 ba ff c8 beq- cr6,ffc0b0c8 <_Heap_Walk+0x4f0> return true; } free_block = free_block->next; ffc0b104: 81 29 00 08 lwz r9,8(r9) ) { 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 ) { ffc0b108: 7f 89 f8 00 cmpw cr7,r9,r31 if ( free_block == block ) { ffc0b10c: 7f 09 f0 00 cmpw cr6,r9,r30 ) { 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 ) { ffc0b110: 40 9e ff f0 bne+ cr7,ffc0b100 <_Heap_Walk+0x528> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b114: 3c a0 ff c2 lis r5,-62 ffc0b118: 7f 83 e3 78 mr r3,r28 ffc0b11c: 38 a5 12 bc addi r5,r5,4796 ffc0b120: 7f c6 f3 78 mr r6,r30 ffc0b124: 4b ff fc 90 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( !prev_used ) { (*printer)( ffc0b128: 3c a0 ff c2 lis r5,-62 ffc0b12c: 7f 83 e3 78 mr r3,r28 ffc0b130: 38 a5 12 8c addi r5,r5,4748 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b134: 7f c6 f3 78 mr r6,r30 ffc0b138: 4b ff fc 7c b ffc0adb4 <_Heap_Walk+0x1dc> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b13c: 7d ea 7b 78 mr r10,r15 ffc0b140: 4b ff ff 28 b ffc0b068 <_Heap_Walk+0x490> "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)" : ""), ffc0b144: 7d c8 73 78 mr r8,r14 ffc0b148: 4b ff ff 04 b ffc0b04c <_Heap_Walk+0x474> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( ffc0b14c: 3c a0 ff c2 lis r5,-62 ffc0b150: 7f 83 e3 78 mr r3,r28 ffc0b154: 38 a5 11 64 addi r5,r5,4452 ffc0b158: 7f c6 f3 78 mr r6,r30 ffc0b15c: 7f 07 c3 78 mr r7,r24 ffc0b160: 4b ff fc 80 b ffc0ade0 <_Heap_Walk+0x208> return false; } if ( block_size < min_block_size ) { (*printer)( ffc0b164: 80 01 00 18 lwz r0,24(r1) ffc0b168: 3c a0 ff c2 lis r5,-62 ffc0b16c: 7f 83 e3 78 mr r3,r28 ffc0b170: 38 a5 11 94 addi r5,r5,4500 ffc0b174: 7c 09 03 a6 mtctr r0 ffc0b178: 7f c6 f3 78 mr r6,r30 ffc0b17c: 7f 07 c3 78 mr r7,r24 ffc0b180: 7f 48 d3 78 mr r8,r26 ffc0b184: 38 80 00 01 li r4,1 ffc0b188: 4c c6 31 82 crclr 4*cr1+eq ffc0b18c: 4e 80 04 21 bctrl ffc0b190: 38 60 00 00 li r3,0 block, block_size, min_block_size ); return false; ffc0b194: 4b ff fa d8 b ffc0ac6c <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin ) { (*printer)( ffc0b198: 3c a0 ff c2 lis r5,-62 ffc0b19c: 7f 83 e3 78 mr r3,r28 ffc0b1a0: 38 a5 11 c0 addi r5,r5,4544 ffc0b1a4: 7f c6 f3 78 mr r6,r30 ffc0b1a8: 7f a7 eb 78 mr r7,r29 ffc0b1ac: 4b ff fc 34 b ffc0ade0 <_Heap_Walk+0x208> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b1b0: 3c a0 ff c2 lis r5,-62 ffc0b1b4: 7f 83 e3 78 mr r3,r28 ffc0b1b8: 38 a5 10 3c addi r5,r5,4156 ffc0b1bc: 4b ff fc 4c b ffc0ae08 <_Heap_Walk+0x230> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0b1c0: 3c a0 ff c2 lis r5,-62 ffc0b1c4: 7f 83 e3 78 mr r3,r28 ffc0b1c8: 38 a5 10 74 addi r5,r5,4212 ffc0b1cc: 4b ff fb e8 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( free_block->prev != prev_block ) { (*printer)( ffc0b1d0: 3c a0 ff c2 lis r5,-62 ffc0b1d4: 7f 83 e3 78 mr r3,r28 ffc0b1d8: 38 a5 10 c0 addi r5,r5,4288 ffc0b1dc: 4b ff fc 04 b ffc0ade0 <_Heap_Walk+0x208> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0b1e0: 3c a0 ff c2 lis r5,-62 ffc0b1e4: 7f 83 e3 78 mr r3,r28 ffc0b1e8: 38 a5 10 a4 addi r5,r5,4260 ffc0b1ec: 4b ff fb c8 b ffc0adb4 <_Heap_Walk+0x1dc> ffc0b1f0 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b1f0: 94 21 ff 88 stwu r1,-120(r1) ffc0b1f4: 7c 08 02 a6 mflr r0 ffc0b1f8: 93 e1 00 74 stw r31,116(r1) ffc0b1fc: 90 01 00 7c stw r0,124(r1) ffc0b200: 7c 60 1b 78 mr r0,r3 ffc0b204: 90 c1 00 1c stw r6,28(r1) ffc0b208: 90 e1 00 20 stw r7,32(r1) ffc0b20c: 91 01 00 24 stw r8,36(r1) ffc0b210: 91 21 00 28 stw r9,40(r1) ffc0b214: 91 41 00 2c stw r10,44(r1) ffc0b218: 40 86 00 24 bne- cr1,ffc0b23c <_Heap_Walk_print+0x4c> ffc0b21c: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b220: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b224: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b228: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b22c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b230: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b234: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b238: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b23c: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b240: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b244: 40 9e 00 58 bne- cr7,ffc0b29c <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b248: 3c 60 ff c2 lis r3,-62 ffc0b24c: 7c 04 03 78 mr r4,r0 ffc0b250: 38 63 12 f4 addi r3,r3,4852 ffc0b254: 4c c6 31 82 crclr 4*cr1+eq ffc0b258: 4b ff ad 7d bl ffc05fd4 } va_start( ap, fmt ); ffc0b25c: 38 00 00 03 li r0,3 ffc0b260: 98 01 00 08 stb r0,8(r1) ffc0b264: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b268: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b26c: 98 01 00 09 stb r0,9(r1) ffc0b270: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b274: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b278: 90 01 00 0c stw r0,12(r1) ffc0b27c: 38 01 00 10 addi r0,r1,16 ffc0b280: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b284: 4b ff d0 85 bl ffc08308 va_end( ap ); } ffc0b288: 80 01 00 7c lwz r0,124(r1) ffc0b28c: 83 e1 00 74 lwz r31,116(r1) ffc0b290: 38 21 00 78 addi r1,r1,120 ffc0b294: 7c 08 03 a6 mtlr r0 ffc0b298: 4e 80 00 20 blr static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); ffc0b29c: 3c 60 ff c2 lis r3,-62 ffc0b2a0: 7c 04 03 78 mr r4,r0 ffc0b2a4: 38 63 12 e8 addi r3,r3,4840 ffc0b2a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b2ac: 4b ff ad 29 bl ffc05fd4 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2b0: 38 00 00 03 li r0,3 ffc0b2b4: 98 01 00 08 stb r0,8(r1) ffc0b2b8: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b2bc: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2c0: 98 01 00 09 stb r0,9(r1) ffc0b2c4: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b2c8: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2cc: 90 01 00 0c stw r0,12(r1) ffc0b2d0: 38 01 00 10 addi r0,r1,16 ffc0b2d4: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b2d8: 4b ff d0 31 bl ffc08308 va_end( ap ); } ffc0b2dc: 80 01 00 7c lwz r0,124(r1) ffc0b2e0: 83 e1 00 74 lwz r31,116(r1) ffc0b2e4: 38 21 00 78 addi r1,r1,120 ffc0b2e8: 7c 08 03 a6 mtlr r0 ffc0b2ec: 4e 80 00 20 blr ffc09f74 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09f74: 94 21 ff f0 stwu r1,-16(r1) ffc09f78: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc09f7c: 3d 60 00 00 lis r11,0 ffc09f80: 39 2b 2d 30 addi r9,r11,11568 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09f84: 90 01 00 14 stw r0,20(r1) _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; ffc09f88: 90 a9 00 08 stw r5,8(r9) Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc09f8c: 98 89 00 04 stb r4,4(r9) void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09f90: 93 e1 00 0c stw r31,12(r1) ffc09f94: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; ffc09f98: 90 6b 2d 30 stw r3,11568(r11) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); ffc09f9c: 48 00 26 45 bl ffc0c5e0 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc09fa0: 38 00 00 05 li r0,5 ffc09fa4: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc09fa8: 7f e3 fb 78 mr r3,r31 ffc09fac: 90 09 27 d4 stw r0,10196(r9) ffc09fb0: 4b ff 9a 85 bl ffc03a34 <_BSP_Fatal_error> ffc09fb4: 48 00 00 00 b ffc09fb4 <_Internal_error_Occurred+0x40> <== NOT EXECUTED ffc0a0d0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a0d0: 94 21 ff b8 stwu r1,-72(r1) ffc0a0d4: 7c 08 02 a6 mflr r0 ffc0a0d8: 90 01 00 4c stw r0,76(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a0dc: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a0e0: 93 a1 00 3c stw r29,60(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a0e4: 2f 8b 00 00 cmpwi cr7,r11,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a0e8: 93 e1 00 44 stw r31,68(r1) ffc0a0ec: 7c 7f 1b 78 mr r31,r3 ffc0a0f0: 92 a1 00 1c stw r21,28(r1) ffc0a0f4: 92 c1 00 20 stw r22,32(r1) ffc0a0f8: 92 e1 00 24 stw r23,36(r1) ffc0a0fc: 93 01 00 28 stw r24,40(r1) ffc0a100: 93 21 00 2c stw r25,44(r1) ffc0a104: 93 41 00 30 stw r26,48(r1) ffc0a108: 93 61 00 34 stw r27,52(r1) ffc0a10c: 93 81 00 38 stw r28,56(r1) ffc0a110: 93 c1 00 40 stw r30,64(r1) /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); ffc0a114: a3 a3 00 0a lhz r29,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a118: 41 9e 02 9c beq- cr7,ffc0a3b4 <_Objects_Extend_information+0x2e4> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0a11c: a3 23 00 10 lhz r25,16(r3) ffc0a120: a1 23 00 14 lhz r9,20(r3) ffc0a124: 7e b9 4b 96 divwu r21,r25,r9 for ( ; block < block_count; block++ ) { ffc0a128: 2f 95 00 00 cmpwi cr7,r21,0 ffc0a12c: 41 9e 02 a0 beq- cr7,ffc0a3cc <_Objects_Extend_information+0x2fc> if ( information->object_blocks[ block ] == NULL ) ffc0a130: 80 0b 00 00 lwz r0,0(r11) ffc0a134: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a138: 41 9e 02 94 beq- cr7,ffc0a3cc <_Objects_Extend_information+0x2fc> ffc0a13c: 7d 2a 4b 78 mr r10,r9 ffc0a140: 7e a9 03 a6 mtctr r21 ffc0a144: 7f be eb 78 mr r30,r29 ffc0a148: 3b 60 00 00 li r27,0 ffc0a14c: 48 00 00 10 b ffc0a15c <_Objects_Extend_information+0x8c> ffc0a150: 7c 0b 00 2e lwzx r0,r11,r0 ffc0a154: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a158: 41 9e 00 14 beq- cr7,ffc0a16c <_Objects_Extend_information+0x9c> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0a15c: 3b 7b 00 01 addi r27,r27,1 if ( information->object_blocks[ block ] == NULL ) ffc0a160: 57 60 10 3a rlwinm r0,r27,2,0,29 break; else index_base += information->allocation_size; ffc0a164: 7f de 4a 14 add r30,r30,r9 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0a168: 42 00 ff e8 bdnz+ ffc0a150 <_Objects_Extend_information+0x80> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0a16c: 7f 39 52 14 add r25,r25,r10 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { ffc0a170: 2b 99 ff ff cmplwi cr7,r25,65535 ffc0a174: 41 9d 01 b8 bgt- cr7,ffc0a32c <_Objects_Extend_information+0x25c> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc0a178: 88 1f 00 12 lbz r0,18(r31) /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0a17c: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0a180: 2f 80 00 00 cmpwi cr7,r0,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0a184: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0a188: 40 9e 01 e0 bne- cr7,ffc0a368 <_Objects_Extend_information+0x298> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc0a18c: 48 00 2a 71 bl ffc0cbfc <_Workspace_Allocate_or_fatal_error> ffc0a190: 7c 7c 1b 78 mr r28,r3 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { ffc0a194: a0 1f 00 10 lhz r0,16(r31) ffc0a198: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0a19c: 41 9c 01 08 blt- cr7,ffc0a2a4 <_Objects_Extend_information+0x1d4> */ /* * Up the block count and maximum */ block_count++; ffc0a1a0: 3b 55 00 01 addi r26,r21,1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0a1a4: 1c 7a 00 03 mulli r3,r26,3 ffc0a1a8: 7c 79 1a 14 add r3,r25,r3 ffc0a1ac: 7c 63 ea 14 add r3,r3,r29 ffc0a1b0: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0a1b4: 48 00 2a 91 bl ffc0cc44 <_Workspace_Allocate> if ( !object_blocks ) { ffc0a1b8: 7c 76 1b 79 mr. r22,r3 ffc0a1bc: 41 82 02 20 beq- ffc0a3dc <_Objects_Extend_information+0x30c> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0a1c0: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0a1c4: 57 5a 10 3a rlwinm r26,r26,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0a1c8: 7f 16 d2 14 add r24,r22,r26 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0a1cc: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0a1d0: 7f 58 d2 14 add r26,r24,r26 ffc0a1d4: 41 9c 01 a4 blt- cr7,ffc0a378 <_Objects_Extend_information+0x2a8> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0a1d8: 2f 9d 00 00 cmpwi cr7,r29,0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0a1dc: 39 20 00 00 li r9,0 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0a1e0: 56 b7 10 3a rlwinm r23,r21,2,0,29 ffc0a1e4: 41 9e 00 20 beq- cr7,ffc0a204 <_Objects_Extend_information+0x134> local_table[ index ] = NULL; ffc0a1e8: 7f a9 03 a6 mtctr r29 ffc0a1ec: 38 00 00 00 li r0,0 ffc0a1f0: 55 2b 10 3a rlwinm r11,r9,2,0,29 ffc0a1f4: 7c 0b d1 2e stwx r0,r11,r26 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0a1f8: 39 29 00 01 addi r9,r9,1 ffc0a1fc: 42 00 ff f4 bdnz+ ffc0a1f0 <_Objects_Extend_information+0x120> ffc0a200: 56 b7 10 3a rlwinm r23,r21,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0a204: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0a208: 38 00 00 00 li r0,0 inactive_per_block[block_count] = 0; ffc0a20c: 7c 18 b9 2e stwx r0,r24,r23 for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0a210: 7d 7e 5a 14 add r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a214: 7f 9e 58 40 cmplw cr7,r30,r11 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0a218: 7c 16 b9 2e stwx r0,r22,r23 inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a21c: 40 9c 00 30 bge- cr7,ffc0a24c <_Objects_Extend_information+0x17c> ffc0a220: 38 1e 00 01 addi r0,r30,1 ffc0a224: 7f 80 58 40 cmplw cr7,r0,r11 ffc0a228: 57 c9 10 3a rlwinm r9,r30,2,0,29 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0a22c: 7d 7e 58 50 subf r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a230: 7d 3a 4a 14 add r9,r26,r9 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0a234: 7d 69 03 a6 mtctr r11 ffc0a238: 38 00 00 00 li r0,0 ffc0a23c: 41 9d 01 ac bgt- cr7,ffc0a3e8 <_Objects_Extend_information+0x318> ffc0a240: 90 09 00 00 stw r0,0(r9) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { ffc0a244: 39 29 00 04 addi r9,r9,4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a248: 42 00 ff f8 bdnz+ ffc0a240 <_Objects_Extend_information+0x170> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a24c: 7c 00 00 a6 mfmsr r0 ffc0a250: 7d 30 42 a6 mfsprg r9,0 ffc0a254: 7c 09 48 78 andc r9,r0,r9 ffc0a258: 7d 20 01 24 mtmsr r9 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a25c: 81 7f 00 00 lwz r11,0(r31) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc0a260: 57 39 04 3e clrlwi r25,r25,16 information->maximum_id = _Objects_Build_id( ffc0a264: a1 3f 00 04 lhz r9,4(r31) ffc0a268: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0a26c: 80 7f 00 34 lwz r3,52(r31) information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a270: 65 6b 00 01 oris r11,r11,1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0a274: 93 1f 00 30 stw r24,48(r31) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a278: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0a27c: 7d 69 4b 78 or r9,r11,r9 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0a280: 93 5f 00 1c stw r26,28(r31) information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a284: 7d 29 cb 78 or r9,r9,r25 ffc0a288: 91 3f 00 0c stw r9,12(r31) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc0a28c: b3 3f 00 10 sth r25,16(r31) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0a290: 92 df 00 34 stw r22,52(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a294: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc0a298: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a29c: 41 9e 00 08 beq- cr7,ffc0a2a4 <_Objects_Extend_information+0x1d4> _Workspace_Free( old_tables ); ffc0a2a0: 48 00 29 d9 bl ffc0cc78 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0a2a4: 81 3f 00 34 lwz r9,52(r31) ffc0a2a8: 57 7b 10 3a rlwinm r27,r27,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a2ac: 3b a1 00 08 addi r29,r1,8 ffc0a2b0: a0 bf 00 14 lhz r5,20(r31) } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0a2b4: 7f 89 d9 2e stwx r28,r9,r27 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a2b8: 7f 84 e3 78 mr r4,r28 ffc0a2bc: 7f a3 eb 78 mr r3,r29 ffc0a2c0: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a2c4: 3b 9f 00 20 addi r28,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a2c8: 48 00 56 01 bl ffc0f8c8 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0a2cc: 48 00 00 2c b ffc0a2f8 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( ffc0a2d0: 81 7f 00 00 lwz r11,0(r31) ffc0a2d4: a0 1f 00 04 lhz r0,4(r31) ffc0a2d8: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0a2dc: 65 6b 00 01 oris r11,r11,1 ffc0a2e0: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0a2e4: 7d 60 03 78 or r0,r11,r0 ffc0a2e8: 7c 00 f3 78 or r0,r0,r30 ffc0a2ec: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0a2f0: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a2f4: 4b ff f1 fd bl ffc094f0 <_Chain_Append> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0a2f8: 7f a3 eb 78 mr r3,r29 ffc0a2fc: 4b ff f2 25 bl ffc09520 <_Chain_Get> ffc0a300: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a304: 7f 83 e3 78 mr r3,r28 ffc0a308: 7d 24 4b 78 mr r4,r9 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0a30c: 40 82 ff c4 bne+ ffc0a2d0 <_Objects_Extend_information+0x200> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a310: a0 1f 00 14 lhz r0,20(r31) information->inactive = ffc0a314: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a318: 81 7f 00 30 lwz r11,48(r31) information->inactive = ffc0a31c: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a320: 54 00 04 3e clrlwi r0,r0,16 information->inactive = ffc0a324: b1 3f 00 2c sth r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a328: 7c 0b d9 2e stwx r0,r11,r27 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0a32c: 80 01 00 4c lwz r0,76(r1) ffc0a330: 82 a1 00 1c lwz r21,28(r1) ffc0a334: 7c 08 03 a6 mtlr r0 ffc0a338: 82 c1 00 20 lwz r22,32(r1) ffc0a33c: 82 e1 00 24 lwz r23,36(r1) ffc0a340: 83 01 00 28 lwz r24,40(r1) ffc0a344: 83 21 00 2c lwz r25,44(r1) ffc0a348: 83 41 00 30 lwz r26,48(r1) ffc0a34c: 83 61 00 34 lwz r27,52(r1) ffc0a350: 83 81 00 38 lwz r28,56(r1) ffc0a354: 83 a1 00 3c lwz r29,60(r1) ffc0a358: 83 c1 00 40 lwz r30,64(r1) ffc0a35c: 83 e1 00 44 lwz r31,68(r1) ffc0a360: 38 21 00 48 addi r1,r1,72 ffc0a364: 4e 80 00 20 blr * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); ffc0a368: 48 00 28 dd bl ffc0cc44 <_Workspace_Allocate> if ( !new_object_block ) ffc0a36c: 7c 7c 1b 79 mr. r28,r3 ffc0a370: 40 82 fe 24 bne+ ffc0a194 <_Objects_Extend_information+0xc4> ffc0a374: 4b ff ff b8 b ffc0a32c <_Objects_Extend_information+0x25c> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0a378: 56 b7 10 3a rlwinm r23,r21,2,0,29 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, ffc0a37c: 80 9f 00 34 lwz r4,52(r31) ffc0a380: 7e e5 bb 78 mr r5,r23 ffc0a384: 48 00 9d 85 bl ffc14108 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0a388: 80 9f 00 30 lwz r4,48(r31) ffc0a38c: 7e e5 bb 78 mr r5,r23 ffc0a390: 7f 03 c3 78 mr r3,r24 ffc0a394: 48 00 9d 75 bl ffc14108 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0a398: a0 bf 00 10 lhz r5,16(r31) ffc0a39c: 80 9f 00 1c lwz r4,28(r31) ffc0a3a0: 7f 43 d3 78 mr r3,r26 ffc0a3a4: 7c bd 2a 14 add r5,r29,r5 ffc0a3a8: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0a3ac: 48 00 9d 5d bl ffc14108 ffc0a3b0: 4b ff fe 54 b ffc0a204 <_Objects_Extend_information+0x134> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a3b4: a3 23 00 10 lhz r25,16(r3) ffc0a3b8: 7f be eb 78 mr r30,r29 ffc0a3bc: a1 43 00 14 lhz r10,20(r3) ffc0a3c0: 3b 60 00 00 li r27,0 ffc0a3c4: 3a a0 00 00 li r21,0 ffc0a3c8: 4b ff fd a4 b ffc0a16c <_Objects_Extend_information+0x9c> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) ffc0a3cc: 7d 2a 4b 78 mr r10,r9 <== NOT EXECUTED ffc0a3d0: 7f be eb 78 mr r30,r29 <== NOT EXECUTED ffc0a3d4: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0a3d8: 4b ff fd 94 b ffc0a16c <_Objects_Extend_information+0x9c> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); ffc0a3dc: 7f 83 e3 78 mr r3,r28 ffc0a3e0: 48 00 28 99 bl ffc0cc78 <_Workspace_Free> return; ffc0a3e4: 4b ff ff 48 b ffc0a32c <_Objects_Extend_information+0x25c> ffc0a3e8: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0a3ec: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0a3f0: 4b ff fe 50 b ffc0a240 <_Objects_Extend_information+0x170> <== NOT EXECUTED ffc0a838 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a838: 94 21 ff e8 stwu r1,-24(r1) ffc0a83c: 7c 08 02 a6 mflr r0 ffc0a840: 90 01 00 1c stw r0,28(r1) ffc0a844: 93 c1 00 10 stw r30,16(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) / ffc0a848: a1 23 00 10 lhz r9,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0a84c: a3 c3 00 0a lhz r30,10(r3) block_count = (information->maximum - index_base) / ffc0a850: a0 03 00 14 lhz r0,20(r3) ffc0a854: 7d 3e 48 50 subf r9,r30,r9 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a858: 93 81 00 08 stw r28,8(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) / ffc0a85c: 7d 29 03 96 divwu r9,r9,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a860: 93 a1 00 0c stw r29,12(r1) ffc0a864: 93 e1 00 14 stw r31,20(r1) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a868: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a86c: 7c 7c 1b 78 mr r28,r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a870: 41 9e 00 3c beq- cr7,ffc0a8ac <_Objects_Shrink_information+0x74> if ( information->inactive_per_block[ block ] == ffc0a874: 81 63 00 30 lwz r11,48(r3) ffc0a878: 7d 29 03 a6 mtctr r9 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; ffc0a87c: 3b e0 00 04 li r31,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 ] == ffc0a880: 81 2b 00 00 lwz r9,0(r11) ffc0a884: 7f 80 48 00 cmpw cr7,r0,r9 ffc0a888: 41 9e 00 44 beq- cr7,ffc0a8cc <_Objects_Shrink_information+0x94> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a88c: 42 40 00 20 bdz- ffc0a8ac <_Objects_Shrink_information+0x74> if ( information->inactive_per_block[ block ] == ffc0a890: 7d 2b f8 2e lwzx r9,r11,r31 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0a894: 7f de 02 14 add r30,r30,r0 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 ] == ffc0a898: 7f 80 48 00 cmpw cr7,r0,r9 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0a89c: 39 3f 00 04 addi r9,r31,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 ] == ffc0a8a0: 41 9e 00 30 beq- cr7,ffc0a8d0 <_Objects_Shrink_information+0x98> ffc0a8a4: 7d 3f 4b 78 mr r31,r9 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a8a8: 42 00 ff e8 bdnz+ ffc0a890 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0a8ac: 80 01 00 1c lwz r0,28(r1) ffc0a8b0: 83 81 00 08 lwz r28,8(r1) ffc0a8b4: 7c 08 03 a6 mtlr r0 ffc0a8b8: 83 a1 00 0c lwz r29,12(r1) ffc0a8bc: 83 c1 00 10 lwz r30,16(r1) ffc0a8c0: 83 e1 00 14 lwz r31,20(r1) ffc0a8c4: 38 21 00 18 addi r1,r1,24 ffc0a8c8: 4e 80 00 20 blr 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 ] == ffc0a8cc: 3b e0 00 00 li r31,0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; ffc0a8d0: 80 7c 00 20 lwz r3,32(r28) ffc0a8d4: 48 00 00 10 b ffc0a8e4 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0a8d8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a8dc: 7f a3 eb 78 mr r3,r29 ffc0a8e0: 41 9e 00 34 beq- cr7,ffc0a914 <_Objects_Shrink_information+0xdc> * 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 ); ffc0a8e4: a0 03 00 0a lhz r0,10(r3) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0a8e8: 83 a3 00 00 lwz r29,0(r3) if ((index >= index_base) && ffc0a8ec: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0a8f0: 41 bc ff e8 blt- cr7,ffc0a8d8 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0a8f4: a1 3c 00 14 lhz r9,20(r28) ffc0a8f8: 7d 3e 4a 14 add r9,r30,r9 ffc0a8fc: 7f 80 48 40 cmplw cr7,r0,r9 ffc0a900: 40 9c ff d8 bge+ cr7,ffc0a8d8 <_Objects_Shrink_information+0xa0> _Chain_Extract( &extract_me->Node ); ffc0a904: 48 00 4f 9d bl ffc0f8a0 <_Chain_Extract> } } while ( the_object ); ffc0a908: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a90c: 7f a3 eb 78 mr r3,r29 ffc0a910: 40 9e ff d4 bne+ cr7,ffc0a8e4 <_Objects_Shrink_information+0xac> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0a914: 81 3c 00 34 lwz r9,52(r28) ffc0a918: 7c 69 f8 2e lwzx r3,r9,r31 ffc0a91c: 48 00 23 5d bl ffc0cc78 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0a920: a1 5c 00 2c lhz r10,44(r28) ffc0a924: a0 1c 00 14 lhz r0,20(r28) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0a928: 81 3c 00 34 lwz r9,52(r28) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0a92c: 7c 00 50 50 subf r0,r0,r10 * 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; ffc0a930: 81 7c 00 30 lwz r11,48(r28) information->inactive -= information->allocation_size; ffc0a934: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0a938: 80 01 00 1c lwz r0,28(r1) * 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; ffc0a93c: 7f ab f9 2e stwx r29,r11,r31 return; } index_base += information->allocation_size; } } ffc0a940: 7c 08 03 a6 mtlr r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0a944: 7f a9 f9 2e stwx r29,r9,r31 return; } index_base += information->allocation_size; } } ffc0a948: 83 81 00 08 lwz r28,8(r1) ffc0a94c: 83 a1 00 0c lwz r29,12(r1) ffc0a950: 83 c1 00 10 lwz r30,16(r1) ffc0a954: 83 e1 00 14 lwz r31,20(r1) ffc0a958: 38 21 00 18 addi r1,r1,24 ffc0a95c: 4e 80 00 20 blr ffc0ec48 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { ffc0ec48: 7c 08 02 a6 mflr r0 ffc0ec4c: 94 21 ff f8 stwu r1,-8(r1) ffc0ec50: 90 01 00 0c stw r0,12(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 ) ffc0ec54: 88 03 00 08 lbz r0,8(r3) ffc0ec58: 54 00 07 7e clrlwi r0,r0,29 ffc0ec5c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ec60: 41 9e 00 14 beq- cr7,ffc0ec74 <_POSIX_Threads_Exitted_extension+0x2c> pthread_exit( executing->Wait.return_argument ); } ffc0ec64: 80 01 00 0c lwz r0,12(r1) ffc0ec68: 38 21 00 08 addi r1,r1,8 ffc0ec6c: 7c 08 03 a6 mtlr r0 ffc0ec70: 4e 80 00 20 blr /* * 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 ); ffc0ec74: 80 63 00 28 lwz r3,40(r3) ffc0ec78: 48 00 31 b9 bl ffc11e30 } ffc0ec7c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc0ec80: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0ec84: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ec88: 4e 80 00 20 blr <== NOT EXECUTED ffc0eebc <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { ffc0eebc: 7c 08 02 a6 mflr r0 ffc0eec0: 94 21 ff f8 stwu r1,-8(r1) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc0eec4: 3d 40 00 00 lis r10,0 ffc0eec8: 90 01 00 0c stw r0,12(r1) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0eecc: 80 03 00 1c lwz r0,28(r3) ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0eed0: 81 63 01 48 lwz r11,328(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0eed4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eed8: 88 8a 26 a4 lbz r4,9892(r10) ffc0eedc: 80 0b 00 88 lwz r0,136(r11) ffc0eee0: 7c 80 20 50 subf r4,r0,r4 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ ffc0eee4: 38 00 ff ff li r0,-1 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; ffc0eee8: 90 83 00 18 stw r4,24(r3) /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ ffc0eeec: 90 03 00 78 stw r0,120(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0eef0: 40 9e 00 10 bne- cr7,ffc0ef00 <_POSIX_Threads_Sporadic_budget_callout+0x44> /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { ffc0eef4: 80 03 00 14 lwz r0,20(r3) ffc0eef8: 7f 80 20 40 cmplw cr7,r0,r4 ffc0eefc: 41 9c 00 14 blt- cr7,ffc0ef10 <_POSIX_Threads_Sporadic_budget_callout+0x54> #if 0 printk( "lower priority\n" ); #endif } } } ffc0ef00: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc0ef04: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0ef08: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ef0c: 4e 80 00 20 blr <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc0ef10: 38 a0 00 01 li r5,1 ffc0ef14: 4b ff bb 81 bl ffc0aa94 <_Thread_Change_priority> #if 0 printk( "lower priority\n" ); #endif } } } ffc0ef18: 80 01 00 0c lwz r0,12(r1) ffc0ef1c: 38 21 00 08 addi r1,r1,8 ffc0ef20: 7c 08 03 a6 mtlr r0 ffc0ef24: 4e 80 00 20 blr ffc08ab8 <_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) { ffc08ab8: 94 21 ff f0 stwu r1,-16(r1) ffc08abc: 7c 08 02 a6 mflr r0 ffc08ac0: 90 01 00 14 stw r0,20(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 ) || ffc08ac4: 80 04 00 54 lwz r0,84(r4) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc08ac8: 81 24 00 68 lwz r9,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08acc: 2f 80 00 00 cmpwi cr7,r0,0 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc08ad0: 93 e1 00 0c stw r31,12(r1) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc08ad4: 38 09 00 01 addi r0,r9,1 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc08ad8: 7c 9f 23 78 mr r31,r4 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc08adc: 90 04 00 68 stw r0,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08ae0: 40 9e 00 40 bne- cr7,ffc08b20 <_POSIX_Timer_TSR+0x68> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { ffc08ae4: 80 04 00 58 lwz r0,88(r4) ffc08ae8: 2f 80 00 00 cmpwi cr7,r0,0 ffc08aec: 40 9e 00 34 bne- cr7,ffc08b20 <_POSIX_Timer_TSR+0x68> /* 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; ffc08af0: 38 00 00 04 li r0,4 <== NOT EXECUTED ffc08af4: 98 04 00 3c stb r0,60(r4) <== 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 ) ) { ffc08af8: 80 7f 00 38 lwz r3,56(r31) ffc08afc: 80 9f 00 44 lwz r4,68(r31) ffc08b00: 48 00 72 15 bl ffc0fd14 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; ffc08b04: 38 00 00 00 li r0,0 ffc08b08: 90 1f 00 68 stw r0,104(r31) } ffc08b0c: 80 01 00 14 lwz r0,20(r1) ffc08b10: 83 e1 00 0c lwz r31,12(r1) ffc08b14: 38 21 00 10 addi r1,r1,16 ffc08b18: 7c 08 03 a6 mtlr r0 ffc08b1c: 4e 80 00 20 blr 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( ffc08b20: 80 9f 00 64 lwz r4,100(r31) ffc08b24: 3c c0 ff c1 lis r6,-63 ffc08b28: 80 bf 00 08 lwz r5,8(r31) ffc08b2c: 38 c6 8a b8 addi r6,r6,-30024 ffc08b30: 38 7f 00 10 addi r3,r31,16 ffc08b34: 7f e7 fb 78 mr r7,r31 ffc08b38: 48 00 77 fd bl ffc10334 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) ffc08b3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08b40: 41 9e ff cc beq+ cr7,ffc08b0c <_POSIX_Timer_TSR+0x54> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); ffc08b44: 38 7f 00 6c addi r3,r31,108 ffc08b48: 48 00 1e 25 bl ffc0a96c <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc08b4c: 38 00 00 03 li r0,3 ffc08b50: 98 1f 00 3c stb r0,60(r31) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08b54: 4b ff ff a4 b ffc08af8 <_POSIX_Timer_TSR+0x40> ffc130d8 <_POSIX_signals_Clear_process_signals>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc130d8: 7d 60 00 a6 mfmsr r11 ffc130dc: 7c 10 42 a6 mfsprg r0,0 ffc130e0: 7d 60 00 78 andc r0,r11,r0 ffc130e4: 7c 00 01 24 mtmsr r0 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { ffc130e8: 3d 20 00 00 lis r9,0 ffc130ec: 1c 03 00 0c mulli r0,r3,12 ffc130f0: 39 29 31 70 addi r9,r9,12656 ffc130f4: 7d 29 00 2e lwzx r9,r9,r0 ffc130f8: 2f 89 00 02 cmpwi cr7,r9,2 ffc130fc: 41 9e 00 40 beq- cr7,ffc1313c <_POSIX_signals_Clear_process_signals+0x64> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc13100: 3d 20 00 00 lis r9,0 ffc13104: 80 09 27 e4 lwz r0,10212(r9) ffc13108: 38 63 ff ff addi r3,r3,-1 ffc1310c: 39 40 ff fe li r10,-2 ffc13110: 5d 43 18 3e rotlw r3,r10,r3 ffc13114: 7c 63 00 38 and r3,r3,r0 if ( !_POSIX_signals_Pending ) ffc13118: 2f 83 00 00 cmpwi cr7,r3,0 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc1311c: 90 69 27 e4 stw r3,10212(r9) if ( !_POSIX_signals_Pending ) ffc13120: 40 9e 00 14 bne- cr7,ffc13134 <_POSIX_signals_Clear_process_signals+0x5c> _Thread_Do_post_task_switch_extension--; ffc13124: 3d 20 00 00 lis r9,0 ffc13128: 81 49 27 a0 lwz r10,10144(r9) ffc1312c: 38 0a ff ff addi r0,r10,-1 ffc13130: 90 09 27 a0 stw r0,10144(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc13134: 7d 60 01 24 mtmsr r11 } _ISR_Enable( level ); } ffc13138: 4e 80 00 20 blr ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) ffc1313c: 3d 20 00 00 lis r9,0 ffc13140: 39 29 33 3c addi r9,r9,13116 ffc13144: 7d 49 00 2e lwzx r10,r9,r0 ffc13148: 7d 29 02 14 add r9,r9,r0 ffc1314c: 38 09 00 04 addi r0,r9,4 ffc13150: 7f 8a 00 00 cmpw cr7,r10,r0 ffc13154: 41 be ff ac beq- cr7,ffc13100 <_POSIX_signals_Clear_process_signals+0x28> ffc13158: 7d 60 01 24 mtmsr r11 <== NOT EXECUTED _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); } ffc1315c: 4e 80 00 20 blr <== NOT EXECUTED ffc0aa94 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0aa94: 94 21 ff e8 stwu r1,-24(r1) ffc0aa98: 7c 08 02 a6 mflr r0 ffc0aa9c: 90 01 00 1c stw r0,28(r1) ffc0aaa0: 93 e1 00 14 stw r31,20(r1) ffc0aaa4: 7c 7f 1b 78 mr r31,r3 ffc0aaa8: 93 81 00 08 stw r28,8(r1) ffc0aaac: 7c bc 2b 78 mr r28,r5 ffc0aab0: 93 a1 00 0c stw r29,12(r1) ffc0aab4: 93 c1 00 10 stw r30,16(r1) ffc0aab8: 7c 9e 23 78 mr r30,r4 */ /* * Save original state */ original_state = the_thread->current_state; ffc0aabc: 83 a3 00 10 lwz r29,16(r3) /* * 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 ); ffc0aac0: 48 00 13 81 bl ffc0be40 <_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 ) ffc0aac4: 80 1f 00 14 lwz r0,20(r31) ffc0aac8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0aacc: 41 9e 00 10 beq- cr7,ffc0aadc <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0aad0: 7f c4 f3 78 mr r4,r30 ffc0aad4: 7f e3 fb 78 mr r3,r31 ffc0aad8: 48 00 11 e9 bl ffc0bcc0 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0aadc: 7d 20 00 a6 mfmsr r9 ffc0aae0: 7c 10 42 a6 mfsprg r0,0 ffc0aae4: 7d 20 00 78 andc r0,r9,r0 ffc0aae8: 7c 00 01 24 mtmsr r0 /* * 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; ffc0aaec: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0aaf0: 2f 80 00 04 cmpwi cr7,r0,4 ffc0aaf4: 41 9e 00 88 beq- cr7,ffc0ab7c <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0aaf8: 73 ab 00 04 andi. r11,r29,4 ffc0aafc: 41 82 00 38 beq- ffc0ab34 <_Thread_Change_priority+0xa0> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ab00: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0ab04: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0ab08: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED ffc0ab0c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0ab10: 40 82 00 40 bne- ffc0ab50 <_Thread_Change_priority+0xbc> <== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } ffc0ab14: 80 01 00 1c lwz r0,28(r1) ffc0ab18: 83 81 00 08 lwz r28,8(r1) ffc0ab1c: 7c 08 03 a6 mtlr r0 ffc0ab20: 83 a1 00 0c lwz r29,12(r1) ffc0ab24: 83 c1 00 10 lwz r30,16(r1) ffc0ab28: 83 e1 00 14 lwz r31,20(r1) ffc0ab2c: 38 21 00 18 addi r1,r1,24 ffc0ab30: 4e 80 00 20 blr */ 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 ); ffc0ab34: 54 0b 07 b8 rlwinm r11,r0,0,30,28 ffc0ab38: 91 7f 00 10 stw r11,16(r31) ffc0ab3c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0ab40: 3d 20 00 03 lis r9,3 ffc0ab44: 61 29 be e0 ori r9,r9,48864 ffc0ab48: 7c 0b 48 39 and. r11,r0,r9 ffc0ab4c: 41 82 ff c8 beq+ ffc0ab14 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0ab50: 80 7f 00 44 lwz r3,68(r31) ffc0ab54: 7f e4 fb 78 mr r4,r31 ffc0ab58: 48 00 10 71 bl ffc0bbc8 <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } ffc0ab5c: 80 01 00 1c lwz r0,28(r1) ffc0ab60: 83 81 00 08 lwz r28,8(r1) ffc0ab64: 7c 08 03 a6 mtlr r0 ffc0ab68: 83 a1 00 0c lwz r29,12(r1) ffc0ab6c: 83 c1 00 10 lwz r30,16(r1) ffc0ab70: 83 e1 00 14 lwz r31,20(r1) ffc0ab74: 38 21 00 18 addi r1,r1,24 ffc0ab78: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0ab7c: 73 bd 00 04 andi. r29,r29,4 ffc0ab80: 3d 40 00 00 lis r10,0 ffc0ab84: 40 82 00 4c bne- ffc0abd0 <_Thread_Change_priority+0x13c> * 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 ); ffc0ab88: 93 bf 00 10 stw r29,16(r31) _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) ffc0ab8c: 2f 9c 00 00 cmpwi cr7,r28,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0ab90: 81 7f 00 90 lwz r11,144(r31) ffc0ab94: 80 1f 00 98 lwz r0,152(r31) ffc0ab98: 81 0b 00 00 lwz r8,0(r11) ffc0ab9c: 7d 00 03 78 or r0,r8,r0 ffc0aba0: 90 0b 00 00 stw r0,0(r11) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0aba4: 81 6a 27 a4 lwz r11,10148(r10) ffc0aba8: 80 1f 00 94 lwz r0,148(r31) ffc0abac: 7d 60 03 78 or r0,r11,r0 ffc0abb0: 90 0a 27 a4 stw r0,10148(r10) ffc0abb4: 41 9e 00 b8 beq- cr7,ffc0ac6c <_Thread_Change_priority+0x1d8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc0abb8: 81 7f 00 8c lwz r11,140(r31) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0abbc: 81 0b 00 00 lwz r8,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0abc0: 91 7f 00 04 stw r11,4(r31) before_node = after_node->next; after_node->next = the_node; ffc0abc4: 93 eb 00 00 stw r31,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0abc8: 93 e8 00 04 stw r31,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0abcc: 91 1f 00 00 stw r8,0(r31) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0abd0: 7c 00 00 a6 mfmsr r0 ffc0abd4: 7d 20 01 24 mtmsr r9 ffc0abd8: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0abdc: 3d 00 00 00 lis r8,0 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 ); ffc0abe0: 81 6a 27 a4 lwz r11,10148(r10) ffc0abe4: 80 a8 27 64 lwz r5,10084(r8) ffc0abe8: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0abec: 3c e0 00 00 lis r7,0 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 ); ffc0abf0: 91 6a 27 a4 stw r11,10148(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0abf4: 38 e7 2d a0 addi r7,r7,11680 ffc0abf8: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0abfc: 7c 07 40 2e lwzx r0,r7,r8 ffc0ac00: 7c 0b 00 34 cntlzw r11,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0ac04: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0ac08: 7c 07 41 2e stwx r0,r7,r8 ffc0ac0c: 7c c6 5a 14 add r6,r6,r11 ffc0ac10: 1c c6 00 0c mulli r6,r6,12 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0ac14: 3d 60 00 00 lis r11,0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0ac18: 7c 05 30 2e lwzx r0,r5,r6 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0ac1c: 81 6b 27 b0 lwz r11,10160(r11) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0ac20: 3d 40 00 00 lis r10,0 ffc0ac24: 90 0a 27 8c stw r0,10124(r10) * 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() && ffc0ac28: 7f 80 58 00 cmpw cr7,r0,r11 ffc0ac2c: 41 9e 00 1c beq- cr7,ffc0ac48 <_Thread_Change_priority+0x1b4> _Thread_Executing->is_preemptible ) ffc0ac30: 88 0b 00 75 lbz r0,117(r11) ffc0ac34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac38: 41 9e 00 10 beq- cr7,ffc0ac48 <_Thread_Change_priority+0x1b4> _Context_Switch_necessary = true; ffc0ac3c: 38 00 00 01 li r0,1 ffc0ac40: 3d 60 00 00 lis r11,0 ffc0ac44: 98 0b 27 c0 stb r0,10176(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ac48: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); } ffc0ac4c: 80 01 00 1c lwz r0,28(r1) ffc0ac50: 83 81 00 08 lwz r28,8(r1) ffc0ac54: 7c 08 03 a6 mtlr r0 ffc0ac58: 83 a1 00 0c lwz r29,12(r1) ffc0ac5c: 83 c1 00 10 lwz r30,16(r1) ffc0ac60: 83 e1 00 14 lwz r31,20(r1) ffc0ac64: 38 21 00 18 addi r1,r1,24 ffc0ac68: 4e 80 00 20 blr _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); ffc0ac6c: 81 7f 00 8c lwz r11,140(r31) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0ac70: 38 0b 00 04 addi r0,r11,4 ffc0ac74: 90 1f 00 00 stw r0,0(r31) old_last_node = the_chain->last; ffc0ac78: 81 0b 00 08 lwz r8,8(r11) the_chain->last = the_node; ffc0ac7c: 93 eb 00 08 stw r31,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0ac80: 91 1f 00 04 stw r8,4(r31) 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; ffc0ac84: 93 e8 00 00 stw r31,0(r8) ffc0ac88: 4b ff ff 48 b ffc0abd0 <_Thread_Change_priority+0x13c> ffc103f4 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc103f4: 3d 20 00 00 lis r9,0 ffc103f8: 81 29 27 b0 lwz r9,10160(r9) ready = executing->ready; ffc103fc: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc10400: 7c 00 00 a6 mfmsr r0 ffc10404: 7d 50 42 a6 mfsprg r10,0 ffc10408: 7c 0a 50 78 andc r10,r0,r10 ffc1040c: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { ffc10410: 81 0b 00 00 lwz r8,0(r11) ffc10414: 81 4b 00 08 lwz r10,8(r11) ffc10418: 7f 88 50 00 cmpw cr7,r8,r10 ffc1041c: 41 9e 00 78 beq- cr7,ffc10494 <_Thread_Reset_timeslice+0xa0> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc10420: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc10424: 38 eb 00 04 addi r7,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc10428: 81 09 00 04 lwz r8,4(r9) next->previous = previous; previous->next = next; ffc1042c: 91 48 00 00 stw r10,0(r8) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc10430: 91 0a 00 04 stw r8,4(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc10434: 90 e9 00 00 stw r7,0(r9) old_last_node = the_chain->last; ffc10438: 81 4b 00 08 lwz r10,8(r11) the_chain->last = the_node; ffc1043c: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc10440: 91 49 00 04 stw r10,4(r9) 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; ffc10444: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc10448: 7d 40 00 a6 mfmsr r10 ffc1044c: 7c 00 01 24 mtmsr r0 ffc10450: 7d 40 01 24 mtmsr r10 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc10454: 3d 40 00 00 lis r10,0 ffc10458: 81 0a 27 8c lwz r8,10124(r10) ffc1045c: 7f 89 40 00 cmpw cr7,r9,r8 ffc10460: 41 9e 00 18 beq- cr7,ffc10478 <_Thread_Reset_timeslice+0x84> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; ffc10464: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc10468: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc1046c: 99 69 27 c0 stb r11,10176(r9) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc10470: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc10474: 4e 80 00 20 blr <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc10478: 81 2b 00 00 lwz r9,0(r11) _Context_Switch_necessary = true; ffc1047c: 39 60 00 01 li r11,1 _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc10480: 91 2a 27 8c stw r9,10124(r10) _Context_Switch_necessary = true; ffc10484: 3d 20 00 00 lis r9,0 ffc10488: 99 69 27 c0 stb r11,10176(r9) ffc1048c: 7c 00 01 24 mtmsr r0 ffc10490: 4e 80 00 20 blr ffc10494: 7c 00 01 24 mtmsr r0 ffc10498: 4e 80 00 20 blr ffc0ccfc <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0ccfc: 94 21 ff e8 stwu r1,-24(r1) ffc0cd00: 7c 08 02 a6 mflr r0 ffc0cd04: 90 01 00 1c stw r0,28(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0cd08: 80 03 00 10 lwz r0,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0cd0c: 93 e1 00 14 stw r31,20(r1) ffc0cd10: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0cd14: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0cd18: 93 c1 00 10 stw r30,16(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0cd1c: 38 00 00 00 li r0,0 ffc0cd20: 41 82 00 20 beq- ffc0cd40 <_Thread_Restart+0x44> return true; } return false; } ffc0cd24: 7c 03 03 78 mr r3,r0 ffc0cd28: 80 01 00 1c lwz r0,28(r1) ffc0cd2c: 83 c1 00 10 lwz r30,16(r1) ffc0cd30: 7c 08 03 a6 mtlr r0 ffc0cd34: 83 e1 00 14 lwz r31,20(r1) ffc0cd38: 38 21 00 18 addi r1,r1,24 ffc0cd3c: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0cd40: 90 81 00 08 stw r4,8(r1) _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0cd44: 3f c0 00 00 lis r30,0 Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0cd48: 90 a1 00 0c stw r5,12(r1) ffc0cd4c: 48 00 01 e5 bl ffc0cf30 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0cd50: 7f e3 fb 78 mr r3,r31 ffc0cd54: 80 81 00 08 lwz r4,8(r1) ffc0cd58: 80 a1 00 0c lwz r5,12(r1) ffc0cd5c: 48 00 49 3d bl ffc11698 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0cd60: 7f e3 fb 78 mr r3,r31 ffc0cd64: 48 00 44 e9 bl ffc1124c <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0cd68: 7f e3 fb 78 mr r3,r31 ffc0cd6c: 48 00 48 51 bl ffc115bc <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0cd70: 7f e3 fb 78 mr r3,r31 ffc0cd74: 48 00 0b 05 bl ffc0d878 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0cd78: 81 3e 27 fc lwz r9,10236(r30) ffc0cd7c: 38 00 00 01 li r0,1 ffc0cd80: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0cd84: 40 9e ff a0 bne+ cr7,ffc0cd24 <_Thread_Restart+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0cd88: 80 1f 01 3c lwz r0,316(r31) ffc0cd8c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd90: 41 9e 00 10 beq- cr7,ffc0cda0 <_Thread_Restart+0xa4> _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0cd94: 38 7f 01 3c addi r3,r31,316 ffc0cd98: 48 01 4e c9 bl ffc21c60 <_CPU_Context_restore_fp> ffc0cd9c: 83 fe 27 fc lwz r31,10236(r30) #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0cda0: 38 7f 00 dc addi r3,r31,220 ffc0cda4: 48 01 50 7d bl ffc21e20 <_CPU_Context_restore> ffc0cda8: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0cdac: 4b ff ff 78 b ffc0cd24 <_Thread_Restart+0x28> <== NOT EXECUTED ffc0b900 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; ffc0b900: 80 04 00 14 lwz r0,20(r4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b904: 39 04 00 3c addi r8,r4,60 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0b908: 94 21 ff f0 stwu r1,-16(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b90c: 39 64 00 38 addi r11,r4,56 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0b910: 70 09 00 20 andi. r9,r0,32 _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 ]; ffc0b914: 54 0a d1 be rlwinm r10,r0,26,6,31 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b918: 91 04 00 38 stw r8,56(r4) ffc0b91c: 1d 4a 00 0c mulli r10,r10,12 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0b920: 93 e1 00 0c stw r31,12(r1) the_chain->permanent_null = NULL; ffc0b924: 39 00 00 00 li r8,0 _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 ]; block_state = the_thread_queue->state; ffc0b928: 81 23 00 38 lwz r9,56(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 ]; ffc0b92c: 7d 43 52 14 add r10,r3,r10 ffc0b930: 91 04 00 3c stw r8,60(r4) the_chain->last = _Chain_Head(the_chain); ffc0b934: 91 64 00 40 stw r11,64(r4) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0b938: 40 82 00 7c bne- ffc0b9b4 <_Thread_queue_Enqueue_priority+0xb4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0b93c: 39 8a 00 04 addi r12,r10,4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b940: 7c c0 00 a6 mfmsr r6 ffc0b944: 7d 70 42 a6 mfsprg r11,0 ffc0b948: 7c cb 58 78 andc r11,r6,r11 ffc0b94c: 7d 60 01 24 mtmsr r11 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; ffc0b950: 81 6a 00 00 lwz r11,0(r10) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b954: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b958: 40 be 00 2c bne+ cr7,ffc0b984 <_Thread_queue_Enqueue_priority+0x84> ffc0b95c: 48 00 01 78 b ffc0bad4 <_Thread_queue_Enqueue_priority+0x1d4> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b960: 7c e0 00 a6 mfmsr r7 ffc0b964: 7c c0 01 24 mtmsr r6 ffc0b968: 7c e0 01 24 mtmsr r7 search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0b96c: 80 eb 00 10 lwz r7,16(r11) ffc0b970: 7d 3f 38 39 and. r31,r9,r7 ffc0b974: 41 82 00 f4 beq- ffc0ba68 <_Thread_queue_Enqueue_priority+0x168> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; ffc0b978: 81 6b 00 00 lwz r11,0(r11) 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 ) ) { ffc0b97c: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b980: 41 9e 00 10 beq- cr7,ffc0b990 <_Thread_queue_Enqueue_priority+0x90> search_priority = search_thread->current_priority; ffc0b984: 81 0b 00 14 lwz r8,20(r11) if ( priority <= search_priority ) ffc0b988: 7f 80 40 40 cmplw cr7,r0,r8 ffc0b98c: 41 9d ff d4 bgt+ cr7,ffc0b960 <_Thread_queue_Enqueue_priority+0x60> 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 ) ) { ffc0b990: 7c ca 33 78 mr r10,r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0b994: 81 23 00 30 lwz r9,48(r3) ffc0b998: 2f 89 00 01 cmpwi cr7,r9,1 ffc0b99c: 41 9e 00 d4 beq- cr7,ffc0ba70 <_Thread_queue_Enqueue_priority+0x170> * 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; ffc0b9a0: 91 45 00 00 stw r10,0(r5) return the_thread_queue->sync_state; ffc0b9a4: 7d 23 4b 78 mr r3,r9 } ffc0b9a8: 83 e1 00 0c lwz r31,12(r1) ffc0b9ac: 38 21 00 10 addi r1,r1,16 ffc0b9b0: 4e 80 00 20 blr ffc0b9b4: 3d 80 00 00 lis r12,0 ffc0b9b8: 39 8c 26 a4 addi r12,r12,9892 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; ffc0b9bc: 89 0c 00 00 lbz r8,0(r12) ffc0b9c0: 39 08 00 01 addi r8,r8,1 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b9c4: 7c c0 00 a6 mfmsr r6 ffc0b9c8: 7d 70 42 a6 mfsprg r11,0 ffc0b9cc: 7c cb 58 78 andc r11,r6,r11 ffc0b9d0: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; ffc0b9d4: 81 6a 00 08 lwz r11,8(r10) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0b9d8: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0b9dc: 40 be 00 2c bne+ cr7,ffc0ba08 <_Thread_queue_Enqueue_priority+0x108> ffc0b9e0: 48 00 00 34 b ffc0ba14 <_Thread_queue_Enqueue_priority+0x114> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b9e4: 7c e0 00 a6 mfmsr r7 ffc0b9e8: 7c c0 01 24 mtmsr r6 ffc0b9ec: 7c e0 01 24 mtmsr r7 search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0b9f0: 80 eb 00 10 lwz r7,16(r11) ffc0b9f4: 7d 3f 38 39 and. r31,r9,r7 ffc0b9f8: 41 82 00 68 beq- ffc0ba60 <_Thread_queue_Enqueue_priority+0x160> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) ffc0b9fc: 81 6b 00 04 lwz r11,4(r11) 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 ) ) { ffc0ba00: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0ba04: 41 9e 00 10 beq- cr7,ffc0ba14 <_Thread_queue_Enqueue_priority+0x114> search_priority = search_thread->current_priority; ffc0ba08: 81 0b 00 14 lwz r8,20(r11) if ( priority >= search_priority ) ffc0ba0c: 7f 80 40 40 cmplw cr7,r0,r8 ffc0ba10: 41 9c ff d4 blt+ cr7,ffc0b9e4 <_Thread_queue_Enqueue_priority+0xe4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0ba14: 81 23 00 30 lwz r9,48(r3) 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 ) ) { ffc0ba18: 7c ca 33 78 mr r10,r6 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0ba1c: 2f 89 00 01 cmpwi cr7,r9,1 ffc0ba20: 40 9e ff 80 bne+ cr7,ffc0b9a0 <_Thread_queue_Enqueue_priority+0xa0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0ba24: 7f 80 40 00 cmpw cr7,r0,r8 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0ba28: 38 00 00 00 li r0,0 ffc0ba2c: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0ba30: 41 9e 00 7c beq- cr7,ffc0baac <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; ffc0ba34: 81 2b 00 00 lwz r9,0(r11) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; ffc0ba38: 91 64 00 04 stw r11,4(r4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; ffc0ba3c: 91 24 00 00 stw r9,0(r4) the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0ba40: 90 64 00 44 stw r3,68(r4) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; ffc0ba44: 90 8b 00 00 stw r4,0(r11) next_node->previous = the_node; ffc0ba48: 90 89 00 04 stw r4,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ba4c: 7c c0 01 24 mtmsr r6 ffc0ba50: 38 60 00 01 li r3,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0ba54: 83 e1 00 0c lwz r31,12(r1) ffc0ba58: 38 21 00 10 addi r1,r1,16 ffc0ba5c: 4e 80 00 20 blr ffc0ba60: 7c c0 01 24 mtmsr r6 ffc0ba64: 4b ff ff 58 b ffc0b9bc <_Thread_queue_Enqueue_priority+0xbc> ffc0ba68: 7c c0 01 24 mtmsr r6 <== NOT EXECUTED ffc0ba6c: 4b ff fe d4 b ffc0b940 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0ba70: 7f 80 40 00 cmpw cr7,r0,r8 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0ba74: 38 00 00 00 li r0,0 ffc0ba78: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0ba7c: 41 9e 00 30 beq- cr7,ffc0baac <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; ffc0ba80: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0ba84: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0ba88: 91 24 00 04 stw r9,4(r4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0ba8c: 90 64 00 44 stw r3,68(r4) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; ffc0ba90: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0ba94: 90 8b 00 04 stw r4,4(r11) ffc0ba98: 7c c0 01 24 mtmsr r6 ffc0ba9c: 38 60 00 01 li r3,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0baa0: 83 e1 00 0c lwz r31,12(r1) ffc0baa4: 38 21 00 10 addi r1,r1,16 ffc0baa8: 4e 80 00 20 blr ffc0baac: 39 6b 00 3c addi r11,r11,60 the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0bab0: 90 64 00 44 stw r3,68(r4) _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; ffc0bab4: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0bab8: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0babc: 91 24 00 04 stw r9,4(r4) previous_node->next = the_node; ffc0bac0: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0bac4: 90 8b 00 04 stw r4,4(r11) ffc0bac8: 7d 40 01 24 mtmsr r10 ffc0bacc: 38 60 00 01 li r3,1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0bad0: 4b ff fe d8 b ffc0b9a8 <_Thread_queue_Enqueue_priority+0xa8> 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 ) ) { ffc0bad4: 7c ca 33 78 mr r10,r6 ffc0bad8: 39 00 ff ff li r8,-1 ffc0badc: 4b ff fe b8 b ffc0b994 <_Thread_queue_Enqueue_priority+0x94> ffc0bbc8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0bbc8: 94 21 ff d8 stwu r1,-40(r1) ffc0bbcc: 7c 08 02 a6 mflr r0 ffc0bbd0: 93 e1 00 24 stw r31,36(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0bbd4: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0bbd8: 93 c1 00 20 stw r30,32(r1) ffc0bbdc: 7c 9e 23 78 mr r30,r4 ffc0bbe0: 90 01 00 2c stw r0,44(r1) ffc0bbe4: 93 a1 00 1c stw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0bbe8: 41 82 00 10 beq- ffc0bbf8 <_Thread_queue_Requeue+0x30> /* * 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 ) { ffc0bbec: 80 1f 00 34 lwz r0,52(r31) ffc0bbf0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bbf4: 41 9e 00 20 beq- cr7,ffc0bc14 <_Thread_queue_Requeue+0x4c> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0bbf8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0bbfc: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0bc00: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0bc04: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0bc08: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0bc0c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0bc10: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bc14: 7f a0 00 a6 mfmsr r29 ffc0bc18: 7d 30 42 a6 mfsprg r9,0 ffc0bc1c: 7f a9 48 78 andc r9,r29,r9 ffc0bc20: 7d 20 01 24 mtmsr r9 Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0bc24: 3d 60 00 03 lis r11,3 ffc0bc28: 81 24 00 10 lwz r9,16(r4) ffc0bc2c: 61 6b be e0 ori r11,r11,48864 ffc0bc30: 7d 6a 48 39 and. r10,r11,r9 ffc0bc34: 40 82 00 24 bne- ffc0bc58 <_Thread_queue_Requeue+0x90> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bc38: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0bc3c: 80 01 00 2c lwz r0,44(r1) ffc0bc40: 83 a1 00 1c lwz r29,28(r1) ffc0bc44: 7c 08 03 a6 mtlr r0 ffc0bc48: 83 c1 00 20 lwz r30,32(r1) ffc0bc4c: 83 e1 00 24 lwz r31,36(r1) ffc0bc50: 38 21 00 28 addi r1,r1,40 ffc0bc54: 4e 80 00 20 blr ffc0bc58: 90 1f 00 30 stw r0,48(r31) 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 ); ffc0bc5c: 38 a0 00 01 li r5,1 ffc0bc60: 48 00 45 3d bl ffc1019c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0bc64: 7f e3 fb 78 mr r3,r31 ffc0bc68: 7f c4 f3 78 mr r4,r30 ffc0bc6c: 38 a1 00 08 addi r5,r1,8 ffc0bc70: 4b ff fc 91 bl ffc0b900 <_Thread_queue_Enqueue_priority> ffc0bc74: 7f a0 01 24 mtmsr r29 ffc0bc78: 4b ff ff c4 b ffc0bc3c <_Thread_queue_Requeue+0x74> ffc0ee80 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0ee80: 94 21 ff e0 stwu r1,-32(r1) ffc0ee84: 7c 08 02 a6 mflr r0 ffc0ee88: 90 01 00 24 stw r0,36(r1) ffc0ee8c: 93 c1 00 18 stw r30,24(r1) ffc0ee90: 7c be 2b 78 mr r30,r5 ffc0ee94: 93 e1 00 1c stw r31,28(r1) ffc0ee98: 7c 7f 1b 78 mr r31,r3 ffc0ee9c: 93 61 00 0c stw r27,12(r1) ffc0eea0: 93 81 00 10 stw r28,16(r1) ffc0eea4: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0eea8: 7c 00 00 a6 mfmsr r0 ffc0eeac: 7d 30 42 a6 mfsprg r9,0 ffc0eeb0: 7c 09 48 78 andc r9,r0,r9 ffc0eeb4: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0eeb8: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0eebc: 3b 83 00 04 addi r28,r3,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ffc0eec0: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0eec4: 41 9e 00 6c beq- cr7,ffc0ef30 <_Watchdog_Adjust+0xb0> switch ( direction ) { ffc0eec8: 2f 84 00 00 cmpwi cr7,r4,0 ffc0eecc: 40 9e 00 8c bne- cr7,ffc0ef58 <_Watchdog_Adjust+0xd8> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0eed0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0eed4: 41 9e 00 5c beq- cr7,ffc0ef30 <_Watchdog_Adjust+0xb0> if ( units < _Watchdog_First( header )->delta_interval ) { ffc0eed8: 83 a9 00 10 lwz r29,16(r9) _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0eedc: 3b 60 00 01 li r27,1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0eee0: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0eee4: 40 bc 00 18 bge+ cr7,ffc0eefc <_Watchdog_Adjust+0x7c> ffc0eee8: 48 00 00 ac b ffc0ef94 <_Watchdog_Adjust+0x114> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0eeec: 41 82 00 44 beq- ffc0ef30 <_Watchdog_Adjust+0xb0> if ( units < _Watchdog_First( header )->delta_interval ) { ffc0eef0: 83 a9 00 10 lwz r29,16(r9) ffc0eef4: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0eef8: 41 9d 00 9c bgt- cr7,ffc0ef94 <_Watchdog_Adjust+0x114> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0eefc: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ef00: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0ef04: 7f e3 fb 78 mr r3,r31 ffc0ef08: 48 00 03 31 bl ffc0f238 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ef0c: 7c 00 00 a6 mfmsr r0 ffc0ef10: 7d 30 42 a6 mfsprg r9,0 ffc0ef14: 7c 09 48 78 andc r9,r0,r9 ffc0ef18: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0ef1c: 81 7f 00 00 lwz r11,0(r31) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0ef20: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0ef24: 7f 9c 58 00 cmpw cr7,r28,r11 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); ffc0ef28: 7d 69 5b 78 mr r9,r11 ffc0ef2c: 40 9e ff c0 bne+ cr7,ffc0eeec <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ef30: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0ef34: 80 01 00 24 lwz r0,36(r1) ffc0ef38: 83 61 00 0c lwz r27,12(r1) ffc0ef3c: 7c 08 03 a6 mtlr r0 ffc0ef40: 83 81 00 10 lwz r28,16(r1) ffc0ef44: 83 a1 00 14 lwz r29,20(r1) ffc0ef48: 83 c1 00 18 lwz r30,24(r1) ffc0ef4c: 83 e1 00 1c lwz r31,28(r1) ffc0ef50: 38 21 00 20 addi r1,r1,32 ffc0ef54: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0ef58: 2f 84 00 01 cmpwi cr7,r4,1 ffc0ef5c: 40 9e ff d4 bne+ cr7,ffc0ef30 <_Watchdog_Adjust+0xb0> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0ef60: 81 69 00 10 lwz r11,16(r9) ffc0ef64: 7f cb 2a 14 add r30,r11,r5 ffc0ef68: 93 c9 00 10 stw r30,16(r9) ffc0ef6c: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0ef70: 80 01 00 24 lwz r0,36(r1) ffc0ef74: 83 61 00 0c lwz r27,12(r1) ffc0ef78: 7c 08 03 a6 mtlr r0 ffc0ef7c: 83 81 00 10 lwz r28,16(r1) ffc0ef80: 83 a1 00 14 lwz r29,20(r1) ffc0ef84: 83 c1 00 18 lwz r30,24(r1) ffc0ef88: 83 e1 00 1c lwz r31,28(r1) ffc0ef8c: 38 21 00 20 addi r1,r1,32 ffc0ef90: 4e 80 00 20 blr _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; ffc0ef94: 7f de e8 50 subf r30,r30,r29 ffc0ef98: 93 c9 00 10 stw r30,16(r9) break; ffc0ef9c: 4b ff ff 94 b ffc0ef30 <_Watchdog_Adjust+0xb0> ffc12dc0 : int killinfo( pid_t pid, int sig, const union sigval *value ) { ffc12dc0: 94 21 ff d0 stwu r1,-48(r1) ffc12dc4: 7c 08 02 a6 mflr r0 ffc12dc8: 93 61 00 1c stw r27,28(r1) ffc12dcc: 7c bb 2b 78 mr r27,r5 ffc12dd0: 93 81 00 20 stw r28,32(r1) ffc12dd4: 7c 9c 23 78 mr r28,r4 ffc12dd8: 93 e1 00 2c stw r31,44(r1) ffc12ddc: 7c 7f 1b 78 mr r31,r3 ffc12de0: 90 01 00 34 stw r0,52(r1) ffc12de4: 93 41 00 18 stw r26,24(r1) ffc12de8: 93 a1 00 24 stw r29,36(r1) ffc12dec: 93 c1 00 28 stw r30,40(r1) POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) ffc12df0: 4b ff ea 75 bl ffc11864 ffc12df4: 7f 83 f8 00 cmpw cr7,r3,r31 ffc12df8: 40 9e 02 a0 bne- cr7,ffc13098 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) ffc12dfc: 2f 9c 00 00 cmpwi cr7,r28,0 ffc12e00: 41 9e 02 ac beq- cr7,ffc130ac static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc12e04: 38 1c ff ff addi r0,r28,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc12e08: 2b 80 00 1f cmplwi cr7,r0,31 ffc12e0c: 41 9d 02 a0 bgt- cr7,ffc130ac rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc12e10: 1f dc 00 0c mulli r30,r28,12 ffc12e14: 3f a0 00 00 lis r29,0 ffc12e18: 3b bd 31 70 addi r29,r29,12656 ffc12e1c: 7d 3d f2 14 add r9,r29,r30 ffc12e20: 81 29 00 08 lwz r9,8(r9) ffc12e24: 38 60 00 00 li r3,0 ffc12e28: 2f 89 00 01 cmpwi cr7,r9,1 ffc12e2c: 41 9e 01 c8 beq- cr7,ffc12ff4 /* * 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 ) ) ffc12e30: 2f 9c 00 08 cmpwi cr7,r28,8 ffc12e34: 41 9e 01 e8 beq- cr7,ffc1301c ffc12e38: 2f 9c 00 04 cmpwi cr7,r28,4 ffc12e3c: 41 9e 01 e0 beq- cr7,ffc1301c ffc12e40: 2f 9c 00 0b cmpwi cr7,r28,11 ffc12e44: 41 9e 01 d8 beq- cr7,ffc1301c * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { ffc12e48: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; ffc12e4c: 93 81 00 08 stw r28,8(r1) static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); ffc12e50: 3b e0 00 01 li r31,1 siginfo->si_code = SI_USER; ffc12e54: 93 e1 00 0c stw r31,12(r1) ffc12e58: 7f ff 00 30 slw r31,r31,r0 if ( !value ) { ffc12e5c: 41 9e 02 34 beq- cr7,ffc13090 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; ffc12e60: 80 1b 00 00 lwz r0,0(r27) ffc12e64: 90 01 00 10 stw r0,16(r1) ffc12e68: 3d 20 00 00 lis r9,0 ffc12e6c: 81 69 27 70 lwz r11,10096(r9) ffc12e70: 38 0b 00 01 addi r0,r11,1 ffc12e74: 90 09 27 70 stw r0,10096(r9) /* * 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; ffc12e78: 3d 20 00 00 lis r9,0 ffc12e7c: 80 69 27 b0 lwz r3,10160(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12e80: 81 23 01 48 lwz r9,328(r3) ffc12e84: 80 09 00 cc lwz r0,204(r9) ffc12e88: 7f e6 00 79 andc. r6,r31,r0 ffc12e8c: 40 82 01 30 bne- ffc12fbc /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; ffc12e90: 3d 40 00 00 lis r10,0 ffc12e94: 81 2a 32 fc lwz r9,13052(r10) ffc12e98: 39 4a 32 fc addi r10,r10,13052 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc12e9c: 39 4a 00 04 addi r10,r10,4 ffc12ea0: 7f 89 50 00 cmpw cr7,r9,r10 ffc12ea4: 41 9e 00 54 beq- cr7,ffc12ef8 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12ea8: 80 09 00 30 lwz r0,48(r9) for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; ffc12eac: 7d 23 4b 78 mr r3,r9 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12eb0: 81 69 01 48 lwz r11,328(r9) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12eb4: 7f e8 00 39 and. r8,r31,r0 ffc12eb8: 40 82 01 04 bne- ffc12fbc /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc12ebc: 80 0b 00 cc lwz r0,204(r11) ffc12ec0: 7f eb 00 79 andc. r11,r31,r0 ffc12ec4: 41 a2 00 24 beq+ ffc12ee8 ffc12ec8: 48 00 00 f4 b ffc12fbc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12ecc: 80 09 00 30 lwz r0,48(r9) <== 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 ]; ffc12ed0: 81 69 01 48 lwz r11,328(r9) <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12ed4: 7f fa 00 39 and. r26,r31,r0 <== NOT EXECUTED ffc12ed8: 40 82 00 e4 bne- ffc12fbc <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc12edc: 80 0b 00 cc lwz r0,204(r11) <== NOT EXECUTED ffc12ee0: 7f fb 00 79 andc. r27,r31,r0 <== NOT EXECUTED ffc12ee4: 40 82 00 d8 bne- ffc12fbc <== NOT EXECUTED 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 ) { ffc12ee8: 81 29 00 00 lwz r9,0(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; ffc12eec: 7f 89 50 00 cmpw cr7,r9,r10 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; ffc12ef0: 7d 23 4b 78 mr r3,r9 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; ffc12ef4: 40 9e ff d8 bne+ cr7,ffc12ecc * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; ffc12ef8: 3d 20 00 00 lis r9,0 ffc12efc: 88 e9 26 a4 lbz r7,9892(r9) ffc12f00: 3c a0 00 00 lis r5,0 ffc12f04: 38 a5 2c 28 addi r5,r5,11304 ffc12f08: 38 e7 00 01 addi r7,r7,1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( ffc12f0c: 38 85 00 0c addi r4,r5,12 ffc12f10: 38 60 00 00 li r3,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 ] ) ffc12f14: 81 25 00 00 lwz r9,0(r5) ffc12f18: 2f 89 00 00 cmpwi cr7,r9,0 ffc12f1c: 41 9e 00 8c beq- cr7,ffc12fa8 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; ffc12f20: 81 29 00 04 lwz r9,4(r9) */ if ( !the_info ) continue; #endif maximum = the_info->maximum; ffc12f24: a1 49 00 10 lhz r10,16(r9) object_table = the_info->local_table; ffc12f28: 81 09 00 1c lwz r8,28(r9) for ( index = 1 ; index <= maximum ; index++ ) { ffc12f2c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12f30: 41 9e 00 78 beq- cr7,ffc12fa8 ffc12f34: 39 20 00 01 li r9,1 the_thread = (Thread_Control *) object_table[ index ]; ffc12f38: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc12f3c: 7d 68 00 2e lwzx r11,r8,r0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc12f40: 39 29 00 01 addi r9,r9,1 ffc12f44: 7f 8a 48 40 cmplw cr7,r10,r9 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) ffc12f48: 2f 0b 00 00 cmpwi cr6,r11,0 ffc12f4c: 41 9a 00 58 beq- cr6,ffc12fa4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) ffc12f50: 80 0b 00 14 lwz r0,20(r11) ffc12f54: 7f 00 38 40 cmplw cr6,r0,r7 ffc12f58: 41 99 00 4c bgt- cr6,ffc12fa4 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12f5c: 80 cb 01 48 lwz r6,328(r11) ffc12f60: 80 c6 00 cc lwz r6,204(r6) ffc12f64: 7f fa 30 79 andc. r26,r31,r6 ffc12f68: 41 82 00 3c beq- ffc12fa4 * * 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 ) { ffc12f6c: 41 98 00 30 blt- cr6,ffc12f9c * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { ffc12f70: 80 c3 00 10 lwz r6,16(r3) ffc12f74: 2f 06 00 00 cmpwi cr6,r6,0 ffc12f78: 41 9a 00 2c beq- cr6,ffc12fa4 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc12f7c: 83 6b 00 10 lwz r27,16(r11) continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc12f80: 74 da 10 00 andis. r26,r6,4096 */ if ( !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc12f84: 2f 1b 00 00 cmpwi cr6,r27,0 ffc12f88: 41 9a 00 14 beq- cr6,ffc12f9c 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) ) { ffc12f8c: 57 66 27 fe rlwinm r6,r27,4,31,31 ffc12f90: 2f 06 00 00 cmpwi cr6,r6,0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc12f94: 40 82 00 10 bne- ffc12fa4 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { ffc12f98: 41 9a 00 0c beq- cr6,ffc12fa4 ffc12f9c: 7c 07 03 78 mr r7,r0 ffc12fa0: 7d 63 5b 78 mr r3,r11 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc12fa4: 40 9c ff 94 bge+ cr7,ffc12f38 ffc12fa8: 38 a5 00 04 addi r5,r5,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++) { ffc12fac: 7f 85 20 00 cmpw cr7,r5,r4 ffc12fb0: 40 9e ff 64 bne+ cr7,ffc12f14 } } } } if ( interested ) { ffc12fb4: 2f 83 00 00 cmpwi cr7,r3,0 ffc12fb8: 41 9e 00 20 beq- cr7,ffc12fd8 * 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; ffc12fbc: 38 00 00 01 li r0,1 ffc12fc0: 98 03 00 74 stb r0,116(r3) /* * 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 ) ) { ffc12fc4: 7f 84 e3 78 mr r4,r28 ffc12fc8: 38 a1 00 08 addi r5,r1,8 ffc12fcc: 48 00 01 d5 bl ffc131a0 <_POSIX_signals_Unblock_thread> ffc12fd0: 2f 83 00 00 cmpwi cr7,r3,0 ffc12fd4: 40 9e 00 18 bne- cr7,ffc12fec /* * 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 ); ffc12fd8: 7f e3 fb 78 mr r3,r31 ffc12fdc: 48 00 01 85 bl ffc13160 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { ffc12fe0: 7c 1d f0 2e lwzx r0,r29,r30 ffc12fe4: 2f 80 00 02 cmpwi cr7,r0,2 ffc12fe8: 41 9e 00 68 beq- cr7,ffc13050 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); ffc12fec: 4b ff 81 b5 bl ffc0b1a0 <_Thread_Enable_dispatch> ffc12ff0: 38 60 00 00 li r3,0 return 0; } ffc12ff4: 80 01 00 34 lwz r0,52(r1) ffc12ff8: 83 41 00 18 lwz r26,24(r1) ffc12ffc: 7c 08 03 a6 mtlr r0 ffc13000: 83 61 00 1c lwz r27,28(r1) ffc13004: 83 81 00 20 lwz r28,32(r1) ffc13008: 83 a1 00 24 lwz r29,36(r1) ffc1300c: 83 c1 00 28 lwz r30,40(r1) ffc13010: 83 e1 00 2c lwz r31,44(r1) ffc13014: 38 21 00 30 addi r1,r1,48 ffc13018: 4e 80 00 20 blr * 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 ); ffc1301c: 48 00 04 09 bl ffc13424 ffc13020: 7f 84 e3 78 mr r4,r28 ffc13024: 48 00 02 ed bl ffc13310 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc13028: 80 01 00 34 lwz r0,52(r1) ffc1302c: 83 41 00 18 lwz r26,24(r1) ffc13030: 7c 08 03 a6 mtlr r0 ffc13034: 83 61 00 1c lwz r27,28(r1) ffc13038: 83 81 00 20 lwz r28,32(r1) ffc1303c: 83 a1 00 24 lwz r29,36(r1) ffc13040: 83 c1 00 28 lwz r30,40(r1) ffc13044: 83 e1 00 2c lwz r31,44(r1) ffc13048: 38 21 00 30 addi r1,r1,48 ffc1304c: 4e 80 00 20 blr */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) ffc13050: 3c 60 00 00 lis r3,0 ffc13054: 38 63 32 f0 addi r3,r3,13040 ffc13058: 4b ff 64 c9 bl ffc09520 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { ffc1305c: 7c 64 1b 79 mr. r4,r3 ffc13060: 41 82 00 60 beq- ffc130c0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc13064: 81 21 00 0c lwz r9,12(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc13068: 3c 60 00 00 lis r3,0 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1306c: 80 01 00 10 lwz r0,16(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc13070: 38 63 33 3c addi r3,r3,13116 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc13074: 81 61 00 08 lwz r11,8(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc13078: 7c 63 f2 14 add r3,r3,r30 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1307c: 91 24 00 0c stw r9,12(r4) ffc13080: 91 64 00 08 stw r11,8(r4) ffc13084: 90 04 00 10 stw r0,16(r4) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc13088: 4b ff 64 69 bl ffc094f0 <_Chain_Append> ffc1308c: 4b ff ff 60 b ffc12fec */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; ffc13090: 93 61 00 10 stw r27,16(r1) ffc13094: 4b ff fd d4 b ffc12e68 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); ffc13098: 48 00 04 89 bl ffc13520 <__errno> ffc1309c: 38 00 00 03 li r0,3 ffc130a0: 90 03 00 00 stw r0,0(r3) ffc130a4: 38 60 ff ff li r3,-1 ffc130a8: 4b ff ff 4c b ffc12ff4 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc130ac: 48 00 04 75 bl ffc13520 <__errno> ffc130b0: 38 00 00 16 li r0,22 ffc130b4: 90 03 00 00 stw r0,0(r3) ffc130b8: 38 60 ff ff li r3,-1 ffc130bc: 4b ff ff 38 b ffc12ff4 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(); ffc130c0: 4b ff 80 e1 bl ffc0b1a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc130c4: 48 00 04 5d bl ffc13520 <__errno> ffc130c8: 38 00 00 0b li r0,11 ffc130cc: 90 03 00 00 stw r0,0(r3) ffc130d0: 38 60 ff ff li r3,-1 ffc130d4: 4b ff ff 20 b ffc12ff4 ffc09ff0 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc09ff0: 94 21 ff d8 stwu r1,-40(r1) ffc09ff4: 7c 08 02 a6 mflr r0 ffc09ff8: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc09ffc: 7c 7d 1b 79 mr. r29,r3 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a000: 90 01 00 2c stw r0,44(r1) ffc0a004: 93 c1 00 20 stw r30,32(r1) ffc0a008: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a00c: 41 82 00 9c beq- ffc0a0a8 * * 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 ); ffc0a010: 7c 83 23 78 mr r3,r4 ffc0a014: 38 81 00 0c addi r4,r1,12 ffc0a018: 48 00 7f 99 bl ffc11fb0 <_POSIX_Absolute_timeout_to_ticks> ffc0a01c: 80 9d 00 00 lwz r4,0(r29) ffc0a020: 7c 7e 1b 78 mr r30,r3 ffc0a024: 3c 60 00 00 lis r3,0 ffc0a028: 38 63 2e 38 addi r3,r3,11832 ffc0a02c: 38 a1 00 08 addi r5,r1,8 ffc0a030: 48 00 37 75 bl ffc0d7a4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc0a034: 80 01 00 08 lwz r0,8(r1) ffc0a038: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a03c: 40 9e 00 6c bne- cr7,ffc0a0a8 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, ffc0a040: 6b df 00 03 xori r31,r30,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( ffc0a044: 80 9d 00 00 lwz r4,0(r29) ffc0a048: 7f ff 00 34 cntlzw r31,r31 ffc0a04c: 80 c1 00 0c lwz r6,12(r1) ffc0a050: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc0a054: 38 63 00 10 addi r3,r3,16 ffc0a058: 7f e5 fb 78 mr r5,r31 ffc0a05c: 38 e0 00 00 li r7,0 ffc0a060: 48 00 26 c9 bl ffc0c728 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc0a064: 48 00 43 0d bl ffc0e370 <_Thread_Enable_dispatch> if ( !do_wait ) { ffc0a068: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a06c: 40 9e 00 74 bne- cr7,ffc0a0e0 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { ffc0a070: 3d 20 00 00 lis r9,0 ffc0a074: 81 29 27 fc lwz r9,10236(r9) ffc0a078: 80 09 00 34 lwz r0,52(r9) ffc0a07c: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a080: 41 9e 00 48 beq- cr7,ffc0a0c8 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a084: 7c 03 03 78 mr r3,r0 ffc0a088: 48 00 01 69 bl ffc0a1f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } ffc0a08c: 80 01 00 2c lwz r0,44(r1) ffc0a090: 83 a1 00 1c lwz r29,28(r1) ffc0a094: 7c 08 03 a6 mtlr r0 ffc0a098: 83 c1 00 20 lwz r30,32(r1) ffc0a09c: 83 e1 00 24 lwz r31,36(r1) ffc0a0a0: 38 21 00 28 addi r1,r1,40 ffc0a0a4: 4e 80 00 20 blr break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a0a8: 38 60 00 16 li r3,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc0a0ac: 80 01 00 2c lwz r0,44(r1) ffc0a0b0: 83 a1 00 1c lwz r29,28(r1) ffc0a0b4: 7c 08 03 a6 mtlr r0 ffc0a0b8: 83 c1 00 20 lwz r30,32(r1) ffc0a0bc: 83 e1 00 24 lwz r31,36(r1) ffc0a0c0: 38 21 00 28 addi r1,r1,40 ffc0a0c4: 4e 80 00 20 blr ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { ffc0a0c8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a0cc: 41 be ff dc beq- cr7,ffc0a0a8 ffc0a0d0: 2b 9e 00 02 cmplwi cr7,r30,2 ffc0a0d4: 38 60 00 74 li r3,116 ffc0a0d8: 40 bd ff d4 ble- cr7,ffc0a0ac ffc0a0dc: 4b ff ff a8 b ffc0a084 <== NOT EXECUTED ffc0a0e0: 3d 20 00 00 lis r9,0 ffc0a0e4: 81 29 27 fc lwz r9,10236(r9) ffc0a0e8: 80 09 00 34 lwz r0,52(r9) ffc0a0ec: 4b ff ff 98 b ffc0a084 ffc0a0f0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a0f0: 94 21 ff d8 stwu r1,-40(r1) ffc0a0f4: 7c 08 02 a6 mflr r0 ffc0a0f8: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a0fc: 7c 7d 1b 79 mr. r29,r3 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a100: 90 01 00 2c stw r0,44(r1) ffc0a104: 93 c1 00 20 stw r30,32(r1) ffc0a108: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a10c: 41 82 00 9c beq- ffc0a1a8 * * 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 ); ffc0a110: 7c 83 23 78 mr r3,r4 ffc0a114: 38 81 00 0c addi r4,r1,12 ffc0a118: 48 00 7e 99 bl ffc11fb0 <_POSIX_Absolute_timeout_to_ticks> ffc0a11c: 80 9d 00 00 lwz r4,0(r29) ffc0a120: 7c 7e 1b 78 mr r30,r3 ffc0a124: 3c 60 00 00 lis r3,0 ffc0a128: 38 63 2e 38 addi r3,r3,11832 ffc0a12c: 38 a1 00 08 addi r5,r1,8 ffc0a130: 48 00 36 75 bl ffc0d7a4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc0a134: 80 01 00 08 lwz r0,8(r1) ffc0a138: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a13c: 40 9e 00 6c bne- cr7,ffc0a1a8 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, ffc0a140: 6b df 00 03 xori r31,r30,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( ffc0a144: 80 9d 00 00 lwz r4,0(r29) ffc0a148: 7f ff 00 34 cntlzw r31,r31 ffc0a14c: 80 c1 00 0c lwz r6,12(r1) ffc0a150: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc0a154: 38 63 00 10 addi r3,r3,16 ffc0a158: 7f e5 fb 78 mr r5,r31 ffc0a15c: 38 e0 00 00 li r7,0 ffc0a160: 48 00 27 0d bl ffc0c86c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc0a164: 48 00 42 0d bl ffc0e370 <_Thread_Enable_dispatch> if ( !do_wait && ffc0a168: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a16c: 40 9e 00 74 bne- cr7,ffc0a1e0 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { ffc0a170: 3d 20 00 00 lis r9,0 ffc0a174: 81 29 27 fc lwz r9,10236(r9) ffc0a178: 80 09 00 34 lwz r0,52(r9) ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && ffc0a17c: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a180: 41 9e 00 48 beq- cr7,ffc0a1c8 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a184: 7c 03 03 78 mr r3,r0 ffc0a188: 48 00 00 69 bl ffc0a1f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } ffc0a18c: 80 01 00 2c lwz r0,44(r1) ffc0a190: 83 a1 00 1c lwz r29,28(r1) ffc0a194: 7c 08 03 a6 mtlr r0 ffc0a198: 83 c1 00 20 lwz r30,32(r1) ffc0a19c: 83 e1 00 24 lwz r31,36(r1) ffc0a1a0: 38 21 00 28 addi r1,r1,40 ffc0a1a4: 4e 80 00 20 blr case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a1a8: 38 60 00 16 li r3,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc0a1ac: 80 01 00 2c lwz r0,44(r1) ffc0a1b0: 83 a1 00 1c lwz r29,28(r1) ffc0a1b4: 7c 08 03 a6 mtlr r0 ffc0a1b8: 83 c1 00 20 lwz r30,32(r1) ffc0a1bc: 83 e1 00 24 lwz r31,36(r1) ffc0a1c0: 38 21 00 28 addi r1,r1,40 ffc0a1c4: 4e 80 00 20 blr ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { ffc0a1c8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a1cc: 41 be ff dc beq- cr7,ffc0a1a8 ffc0a1d0: 2b 9e 00 02 cmplwi cr7,r30,2 ffc0a1d4: 38 60 00 74 li r3,116 ffc0a1d8: 40 bd ff d4 ble- cr7,ffc0a1ac ffc0a1dc: 4b ff ff a8 b ffc0a184 <== NOT EXECUTED ffc0a1e0: 3d 20 00 00 lis r9,0 ffc0a1e4: 81 29 27 fc lwz r9,10236(r9) ffc0a1e8: 80 09 00 34 lwz r0,52(r9) ffc0a1ec: 4b ff ff 98 b ffc0a184 ffc08e18 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc08e18: 94 21 ff f0 stwu r1,-16(r1) ffc08e1c: 7c 08 02 a6 mflr r0 * 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() ) ffc08e20: 3d 20 00 00 lis r9,0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc08e24: 90 01 00 14 stw r0,20(r1) * 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() ) ffc08e28: 80 09 27 bc lwz r0,10172(r9) * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc08e2c: 93 e1 00 0c stw r31,12(r1) * 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() ) ffc08e30: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e34: 40 9e 00 48 bne- cr7,ffc08e7c ffc08e38: 3d 20 00 00 lis r9,0 ffc08e3c: 81 49 27 94 lwz r10,10132(r9) return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc08e40: 3f e0 00 00 lis r31,0 ffc08e44: 81 7f 27 d4 lwz r11,10196(r31) ffc08e48: 38 0a 00 01 addi r0,r10,1 ffc08e4c: 90 09 27 94 stw r0,10132(r9) ffc08e50: 81 2b 01 48 lwz r9,328(r11) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc08e54: 80 09 00 d4 lwz r0,212(r9) ffc08e58: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e5c: 40 9e 00 34 bne- cr7,ffc08e90 thread_support->cancelation_requested ) ffc08e60: 80 09 00 dc lwz r0,220(r9) ffc08e64: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e68: 41 9e 00 28 beq- cr7,ffc08e90 cancel = true; _Thread_Enable_dispatch(); ffc08e6c: 48 00 32 3d bl ffc0c0a8 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); ffc08e70: 80 7f 27 d4 lwz r3,10196(r31) ffc08e74: 38 80 ff ff li r4,-1 ffc08e78: 48 00 71 4d bl ffc0ffc4 <_POSIX_Thread_Exit> } ffc08e7c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc08e80: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc08e84: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc08e88: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc08e8c: 4e 80 00 20 blr <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); ffc08e90: 48 00 32 19 bl ffc0c0a8 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); } ffc08e94: 80 01 00 14 lwz r0,20(r1) ffc08e98: 83 e1 00 0c lwz r31,12(r1) ffc08e9c: 38 21 00 10 addi r1,r1,16 ffc08ea0: 7c 08 03 a6 mtlr r0 ffc08ea4: 4e 80 00 20 blr ffc0b08c : 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 ) { ffc0b08c: 94 21 ff f0 stwu r1,-16(r1) ffc0b090: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0b094: 3d 20 00 00 lis r9,0 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 ) { ffc0b098: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0b09c: 80 09 27 b8 lwz r0,10168(r9) 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; ffc0b0a0: 3d 20 00 00 lis r9,0 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 ) { ffc0b0a4: 93 e1 00 0c stw r31,12(r1) ffc0b0a8: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0b0ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b0b0: 38 60 00 12 li r3,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; ffc0b0b4: 80 09 28 08 lwz r0,10248(r9) if ( rtems_interrupt_is_in_progress() ) ffc0b0b8: 40 9e 00 e8 bne- cr7,ffc0b1a0 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0b0bc: 2f 85 00 00 cmpwi cr7,r5,0 ffc0b0c0: 41 9e 01 38 beq- cr7,ffc0b1f8 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0b0c4: 2f 84 00 00 cmpwi cr7,r4,0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; ffc0b0c8: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0b0cc: 41 9e 01 2c beq- cr7,ffc0b1f8 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b0d0: 81 64 00 00 lwz r11,0(r4) ffc0b0d4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b0d8: 41 9e 01 14 beq- cr7,ffc0b1ec return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0b0dc: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b0e0: 38 60 00 0a li r3,10 ffc0b0e4: 40 9d 00 bc ble- cr7,ffc0b1a0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0b0e8: 3d 60 00 00 lis r11,0 ffc0b0ec: 81 4b 27 90 lwz r10,10128(r11) ffc0b0f0: 38 0a 00 01 addi r0,r10,1 ffc0b0f4: 90 0b 27 90 stw r0,10128(r11) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0b0f8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b0fc: 40 9e 00 b8 bne- cr7,ffc0b1b4 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0b100: 81 69 28 08 lwz r11,10248(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0b104: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b108: 41 9e 01 08 beq- cr7,ffc0b210 ffc0b10c: 3d 20 00 00 lis r9,0 ffc0b110: 7d 69 03 a6 mtctr r11 ffc0b114: 81 49 28 0c lwz r10,10252(r9) ffc0b118: 7d 49 53 78 mr r9,r10 ffc0b11c: 40 be 00 14 bne+ cr7,ffc0b130 ffc0b120: 48 00 01 14 b ffc0b234 <== NOT EXECUTED ffc0b124: 3b ff 00 01 addi r31,r31,1 ffc0b128: 39 29 00 18 addi r9,r9,24 ffc0b12c: 42 40 00 1c bdz- ffc0b148 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b130: 80 09 00 00 lwz r0,0(r9) ffc0b134: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b138: 40 9e ff ec bne+ cr7,ffc0b124 ffc0b13c: 80 09 00 04 lwz r0,4(r9) ffc0b140: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b144: 40 9e ff e0 bne+ cr7,ffc0b124 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0b148: 7f 8b f8 00 cmpw cr7,r11,r31 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0b14c: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc0b150: 41 9e 00 c4 beq- cr7,ffc0b214 ffc0b154: 1d 3f 00 18 mulli r9,r31,24 ffc0b158: 7d 2a 4a 14 add r9,r10,r9 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0b15c: 81 64 00 08 lwz r11,8(r4) ffc0b160: 80 04 00 0c lwz r0,12(r4) ffc0b164: 81 04 00 00 lwz r8,0(r4) ffc0b168: 81 44 00 04 lwz r10,4(r4) ffc0b16c: 91 09 00 00 stw r8,0(r9) ffc0b170: 91 49 00 04 stw r10,4(r9) ffc0b174: 91 69 00 08 stw r11,8(r9) ffc0b178: 90 09 00 0c stw r0,12(r9) ffc0b17c: 81 64 00 14 lwz r11,20(r4) ffc0b180: 80 04 00 10 lwz r0,16(r4) ffc0b184: 91 69 00 14 stw r11,20(r9) ffc0b188: 90 09 00 10 stw r0,16(r9) _Thread_Enable_dispatch(); ffc0b18c: 48 00 22 2d bl ffc0d3b8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0b190: 7f e3 fb 78 mr r3,r31 ffc0b194: 38 80 00 00 li r4,0 ffc0b198: 38 a0 00 00 li r5,0 ffc0b19c: 48 00 b0 11 bl ffc161ac } ffc0b1a0: 80 01 00 14 lwz r0,20(r1) ffc0b1a4: 83 e1 00 0c lwz r31,12(r1) ffc0b1a8: 38 21 00 10 addi r1,r1,16 ffc0b1ac: 7c 08 03 a6 mtlr r0 ffc0b1b0: 4e 80 00 20 blr _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0b1b4: 3d 20 00 00 lis r9,0 ffc0b1b8: 81 29 28 0c lwz r9,10252(r9) ffc0b1bc: 1c 1f 00 18 mulli r0,r31,24 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b1c0: 7d 69 00 2e lwzx r11,r9,r0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0b1c4: 7d 29 02 14 add r9,r9,r0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b1c8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b1cc: 41 9e 00 54 beq- cr7,ffc0b220 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(); ffc0b1d0: 48 00 21 e9 bl ffc0d3b8 <_Thread_Enable_dispatch> _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b1d4: 80 01 00 14 lwz r0,20(r1) 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(); ffc0b1d8: 38 60 00 0c li r3,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b1dc: 83 e1 00 0c lwz r31,12(r1) ffc0b1e0: 7c 08 03 a6 mtlr r0 ffc0b1e4: 38 21 00 10 addi r1,r1,16 ffc0b1e8: 4e 80 00 20 blr static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b1ec: 81 64 00 04 lwz r11,4(r4) ffc0b1f0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b1f4: 40 9e fe e8 bne+ cr7,ffc0b0dc _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b1f8: 80 01 00 14 lwz r0,20(r1) _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); ffc0b1fc: 38 60 00 09 li r3,9 } ffc0b200: 83 e1 00 0c lwz r31,12(r1) ffc0b204: 38 21 00 10 addi r1,r1,16 ffc0b208: 7c 08 03 a6 mtlr r0 ffc0b20c: 4e 80 00 20 blr if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0b210: 93 e5 00 00 stw r31,0(r5) <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0b214: 48 00 21 a5 bl ffc0d3b8 <_Thread_Enable_dispatch> ffc0b218: 38 60 00 05 li r3,5 return sc; ffc0b21c: 4b ff ff 84 b ffc0b1a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b220: 80 09 00 04 lwz r0,4(r9) ffc0b224: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b228: 40 9e ff a8 bne+ cr7,ffc0b1d0 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0b22c: 93 e5 00 00 stw r31,0(r5) ffc0b230: 4b ff ff 2c b ffc0b15c ffc0b234: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b238: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b23c: 4b ff fe f4 b ffc0b130 <== NOT EXECUTED ffc4811c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc4811c: 94 21 ff d0 stwu r1,-48(r1) ffc48120: 7c 08 02 a6 mflr r0 ffc48124: 93 e1 00 2c stw r31,44(r1) ffc48128: 7c 7f 1b 78 mr r31,r3 ffc4812c: 3c 60 00 00 lis r3,0 ffc48130: 93 c1 00 28 stw r30,40(r1) ffc48134: 38 63 6f ec addi r3,r3,28652 ffc48138: 7c 9e 23 78 mr r30,r4 ffc4813c: 38 a1 00 08 addi r5,r1,8 ffc48140: 90 01 00 34 stw r0,52(r1) ffc48144: 7f e4 fb 78 mr r4,r31 ffc48148: 93 a1 00 24 stw r29,36(r1) ffc4814c: 93 61 00 1c stw r27,28(r1) ffc48150: 93 81 00 20 stw r28,32(r1) ffc48154: 4b fc 86 f9 bl ffc1084c <_Objects_Get> ffc48158: 7c 7d 1b 78 mr r29,r3 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc4815c: 80 01 00 08 lwz r0,8(r1) ffc48160: 2f 80 00 00 cmpwi cr7,r0,0 ffc48164: 40 9e 00 48 bne- cr7,ffc481ac case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc48168: 3f 80 00 00 lis r28,0 ffc4816c: 81 23 00 40 lwz r9,64(r3) ffc48170: 80 1c 36 58 lwz r0,13912(r28) ffc48174: 7f 89 00 00 cmpw cr7,r9,r0 ffc48178: 41 9e 00 60 beq- cr7,ffc481d8 _Thread_Enable_dispatch(); ffc4817c: 4b fc 93 c9 bl ffc11544 <_Thread_Enable_dispatch> ffc48180: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc48184: 80 01 00 34 lwz r0,52(r1) ffc48188: 7f e3 fb 78 mr r3,r31 ffc4818c: 83 61 00 1c lwz r27,28(r1) ffc48190: 7c 08 03 a6 mtlr r0 ffc48194: 83 81 00 20 lwz r28,32(r1) ffc48198: 83 a1 00 24 lwz r29,36(r1) ffc4819c: 83 c1 00 28 lwz r30,40(r1) ffc481a0: 83 e1 00 2c lwz r31,44(r1) ffc481a4: 38 21 00 30 addi r1,r1,48 ffc481a8: 4e 80 00 20 blr ffc481ac: 80 01 00 34 lwz r0,52(r1) the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc481b0: 3b e0 00 04 li r31,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc481b4: 7f e3 fb 78 mr r3,r31 ffc481b8: 83 61 00 1c lwz r27,28(r1) ffc481bc: 7c 08 03 a6 mtlr r0 ffc481c0: 83 81 00 20 lwz r28,32(r1) ffc481c4: 83 a1 00 24 lwz r29,36(r1) ffc481c8: 83 c1 00 28 lwz r30,40(r1) ffc481cc: 83 e1 00 2c lwz r31,44(r1) ffc481d0: 38 21 00 30 addi r1,r1,48 ffc481d4: 4e 80 00 20 blr if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { ffc481d8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc481dc: 41 9e 00 b4 beq- cr7,ffc48290 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc481e0: 7f 60 00 a6 mfmsr r27 ffc481e4: 7c 10 42 a6 mfsprg r0,0 ffc481e8: 7f 60 00 78 andc r0,r27,r0 ffc481ec: 7c 00 01 24 mtmsr r0 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); switch ( the_period->state ) { ffc481f0: 80 03 00 38 lwz r0,56(r3) ffc481f4: 2f 80 00 02 cmpwi cr7,r0,2 ffc481f8: 41 9e 00 c0 beq- cr7,ffc482b8 ffc481fc: 2f 80 00 04 cmpwi cr7,r0,4 ffc48200: 41 9e 00 5c beq- cr7,ffc4825c ffc48204: 2f 80 00 00 cmpwi cr7,r0,0 ffc48208: 40 be ff a4 bne- cr7,ffc481ac return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc4820c: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc48210: 4b ff fc 1d bl ffc47e2c <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc48214: 39 20 00 02 li r9,2 ffc48218: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc4821c: 3d 20 ff c5 lis r9,-59 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc48220: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc48224: 39 29 83 28 addi r9,r9,-31960 the_watchdog->id = id; ffc48228: 93 fd 00 30 stw r31,48(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc4822c: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc48230: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc48234: 38 63 65 e8 addi r3,r3,26088 ffc48238: 38 9d 00 10 addi r4,r29,16 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc4823c: 90 1d 00 34 stw r0,52(r29) ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc48240: 3b e0 00 00 li r31,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc48244: 93 dd 00 1c stw r30,28(r29) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc48248: 90 1d 00 18 stw r0,24(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc4824c: 93 dd 00 3c stw r30,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc48250: 4b fc a9 e1 bl ffc12c30 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc48254: 4b fc 92 f1 bl ffc11544 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc48258: 4b ff ff 2c b ffc48184 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc4825c: 4b ff fd 79 bl ffc47fd4 <_Rate_monotonic_Update_statistics> ffc48260: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc48264: 38 00 00 02 li r0,2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc48268: 93 dd 00 1c stw r30,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc4826c: 3c 60 00 00 lis r3,0 ffc48270: 90 1d 00 38 stw r0,56(r29) ffc48274: 38 63 65 e8 addi r3,r3,26088 ffc48278: 38 9d 00 10 addi r4,r29,16 the_period->next_length = length; ffc4827c: 93 dd 00 3c stw r30,60(r29) _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc48280: 3b e0 00 06 li r31,6 ffc48284: 4b fc a9 ad bl ffc12c30 <_Watchdog_Insert> ffc48288: 4b fc 92 bd bl ffc11544 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc4828c: 4b ff fe f8 b ffc48184 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc48290: 80 03 00 38 lwz r0,56(r3) ffc48294: 3b e0 00 00 li r31,0 ffc48298: 2b 80 00 04 cmplwi cr7,r0,4 ffc4829c: 41 bd ff b8 bgt- cr7,ffc48254 ffc482a0: 3d 20 ff c7 lis r9,-57 ffc482a4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc482a8: 39 29 42 2c addi r9,r9,16940 ffc482ac: 7f e9 00 2e lwzx r31,r9,r0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc482b0: 4b fc 92 95 bl ffc11544 <_Thread_Enable_dispatch> ffc482b4: 4b ff fe d0 b ffc48184 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc482b8: 4b ff fd 1d bl ffc47fd4 <_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; ffc482bc: 38 00 00 01 li r0,1 the_period->next_length = length; ffc482c0: 93 dd 00 3c stw r30,60(r29) /* * 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; ffc482c4: 90 1d 00 38 stw r0,56(r29) ffc482c8: 7f 60 01 24 mtmsr r27 the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc482cc: 81 3c 36 58 lwz r9,13912(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc482d0: 38 80 40 00 li r4,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; ffc482d4: 80 1d 00 08 lwz r0,8(r29) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc482d8: 7d 23 4b 78 mr r3,r9 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc482dc: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc482e0: 4b fc 9d e1 bl ffc120c0 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc482e4: 7d 20 00 a6 mfmsr r9 ffc482e8: 7c 10 42 a6 mfsprg r0,0 ffc482ec: 7d 20 00 78 andc r0,r9,r0 ffc482f0: 7c 00 01 24 mtmsr r0 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; ffc482f4: 39 60 00 02 li r11,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; ffc482f8: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc482fc: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc48300: 7d 20 01 24 mtmsr r9 /* * 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 ) ffc48304: 2f 80 00 03 cmpwi cr7,r0,3 ffc48308: 41 9e 00 10 beq- cr7,ffc48318 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc4830c: 4b fc 92 39 bl ffc11544 <_Thread_Enable_dispatch> ffc48310: 3b e0 00 00 li r31,0 return RTEMS_SUCCESSFUL; ffc48314: 4b ff fe 70 b ffc48184 /* * 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 ); ffc48318: 80 7c 36 58 lwz r3,13912(r28) <== NOT EXECUTED ffc4831c: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc48320: 4b fc 8d 11 bl ffc11030 <_Thread_Clear_state> <== NOT EXECUTED ffc48324: 4b ff ff e8 b ffc4830c <== NOT EXECUTED ffc0bcac : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { ffc0bcac: 94 21 ff e0 stwu r1,-32(r1) ffc0bcb0: 7c 08 02 a6 mflr r0 ffc0bcb4: 93 e1 00 1c stw r31,28(r1) ffc0bcb8: 7c 7f 1b 78 mr r31,r3 * * 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 ); ffc0bcbc: 7c 83 23 78 mr r3,r4 ffc0bcc0: 38 81 00 08 addi r4,r1,8 int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { ffc0bcc4: 90 01 00 24 stw r0,36(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 ); ffc0bcc8: 48 00 6b f9 bl ffc128c0 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) ffc0bccc: 2f 83 00 03 cmpwi cr7,r3,3 ffc0bcd0: 41 9e 00 28 beq- cr7,ffc0bcf8 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); ffc0bcd4: 80 a1 00 08 lwz r5,8(r1) <== NOT EXECUTED ffc0bcd8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0bcdc: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0bce0: 48 00 7a 4d bl ffc1372c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } ffc0bce4: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0bce8: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0bcec: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc0bcf0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0bcf4: 4e 80 00 20 blr <== 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 ); ffc0bcf8: 80 a1 00 08 lwz r5,8(r1) ffc0bcfc: 7f e3 fb 78 mr r3,r31 ffc0bd00: 38 80 00 01 li r4,1 ffc0bd04: 48 00 7a 29 bl ffc1372c <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } ffc0bd08: 80 01 00 24 lwz r0,36(r1) ffc0bd0c: 83 e1 00 1c lwz r31,28(r1) ffc0bd10: 38 21 00 20 addi r1,r1,32 ffc0bd14: 7c 08 03 a6 mtlr r0 ffc0bd18: 4e 80 00 20 blr