3000439c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 3000439c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 300043a0: e5901104 ldr r1, [r0, #260] ; 0x104 option_set = (rtems_option) the_thread->Wait.option; 300043a4: e5905030 ldr r5, [r0, #48] ; 0x30 */ void _Event_Surrender( Thread_Control *the_thread ) { 300043a8: e1a04000 mov r4, r0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300043ac: e10f0000 mrs r0, CPSR 300043b0: e3803080 orr r3, r0, #128 ; 0x80 300043b4: e129f003 msr CPSR_fc, r3 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 300043b8: e5912000 ldr r2, [r1] event_condition = (rtems_event_set) the_thread->Wait.count; 300043bc: e5943024 ldr r3, [r4, #36] ; 0x24 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 300043c0: e013c002 ands ip, r3, r2 300043c4: 0a000021 beq 30004450 <_Event_Surrender+0xb4> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 300043c8: e59f6100 ldr r6, [pc, #256] ; 300044d0 <_Event_Surrender+0x134> 300043cc: e5966000 ldr r6, [r6] 300043d0: e3560000 cmp r6, #0 300043d4: 0a000003 beq 300043e8 <_Event_Surrender+0x4c> 300043d8: e59f60f4 ldr r6, [pc, #244] ; 300044d4 <_Event_Surrender+0x138> 300043dc: e5966000 ldr r6, [r6] 300043e0: e1540006 cmp r4, r6 300043e4: 0a000024 beq 3000447c <_Event_Surrender+0xe0> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 300043e8: e5946010 ldr r6, [r4, #16] 300043ec: e3160c01 tst r6, #256 ; 0x100 300043f0: 0a000014 beq 30004448 <_Event_Surrender+0xac> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 300043f4: e153000c cmp r3, ip 300043f8: 0a000001 beq 30004404 <_Event_Surrender+0x68> 300043fc: e3150002 tst r5, #2 30004400: 0a000010 beq 30004448 <_Event_Surrender+0xac> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30004404: e5943028 ldr r3, [r4, #40] ; 0x28 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30004408: e1c2200c bic r2, r2, ip 3000440c: e5812000 str r2, [r1] the_thread->Wait.count = 0; 30004410: e3a02000 mov r2, #0 30004414: e5842024 str r2, [r4, #36] ; 0x24 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30004418: e583c000 str ip, [r3] static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 3000441c: e10f3000 mrs r3, CPSR 30004420: e129f000 msr CPSR_fc, r0 30004424: e129f003 msr CPSR_fc, r3 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 30004428: e5943050 ldr r3, [r4, #80] ; 0x50 3000442c: e3530002 cmp r3, #2 30004430: 0a000008 beq 30004458 <_Event_Surrender+0xbc> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30004434: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 30004438: e59f1098 ldr r1, [pc, #152] ; 300044d8 <_Event_Surrender+0x13c> 3000443c: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 30004440: e8bd40f0 pop {r4, r5, r6, r7, lr} 30004444: ea0007e4 b 300063dc <_Thread_Clear_state> 30004448: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 3000444c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30004450: e129f000 msr CPSR_fc, r0 30004454: e8bd80f0 pop {r4, r5, r6, r7, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 30004458: e3a03003 mov r3, #3 3000445c: e5843050 str r3, [r4, #80] ; 0x50 30004460: e129f000 msr CPSR_fc, r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); 30004464: e2840048 add r0, r4, #72 ; 0x48 30004468: eb000d94 bl 30007ac0 <_Watchdog_Remove> 3000446c: e59f1064 ldr r1, [pc, #100] ; 300044d8 <_Event_Surrender+0x13c> 30004470: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 30004474: e8bd40f0 pop {r4, r5, r6, r7, lr} 30004478: ea0007d7 b 300063dc <_Thread_Clear_state> * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 3000447c: e59f6058 ldr r6, [pc, #88] ; 300044dc <_Event_Surrender+0x140> 30004480: e5967000 ldr r7, [r6] /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 30004484: e3570002 cmp r7, #2 30004488: 0a000002 beq 30004498 <_Event_Surrender+0xfc> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 3000448c: e5967000 ldr r7, [r6] /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 30004490: e3570001 cmp r7, #1 30004494: 1affffd3 bne 300043e8 <_Event_Surrender+0x4c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 30004498: e153000c cmp r3, ip 3000449c: 0a000001 beq 300044a8 <_Event_Surrender+0x10c> 300044a0: e3150002 tst r5, #2 300044a4: 0a000007 beq 300044c8 <_Event_Surrender+0x12c> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 300044a8: e1c2200c bic r2, r2, ip 300044ac: e5812000 str r2, [r1] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 300044b0: e5943028 ldr r3, [r4, #40] ; 0x28 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 300044b4: e3a02003 mov r2, #3 300044b8: e5862000 str r2, [r6] _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 300044bc: e3a02000 mov r2, #0 300044c0: e5842024 str r2, [r4, #36] ; 0x24 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 300044c4: e583c000 str ip, [r3] 300044c8: e129f000 msr CPSR_fc, r0 300044cc: e8bd80f0 pop {r4, r5, r6, r7, pc} 300044d0: 3001aa3c .word 0x3001aa3c 300044d4: 3001aa60 .word 0x3001aa60 300044d8: 1003fff8 .word 0x1003fff8 300044dc: 3001b230 .word 0x3001b230 3000a8dc <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000a8dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000a8e0: 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; 3000a8e4: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000a8e8: e24dd01c sub sp, sp, #28 3000a8ec: 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 ) { 3000a8f0: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000a8f4: 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 ) { 3000a8f8: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000a8fc: 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; 3000a900: 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; 3000a904: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 3000a908: 2a000074 bcs 3000aae0 <_Heap_Allocate_aligned_with_boundary+0x204> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 3000a90c: e3530000 cmp r3, #0 3000a910: 1a000070 bne 3000aad8 <_Heap_Allocate_aligned_with_boundary+0x1fc> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000a914: e157000a cmp r7, sl 3000a918: 03a06000 moveq r6, #0 3000a91c: 0a000072 beq 3000aaec <_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; 3000a920: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 3000a924: 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; 3000a928: e2833007 add r3, r3, #7 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000a92c: 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; 3000a930: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 3000a934: e58d1014 str r1, [sp, #20] 3000a938: ea000004 b 3000a950 <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { 3000a93c: e3540000 cmp r4, #0 3000a940: 1a000057 bne 3000aaa4 <_Heap_Allocate_aligned_with_boundary+0x1c8> break; } block = block->next; 3000a944: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000a948: e157000a cmp r7, sl 3000a94c: 0a000066 beq 3000aaec <_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 ) { 3000a950: e59a9004 ldr r9, [sl, #4] 3000a954: e59d2000 ldr r2, [sp] while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 3000a958: 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 ) { 3000a95c: e1520009 cmp r2, r9 3000a960: 2afffff7 bcs 3000a944 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { 3000a964: 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; 3000a968: 028a4008 addeq r4, sl, #8 3000a96c: 0afffff2 beq 3000a93c <_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; 3000a970: 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; 3000a974: e3c99001 bic r9, r9, #1 3000a978: 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; 3000a97c: 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; 3000a980: e59d2010 ldr r2, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 3000a984: 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; 3000a988: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000a98c: 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; 3000a990: e0633002 rsb r3, r3, r2 3000a994: e1a01008 mov r1, r8 3000a998: e0839009 add r9, r3, r9 3000a99c: eb003147 bl 30016ec0 <__umodsi3> 3000a9a0: 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; 3000a9a4: 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 ) { 3000a9a8: e1590004 cmp r9, r4 3000a9ac: e58d3008 str r3, [sp, #8] 3000a9b0: 2a000003 bcs 3000a9c4 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000a9b4: e1a00009 mov r0, r9 3000a9b8: e1a01008 mov r1, r8 3000a9bc: eb00313f bl 30016ec0 <__umodsi3> 3000a9c0: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 3000a9c4: e35b0000 cmp fp, #0 3000a9c8: 0a000025 beq 3000aa64 <_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; 3000a9cc: e0849005 add r9, r4, r5 3000a9d0: e1a00009 mov r0, r9 3000a9d4: e1a0100b mov r1, fp 3000a9d8: eb003138 bl 30016ec0 <__umodsi3> 3000a9dc: 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 ) { 3000a9e0: e1590000 cmp r9, r0 3000a9e4: 93a03000 movls r3, #0 3000a9e8: 83a03001 movhi r3, #1 3000a9ec: e1540000 cmp r4, r0 3000a9f0: 23a03000 movcs r3, #0 3000a9f4: e3530000 cmp r3, #0 3000a9f8: 0a000019 beq 3000aa64 <_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; 3000a9fc: e59d1008 ldr r1, [sp, #8] 3000aa00: 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 ) { 3000aa04: e1590000 cmp r9, r0 3000aa08: 958d6018 strls r6, [sp, #24] 3000aa0c: 9a000002 bls 3000aa1c <_Heap_Allocate_aligned_with_boundary+0x140> 3000aa10: eaffffcb b 3000a944 <_Heap_Allocate_aligned_with_boundary+0x68> 3000aa14: e1590000 cmp r9, r0 3000aa18: 8a000035 bhi 3000aaf4 <_Heap_Allocate_aligned_with_boundary+0x218> return 0; } alloc_begin = boundary_line - alloc_size; 3000aa1c: e0654000 rsb r4, r5, r0 3000aa20: e1a01008 mov r1, r8 3000aa24: e1a00004 mov r0, r4 3000aa28: eb003124 bl 30016ec0 <__umodsi3> 3000aa2c: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 3000aa30: e0846005 add r6, r4, r5 3000aa34: e1a00006 mov r0, r6 3000aa38: e1a0100b mov r1, fp 3000aa3c: eb00311f bl 30016ec0 <__umodsi3> 3000aa40: 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 ) { 3000aa44: e1560000 cmp r6, r0 3000aa48: 93a03000 movls r3, #0 3000aa4c: 83a03001 movhi r3, #1 3000aa50: e1540000 cmp r4, r0 3000aa54: 23a03000 movcs r3, #0 3000aa58: e3530000 cmp r3, #0 3000aa5c: 1affffec bne 3000aa14 <_Heap_Allocate_aligned_with_boundary+0x138> 3000aa60: 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 ) { 3000aa64: e59d2008 ldr r2, [sp, #8] 3000aa68: e1520004 cmp r2, r4 3000aa6c: 8affffb4 bhi 3000a944 <_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; 3000aa70: e59d100c ldr r1, [sp, #12] 3000aa74: e1a00004 mov r0, r4 3000aa78: eb003110 bl 30016ec0 <__umodsi3> 3000aa7c: e3e09007 mvn r9, #7 3000aa80: e06a9009 rsb r9, sl, r9 3000aa84: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { 3000aa88: e59d1004 ldr r1, [sp, #4] 3000aa8c: e0603009 rsb r3, r0, r9 3000aa90: e1590000 cmp r9, r0 3000aa94: 11510003 cmpne r1, r3 3000aa98: 8affffa9 bhi 3000a944 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { 3000aa9c: e3540000 cmp r4, #0 3000aaa0: 0affffa7 beq 3000a944 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 3000aaa4: e597304c ldr r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 3000aaa8: e1a0100a mov r1, sl block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 3000aaac: e0833006 add r3, r3, r6 3000aab0: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 3000aab4: e1a00007 mov r0, r7 3000aab8: e1a03005 mov r3, r5 3000aabc: e1a02004 mov r2, r4 3000aac0: ebffeb6d bl 3000587c <_Heap_Block_allocate> 3000aac4: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 3000aac8: e5973044 ldr r3, [r7, #68] ; 0x44 3000aacc: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 3000aad0: 35876044 strcc r6, [r7, #68] ; 0x44 3000aad4: ea000002 b 3000aae4 <_Heap_Allocate_aligned_with_boundary+0x208> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 3000aad8: e1550003 cmp r5, r3 3000aadc: 9a000006 bls 3000aafc <_Heap_Allocate_aligned_with_boundary+0x220> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 3000aae0: e3a00000 mov r0, #0 } return (void *) alloc_begin; } 3000aae4: e28dd01c add sp, sp, #28 3000aae8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 3000aaec: e3a00000 mov r0, #0 3000aaf0: eafffff4 b 3000aac8 <_Heap_Allocate_aligned_with_boundary+0x1ec> 3000aaf4: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED 3000aaf8: eaffff91 b 3000a944 <_Heap_Allocate_aligned_with_boundary+0x68> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 3000aafc: e3580000 cmp r8, #0 3000ab00: 01a08002 moveq r8, r2 3000ab04: eaffff82 b 3000a914 <_Heap_Allocate_aligned_with_boundary+0x38> 30006604 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006604: 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() ) ) { 30006608: e59f35d0 ldr r3, [pc, #1488] ; 30006be0 <_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; 3000660c: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006610: 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; 30006614: e59f25c8 ldr r2, [pc, #1480] ; 30006be4 <_Heap_Walk+0x5e0> 30006618: e59fa5c8 ldr sl, [pc, #1480] ; 30006be8 <_Heap_Walk+0x5e4> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 3000661c: 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; 30006620: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006624: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 30006628: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; 3000662c: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006630: e1a04000 mov r4, r0 30006634: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; 30006638: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; 3000663c: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; 30006640: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; 30006644: 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() ) ) { 30006648: 0a000002 beq 30006658 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 3000664c: e3a00001 mov r0, #1 block = next_block; } return true; } 30006650: e28dd038 add sp, sp, #56 ; 0x38 30006654: 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)( 30006658: e5900018 ldr r0, [r0, #24] 3000665c: e594101c ldr r1, [r4, #28] 30006660: e5942008 ldr r2, [r4, #8] 30006664: e594300c ldr r3, [r4, #12] 30006668: e59dc024 ldr ip, [sp, #36] ; 0x24 3000666c: e98d0003 stmib sp, {r0, r1} 30006670: e58d2014 str r2, [sp, #20] 30006674: e58d3018 str r3, [sp, #24] 30006678: e59f256c ldr r2, [pc, #1388] ; 30006bec <_Heap_Walk+0x5e8> 3000667c: e58db000 str fp, [sp] 30006680: e58d500c str r5, [sp, #12] 30006684: e58dc010 str ip, [sp, #16] 30006688: e1a00008 mov r0, r8 3000668c: e3a01000 mov r1, #0 30006690: e59d3020 ldr r3, [sp, #32] 30006694: e1a0e00f mov lr, pc 30006698: e12fff1a bx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 3000669c: e59d2020 ldr r2, [sp, #32] 300066a0: e3520000 cmp r2, #0 300066a4: 0a000032 beq 30006774 <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 300066a8: e59d3020 ldr r3, [sp, #32] 300066ac: e2139003 ands r9, r3, #3 300066b0: 1a000036 bne 30006790 <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 300066b4: e1a0000b mov r0, fp 300066b8: e59d1020 ldr r1, [sp, #32] 300066bc: ebffe953 bl 30000c10 <__umodsi3> 300066c0: e2506000 subs r6, r0, #0 300066c4: 1a000038 bne 300067ac <_Heap_Walk+0x1a8> ); return false; } if ( 300066c8: e2850008 add r0, r5, #8 300066cc: e59d1020 ldr r1, [sp, #32] 300066d0: ebffe94e bl 30000c10 <__umodsi3> 300066d4: e2509000 subs r9, r0, #0 300066d8: 1a00003b bne 300067cc <_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; 300066dc: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 300066e0: e2176001 ands r6, r7, #1 300066e4: 0a000040 beq 300067ec <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) { 300066e8: e5953000 ldr r3, [r5] 300066ec: e59dc020 ldr ip, [sp, #32] 300066f0: e15c0003 cmp ip, r3 300066f4: 1a000016 bne 30006754 <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) { 300066f8: e59d2024 ldr r2, [sp, #36] ; 0x24 300066fc: e5923004 ldr r3, [r2, #4] 30006700: e3c33001 bic r3, r3, #1 30006704: e0823003 add r3, r2, r3 30006708: e5939004 ldr r9, [r3, #4] 3000670c: e2199001 ands r9, r9, #1 30006710: 0a000112 beq 30006b60 <_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; 30006714: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30006718: 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 ) { 3000671c: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30006720: 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 ) { 30006724: 0a00006c beq 300068dc <_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; 30006728: 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 3000672c: e15c0009 cmp ip, r9 30006730: 9a000034 bls 30006808 <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 30006734: e1a00008 mov r0, r8 30006738: e1a03009 mov r3, r9 3000673c: e3a01001 mov r1, #1 30006740: e59f24a8 ldr r2, [pc, #1192] ; 30006bf0 <_Heap_Walk+0x5ec> 30006744: e1a0e00f mov lr, pc 30006748: e12fff1a bx sl 3000674c: e3a00000 mov r0, #0 30006750: eaffffbe b 30006650 <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 30006754: e1a00008 mov r0, r8 30006758: e58dc000 str ip, [sp] 3000675c: e3a01001 mov r1, #1 30006760: e59f248c ldr r2, [pc, #1164] ; 30006bf4 <_Heap_Walk+0x5f0> 30006764: e1a0e00f mov lr, pc 30006768: e12fff1a bx sl 3000676c: e1a00009 mov r0, r9 30006770: eaffffb6 b 30006650 <_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" ); 30006774: e1a00008 mov r0, r8 30006778: e3a01001 mov r1, #1 3000677c: e59f2474 ldr r2, [pc, #1140] ; 30006bf8 <_Heap_Walk+0x5f4> 30006780: e1a0e00f mov lr, pc 30006784: e12fff1a bx sl 30006788: e59d0020 ldr r0, [sp, #32] 3000678c: eaffffaf b 30006650 <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 30006790: e1a00008 mov r0, r8 30006794: e3a01001 mov r1, #1 30006798: e59f245c ldr r2, [pc, #1116] ; 30006bfc <_Heap_Walk+0x5f8> 3000679c: e1a0e00f mov lr, pc 300067a0: e12fff1a bx sl 300067a4: e3a00000 mov r0, #0 300067a8: eaffffa8 b 30006650 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 300067ac: e1a00008 mov r0, r8 300067b0: e1a0300b mov r3, fp 300067b4: e3a01001 mov r1, #1 300067b8: e59f2440 ldr r2, [pc, #1088] ; 30006c00 <_Heap_Walk+0x5fc> 300067bc: e1a0e00f mov lr, pc 300067c0: e12fff1a bx sl 300067c4: e1a00009 mov r0, r9 300067c8: eaffffa0 b 30006650 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 300067cc: e1a00008 mov r0, r8 300067d0: e1a03005 mov r3, r5 300067d4: e3a01001 mov r1, #1 300067d8: e59f2424 ldr r2, [pc, #1060] ; 30006c04 <_Heap_Walk+0x600> 300067dc: e1a0e00f mov lr, pc 300067e0: e12fff1a bx sl 300067e4: e1a00006 mov r0, r6 300067e8: eaffff98 b 30006650 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 300067ec: e1a00008 mov r0, r8 300067f0: e3a01001 mov r1, #1 300067f4: e59f240c ldr r2, [pc, #1036] ; 30006c08 <_Heap_Walk+0x604> 300067f8: e1a0e00f mov lr, pc 300067fc: e12fff1a bx sl 30006800: e1a00006 mov r0, r6 30006804: eaffff91 b 30006650 <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 30006808: 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 3000680c: e1520009 cmp r2, r9 && (uintptr_t) block <= (uintptr_t) heap->last_block; 30006810: 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 30006814: 3affffc6 bcc 30006734 <_Heap_Walk+0x130> ); return false; } if ( 30006818: e2890008 add r0, r9, #8 3000681c: e1a01003 mov r1, r3 30006820: e58dc01c str ip, [sp, #28] 30006824: ebffe8f9 bl 30000c10 <__umodsi3> 30006828: e3500000 cmp r0, #0 3000682c: e59dc01c ldr ip, [sp, #28] 30006830: 1a0000d1 bne 30006b7c <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 30006834: e5993004 ldr r3, [r9, #4] 30006838: e3c33001 bic r3, r3, #1 3000683c: e0893003 add r3, r9, r3 30006840: e5933004 ldr r3, [r3, #4] 30006844: e3130001 tst r3, #1 30006848: 1a0000dc bne 30006bc0 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 3000684c: e599200c ldr r2, [r9, #12] 30006850: e1540002 cmp r4, r2 30006854: 1a0000d0 bne 30006b9c <_Heap_Walk+0x598> 30006858: e58d7030 str r7, [sp, #48] ; 0x30 3000685c: e58db034 str fp, [sp, #52] ; 0x34 30006860: e59d702c ldr r7, [sp, #44] ; 0x2c 30006864: e59db028 ldr fp, [sp, #40] ; 0x28 30006868: e58d502c str r5, [sp, #44] ; 0x2c 3000686c: e58d6028 str r6, [sp, #40] ; 0x28 30006870: e1a0600c mov r6, ip 30006874: ea000011 b 300068c0 <_Heap_Walk+0x2bc> 30006878: e1590006 cmp r9, r6 3000687c: 3affffac bcc 30006734 <_Heap_Walk+0x130> 30006880: e1570009 cmp r7, r9 ); return false; } if ( 30006884: e2890008 add r0, r9, #8 30006888: e1a0100b mov r1, fp 3000688c: 3affffa8 bcc 30006734 <_Heap_Walk+0x130> 30006890: ebffe8de bl 30000c10 <__umodsi3> 30006894: e3500000 cmp r0, #0 30006898: 1a0000b7 bne 30006b7c <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 3000689c: e5993004 ldr r3, [r9, #4] 300068a0: e3c33001 bic r3, r3, #1 300068a4: e0833009 add r3, r3, r9 300068a8: e5933004 ldr r3, [r3, #4] 300068ac: e3130001 tst r3, #1 300068b0: 1a0000c2 bne 30006bc0 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 300068b4: e599200c ldr r2, [r9, #12] 300068b8: e1520005 cmp r2, r5 300068bc: 1a0000b6 bne 30006b9c <_Heap_Walk+0x598> (*printer)( 300068c0: e1a05009 mov r5, r9 return false; } prev_block = free_block; free_block = free_block->next; 300068c4: 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 ) { 300068c8: e1540009 cmp r4, r9 300068cc: 1affffe9 bne 30006878 <_Heap_Walk+0x274> 300068d0: e28d502c add r5, sp, #44 ; 0x2c 300068d4: e89508a0 ldm r5, {r5, r7, fp} 300068d8: e59d6028 ldr r6, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 300068dc: e59d3024 ldr r3, [sp, #36] ; 0x24 300068e0: 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)" : ""), 300068e4: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 300068e8: 0affff57 beq 3000664c <_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; 300068ec: 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 ) { 300068f0: 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); 300068f4: e0876005 add r6, r7, r5 300068f8: 0a000012 beq 30006948 <_Heap_Walk+0x344> (*printer)( 300068fc: e1a03005 mov r3, r5 30006900: e58d7000 str r7, [sp] 30006904: e1a00008 mov r0, r8 30006908: e3a01000 mov r1, #0 3000690c: e59f22f8 ldr r2, [pc, #760] ; 30006c0c <_Heap_Walk+0x608> 30006910: e1a0e00f mov lr, pc 30006914: 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 30006918: e5943020 ldr r3, [r4, #32] 3000691c: e1530006 cmp r3, r6 30006920: 9a000013 bls 30006974 <_Heap_Walk+0x370> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 30006924: e1a00008 mov r0, r8 30006928: e58d6000 str r6, [sp] 3000692c: e1a03005 mov r3, r5 30006930: e3a01001 mov r1, #1 30006934: e59f22d4 ldr r2, [pc, #724] ; 30006c10 <_Heap_Walk+0x60c> 30006938: e1a0e00f mov lr, pc 3000693c: e12fff1a bx sl 30006940: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 30006944: eaffff41 b 30006650 <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 30006948: e58d7000 str r7, [sp] 3000694c: e5953000 ldr r3, [r5] 30006950: e1a00008 mov r0, r8 30006954: e58d3004 str r3, [sp, #4] 30006958: e59f22b4 ldr r2, [pc, #692] ; 30006c14 <_Heap_Walk+0x610> 3000695c: e1a03005 mov r3, r5 30006960: e1a0e00f mov lr, pc 30006964: e12fff1a bx sl 30006968: e5943020 ldr r3, [r4, #32] 3000696c: e1530006 cmp r3, r6 30006970: 8affffeb bhi 30006924 <_Heap_Walk+0x320> 30006974: e5943024 ldr r3, [r4, #36] ; 0x24 30006978: e1530006 cmp r3, r6 3000697c: 3affffe8 bcc 30006924 <_Heap_Walk+0x320> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 30006980: e1a00007 mov r0, r7 30006984: e59d1020 ldr r1, [sp, #32] 30006988: ebffe8a0 bl 30000c10 <__umodsi3> 3000698c: e2509000 subs r9, r0, #0 30006990: 1a000055 bne 30006aec <_Heap_Walk+0x4e8> ); return false; } if ( block_size < min_block_size ) { 30006994: e59d3028 ldr r3, [sp, #40] ; 0x28 30006998: e1530007 cmp r3, r7 3000699c: 8a00005b bhi 30006b10 <_Heap_Walk+0x50c> ); return false; } if ( next_block_begin <= block_begin ) { 300069a0: e1550006 cmp r5, r6 300069a4: 2a000064 bcs 30006b3c <_Heap_Walk+0x538> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 300069a8: e5963004 ldr r3, [r6, #4] 300069ac: e3130001 tst r3, #1 300069b0: 1a000036 bne 30006a90 <_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; 300069b4: 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)( 300069b8: 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; 300069bc: 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; 300069c0: 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; 300069c4: e1530002 cmp r3, r2 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 300069c8: 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); 300069cc: 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; 300069d0: 059f0240 ldreq r0, [pc, #576] ; 30006c18 <_Heap_Walk+0x614> 300069d4: 0a000003 beq 300069e8 <_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)" : ""), 300069d8: e59fc23c ldr ip, [pc, #572] ; 30006c1c <_Heap_Walk+0x618> 300069dc: e1520004 cmp r2, r4 300069e0: e59f0238 ldr r0, [pc, #568] ; 30006c20 <_Heap_Walk+0x61c> 300069e4: 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)( 300069e8: e5953008 ldr r3, [r5, #8] 300069ec: e1510003 cmp r1, r3 300069f0: 059f122c ldreq r1, [pc, #556] ; 30006c24 <_Heap_Walk+0x620> 300069f4: 0a000003 beq 30006a08 <_Heap_Walk+0x404> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 300069f8: e59fc21c ldr ip, [pc, #540] ; 30006c1c <_Heap_Walk+0x618> 300069fc: e1530004 cmp r3, r4 30006a00: e59f1220 ldr r1, [pc, #544] ; 30006c28 <_Heap_Walk+0x624> 30006a04: 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)( 30006a08: e58d2000 str r2, [sp] 30006a0c: e98d0009 stmib sp, {r0, r3} 30006a10: e58d100c str r1, [sp, #12] 30006a14: e1a03005 mov r3, r5 30006a18: e1a00008 mov r0, r8 30006a1c: e3a01000 mov r1, #0 30006a20: e59f2204 ldr r2, [pc, #516] ; 30006c2c <_Heap_Walk+0x628> 30006a24: e1a0e00f mov lr, pc 30006a28: e12fff1a bx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 30006a2c: e5993000 ldr r3, [r9] 30006a30: e1570003 cmp r7, r3 30006a34: 0a00000a beq 30006a64 <_Heap_Walk+0x460> (*printer)( 30006a38: e58d3004 str r3, [sp, #4] 30006a3c: e1a00008 mov r0, r8 30006a40: e58d7000 str r7, [sp] 30006a44: e58d9008 str r9, [sp, #8] 30006a48: e1a03005 mov r3, r5 30006a4c: e3a01001 mov r1, #1 30006a50: e59f21d8 ldr r2, [pc, #472] ; 30006c30 <_Heap_Walk+0x62c> 30006a54: e1a0e00f mov lr, pc 30006a58: e12fff1a bx sl 30006a5c: e3a00000 mov r0, #0 30006a60: eafffefa b 30006650 <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { 30006a64: e21b9001 ands r9, fp, #1 30006a68: 0a000017 beq 30006acc <_Heap_Walk+0x4c8> 30006a6c: 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 ) { 30006a70: e1530004 cmp r3, r4 30006a74: 1a000003 bne 30006a88 <_Heap_Walk+0x484> 30006a78: ea00000b b 30006aac <_Heap_Walk+0x4a8> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 30006a7c: 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 ) { 30006a80: e1530004 cmp r3, r4 30006a84: 0a000008 beq 30006aac <_Heap_Walk+0x4a8> if ( free_block == block ) { 30006a88: e1530005 cmp r3, r5 30006a8c: 1afffffa bne 30006a7c <_Heap_Walk+0x478> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 30006a90: e59d2024 ldr r2, [sp, #36] ; 0x24 30006a94: e1520006 cmp r2, r6 30006a98: 0afffeeb beq 3000664c <_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 ) { 30006a9c: e5967004 ldr r7, [r6, #4] 30006aa0: e1a05006 mov r5, r6 30006aa4: e2076001 and r6, r7, #1 30006aa8: eaffff8f b 300068ec <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 30006aac: e1a00008 mov r0, r8 30006ab0: e1a03005 mov r3, r5 30006ab4: e3a01001 mov r1, #1 30006ab8: e59f2174 ldr r2, [pc, #372] ; 30006c34 <_Heap_Walk+0x630> 30006abc: e1a0e00f mov lr, pc 30006ac0: e12fff1a bx sl 30006ac4: e3a00000 mov r0, #0 30006ac8: eafffee0 b 30006650 <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( 30006acc: e1a00008 mov r0, r8 30006ad0: e1a03005 mov r3, r5 30006ad4: e3a01001 mov r1, #1 30006ad8: e59f2158 ldr r2, [pc, #344] ; 30006c38 <_Heap_Walk+0x634> 30006adc: e1a0e00f mov lr, pc 30006ae0: e12fff1a bx sl 30006ae4: e1a00009 mov r0, r9 30006ae8: eafffed8 b 30006650 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 30006aec: e1a00008 mov r0, r8 30006af0: e58d7000 str r7, [sp] 30006af4: e1a03005 mov r3, r5 30006af8: e3a01001 mov r1, #1 30006afc: e59f2138 ldr r2, [pc, #312] ; 30006c3c <_Heap_Walk+0x638> 30006b00: e1a0e00f mov lr, pc 30006b04: e12fff1a bx sl 30006b08: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 30006b0c: eafffecf b 30006650 <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( 30006b10: e58d3004 str r3, [sp, #4] 30006b14: e1a00008 mov r0, r8 30006b18: e1a0b003 mov fp, r3 30006b1c: e58d7000 str r7, [sp] 30006b20: e1a03005 mov r3, r5 30006b24: e3a01001 mov r1, #1 30006b28: e59f2110 ldr r2, [pc, #272] ; 30006c40 <_Heap_Walk+0x63c> 30006b2c: e1a0e00f mov lr, pc 30006b30: e12fff1a bx sl 30006b34: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; 30006b38: eafffec4 b 30006650 <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( 30006b3c: e1a00008 mov r0, r8 30006b40: e58d6000 str r6, [sp] 30006b44: e1a03005 mov r3, r5 30006b48: e3a01001 mov r1, #1 30006b4c: e59f20f0 ldr r2, [pc, #240] ; 30006c44 <_Heap_Walk+0x640> 30006b50: e1a0e00f mov lr, pc 30006b54: e12fff1a bx sl 30006b58: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 30006b5c: eafffebb b 30006650 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 30006b60: e1a00008 mov r0, r8 30006b64: e3a01001 mov r1, #1 30006b68: e59f20d8 ldr r2, [pc, #216] ; 30006c48 <_Heap_Walk+0x644> 30006b6c: e1a0e00f mov lr, pc 30006b70: e12fff1a bx sl 30006b74: e1a00009 mov r0, r9 30006b78: eafffeb4 b 30006650 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 30006b7c: e1a00008 mov r0, r8 30006b80: e1a03009 mov r3, r9 30006b84: e3a01001 mov r1, #1 30006b88: e59f20bc ldr r2, [pc, #188] ; 30006c4c <_Heap_Walk+0x648> 30006b8c: e1a0e00f mov lr, pc 30006b90: e12fff1a bx sl 30006b94: e3a00000 mov r0, #0 30006b98: eafffeac b 30006650 <_Heap_Walk+0x4c> return false; } if ( free_block->prev != prev_block ) { (*printer)( 30006b9c: e58d2000 str r2, [sp] 30006ba0: e1a00008 mov r0, r8 30006ba4: e1a03009 mov r3, r9 30006ba8: e3a01001 mov r1, #1 30006bac: e59f209c ldr r2, [pc, #156] ; 30006c50 <_Heap_Walk+0x64c> 30006bb0: e1a0e00f mov lr, pc 30006bb4: e12fff1a bx sl 30006bb8: e3a00000 mov r0, #0 30006bbc: eafffea3 b 30006650 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 30006bc0: e1a00008 mov r0, r8 30006bc4: e1a03009 mov r3, r9 30006bc8: e3a01001 mov r1, #1 30006bcc: e59f2080 ldr r2, [pc, #128] ; 30006c54 <_Heap_Walk+0x650> 30006bd0: e1a0e00f mov lr, pc 30006bd4: e12fff1a bx sl 30006bd8: e3a00000 mov r0, #0 30006bdc: eafffe9b b 30006650 <_Heap_Walk+0x4c> 30006be0: 3001d2f0 .word 0x3001d2f0 30006be4: 300065f8 .word 0x300065f8 30006be8: 30006c58 .word 0x30006c58 30006bec: 3001ac90 .word 0x3001ac90 30006bf0: 3001ae24 .word 0x3001ae24 30006bf4: 3001ade0 .word 0x3001ade0 30006bf8: 3001ad24 .word 0x3001ad24 30006bfc: 3001ad38 .word 0x3001ad38 30006c00: 3001ad58 .word 0x3001ad58 30006c04: 3001ad7c .word 0x3001ad7c 30006c08: 3001adb0 .word 0x3001adb0 30006c0c: 3001aec4 .word 0x3001aec4 30006c10: 3001af04 .word 0x3001af04 30006c14: 3001aedc .word 0x3001aedc 30006c18: 3001afc4 .word 0x3001afc4 30006c1c: 3001ac54 .word 0x3001ac54 30006c20: 3001afd0 .word 0x3001afd0 30006c24: 3001afdc .word 0x3001afdc 30006c28: 3001afe8 .word 0x3001afe8 30006c2c: 3001aff4 .word 0x3001aff4 30006c30: 3001b020 .word 0x3001b020 30006c34: 3001b08c .word 0x3001b08c 30006c38: 3001b05c .word 0x3001b05c 30006c3c: 3001af34 .word 0x3001af34 30006c40: 3001af64 .word 0x3001af64 30006c44: 3001af90 .word 0x3001af90 30006c48: 3001ae0c .word 0x3001ae0c 30006c4c: 3001ae44 .word 0x3001ae44 30006c50: 3001ae90 .word 0x3001ae90 30006c54: 3001ae74 .word 0x3001ae74 30005aec <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30005aec: 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 ) 30005af0: e5908034 ldr r8, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { 30005af4: 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 ) 30005af8: e3580000 cmp r8, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 30005afc: 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 ); 30005b00: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 30005b04: 0a00009c beq 30005d7c <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 30005b08: e1d091b4 ldrh r9, [r0, #20] 30005b0c: e1d0a1b0 ldrh sl, [r0, #16] 30005b10: e1a01009 mov r1, r9 30005b14: e1a0000a mov r0, sl 30005b18: eb0044a4 bl 30016db0 <__aeabi_uidiv> 30005b1c: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 30005b20: e1b03823 lsrs r3, r3, #16 30005b24: 01a01009 moveq r1, r9 30005b28: 01a06007 moveq r6, r7 30005b2c: 01a04003 moveq r4, r3 30005b30: 0a00000f beq 30005b74 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 30005b34: e5984000 ldr r4, [r8] 30005b38: e3540000 cmp r4, #0 30005b3c: 11a01009 movne r1, r9 30005b40: 11a06007 movne r6, r7 30005b44: 13a04000 movne r4, #0 30005b48: 01a01009 moveq r1, r9 30005b4c: 01a06007 moveq r6, r7 30005b50: 1a000003 bne 30005b64 <_Objects_Extend_information+0x78> 30005b54: ea000006 b 30005b74 <_Objects_Extend_information+0x88> <== NOT EXECUTED 30005b58: e7982104 ldr r2, [r8, r4, lsl #2] 30005b5c: e3520000 cmp r2, #0 30005b60: 0a000003 beq 30005b74 <_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++ ) { 30005b64: e2844001 add r4, r4, #1 30005b68: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 30005b6c: 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++ ) { 30005b70: 8afffff8 bhi 30005b58 <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 30005b74: 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 ) { 30005b78: e35a0801 cmp sl, #65536 ; 0x10000 30005b7c: 2a000064 bcs 30005d14 <_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 ) { 30005b80: 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; 30005b84: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { 30005b88: 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; 30005b8c: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { 30005b90: 1a000061 bne 30005d1c <_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 ); 30005b94: e58d3000 str r3, [sp] 30005b98: eb000819 bl 30007c04 <_Workspace_Allocate_or_fatal_error> 30005b9c: e59d3000 ldr r3, [sp] 30005ba0: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 30005ba4: e1d521b0 ldrh r2, [r5, #16] 30005ba8: e1560002 cmp r6, r2 30005bac: 3a000038 bcc 30005c94 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 30005bb0: 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 ); 30005bb4: e08c008c add r0, ip, ip, lsl #1 30005bb8: e08a0000 add r0, sl, r0 30005bbc: e0800007 add r0, r0, r7 30005bc0: e1a00100 lsl r0, r0, #2 30005bc4: e88d1008 stm sp, {r3, ip} 30005bc8: eb000819 bl 30007c34 <_Workspace_Allocate> if ( !object_blocks ) { 30005bcc: e250b000 subs fp, r0, #0 30005bd0: e89d1008 ldm sp, {r3, ip} 30005bd4: 0a00006e beq 30005d94 <_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 ) { 30005bd8: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 30005bdc: e08b818c add r8, fp, ip, lsl #3 30005be0: e1570002 cmp r7, r2 30005be4: e08bc10c add ip, fp, ip, lsl #2 30005be8: 3a000051 bcc 30005d34 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005bec: 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, 30005bf0: 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; 30005bf4: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005bf8: 0a000003 beq 30005c0c <_Objects_Extend_information+0x120> local_table[ index ] = NULL; 30005bfc: 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++ ) { 30005c00: e2822001 add r2, r2, #1 30005c04: e1570002 cmp r7, r2 30005c08: 8afffffb bhi 30005bfc <_Objects_Extend_information+0x110> 30005c0c: 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 ); 30005c10: e1d511b4 ldrh r1, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005c14: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005c18: 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 ; 30005c1c: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 30005c20: e78c0003 str r0, [ip, r3] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005c24: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; 30005c28: 2a000005 bcs 30005c44 <_Objects_Extend_information+0x158> 30005c2c: e0882106 add r2, r8, r6, lsl #2 30005c30: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { 30005c34: 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 ; 30005c38: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 30005c3c: 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 ; 30005c40: 3afffffb bcc 30005c34 <_Objects_Extend_information+0x148> 30005c44: e10f3000 mrs r3, CPSR 30005c48: e3832080 orr r2, r3, #128 ; 0x80 30005c4c: 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( 30005c50: e5952000 ldr r2, [r5] 30005c54: e1d510b4 ldrh r1, [r5, #4] 30005c58: 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; 30005c5c: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( 30005c60: 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; 30005c64: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( 30005c68: e1822d81 orr r2, r2, r1, lsl #27 30005c6c: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 30005c70: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 30005c74: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; 30005c78: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 30005c7c: 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; 30005c80: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30005c84: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30005c88: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 30005c8c: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 30005c90: 1b0007ed blne 30007c4c <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30005c94: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30005c98: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30005c9c: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30005ca0: e1a01009 mov r1, r9 30005ca4: e1a00007 mov r0, r7 30005ca8: e1d521b4 ldrh r2, [r5, #20] 30005cac: e5953018 ldr r3, [r5, #24] 30005cb0: eb001267 bl 3000a654 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30005cb4: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005cb8: 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 ) { 30005cbc: ea000008 b 30005ce4 <_Objects_Extend_information+0x1f8> the_object->id = _Objects_Build_id( 30005cc0: e5952000 ldr r2, [r5] 30005cc4: e1d5c0b4 ldrh ip, [r5, #4] 30005cc8: e1a02c02 lsl r2, r2, #24 30005ccc: e3822801 orr r2, r2, #65536 ; 0x10000 30005cd0: e1822d8c orr r2, r2, ip, lsl #27 30005cd4: e1822006 orr r2, r2, r6 30005cd8: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005cdc: ebfffd26 bl 3000517c <_Chain_Append> index++; 30005ce0: 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 ) { 30005ce4: e1a00007 mov r0, r7 30005ce8: eb00124c bl 3000a620 <_Chain_Get> 30005cec: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005cf0: e1a01003 mov r1, r3 30005cf4: 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 ) { 30005cf8: 1afffff0 bne 30005cc0 <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005cfc: e1d531b4 ldrh r3, [r5, #20] information->inactive = 30005d00: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005d04: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = 30005d08: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005d0c: e7813004 str r3, [r1, r4] information->inactive = 30005d10: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 30005d14: e28dd014 add sp, sp, #20 30005d18: 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 ); 30005d1c: e58d3000 str r3, [sp] 30005d20: eb0007c3 bl 30007c34 <_Workspace_Allocate> if ( !new_object_block ) 30005d24: e2509000 subs r9, r0, #0 30005d28: e59d3000 ldr r3, [sp] 30005d2c: 1affff9c bne 30005ba4 <_Objects_Extend_information+0xb8> 30005d30: eafffff7 b 30005d14 <_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, 30005d34: e1a03103 lsl r3, r3, #2 30005d38: e1a02003 mov r2, r3 30005d3c: e5951034 ldr r1, [r5, #52] ; 0x34 30005d40: e88d1008 stm sp, {r3, ip} 30005d44: eb0020b4 bl 3000e01c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 30005d48: e89d1008 ldm sp, {r3, ip} 30005d4c: e1a0000c mov r0, ip 30005d50: e1a02003 mov r2, r3 30005d54: e5951030 ldr r1, [r5, #48] ; 0x30 30005d58: eb0020af bl 3000e01c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30005d5c: e1d521b0 ldrh r2, [r5, #16] 30005d60: e1a00008 mov r0, r8 30005d64: e0872002 add r2, r7, r2 30005d68: e1a02102 lsl r2, r2, #2 30005d6c: e595101c ldr r1, [r5, #28] 30005d70: eb0020a9 bl 3000e01c 30005d74: e89d1008 ldm sp, {r3, ip} 30005d78: eaffffa4 b 30005c10 <_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 ) 30005d7c: e1a04008 mov r4, r8 30005d80: e1d0a1b0 ldrh sl, [r0, #16] 30005d84: e1d011b4 ldrh r1, [r0, #20] 30005d88: e1a06007 mov r6, r7 30005d8c: e1a03008 mov r3, r8 30005d90: eaffff77 b 30005b74 <_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 ); 30005d94: e1a00009 mov r0, r9 30005d98: eb0007ab bl 30007c4c <_Workspace_Free> return; 30005d9c: eaffffdc b 30005d14 <_Objects_Extend_information+0x228> 30005904 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30005904: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30005908: e1a04001 mov r4, r1 3000590c: e24dd004 sub sp, sp, #4 30005910: 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 ) ) { 30005914: e1a0100d mov r1, sp 30005918: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 3000591c: e1a08002 mov r8, r2 30005920: 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 ) ) { 30005924: eb000075 bl 30005b00 <_POSIX_Mutex_Get> 30005928: e3500000 cmp r0, #0 3000592c: 0a00000a beq 3000595c <_POSIX_Condition_variables_Wait_support+0x58> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005930: e59f30dc ldr r3, [pc, #220] ; 30005a14 <_POSIX_Condition_variables_Wait_support+0x110> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30005934: e1a0100d mov r1, sp 30005938: e5932000 ldr r2, [r3] 3000593c: e1a00006 mov r0, r6 30005940: e2422001 sub r2, r2, #1 30005944: e5832000 str r2, [r3] 30005948: ebffff77 bl 3000572c <_POSIX_Condition_variables_Get> switch ( location ) { 3000594c: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30005950: e1a0a000 mov sl, r0 switch ( location ) { 30005954: e3530000 cmp r3, #0 30005958: 0a000003 beq 3000596c <_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 ) 3000595c: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30005960: e1a00005 mov r0, r5 30005964: e28dd004 add sp, sp, #4 30005968: 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 ) ) { 3000596c: e5903014 ldr r3, [r0, #20] 30005970: e3530000 cmp r3, #0 30005974: 0a000005 beq 30005990 <_POSIX_Condition_variables_Wait_support+0x8c> 30005978: e5942000 ldr r2, [r4] 3000597c: e1530002 cmp r3, r2 30005980: 0a000002 beq 30005990 <_POSIX_Condition_variables_Wait_support+0x8c> _Thread_Enable_dispatch(); 30005984: eb000c3b bl 30008a78 <_Thread_Enable_dispatch> 30005988: e3a05016 mov r5, #22 return EINVAL; 3000598c: eafffff3 b 30005960 <_POSIX_Condition_variables_Wait_support+0x5c> } (void) pthread_mutex_unlock( mutex ); 30005990: e1a00004 mov r0, r4 30005994: eb0000e3 bl 30005d28 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 30005998: e3570000 cmp r7, #0 3000599c: 0a000006 beq 300059bc <_POSIX_Condition_variables_Wait_support+0xb8> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 300059a0: eb000c34 bl 30008a78 <_Thread_Enable_dispatch> 300059a4: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 300059a8: e1a00004 mov r0, r4 300059ac: eb0000bc bl 30005ca4 if ( mutex_status ) 300059b0: e3500000 cmp r0, #0 300059b4: 0affffe9 beq 30005960 <_POSIX_Condition_variables_Wait_support+0x5c> 300059b8: eaffffe7 b 3000595c <_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; 300059bc: e59f5054 ldr r5, [pc, #84] ; 30005a18 <_POSIX_Condition_variables_Wait_support+0x114> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 300059c0: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 300059c4: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 300059c8: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 300059cc: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 300059d0: 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; 300059d4: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 300059d8: 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; 300059dc: 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; 300059e0: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 300059e4: e1a00002 mov r0, r2 300059e8: e58a1048 str r1, [sl, #72] ; 0x48 300059ec: e59f2028 ldr r2, [pc, #40] ; 30005a1c <_POSIX_Condition_variables_Wait_support+0x118> 300059f0: e1a01008 mov r1, r8 300059f4: eb000d62 bl 30008f84 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 300059f8: eb000c1e bl 30008a78 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 300059fc: e5953000 ldr r3, [r5] 30005a00: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 30005a04: e3550074 cmp r5, #116 ; 0x74 30005a08: 13550000 cmpne r5, #0 30005a0c: 0affffe5 beq 300059a8 <_POSIX_Condition_variables_Wait_support+0xa4> 30005a10: eaffffd2 b 30005960 <_POSIX_Condition_variables_Wait_support+0x5c> <== NOT EXECUTED 30005a14: 3001d58c .word 0x3001d58c 30005a18: 3001d640 .word 0x3001d640 30005a1c: 3000936c .word 0x3000936c 3000d438 <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000d438: e10f2000 mrs r2, CPSR 3000d43c: e3823080 orr r3, r2, #128 ; 0x80 3000d440: 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 ) { 3000d444: e59f1064 ldr r1, [pc, #100] ; 3000d4b0 <_POSIX_signals_Clear_process_signals+0x78> 3000d448: e0803080 add r3, r0, r0, lsl #1 3000d44c: e7911103 ldr r1, [r1, r3, lsl #2] 3000d450: e1a0c103 lsl ip, r3, #2 3000d454: e3510002 cmp r1, #2 3000d458: 0a00000c beq 3000d490 <_POSIX_signals_Clear_process_signals+0x58> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 3000d45c: e59f3050 ldr r3, [pc, #80] ; 3000d4b4 <_POSIX_signals_Clear_process_signals+0x7c> 3000d460: e3a0c001 mov ip, #1 3000d464: e5931000 ldr r1, [r3] 3000d468: e2400001 sub r0, r0, #1 3000d46c: e1c1001c bic r0, r1, ip, lsl r0 if ( !_POSIX_signals_Pending ) 3000d470: 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; 3000d474: e5830000 str r0, [r3] if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; 3000d478: 059f3038 ldreq r3, [pc, #56] ; 3000d4b8 <_POSIX_signals_Clear_process_signals+0x80> 3000d47c: 05931000 ldreq r1, [r3] 3000d480: 02411001 subeq r1, r1, #1 3000d484: 05831000 streq r1, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000d488: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } 3000d48c: 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 ] ) ) 3000d490: e59f1024 ldr r1, [pc, #36] ; 3000d4bc <_POSIX_signals_Clear_process_signals+0x84> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000d494: e7913103 ldr r3, [r1, r3, lsl #2] 3000d498: e081100c add r1, r1, ip 3000d49c: e2811004 add r1, r1, #4 3000d4a0: e1530001 cmp r3, r1 3000d4a4: 0affffec beq 3000d45c <_POSIX_signals_Clear_process_signals+0x24> 3000d4a8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); } 3000d4ac: e12fff1e bx lr <== NOT EXECUTED 3000d4b0: 3001aeb8 .word 0x3001aeb8 3000d4b4: 3001b084 .word 0x3001b084 3000d4b8: 3001aa44 .word 0x3001aa44 3000d4bc: 3001b088 .word 0x3001b088 30006d9c <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 30006d9c: 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 ) { 30006da0: 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 ]; 30006da4: e1a0c323 lsr ip, r3, #6 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30006da8: e281503c add r5, r1, #60 ; 0x3c 30006dac: e08cc08c add ip, ip, ip, lsl #1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 30006db0: e3130020 tst r3, #32 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30006db4: e2814038 add r4, r1, #56 ; 0x38 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30006db8: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 30006dbc: e3a05000 mov r5, #0 30006dc0: e581503c str r5, [r1, #60] ; 0x3c the_chain->last = _Chain_Head(the_chain); 30006dc4: 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 ]; 30006dc8: e080c10c add ip, r0, ip, lsl #2 block_state = the_thread_queue->state; 30006dcc: e5906038 ldr r6, [r0, #56] ; 0x38 30006dd0: 159fa178 ldrne sl, [pc, #376] ; 30006f50 <_Thread_queue_Enqueue_priority+0x1b4> if ( _Thread_queue_Is_reverse_search( priority ) ) 30006dd4: 1a00001c bne 30006e4c <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30006dd8: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30006ddc: e10f8000 mrs r8, CPSR 30006de0: e3884080 orr r4, r8, #128 ; 0x80 30006de4: 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; 30006de8: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 30006dec: e154000a cmp r4, sl 30006df0: 1a000009 bne 30006e1c <_Thread_queue_Enqueue_priority+0x80> 30006df4: ea000052 b 30006f44 <_Thread_queue_Enqueue_priority+0x1a8> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 30006df8: e10f7000 mrs r7, CPSR 30006dfc: e129f008 msr CPSR_fc, r8 30006e00: 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) ) { 30006e04: e5947010 ldr r7, [r4, #16] 30006e08: e1160007 tst r6, r7 30006e0c: 0a000033 beq 30006ee0 <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 30006e10: 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 ) ) { 30006e14: e154000a cmp r4, sl 30006e18: 0a000002 beq 30006e28 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; 30006e1c: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) 30006e20: e1530005 cmp r3, r5 30006e24: 8afffff3 bhi 30006df8 <_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 ) ) { 30006e28: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 30006e2c: e590c030 ldr ip, [r0, #48] ; 0x30 30006e30: e35c0001 cmp ip, #1 30006e34: 0a00002b beq 30006ee8 <_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; 30006e38: e5826000 str r6, [r2] return the_thread_queue->sync_state; 30006e3c: e1a0000c mov r0, ip } 30006e40: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 30006e44: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30006e48: e129f008 msr CPSR_fc, r8 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 30006e4c: e5da5000 ldrb r5, [sl] 30006e50: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30006e54: e10f8000 mrs r8, CPSR 30006e58: e3884080 orr r4, r8, #128 ; 0x80 30006e5c: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 30006e60: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 30006e64: e154000c cmp r4, ip 30006e68: 1a000009 bne 30006e94 <_Thread_queue_Enqueue_priority+0xf8> 30006e6c: ea00000b b 30006ea0 <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 30006e70: e10f7000 mrs r7, CPSR 30006e74: e129f008 msr CPSR_fc, r8 30006e78: 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) ) { 30006e7c: e5947010 ldr r7, [r4, #16] 30006e80: e1160007 tst r6, r7 30006e84: 0affffef beq 30006e48 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 30006e88: 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 ) ) { 30006e8c: e154000c cmp r4, ip 30006e90: 0a000002 beq 30006ea0 <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; 30006e94: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) 30006e98: e1530005 cmp r3, r5 30006e9c: 3afffff3 bcc 30006e70 <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006ea0: 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 ) ) { 30006ea4: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006ea8: e35c0001 cmp ip, #1 30006eac: 1affffe1 bne 30006e38 <_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 ) 30006eb0: 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; 30006eb4: e3a03000 mov r3, #0 30006eb8: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 30006ebc: 0a000016 beq 30006f1c <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 30006ec0: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 30006ec4: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006ec8: 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; 30006ecc: e5841000 str r1, [r4] next_node->previous = the_node; 30006ed0: e5831004 str r1, [r3, #4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30006ed4: e129f008 msr CPSR_fc, r8 30006ed8: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30006edc: eaffffd7 b 30006e40 <_Thread_queue_Enqueue_priority+0xa4> 30006ee0: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 30006ee4: eaffffbc b 30006ddc <_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 ) 30006ee8: 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; 30006eec: e3a03000 mov r3, #0 30006ef0: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 30006ef4: 0a000008 beq 30006f1c <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 30006ef8: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006efc: e5814000 str r4, [r1] the_node->previous = previous_node; 30006f00: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006f04: 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; 30006f08: e5831000 str r1, [r3] search_node->previous = the_node; 30006f0c: e5841004 str r1, [r4, #4] 30006f10: e129f008 msr CPSR_fc, r8 30006f14: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30006f18: eaffffc8 b 30006e40 <_Thread_queue_Enqueue_priority+0xa4> 30006f1c: 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; 30006f20: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006f24: e5814000 str r4, [r1] the_node->previous = previous_node; 30006f28: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006f2c: 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; 30006f30: e5831000 str r1, [r3] search_node->previous = the_node; 30006f34: e5841004 str r1, [r4, #4] 30006f38: e129f006 msr CPSR_fc, r6 30006f3c: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30006f40: eaffffbe b 30006e40 <_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 ) ) { 30006f44: e1a06008 mov r6, r8 30006f48: e3e05000 mvn r5, #0 30006f4c: eaffffb6 b 30006e2c <_Thread_queue_Enqueue_priority+0x90> 30006f50: 30019f58 .word 0x30019f58 30015490 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 30015490: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30015494: e24dd024 sub sp, sp, #36 ; 0x24 30015498: 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; 3001549c: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300154a0: e28d0018 add r0, sp, #24 300154a4: e28d700c add r7, sp, #12 300154a8: e280a004 add sl, r0, #4 300154ac: 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; 300154b0: e58d301c str r3, [sp, #28] the_chain->last = _Chain_Head(the_chain); 300154b4: 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; 300154b8: e58d3010 str r3, [sp, #16] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 300154bc: 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 ); 300154c0: e2843008 add r3, r4, #8 300154c4: e59f91ac ldr r9, [pc, #428] ; 30015678 <_Timer_server_Body+0x1e8> 300154c8: e59fb1ac ldr fp, [pc, #428] ; 3001567c <_Timer_server_Body+0x1ec> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300154cc: e58d2000 str r2, [sp] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300154d0: e58da018 str sl, [sp, #24] 300154d4: e58d200c str r2, [sp, #12] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 300154d8: 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 ); 300154dc: 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 ); 300154e0: 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 ); 300154e4: 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; 300154e8: e28d2018 add r2, sp, #24 300154ec: 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; 300154f0: e5993000 ldr r3, [r9] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 300154f4: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 300154f8: e1a00006 mov r0, r6 300154fc: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 30015500: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30015504: e1a02007 mov r2, r7 30015508: eb0010f4 bl 300198e0 <_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(); 3001550c: e59b5000 ldr r5, [fp] Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 30015510: 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 ) { 30015514: e1550001 cmp r5, r1 30015518: 8a000022 bhi 300155a8 <_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 ) { 3001551c: 3a000018 bcc 30015584 <_Timer_server_Body+0xf4> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 30015520: 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 ); 30015524: e5940078 ldr r0, [r4, #120] ; 0x78 30015528: eb00025b bl 30015e9c <_Chain_Get> if ( timer == NULL ) { 3001552c: e3500000 cmp r0, #0 30015530: 0a00000b beq 30015564 <_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 ) { 30015534: e5903038 ldr r3, [r0, #56] ; 0x38 30015538: e3530001 cmp r3, #1 3001553c: 0a000015 beq 30015598 <_Timer_server_Body+0x108> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 30015540: e3530003 cmp r3, #3 30015544: 1afffff6 bne 30015524 <_Timer_server_Body+0x94> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 30015548: e2801010 add r1, r0, #16 3001554c: e1a00008 mov r0, r8 30015550: eb001111 bl 3001999c <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 30015554: e5940078 ldr r0, [r4, #120] ; 0x78 30015558: eb00024f bl 30015e9c <_Chain_Get> if ( timer == NULL ) { 3001555c: e3500000 cmp r0, #0 30015560: 1afffff3 bne 30015534 <_Timer_server_Body+0xa4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30015564: e10f2000 mrs r2, CPSR 30015568: e3823080 orr r3, r2, #128 ; 0x80 3001556c: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 30015570: e59d3018 ldr r3, [sp, #24] 30015574: e15a0003 cmp sl, r3 30015578: 0a00000f beq 300155bc <_Timer_server_Body+0x12c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3001557c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 30015580: eaffffda b 300154f0 <_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 ); 30015584: e0652001 rsb r2, r5, r1 30015588: e1a00008 mov r0, r8 3001558c: e3a01001 mov r1, #1 30015590: eb0010a3 bl 30019824 <_Watchdog_Adjust> 30015594: eaffffe1 b 30015520 <_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 ); 30015598: e2801010 add r1, r0, #16 3001559c: e1a00006 mov r0, r6 300155a0: eb0010fd bl 3001999c <_Watchdog_Insert> 300155a4: eaffffde b 30015524 <_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 ); 300155a8: e0611005 rsb r1, r1, r5 300155ac: e1a00008 mov r0, r8 300155b0: e1a02007 mov r2, r7 300155b4: eb0010c9 bl 300198e0 <_Watchdog_Adjust_to_chain> 300155b8: eaffffd8 b 30015520 <_Timer_server_Body+0x90> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 300155bc: e5840078 str r0, [r4, #120] ; 0x78 300155c0: 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 ) ) { 300155c4: e59d300c ldr r3, [sp, #12] 300155c8: e59d0000 ldr r0, [sp] 300155cc: e1500003 cmp r0, r3 300155d0: 159d5000 ldrne r5, [sp] 300155d4: 1a00000a bne 30015604 <_Timer_server_Body+0x174> 300155d8: ea000011 b 30015624 <_Timer_server_Body+0x194> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 300155dc: 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; 300155e0: e3a00000 mov r0, #0 the_chain->first = new_first; 300155e4: e58d200c str r2, [sp, #12] 300155e8: e5830008 str r0, [r3, #8] new_first->previous = _Chain_Head(the_chain); 300155ec: e5827004 str r7, [r2, #4] 300155f0: 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 ); 300155f4: e5930020 ldr r0, [r3, #32] 300155f8: e5931024 ldr r1, [r3, #36] ; 0x24 300155fc: e1a0e00f mov lr, pc 30015600: e593f01c ldr pc, [r3, #28] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30015604: e10f1000 mrs r1, CPSR 30015608: e3813080 orr r3, r1, #128 ; 0x80 3001560c: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30015610: e59d300c ldr r3, [sp, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30015614: e1550003 cmp r5, r3 30015618: 1affffef bne 300155dc <_Timer_server_Body+0x14c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3001561c: e129f001 msr CPSR_fc, r1 30015620: eaffffb0 b 300154e8 <_Timer_server_Body+0x58> 30015624: e59f0054 ldr r0, [pc, #84] ; 30015680 <_Timer_server_Body+0x1f0> } } else { ts->active = false; 30015628: e3a02000 mov r2, #0 3001562c: e5c4207c strb r2, [r4, #124] ; 0x7c 30015630: e5903000 ldr r3, [r0] 30015634: e2833001 add r3, r3, #1 30015638: e5803000 str r3, [r0] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 3001563c: e3a01008 mov r1, #8 30015640: e5940000 ldr r0, [r4] 30015644: eb000dfa bl 30018e34 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 30015648: e1a00004 mov r0, r4 3001564c: ebffff63 bl 300153e0 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 30015650: e1a00004 mov r0, r4 30015654: ebffff77 bl 30015438 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 30015658: eb000b3c bl 30018350 <_Thread_Enable_dispatch> ts->active = true; 3001565c: e3a02001 mov r2, #1 30015660: 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 ); 30015664: e59d0008 ldr r0, [sp, #8] 30015668: eb001138 bl 30019b50 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 3001566c: e59d0004 ldr r0, [sp, #4] 30015670: eb001136 bl 30019b50 <_Watchdog_Remove> 30015674: eaffff9b b 300154e8 <_Timer_server_Body+0x58> 30015678: 3003b784 .word 0x3003b784 3001567c: 3003b6b4 .word 0x3003b6b4 30015680: 3003b62c .word 0x3003b62c 30009854 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 30009854: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30009858: e1a04000 mov r4, r0 3000985c: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30009860: e10f3000 mrs r3, CPSR 30009864: e3832080 orr r2, r3, #128 ; 0x80 30009868: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3000986c: e1a07000 mov r7, r0 30009870: 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 ) ) { 30009874: e1520007 cmp r2, r7 30009878: 0a000018 beq 300098e0 <_Watchdog_Adjust+0x8c> switch ( direction ) { 3000987c: e3510000 cmp r1, #0 30009880: 1a000018 bne 300098e8 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 30009884: e3550000 cmp r5, #0 30009888: 0a000014 beq 300098e0 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 3000988c: e5926010 ldr r6, [r2, #16] 30009890: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 30009894: 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 ) { 30009898: 2a000005 bcs 300098b4 <_Watchdog_Adjust+0x60> 3000989c: ea000018 b 30009904 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 300098a0: e0555006 subs r5, r5, r6 300098a4: 0a00000d beq 300098e0 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 300098a8: e5926010 ldr r6, [r2, #16] 300098ac: e1560005 cmp r6, r5 300098b0: 8a000013 bhi 30009904 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 300098b4: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 300098b8: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); 300098bc: e1a00004 mov r0, r4 300098c0: eb0000aa bl 30009b70 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300098c4: e10f3000 mrs r3, CPSR 300098c8: e3832080 orr r2, r3, #128 ; 0x80 300098cc: e129f002 msr CPSR_fc, r2 300098d0: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 300098d4: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 300098d8: e1a02001 mov r2, r1 300098dc: 1affffef bne 300098a0 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 300098e0: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 300098e4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 300098e8: e3510001 cmp r1, #1 300098ec: 1afffffb bne 300098e0 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 300098f0: e5921010 ldr r1, [r2, #16] 300098f4: e0815005 add r5, r1, r5 300098f8: e5825010 str r5, [r2, #16] 300098fc: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 30009900: 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; 30009904: e0655006 rsb r5, r5, r6 30009908: e5825010 str r5, [r2, #16] break; 3000990c: eafffff3 b 300098e0 <_Watchdog_Adjust+0x8c> 3000d170 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 3000d170: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000d174: e24dd00c sub sp, sp, #12 3000d178: e1a04000 mov r4, r0 3000d17c: e1a05001 mov r5, r1 3000d180: e1a08002 mov r8, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 3000d184: ebfffbf4 bl 3000c15c 3000d188: e1500004 cmp r0, r4 3000d18c: 1a000090 bne 3000d3d4 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 3000d190: e3550000 cmp r5, #0 3000d194: 0a000093 beq 3000d3e8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 3000d198: e2453001 sub r3, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 3000d19c: e353001f cmp r3, #31 3000d1a0: 8a000090 bhi 3000d3e8 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 ) 3000d1a4: e59f6268 ldr r6, [pc, #616] ; 3000d414 3000d1a8: e1a07085 lsl r7, r5, #1 3000d1ac: e0872005 add r2, r7, r5 3000d1b0: e0862102 add r2, r6, r2, lsl #2 3000d1b4: e5922008 ldr r2, [r2, #8] 3000d1b8: e3520001 cmp r2, #1 3000d1bc: 0a00006c beq 3000d374 /* * 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 ) ) 3000d1c0: e3550008 cmp r5, #8 3000d1c4: 13550004 cmpne r5, #4 3000d1c8: 0a00006c beq 3000d380 3000d1cc: e355000b cmp r5, #11 3000d1d0: 0a00006a beq 3000d380 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 3000d1d4: e3a04001 mov r4, #1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { 3000d1d8: e3580000 cmp r8, #0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 3000d1dc: e58d4004 str r4, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 3000d1e0: e58d5000 str r5, [sp] 3000d1e4: e1a04314 lsl r4, r4, r3 siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 3000d1e8: 15983000 ldrne r3, [r8] */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 3000d1ec: 058d8008 streq r8, [sp, #8] } else { siginfo->si_value = *value; 3000d1f0: 158d3008 strne r3, [sp, #8] 3000d1f4: e59f321c ldr r3, [pc, #540] ; 3000d418 3000d1f8: e5932000 ldr r2, [r3] 3000d1fc: e2822001 add r2, r2, #1 3000d200: 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; 3000d204: e59f3210 ldr r3, [pc, #528] ; 3000d41c 3000d208: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3000d20c: e5903108 ldr r3, [r0, #264] ; 0x108 3000d210: e59330cc ldr r3, [r3, #204] ; 0xcc 3000d214: e1d43003 bics r3, r4, r3 3000d218: 1a000047 bne 3000d33c /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 3000d21c: e59fc1fc ldr ip, [pc, #508] ; 3000d420 3000d220: e49c3004 ldr r3, [ip], #4 3000d224: e153000c cmp r3, ip 3000d228: 0a000013 beq 3000d27c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d22c: 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; 3000d230: e1a00003 mov r0, r3 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d234: 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 ]; 3000d238: e5932108 ldr r2, [r3, #264] ; 0x108 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d23c: 1a00003e bne 3000d33c /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 3000d240: e59220cc ldr r2, [r2, #204] ; 0xcc 3000d244: e1d42002 bics r2, r4, r2 3000d248: 0a000008 beq 3000d270 3000d24c: ea00003a b 3000d33c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d250: 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 ]; 3000d254: 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) 3000d258: 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; 3000d25c: e1a00003 mov r0, r3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 3000d260: 1a000035 bne 3000d33c <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 3000d264: e59120cc ldr r2, [r1, #204] ; 0xcc <== NOT EXECUTED 3000d268: e1d42002 bics r2, r4, r2 <== NOT EXECUTED 3000d26c: 1a000032 bne 3000d33c <== 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 ) { 3000d270: 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 ; 3000d274: e153000c cmp r3, ip 3000d278: 1afffff4 bne 3000d250 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 3000d27c: e59f31a0 ldr r3, [pc, #416] ; 3000d424 3000d280: e59f81a0 ldr r8, [pc, #416] ; 3000d428 3000d284: e5d3c000 ldrb ip, [r3] */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 3000d288: e3a0a000 mov sl, #0 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 3000d28c: 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 ] ) 3000d290: e5983008 ldr r3, [r8, #8] 3000d294: e3530000 cmp r3, #0 3000d298: 0a000020 beq 3000d320 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 3000d29c: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 3000d2a0: e1d301b0 ldrh r0, [r3, #16] object_table = the_info->local_table; 3000d2a4: e593e01c ldr lr, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 3000d2a8: e3500000 cmp r0, #0 3000d2ac: 0a00001b beq 3000d320 3000d2b0: e3a03001 mov r3, #1 the_thread = (Thread_Control *) object_table[ index ]; 3000d2b4: e79e2103 ldr r2, [lr, r3, lsl #2] #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3000d2b8: e2833001 add r3, r3, #1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 3000d2bc: e3520000 cmp r2, #0 3000d2c0: 0a000014 beq 3000d318 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 3000d2c4: e5921014 ldr r1, [r2, #20] 3000d2c8: e151000c cmp r1, ip 3000d2cc: 8a000011 bhi 3000d318 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3000d2d0: e5929108 ldr r9, [r2, #264] ; 0x108 3000d2d4: e59990cc ldr r9, [r9, #204] ; 0xcc 3000d2d8: e1d49009 bics r9, r4, r9 3000d2dc: 0a00000d beq 3000d318 * * 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 ) { 3000d2e0: e151000c cmp r1, ip 3000d2e4: 3a000009 bcc 3000d310 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 3000d2e8: e59a9010 ldr r9, [sl, #16] 3000d2ec: e3590000 cmp r9, #0 3000d2f0: 0a000008 beq 3000d318 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 3000d2f4: e592b010 ldr fp, [r2, #16] 3000d2f8: e35b0000 cmp fp, #0 3000d2fc: 0a000003 beq 3000d310 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 3000d300: e3190201 tst r9, #268435456 ; 0x10000000 3000d304: 1a000003 bne 3000d318 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 3000d308: e31b0201 tst fp, #268435456 ; 0x10000000 3000d30c: 0a000001 beq 3000d318 3000d310: e1a0c001 mov ip, r1 3000d314: e1a0a002 mov sl, r2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3000d318: e1500003 cmp r0, r3 3000d31c: 2affffe4 bcs 3000d2b4 * + 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++) { 3000d320: e59f3104 ldr r3, [pc, #260] ; 3000d42c #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3000d324: 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++) { 3000d328: e1580003 cmp r8, r3 3000d32c: 1affffd7 bne 3000d290 } } } } if ( interested ) { 3000d330: e35a0000 cmp sl, #0 3000d334: 0a000007 beq 3000d358 3000d338: 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; 3000d33c: e3a03001 mov r3, #1 3000d340: 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 ) ) { 3000d344: e1a01005 mov r1, r5 3000d348: e1a0200d mov r2, sp 3000d34c: eb00006d bl 3000d508 <_POSIX_signals_Unblock_thread> 3000d350: e3500000 cmp r0, #0 3000d354: 1a00001b bne 3000d3c8 * 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 ) { 3000d358: 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 ); 3000d35c: e1a00004 mov r0, r4 3000d360: eb000056 bl 3000d4c0 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 3000d364: e7963105 ldr r3, [r6, r5, lsl #2] 3000d368: e3530002 cmp r3, #2 3000d36c: 0a000007 beq 3000d390 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 3000d370: ebffe51b bl 300067e4 <_Thread_Enable_dispatch> 3000d374: e3a00000 mov r0, #0 return 0; } 3000d378: e28dd00c add sp, sp, #12 3000d37c: 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 ); 3000d380: eb0000e8 bl 3000d728 3000d384: e1a01005 mov r1, r5 3000d388: eb0000a8 bl 3000d630 3000d38c: eafffff9 b 3000d378 */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 3000d390: e59f0098 ldr r0, [pc, #152] ; 3000d430 3000d394: ebfff4a1 bl 3000a620 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 3000d398: e250c000 subs ip, r0, #0 3000d39c: 0a000016 beq 3000d3fc _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 3000d3a0: e28c3008 add r3, ip, #8 3000d3a4: e1a0200d mov r2, sp 3000d3a8: e8920007 ldm r2, {r0, r1, r2} 3000d3ac: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 3000d3b0: e59f007c ldr r0, [pc, #124] ; 3000d434 3000d3b4: e1a0100c mov r1, ip 3000d3b8: e0800105 add r0, r0, r5, lsl #2 3000d3bc: ebffdf6e bl 3000517c <_Chain_Append> } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 3000d3c0: ebffe507 bl 300067e4 <_Thread_Enable_dispatch> 3000d3c4: eaffffea b 3000d374 /* * 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(); 3000d3c8: ebffe505 bl 300067e4 <_Thread_Enable_dispatch> 3000d3cc: e3a00000 mov r0, #0 return 0; 3000d3d0: eaffffe8 b 3000d378 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 3000d3d4: eb000102 bl 3000d7e4 <__errno> 3000d3d8: e3a03003 mov r3, #3 3000d3dc: e5803000 str r3, [r0] 3000d3e0: e3e00000 mvn r0, #0 3000d3e4: eaffffe3 b 3000d378 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 3000d3e8: eb0000fd bl 3000d7e4 <__errno> 3000d3ec: e3a03016 mov r3, #22 3000d3f0: e5803000 str r3, [r0] 3000d3f4: e3e00000 mvn r0, #0 3000d3f8: eaffffde b 3000d378 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(); 3000d3fc: ebffe4f8 bl 300067e4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 3000d400: eb0000f7 bl 3000d7e4 <__errno> 3000d404: e3a0300b mov r3, #11 3000d408: e5803000 str r3, [r0] 3000d40c: e3e00000 mvn r0, #0 3000d410: eaffffd8 b 3000d378 3000d414: 3001aeb8 .word 0x3001aeb8 3000d418: 3001a9ac .word 0x3001a9ac 3000d41c: 3001aa60 .word 0x3001aa60 3000d420: 3001b044 .word 0x3001b044 3000d424: 30019f58 .word 0x30019f58 3000d428: 3001a968 .word 0x3001a968 3000d42c: 3001a974 .word 0x3001a974 3000d430: 3001b038 .word 0x3001b038 3000d434: 3001b088 .word 0x3001b088 30005c94 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30005c94: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30005c98: e2505000 subs r5, r0, #0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30005c9c: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30005ca0: 0a00001d beq 30005d1c * * 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 ); 30005ca4: e1a00001 mov r0, r1 30005ca8: e28d1004 add r1, sp, #4 30005cac: eb0019c4 bl 3000c3c4 <_POSIX_Absolute_timeout_to_ticks> 30005cb0: e5951000 ldr r1, [r5] 30005cb4: e1a04000 mov r4, r0 30005cb8: e28d2008 add r2, sp, #8 30005cbc: e59f0090 ldr r0, [pc, #144] ; 30005d54 30005cc0: eb000a71 bl 3000868c <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30005cc4: e59dc008 ldr ip, [sp, #8] 30005cc8: e35c0000 cmp ip, #0 30005ccc: 1a000012 bne 30005d1c case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 30005cd0: 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, 30005cd4: e3540003 cmp r4, #3 30005cd8: 13a05000 movne r5, #0 30005cdc: 03a05001 moveq r5, #1 30005ce0: e2800010 add r0, r0, #16 30005ce4: e59d3004 ldr r3, [sp, #4] 30005ce8: e1a02005 mov r2, r5 30005cec: e58dc000 str ip, [sp] 30005cf0: eb000713 bl 30007944 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30005cf4: eb000c7e bl 30008ef4 <_Thread_Enable_dispatch> if ( !do_wait ) { 30005cf8: e3550000 cmp r5, #0 30005cfc: 1a00000f bne 30005d40 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 30005d00: e59f3050 ldr r3, [pc, #80] ; 30005d58 30005d04: e5933000 ldr r3, [r3] 30005d08: e5930034 ldr r0, [r3, #52] ; 0x34 30005d0c: e3500002 cmp r0, #2 30005d10: 0a000004 beq 30005d28 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30005d14: eb000042 bl 30005e24 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30005d18: ea000000 b 30005d20 30005d1c: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30005d20: e28dd00c add sp, sp, #12 30005d24: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 30005d28: e3540000 cmp r4, #0 30005d2c: 0afffffa beq 30005d1c 30005d30: e3540002 cmp r4, #2 30005d34: 93a00074 movls r0, #116 ; 0x74 30005d38: 9afffff8 bls 30005d20 30005d3c: eafffff4 b 30005d14 <== NOT EXECUTED 30005d40: e59f3010 ldr r3, [pc, #16] ; 30005d58 30005d44: e5933000 ldr r3, [r3] 30005d48: e5930034 ldr r0, [r3, #52] ; 0x34 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30005d4c: eb000034 bl 30005e24 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30005d50: eafffff2 b 30005d20 30005d54: 3001de74 .word 0x3001de74 30005d58: 3001dd60 .word 0x3001dd60 30005d5c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30005d5c: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30005d60: e2505000 subs r5, r0, #0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30005d64: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30005d68: 0a00001d beq 30005de4 * * 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 ); 30005d6c: e1a00001 mov r0, r1 30005d70: e28d1004 add r1, sp, #4 30005d74: eb001992 bl 3000c3c4 <_POSIX_Absolute_timeout_to_ticks> 30005d78: e5951000 ldr r1, [r5] 30005d7c: e1a04000 mov r4, r0 30005d80: e28d2008 add r2, sp, #8 30005d84: e59f0090 ldr r0, [pc, #144] ; 30005e1c 30005d88: eb000a3f bl 3000868c <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30005d8c: e59dc008 ldr ip, [sp, #8] 30005d90: e35c0000 cmp ip, #0 30005d94: 1a000012 bne 30005de4 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 30005d98: 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, 30005d9c: e3540003 cmp r4, #3 30005da0: 13a05000 movne r5, #0 30005da4: 03a05001 moveq r5, #1 30005da8: e2800010 add r0, r0, #16 30005dac: e59d3004 ldr r3, [sp, #4] 30005db0: e1a02005 mov r2, r5 30005db4: e58dc000 str ip, [sp] 30005db8: eb000718 bl 30007a20 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30005dbc: eb000c4c bl 30008ef4 <_Thread_Enable_dispatch> if ( !do_wait && 30005dc0: e3550000 cmp r5, #0 30005dc4: 1a00000f bne 30005e08 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 30005dc8: e59f3050 ldr r3, [pc, #80] ; 30005e20 30005dcc: e5933000 ldr r3, [r3] 30005dd0: e5930034 ldr r0, [r3, #52] ; 0x34 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 30005dd4: e3500002 cmp r0, #2 30005dd8: 0a000004 beq 30005df0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30005ddc: eb000010 bl 30005e24 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30005de0: ea000000 b 30005de8 30005de4: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30005de8: e28dd00c add sp, sp, #12 30005dec: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 30005df0: e3540000 cmp r4, #0 30005df4: 0afffffa beq 30005de4 30005df8: e3540002 cmp r4, #2 30005dfc: 93a00074 movls r0, #116 ; 0x74 30005e00: 9afffff8 bls 30005de8 30005e04: eafffff4 b 30005ddc <== NOT EXECUTED 30005e08: e59f3010 ldr r3, [pc, #16] ; 30005e20 30005e0c: e5933000 ldr r3, [r3] 30005e10: e5930034 ldr r0, [r3, #52] ; 0x34 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30005e14: eb000002 bl 30005e24 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30005e18: eafffff2 b 30005de8 30005e1c: 3001de74 .word 0x3001de74 30005e20: 3001dd60 .word 0x3001dd60 30006d4c : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 30006d4c: e59fc144 ldr ip, [pc, #324] ; 30006e98 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; 30006d50: e59f3144 ldr r3, [pc, #324] ; 30006e9c if ( rtems_interrupt_is_in_progress() ) 30006d54: 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 ) { 30006d58: e92d4010 push {r4, lr} rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 30006d5c: 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 ) { 30006d60: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 30006d64: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) 30006d68: 13a00012 movne r0, #18 30006d6c: 18bd8010 popne {r4, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 30006d70: e3520000 cmp r2, #0 30006d74: 0a00003c beq 30006e6c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 30006d78: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 30006d7c: e5820000 str r0, [r2] if ( driver_table == NULL ) 30006d80: 0a000039 beq 30006e6c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30006d84: e591c000 ldr ip, [r1] 30006d88: e35c0000 cmp ip, #0 30006d8c: 0a000033 beq 30006e60 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 30006d90: e1500004 cmp r0, r4 30006d94: 93a0000a movls r0, #10 30006d98: 98bd8010 popls {r4, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30006d9c: e59f00fc ldr r0, [pc, #252] ; 30006ea0 30006da0: e590c000 ldr ip, [r0] 30006da4: e28cc001 add ip, ip, #1 30006da8: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 30006dac: e3540000 cmp r4, #0 30006db0: 1a000020 bne 30006e38 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 30006db4: e593e000 ldr lr, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 30006db8: e35e0000 cmp lr, #0 30006dbc: 0a00002c beq 30006e74 30006dc0: e59f30dc ldr r3, [pc, #220] ; 30006ea4 30006dc4: e593c000 ldr ip, [r3] 30006dc8: e1a0300c mov r3, ip 30006dcc: ea000003 b 30006de0 30006dd0: e2844001 add r4, r4, #1 30006dd4: e15e0004 cmp lr, r4 30006dd8: e2833018 add r3, r3, #24 30006ddc: 9a000005 bls 30006df8 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30006de0: e5930000 ldr r0, [r3] 30006de4: e3500000 cmp r0, #0 30006de8: 1afffff8 bne 30006dd0 30006dec: e5930004 ldr r0, [r3, #4] 30006df0: e3500000 cmp r0, #0 30006df4: 1afffff5 bne 30006dd0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 30006df8: e15e0004 cmp lr, r4 30006dfc: 10843084 addne r3, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 30006e00: e5824000 str r4, [r2] if ( m != n ) 30006e04: 108cc183 addne ip, ip, r3, lsl #3 30006e08: 0a00001a beq 30006e78 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 30006e0c: e1a0e001 mov lr, r1 30006e10: e8be000f ldm lr!, {r0, r1, r2, r3} 30006e14: e8ac000f stmia ip!, {r0, r1, r2, r3} 30006e18: e89e0003 ldm lr, {r0, r1} 30006e1c: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 30006e20: eb0006bd bl 3000891c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 30006e24: e3a01000 mov r1, #0 30006e28: e1a00004 mov r0, r4 30006e2c: e1a02001 mov r2, r1 } 30006e30: e8bd4010 pop {r4, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 30006e34: ea002429 b 3000fee0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 30006e38: e59f3064 ldr r3, [pc, #100] ; 30006ea4 30006e3c: e084c084 add ip, r4, r4, lsl #1 30006e40: 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; 30006e44: 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; 30006e48: 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; 30006e4c: e3500000 cmp r0, #0 30006e50: 0a00000b beq 30006e84 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(); 30006e54: eb0006b0 bl 3000891c <_Thread_Enable_dispatch> 30006e58: e3a0000c mov r0, #12 return RTEMS_RESOURCE_IN_USE; 30006e5c: 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; 30006e60: e591c004 ldr ip, [r1, #4] 30006e64: e35c0000 cmp ip, #0 30006e68: 1affffc8 bne 30006d90 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 30006e6c: e3a00009 mov r0, #9 } 30006e70: e8bd8010 pop {r4, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 30006e74: 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(); 30006e78: eb0006a7 bl 3000891c <_Thread_Enable_dispatch> 30006e7c: e3a00005 mov r0, #5 return sc; 30006e80: 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; 30006e84: e59c3004 ldr r3, [ip, #4] 30006e88: e3530000 cmp r3, #0 30006e8c: 1afffff0 bne 30006e54 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 30006e90: e5824000 str r4, [r2] 30006e94: eaffffdc b 30006e0c 30006e98: 30020ebc .word 0x30020ebc 30006e9c: 30021728 .word 0x30021728 30006ea0: 30020e2c .word 0x30020e2c 30006ea4: 3002172c .word 0x3002172c 30005228 : int sched_get_priority_min( int policy ) { switch ( policy ) { 30005228: e3500004 cmp r0, #4 #include int sched_get_priority_min( int policy ) { 3000522c: e52de004 push {lr} ; (str lr, [sp, #-4]!) switch ( policy ) { 30005230: 9a000004 bls 30005248 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 30005234: eb00251b bl 3000e6a8 <__errno> 30005238: e3a03016 mov r3, #22 3000523c: e5803000 str r3, [r0] 30005240: e3e00000 mvn r0, #0 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 30005244: e49df004 pop {pc} ; (ldr pc, [sp], #4) int sched_get_priority_min( int policy ) { switch ( policy ) { 30005248: e3a03001 mov r3, #1 3000524c: e1a00013 lsl r0, r3, r0 30005250: e3100017 tst r0, #23 30005254: 11a00003 movne r0, r3 30005258: 149df004 popne {pc} ; (ldrne pc, [sp], #4) case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 3000525c: eb002511 bl 3000e6a8 <__errno> <== NOT EXECUTED 30005260: e3a03016 mov r3, #22 <== NOT EXECUTED 30005264: e5803000 str r3, [r0] <== NOT EXECUTED 30005268: e3e00000 mvn r0, #0 <== NOT EXECUTED } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 3000526c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30007784 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 30007784: e92d4010 push {r4, lr} 30007788: e24dd004 sub sp, sp, #4 3000778c: 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 ); 30007790: e1a00001 mov r0, r1 30007794: e1a0100d mov r1, sp 30007798: eb00162e bl 3000d058 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 3000779c: e3500003 cmp r0, #3 300077a0: 0a000005 beq 300077bc do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 300077a4: e1a00004 mov r0, r4 <== NOT EXECUTED 300077a8: e3a01000 mov r1, #0 <== NOT EXECUTED 300077ac: e59d2000 ldr r2, [sp] <== NOT EXECUTED 300077b0: eb0018ea bl 3000db60 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 300077b4: e28dd004 add sp, sp, #4 300077b8: 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 ); 300077bc: e1a00004 mov r0, r4 300077c0: e3a01001 mov r1, #1 300077c4: e59d2000 ldr r2, [sp] 300077c8: eb0018e4 bl 3000db60 <_POSIX_Semaphore_Wait_support> 300077cc: eafffff8 b 300077b4