3000ae90 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000ae90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000ae94: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 3000ae98: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000ae9c: e24dd01c sub sp, sp, #28 3000aea0: e1a05001 mov r5, r1 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 3000aea4: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000aea8: e1a07000 mov r7, r0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 3000aeac: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000aeb0: e1a0b003 mov fp, r3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 3000aeb4: e590a008 ldr sl, [r0, #8] Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 3000aeb8: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 3000aebc: 2a000074 bcs 3000b094 <_Heap_Allocate_aligned_with_boundary+0x204> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 3000aec0: e3530000 cmp r3, #0 3000aec4: 1a000070 bne 3000b08c <_Heap_Allocate_aligned_with_boundary+0x1fc> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000aec8: e157000a cmp r7, sl 3000aecc: 03a06000 moveq r6, #0 3000aed0: 0a000072 beq 3000b0a0 <_Heap_Allocate_aligned_with_boundary+0x210> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 3000aed4: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 3000aed8: e2651004 rsb r1, r5, #4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 3000aedc: e2833007 add r3, r3, #7 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000aee0: e3a06000 mov r6, #0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 3000aee4: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 3000aee8: e58d1014 str r1, [sp, #20] 3000aeec: ea000004 b 3000af04 <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { 3000aef0: e3540000 cmp r4, #0 3000aef4: 1a000057 bne 3000b058 <_Heap_Allocate_aligned_with_boundary+0x1c8> break; } block = block->next; 3000aef8: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000aefc: e157000a cmp r7, sl 3000af00: 0a000066 beq 3000b0a0 <_Heap_Allocate_aligned_with_boundary+0x210> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 3000af04: e59a9004 ldr r9, [sl, #4] 3000af08: e59d2000 ldr r2, [sp] while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 3000af0c: e2866001 add r6, r6, #1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 3000af10: e1520009 cmp r2, r9 3000af14: 2afffff7 bcs 3000aef8 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { 3000af18: e3580000 cmp r8, #0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 3000af1c: 028a4008 addeq r4, sl, #8 3000af20: 0afffff2 beq 3000aef0 <_Heap_Allocate_aligned_with_boundary+0x60> uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 3000af24: e59d1014 ldr r1, [sp, #20] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 3000af28: e3c99001 bic r9, r9, #1 3000af2c: e08a9009 add r9, sl, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 3000af30: e5973014 ldr r3, [r7, #20] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 3000af34: e59d2010 ldr r2, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 3000af38: e0814009 add r4, r1, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 3000af3c: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000af40: e1a00004 mov r0, r4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 3000af44: e0633002 rsb r3, r3, r2 3000af48: e1a01008 mov r1, r8 3000af4c: e0839009 add r9, r3, r9 3000af50: eb0030f7 bl 30017334 <__umodsi3> 3000af54: e0604004 rsb r4, r0, r4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 3000af58: e28a3008 add r3, sl, #8 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 3000af5c: e1590004 cmp r9, r4 3000af60: e58d3008 str r3, [sp, #8] 3000af64: 2a000003 bcs 3000af78 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000af68: e1a00009 mov r0, r9 3000af6c: e1a01008 mov r1, r8 3000af70: eb0030ef bl 30017334 <__umodsi3> 3000af74: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 3000af78: e35b0000 cmp fp, #0 3000af7c: 0a000025 beq 3000b018 <_Heap_Allocate_aligned_with_boundary+0x188> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 3000af80: e0849005 add r9, r4, r5 3000af84: e1a00009 mov r0, r9 3000af88: e1a0100b mov r1, fp 3000af8c: eb0030e8 bl 30017334 <__umodsi3> 3000af90: e0600009 rsb r0, r0, r9 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 3000af94: e1590000 cmp r9, r0 3000af98: 93a03000 movls r3, #0 3000af9c: 83a03001 movhi r3, #1 3000afa0: e1540000 cmp r4, r0 3000afa4: 23a03000 movcs r3, #0 3000afa8: e3530000 cmp r3, #0 3000afac: 0a000019 beq 3000b018 <_Heap_Allocate_aligned_with_boundary+0x188> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 3000afb0: e59d1008 ldr r1, [sp, #8] 3000afb4: e0819005 add r9, r1, r5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 3000afb8: e1590000 cmp r9, r0 3000afbc: 958d6018 strls r6, [sp, #24] 3000afc0: 9a000002 bls 3000afd0 <_Heap_Allocate_aligned_with_boundary+0x140> 3000afc4: eaffffcb b 3000aef8 <_Heap_Allocate_aligned_with_boundary+0x68> 3000afc8: e1590000 cmp r9, r0 3000afcc: 8a000035 bhi 3000b0a8 <_Heap_Allocate_aligned_with_boundary+0x218> return 0; } alloc_begin = boundary_line - alloc_size; 3000afd0: e0654000 rsb r4, r5, r0 3000afd4: e1a01008 mov r1, r8 3000afd8: e1a00004 mov r0, r4 3000afdc: eb0030d4 bl 30017334 <__umodsi3> 3000afe0: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 3000afe4: e0846005 add r6, r4, r5 3000afe8: e1a00006 mov r0, r6 3000afec: e1a0100b mov r1, fp 3000aff0: eb0030cf bl 30017334 <__umodsi3> 3000aff4: e0600006 rsb r0, r0, r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 3000aff8: e1560000 cmp r6, r0 3000affc: 93a03000 movls r3, #0 3000b000: 83a03001 movhi r3, #1 3000b004: e1540000 cmp r4, r0 3000b008: 23a03000 movcs r3, #0 3000b00c: e3530000 cmp r3, #0 3000b010: 1affffec bne 3000afc8 <_Heap_Allocate_aligned_with_boundary+0x138> 3000b014: e59d6018 ldr r6, [sp, #24] boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 3000b018: e59d2008 ldr r2, [sp, #8] 3000b01c: e1520004 cmp r2, r4 3000b020: 8affffb4 bhi 3000aef8 <_Heap_Allocate_aligned_with_boundary+0x68> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 3000b024: e59d100c ldr r1, [sp, #12] 3000b028: e1a00004 mov r0, r4 3000b02c: eb0030c0 bl 30017334 <__umodsi3> 3000b030: e3e09007 mvn r9, #7 3000b034: e06a9009 rsb r9, sl, r9 3000b038: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { 3000b03c: e59d1004 ldr r1, [sp, #4] 3000b040: e0603009 rsb r3, r0, r9 3000b044: e1590000 cmp r9, r0 3000b048: 11510003 cmpne r1, r3 3000b04c: 8affffa9 bhi 3000aef8 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { 3000b050: e3540000 cmp r4, #0 3000b054: 0affffa7 beq 3000aef8 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 3000b058: e597304c ldr r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 3000b05c: e1a0100a mov r1, sl block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 3000b060: e0833006 add r3, r3, r6 3000b064: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 3000b068: e1a00007 mov r0, r7 3000b06c: e1a03005 mov r3, r5 3000b070: e1a02004 mov r2, r4 3000b074: ebffec29 bl 30006120 <_Heap_Block_allocate> 3000b078: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 3000b07c: e5973044 ldr r3, [r7, #68] ; 0x44 3000b080: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 3000b084: 35876044 strcc r6, [r7, #68] ; 0x44 3000b088: ea000002 b 3000b098 <_Heap_Allocate_aligned_with_boundary+0x208> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 3000b08c: e1550003 cmp r5, r3 3000b090: 9a000006 bls 3000b0b0 <_Heap_Allocate_aligned_with_boundary+0x220> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 3000b094: e3a00000 mov r0, #0 } return (void *) alloc_begin; } 3000b098: e28dd01c add sp, sp, #28 3000b09c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000b0a0: e3a00000 mov r0, #0 3000b0a4: eafffff4 b 3000b07c <_Heap_Allocate_aligned_with_boundary+0x1ec> 3000b0a8: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED 3000b0ac: eaffff91 b 3000aef8 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 3000b0b0: e3580000 cmp r8, #0 3000b0b4: 01a08002 moveq r8, r2 3000b0b8: eaffff82 b 3000aec8 <_Heap_Allocate_aligned_with_boundary+0x38> 30006ea8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006ea8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006eac: e59f35d0 ldr r3, [pc, #1488] ; 30007484 <_Heap_Walk+0x5dc> 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; 30006eb0: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006eb4: e5933000 ldr r3, [r3] 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; 30006eb8: e59f25c8 ldr r2, [pc, #1480] ; 30007488 <_Heap_Walk+0x5e0> 30006ebc: e59fa5c8 ldr sl, [pc, #1480] ; 3000748c <_Heap_Walk+0x5e4> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006ec0: e24dd038 sub sp, sp, #56 ; 0x38 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; 30006ec4: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006ec8: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 30006ecc: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; 30006ed0: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006ed4: e1a04000 mov r4, r0 30006ed8: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; 30006edc: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; 30006ee0: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; 30006ee4: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; 30006ee8: e5905020 ldr r5, [r0, #32] Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006eec: 0a000002 beq 30006efc <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 30006ef0: e3a00001 mov r0, #1 block = next_block; } return true; } 30006ef4: e28dd038 add sp, sp, #56 ; 0x38 30006ef8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 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)( 30006efc: e5900018 ldr r0, [r0, #24] 30006f00: e594101c ldr r1, [r4, #28] 30006f04: e5942008 ldr r2, [r4, #8] 30006f08: e594300c ldr r3, [r4, #12] 30006f0c: e59dc024 ldr ip, [sp, #36] ; 0x24 30006f10: e98d0003 stmib sp, {r0, r1} 30006f14: e58d2014 str r2, [sp, #20] 30006f18: e58d3018 str r3, [sp, #24] 30006f1c: e59f256c ldr r2, [pc, #1388] ; 30007490 <_Heap_Walk+0x5e8> 30006f20: e58db000 str fp, [sp] 30006f24: e58d500c str r5, [sp, #12] 30006f28: e58dc010 str ip, [sp, #16] 30006f2c: e1a00008 mov r0, r8 30006f30: e3a01000 mov r1, #0 30006f34: e59d3020 ldr r3, [sp, #32] 30006f38: e1a0e00f mov lr, pc 30006f3c: e12fff1a bx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 30006f40: e59d2020 ldr r2, [sp, #32] 30006f44: e3520000 cmp r2, #0 30006f48: 0a000032 beq 30007018 <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 30006f4c: e59d3020 ldr r3, [sp, #32] 30006f50: e2139003 ands r9, r3, #3 30006f54: 1a000036 bne 30007034 <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 30006f58: e1a0000b mov r0, fp 30006f5c: e59d1020 ldr r1, [sp, #32] 30006f60: ebffe72a bl 30000c10 <__umodsi3> 30006f64: e2506000 subs r6, r0, #0 30006f68: 1a000038 bne 30007050 <_Heap_Walk+0x1a8> ); return false; } if ( 30006f6c: e2850008 add r0, r5, #8 30006f70: e59d1020 ldr r1, [sp, #32] 30006f74: ebffe725 bl 30000c10 <__umodsi3> 30006f78: e2509000 subs r9, r0, #0 30006f7c: 1a00003b bne 30007070 <_Heap_Walk+0x1c8> 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; 30006f80: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 30006f84: e2176001 ands r6, r7, #1 30006f88: 0a000040 beq 30007090 <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) { 30006f8c: e5953000 ldr r3, [r5] 30006f90: e59dc020 ldr ip, [sp, #32] 30006f94: e15c0003 cmp ip, r3 30006f98: 1a000016 bne 30006ff8 <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) { 30006f9c: e59d2024 ldr r2, [sp, #36] ; 0x24 30006fa0: e5923004 ldr r3, [r2, #4] 30006fa4: e3c33001 bic r3, r3, #1 30006fa8: e0823003 add r3, r2, r3 30006fac: e5939004 ldr r9, [r3, #4] 30006fb0: e2199001 ands r9, r9, #1 30006fb4: 0a000112 beq 30007404 <_Heap_Walk+0x55c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 30006fb8: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30006fbc: e5943010 ldr r3, [r4, #16] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 30006fc0: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30006fc4: e58d3028 str r3, [sp, #40] ; 0x28 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 ) { 30006fc8: 0a00006c beq 30007180 <_Heap_Walk+0x2d8> 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; 30006fcc: e594c020 ldr ip, [r4, #32] RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 30006fd0: e15c0009 cmp ip, r9 30006fd4: 9a000034 bls 300070ac <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 30006fd8: e1a00008 mov r0, r8 30006fdc: e1a03009 mov r3, r9 30006fe0: e3a01001 mov r1, #1 30006fe4: e59f24a8 ldr r2, [pc, #1192] ; 30007494 <_Heap_Walk+0x5ec> 30006fe8: e1a0e00f mov lr, pc 30006fec: e12fff1a bx sl 30006ff0: e3a00000 mov r0, #0 30006ff4: eaffffbe b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 30006ff8: e1a00008 mov r0, r8 30006ffc: e58dc000 str ip, [sp] 30007000: e3a01001 mov r1, #1 30007004: e59f248c ldr r2, [pc, #1164] ; 30007498 <_Heap_Walk+0x5f0> 30007008: e1a0e00f mov lr, pc 3000700c: e12fff1a bx sl 30007010: e1a00009 mov r0, r9 30007014: eaffffb6 b 30006ef4 <_Heap_Walk+0x4c> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 30007018: e1a00008 mov r0, r8 3000701c: e3a01001 mov r1, #1 30007020: e59f2474 ldr r2, [pc, #1140] ; 3000749c <_Heap_Walk+0x5f4> 30007024: e1a0e00f mov lr, pc 30007028: e12fff1a bx sl 3000702c: e59d0020 ldr r0, [sp, #32] 30007030: eaffffaf b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 30007034: e1a00008 mov r0, r8 30007038: e3a01001 mov r1, #1 3000703c: e59f245c ldr r2, [pc, #1116] ; 300074a0 <_Heap_Walk+0x5f8> 30007040: e1a0e00f mov lr, pc 30007044: e12fff1a bx sl 30007048: e3a00000 mov r0, #0 3000704c: eaffffa8 b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 30007050: e1a00008 mov r0, r8 30007054: e1a0300b mov r3, fp 30007058: e3a01001 mov r1, #1 3000705c: e59f2440 ldr r2, [pc, #1088] ; 300074a4 <_Heap_Walk+0x5fc> 30007060: e1a0e00f mov lr, pc 30007064: e12fff1a bx sl 30007068: e1a00009 mov r0, r9 3000706c: eaffffa0 b 30006ef4 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 30007070: e1a00008 mov r0, r8 30007074: e1a03005 mov r3, r5 30007078: e3a01001 mov r1, #1 3000707c: e59f2424 ldr r2, [pc, #1060] ; 300074a8 <_Heap_Walk+0x600> 30007080: e1a0e00f mov lr, pc 30007084: e12fff1a bx sl 30007088: e1a00006 mov r0, r6 3000708c: eaffff98 b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 30007090: e1a00008 mov r0, r8 30007094: e3a01001 mov r1, #1 30007098: e59f240c ldr r2, [pc, #1036] ; 300074ac <_Heap_Walk+0x604> 3000709c: e1a0e00f mov lr, pc 300070a0: e12fff1a bx sl 300070a4: e1a00006 mov r0, r6 300070a8: eaffff91 b 30006ef4 <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 300070ac: e5942024 ldr r2, [r4, #36] ; 0x24 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 300070b0: e1520009 cmp r2, r9 && (uintptr_t) block <= (uintptr_t) heap->last_block; 300070b4: e58d202c str r2, [sp, #44] ; 0x2c 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 300070b8: 3affffc6 bcc 30006fd8 <_Heap_Walk+0x130> ); return false; } if ( 300070bc: e2890008 add r0, r9, #8 300070c0: e1a01003 mov r1, r3 300070c4: e58dc01c str ip, [sp, #28] 300070c8: ebffe6d0 bl 30000c10 <__umodsi3> 300070cc: e3500000 cmp r0, #0 300070d0: e59dc01c ldr ip, [sp, #28] 300070d4: 1a0000d1 bne 30007420 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 300070d8: e5993004 ldr r3, [r9, #4] 300070dc: e3c33001 bic r3, r3, #1 300070e0: e0893003 add r3, r9, r3 300070e4: e5933004 ldr r3, [r3, #4] 300070e8: e3130001 tst r3, #1 300070ec: 1a0000dc bne 30007464 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 300070f0: e599200c ldr r2, [r9, #12] 300070f4: e1540002 cmp r4, r2 300070f8: 1a0000d0 bne 30007440 <_Heap_Walk+0x598> 300070fc: e58d7030 str r7, [sp, #48] ; 0x30 30007100: e58db034 str fp, [sp, #52] ; 0x34 30007104: e59d702c ldr r7, [sp, #44] ; 0x2c 30007108: e59db028 ldr fp, [sp, #40] ; 0x28 3000710c: e58d502c str r5, [sp, #44] ; 0x2c 30007110: e58d6028 str r6, [sp, #40] ; 0x28 30007114: e1a0600c mov r6, ip 30007118: ea000011 b 30007164 <_Heap_Walk+0x2bc> 3000711c: e1590006 cmp r9, r6 30007120: 3affffac bcc 30006fd8 <_Heap_Walk+0x130> 30007124: e1570009 cmp r7, r9 ); return false; } if ( 30007128: e2890008 add r0, r9, #8 3000712c: e1a0100b mov r1, fp 30007130: 3affffa8 bcc 30006fd8 <_Heap_Walk+0x130> 30007134: ebffe6b5 bl 30000c10 <__umodsi3> 30007138: e3500000 cmp r0, #0 3000713c: 1a0000b7 bne 30007420 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007140: e5993004 ldr r3, [r9, #4] 30007144: e3c33001 bic r3, r3, #1 30007148: e0833009 add r3, r3, r9 3000714c: e5933004 ldr r3, [r3, #4] 30007150: e3130001 tst r3, #1 30007154: 1a0000c2 bne 30007464 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 30007158: e599200c ldr r2, [r9, #12] 3000715c: e1520005 cmp r2, r5 30007160: 1a0000b6 bne 30007440 <_Heap_Walk+0x598> (*printer)( 30007164: e1a05009 mov r5, r9 return false; } prev_block = free_block; free_block = free_block->next; 30007168: e5999008 ldr r9, [r9, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 3000716c: e1540009 cmp r4, r9 30007170: 1affffe9 bne 3000711c <_Heap_Walk+0x274> 30007174: e28d502c add r5, sp, #44 ; 0x2c 30007178: e89508a0 ldm r5, {r5, r7, fp} 3000717c: e59d6028 ldr r6, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 30007180: e59d3024 ldr r3, [sp, #36] ; 0x24 30007184: e1530005 cmp r3, r5 "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)" : ""), 30007188: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 3000718c: 0affff57 beq 30006ef0 <_Heap_Walk+0x48> - 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; 30007190: e3c77001 bic r7, r7, #1 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 ) { 30007194: e21610ff ands r1, r6, #255 ; 0xff RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 30007198: e0876005 add r6, r7, r5 3000719c: 0a000012 beq 300071ec <_Heap_Walk+0x344> (*printer)( 300071a0: e1a03005 mov r3, r5 300071a4: e58d7000 str r7, [sp] 300071a8: e1a00008 mov r0, r8 300071ac: e3a01000 mov r1, #0 300071b0: e59f22f8 ldr r2, [pc, #760] ; 300074b0 <_Heap_Walk+0x608> 300071b4: e1a0e00f mov lr, pc 300071b8: e12fff1a bx sl 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 300071bc: e5943020 ldr r3, [r4, #32] 300071c0: e1530006 cmp r3, r6 300071c4: 9a000013 bls 30007218 <_Heap_Walk+0x370> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 300071c8: e1a00008 mov r0, r8 300071cc: e58d6000 str r6, [sp] 300071d0: e1a03005 mov r3, r5 300071d4: e3a01001 mov r1, #1 300071d8: e59f22d4 ldr r2, [pc, #724] ; 300074b4 <_Heap_Walk+0x60c> 300071dc: e1a0e00f mov lr, pc 300071e0: e12fff1a bx sl 300071e4: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 300071e8: eaffff41 b 30006ef4 <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 300071ec: e58d7000 str r7, [sp] 300071f0: e5953000 ldr r3, [r5] 300071f4: e1a00008 mov r0, r8 300071f8: e58d3004 str r3, [sp, #4] 300071fc: e59f22b4 ldr r2, [pc, #692] ; 300074b8 <_Heap_Walk+0x610> 30007200: e1a03005 mov r3, r5 30007204: e1a0e00f mov lr, pc 30007208: e12fff1a bx sl 3000720c: e5943020 ldr r3, [r4, #32] 30007210: e1530006 cmp r3, r6 30007214: 8affffeb bhi 300071c8 <_Heap_Walk+0x320> 30007218: e5943024 ldr r3, [r4, #36] ; 0x24 3000721c: e1530006 cmp r3, r6 30007220: 3affffe8 bcc 300071c8 <_Heap_Walk+0x320> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 30007224: e1a00007 mov r0, r7 30007228: e59d1020 ldr r1, [sp, #32] 3000722c: ebffe677 bl 30000c10 <__umodsi3> 30007230: e2509000 subs r9, r0, #0 30007234: 1a000055 bne 30007390 <_Heap_Walk+0x4e8> ); return false; } if ( block_size < min_block_size ) { 30007238: e59d3028 ldr r3, [sp, #40] ; 0x28 3000723c: e1530007 cmp r3, r7 30007240: 8a00005b bhi 300073b4 <_Heap_Walk+0x50c> ); return false; } if ( next_block_begin <= block_begin ) { 30007244: e1550006 cmp r5, r6 30007248: 2a000064 bcs 300073e0 <_Heap_Walk+0x538> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 3000724c: e5963004 ldr r3, [r6, #4] 30007250: e3130001 tst r3, #1 30007254: 1a000036 bne 30007334 <_Heap_Walk+0x48c> 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; 30007258: e595b004 ldr fp, [r5, #4] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 3000725c: e595200c ldr r2, [r5, #12] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 30007260: e5943008 ldr r3, [r4, #8] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 30007264: e3cb7001 bic r7, fp, #1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 30007268: e1530002 cmp r3, r2 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 3000726c: e594100c ldr r1, [r4, #12] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 30007270: e0859007 add r9, r5, r7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 30007274: 059f0240 ldreq r0, [pc, #576] ; 300074bc <_Heap_Walk+0x614> 30007278: 0a000003 beq 3000728c <_Heap_Walk+0x3e4> "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)" : ""), 3000727c: e59fc23c ldr ip, [pc, #572] ; 300074c0 <_Heap_Walk+0x618> 30007280: e1520004 cmp r2, r4 30007284: e59f0238 ldr r0, [pc, #568] ; 300074c4 <_Heap_Walk+0x61c> 30007288: 11a0000c movne r0, ip 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)( 3000728c: e5953008 ldr r3, [r5, #8] 30007290: e1510003 cmp r1, r3 30007294: 059f122c ldreq r1, [pc, #556] ; 300074c8 <_Heap_Walk+0x620> 30007298: 0a000003 beq 300072ac <_Heap_Walk+0x404> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 3000729c: e59fc21c ldr ip, [pc, #540] ; 300074c0 <_Heap_Walk+0x618> 300072a0: e1530004 cmp r3, r4 300072a4: e59f1220 ldr r1, [pc, #544] ; 300074cc <_Heap_Walk+0x624> 300072a8: 11a0100c movne r1, ip 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)( 300072ac: e58d2000 str r2, [sp] 300072b0: e98d0009 stmib sp, {r0, r3} 300072b4: e58d100c str r1, [sp, #12] 300072b8: e1a03005 mov r3, r5 300072bc: e1a00008 mov r0, r8 300072c0: e3a01000 mov r1, #0 300072c4: e59f2204 ldr r2, [pc, #516] ; 300074d0 <_Heap_Walk+0x628> 300072c8: e1a0e00f mov lr, pc 300072cc: e12fff1a bx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 300072d0: e5993000 ldr r3, [r9] 300072d4: e1570003 cmp r7, r3 300072d8: 0a00000a beq 30007308 <_Heap_Walk+0x460> (*printer)( 300072dc: e58d3004 str r3, [sp, #4] 300072e0: e1a00008 mov r0, r8 300072e4: e58d7000 str r7, [sp] 300072e8: e58d9008 str r9, [sp, #8] 300072ec: e1a03005 mov r3, r5 300072f0: e3a01001 mov r1, #1 300072f4: e59f21d8 ldr r2, [pc, #472] ; 300074d4 <_Heap_Walk+0x62c> 300072f8: e1a0e00f mov lr, pc 300072fc: e12fff1a bx sl 30007300: e3a00000 mov r0, #0 30007304: eafffefa b 30006ef4 <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { 30007308: e21b9001 ands r9, fp, #1 3000730c: 0a000017 beq 30007370 <_Heap_Walk+0x4c8> 30007310: e5943008 ldr r3, [r4, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 30007314: e1530004 cmp r3, r4 30007318: 1a000003 bne 3000732c <_Heap_Walk+0x484> 3000731c: ea00000b b 30007350 <_Heap_Walk+0x4a8> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 30007320: e5933008 ldr r3, [r3, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 30007324: e1530004 cmp r3, r4 30007328: 0a000008 beq 30007350 <_Heap_Walk+0x4a8> if ( free_block == block ) { 3000732c: e1530005 cmp r3, r5 30007330: 1afffffa bne 30007320 <_Heap_Walk+0x478> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 30007334: e59d2024 ldr r2, [sp, #36] ; 0x24 30007338: e1520006 cmp r2, r6 3000733c: 0afffeeb beq 30006ef0 <_Heap_Walk+0x48> 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 ) { 30007340: e5967004 ldr r7, [r6, #4] 30007344: e1a05006 mov r5, r6 30007348: e2076001 and r6, r7, #1 3000734c: eaffff8f b 30007190 <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 30007350: e1a00008 mov r0, r8 30007354: e1a03005 mov r3, r5 30007358: e3a01001 mov r1, #1 3000735c: e59f2174 ldr r2, [pc, #372] ; 300074d8 <_Heap_Walk+0x630> 30007360: e1a0e00f mov lr, pc 30007364: e12fff1a bx sl 30007368: e3a00000 mov r0, #0 3000736c: eafffee0 b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( 30007370: e1a00008 mov r0, r8 30007374: e1a03005 mov r3, r5 30007378: e3a01001 mov r1, #1 3000737c: e59f2158 ldr r2, [pc, #344] ; 300074dc <_Heap_Walk+0x634> 30007380: e1a0e00f mov lr, pc 30007384: e12fff1a bx sl 30007388: e1a00009 mov r0, r9 3000738c: eafffed8 b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 30007390: e1a00008 mov r0, r8 30007394: e58d7000 str r7, [sp] 30007398: e1a03005 mov r3, r5 3000739c: e3a01001 mov r1, #1 300073a0: e59f2138 ldr r2, [pc, #312] ; 300074e0 <_Heap_Walk+0x638> 300073a4: e1a0e00f mov lr, pc 300073a8: e12fff1a bx sl 300073ac: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 300073b0: eafffecf b 30006ef4 <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( 300073b4: e58d3004 str r3, [sp, #4] 300073b8: e1a00008 mov r0, r8 300073bc: e1a0b003 mov fp, r3 300073c0: e58d7000 str r7, [sp] 300073c4: e1a03005 mov r3, r5 300073c8: e3a01001 mov r1, #1 300073cc: e59f2110 ldr r2, [pc, #272] ; 300074e4 <_Heap_Walk+0x63c> 300073d0: e1a0e00f mov lr, pc 300073d4: e12fff1a bx sl 300073d8: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; 300073dc: eafffec4 b 30006ef4 <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( 300073e0: e1a00008 mov r0, r8 300073e4: e58d6000 str r6, [sp] 300073e8: e1a03005 mov r3, r5 300073ec: e3a01001 mov r1, #1 300073f0: e59f20f0 ldr r2, [pc, #240] ; 300074e8 <_Heap_Walk+0x640> 300073f4: e1a0e00f mov lr, pc 300073f8: e12fff1a bx sl 300073fc: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 30007400: eafffebb b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 30007404: e1a00008 mov r0, r8 30007408: e3a01001 mov r1, #1 3000740c: e59f20d8 ldr r2, [pc, #216] ; 300074ec <_Heap_Walk+0x644> 30007410: e1a0e00f mov lr, pc 30007414: e12fff1a bx sl 30007418: e1a00009 mov r0, r9 3000741c: eafffeb4 b 30006ef4 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 30007420: e1a00008 mov r0, r8 30007424: e1a03009 mov r3, r9 30007428: e3a01001 mov r1, #1 3000742c: e59f20bc ldr r2, [pc, #188] ; 300074f0 <_Heap_Walk+0x648> 30007430: e1a0e00f mov lr, pc 30007434: e12fff1a bx sl 30007438: e3a00000 mov r0, #0 3000743c: eafffeac b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( free_block->prev != prev_block ) { (*printer)( 30007440: e58d2000 str r2, [sp] 30007444: e1a00008 mov r0, r8 30007448: e1a03009 mov r3, r9 3000744c: e3a01001 mov r1, #1 30007450: e59f209c ldr r2, [pc, #156] ; 300074f4 <_Heap_Walk+0x64c> 30007454: e1a0e00f mov lr, pc 30007458: e12fff1a bx sl 3000745c: e3a00000 mov r0, #0 30007460: eafffea3 b 30006ef4 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 30007464: e1a00008 mov r0, r8 30007468: e1a03009 mov r3, r9 3000746c: e3a01001 mov r1, #1 30007470: e59f2080 ldr r2, [pc, #128] ; 300074f8 <_Heap_Walk+0x650> 30007474: e1a0e00f mov lr, pc 30007478: e12fff1a bx sl 3000747c: e3a00000 mov r0, #0 30007480: eafffe9b b 30006ef4 <_Heap_Walk+0x4c> 30006390 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30006390: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 30006394: e5908034 ldr r8, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { 30006398: e24dd014 sub sp, sp, #20 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 3000639c: e3580000 cmp r8, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 300063a0: e1a05000 mov r5, r0 /* * 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 ); 300063a4: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 300063a8: 0a00009c beq 30006620 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 300063ac: e1d091b4 ldrh r9, [r0, #20] 300063b0: e1d0a1b0 ldrh sl, [r0, #16] 300063b4: e1a01009 mov r1, r9 300063b8: e1a0000a mov r0, sl 300063bc: eb004398 bl 30017224 <__aeabi_uidiv> 300063c0: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 300063c4: e1b03823 lsrs r3, r3, #16 300063c8: 01a01009 moveq r1, r9 300063cc: 01a06007 moveq r6, r7 300063d0: 01a04003 moveq r4, r3 300063d4: 0a00000f beq 30006418 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 300063d8: e5984000 ldr r4, [r8] 300063dc: e3540000 cmp r4, #0 300063e0: 11a01009 movne r1, r9 300063e4: 11a06007 movne r6, r7 300063e8: 13a04000 movne r4, #0 300063ec: 01a01009 moveq r1, r9 300063f0: 01a06007 moveq r6, r7 300063f4: 1a000003 bne 30006408 <_Objects_Extend_information+0x78> 300063f8: ea000006 b 30006418 <_Objects_Extend_information+0x88> <== NOT EXECUTED 300063fc: e7982104 ldr r2, [r8, r4, lsl #2] 30006400: e3520000 cmp r2, #0 30006404: 0a000003 beq 30006418 <_Objects_Extend_information+0x88> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30006408: e2844001 add r4, r4, #1 3000640c: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 30006410: e0866009 add r6, r6, r9 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30006414: 8afffff8 bhi 300063fc <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 30006418: e08aa001 add sl, sl, r1 /* * 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 ) { 3000641c: e35a0801 cmp sl, #65536 ; 0x10000 30006420: 2a000064 bcs 300065b8 <_Objects_Extend_information+0x228> /* * 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 ) { 30006424: e5d50012 ldrb r0, [r5, #18] /* * 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; 30006428: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { 3000642c: e3500000 cmp 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; 30006430: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { 30006434: 1a000061 bne 300065c0 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 30006438: e58d3000 str r3, [sp] 3000643c: eb00083b bl 30008530 <_Workspace_Allocate_or_fatal_error> 30006440: e59d3000 ldr r3, [sp] 30006444: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 30006448: e1d521b0 ldrh r2, [r5, #16] 3000644c: e1560002 cmp r6, r2 30006450: 3a000038 bcc 30006538 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 30006454: e283c001 add ip, r3, #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 ); 30006458: e08c008c add r0, ip, ip, lsl #1 3000645c: e08a0000 add r0, sl, r0 30006460: e0800007 add r0, r0, r7 30006464: e1a00100 lsl r0, r0, #2 30006468: e88d1008 stm sp, {r3, ip} 3000646c: eb00083b bl 30008560 <_Workspace_Allocate> if ( !object_blocks ) { 30006470: e250b000 subs fp, r0, #0 30006474: e89d1008 ldm sp, {r3, ip} 30006478: 0a00006e beq 30006638 <_Objects_Extend_information+0x2a8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 3000647c: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 30006480: e08b818c add r8, fp, ip, lsl #3 30006484: e1570002 cmp r7, r2 30006488: e08bc10c add ip, fp, ip, lsl #2 3000648c: 3a000051 bcc 300065d8 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30006490: e3570000 cmp r7, #0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30006494: 13a02000 movne r2, #0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 30006498: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 3000649c: 0a000003 beq 300064b0 <_Objects_Extend_information+0x120> local_table[ index ] = NULL; 300064a0: e7881102 str r1, [r8, r2, lsl #2] } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 300064a4: e2822001 add r2, r2, #1 300064a8: e1570002 cmp r7, r2 300064ac: 8afffffb bhi 300064a0 <_Objects_Extend_information+0x110> 300064b0: e1a03103 lsl r3, r3, #2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300064b4: e1d511b4 ldrh r1, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300064b8: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300064bc: e0861001 add r1, r6, r1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 300064c0: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 300064c4: e78c0003 str r0, [ip, r3] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300064c8: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; 300064cc: 2a000005 bcs 300064e8 <_Objects_Extend_information+0x158> 300064d0: e0882106 add r2, r8, r6, lsl #2 300064d4: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { 300064d8: e2833001 add r3, r3, #1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 300064dc: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 300064e0: e4820004 str r0, [r2], #4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 300064e4: 3afffffb bcc 300064d8 <_Objects_Extend_information+0x148> 300064e8: e10f3000 mrs r3, CPSR 300064ec: e3832080 orr r2, r3, #128 ; 0x80 300064f0: e129f002 msr CPSR_fc, r2 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( 300064f4: e5952000 ldr r2, [r5] 300064f8: e1d510b4 ldrh r1, [r5, #4] 300064fc: e1a02c02 lsl r2, r2, #24 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; 30006500: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( 30006504: e3822801 orr r2, r2, #65536 ; 0x10000 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; 30006508: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( 3000650c: e1822d81 orr r2, r2, r1, lsl #27 30006510: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 30006514: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 30006518: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; 3000651c: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 30006520: e585200c str r2, [r5, #12] 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; 30006524: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30006528: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000652c: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 30006530: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 30006534: 1b00080f blne 30008578 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006538: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 3000653c: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006540: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30006544: e1a01009 mov r1, r9 30006548: e1a00007 mov r0, r7 3000654c: e1d521b4 ldrh r2, [r5, #20] 30006550: e5953018 ldr r3, [r5, #24] 30006554: eb0011ab bl 3000ac08 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006558: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 3000655c: e2858020 add r8, r5, #32 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 30006560: ea000008 b 30006588 <_Objects_Extend_information+0x1f8> the_object->id = _Objects_Build_id( 30006564: e5952000 ldr r2, [r5] 30006568: e1d5c0b4 ldrh ip, [r5, #4] 3000656c: e1a02c02 lsl r2, r2, #24 30006570: e3822801 orr r2, r2, #65536 ; 0x10000 30006574: e1822d8c orr r2, r2, ip, lsl #27 30006578: e1822006 orr r2, r2, r6 3000657c: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30006580: ebfffd19 bl 300059ec <_Chain_Append> index++; 30006584: e2866001 add r6, r6, #1 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 30006588: e1a00007 mov r0, r7 3000658c: ebfffd21 bl 30005a18 <_Chain_Get> 30006590: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30006594: e1a01003 mov r1, r3 30006598: e1a00008 mov r0, r8 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 3000659c: 1afffff0 bne 30006564 <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 300065a0: e1d531b4 ldrh r3, [r5, #20] information->inactive = 300065a4: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 300065a8: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = 300065ac: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 300065b0: e7813004 str r3, [r1, r4] information->inactive = 300065b4: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 300065b8: e28dd014 add sp, sp, #20 300065bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * 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 ); 300065c0: e58d3000 str r3, [sp] 300065c4: eb0007e5 bl 30008560 <_Workspace_Allocate> if ( !new_object_block ) 300065c8: e2509000 subs r9, r0, #0 300065cc: e59d3000 ldr r3, [sp] 300065d0: 1affff9c bne 30006448 <_Objects_Extend_information+0xb8> 300065d4: eafffff7 b 300065b8 <_Objects_Extend_information+0x228> /* * 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, 300065d8: e1a03103 lsl r3, r3, #2 300065dc: e1a02003 mov r2, r3 300065e0: e5951034 ldr r1, [r5, #52] ; 0x34 300065e4: e88d1008 stm sp, {r3, ip} 300065e8: eb001f98 bl 3000e450 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 300065ec: e89d1008 ldm sp, {r3, ip} 300065f0: e1a0000c mov r0, ip 300065f4: e1a02003 mov r2, r3 300065f8: e5951030 ldr r1, [r5, #48] ; 0x30 300065fc: eb001f93 bl 3000e450 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30006600: e1d521b0 ldrh r2, [r5, #16] 30006604: e1a00008 mov r0, r8 30006608: e0872002 add r2, r7, r2 3000660c: e1a02102 lsl r2, r2, #2 30006610: e595101c ldr r1, [r5, #28] 30006614: eb001f8d bl 3000e450 30006618: e89d1008 ldm sp, {r3, ip} 3000661c: eaffffa4 b 300064b4 <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 30006620: e1a04008 mov r4, r8 30006624: e1d0a1b0 ldrh sl, [r0, #16] 30006628: e1d011b4 ldrh r1, [r0, #20] 3000662c: e1a06007 mov r6, r7 30006630: e1a03008 mov r3, r8 30006634: eaffff77 b 30006418 <_Objects_Extend_information+0x88> (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 ); 30006638: e1a00009 mov r0, r9 3000663c: eb0007cd bl 30008578 <_Workspace_Free> return; 30006640: eaffffdc b 300065b8 <_Objects_Extend_information+0x228> 30006174 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30006174: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30006178: e1a04001 mov r4, r1 3000617c: e24dd004 sub sp, sp, #4 30006180: e1a06000 mov r6, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 30006184: e1a0100d mov r1, sp 30006188: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 3000618c: e1a08002 mov r8, r2 30006190: e20370ff and r7, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 30006194: eb000075 bl 30006370 <_POSIX_Mutex_Get> 30006198: e3500000 cmp r0, #0 3000619c: 0a00000a beq 300061cc <_POSIX_Condition_variables_Wait_support+0x58> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 300061a0: e59f30dc ldr r3, [pc, #220] ; 30006284 <_POSIX_Condition_variables_Wait_support+0x110> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 300061a4: e1a0100d mov r1, sp 300061a8: e5932000 ldr r2, [r3] 300061ac: e1a00006 mov r0, r6 300061b0: e2422001 sub r2, r2, #1 300061b4: e5832000 str r2, [r3] 300061b8: ebffff77 bl 30005f9c <_POSIX_Condition_variables_Get> switch ( location ) { 300061bc: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 300061c0: e1a0a000 mov sl, r0 switch ( location ) { 300061c4: e3530000 cmp r3, #0 300061c8: 0a000003 beq 300061dc <_POSIX_Condition_variables_Wait_support+0x68> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 300061cc: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 300061d0: e1a00005 mov r0, r5 300061d4: e28dd004 add sp, sp, #4 300061d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 300061dc: e5903014 ldr r3, [r0, #20] 300061e0: e3530000 cmp r3, #0 300061e4: 0a000005 beq 30006200 <_POSIX_Condition_variables_Wait_support+0x8c> 300061e8: e5942000 ldr r2, [r4] 300061ec: e1530002 cmp r3, r2 300061f0: 0a000002 beq 30006200 <_POSIX_Condition_variables_Wait_support+0x8c> _Thread_Enable_dispatch(); 300061f4: eb000c6a bl 300093a4 <_Thread_Enable_dispatch> 300061f8: e3a05016 mov r5, #22 return EINVAL; 300061fc: eafffff3 b 300061d0 <_POSIX_Condition_variables_Wait_support+0x5c> } (void) pthread_mutex_unlock( mutex ); 30006200: e1a00004 mov r0, r4 30006204: eb0000e3 bl 30006598 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 30006208: e3570000 cmp r7, #0 3000620c: 0a000006 beq 3000622c <_POSIX_Condition_variables_Wait_support+0xb8> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 30006210: eb000c63 bl 300093a4 <_Thread_Enable_dispatch> 30006214: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 30006218: e1a00004 mov r0, r4 3000621c: eb0000bc bl 30006514 if ( mutex_status ) 30006220: e3500000 cmp r0, #0 30006224: 0affffe9 beq 300061d0 <_POSIX_Condition_variables_Wait_support+0x5c> 30006228: eaffffe7 b 300061cc <_POSIX_Condition_variables_Wait_support+0x58> if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 3000622c: e59f5054 ldr r5, [pc, #84] ; 30006288 <_POSIX_Condition_variables_Wait_support+0x114> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 30006230: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30006234: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 30006238: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 3000623c: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 30006240: e5961000 ldr r1, [r6] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 30006244: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 30006248: e5831020 str r1, [r3, #32] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 3000624c: e3a01001 mov r1, #1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 30006250: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 30006254: e1a00002 mov r0, r2 30006258: e58a1048 str r1, [sl, #72] ; 0x48 3000625c: e59f2028 ldr r2, [pc, #40] ; 3000628c <_POSIX_Condition_variables_Wait_support+0x118> 30006260: e1a01008 mov r1, r8 30006264: eb000d91 bl 300098b0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 30006268: eb000c4d bl 300093a4 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 3000626c: e5953000 ldr r3, [r5] 30006270: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 30006274: e3550074 cmp r5, #116 ; 0x74 30006278: 13550000 cmpne r5, #0 3000627c: 0affffe5 beq 30006218 <_POSIX_Condition_variables_Wait_support+0xa4> 30006280: eaffffd2 b 300061d0 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED 3000d86c <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000d86c: e10f2000 mrs r2, CPSR 3000d870: e3823080 orr r3, r2, #128 ; 0x80 3000d874: e129f003 msr CPSR_fc, r3 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 3000d878: e59f1064 ldr r1, [pc, #100] ; 3000d8e4 <_POSIX_signals_Clear_process_signals+0x78> 3000d87c: e0803080 add r3, r0, r0, lsl #1 3000d880: e7911103 ldr r1, [r1, r3, lsl #2] 3000d884: e1a0c103 lsl ip, r3, #2 3000d888: e3510002 cmp r1, #2 3000d88c: 0a00000c beq 3000d8c4 <_POSIX_signals_Clear_process_signals+0x58> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 3000d890: e59f3050 ldr r3, [pc, #80] ; 3000d8e8 <_POSIX_signals_Clear_process_signals+0x7c> 3000d894: e3a0c001 mov ip, #1 3000d898: e5931000 ldr r1, [r3] 3000d89c: e2400001 sub r0, r0, #1 3000d8a0: e1c1001c bic r0, r1, ip, lsl r0 if ( !_POSIX_signals_Pending ) 3000d8a4: e3500000 cmp r0, #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; 3000d8a8: e5830000 str r0, [r3] if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; 3000d8ac: 059f3038 ldreq r3, [pc, #56] ; 3000d8ec <_POSIX_signals_Clear_process_signals+0x80> 3000d8b0: 05931000 ldreq r1, [r3] 3000d8b4: 02411001 subeq r1, r1, #1 3000d8b8: 05831000 streq r1, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000d8bc: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } 3000d8c0: e12fff1e bx lr ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 3000d8c4: e59f1024 ldr r1, [pc, #36] ; 3000d8f0 <_POSIX_signals_Clear_process_signals+0x84> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000d8c8: e7913103 ldr r3, [r1, r3, lsl #2] 3000d8cc: e081100c add r1, r1, ip 3000d8d0: e2811004 add r1, r1, #4 3000d8d4: e1530001 cmp r3, r1 3000d8d8: 0affffec beq 3000d890 <_POSIX_signals_Clear_process_signals+0x24> 3000d8dc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); } 3000d8e0: e12fff1e bx lr <== NOT EXECUTED 300076c8 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 300076c8: e5913014 ldr r3, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 300076cc: e92d05f0 push {r4, r5, r6, r7, r8, sl} _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 ]; 300076d0: e1a0c323 lsr ip, r3, #6 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300076d4: e281503c add r5, r1, #60 ; 0x3c 300076d8: e08cc08c add ip, ip, ip, lsl #1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 300076dc: e3130020 tst r3, #32 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 300076e0: e2814038 add r4, r1, #56 ; 0x38 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300076e4: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 300076e8: e3a05000 mov r5, #0 300076ec: e581503c str r5, [r1, #60] ; 0x3c the_chain->last = _Chain_Head(the_chain); 300076f0: e5814040 str r4, [r1, #64] ; 0x40 _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 ]; 300076f4: e080c10c add ip, r0, ip, lsl #2 block_state = the_thread_queue->state; 300076f8: e5906038 ldr r6, [r0, #56] ; 0x38 300076fc: 159fa178 ldrne sl, [pc, #376] ; 3000787c <_Thread_queue_Enqueue_priority+0x1b4> if ( _Thread_queue_Is_reverse_search( priority ) ) 30007700: 1a00001c bne 30007778 <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30007704: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30007708: e10f8000 mrs r8, CPSR 3000770c: e3884080 orr r4, r8, #128 ; 0x80 30007710: e129f004 msr CPSR_fc, r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 30007714: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 30007718: e154000a cmp r4, sl 3000771c: 1a000009 bne 30007748 <_Thread_queue_Enqueue_priority+0x80> 30007720: ea000052 b 30007870 <_Thread_queue_Enqueue_priority+0x1a8> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 30007724: e10f7000 mrs r7, CPSR 30007728: e129f008 msr CPSR_fc, r8 3000772c: e129f007 msr CPSR_fc, 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) ) { 30007730: e5947010 ldr r7, [r4, #16] 30007734: e1160007 tst r6, r7 30007738: 0a000033 beq 3000780c <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 3000773c: e5944000 ldr r4, [r4] 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 ) ) { 30007740: e154000a cmp r4, sl 30007744: 0a000002 beq 30007754 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; 30007748: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) 3000774c: e1530005 cmp r3, r5 30007750: 8afffff3 bhi 30007724 <_Thread_queue_Enqueue_priority+0x5c> 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 ) ) { 30007754: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 30007758: e590c030 ldr ip, [r0, #48] ; 0x30 3000775c: e35c0001 cmp ip, #1 30007760: 0a00002b beq 30007814 <_Thread_queue_Enqueue_priority+0x14c> * 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; 30007764: e5826000 str r6, [r2] return the_thread_queue->sync_state; 30007768: e1a0000c mov r0, ip } 3000776c: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 30007770: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30007774: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 30007778: e5da5000 ldrb r5, [sl] 3000777c: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30007780: e10f8000 mrs r8, CPSR 30007784: e3884080 orr r4, r8, #128 ; 0x80 30007788: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 3000778c: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 30007790: e154000c cmp r4, ip 30007794: 1a000009 bne 300077c0 <_Thread_queue_Enqueue_priority+0xf8> 30007798: ea00000b b 300077cc <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 3000779c: e10f7000 mrs r7, CPSR 300077a0: e129f008 msr CPSR_fc, r8 300077a4: e129f007 msr CPSR_fc, 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) ) { 300077a8: e5947010 ldr r7, [r4, #16] 300077ac: e1160007 tst r6, r7 300077b0: 0affffef beq 30007774 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 300077b4: e5944004 ldr r4, [r4, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 300077b8: e154000c cmp r4, ip 300077bc: 0a000002 beq 300077cc <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; 300077c0: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) 300077c4: e1530005 cmp r3, r5 300077c8: 3afffff3 bcc 3000779c <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 300077cc: e590c030 ldr ip, [r0, #48] ; 0x30 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 ) ) { 300077d0: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 300077d4: e35c0001 cmp ip, #1 300077d8: 1affffe1 bne 30007764 <_Thread_queue_Enqueue_priority+0x9c> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 300077dc: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 300077e0: e3a03000 mov r3, #0 300077e4: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 300077e8: 0a000016 beq 30007848 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 300077ec: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 300077f0: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 300077f4: e5810044 str r0, [r1, #68] ; 0x44 next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 300077f8: e5841000 str r1, [r4] next_node->previous = the_node; 300077fc: e5831004 str r1, [r3, #4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30007800: e129f008 msr CPSR_fc, r8 30007804: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30007808: eaffffd7 b 3000776c <_Thread_queue_Enqueue_priority+0xa4> 3000780c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 30007810: eaffffbc b 30007708 <_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 ) 30007814: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30007818: e3a03000 mov r3, #0 3000781c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 30007820: 0a000008 beq 30007848 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 30007824: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30007828: e5814000 str r4, [r1] the_node->previous = previous_node; 3000782c: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30007830: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 30007834: e5831000 str r1, [r3] search_node->previous = the_node; 30007838: e5841004 str r1, [r4, #4] 3000783c: e129f008 msr CPSR_fc, r8 30007840: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30007844: eaffffc8 b 3000776c <_Thread_queue_Enqueue_priority+0xa4> 30007848: e284403c add r4, r4, #60 ; 0x3c _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; 3000784c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30007850: e5814000 str r4, [r1] the_node->previous = previous_node; 30007854: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30007858: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 3000785c: e5831000 str r1, [r3] search_node->previous = the_node; 30007860: e5841004 str r1, [r4, #4] 30007864: e129f006 msr CPSR_fc, r6 30007868: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 3000786c: eaffffbe b 3000776c <_Thread_queue_Enqueue_priority+0xa4> 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 ) ) { 30007870: e1a06008 mov r6, r8 30007874: e3e05000 mvn r5, #0 30007878: eaffffb6 b 30007758 <_Thread_queue_Enqueue_priority+0x90> 30016270 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 30016270: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30016274: e24dd024 sub sp, sp, #36 ; 0x24 30016278: e1a04000 mov r4, r0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 3001627c: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30016280: e28d0018 add r0, sp, #24 30016284: e28d700c add r7, sp, #12 30016288: e280a004 add sl, r0, #4 3001628c: e2872004 add r2, r7, #4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30016290: e58d301c str r3, [sp, #28] the_chain->last = _Chain_Head(the_chain); 30016294: e58d0020 str r0, [sp, #32] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30016298: e58d3010 str r3, [sp, #16] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 3001629c: e2840040 add r0, r4, #64 ; 0x40 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 300162a0: e2843008 add r3, r4, #8 300162a4: e59f91ac ldr r9, [pc, #428] ; 30016458 <_Timer_server_Body+0x1e8> 300162a8: e59fb1ac ldr fp, [pc, #428] ; 3001645c <_Timer_server_Body+0x1ec> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300162ac: e58d2000 str r2, [sp] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300162b0: e58da018 str sl, [sp, #24] 300162b4: e58d200c str r2, [sp, #12] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 300162b8: e58d7014 str r7, [sp, #20] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 300162bc: e2846030 add r6, r4, #48 ; 0x30 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 300162c0: e2848068 add r8, r4, #104 ; 0x68 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 300162c4: e98d0009 stmib sp, {r0, r3} { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 300162c8: e28d2018 add r2, sp, #24 300162cc: e5842078 str r2, [r4, #120] ; 0x78 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 300162d0: e5993000 ldr r3, [r9] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 300162d4: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 300162d8: e1a00006 mov r0, r6 300162dc: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 300162e0: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 300162e4: e1a02007 mov r2, r7 300162e8: eb001116 bl 3001a748 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 300162ec: e59b5000 ldr r5, [fp] Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 300162f0: e5941074 ldr r1, [r4, #116] ; 0x74 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 300162f4: e1550001 cmp r5, r1 300162f8: 8a000022 bhi 30016388 <_Timer_server_Body+0x118> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 300162fc: 3a000018 bcc 30016364 <_Timer_server_Body+0xf4> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 30016300: e5845074 str r5, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 30016304: e5940078 ldr r0, [r4, #120] ; 0x78 30016308: eb00025b bl 30016c7c <_Chain_Get> if ( timer == NULL ) { 3001630c: e3500000 cmp r0, #0 30016310: 0a00000b beq 30016344 <_Timer_server_Body+0xd4> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 30016314: e5903038 ldr r3, [r0, #56] ; 0x38 30016318: e3530001 cmp r3, #1 3001631c: 0a000015 beq 30016378 <_Timer_server_Body+0x108> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 30016320: e3530003 cmp r3, #3 30016324: 1afffff6 bne 30016304 <_Timer_server_Body+0x94> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 30016328: e2801010 add r1, r0, #16 3001632c: e1a00008 mov r0, r8 30016330: eb001133 bl 3001a804 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 30016334: e5940078 ldr r0, [r4, #120] ; 0x78 30016338: eb00024f bl 30016c7c <_Chain_Get> if ( timer == NULL ) { 3001633c: e3500000 cmp r0, #0 30016340: 1afffff3 bne 30016314 <_Timer_server_Body+0xa4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30016344: e10f2000 mrs r2, CPSR 30016348: e3823080 orr r3, r2, #128 ; 0x80 3001634c: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 30016350: e59d3018 ldr r3, [sp, #24] 30016354: e15a0003 cmp sl, r3 30016358: 0a00000f beq 3001639c <_Timer_server_Body+0x12c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3001635c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 30016360: eaffffda b 300162d0 <_Timer_server_Body+0x60> <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 30016364: e0652001 rsb r2, r5, r1 30016368: e1a00008 mov r0, r8 3001636c: e3a01001 mov r1, #1 30016370: eb0010c5 bl 3001a68c <_Watchdog_Adjust> 30016374: eaffffe1 b 30016300 <_Timer_server_Body+0x90> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 30016378: e2801010 add r1, r0, #16 3001637c: e1a00006 mov r0, r6 30016380: eb00111f bl 3001a804 <_Watchdog_Insert> 30016384: eaffffde b 30016304 <_Timer_server_Body+0x94> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30016388: e0611005 rsb r1, r1, r5 3001638c: e1a00008 mov r0, r8 30016390: e1a02007 mov r2, r7 30016394: eb0010eb bl 3001a748 <_Watchdog_Adjust_to_chain> 30016398: eaffffd8 b 30016300 <_Timer_server_Body+0x90> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 3001639c: e5840078 str r0, [r4, #120] ; 0x78 300163a0: e129f002 msr CPSR_fc, r2 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 300163a4: e59d300c ldr r3, [sp, #12] 300163a8: e59d0000 ldr r0, [sp] 300163ac: e1500003 cmp r0, r3 300163b0: 159d5000 ldrne r5, [sp] 300163b4: 1a00000a bne 300163e4 <_Timer_server_Body+0x174> 300163b8: ea000011 b 30016404 <_Timer_server_Body+0x194> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 300163bc: e5932000 ldr r2, [r3] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 300163c0: e3a00000 mov r0, #0 the_chain->first = new_first; 300163c4: e58d200c str r2, [sp, #12] 300163c8: e5830008 str r0, [r3, #8] new_first->previous = _Chain_Head(the_chain); 300163cc: e5827004 str r7, [r2, #4] 300163d0: e129f001 msr CPSR_fc, r1 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 300163d4: e5930020 ldr r0, [r3, #32] 300163d8: e5931024 ldr r1, [r3, #36] ; 0x24 300163dc: e1a0e00f mov lr, pc 300163e0: e593f01c ldr pc, [r3, #28] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300163e4: e10f1000 mrs r1, CPSR 300163e8: e3813080 orr r3, r1, #128 ; 0x80 300163ec: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 300163f0: e59d300c ldr r3, [sp, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 300163f4: e1550003 cmp r5, r3 300163f8: 1affffef bne 300163bc <_Timer_server_Body+0x14c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 300163fc: e129f001 msr CPSR_fc, r1 30016400: eaffffb0 b 300162c8 <_Timer_server_Body+0x58> 30016404: e59f0054 ldr r0, [pc, #84] ; 30016460 <_Timer_server_Body+0x1f0> } } else { ts->active = false; 30016408: e3a02000 mov r2, #0 3001640c: e5c4207c strb r2, [r4, #124] ; 0x7c 30016410: e5903000 ldr r3, [r0] 30016414: e2833001 add r3, r3, #1 30016418: e5803000 str r3, [r0] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 3001641c: e3a01008 mov r1, #8 30016420: e5940000 ldr r0, [r4] 30016424: eb000e1c bl 30019c9c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 30016428: e1a00004 mov r0, r4 3001642c: ebffff63 bl 300161c0 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 30016430: e1a00004 mov r0, r4 30016434: ebffff77 bl 30016218 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 30016438: eb000b5e bl 300191b8 <_Thread_Enable_dispatch> ts->active = true; 3001643c: e3a02001 mov r2, #1 30016440: e5c4207c strb r2, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 30016444: e59d0008 ldr r0, [sp, #8] 30016448: eb00115a bl 3001a9b8 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 3001644c: e59d0004 ldr r0, [sp, #4] 30016450: eb001158 bl 3001a9b8 <_Watchdog_Remove> 30016454: eaffff9b b 300162c8 <_Timer_server_Body+0x58> 3000a1d0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 3000a1d0: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000a1d4: e1a04000 mov r4, r0 3000a1d8: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000a1dc: e10f3000 mrs r3, CPSR 3000a1e0: e3832080 orr r2, r3, #128 ; 0x80 3000a1e4: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3000a1e8: e1a07000 mov r7, r0 3000a1ec: e4972004 ldr r2, [r7], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 3000a1f0: e1520007 cmp r2, r7 3000a1f4: 0a000018 beq 3000a25c <_Watchdog_Adjust+0x8c> switch ( direction ) { 3000a1f8: e3510000 cmp r1, #0 3000a1fc: 1a000018 bne 3000a264 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000a200: e3550000 cmp r5, #0 3000a204: 0a000014 beq 3000a25c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 3000a208: e5926010 ldr r6, [r2, #16] 3000a20c: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 3000a210: 23a08001 movcs r8, #1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 3000a214: 2a000005 bcs 3000a230 <_Watchdog_Adjust+0x60> 3000a218: ea000018 b 3000a280 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000a21c: e0555006 subs r5, r5, r6 3000a220: 0a00000d beq 3000a25c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 3000a224: e5926010 ldr r6, [r2, #16] 3000a228: e1560005 cmp r6, r5 3000a22c: 8a000013 bhi 3000a280 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 3000a230: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000a234: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); 3000a238: e1a00004 mov r0, r4 3000a23c: eb0000aa bl 3000a4ec <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000a240: e10f3000 mrs r3, CPSR 3000a244: e3832080 orr r2, r3, #128 ; 0x80 3000a248: e129f002 msr CPSR_fc, r2 3000a24c: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 3000a250: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 3000a254: e1a02001 mov r2, r1 3000a258: 1affffef bne 3000a21c <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000a25c: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 3000a260: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 3000a264: e3510001 cmp r1, #1 3000a268: 1afffffb bne 3000a25c <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 3000a26c: e5921010 ldr r1, [r2, #16] 3000a270: e0815005 add r5, r1, r5 3000a274: e5825010 str r5, [r2, #16] 3000a278: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 3000a27c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _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; 3000a280: e0655006 rsb r5, r5, r6 3000a284: e5825010 str r5, [r2, #16] break; 3000a288: eafffff3 b 3000a25c <_Watchdog_Adjust+0x8c> 3000d5a4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 3000d5a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000d5a8: e24dd00c sub sp, sp, #12 3000d5ac: e1a04000 mov r4, r0 3000d5b0: e1a05001 mov r5, r1 3000d5b4: e1a08002 mov r8, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 3000d5b8: ebfffc1f bl 3000c63c 3000d5bc: e1500004 cmp r0, r4 3000d5c0: 1a000090 bne 3000d808 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 3000d5c4: e3550000 cmp r5, #0 3000d5c8: 0a000093 beq 3000d81c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 3000d5cc: e2453001 sub r3, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 3000d5d0: e353001f cmp r3, #31 3000d5d4: 8a000090 bhi 3000d81c 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 ) 3000d5d8: e59f6268 ldr r6, [pc, #616] ; 3000d848 3000d5dc: e1a07085 lsl r7, r5, #1 3000d5e0: e0872005 add r2, r7, r5 3000d5e4: e0862102 add r2, r6, r2, lsl #2 3000d5e8: e5922008 ldr r2, [r2, #8] 3000d5ec: e3520001 cmp r2, #1 3000d5f0: 0a00006c beq 3000d7a8 /* * 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 ) ) 3000d5f4: e3550008 cmp r5, #8 3000d5f8: 13550004 cmpne r5, #4 3000d5fc: 0a00006c beq 3000d7b4 3000d600: e355000b cmp r5, #11 3000d604: 0a00006a beq 3000d7b4 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 3000d608: e3a04001 mov r4, #1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { 3000d60c: e3580000 cmp r8, #0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 3000d610: e58d4004 str r4, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 3000d614: e58d5000 str r5, [sp] 3000d618: e1a04314 lsl r4, r4, r3 siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 3000d61c: 15983000 ldrne r3, [r8] */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 3000d620: 058d8008 streq r8, [sp, #8] } else { siginfo->si_value = *value; 3000d624: 158d3008 strne r3, [sp, #8] 3000d628: e59f321c ldr r3, [pc, #540] ; 3000d84c 3000d62c: e5932000 ldr r2, [r3] 3000d630: e2822001 add r2, r2, #1 3000d634: e5832000 str r2, [r3] /* * 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; 3000d638: e59f3210 ldr r3, [pc, #528] ; 3000d850 3000d63c: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3000d640: e5903108 ldr r3, [r0, #264] ; 0x108 3000d644: e59330cc ldr r3, [r3, #204] ; 0xcc 3000d648: e1d43003 bics r3, r4, r3 3000d64c: 1a000047 bne 3000d770 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 3000d650: e59fc1fc ldr ip, [pc, #508] ; 3000d854 3000d654: e49c3004 ldr r3, [ip], #4 3000d658: e153000c cmp r3, ip 3000d65c: 0a000013 beq 3000d6b0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d660: e5932030 ldr r2, [r3, #48] ; 0x30 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 3000d664: e1a00003 mov r0, r3 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d668: e1140002 tst r4, r2 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 ]; 3000d66c: e5932108 ldr r2, [r3, #264] ; 0x108 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d670: 1a00003e bne 3000d770 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 3000d674: e59220cc ldr r2, [r2, #204] ; 0xcc 3000d678: e1d42002 bics r2, r4, r2 3000d67c: 0a000008 beq 3000d6a4 3000d680: ea00003a b 3000d770 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d684: e5932030 ldr r2, [r3, #48] ; 0x30 <== 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 ]; 3000d688: e5931108 ldr r1, [r3, #264] ; 0x108 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d68c: e1140002 tst r4, r2 <== 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; 3000d690: e1a00003 mov r0, r3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d694: 1a000035 bne 3000d770 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 3000d698: e59120cc ldr r2, [r1, #204] ; 0xcc <== NOT EXECUTED 3000d69c: e1d42002 bics r2, r4, r2 <== NOT EXECUTED 3000d6a0: 1a000032 bne 3000d770 <== 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 ) { 3000d6a4: e5933000 ldr r3, [r3] /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 3000d6a8: e153000c cmp r3, ip 3000d6ac: 1afffff4 bne 3000d684 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 3000d6b0: e59f31a0 ldr r3, [pc, #416] ; 3000d858 3000d6b4: e59f81a0 ldr r8, [pc, #416] ; 3000d85c 3000d6b8: e5d3c000 ldrb ip, [r3] */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 3000d6bc: e3a0a000 mov sl, #0 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 3000d6c0: e28cc001 add ip, ip, #1 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 ] ) 3000d6c4: e5983008 ldr r3, [r8, #8] 3000d6c8: e3530000 cmp r3, #0 3000d6cc: 0a000020 beq 3000d754 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 3000d6d0: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 3000d6d4: e1d301b0 ldrh r0, [r3, #16] object_table = the_info->local_table; 3000d6d8: e593e01c ldr lr, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 3000d6dc: e3500000 cmp r0, #0 3000d6e0: 0a00001b beq 3000d754 3000d6e4: e3a03001 mov r3, #1 the_thread = (Thread_Control *) object_table[ index ]; 3000d6e8: e79e2103 ldr r2, [lr, r3, lsl #2] #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3000d6ec: e2833001 add r3, r3, #1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 3000d6f0: e3520000 cmp r2, #0 3000d6f4: 0a000014 beq 3000d74c /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 3000d6f8: e5921014 ldr r1, [r2, #20] 3000d6fc: e151000c cmp r1, ip 3000d700: 8a000011 bhi 3000d74c DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3000d704: e5929108 ldr r9, [r2, #264] ; 0x108 3000d708: e59990cc ldr r9, [r9, #204] ; 0xcc 3000d70c: e1d49009 bics r9, r4, r9 3000d710: 0a00000d beq 3000d74c * * 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 ) { 3000d714: e151000c cmp r1, ip 3000d718: 3a000009 bcc 3000d744 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 3000d71c: e59a9010 ldr r9, [sl, #16] 3000d720: e3590000 cmp r9, #0 3000d724: 0a000008 beq 3000d74c /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 3000d728: e592b010 ldr fp, [r2, #16] 3000d72c: e35b0000 cmp fp, #0 3000d730: 0a000003 beq 3000d744 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 3000d734: e3190201 tst r9, #268435456 ; 0x10000000 3000d738: 1a000003 bne 3000d74c DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 3000d73c: e31b0201 tst fp, #268435456 ; 0x10000000 3000d740: 0a000001 beq 3000d74c 3000d744: e1a0c001 mov ip, r1 3000d748: e1a0a002 mov sl, r2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3000d74c: e1500003 cmp r0, r3 3000d750: 2affffe4 bcs 3000d6e8 * + 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++) { 3000d754: e59f3104 ldr r3, [pc, #260] ; 3000d860 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3000d758: e2888004 add r8, r8, #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++) { 3000d75c: e1580003 cmp r8, r3 3000d760: 1affffd7 bne 3000d6c4 } } } } if ( interested ) { 3000d764: e35a0000 cmp sl, #0 3000d768: 0a000007 beq 3000d78c 3000d76c: e1a0000a mov r0, sl * 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; 3000d770: e3a03001 mov r3, #1 3000d774: e5c03074 strb r3, [r0, #116] ; 0x74 /* * 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 ) ) { 3000d778: e1a01005 mov r1, r5 3000d77c: e1a0200d mov r2, sp 3000d780: eb00006d bl 3000d93c <_POSIX_signals_Unblock_thread> 3000d784: e3500000 cmp r0, #0 3000d788: 1a00001b bne 3000d7fc * 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 ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 3000d78c: e0875005 add r5, r7, r5 /* * 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 ); 3000d790: e1a00004 mov r0, r4 3000d794: eb000056 bl 3000d8f4 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 3000d798: e7963105 ldr r3, [r6, r5, lsl #2] 3000d79c: e3530002 cmp r3, #2 3000d7a0: 0a000007 beq 3000d7c4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 3000d7a4: ebffe659 bl 30007110 <_Thread_Enable_dispatch> 3000d7a8: e3a00000 mov r0, #0 return 0; } 3000d7ac: e28dd00c add sp, sp, #12 3000d7b0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * 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 ); 3000d7b4: eb0000e8 bl 3000db5c 3000d7b8: e1a01005 mov r1, r5 3000d7bc: eb0000a8 bl 3000da64 3000d7c0: eafffff9 b 3000d7ac */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 3000d7c4: e59f0098 ldr r0, [pc, #152] ; 3000d864 3000d7c8: ebffe092 bl 30005a18 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 3000d7cc: e250c000 subs ip, r0, #0 3000d7d0: 0a000016 beq 3000d830 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 3000d7d4: e28c3008 add r3, ip, #8 3000d7d8: e1a0200d mov r2, sp 3000d7dc: e8920007 ldm r2, {r0, r1, r2} 3000d7e0: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 3000d7e4: e59f007c ldr r0, [pc, #124] ; 3000d868 3000d7e8: e1a0100c mov r1, ip 3000d7ec: e0800105 add r0, r0, r5, lsl #2 3000d7f0: ebffe07d bl 300059ec <_Chain_Append> } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 3000d7f4: ebffe645 bl 30007110 <_Thread_Enable_dispatch> 3000d7f8: eaffffea b 3000d7a8 /* * 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 ) ) { _Thread_Enable_dispatch(); 3000d7fc: ebffe643 bl 30007110 <_Thread_Enable_dispatch> 3000d800: e3a00000 mov r0, #0 return 0; 3000d804: eaffffe8 b 3000d7ac /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 3000d808: eb000102 bl 3000dc18 <__errno> 3000d80c: e3a03003 mov r3, #3 3000d810: e5803000 str r3, [r0] 3000d814: e3e00000 mvn r0, #0 3000d818: eaffffe3 b 3000d7ac */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 3000d81c: eb0000fd bl 3000dc18 <__errno> 3000d820: e3a03016 mov r3, #22 3000d824: e5803000 str r3, [r0] 3000d828: e3e00000 mvn r0, #0 3000d82c: eaffffde b 3000d7ac 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(); 3000d830: ebffe636 bl 30007110 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 3000d834: eb0000f7 bl 3000dc18 <__errno> 3000d838: e3a0300b mov r3, #11 3000d83c: e5803000 str r3, [r0] 3000d840: e3e00000 mvn r0, #0 3000d844: eaffffd8 b 3000d7ac 30006504 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30006504: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30006508: e2505000 subs r5, r0, #0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 3000650c: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30006510: 0a00001d beq 3000658c * * 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 ); 30006514: e1a00001 mov r0, r1 30006518: e28d1004 add r1, sp, #4 3000651c: eb001974 bl 3000caf4 <_POSIX_Absolute_timeout_to_ticks> 30006520: e5951000 ldr r1, [r5] 30006524: e1a04000 mov r4, r0 30006528: e28d2008 add r2, sp, #8 3000652c: e59f0090 ldr r0, [pc, #144] ; 300065c4 30006530: eb000a7e bl 30008f30 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30006534: e59dc008 ldr ip, [sp, #8] 30006538: e35c0000 cmp ip, #0 3000653c: 1a000012 bne 3000658c case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 30006540: e5951000 ldr r1, [r5] 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, 30006544: e3540003 cmp r4, #3 30006548: 13a05000 movne r5, #0 3000654c: 03a05001 moveq r5, #1 30006550: e2800010 add r0, r0, #16 30006554: e59d3004 ldr r3, [sp, #4] 30006558: e1a02005 mov r2, r5 3000655c: e58dc000 str ip, [sp] 30006560: eb000720 bl 300081e8 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30006564: eb000cad bl 30009820 <_Thread_Enable_dispatch> if ( !do_wait ) { 30006568: e3550000 cmp r5, #0 3000656c: 1a00000f bne 300065b0 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 30006570: e59f3050 ldr r3, [pc, #80] ; 300065c8 30006574: e5933000 ldr r3, [r3] 30006578: e5930034 ldr r0, [r3, #52] ; 0x34 3000657c: e3500002 cmp r0, #2 30006580: 0a000004 beq 30006598 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006584: eb000042 bl 30006694 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30006588: ea000000 b 30006590 3000658c: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30006590: e28dd00c add sp, sp, #12 30006594: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 30006598: e3540000 cmp r4, #0 3000659c: 0afffffa beq 3000658c 300065a0: e3540002 cmp r4, #2 300065a4: 93a00074 movls r0, #116 ; 0x74 300065a8: 9afffff8 bls 30006590 300065ac: eafffff4 b 30006584 <== NOT EXECUTED 300065b0: e59f3010 ldr r3, [pc, #16] ; 300065c8 300065b4: e5933000 ldr r3, [r3] 300065b8: e5930034 ldr r0, [r3, #52] ; 0x34 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 300065bc: eb000034 bl 30006694 <_POSIX_RWLock_Translate_core_RWLock_return_code> 300065c0: eafffff2 b 30006590 300065cc : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300065cc: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300065d0: e2505000 subs r5, r0, #0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300065d4: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300065d8: 0a00001d beq 30006654 * * 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 ); 300065dc: e1a00001 mov r0, r1 300065e0: e28d1004 add r1, sp, #4 300065e4: eb001942 bl 3000caf4 <_POSIX_Absolute_timeout_to_ticks> 300065e8: e5951000 ldr r1, [r5] 300065ec: e1a04000 mov r4, r0 300065f0: e28d2008 add r2, sp, #8 300065f4: e59f0090 ldr r0, [pc, #144] ; 3000668c 300065f8: eb000a4c bl 30008f30 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 300065fc: e59dc008 ldr ip, [sp, #8] 30006600: e35c0000 cmp ip, #0 30006604: 1a000012 bne 30006654 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 30006608: e5951000 ldr r1, [r5] (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, 3000660c: e3540003 cmp r4, #3 30006610: 13a05000 movne r5, #0 30006614: 03a05001 moveq r5, #1 30006618: e2800010 add r0, r0, #16 3000661c: e59d3004 ldr r3, [sp, #4] 30006620: e1a02005 mov r2, r5 30006624: e58dc000 str ip, [sp] 30006628: eb000725 bl 300082c4 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 3000662c: eb000c7b bl 30009820 <_Thread_Enable_dispatch> if ( !do_wait && 30006630: e3550000 cmp r5, #0 30006634: 1a00000f bne 30006678 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 30006638: e59f3050 ldr r3, [pc, #80] ; 30006690 3000663c: e5933000 ldr r3, [r3] 30006640: e5930034 ldr r0, [r3, #52] ; 0x34 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 30006644: e3500002 cmp r0, #2 30006648: 0a000004 beq 30006660 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 3000664c: eb000010 bl 30006694 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30006650: ea000000 b 30006658 30006654: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30006658: e28dd00c add sp, sp, #12 3000665c: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 30006660: e3540000 cmp r4, #0 30006664: 0afffffa beq 30006654 30006668: e3540002 cmp r4, #2 3000666c: 93a00074 movls r0, #116 ; 0x74 30006670: 9afffff8 bls 30006658 30006674: eafffff4 b 3000664c <== NOT EXECUTED 30006678: e59f3010 ldr r3, [pc, #16] ; 30006690 3000667c: e5933000 ldr r3, [r3] 30006680: e5930034 ldr r0, [r3, #52] ; 0x34 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006684: eb000002 bl 30006694 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30006688: eafffff2 b 30006658 3000740c : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 3000740c: e59fc144 ldr ip, [pc, #324] ; 30007558 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; 30007410: e59f3144 ldr r3, [pc, #324] ; 3000755c if ( rtems_interrupt_is_in_progress() ) 30007414: e59cc000 ldr ip, [ip] 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 ) { 30007418: e92d4010 push {r4, lr} rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 3000741c: e35c0000 cmp ip, #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 ) { 30007420: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 30007424: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) 30007428: 13a00012 movne r0, #18 3000742c: 18bd8010 popne {r4, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 30007430: e3520000 cmp r2, #0 30007434: 0a00003c beq 3000752c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 30007438: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 3000743c: e5820000 str r0, [r2] if ( driver_table == NULL ) 30007440: 0a000039 beq 3000752c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007444: e591c000 ldr ip, [r1] 30007448: e35c0000 cmp ip, #0 3000744c: 0a000033 beq 30007520 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 30007450: e1500004 cmp r0, r4 30007454: 93a0000a movls r0, #10 30007458: 98bd8010 popls {r4, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000745c: e59f00fc ldr r0, [pc, #252] ; 30007560 30007460: e590c000 ldr ip, [r0] 30007464: e28cc001 add ip, ip, #1 30007468: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 3000746c: e3540000 cmp r4, #0 30007470: 1a000020 bne 300074f8 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 30007474: e593e000 ldr lr, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 30007478: e35e0000 cmp lr, #0 3000747c: 0a00002c beq 30007534 30007480: e59f30dc ldr r3, [pc, #220] ; 30007564 30007484: e593c000 ldr ip, [r3] 30007488: e1a0300c mov r3, ip 3000748c: ea000003 b 300074a0 30007490: e2844001 add r4, r4, #1 30007494: e15e0004 cmp lr, r4 30007498: e2833018 add r3, r3, #24 3000749c: 9a000005 bls 300074b8 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 300074a0: e5930000 ldr r0, [r3] 300074a4: e3500000 cmp r0, #0 300074a8: 1afffff8 bne 30007490 300074ac: e5930004 ldr r0, [r3, #4] 300074b0: e3500000 cmp r0, #0 300074b4: 1afffff5 bne 30007490 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 300074b8: e15e0004 cmp lr, r4 300074bc: 10843084 addne r3, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 300074c0: e5824000 str r4, [r2] if ( m != n ) 300074c4: 108cc183 addne ip, ip, r3, lsl #3 300074c8: 0a00001a beq 30007538 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 300074cc: e1a0e001 mov lr, r1 300074d0: e8be000f ldm lr!, {r0, r1, r2, r3} 300074d4: e8ac000f stmia ip!, {r0, r1, r2, r3} 300074d8: e89e0003 ldm lr, {r0, r1} 300074dc: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 300074e0: eb0006bd bl 30008fdc <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 300074e4: e3a01000 mov r1, #0 300074e8: e1a00004 mov r0, r4 300074ec: e1a02001 mov r2, r1 } 300074f0: e8bd4010 pop {r4, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 300074f4: ea0023fb b 300104e8 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 300074f8: e59f3064 ldr r3, [pc, #100] ; 30007564 300074fc: e084c084 add ip, r4, r4, lsl #1 30007500: e5933000 ldr r3, [r3] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007504: e793018c ldr r0, [r3, ip, lsl #3] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 30007508: e083c18c add ip, r3, ip, lsl #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 3000750c: e3500000 cmp r0, #0 30007510: 0a00000b beq 30007544 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(); 30007514: eb0006b0 bl 30008fdc <_Thread_Enable_dispatch> 30007518: e3a0000c mov r0, #12 return RTEMS_RESOURCE_IN_USE; 3000751c: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007520: e591c004 ldr ip, [r1, #4] 30007524: e35c0000 cmp ip, #0 30007528: 1affffc8 bne 30007450 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 3000752c: e3a00009 mov r0, #9 } 30007530: e8bd8010 pop {r4, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 30007534: e5824000 str r4, [r2] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 30007538: eb0006a7 bl 30008fdc <_Thread_Enable_dispatch> 3000753c: e3a00005 mov r0, #5 return sc; 30007540: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007544: e59c3004 ldr r3, [ip, #4] 30007548: e3530000 cmp r3, #0 3000754c: 1afffff0 bne 30007514 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 30007550: e5824000 str r4, [r2] 30007554: eaffffdc b 300074cc 30005a98 : int sched_get_priority_min( int policy ) { switch ( policy ) { 30005a98: e3500004 cmp r0, #4 #include int sched_get_priority_min( int policy ) { 30005a9c: e52de004 push {lr} ; (str lr, [sp, #-4]!) switch ( policy ) { 30005aa0: 9a000004 bls 30005ab8 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 30005aa4: eb00241f bl 3000eb28 <__errno> 30005aa8: e3a03016 mov r3, #22 30005aac: e5803000 str r3, [r0] 30005ab0: e3e00000 mvn r0, #0 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 30005ab4: e49df004 pop {pc} ; (ldr pc, [sp], #4) int sched_get_priority_min( int policy ) { switch ( policy ) { 30005ab8: e3a03001 mov r3, #1 30005abc: e1a00013 lsl r0, r3, r0 30005ac0: e3100017 tst r0, #23 30005ac4: 11a00003 movne r0, r3 30005ac8: 149df004 popne {pc} ; (ldrne pc, [sp], #4) case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 30005acc: eb002415 bl 3000eb28 <__errno> <== NOT EXECUTED 30005ad0: e3a03016 mov r3, #22 <== NOT EXECUTED 30005ad4: e5803000 str r3, [r0] <== NOT EXECUTED 30005ad8: e3e00000 mvn r0, #0 <== NOT EXECUTED } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 30005adc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 300080cc : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 300080cc: e92d4010 push {r4, lr} 300080d0: e24dd004 sub sp, sp, #4 300080d4: e1a04000 mov r4, r0 * * 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 ); 300080d8: e1a00001 mov r0, r1 300080dc: e1a0100d mov r1, sp 300080e0: eb0015bc bl 3000d7d8 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 300080e4: e3500003 cmp r0, #3 300080e8: 0a000005 beq 30008104 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 300080ec: e1a00004 mov r0, r4 <== NOT EXECUTED 300080f0: e3a01000 mov r1, #0 <== NOT EXECUTED 300080f4: e59d2000 ldr r2, [sp] <== NOT EXECUTED 300080f8: eb001878 bl 3000e2e0 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 300080fc: e28dd004 add sp, sp, #4 30008100: e8bd8010 pop {r4, pc} */ 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 ); 30008104: e1a00004 mov r0, r4 30008108: e3a01001 mov r1, #1 3000810c: e59d2000 ldr r2, [sp] 30008110: eb001872 bl 3000e2e0 <_POSIX_Semaphore_Wait_support> 30008114: eafffff8 b 300080fc