a0015db4 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0015db4: e590304c ldr r3, [r0, #76] ; 0x4c Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { a0015db8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0015dbc: e1530002 cmp r3, r2 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { a0015dc0: e1a07000 mov r7, r0 a0015dc4: e1a05002 mov r5, r2 a0015dc8: e1a08001 mov r8, r1 a0015dcc: e59da020 ldr sl, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0015dd0: 3a000013 bcc a0015e24 <_CORE_message_queue_Broadcast+0x70> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { a0015dd4: e5906048 ldr r6, [r0, #72] ; 0x48 a0015dd8: e3560000 cmp r6, #0 a0015ddc: 0a000009 beq a0015e08 <_CORE_message_queue_Broadcast+0x54> *count = 0; a0015de0: e3a00000 mov r0, #0 a0015de4: e58a0000 str r0, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0015de8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a0015dec: e594002c ldr r0, [r4, #44] ; 0x2c a0015df0: e1a01008 mov r1, r8 a0015df4: e1a02005 mov r2, r5 a0015df8: eb002723 bl a001fa8c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0015dfc: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; a0015e00: e2866001 add r6, r6, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0015e04: e5835000 str r5, [r3] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { a0015e08: e1a00007 mov r0, r7 a0015e0c: eb000a05 bl a0018628 <_Thread_queue_Dequeue> /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = a0015e10: e2504000 subs r4, r0, #0 a0015e14: 1afffff4 bne a0015dec <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; a0015e18: e58a6000 str r6, [sl] a0015e1c: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a0015e20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0015e24: e3a00001 mov r0, #1 <== NOT EXECUTED a0015e28: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED a00041d4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { a00041d4: 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 ]; a00041d8: e5901104 ldr r1, [r0, #260] ; 0x104 option_set = (rtems_option) the_thread->Wait.option; a00041dc: e5905030 ldr r5, [r0, #48] ; 0x30 */ void _Event_Surrender( Thread_Control *the_thread ) { a00041e0: e1a04000 mov r4, r0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a00041e4: e10f0000 mrs r0, CPSR a00041e8: e3803080 orr r3, r0, #128 ; 0x80 a00041ec: 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; a00041f0: e5912000 ldr r2, [r1] event_condition = (rtems_event_set) the_thread->Wait.count; a00041f4: 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 ) ) { a00041f8: e013c002 ands ip, r3, r2 a00041fc: 0a000021 beq a0004288 <_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() && a0004200: e59f6100 ldr r6, [pc, #256] ; a0004308 <_Event_Surrender+0x134> a0004204: e5966000 ldr r6, [r6] a0004208: e3560000 cmp r6, #0 a000420c: 0a000003 beq a0004220 <_Event_Surrender+0x4c> a0004210: e59f60f4 ldr r6, [pc, #244] ; a000430c <_Event_Surrender+0x138> a0004214: e5966000 ldr r6, [r6] a0004218: e1540006 cmp r4, r6 a000421c: 0a000024 beq a00042b4 <_Event_Surrender+0xe0> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { a0004220: e5946010 ldr r6, [r4, #16] a0004224: e3160c01 tst r6, #256 ; 0x100 a0004228: 0a000014 beq a0004280 <_Event_Surrender+0xac> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { a000422c: e153000c cmp r3, ip a0004230: 0a000001 beq a000423c <_Event_Surrender+0x68> a0004234: e3150002 tst r5, #2 a0004238: 0a000010 beq a0004280 <_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; a000423c: 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 ); a0004240: e1c2200c bic r2, r2, ip a0004244: e5812000 str r2, [r1] the_thread->Wait.count = 0; a0004248: e3a02000 mov r2, #0 a000424c: e5842024 str r2, [r4, #36] ; 0x24 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; a0004250: e583c000 str ip, [r3] static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0004254: e10f3000 mrs r3, CPSR a0004258: e129f000 msr CPSR_fc, r0 a000425c: e129f003 msr CPSR_fc, r3 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a0004260: e5943050 ldr r3, [r4, #80] ; 0x50 a0004264: e3530002 cmp r3, #2 a0004268: 0a000008 beq a0004290 <_Event_Surrender+0xbc> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000426c: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a0004270: e59f1098 ldr r1, [pc, #152] ; a0004310 <_Event_Surrender+0x13c> a0004274: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } a0004278: e8bd40f0 pop {r4, r5, r6, r7, lr} a000427c: ea0007ef b a0006240 <_Thread_Clear_state> a0004280: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED a0004284: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED a0004288: e129f000 msr CPSR_fc, r0 a000428c: e8bd80f0 pop {r4, r5, r6, r7, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; a0004290: e3a03003 mov r3, #3 a0004294: e5843050 str r3, [r4, #80] ; 0x50 a0004298: 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 ); a000429c: e2840048 add r0, r4, #72 ; 0x48 a00042a0: eb000da3 bl a0007934 <_Watchdog_Remove> a00042a4: e59f1064 ldr r1, [pc, #100] ; a0004310 <_Event_Surrender+0x13c> a00042a8: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } a00042ac: e8bd40f0 pop {r4, r5, r6, r7, lr} a00042b0: ea0007e2 b a0006240 <_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) || a00042b4: e59f6058 ldr r6, [pc, #88] ; a0004314 <_Event_Surrender+0x140> a00042b8: 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() && a00042bc: e3570002 cmp r7, #2 a00042c0: 0a000002 beq a00042d0 <_Event_Surrender+0xfc> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { a00042c4: 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() && a00042c8: e3570001 cmp r7, #1 a00042cc: 1affffd3 bne a0004220 <_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) ) { a00042d0: e153000c cmp r3, ip a00042d4: 0a000001 beq a00042e0 <_Event_Surrender+0x10c> a00042d8: e3150002 tst r5, #2 a00042dc: 0a000007 beq a0004300 <_Event_Surrender+0x12c> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); a00042e0: e1c2200c bic r2, r2, ip the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; a00042e4: e5943028 ldr r3, [r4, #40] ; 0x28 if ( _ISR_Is_in_progress() && _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 ); a00042e8: e5812000 str r2, [r1] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; a00042ec: e3a02003 mov r2, #3 a00042f0: 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; a00042f4: e3a02000 mov r2, #0 a00042f8: e5842024 str r2, [r4, #36] ; 0x24 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; a00042fc: e583c000 str ip, [r3] a0004300: e129f000 msr CPSR_fc, r0 a0004304: e8bd80f0 pop {r4, r5, r6, r7, pc} a0004308: a001aa3c .word 0xa001aa3c a000430c: a001aa60 .word 0xa001aa60 a0004310: 1003fff8 .word 0x1003fff8 a0004314: a001b230 .word 0xa001b230 a000a760 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000a760: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000a764: 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; a000a768: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000a76c: e24dd01c sub sp, sp, #28 a000a770: 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 ) { a000a774: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000a778: 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 ) { a000a77c: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000a780: 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; a000a784: 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; a000a788: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { a000a78c: 2a000074 bcs a000a964 <_Heap_Allocate_aligned_with_boundary+0x204> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { a000a790: e3530000 cmp r3, #0 a000a794: 1a000070 bne a000a95c <_Heap_Allocate_aligned_with_boundary+0x1fc> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a000a798: e157000a cmp r7, sl a000a79c: 03a06000 moveq r6, #0 a000a7a0: 0a000072 beq a000a970 <_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; a000a7a4: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; a000a7a8: e2651004 rsb r1, r5, #4 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a000a7ac: 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; a000a7b0: e2833007 add r3, r3, #7 a000a7b4: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; a000a7b8: e58d1014 str r1, [sp, #20] a000a7bc: ea000004 b a000a7d4 <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { a000a7c0: e3540000 cmp r4, #0 a000a7c4: 1a000057 bne a000a928 <_Heap_Allocate_aligned_with_boundary+0x1c8> break; } block = block->next; a000a7c8: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a000a7cc: e157000a cmp r7, sl a000a7d0: 0a000066 beq a000a970 <_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 ) { a000a7d4: e59a9004 ldr r9, [sl, #4] a000a7d8: e59d2000 ldr r2, [sp] while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; a000a7dc: 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 ) { a000a7e0: e1520009 cmp r2, r9 a000a7e4: 2afffff7 bcs a000a7c8 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { a000a7e8: 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; a000a7ec: 028a4008 addeq r4, sl, #8 a000a7f0: 0afffff2 beq a000a7c0 <_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; a000a7f4: e59d1014 ldr r1, [sp, #20] uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a000a7f8: 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; a000a7fc: e59d2010 ldr r2, [sp, #16] 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; a000a800: e3c99001 bic r9, r9, #1 a000a804: e08a9009 add r9, sl, r9 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; a000a808: 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; a000a80c: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000a810: 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; a000a814: e0633002 rsb r3, r3, r2 a000a818: e1a01008 mov r1, r8 a000a81c: e0839009 add r9, r3, r9 a000a820: eb003167 bl a0016dc4 <__umodsi3> a000a824: 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; a000a828: 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 ) { a000a82c: e1590004 cmp r9, r4 a000a830: e58d3008 str r3, [sp, #8] a000a834: 2a000003 bcs a000a848 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000a838: e1a00009 mov r0, r9 a000a83c: e1a01008 mov r1, r8 a000a840: eb00315f bl a0016dc4 <__umodsi3> a000a844: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { a000a848: e35b0000 cmp fp, #0 a000a84c: 0a000025 beq a000a8e8 <_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; a000a850: e0849005 add r9, r4, r5 a000a854: e1a00009 mov r0, r9 a000a858: e1a0100b mov r1, fp a000a85c: eb003158 bl a0016dc4 <__umodsi3> a000a860: 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 ) { a000a864: e1590000 cmp r9, r0 a000a868: 93a03000 movls r3, #0 a000a86c: 83a03001 movhi r3, #1 a000a870: e1540000 cmp r4, r0 a000a874: 23a03000 movcs r3, #0 a000a878: e3530000 cmp r3, #0 a000a87c: 0a000019 beq a000a8e8 <_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; a000a880: e59d1008 ldr r1, [sp, #8] a000a884: 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 ) { a000a888: e1590000 cmp r9, r0 a000a88c: 958d6018 strls r6, [sp, #24] a000a890: 9a000002 bls a000a8a0 <_Heap_Allocate_aligned_with_boundary+0x140> a000a894: eaffffcb b a000a7c8 <_Heap_Allocate_aligned_with_boundary+0x68> a000a898: e1590000 cmp r9, r0 a000a89c: 8a000035 bhi a000a978 <_Heap_Allocate_aligned_with_boundary+0x218> return 0; } alloc_begin = boundary_line - alloc_size; a000a8a0: e0654000 rsb r4, r5, r0 a000a8a4: e1a01008 mov r1, r8 a000a8a8: e1a00004 mov r0, r4 a000a8ac: eb003144 bl a0016dc4 <__umodsi3> a000a8b0: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; a000a8b4: e0846005 add r6, r4, r5 a000a8b8: e1a00006 mov r0, r6 a000a8bc: e1a0100b mov r1, fp a000a8c0: eb00313f bl a0016dc4 <__umodsi3> a000a8c4: 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 ) { a000a8c8: e1560000 cmp r6, r0 a000a8cc: 93a03000 movls r3, #0 a000a8d0: 83a03001 movhi r3, #1 a000a8d4: e1540000 cmp r4, r0 a000a8d8: 23a03000 movcs r3, #0 a000a8dc: e3530000 cmp r3, #0 a000a8e0: 1affffec bne a000a898 <_Heap_Allocate_aligned_with_boundary+0x138> a000a8e4: 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 ) { a000a8e8: e59d2008 ldr r2, [sp, #8] a000a8ec: e1520004 cmp r2, r4 a000a8f0: 8affffb4 bhi a000a7c8 <_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; a000a8f4: e59d100c ldr r1, [sp, #12] a000a8f8: e1a00004 mov r0, r4 a000a8fc: eb003130 bl a0016dc4 <__umodsi3> a000a900: e3e09007 mvn r9, #7 a000a904: e06a9009 rsb r9, sl, r9 if ( free_size >= min_block_size || free_size == 0 ) { a000a908: e59d1004 ldr r1, [sp, #4] /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 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; a000a90c: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { a000a910: e0603009 rsb r3, r0, r9 a000a914: e1590000 cmp r9, r0 a000a918: 11510003 cmpne r1, r3 a000a91c: 8affffa9 bhi a000a7c8 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { a000a920: e3540000 cmp r4, #0 a000a924: 0affffa7 beq a000a7c8 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; a000a928: e597204c ldr r2, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000a92c: e1a0100a mov r1, sl a000a930: e1a03005 mov r3, r5 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; a000a934: e0822006 add r2, r2, r6 a000a938: e587204c str r2, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000a93c: e1a00007 mov r0, r7 a000a940: e1a02004 mov r2, r4 a000a944: ebffeb60 bl a00056cc <_Heap_Block_allocate> a000a948: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; a000a94c: e5973044 ldr r3, [r7, #68] ; 0x44 a000a950: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; a000a954: 35876044 strcc r6, [r7, #68] ; 0x44 a000a958: ea000002 b a000a968 <_Heap_Allocate_aligned_with_boundary+0x208> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { a000a95c: e1550003 cmp r5, r3 a000a960: 9a000006 bls a000a980 <_Heap_Allocate_aligned_with_boundary+0x220> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; a000a964: e3a00000 mov r0, #0 } return (void *) alloc_begin; } a000a968: e28dd01c add sp, sp, #28 a000a96c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a000a970: e3a00000 mov r0, #0 a000a974: eafffff4 b a000a94c <_Heap_Allocate_aligned_with_boundary+0x1ec> a000a978: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED a000a97c: eaffff91 b a000a7c8 <_Heap_Allocate_aligned_with_boundary+0x68> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { a000a980: e3580000 cmp r8, #0 a000a984: 01a08002 moveq r8, r2 a000a988: eaffff82 b a000a798 <_Heap_Allocate_aligned_with_boundary+0x38> a000facc <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { a000facc: e92d41f0 push {r4, r5, r6, r7, r8, lr} Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; a000fad0: e590c01c ldr ip, [r0, #28] Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { a000fad4: e1a04000 mov r4, r0 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; a000fad8: e5900018 ldr r0, [r0, #24] a000fadc: e151000c cmp r1, ip a000fae0: 23a05000 movcs r5, #0 a000fae4: 33a05001 movcc r5, #1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { a000fae8: e1a07003 mov r7, r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; a000faec: e1510000 cmp r1, r0 a000faf0: 33a05000 movcc r5, #0 a000faf4: e3550000 cmp r5, #0 uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; a000faf8: e5946024 ldr r6, [r4, #36] ; 0x24 uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; a000fafc: 1a000012 bne a000fb4c <_Heap_Extend+0x80> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { a000fb00: e151000c cmp r1, ip a000fb04: 0a000001 beq a000fb10 <_Heap_Extend+0x44> a000fb08: e3a00002 mov r0, #2 a000fb0c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end a000fb10: e3e08007 mvn r8, #7 { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; a000fb14: e0811002 add r1, r1, r2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end a000fb18: e0668008 rsb r8, r6, r8 a000fb1c: e0888001 add r8, r8, r1 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; a000fb20: e584101c str r1, [r4, #28] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000fb24: e1a00008 mov r0, r8 a000fb28: e5941010 ldr r1, [r4, #16] a000fb2c: ebffcd81 bl a0003138 <__umodsi3> a000fb30: e0600008 rsb r0, r0, r8 extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; a000fb34: e5870000 str r0, [r7] if( extend_size >= heap->min_block_size ) { a000fb38: e5943014 ldr r3, [r4, #20] a000fb3c: e1530000 cmp r3, r0 a000fb40: 9a000003 bls a000fb54 <_Heap_Extend+0x88> a000fb44: e1a00005 mov r0, r5 <== NOT EXECUTED a000fb48: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; a000fb4c: e3a00001 mov r0, #1 a000fb50: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; a000fb54: e5961004 ldr r1, [r6, #4] if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = a000fb58: e5942020 ldr r2, [r4, #32] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000fb5c: e0803006 add r3, r0, r6 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; a000fb60: e2011001 and r1, r1, #1 a000fb64: e0632002 rsb r2, r3, r2 a000fb68: e1801001 orr r1, r0, r1 a000fb6c: e3822001 orr r2, r2, #1 a000fb70: e5861004 str r1, [r6, #4] a000fb74: e5832004 str r2, [r3, #4] | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000fb78: e594802c ldr r8, [r4, #44] ; 0x2c ++stats->used_blocks; a000fb7c: e5941040 ldr r1, [r4, #64] ; 0x40 --stats->frees; /* Do not count subsequent call as actual free() */ a000fb80: e5942050 ldr r2, [r4, #80] ; 0x50 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000fb84: e0880000 add r0, r8, r0 ++stats->used_blocks; a000fb88: e2811001 add r1, r1, #1 --stats->frees; /* Do not count subsequent call as actual free() */ a000fb8c: e2422001 sub r2, r2, #1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000fb90: e584002c str r0, [r4, #44] ; 0x2c ++stats->used_blocks; a000fb94: e5841040 str r1, [r4, #64] ; 0x40 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; a000fb98: e5843024 str r3, [r4, #36] ; 0x24 /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ a000fb9c: e5842050 str r2, [r4, #80] ; 0x50 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); a000fba0: e1a00004 mov r0, r4 a000fba4: e2861008 add r1, r6, #8 a000fba8: ebffe879 bl a0009d94 <_Heap_Free> a000fbac: e1a00005 mov r0, r5 } return HEAP_EXTEND_SUCCESSFUL; } a000fbb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} a000644c <_Heap_Walk>: 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() ) ) { a000644c: e59f357c ldr r3, [pc, #1404] ; a00069d0 <_Heap_Walk+0x584> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006450: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 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; a0006454: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { a0006458: 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; a000645c: e59f2570 ldr r2, [pc, #1392] ; a00069d4 <_Heap_Walk+0x588> a0006460: e59fa570 ldr sl, [pc, #1392] ; a00069d8 <_Heap_Walk+0x58c> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006464: e24dd038 sub sp, sp, #56 ; 0x38 a0006468: e1a04000 mov r4, r0 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; a000646c: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { a0006470: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; a0006474: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; a0006478: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a000647c: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; a0006480: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; a0006484: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; a0006488: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; a000648c: 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() ) ) { a0006490: 0a000002 beq a00064a0 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { a0006494: e3a00001 mov r0, #1 block = next_block; } return true; } a0006498: e28dd038 add sp, sp, #56 ; 0x38 a000649c: 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)( a00064a0: e5900018 ldr r0, [r0, #24] a00064a4: e594101c ldr r1, [r4, #28] a00064a8: e5942008 ldr r2, [r4, #8] a00064ac: e594300c ldr r3, [r4, #12] a00064b0: e59dc024 ldr ip, [sp, #36] ; 0x24 a00064b4: e98d0003 stmib sp, {r0, r1} a00064b8: e58d2014 str r2, [sp, #20] a00064bc: e58d3018 str r3, [sp, #24] a00064c0: e59f2514 ldr r2, [pc, #1300] ; a00069dc <_Heap_Walk+0x590> a00064c4: e58db000 str fp, [sp] a00064c8: e58d500c str r5, [sp, #12] a00064cc: e58dc010 str ip, [sp, #16] a00064d0: e1a00008 mov r0, r8 a00064d4: e3a01000 mov r1, #0 a00064d8: e59d3020 ldr r3, [sp, #32] a00064dc: e12fff3a blx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { a00064e0: e59d2020 ldr r2, [sp, #32] a00064e4: e3520000 cmp r2, #0 a00064e8: 0a000030 beq a00065b0 <_Heap_Walk+0x164> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { a00064ec: e59d3020 ldr r3, [sp, #32] a00064f0: e2139003 ands r9, r3, #3 a00064f4: 1a000033 bne a00065c8 <_Heap_Walk+0x17c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { a00064f8: e1a0000b mov r0, fp a00064fc: e59d1020 ldr r1, [sp, #32] a0006500: ebffe978 bl a0000ae8 <__umodsi3> a0006504: e2506000 subs r6, r0, #0 a0006508: 1a000034 bne a00065e0 <_Heap_Walk+0x194> ); return false; } if ( a000650c: e2850008 add r0, r5, #8 a0006510: e59d1020 ldr r1, [sp, #32] a0006514: ebffe973 bl a0000ae8 <__umodsi3> a0006518: e2509000 subs r9, r0, #0 a000651c: 1a000036 bne a00065fc <_Heap_Walk+0x1b0> 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; a0006520: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { a0006524: e2176001 ands r6, r7, #1 a0006528: 0a00003a beq a0006618 <_Heap_Walk+0x1cc> ); return false; } if ( first_block->prev_size != page_size ) { a000652c: e5953000 ldr r3, [r5] a0006530: e59dc020 ldr ip, [sp, #32] a0006534: e15c0003 cmp ip, r3 a0006538: 1a000015 bne a0006594 <_Heap_Walk+0x148> ); return false; } if ( _Heap_Is_free( last_block ) ) { a000653c: e59d2024 ldr r2, [sp, #36] ; 0x24 a0006540: e5923004 ldr r3, [r2, #4] a0006544: e3c33001 bic r3, r3, #1 a0006548: e0823003 add r3, r2, r3 a000654c: e5939004 ldr r9, [r3, #4] a0006550: e2199001 ands r9, r9, #1 a0006554: 0a000101 beq a0006960 <_Heap_Walk+0x514> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a0006558: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a000655c: 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 ) { a0006560: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a0006564: 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 ) { a0006568: 0a000065 beq a0006704 <_Heap_Walk+0x2b8> 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; a000656c: 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 a0006570: e15c0009 cmp ip, r9 a0006574: 9a00002d bls a0006630 <_Heap_Walk+0x1e4> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( a0006578: e1a00008 mov r0, r8 a000657c: e1a03009 mov r3, r9 a0006580: e3a01001 mov r1, #1 a0006584: e59f2454 ldr r2, [pc, #1108] ; a00069e0 <_Heap_Walk+0x594> a0006588: e12fff3a blx sl a000658c: e3a00000 mov r0, #0 a0006590: eaffffc0 b a0006498 <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( a0006594: e1a00008 mov r0, r8 a0006598: e58dc000 str ip, [sp] a000659c: e3a01001 mov r1, #1 a00065a0: e59f243c ldr r2, [pc, #1084] ; a00069e4 <_Heap_Walk+0x598> a00065a4: e12fff3a blx sl a00065a8: e1a00009 mov r0, r9 a00065ac: eaffffb9 b a0006498 <_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" ); a00065b0: e1a00008 mov r0, r8 a00065b4: e3a01001 mov r1, #1 a00065b8: e59f2428 ldr r2, [pc, #1064] ; a00069e8 <_Heap_Walk+0x59c> a00065bc: e12fff3a blx sl a00065c0: e59d0020 ldr r0, [sp, #32] a00065c4: eaffffb3 b a0006498 <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( a00065c8: e1a00008 mov r0, r8 a00065cc: e3a01001 mov r1, #1 a00065d0: e59f2414 ldr r2, [pc, #1044] ; a00069ec <_Heap_Walk+0x5a0> a00065d4: e12fff3a blx sl a00065d8: e3a00000 mov r0, #0 a00065dc: eaffffad b a0006498 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( a00065e0: e1a00008 mov r0, r8 a00065e4: e1a0300b mov r3, fp a00065e8: e3a01001 mov r1, #1 a00065ec: e59f23fc ldr r2, [pc, #1020] ; a00069f0 <_Heap_Walk+0x5a4> a00065f0: e12fff3a blx sl a00065f4: e1a00009 mov r0, r9 a00065f8: eaffffa6 b a0006498 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( a00065fc: e1a00008 mov r0, r8 a0006600: e1a03005 mov r3, r5 a0006604: e3a01001 mov r1, #1 a0006608: e59f23e4 ldr r2, [pc, #996] ; a00069f4 <_Heap_Walk+0x5a8> a000660c: e12fff3a blx sl a0006610: e1a00006 mov r0, r6 a0006614: eaffff9f b a0006498 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( a0006618: e1a00008 mov r0, r8 a000661c: e3a01001 mov r1, #1 a0006620: e59f23d0 ldr r2, [pc, #976] ; a00069f8 <_Heap_Walk+0x5ac> a0006624: e12fff3a blx sl a0006628: e1a00006 mov r0, r6 a000662c: eaffff99 b a0006498 <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; a0006630: 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 a0006634: e1520009 cmp r2, r9 && (uintptr_t) block <= (uintptr_t) heap->last_block; a0006638: 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 a000663c: 3affffcd bcc a0006578 <_Heap_Walk+0x12c> ); return false; } if ( a0006640: e2890008 add r0, r9, #8 a0006644: e1a01003 mov r1, r3 a0006648: e58dc01c str ip, [sp, #28] a000664c: ebffe925 bl a0000ae8 <__umodsi3> a0006650: e3500000 cmp r0, #0 a0006654: e59dc01c ldr ip, [sp, #28] a0006658: 1a0000c6 bne a0006978 <_Heap_Walk+0x52c> ); return false; } if ( _Heap_Is_used( free_block ) ) { a000665c: e5993004 ldr r3, [r9, #4] a0006660: e3c33001 bic r3, r3, #1 a0006664: e0893003 add r3, r9, r3 a0006668: e5933004 ldr r3, [r3, #4] a000666c: e3130001 tst r3, #1 a0006670: 1a0000cf bne a00069b4 <_Heap_Walk+0x568> ); return false; } if ( free_block->prev != prev_block ) { a0006674: e599200c ldr r2, [r9, #12] a0006678: e1540002 cmp r4, r2 a000667c: 1a0000c4 bne a0006994 <_Heap_Walk+0x548> a0006680: e58d7030 str r7, [sp, #48] ; 0x30 a0006684: e58db034 str fp, [sp, #52] ; 0x34 a0006688: e59d702c ldr r7, [sp, #44] ; 0x2c a000668c: e59db028 ldr fp, [sp, #40] ; 0x28 a0006690: e58d502c str r5, [sp, #44] ; 0x2c a0006694: e58d6028 str r6, [sp, #40] ; 0x28 a0006698: e1a0600c mov r6, ip a000669c: ea000011 b a00066e8 <_Heap_Walk+0x29c> a00066a0: e1590006 cmp r9, r6 a00066a4: 3affffb3 bcc a0006578 <_Heap_Walk+0x12c> a00066a8: e1570009 cmp r7, r9 ); return false; } if ( a00066ac: e2890008 add r0, r9, #8 a00066b0: e1a0100b mov r1, fp a00066b4: 3affffaf bcc a0006578 <_Heap_Walk+0x12c> a00066b8: ebffe90a bl a0000ae8 <__umodsi3> a00066bc: e3500000 cmp r0, #0 a00066c0: 1a0000ac bne a0006978 <_Heap_Walk+0x52c> ); return false; } if ( _Heap_Is_used( free_block ) ) { a00066c4: e5993004 ldr r3, [r9, #4] a00066c8: e3c33001 bic r3, r3, #1 a00066cc: e0833009 add r3, r3, r9 a00066d0: e5933004 ldr r3, [r3, #4] a00066d4: e3130001 tst r3, #1 a00066d8: 1a0000b5 bne a00069b4 <_Heap_Walk+0x568> ); return false; } if ( free_block->prev != prev_block ) { a00066dc: e599200c ldr r2, [r9, #12] a00066e0: e1520005 cmp r2, r5 a00066e4: 1a0000aa bne a0006994 <_Heap_Walk+0x548> (*printer)( a00066e8: e1a05009 mov r5, r9 return false; } prev_block = free_block; free_block = free_block->next; a00066ec: 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 ) { a00066f0: e1540009 cmp r4, r9 a00066f4: 1affffe9 bne a00066a0 <_Heap_Walk+0x254> a00066f8: e28d502c add r5, sp, #44 ; 0x2c a00066fc: e89508a0 ldm r5, {r5, r7, fp} a0006700: e59d6028 ldr r6, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { a0006704: e59d3024 ldr r3, [sp, #36] ; 0x24 a0006708: 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)" : ""), a000670c: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { a0006710: 0affff5f beq a0006494 <_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; a0006714: 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 ) { a0006718: 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); a000671c: e0876005 add r6, r7, r5 a0006720: 0a000010 beq a0006768 <_Heap_Walk+0x31c> (*printer)( a0006724: e1a03005 mov r3, r5 a0006728: e58d7000 str r7, [sp] a000672c: e1a00008 mov r0, r8 a0006730: e3a01000 mov r1, #0 a0006734: e59f22c0 ldr r2, [pc, #704] ; a00069fc <_Heap_Walk+0x5b0> a0006738: e12fff3a blx 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 a000673c: e5943020 ldr r3, [r4, #32] a0006740: e1530006 cmp r3, r6 a0006744: 9a000011 bls a0006790 <_Heap_Walk+0x344> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( a0006748: e1a00008 mov r0, r8 a000674c: e58d6000 str r6, [sp] a0006750: e1a03005 mov r3, r5 a0006754: e3a01001 mov r1, #1 a0006758: e59f22a0 ldr r2, [pc, #672] ; a0006a00 <_Heap_Walk+0x5b4> a000675c: e12fff3a blx sl a0006760: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; a0006764: eaffff4b b a0006498 <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( a0006768: e58d7000 str r7, [sp] a000676c: e5953000 ldr r3, [r5] a0006770: e1a00008 mov r0, r8 a0006774: e59f2288 ldr r2, [pc, #648] ; a0006a04 <_Heap_Walk+0x5b8> a0006778: e58d3004 str r3, [sp, #4] a000677c: e1a03005 mov r3, r5 a0006780: e12fff3a blx sl a0006784: e5943020 ldr r3, [r4, #32] a0006788: e1530006 cmp r3, r6 a000678c: 8affffed bhi a0006748 <_Heap_Walk+0x2fc> a0006790: e5943024 ldr r3, [r4, #36] ; 0x24 a0006794: e1530006 cmp r3, r6 a0006798: 3affffea bcc a0006748 <_Heap_Walk+0x2fc> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { a000679c: e1a00007 mov r0, r7 a00067a0: e59d1020 ldr r1, [sp, #32] a00067a4: ebffe8cf bl a0000ae8 <__umodsi3> a00067a8: e2509000 subs r9, r0, #0 a00067ac: 1a000051 bne a00068f8 <_Heap_Walk+0x4ac> ); return false; } if ( block_size < min_block_size ) { a00067b0: e59d3028 ldr r3, [sp, #40] ; 0x28 a00067b4: e1530007 cmp r3, r7 a00067b8: 8a000056 bhi a0006918 <_Heap_Walk+0x4cc> ); return false; } if ( next_block_begin <= block_begin ) { a00067bc: e1550006 cmp r5, r6 a00067c0: 2a00005e bcs a0006940 <_Heap_Walk+0x4f4> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a00067c4: e5963004 ldr r3, [r6, #4] a00067c8: e3130001 tst r3, #1 a00067cc: 1a000034 bne a00068a4 <_Heap_Walk+0x458> 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; a00067d0: 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)( a00067d4: 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; a00067d8: 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; a00067dc: e3cb7001 bic r7, fp, #1 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; a00067e0: e594100c ldr r1, [r4, #12] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a00067e4: e1530002 cmp r3, r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a00067e8: 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; a00067ec: 059f0214 ldreq r0, [pc, #532] ; a0006a08 <_Heap_Walk+0x5bc> a00067f0: 0a000003 beq a0006804 <_Heap_Walk+0x3b8> "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)" : ""), a00067f4: e59fc210 ldr ip, [pc, #528] ; a0006a0c <_Heap_Walk+0x5c0> a00067f8: e1520004 cmp r2, r4 a00067fc: e59f020c ldr r0, [pc, #524] ; a0006a10 <_Heap_Walk+0x5c4> a0006800: 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)( a0006804: e5953008 ldr r3, [r5, #8] a0006808: e1510003 cmp r1, r3 a000680c: 059f1200 ldreq r1, [pc, #512] ; a0006a14 <_Heap_Walk+0x5c8> a0006810: 0a000003 beq a0006824 <_Heap_Walk+0x3d8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") a0006814: e59fc1f0 ldr ip, [pc, #496] ; a0006a0c <_Heap_Walk+0x5c0> a0006818: e1530004 cmp r3, r4 a000681c: e59f11f4 ldr r1, [pc, #500] ; a0006a18 <_Heap_Walk+0x5cc> a0006820: 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)( a0006824: e58d2000 str r2, [sp] a0006828: e98d0009 stmib sp, {r0, r3} a000682c: e58d100c str r1, [sp, #12] a0006830: e1a03005 mov r3, r5 a0006834: e1a00008 mov r0, r8 a0006838: e3a01000 mov r1, #0 a000683c: e59f21d8 ldr r2, [pc, #472] ; a0006a1c <_Heap_Walk+0x5d0> a0006840: e12fff3a blx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { a0006844: e5993000 ldr r3, [r9] a0006848: e1570003 cmp r7, r3 a000684c: 0a000009 beq a0006878 <_Heap_Walk+0x42c> (*printer)( a0006850: e58d3004 str r3, [sp, #4] a0006854: e1a00008 mov r0, r8 a0006858: e58d7000 str r7, [sp] a000685c: e58d9008 str r9, [sp, #8] a0006860: e1a03005 mov r3, r5 a0006864: e3a01001 mov r1, #1 a0006868: e59f21b0 ldr r2, [pc, #432] ; a0006a20 <_Heap_Walk+0x5d4> a000686c: e12fff3a blx sl a0006870: e3a00000 mov r0, #0 a0006874: eaffff07 b a0006498 <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { a0006878: e21b9001 ands r9, fp, #1 a000687c: 0a000016 beq a00068dc <_Heap_Walk+0x490> a0006880: 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 ) { a0006884: e1530004 cmp r3, r4 a0006888: 1a000003 bne a000689c <_Heap_Walk+0x450> a000688c: ea00000b b a00068c0 <_Heap_Walk+0x474> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; a0006890: 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 ) { a0006894: e1530004 cmp r3, r4 a0006898: 0a000008 beq a00068c0 <_Heap_Walk+0x474> if ( free_block == block ) { a000689c: e1530005 cmp r3, r5 a00068a0: 1afffffa bne a0006890 <_Heap_Walk+0x444> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { a00068a4: e59d2024 ldr r2, [sp, #36] ; 0x24 a00068a8: e1520006 cmp r2, r6 a00068ac: 0afffef8 beq a0006494 <_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 ) { a00068b0: e5967004 ldr r7, [r6, #4] a00068b4: e1a05006 mov r5, r6 a00068b8: e2076001 and r6, r7, #1 a00068bc: eaffff94 b a0006714 <_Heap_Walk+0x2c8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( a00068c0: e1a00008 mov r0, r8 a00068c4: e1a03005 mov r3, r5 a00068c8: e3a01001 mov r1, #1 a00068cc: e59f2150 ldr r2, [pc, #336] ; a0006a24 <_Heap_Walk+0x5d8> a00068d0: e12fff3a blx sl a00068d4: e3a00000 mov r0, #0 a00068d8: eafffeee b a0006498 <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( a00068dc: e1a00008 mov r0, r8 a00068e0: e1a03005 mov r3, r5 a00068e4: e3a01001 mov r1, #1 a00068e8: e59f2138 ldr r2, [pc, #312] ; a0006a28 <_Heap_Walk+0x5dc> a00068ec: e12fff3a blx sl a00068f0: e1a00009 mov r0, r9 a00068f4: eafffee7 b a0006498 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( a00068f8: e1a00008 mov r0, r8 a00068fc: e58d7000 str r7, [sp] a0006900: e1a03005 mov r3, r5 a0006904: e3a01001 mov r1, #1 a0006908: e59f211c ldr r2, [pc, #284] ; a0006a2c <_Heap_Walk+0x5e0> a000690c: e12fff3a blx sl a0006910: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; a0006914: eafffedf b a0006498 <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( a0006918: e58d3004 str r3, [sp, #4] a000691c: e1a00008 mov r0, r8 a0006920: e1a0b003 mov fp, r3 a0006924: e58d7000 str r7, [sp] a0006928: e1a03005 mov r3, r5 a000692c: e3a01001 mov r1, #1 a0006930: e59f20f8 ldr r2, [pc, #248] ; a0006a30 <_Heap_Walk+0x5e4> a0006934: e12fff3a blx sl a0006938: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; a000693c: eafffed5 b a0006498 <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( a0006940: e1a00008 mov r0, r8 a0006944: e58d6000 str r6, [sp] a0006948: e1a03005 mov r3, r5 a000694c: e3a01001 mov r1, #1 a0006950: e59f20dc ldr r2, [pc, #220] ; a0006a34 <_Heap_Walk+0x5e8> a0006954: e12fff3a blx sl a0006958: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; a000695c: eafffecd b a0006498 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( a0006960: e1a00008 mov r0, r8 a0006964: e3a01001 mov r1, #1 a0006968: e59f20c8 ldr r2, [pc, #200] ; a0006a38 <_Heap_Walk+0x5ec> a000696c: e12fff3a blx sl a0006970: e1a00009 mov r0, r9 a0006974: eafffec7 b a0006498 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( a0006978: e1a00008 mov r0, r8 a000697c: e1a03009 mov r3, r9 a0006980: e3a01001 mov r1, #1 a0006984: e59f20b0 ldr r2, [pc, #176] ; a0006a3c <_Heap_Walk+0x5f0> a0006988: e12fff3a blx sl a000698c: e3a00000 mov r0, #0 a0006990: eafffec0 b a0006498 <_Heap_Walk+0x4c> return false; } if ( free_block->prev != prev_block ) { (*printer)( a0006994: e58d2000 str r2, [sp] a0006998: e1a00008 mov r0, r8 a000699c: e1a03009 mov r3, r9 a00069a0: e3a01001 mov r1, #1 a00069a4: e59f2094 ldr r2, [pc, #148] ; a0006a40 <_Heap_Walk+0x5f4> a00069a8: e12fff3a blx sl a00069ac: e3a00000 mov r0, #0 a00069b0: eafffeb8 b a0006498 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( a00069b4: e1a00008 mov r0, r8 a00069b8: e1a03009 mov r3, r9 a00069bc: e3a01001 mov r1, #1 a00069c0: e59f207c ldr r2, [pc, #124] ; a0006a44 <_Heap_Walk+0x5f8> a00069c4: e12fff3a blx sl a00069c8: e3a00000 mov r0, #0 a00069cc: eafffeb1 b a0006498 <_Heap_Walk+0x4c> a00069d0: a001d310 .word 0xa001d310 a00069d4: a0006440 .word 0xa0006440 a00069d8: a0006a48 .word 0xa0006a48 a00069dc: a001b328 .word 0xa001b328 a00069e0: a001b4d0 .word 0xa001b4d0 a00069e4: a001b488 .word 0xa001b488 a00069e8: a001b3c0 .word 0xa001b3c0 a00069ec: a001b3d8 .word 0xa001b3d8 a00069f0: a001b3f8 .word 0xa001b3f8 a00069f4: a001b420 .word 0xa001b420 a00069f8: a001b458 .word 0xa001b458 a00069fc: a001b578 .word 0xa001b578 a0006a00: a001b5b8 .word 0xa001b5b8 a0006a04: a001b590 .word 0xa001b590 a0006a08: a001b680 .word 0xa001b680 a0006a0c: a001b2d0 .word 0xa001b2d0 a0006a10: a001b690 .word 0xa001b690 a0006a14: a001b6a0 .word 0xa001b6a0 a0006a18: a001b6b0 .word 0xa001b6b0 a0006a1c: a001b6c0 .word 0xa001b6c0 a0006a20: a001b6f0 .word 0xa001b6f0 a0006a24: a001b760 .word 0xa001b760 a0006a28: a001b730 .word 0xa001b730 a0006a2c: a001b5e8 .word 0xa001b5e8 a0006a30: a001b618 .word 0xa001b618 a0006a34: a001b648 .word 0xa001b648 a0006a38: a001b4b8 .word 0xa001b4b8 a0006a3c: a001b4f0 .word 0xa001b4f0 a0006a40: a001b540 .word 0xa001b540 a0006a44: a001b520 .word 0xa001b520 a0005934 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { a0005934: 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 ) a0005938: e5908034 ldr r8, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { a000593c: e24dd014 sub sp, sp, #20 a0005940: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a0005944: e3580000 cmp r8, #0 /* * 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 ); a0005948: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a000594c: 0a00009d beq a0005bc8 <_Objects_Extend_information+0x294> block_count = 0; else { block_count = information->maximum / information->allocation_size; a0005950: e1d091b4 ldrh r9, [r0, #20] a0005954: e1d0a1b0 ldrh sl, [r0, #16] a0005958: e1a01009 mov r1, r9 a000595c: e1a0000a mov r0, sl a0005960: eb0044d3 bl a0016cb4 <__aeabi_uidiv> a0005964: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { a0005968: e1b03823 lsrs r3, r3, #16 a000596c: 01a01009 moveq r1, r9 a0005970: 01a06007 moveq r6, r7 a0005974: 01a04003 moveq r4, r3 a0005978: 0a00000f beq a00059bc <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) a000597c: e5984000 ldr r4, [r8] a0005980: e3540000 cmp r4, #0 a0005984: 11a01009 movne r1, r9 a0005988: 11a06007 movne r6, r7 a000598c: 13a04000 movne r4, #0 a0005990: 01a01009 moveq r1, r9 a0005994: 01a06007 moveq r6, r7 a0005998: 1a000003 bne a00059ac <_Objects_Extend_information+0x78> a000599c: ea000006 b a00059bc <_Objects_Extend_information+0x88> <== NOT EXECUTED a00059a0: e7982104 ldr r2, [r8, r4, lsl #2] a00059a4: e3520000 cmp r2, #0 a00059a8: 0a000003 beq a00059bc <_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++ ) { a00059ac: e2844001 add r4, r4, #1 a00059b0: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; a00059b4: 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++ ) { a00059b8: 8afffff8 bhi a00059a0 <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; a00059bc: 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 ) { a00059c0: e35a0801 cmp sl, #65536 ; 0x10000 a00059c4: 2a000065 bcs a0005b60 <_Objects_Extend_information+0x22c> /* * 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 ) { a00059c8: 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; a00059cc: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { a00059d0: 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; a00059d4: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { a00059d8: 1a000062 bne a0005b68 <_Objects_Extend_information+0x234> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); a00059dc: e58d3000 str r3, [sp] a00059e0: eb000824 bl a0007a78 <_Workspace_Allocate_or_fatal_error> a00059e4: e59d3000 ldr r3, [sp] a00059e8: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { a00059ec: e1d521b0 ldrh r2, [r5, #16] a00059f0: e1560002 cmp r6, r2 a00059f4: 3a000039 bcc a0005ae0 <_Objects_Extend_information+0x1ac> */ /* * Up the block count and maximum */ block_count++; a00059f8: 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 ); a00059fc: e08c008c add r0, ip, ip, lsl #1 a0005a00: e08a0000 add r0, sl, r0 a0005a04: e0800007 add r0, r0, r7 a0005a08: e1a00100 lsl r0, r0, #2 a0005a0c: e88d1008 stm sp, {r3, ip} a0005a10: eb000824 bl a0007aa8 <_Workspace_Allocate> if ( !object_blocks ) { a0005a14: e250b000 subs fp, r0, #0 a0005a18: e89d1008 ldm sp, {r3, ip} a0005a1c: 0a00006f beq a0005be0 <_Objects_Extend_information+0x2ac> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { a0005a20: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); a0005a24: e08b818c add r8, fp, ip, lsl #3 a0005a28: e08bc10c add ip, fp, ip, lsl #2 a0005a2c: e1570002 cmp r7, r2 a0005a30: 3a000052 bcc a0005b80 <_Objects_Extend_information+0x24c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0005a34: 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, a0005a38: 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; a0005a3c: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0005a40: 0a000003 beq a0005a54 <_Objects_Extend_information+0x120> local_table[ index ] = NULL; a0005a44: 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++ ) { a0005a48: e2822001 add r2, r2, #1 a0005a4c: e1570002 cmp r7, r2 a0005a50: 8afffffb bhi a0005a44 <_Objects_Extend_information+0x110> a0005a54: 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 ); a0005a58: e1d511b4 ldrh r1, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; a0005a5c: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; a0005a60: e78c0003 str r0, [ip, r3] for ( index=index_base ; index < ( information->allocation_size + index_base ); a0005a64: 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 ; a0005a68: e1560001 cmp r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; a0005a6c: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; a0005a70: 2a000005 bcs a0005a8c <_Objects_Extend_information+0x158> a0005a74: e0882106 add r2, r8, r6, lsl #2 a0005a78: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { a0005a7c: 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 ; a0005a80: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; a0005a84: 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 ; a0005a88: 3afffffb bcc a0005a7c <_Objects_Extend_information+0x148> a0005a8c: e10f3000 mrs r3, CPSR a0005a90: e3832080 orr r2, r3, #128 ; 0x80 a0005a94: 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( a0005a98: e5952000 ldr r2, [r5] a0005a9c: e1d510b4 ldrh r1, [r5, #4] 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; a0005aa0: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( a0005aa4: e1a02c02 lsl r2, r2, #24 a0005aa8: 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; a0005aac: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( a0005ab0: e1822d81 orr r2, r2, r1, lsl #27 a0005ab4: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; a0005ab8: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; a0005abc: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; a0005ac0: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( a0005ac4: 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; a0005ac8: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; a0005acc: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0005ad0: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) a0005ad4: e3500000 cmp r0, #0 a0005ad8: 0a000000 beq a0005ae0 <_Objects_Extend_information+0x1ac> _Workspace_Free( old_tables ); a0005adc: eb0007f7 bl a0007ac0 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0005ae0: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a0005ae4: e28d7008 add r7, sp, #8 a0005ae8: e1a01009 mov r1, r9 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0005aec: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a0005af0: e1a00007 mov r0, r7 a0005af4: e1d521b4 ldrh r2, [r5, #20] a0005af8: e5953018 ldr r3, [r5, #24] a0005afc: eb001277 bl a000a4e0 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0005b00: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0005b04: 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 ) { a0005b08: ea000008 b a0005b30 <_Objects_Extend_information+0x1fc> the_object->id = _Objects_Build_id( a0005b0c: e5952000 ldr r2, [r5] a0005b10: e1d5c0b4 ldrh ip, [r5, #4] a0005b14: e1a02c02 lsl r2, r2, #24 a0005b18: e3822801 orr r2, r2, #65536 ; 0x10000 a0005b1c: e1822d8c orr r2, r2, ip, lsl #27 a0005b20: e1822006 orr r2, r2, r6 a0005b24: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0005b28: ebfffd22 bl a0004fb8 <_Chain_Append> index++; a0005b2c: 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 ) { a0005b30: e1a00007 mov r0, r7 a0005b34: eb00125c bl a000a4ac <_Chain_Get> a0005b38: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0005b3c: e1a01003 mov r1, r3 a0005b40: 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 ) { a0005b44: 1afffff0 bne a0005b0c <_Objects_Extend_information+0x1d8> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a0005b48: e1d531b4 ldrh r3, [r5, #20] information->inactive = a0005b4c: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a0005b50: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = a0005b54: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a0005b58: e7813004 str r3, [r1, r4] information->inactive = a0005b5c: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } a0005b60: e28dd014 add sp, sp, #20 a0005b64: 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 ); a0005b68: e58d3000 str r3, [sp] a0005b6c: eb0007cd bl a0007aa8 <_Workspace_Allocate> if ( !new_object_block ) a0005b70: e2509000 subs r9, r0, #0 a0005b74: e59d3000 ldr r3, [sp] a0005b78: 1affff9b bne a00059ec <_Objects_Extend_information+0xb8> a0005b7c: eafffff7 b a0005b60 <_Objects_Extend_information+0x22c> /* * 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, a0005b80: e1a03103 lsl r3, r3, #2 a0005b84: e1a02003 mov r2, r3 a0005b88: e5951034 ldr r1, [r5, #52] ; 0x34 a0005b8c: e88d1008 stm sp, {r3, ip} a0005b90: eb0020e2 bl a000df20 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, a0005b94: e89d1008 ldm sp, {r3, ip} a0005b98: e5951030 ldr r1, [r5, #48] ; 0x30 a0005b9c: e1a0000c mov r0, ip a0005ba0: e1a02003 mov r2, r3 a0005ba4: eb0020dd bl a000df20 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, a0005ba8: e1d521b0 ldrh r2, [r5, #16] a0005bac: e1a00008 mov r0, r8 a0005bb0: e595101c ldr r1, [r5, #28] a0005bb4: e0872002 add r2, r7, r2 a0005bb8: e1a02102 lsl r2, r2, #2 a0005bbc: eb0020d7 bl a000df20 a0005bc0: e89d1008 ldm sp, {r3, ip} a0005bc4: eaffffa3 b a0005a58 <_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 ) a0005bc8: e1a04008 mov r4, r8 a0005bcc: e1d0a1b0 ldrh sl, [r0, #16] a0005bd0: e1d011b4 ldrh r1, [r0, #20] a0005bd4: e1a06007 mov r6, r7 a0005bd8: e1a03008 mov r3, r8 a0005bdc: eaffff76 b a00059bc <_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 ); a0005be0: e1a00009 mov r0, r9 a0005be4: eb0007b5 bl a0007ac0 <_Workspace_Free> return; a0005be8: eaffffdc b a0005b60 <_Objects_Extend_information+0x22c> a00065c8 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a00065c8: e92d40f0 push {r4, r5, r6, r7, lr} a00065cc: e1a05000 mov r5, r0 a00065d0: e1a06001 mov r6, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a00065d4: e1a00002 mov r0, r2 a00065d8: e1d513ba ldrh r1, [r5, #58] ; 0x3a bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a00065dc: e1a07002 mov r7, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a00065e0: eb002547 bl a000fb04 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { a00065e4: e5d53038 ldrb r3, [r5, #56] ; 0x38 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a00065e8: e1a04000 mov r4, r0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { a00065ec: e3530000 cmp r3, #0 a00065f0: 1a000017 bne a0006654 <_Objects_Set_name+0x8c> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( a00065f4: e5d72000 ldrb r2, [r7] a00065f8: e3500001 cmp r0, #1 a00065fc: e1a02c02 lsl r2, r2, #24 a0006600: 9a00000c bls a0006638 <_Objects_Set_name+0x70> a0006604: e5d73001 ldrb r3, [r7, #1] a0006608: e3500002 cmp r0, #2 a000660c: e1822803 orr r2, r2, r3, lsl #16 a0006610: 0a000009 beq a000663c <_Objects_Set_name+0x74> a0006614: e5d73002 ldrb r3, [r7, #2] a0006618: e3500003 cmp r0, #3 a000661c: e1822403 orr r2, r2, r3, lsl #8 a0006620: 15d73003 ldrbne r3, [r7, #3] a0006624: 0a000005 beq a0006640 <_Objects_Set_name+0x78> a0006628: e1823003 orr r3, r2, r3 a000662c: e586300c str r3, [r6, #12] a0006630: e3a00001 mov r0, #1 ); } return true; } a0006634: e8bd80f0 pop {r4, r5, r6, r7, pc} d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( a0006638: e3822602 orr r2, r2, #2097152 ; 0x200000 a000663c: e3822a02 orr r2, r2, #8192 ; 0x2000 a0006640: e3a03020 mov r3, #32 a0006644: e1823003 orr r3, r2, r3 a0006648: e586300c str r3, [r6, #12] a000664c: e3a00001 mov r0, #1 ); } return true; } a0006650: e8bd80f0 pop {r4, r5, r6, r7, pc} #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); a0006654: e2800001 add r0, r0, #1 a0006658: eb0006e7 bl a00081fc <_Workspace_Allocate> if ( !d ) a000665c: e2505000 subs r5, r0, #0 a0006660: 0a00000e beq a00066a0 <_Objects_Set_name+0xd8> return false; if ( the_object->name.name_p ) { a0006664: e596000c ldr r0, [r6, #12] a0006668: e3500000 cmp r0, #0 a000666c: 0a000002 beq a000667c <_Objects_Set_name+0xb4> _Workspace_Free( (void *)the_object->name.name_p ); a0006670: eb0006e7 bl a0008214 <_Workspace_Free> the_object->name.name_p = NULL; a0006674: e3a03000 mov r3, #0 a0006678: e586300c str r3, [r6, #12] } strncpy( d, name, length ); a000667c: e1a01007 mov r1, r7 a0006680: e1a00005 mov r0, r5 a0006684: e1a02004 mov r2, r4 a0006688: eb0024e3 bl a000fa1c d[length] = '\0'; a000668c: e3a03000 mov r3, #0 a0006690: e7c53004 strb r3, [r5, r4] the_object->name.name_p = d; a0006694: e3a00001 mov r0, #1 a0006698: e586500c str r5, [r6, #12] a000669c: e8bd80f0 pop {r4, r5, r6, r7, pc} #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) a00066a0: e1a00005 mov r0, r5 <== NOT EXECUTED a00066a4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED a0005734 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { a0005734: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a0005738: e1a04001 mov r4, r1 a000573c: e24dd004 sub sp, sp, #4 a0005740: 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 ) ) { a0005744: e1a0100d mov r1, sp a0005748: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { a000574c: e1a08002 mov r8, r2 a0005750: 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 ) ) { a0005754: eb000076 bl a0005934 <_POSIX_Mutex_Get> a0005758: e3500000 cmp r0, #0 a000575c: 0a00000a beq a000578c <_POSIX_Condition_variables_Wait_support+0x58> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; a0005760: e59f30dc ldr r3, [pc, #220] ; a0005844 <_POSIX_Condition_variables_Wait_support+0x110> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); a0005764: e1a0100d mov r1, sp a0005768: e1a00006 mov r0, r6 a000576c: e5932000 ldr r2, [r3] a0005770: e2422001 sub r2, r2, #1 a0005774: e5832000 str r2, [r3] a0005778: ebffff76 bl a0005558 <_POSIX_Condition_variables_Get> switch ( location ) { a000577c: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); a0005780: e1a0a000 mov sl, r0 switch ( location ) { a0005784: e3530000 cmp r3, #0 a0005788: 0a000003 beq a000579c <_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 ) a000578c: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } a0005790: e1a00005 mov r0, r5 a0005794: e28dd004 add sp, sp, #4 a0005798: 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 ) ) { a000579c: e5903014 ldr r3, [r0, #20] a00057a0: e3530000 cmp r3, #0 a00057a4: 0a000005 beq a00057c0 <_POSIX_Condition_variables_Wait_support+0x8c> a00057a8: e5942000 ldr r2, [r4] a00057ac: e1530002 cmp r3, r2 a00057b0: 0a000002 beq a00057c0 <_POSIX_Condition_variables_Wait_support+0x8c> _Thread_Enable_dispatch(); a00057b4: eb000c47 bl a00088d8 <_Thread_Enable_dispatch> a00057b8: e3a05016 mov r5, #22 return EINVAL; a00057bc: eafffff3 b a0005790 <_POSIX_Condition_variables_Wait_support+0x5c> } (void) pthread_mutex_unlock( mutex ); a00057c0: e1a00004 mov r0, r4 a00057c4: eb0000e6 bl a0005b64 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { a00057c8: e3570000 cmp r7, #0 a00057cc: 0a000006 beq a00057ec <_POSIX_Condition_variables_Wait_support+0xb8> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); a00057d0: eb000c40 bl a00088d8 <_Thread_Enable_dispatch> a00057d4: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); a00057d8: e1a00004 mov r0, r4 a00057dc: eb0000bf bl a0005ae0 if ( mutex_status ) a00057e0: e3500000 cmp r0, #0 a00057e4: 0affffe9 beq a0005790 <_POSIX_Condition_variables_Wait_support+0x5c> a00057e8: eaffffe7 b a000578c <_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; a00057ec: e59f5054 ldr r5, [pc, #84] ; a0005848 <_POSIX_Condition_variables_Wait_support+0x114> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; a00057f0: e5941000 ldr r1, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; a00057f4: e28a2018 add r2, sl, #24 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; a00057f8: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; a00057fc: e58a1014 str r1, [sl, #20] 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; a0005800: e3a00001 mov r0, #1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; a0005804: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; a0005808: 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; a000580c: e5832044 str r2, [r3, #68] ; 0x44 a0005810: e58a0048 str r0, [sl, #72] ; 0x48 _Thread_Executing->Wait.id = *cond; a0005814: e5831020 str r1, [r3, #32] _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); a0005818: e1a00002 mov r0, r2 a000581c: e1a01008 mov r1, r8 a0005820: e59f2024 ldr r2, [pc, #36] ; a000584c <_POSIX_Condition_variables_Wait_support+0x118> a0005824: eb000d70 bl a0008dec <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); a0005828: eb000c2a bl a00088d8 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; a000582c: e5953000 ldr r3, [r5] a0005830: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) a0005834: e3550074 cmp r5, #116 ; 0x74 a0005838: 13550000 cmpne r5, #0 a000583c: 0affffe5 beq a00057d8 <_POSIX_Condition_variables_Wait_support+0xa4> a0005840: eaffffd2 b a0005790 <_POSIX_Condition_variables_Wait_support+0x5c> <== NOT EXECUTED a0005844: a001d5ec .word 0xa001d5ec a0005848: a001d6a0 .word 0xa001d6a0 a000584c: a00091d8 .word 0xa00091d8 a000d320 <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000d320: e10f2000 mrs r2, CPSR a000d324: e3823080 orr r3, r2, #128 ; 0x80 a000d328: 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 ) { a000d32c: e3a0100c mov r1, #12 a000d330: e0030091 mul r3, r1, r0 a000d334: e59f105c ldr r1, [pc, #92] ; a000d398 <_POSIX_signals_Clear_process_signals+0x78> a000d338: e7911003 ldr r1, [r1, r3] a000d33c: e3510002 cmp r1, #2 a000d340: 0a00000c beq a000d378 <_POSIX_signals_Clear_process_signals+0x58> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; a000d344: e59f3050 ldr r3, [pc, #80] ; a000d39c <_POSIX_signals_Clear_process_signals+0x7c> a000d348: e3a0c001 mov ip, #1 a000d34c: e2400001 sub r0, r0, #1 a000d350: e5931000 ldr r1, [r3] a000d354: e1c1001c bic r0, r1, ip, lsl r0 if ( !_POSIX_signals_Pending ) a000d358: 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; a000d35c: e5830000 str r0, [r3] if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; a000d360: 059f3038 ldreq r3, [pc, #56] ; a000d3a0 <_POSIX_signals_Clear_process_signals+0x80> a000d364: 05931000 ldreq r1, [r3] a000d368: 02411001 subeq r1, r1, #1 a000d36c: 05831000 streq r1, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000d370: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } a000d374: 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 ] ) ) a000d378: e59f1024 ldr r1, [pc, #36] ; a000d3a4 <_POSIX_signals_Clear_process_signals+0x84> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a000d37c: e791c003 ldr ip, [r1, r3] a000d380: e0813003 add r3, r1, r3 a000d384: e2833004 add r3, r3, #4 a000d388: e15c0003 cmp ip, r3 a000d38c: 0affffec beq a000d344 <_POSIX_signals_Clear_process_signals+0x24> a000d390: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); } a000d394: e12fff1e bx lr <== NOT EXECUTED a000d398: a001aeb8 .word 0xa001aeb8 a000d39c: a001b084 .word 0xa001b084 a000d3a0: a001aa44 .word 0xa001aa44 a000d3a4: a001b088 .word 0xa001b088 a0006c0c <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; a0006c0c: 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 ) { a0006c10: e92d05f0 push {r4, r5, r6, r7, r8, sl} */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0006c14: e281503c add r5, r1, #60 ; 0x3c a0006c18: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; a0006c1c: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); a0006c20: e281c038 add ip, r1, #56 ; 0x38 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) a0006c24: e3130020 tst r3, #32 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; a0006c28: e1a04323 lsr r4, r3, #6 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; a0006c2c: e581503c str r5, [r1, #60] ; 0x3c a0006c30: e3a0500c mov r5, #12 the_chain->last = _Chain_Head(the_chain); a0006c34: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; a0006c38: e5906038 ldr r6, [r0, #56] ; 0x38 _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 ]; a0006c3c: e02c0495 mla ip, r5, r4, r0 a0006c40: 159fa17c ldrne sl, [pc, #380] ; a0006dc4 <_Thread_queue_Enqueue_priority+0x1b8> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) a0006c44: 1a00001c bne a0006cbc <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0006c48: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0006c4c: e10f8000 mrs r8, CPSR a0006c50: e3884080 orr r4, r8, #128 ; 0x80 a0006c54: 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; a0006c58: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a0006c5c: e154000a cmp r4, sl a0006c60: 1a000009 bne a0006c8c <_Thread_queue_Enqueue_priority+0x80> a0006c64: ea000053 b a0006db8 <_Thread_queue_Enqueue_priority+0x1ac> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0006c68: e10f7000 mrs r7, CPSR a0006c6c: e129f008 msr CPSR_fc, r8 a0006c70: 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) ) { a0006c74: e5947010 ldr r7, [r4, #16] a0006c78: e1160007 tst r6, r7 a0006c7c: 0a000034 beq a0006d54 <_Thread_queue_Enqueue_priority+0x148> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; a0006c80: 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 ) ) { a0006c84: e154000a cmp r4, sl a0006c88: 0a000002 beq a0006c98 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; a0006c8c: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) a0006c90: e1530005 cmp r3, r5 a0006c94: 8afffff3 bhi a0006c68 <_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 ) ) { a0006c98: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a0006c9c: e590c030 ldr ip, [r0, #48] ; 0x30 a0006ca0: e35c0001 cmp ip, #1 a0006ca4: 0a00002c beq a0006d5c <_Thread_queue_Enqueue_priority+0x150> * 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; a0006ca8: e5826000 str r6, [r2] return the_thread_queue->sync_state; a0006cac: e1a0000c mov r0, ip } a0006cb0: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} a0006cb4: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0006cb8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; a0006cbc: e5da5000 ldrb r5, [sl] a0006cc0: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0006cc4: e10f8000 mrs r8, CPSR a0006cc8: e3884080 orr r4, r8, #128 ; 0x80 a0006ccc: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; a0006cd0: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a0006cd4: e154000c cmp r4, ip a0006cd8: 1a000009 bne a0006d04 <_Thread_queue_Enqueue_priority+0xf8> a0006cdc: ea00000b b a0006d10 <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0006ce0: e10f7000 mrs r7, CPSR a0006ce4: e129f008 msr CPSR_fc, r8 a0006ce8: 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) ) { a0006cec: e5947010 ldr r7, [r4, #16] a0006cf0: e1160007 tst r6, r7 a0006cf4: 0affffef beq a0006cb8 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) a0006cf8: 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 ) ) { a0006cfc: e154000c cmp r4, ip a0006d00: 0a000002 beq a0006d10 <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; a0006d04: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) a0006d08: e1530005 cmp r3, r5 a0006d0c: 3afffff3 bcc a0006ce0 <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a0006d10: 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 ) ) { a0006d14: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a0006d18: e35c0001 cmp ip, #1 a0006d1c: 1affffe1 bne a0006ca8 <_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 ) a0006d20: 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; a0006d24: e3a03000 mov r3, #0 a0006d28: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0006d2c: 0a000017 beq a0006d90 <_Thread_queue_Enqueue_priority+0x184> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; a0006d30: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; a0006d34: e5814004 str r4, [r1, #4] search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0006d38: e5810044 str r0, [r1, #68] ; 0x44 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; a0006d3c: e5813000 str r3, [r1] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; a0006d40: e5831004 str r1, [r3, #4] 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; a0006d44: e5841000 str r1, [r4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0006d48: e129f008 msr CPSR_fc, r8 a0006d4c: e3a00001 mov r0, #1 next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0006d50: eaffffd6 b a0006cb0 <_Thread_queue_Enqueue_priority+0xa4> a0006d54: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED a0006d58: eaffffbb b a0006c4c <_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 ) a0006d5c: 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; a0006d60: e3a03000 mov r3, #0 a0006d64: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0006d68: 0a000008 beq a0006d90 <_Thread_queue_Enqueue_priority+0x184> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; a0006d6c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0006d70: e5814000 str r4, [r1] the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0006d74: e5810044 str r0, [r1, #68] ; 0x44 search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; a0006d78: e5813004 str r3, [r1, #4] previous_node->next = the_node; a0006d7c: e5831000 str r1, [r3] search_node->previous = the_node; a0006d80: e5841004 str r1, [r4, #4] a0006d84: e129f008 msr CPSR_fc, r8 a0006d88: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0006d8c: eaffffc7 b a0006cb0 <_Thread_queue_Enqueue_priority+0xa4> a0006d90: 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; a0006d94: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0006d98: e5814000 str r4, [r1] the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0006d9c: e5810044 str r0, [r1, #68] ; 0x44 search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; a0006da0: e5813004 str r3, [r1, #4] previous_node->next = the_node; a0006da4: e5831000 str r1, [r3] search_node->previous = the_node; a0006da8: e5841004 str r1, [r4, #4] a0006dac: e129f006 msr CPSR_fc, r6 a0006db0: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0006db4: eaffffbd b a0006cb0 <_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 ) ) { a0006db8: e1a06008 mov r6, r8 a0006dbc: e3e05000 mvn r5, #0 a0006dc0: eaffffb5 b a0006c9c <_Thread_queue_Enqueue_priority+0x90> a0006dc4: a0018ec0 .word 0xa0018ec0 a0015330 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a0015330: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0015334: e24dd024 sub sp, sp, #36 ; 0x24 a0015338: 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; a001533c: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0015340: e28d0018 add r0, sp, #24 a0015344: e28d700c add r7, sp, #12 a0015348: e59f91c8 ldr r9, [pc, #456] ; a0015518 <_Timer_server_Body+0x1e8> a001534c: e59fb1c8 ldr fp, [pc, #456] ; a001551c <_Timer_server_Body+0x1ec> a0015350: e280a004 add sl, r0, #4 a0015354: 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; a0015358: e58d301c str r3, [sp, #28] the_chain->last = _Chain_Head(the_chain); a001535c: 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; a0015360: e58d3010 str r3, [sp, #16] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0015364: 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 ); a0015368: e2843008 add r3, r4, #8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a001536c: e58d2000 str r2, [sp] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0015370: e58da018 str sl, [sp, #24] a0015374: e58d200c str r2, [sp, #12] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); a0015378: 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 ); a001537c: 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 ); a0015380: 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 ); a0015384: 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; a0015388: e28d2018 add r2, sp, #24 a001538c: 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; a0015390: e5993000 ldr r3, [r9] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; a0015394: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0015398: e1a00006 mov r0, r6 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; a001539c: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a00153a0: e0611003 rsb r1, r1, r3 a00153a4: e1a02007 mov r2, r7 a00153a8: eb001109 bl a00197d4 <_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(); a00153ac: e59b5000 ldr r5, [fp] Watchdog_Interval last_snapshot = watchdogs->last_snapshot; a00153b0: 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 ) { a00153b4: e1550001 cmp r5, r1 a00153b8: 8a000022 bhi a0015448 <_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 ) { a00153bc: 3a000018 bcc a0015424 <_Timer_server_Body+0xf4> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; a00153c0: 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 ); a00153c4: e5940078 ldr r0, [r4, #120] ; 0x78 a00153c8: eb00025d bl a0015d44 <_Chain_Get> if ( timer == NULL ) { a00153cc: e3500000 cmp r0, #0 a00153d0: 0a00000b beq a0015404 <_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 ) { a00153d4: e5903038 ldr r3, [r0, #56] ; 0x38 a00153d8: e3530001 cmp r3, #1 a00153dc: 0a000015 beq a0015438 <_Timer_server_Body+0x108> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a00153e0: e3530003 cmp r3, #3 a00153e4: 1afffff6 bne a00153c4 <_Timer_server_Body+0x94> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a00153e8: e2801010 add r1, r0, #16 a00153ec: e1a00008 mov r0, r8 a00153f0: eb001126 bl a0019890 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); a00153f4: e5940078 ldr r0, [r4, #120] ; 0x78 a00153f8: eb000251 bl a0015d44 <_Chain_Get> if ( timer == NULL ) { a00153fc: e3500000 cmp r0, #0 a0015400: 1afffff3 bne a00153d4 <_Timer_server_Body+0xa4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0015404: e10f2000 mrs r2, CPSR a0015408: e3823080 orr r3, r2, #128 ; 0x80 a001540c: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { a0015410: e59d3018 ldr r3, [sp, #24] a0015414: e15a0003 cmp sl, r3 a0015418: 0a00000f beq a001545c <_Timer_server_Body+0x12c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a001541c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED a0015420: eaffffda b a0015390 <_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 ); a0015424: e0652001 rsb r2, r5, r1 a0015428: e1a00008 mov r0, r8 a001542c: e3a01001 mov r1, #1 a0015430: eb0010b8 bl a0019718 <_Watchdog_Adjust> a0015434: eaffffe1 b a00153c0 <_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 ); a0015438: e2801010 add r1, r0, #16 a001543c: e1a00006 mov r0, r6 a0015440: eb001112 bl a0019890 <_Watchdog_Insert> a0015444: eaffffde b a00153c4 <_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 ); a0015448: e0611005 rsb r1, r1, r5 a001544c: e1a00008 mov r0, r8 a0015450: e1a02007 mov r2, r7 a0015454: eb0010de bl a00197d4 <_Watchdog_Adjust_to_chain> a0015458: eaffffd8 b a00153c0 <_Timer_server_Body+0x90> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; a001545c: e5840078 str r0, [r4, #120] ; 0x78 a0015460: 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 ) ) { a0015464: e59d300c ldr r3, [sp, #12] a0015468: e59d0000 ldr r0, [sp] a001546c: e1500003 cmp r0, r3 a0015470: 159d5000 ldrne r5, [sp] a0015474: 1a00000a bne a00154a4 <_Timer_server_Body+0x174> a0015478: ea000011 b a00154c4 <_Timer_server_Body+0x194> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; a001547c: 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; a0015480: e3a00000 mov r0, #0 a0015484: e5830008 str r0, [r3, #8] the_chain->first = new_first; a0015488: e58d200c str r2, [sp, #12] new_first->previous = _Chain_Head(the_chain); a001548c: e5827004 str r7, [r2, #4] a0015490: 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 ); a0015494: e5930020 ldr r0, [r3, #32] a0015498: e5931024 ldr r1, [r3, #36] ; 0x24 a001549c: e1a0e00f mov lr, pc a00154a0: e593f01c ldr pc, [r3, #28] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a00154a4: e10f1000 mrs r1, CPSR a00154a8: e3813080 orr r3, r1, #128 ; 0x80 a00154ac: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a00154b0: e59d300c ldr r3, [sp, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a00154b4: e1550003 cmp r5, r3 a00154b8: 1affffef bne a001547c <_Timer_server_Body+0x14c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00154bc: e129f001 msr CPSR_fc, r1 a00154c0: eaffffb0 b a0015388 <_Timer_server_Body+0x58> a00154c4: e59f0054 ldr r0, [pc, #84] ; a0015520 <_Timer_server_Body+0x1f0> } } else { ts->active = false; a00154c8: e3a02000 mov r2, #0 a00154cc: e5c4207c strb r2, [r4, #124] ; 0x7c a00154d0: e5903000 ldr r3, [r0] a00154d4: e2833001 add r3, r3, #1 a00154d8: e5803000 str r3, [r0] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); a00154dc: e3a01008 mov r1, #8 a00154e0: e5940000 ldr r0, [r4] a00154e4: eb000e0d bl a0018d20 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); a00154e8: e1a00004 mov r0, r4 a00154ec: ebffff63 bl a0015280 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); a00154f0: e1a00004 mov r0, r4 a00154f4: ebffff77 bl a00152d8 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); a00154f8: eb000b4a bl a0018228 <_Thread_Enable_dispatch> ts->active = true; a00154fc: e3a02001 mov r2, #1 a0015500: 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 ); a0015504: e59d0008 ldr r0, [sp, #8] a0015508: eb00114d bl a0019a44 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a001550c: e59d0004 ldr r0, [sp, #4] a0015510: eb00114b bl a0019a44 <_Watchdog_Remove> a0015514: eaffff9b b a0015388 <_Timer_server_Body+0x58> a0015518: a003bd24 .word 0xa003bd24 a001551c: a003bc54 .word 0xa003bc54 a0015520: a003bbcc .word 0xa003bbcc a00096cc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a00096cc: e92d41f0 push {r4, r5, r6, r7, r8, lr} a00096d0: e1a04000 mov r4, r0 a00096d4: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a00096d8: e10f3000 mrs r3, CPSR a00096dc: e3832080 orr r2, r3, #128 ; 0x80 a00096e0: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a00096e4: e1a07000 mov r7, r0 a00096e8: 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 ) ) { a00096ec: e1520007 cmp r2, r7 a00096f0: 0a000018 beq a0009758 <_Watchdog_Adjust+0x8c> switch ( direction ) { a00096f4: e3510000 cmp r1, #0 a00096f8: 1a000018 bne a0009760 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a00096fc: e3550000 cmp r5, #0 a0009700: 0a000014 beq a0009758 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a0009704: e5926010 ldr r6, [r2, #16] a0009708: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000970c: 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 ) { a0009710: 2a000005 bcs a000972c <_Watchdog_Adjust+0x60> a0009714: ea000018 b a000977c <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a0009718: e0555006 subs r5, r5, r6 a000971c: 0a00000d beq a0009758 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a0009720: e5926010 ldr r6, [r2, #16] a0009724: e1560005 cmp r6, r5 a0009728: 8a000013 bhi a000977c <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000972c: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0009730: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a0009734: e1a00004 mov r0, r4 a0009738: eb0000aa bl a00099e8 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000973c: e10f3000 mrs r3, CPSR a0009740: e3832080 orr r2, r3, #128 ; 0x80 a0009744: e129f002 msr CPSR_fc, r2 a0009748: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a000974c: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); a0009750: e1a02001 mov r2, r1 a0009754: 1affffef bne a0009718 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0009758: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a000975c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a0009760: e3510001 cmp r1, #1 a0009764: 1afffffb bne a0009758 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a0009768: e5921010 ldr r1, [r2, #16] a000976c: e0815005 add r5, r1, r5 a0009770: e5825010 str r5, [r2, #16] a0009774: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a0009778: 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; a000977c: e0655006 rsb r5, r5, r6 a0009780: e5825010 str r5, [r2, #16] break; a0009784: eafffff3 b a0009758 <_Watchdog_Adjust+0x8c> a000d040 : int killinfo( pid_t pid, int sig, const union sigval *value ) { a000d040: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000d044: e24dd00c sub sp, sp, #12 a000d048: e1a04000 mov r4, r0 a000d04c: e1a05001 mov r5, r1 a000d050: e1a07002 mov r7, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) a000d054: ebfffbe9 bl a000c000 a000d058: e1500004 cmp r0, r4 a000d05c: 1a000097 bne a000d2c0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) a000d060: e3550000 cmp r5, #0 a000d064: 0a00009a beq a000d2d4 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); a000d068: e2453001 sub r3, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) a000d06c: e353001f cmp r3, #31 a000d070: 8a000097 bhi a000d2d4 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 ) a000d074: e59f6284 ldr r6, [pc, #644] ; a000d300 a000d078: e3a0100c mov r1, #12 a000d07c: e0226591 mla r2, r1, r5, r6 a000d080: e5922008 ldr r2, [r2, #8] a000d084: e3520001 cmp r2, #1 a000d088: 0a00003a beq a000d178 /* * 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 ) ) a000d08c: e3550008 cmp r5, #8 a000d090: 13550004 cmpne r5, #4 a000d094: 0a00003a beq a000d184 a000d098: e355000b cmp r5, #11 a000d09c: 0a000038 beq a000d184 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); a000d0a0: e3a04001 mov r4, #1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { a000d0a4: e3570000 cmp r7, #0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; a000d0a8: e58d4004 str r4, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; a000d0ac: e58d5000 str r5, [sp] a000d0b0: e1a04314 lsl r4, r4, r3 siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; a000d0b4: 15973000 ldrne r3, [r7] */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; a000d0b8: 058d7008 streq r7, [sp, #8] } else { siginfo->si_value = *value; a000d0bc: 158d3008 strne r3, [sp, #8] a000d0c0: e59f323c ldr r3, [pc, #572] ; a000d304 a000d0c4: e5932000 ldr r2, [r3] a000d0c8: e2822001 add r2, r2, #1 a000d0cc: 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; a000d0d0: e59f3230 ldr r3, [pc, #560] ; a000d308 a000d0d4: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; a000d0d8: e5903108 ldr r3, [r0, #264] ; 0x108 a000d0dc: e59330cc ldr r3, [r3, #204] ; 0xcc a000d0e0: e1d43003 bics r3, r4, r3 a000d0e4: 1a000014 bne a000d13c /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; a000d0e8: e59fc21c ldr ip, [pc, #540] ; a000d30c a000d0ec: e49c3004 ldr r3, [ip], #4 a000d0f0: e153000c cmp r3, ip a000d0f4: 0a00003a beq a000d1e4 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a000d0f8: 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; a000d0fc: e1a00003 mov r0, r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; a000d100: e5931108 ldr r1, [r3, #264] ; 0x108 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a000d104: e1140002 tst r4, r2 a000d108: 0a000008 beq a000d130 a000d10c: ea00000a b a000d13c 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 ) { a000d110: 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 ; a000d114: e153000c cmp r3, ip a000d118: 0a000031 beq a000d1e4 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a000d11c: 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 ]; a000d120: e5931108 ldr r1, [r3, #264] ; 0x108 <== 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; a000d124: e1a00003 mov r0, r3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a000d128: e1140002 tst r4, r2 <== NOT EXECUTED a000d12c: 1a000002 bne a000d13c <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) a000d130: e59120cc ldr r2, [r1, #204] ; 0xcc a000d134: e1d42002 bics r2, r4, r2 a000d138: 0afffff4 beq a000d110 * 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; a000d13c: e3a03001 mov r3, #1 a000d140: 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 ) ) { a000d144: e1a01005 mov r1, r5 a000d148: e1a0200d mov r2, sp a000d14c: eb0000a7 bl a000d3f0 <_POSIX_signals_Unblock_thread> a000d150: e3500000 cmp r0, #0 a000d154: 1a00001f bne a000d1d8 /* * 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 ); a000d158: e1a00004 mov r0, r4 a000d15c: eb000091 bl a000d3a8 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { a000d160: e3a0300c mov r3, #12 a000d164: e0040593 mul r4, r3, r5 a000d168: e7963004 ldr r3, [r6, r4] a000d16c: e3530002 cmp r3, #2 a000d170: 0a000007 beq a000d194 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); a000d174: ebffe534 bl a000664c <_Thread_Enable_dispatch> a000d178: e3a00000 mov r0, #0 return 0; } a000d17c: e28dd00c add sp, sp, #12 a000d180: 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 ); a000d184: eb000128 bl a000d62c a000d188: e1a01005 mov r1, r5 a000d18c: eb0000e8 bl a000d534 a000d190: eafffff9 b a000d17c */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) a000d194: e59f0174 ldr r0, [pc, #372] ; a000d310 a000d198: ebfff4c3 bl a000a4ac <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { a000d19c: e2503000 subs r3, r0, #0 a000d1a0: 0a000050 beq a000d2e8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; a000d1a4: e59d1000 ldr r1, [sp] a000d1a8: e28d2004 add r2, sp, #4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); a000d1ac: e59f0160 ldr r0, [pc, #352] ; a000d314 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; a000d1b0: e5831008 str r1, [r3, #8] a000d1b4: e492c004 ldr ip, [r2], #4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); a000d1b8: e0800004 add r0, r0, r4 a000d1bc: e1a01003 mov r1, r3 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; a000d1c0: e583c00c str ip, [r3, #12] a000d1c4: e5922000 ldr r2, [r2] a000d1c8: e5832010 str r2, [r3, #16] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); a000d1cc: ebffdf79 bl a0004fb8 <_Chain_Append> } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); a000d1d0: ebffe51d bl a000664c <_Thread_Enable_dispatch> a000d1d4: eaffffe7 b a000d178 /* * 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(); a000d1d8: ebffe51b bl a000664c <_Thread_Enable_dispatch> a000d1dc: e3a00000 mov r0, #0 return 0; a000d1e0: eaffffe5 b a000d17c * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; a000d1e4: e59f312c ldr r3, [pc, #300] ; a000d318 a000d1e8: e59fa12c ldr sl, [pc, #300] ; a000d31c */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( a000d1ec: e3a00000 mov r0, #0 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; a000d1f0: e5d3c000 ldrb ip, [r3] */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( a000d1f4: e28a900c add r9, sl, #12 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; a000d1f8: 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 ] ) a000d1fc: e59a3008 ldr r3, [sl, #8] a000d200: e3530000 cmp r3, #0 a000d204: 0a000020 beq a000d28c continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; a000d208: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; a000d20c: e1d3e1b0 ldrh lr, [r3, #16] object_table = the_info->local_table; a000d210: e593701c ldr r7, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { a000d214: e35e0000 cmp lr, #0 a000d218: 0a00001b beq a000d28c a000d21c: e3a03001 mov r3, #1 the_thread = (Thread_Control *) object_table[ index ]; a000d220: e7972103 ldr r2, [r7, r3, lsl #2] #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { a000d224: e2833001 add r3, r3, #1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) a000d228: e3520000 cmp r2, #0 a000d22c: 0a000014 beq a000d284 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) a000d230: e5921014 ldr r1, [r2, #20] a000d234: e151000c cmp r1, ip a000d238: 8a000011 bhi a000d284 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; a000d23c: e5928108 ldr r8, [r2, #264] ; 0x108 a000d240: e59880cc ldr r8, [r8, #204] ; 0xcc a000d244: e1d48008 bics r8, r4, r8 a000d248: 0a00000d beq a000d284 * * 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 ) { a000d24c: e151000c cmp r1, ip a000d250: 3a000009 bcc a000d27c * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { a000d254: e5908010 ldr r8, [r0, #16] a000d258: e3580000 cmp r8, #0 a000d25c: 0a000008 beq a000d284 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { a000d260: e592b010 ldr fp, [r2, #16] a000d264: e35b0000 cmp fp, #0 a000d268: 0a000003 beq a000d27c continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { a000d26c: e3180201 tst r8, #268435456 ; 0x10000000 a000d270: 1a000003 bne a000d284 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { a000d274: e31b0201 tst fp, #268435456 ; 0x10000000 a000d278: 0a000001 beq a000d284 a000d27c: e1a0c001 mov ip, r1 a000d280: e1a00002 mov r0, r2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { a000d284: e15e0003 cmp lr, r3 a000d288: 2affffe4 bcs a000d220 a000d28c: e28aa004 add sl, sl, #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++) { a000d290: e15a0009 cmp sl, r9 a000d294: 1affffd8 bne a000d1fc } } } } if ( interested ) { a000d298: e3500000 cmp r0, #0 a000d29c: 0affffad beq a000d158 * 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; a000d2a0: e3a03001 mov r3, #1 a000d2a4: 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 ) ) { a000d2a8: e1a01005 mov r1, r5 a000d2ac: e1a0200d mov r2, sp a000d2b0: eb00004e bl a000d3f0 <_POSIX_signals_Unblock_thread> a000d2b4: e3500000 cmp r0, #0 a000d2b8: 0affffa6 beq a000d158 a000d2bc: eaffffc5 b a000d1d8 <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); a000d2c0: eb000108 bl a000d6e8 <__errno> a000d2c4: e3a03003 mov r3, #3 a000d2c8: e5803000 str r3, [r0] a000d2cc: e3e00000 mvn r0, #0 a000d2d0: eaffffa9 b a000d17c */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); a000d2d4: eb000103 bl a000d6e8 <__errno> a000d2d8: e3a03016 mov r3, #22 a000d2dc: e5803000 str r3, [r0] a000d2e0: e3e00000 mvn r0, #0 a000d2e4: eaffffa4 b a000d17c 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(); a000d2e8: ebffe4d7 bl a000664c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); a000d2ec: eb0000fd bl a000d6e8 <__errno> a000d2f0: e3a0300b mov r3, #11 a000d2f4: e5803000 str r3, [r0] a000d2f8: e3e00000 mvn r0, #0 a000d2fc: eaffff9e b a000d17c a000d300: a001aeb8 .word 0xa001aeb8 a000d304: a001a9ac .word 0xa001a9ac a000d308: a001aa60 .word 0xa001aa60 a000d30c: a001b044 .word 0xa001b044 a000d310: a001b038 .word 0xa001b038 a000d314: a001b088 .word 0xa001b088 a000d318: a0018ec0 .word 0xa0018ec0 a000d31c: a001a968 .word 0xa001a968 a000594c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a000594c: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0005950: e2505000 subs r5, r0, #0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a0005954: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0005958: 0a00001d beq a00059d4 * * 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 ); a000595c: e1a00001 mov r0, r1 a0005960: e28d1004 add r1, sp, #4 a0005964: eb0019d7 bl a000c0c8 <_POSIX_Absolute_timeout_to_ticks> a0005968: e5951000 ldr r1, [r5] a000596c: e1a04000 mov r4, r0 a0005970: e28d2008 add r2, sp, #8 a0005974: e59f0090 ldr r0, [pc, #144] ; a0005a0c a0005978: eb000a74 bl a0008350 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { a000597c: e59dc008 ldr ip, [sp, #8] a0005980: e35c0000 cmp ip, #0 a0005984: 1a000012 bne a00059d4 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( a0005988: 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, a000598c: e3540003 cmp r4, #3 a0005990: 13a05000 movne r5, #0 a0005994: 03a05001 moveq r5, #1 a0005998: e2800010 add r0, r0, #16 a000599c: e59d3004 ldr r3, [sp, #4] a00059a0: e1a02005 mov r2, r5 a00059a4: e58dc000 str ip, [sp] a00059a8: eb000715 bl a0007604 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); a00059ac: eb000c87 bl a0008bd0 <_Thread_Enable_dispatch> if ( !do_wait ) { a00059b0: e3550000 cmp r5, #0 a00059b4: 1a00000f bne a00059f8 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { a00059b8: e59f3050 ldr r3, [pc, #80] ; a0005a10 a00059bc: e5933000 ldr r3, [r3] a00059c0: e5930034 ldr r0, [r3, #52] ; 0x34 a00059c4: e3500002 cmp r0, #2 a00059c8: 0a000004 beq a00059e0 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( a00059cc: eb000042 bl a0005adc <_POSIX_RWLock_Translate_core_RWLock_return_code> a00059d0: ea000000 b a00059d8 a00059d4: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } a00059d8: e28dd00c add sp, sp, #12 a00059dc: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { a00059e0: e3540000 cmp r4, #0 a00059e4: 0afffffa beq a00059d4 a00059e8: e3540002 cmp r4, #2 a00059ec: 93a00074 movls r0, #116 ; 0x74 a00059f0: 9afffff8 bls a00059d8 a00059f4: eafffff4 b a00059cc <== NOT EXECUTED a00059f8: e59f3010 ldr r3, [pc, #16] ; a0005a10 a00059fc: e5933000 ldr r3, [r3] a0005a00: e5930034 ldr r0, [r3, #52] ; 0x34 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0005a04: eb000034 bl a0005adc <_POSIX_RWLock_Translate_core_RWLock_return_code> a0005a08: eafffff2 b a00059d8 a0005a0c: a001dd54 .word 0xa001dd54 a0005a10: a001dc40 .word 0xa001dc40 a0005a14 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a0005a14: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0005a18: e2505000 subs r5, r0, #0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a0005a1c: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0005a20: 0a00001d beq a0005a9c * * 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 ); a0005a24: e1a00001 mov r0, r1 a0005a28: e28d1004 add r1, sp, #4 a0005a2c: eb0019a5 bl a000c0c8 <_POSIX_Absolute_timeout_to_ticks> a0005a30: e5951000 ldr r1, [r5] a0005a34: e1a04000 mov r4, r0 a0005a38: e28d2008 add r2, sp, #8 a0005a3c: e59f0090 ldr r0, [pc, #144] ; a0005ad4 a0005a40: eb000a42 bl a0008350 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { a0005a44: e59dc008 ldr ip, [sp, #8] a0005a48: e35c0000 cmp ip, #0 a0005a4c: 1a000012 bne a0005a9c case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( a0005a50: 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, a0005a54: e3540003 cmp r4, #3 a0005a58: 13a05000 movne r5, #0 a0005a5c: 03a05001 moveq r5, #1 a0005a60: e2800010 add r0, r0, #16 a0005a64: e59d3004 ldr r3, [sp, #4] a0005a68: e1a02005 mov r2, r5 a0005a6c: e58dc000 str ip, [sp] a0005a70: eb00071a bl a00076e0 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); a0005a74: eb000c55 bl a0008bd0 <_Thread_Enable_dispatch> if ( !do_wait && a0005a78: e3550000 cmp r5, #0 a0005a7c: 1a00000f bne a0005ac0 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { a0005a80: e59f3050 ldr r3, [pc, #80] ; a0005ad8 a0005a84: e5933000 ldr r3, [r3] a0005a88: e5930034 ldr r0, [r3, #52] ; 0x34 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && a0005a8c: e3500002 cmp r0, #2 a0005a90: 0a000004 beq a0005aa8 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0005a94: eb000010 bl a0005adc <_POSIX_RWLock_Translate_core_RWLock_return_code> a0005a98: ea000000 b a0005aa0 a0005a9c: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } a0005aa0: e28dd00c add sp, sp, #12 a0005aa4: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { a0005aa8: e3540000 cmp r4, #0 a0005aac: 0afffffa beq a0005a9c a0005ab0: e3540002 cmp r4, #2 a0005ab4: 93a00074 movls r0, #116 ; 0x74 a0005ab8: 9afffff8 bls a0005aa0 a0005abc: eafffff4 b a0005a94 <== NOT EXECUTED a0005ac0: e59f3010 ldr r3, [pc, #16] ; a0005ad8 a0005ac4: e5933000 ldr r3, [r3] a0005ac8: e5930034 ldr r0, [r3, #52] ; 0x34 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0005acc: eb000002 bl a0005adc <_POSIX_RWLock_Translate_core_RWLock_return_code> a0005ad0: eafffff2 b a0005aa0 a0005ad4: a001dd54 .word 0xa001dd54 a0005ad8: a001dc40 .word 0xa001dc40 a0004c38 : * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) a0004c38: e59f3060 ldr r3, [pc, #96] ; a0004ca0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { a0004c3c: e92d4010 push {r4, lr} * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) a0004c40: e5933000 ldr r3, [r3] a0004c44: e3530000 cmp r3, #0 a0004c48: 1a000011 bne a0004c94 a0004c4c: e59f3050 ldr r3, [pc, #80] ; a0004ca4 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; a0004c50: e59f4050 ldr r4, [pc, #80] ; a0004ca8 a0004c54: e5931000 ldr r1, [r3] a0004c58: e5942000 ldr r2, [r4] a0004c5c: e2811001 add r1, r1, #1 a0004c60: e5831000 str r1, [r3] a0004c64: e5923108 ldr r3, [r2, #264] ; 0x108 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && a0004c68: e59320d4 ldr r2, [r3, #212] ; 0xd4 a0004c6c: e3520000 cmp r2, #0 a0004c70: 1a000008 bne a0004c98 thread_support->cancelation_requested ) a0004c74: e59330dc ldr r3, [r3, #220] ; 0xdc a0004c78: e3530000 cmp r3, #0 a0004c7c: 0a000005 beq a0004c98 cancel = true; _Thread_Enable_dispatch(); a0004c80: eb000967 bl a0007224 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); a0004c84: e5940000 ldr r0, [r4] a0004c88: e3e01000 mvn r1, #0 } a0004c8c: e8bd4010 pop {r4, lr} thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); a0004c90: ea001745 b a000a9ac <_POSIX_Thread_Exit> a0004c94: e8bd8010 pop {r4, pc} <== NOT EXECUTED } a0004c98: e8bd4010 pop {r4, lr} _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); a0004c9c: ea000960 b a0007224 <_Thread_Enable_dispatch> a0004ca0: a001c77c .word 0xa001c77c a0004ca4: a001c6ec .word 0xa001c6ec a0004ca8: a001c7a0 .word 0xa001c7a0 a0006958 : 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 ) { a0006958: e92d4010 push {r4, lr} a000695c: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) a0006960: e59f0148 ldr r0, [pc, #328] ; a0006ab0 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; a0006964: e59f3148 ldr r3, [pc, #328] ; a0006ab4 if ( rtems_interrupt_is_in_progress() ) a0006968: e5900000 ldr r0, [r0] a000696c: e3500000 cmp r0, #0 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; a0006970: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) a0006974: 1a000032 bne a0006a44 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) a0006978: e3520000 cmp r2, #0 a000697c: 0a000040 beq a0006a84 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) a0006980: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; a0006984: e5820000 str r0, [r2] if ( driver_table == NULL ) a0006988: 0a00003d beq a0006a84 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a000698c: e591c000 ldr ip, [r1] a0006990: e35c0000 cmp ip, #0 a0006994: 0a000037 beq a0006a78 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) a0006998: e1500004 cmp r0, r4 a000699c: 9a000026 bls a0006a3c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a00069a0: e59f0110 ldr r0, [pc, #272] ; a0006ab8 a00069a4: e590c000 ldr ip, [r0] a00069a8: e28cc001 add ip, ip, #1 a00069ac: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { a00069b0: e3540000 cmp r4, #0 a00069b4: 1a000024 bne a0006a4c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; a00069b8: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { a00069bc: e35c0000 cmp ip, #0 a00069c0: 0a000031 beq a0006a8c a00069c4: e59f30f0 ldr r3, [pc, #240] ; a0006abc a00069c8: e593e000 ldr lr, [r3] a00069cc: e1a0300e mov r3, lr a00069d0: ea000003 b a00069e4 a00069d4: e2844001 add r4, r4, #1 a00069d8: e15c0004 cmp ip, r4 a00069dc: e2833018 add r3, r3, #24 a00069e0: 9a000005 bls a00069fc static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a00069e4: e5930000 ldr r0, [r3] a00069e8: e3500000 cmp r0, #0 a00069ec: 1afffff8 bne a00069d4 a00069f0: e5930004 ldr r0, [r3, #4] a00069f4: e3500000 cmp r0, #0 a00069f8: 1afffff5 bne a00069d4 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) a00069fc: e15c0004 cmp ip, r4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a0006a00: e5824000 str r4, [r2] if ( m != n ) a0006a04: 0a000021 beq a0006a90 a0006a08: e3a03018 mov r3, #24 a0006a0c: e02ce493 mla ip, r3, r4, lr } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; a0006a10: e1a0e001 mov lr, r1 a0006a14: e8be000f ldm lr!, {r0, r1, r2, r3} a0006a18: e8ac000f stmia ip!, {r0, r1, r2, r3} a0006a1c: e89e0003 ldm lr, {r0, r1} a0006a20: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); a0006a24: eb0006ae bl a00084e4 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); a0006a28: e3a01000 mov r1, #0 a0006a2c: e1a00004 mov r0, r4 a0006a30: e1a02001 mov r2, r1 } a0006a34: e8bd4010 pop {r4, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); a0006a38: ea0023e5 b a000f9d4 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) a0006a3c: e3a0000a mov r0, #10 a0006a40: e8bd8010 pop {r4, pc} rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) a0006a44: e3a00012 mov r0, #18 a0006a48: e8bd8010 pop {r4, pc} _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; a0006a4c: e3a00018 mov r0, #24 a0006a50: e0030490 mul r3, r0, r4 a0006a54: e59f0060 ldr r0, [pc, #96] ; a0006abc a0006a58: e590c000 ldr ip, [r0] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006a5c: e79c0003 ldr r0, [ip, r3] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; a0006a60: e08cc003 add ip, ip, r3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006a64: e3500000 cmp r0, #0 a0006a68: 0a00000b beq a0006a9c 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(); a0006a6c: eb00069c bl a00084e4 <_Thread_Enable_dispatch> a0006a70: e3a0000c mov r0, #12 return RTEMS_RESOURCE_IN_USE; a0006a74: 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; a0006a78: e591c004 ldr ip, [r1, #4] a0006a7c: e35c0000 cmp ip, #0 a0006a80: 1affffc4 bne a0006998 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); a0006a84: e3a00009 mov r0, #9 } a0006a88: e8bd8010 pop {r4, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a0006a8c: 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(); a0006a90: eb000693 bl a00084e4 <_Thread_Enable_dispatch> a0006a94: e3a00005 mov r0, #5 return sc; a0006a98: 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; a0006a9c: e59c3004 ldr r3, [ip, #4] a0006aa0: e3530000 cmp r3, #0 a0006aa4: 1afffff0 bne a0006a6c if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; a0006aa8: e5824000 str r4, [r2] a0006aac: eaffffd7 b a0006a10 a0006ab0: a00209dc .word 0xa00209dc a0006ab4: a0021248 .word 0xa0021248 a0006ab8: a002094c .word 0xa002094c a0006abc: a002124c .word 0xa002124c a0005054 : int sched_get_priority_min( int policy ) { switch ( policy ) { a0005054: e3500004 cmp r0, #4 #include int sched_get_priority_min( int policy ) { a0005058: e52de004 push {lr} ; (str lr, [sp, #-4]!) switch ( policy ) { a000505c: 9a000004 bls a0005074 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); a0005060: eb002550 bl a000e5a8 <__errno> a0005064: e3a03016 mov r3, #22 a0005068: e5803000 str r3, [r0] a000506c: e3e00000 mvn r0, #0 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } a0005070: e49df004 pop {pc} ; (ldr pc, [sp], #4) int sched_get_priority_min( int policy ) { switch ( policy ) { a0005074: e3a03001 mov r3, #1 a0005078: e1a00013 lsl r0, r3, r0 a000507c: e3100017 tst r0, #23 a0005080: 11a00003 movne r0, r3 a0005084: 149df004 popne {pc} ; (ldrne pc, [sp], #4) case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); a0005088: eb002546 bl a000e5a8 <__errno> <== NOT EXECUTED a000508c: e3a03016 mov r3, #22 <== NOT EXECUTED a0005090: e5803000 str r3, [r0] <== NOT EXECUTED a0005094: e3e00000 mvn r0, #0 <== NOT EXECUTED } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } a0005098: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED a00075c8 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { a00075c8: e92d4010 push {r4, lr} a00075cc: e24dd004 sub sp, sp, #4 a00075d0: 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 ); a00075d4: e1a00001 mov r0, r1 a00075d8: e1a0100d mov r1, sp a00075dc: eb001643 bl a000cef0 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) a00075e0: e3500003 cmp r0, #3 a00075e4: 0a000005 beq a0007600 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); a00075e8: e1a00004 mov r0, r4 <== NOT EXECUTED a00075ec: e3a01000 mov r1, #0 <== NOT EXECUTED a00075f0: e59d2000 ldr r2, [sp] <== NOT EXECUTED a00075f4: eb0018ff bl a000d9f8 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } a00075f8: e28dd004 add sp, sp, #4 a00075fc: 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 ); a0007600: e1a00004 mov r0, r4 a0007604: e3a01001 mov r1, #1 a0007608: e59d2000 ldr r2, [sp] a000760c: eb0018f9 bl a000d9f8 <_POSIX_Semaphore_Wait_support> a0007610: eafffff8 b a00075f8 a0004f58 : struct sigaction *oact ) { ISR_Level level; if ( oact ) a0004f58: e3520000 cmp r2, #0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { a0004f5c: e92d4070 push {r4, r5, r6, lr} a0004f60: e1a04000 mov r4, r0 a0004f64: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) a0004f68: 0a00000a beq a0004f98 *oact = _POSIX_signals_Vectors[ sig ]; a0004f6c: e3a0300c mov r3, #12 a0004f70: e0010093 mul r1, r3, r0 a0004f74: e59f00e8 ldr r0, [pc, #232] ; a0005064 a0004f78: e1a03002 mov r3, r2 a0004f7c: e790c001 ldr ip, [r0, r1] a0004f80: e0801001 add r1, r0, r1 a0004f84: e483c004 str ip, [r3], #4 a0004f88: e5910004 ldr r0, [r1, #4] a0004f8c: e5820004 str r0, [r2, #4] a0004f90: e5912008 ldr r2, [r1, #8] a0004f94: e5832004 str r2, [r3, #4] if ( !sig ) a0004f98: e3540000 cmp r4, #0 a0004f9c: 0a00002b beq a0005050 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) a0004fa0: e2443001 sub r3, r4, #1 a0004fa4: e353001f cmp r3, #31 a0004fa8: 8a000028 bhi a0005050 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) a0004fac: e3540009 cmp r4, #9 a0004fb0: 0a000026 beq a0005050 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { a0004fb4: e3550000 cmp r5, #0 a0004fb8: 0a000022 beq a0005048 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0004fbc: e10f6000 mrs r6, CPSR a0004fc0: e3863080 orr r3, r6, #128 ; 0x80 a0004fc4: e129f003 msr CPSR_fc, r3 * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { a0004fc8: e5953008 ldr r3, [r5, #8] a0004fcc: e3530000 cmp r3, #0 a0004fd0: 0a00000f beq a0005014 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); a0004fd4: e1a00004 mov r0, r4 a0004fd8: eb00172a bl a000ac88 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; a0004fdc: e1a03005 mov r3, r5 a0004fe0: e3a0100c mov r1, #12 a0004fe4: e4930004 ldr r0, [r3], #4 a0004fe8: e0020491 mul r2, r1, r4 a0004fec: e59f1070 ldr r1, [pc, #112] ; a0005064 a0004ff0: e7810002 str r0, [r1, r2] a0004ff4: e5950004 ldr r0, [r5, #4] a0004ff8: e0812002 add r2, r1, r2 a0004ffc: e5820004 str r0, [r2, #4] a0005000: e5933004 ldr r3, [r3, #4] a0005004: e5823008 str r3, [r2, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0005008: e129f006 msr CPSR_fc, r6 a000500c: e3a00000 mov r0, #0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } a0005010: e8bd8070 pop {r4, r5, r6, pc} * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; a0005014: e3a0200c mov r2, #12 a0005018: e0030492 mul r3, r2, r4 a000501c: e59f0044 ldr r0, [pc, #68] ; a0005068 a0005020: e59f103c ldr r1, [pc, #60] ; a0005064 a0005024: e0802003 add r2, r0, r3 a0005028: e7904003 ldr r4, [r0, r3] a000502c: e9921001 ldmib r2, {r0, ip} a0005030: e0812003 add r2, r1, r3 a0005034: e7814003 str r4, [r1, r3] a0005038: e9821001 stmib r2, {r0, ip} a000503c: e129f006 msr CPSR_fc, r6 a0005040: e3a00000 mov r0, #0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } a0005044: e8bd8070 pop {r4, r5, r6, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { a0005048: e1a00005 mov r0, r5 <== NOT EXECUTED a000504c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); a0005050: eb0025d7 bl a000e7b4 <__errno> a0005054: e3a03016 mov r3, #22 a0005058: e5803000 str r3, [r0] a000505c: e3e00000 mvn r0, #0 a0005060: e8bd8070 pop {r4, r5, r6, pc} a0005064: a001d3b8 .word 0xa001d3b8 a0005068: a001bbd8 .word 0xa001bbd8