=============================================================================== a00169dc <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a00169dc: 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 ) { a00169e0: 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 ) { a00169e4: 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 ) { a00169e8: e1a07000 mov r7, r0 a00169ec: e1a05002 mov r5, r2 a00169f0: e1a08001 mov r8, r1 a00169f4: 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 ) { a00169f8: 3a000013 bcc a0016a4c <_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 ) { a00169fc: e5906048 ldr r6, [r0, #72] ; 0x48 a0016a00: e3560000 cmp r6, #0 a0016a04: 0a000009 beq a0016a30 <_CORE_message_queue_Broadcast+0x54> *count = 0; a0016a08: e3a00000 mov r0, #0 a0016a0c: e58a0000 str r0, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0016a10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a0016a14: e594002c ldr r0, [r4, #44] ; 0x2c a0016a18: e1a01008 mov r1, r8 a0016a1c: e1a02005 mov r2, r5 a0016a20: eb00206b bl a001ebd4 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0016a24: 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; a0016a28: e2866001 add r6, r6, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0016a2c: 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 = a0016a30: e1a00007 mov r0, r7 a0016a34: eb000ac9 bl a0019560 <_Thread_queue_Dequeue> a0016a38: e2504000 subs r4, r0, #0 a0016a3c: 1afffff4 bne a0016a14 <_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; a0016a40: e58a6000 str r6, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0016a44: e1a00004 mov r0, r4 a0016a48: 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 ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; a0016a4c: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a0016a50: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000aaf8 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a000aaf8: e59f2160 ldr r2, [pc, #352] ; a000ac60 <_CORE_mutex_Seize_interrupt_trylock+0x168> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a000aafc: e590c050 ldr ip, [r0, #80] ; 0x50 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { a000ab00: e1a03000 mov r3, r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a000ab04: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a000ab08: e3a00000 mov r0, #0 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a000ab0c: e15c0000 cmp ip, r0 a000ab10: e92d40f0 push {r4, r5, r6, r7, lr} Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a000ab14: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a000ab18: 0a00000e beq a000ab58 <_CORE_mutex_Seize_interrupt_trylock+0x60> return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } a000ab1c: e593c048 ldr ip, [r3, #72] ; 0x48 the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; a000ab20: e5925008 ldr r5, [r2, #8] the_mutex->nest_count = 1; a000ab24: e3a04001 mov r4, #1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a000ab28: e35c0002 cmp ip, #2 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; a000ab2c: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; a000ab30: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; a000ab34: e5835060 str r5, [r3, #96] ; 0x60 the_mutex->nest_count = 1; a000ab38: e5834054 str r4, [r3, #84] ; 0x54 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a000ab3c: 0a00000a beq a000ab6c <_CORE_mutex_Seize_interrupt_trylock+0x74> a000ab40: e35c0003 cmp ip, #3 a000ab44: 0a000019 beq a000abb0 <_CORE_mutex_Seize_interrupt_trylock+0xb8> a000ab48: e5913000 ldr r3, [r1] a000ab4c: e129f003 msr CPSR_fc, r3 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); return 0; a000ab50: e3a00000 mov r0, #0 a000ab54: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { a000ab58: e593005c ldr r0, [r3, #92] ; 0x5c a000ab5c: e1520000 cmp r2, r0 a000ab60: 0a000008 beq a000ab88 <_CORE_mutex_Seize_interrupt_trylock+0x90> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; a000ab64: e3a00001 mov r0, #1 a000ab68: e8bd80f0 pop {r4, r5, r6, r7, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a000ab6c: e592301c ldr r3, [r2, #28] a000ab70: e2833001 add r3, r3, #1 a000ab74: e582301c str r3, [r2, #28] a000ab78: e5913000 ldr r3, [r1] a000ab7c: e129f003 msr CPSR_fc, r3 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); return 0; a000ab80: e3a00000 mov r0, #0 a000ab84: e8bd80f0 pop {r4, r5, r6, r7, pc} * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { a000ab88: e5930040 ldr r0, [r3, #64] ; 0x40 a000ab8c: e3500000 cmp r0, #0 a000ab90: 1a000017 bne a000abf4 <_CORE_mutex_Seize_interrupt_trylock+0xfc> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; a000ab94: e5932054 ldr r2, [r3, #84] ; 0x54 a000ab98: e2822001 add r2, r2, #1 a000ab9c: e5832054 str r2, [r3, #84] ; 0x54 a000aba0: e5913000 ldr r3, [r1] a000aba4: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; a000aba8: e3a00000 mov r0, #0 a000abac: e8bd80f0 pop {r4, r5, r6, r7, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a000abb0: e592c01c ldr ip, [r2, #28] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; a000abb4: e593604c ldr r6, [r3, #76] ; 0x4c current = executing->current_priority; a000abb8: e5925014 ldr r5, [r2, #20] _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a000abbc: e08c7004 add r7, ip, r4 a000abc0: e582701c str r7, [r2, #28] Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { a000abc4: e1560005 cmp r6, r5 a000abc8: 0a000020 beq a000ac50 <_CORE_mutex_Seize_interrupt_trylock+0x158> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { a000abcc: 3a000012 bcc a000ac1c <_CORE_mutex_Seize_interrupt_trylock+0x124> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a000abd0: e3a05006 mov r5, #6 a000abd4: e5825034 str r5, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; a000abd8: e5834050 str r4, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ a000abdc: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ a000abe0: e582c01c str ip, [r2, #28] a000abe4: e5913000 ldr r3, [r1] a000abe8: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; a000abec: e3a00000 mov r0, #0 a000abf0: e8bd80f0 pop {r4, r5, r6, r7, pc} * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { a000abf4: e3500001 cmp r0, #1 a000abf8: 0a000001 beq a000ac04 <_CORE_mutex_Seize_interrupt_trylock+0x10c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; a000abfc: e3a00001 mov r0, #1 a000ac00: e8bd80f0 pop {r4, r5, r6, r7, pc} case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; a000ac04: e3a03002 mov r3, #2 <== NOT EXECUTED a000ac08: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED a000ac0c: e5913000 ldr r3, [r1] <== NOT EXECUTED a000ac10: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _ISR_Enable( *level_p ); return 0; a000ac14: e3a00000 mov r0, #0 <== NOT EXECUTED a000ac18: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a000ac1c: e59f2040 ldr r2, [pc, #64] ; a000ac64 <_CORE_mutex_Seize_interrupt_trylock+0x16c> a000ac20: e5920000 ldr r0, [r2] a000ac24: e2800001 add r0, r0, #1 a000ac28: e5820000 str r0, [r2] a000ac2c: e5912000 ldr r2, [r1] a000ac30: e129f002 msr CPSR_fc, r2 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( a000ac34: e3a02000 mov r2, #0 a000ac38: e593005c ldr r0, [r3, #92] ; 0x5c a000ac3c: e593104c ldr r1, [r3, #76] ; 0x4c a000ac40: ebfff1f8 bl a0007428 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); a000ac44: ebfff333 bl a0007918 <_Thread_Enable_dispatch> return 0; a000ac48: e3a00000 mov r0, #0 a000ac4c: e8bd80f0 pop {r4, r5, r6, r7, pc} a000ac50: e5913000 ldr r3, [r1] a000ac54: e129f003 msr CPSR_fc, r3 ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); return 0; a000ac58: e3a00000 mov r0, #0 a000ac5c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000acd8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000acd8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000acdc: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; a000ace0: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000ace4: e24dd01c sub sp, sp, #28 a000ace8: e1a05001 mov r5, r1 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000acec: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000acf0: e1a07000 mov r7, r0 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000acf4: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000acf8: e1a0b003 mov fp, r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; a000acfc: e58d200c str r2, [sp, #12] Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000ad00: 2a000078 bcs a000aee8 <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { a000ad04: e3530000 cmp r3, #0 a000ad08: 1a000074 bne a000aee0 <_Heap_Allocate_aligned_with_boundary+0x208> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } a000ad0c: e5979008 ldr r9, [r7, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000ad10: e1570009 cmp r7, r9 a000ad14: 0a000073 beq a000aee8 <_Heap_Allocate_aligned_with_boundary+0x210> 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; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size a000ad18: e59d300c ldr r3, [sp, #12] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; a000ad1c: e2651004 rsb r1, r5, #4 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000ad20: e3a06001 mov r6, #1 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; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size a000ad24: e2833007 add r3, r3, #7 a000ad28: e58d3010 str r3, [sp, #16] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; a000ad2c: e58d1014 str r1, [sp, #20] /* * 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 ) { a000ad30: e599a004 ldr sl, [r9, #4] a000ad34: e59d2000 ldr r2, [sp] a000ad38: e152000a cmp r2, sl a000ad3c: 2a00004e bcs a000ae7c <_Heap_Allocate_aligned_with_boundary+0x1a4> if ( alignment == 0 ) { a000ad40: 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; a000ad44: 02894008 addeq r4, r9, #8 a000ad48: 0a000051 beq a000ae94 <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } a000ad4c: e5973014 ldr r3, [r7, #20] 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_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; a000ad50: e59d1014 ldr r1, [sp, #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; a000ad54: e59d2010 ldr r2, [sp, #16] - 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; a000ad58: e3caa001 bic sl, sl, #1 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; a000ad5c: e089a00a add sl, r9, sl 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_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; a000ad60: e081400a add r4, r1, sl if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } a000ad64: e58d3004 str r3, [sp, #4] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a000ad68: e0633002 rsb r3, r3, r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000ad6c: e1a00004 mov r0, r4 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; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size a000ad70: e083a00a add sl, r3, sl a000ad74: e1a01008 mov r1, r8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; a000ad78: e2893008 add r3, r9, #8 a000ad7c: e58d3008 str r3, [sp, #8] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000ad80: eb001582 bl a0010390 <__umodsi3> a000ad84: e0604004 rsb r4, r0, r4 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 ) { a000ad88: e15a0004 cmp sl, r4 a000ad8c: 2a000003 bcs a000ada0 <_Heap_Allocate_aligned_with_boundary+0xc8> a000ad90: e1a0000a mov r0, sl a000ad94: e1a01008 mov r1, r8 a000ad98: eb00157c bl a0010390 <__umodsi3> a000ad9c: e060400a rsb r4, r0, sl } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { a000ada0: e35b0000 cmp fp, #0 a000ada4: 0a000026 beq a000ae44 <_Heap_Allocate_aligned_with_boundary+0x16c> /* 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; a000ada8: e084a005 add sl, r4, r5 a000adac: e1a0000a mov r0, sl a000adb0: e1a0100b mov r1, fp a000adb4: eb001575 bl a0010390 <__umodsi3> a000adb8: e060000a rsb r0, r0, sl /* 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 ) { a000adbc: e15a0000 cmp sl, r0 a000adc0: 93a0a000 movls sl, #0 a000adc4: 83a0a001 movhi sl, #1 a000adc8: e1540000 cmp r4, r0 a000adcc: 23a0a000 movcs sl, #0 a000add0: e35a0000 cmp sl, #0 a000add4: 0a00001a beq a000ae44 <_Heap_Allocate_aligned_with_boundary+0x16c> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; a000add8: e59d1008 ldr r1, [sp, #8] a000addc: e0813005 add r3, 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 ) { a000ade0: e1530000 cmp r3, r0 a000ade4: 958d9018 strls r9, [sp, #24] a000ade8: 91a09003 movls r9, r3 a000adec: 9a000002 bls a000adfc <_Heap_Allocate_aligned_with_boundary+0x124> a000adf0: ea000021 b a000ae7c <_Heap_Allocate_aligned_with_boundary+0x1a4> a000adf4: e1590000 cmp r9, r0 a000adf8: 8a00003c bhi a000aef0 <_Heap_Allocate_aligned_with_boundary+0x218> return 0; } alloc_begin = boundary_line - alloc_size; a000adfc: e0654000 rsb r4, r5, r0 a000ae00: e1a01008 mov r1, r8 a000ae04: e1a00004 mov r0, r4 a000ae08: eb001560 bl a0010390 <__umodsi3> a000ae0c: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; a000ae10: e084a005 add sl, r4, r5 a000ae14: e1a0000a mov r0, sl a000ae18: e1a0100b mov r1, fp a000ae1c: eb00155b bl a0010390 <__umodsi3> a000ae20: e060000a rsb r0, r0, sl /* 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 ) { a000ae24: e15a0000 cmp sl, r0 a000ae28: 93a0a000 movls sl, #0 a000ae2c: 83a0a001 movhi sl, #1 a000ae30: e1540000 cmp r4, r0 a000ae34: 23a0a000 movcs sl, #0 a000ae38: e35a0000 cmp sl, #0 a000ae3c: 1affffec bne a000adf4 <_Heap_Allocate_aligned_with_boundary+0x11c> a000ae40: e59d9018 ldr r9, [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 ) { a000ae44: e59d2008 ldr r2, [sp, #8] a000ae48: e1520004 cmp r2, r4 a000ae4c: 8a00000a bhi a000ae7c <_Heap_Allocate_aligned_with_boundary+0x1a4> a000ae50: e59d100c ldr r1, [sp, #12] a000ae54: e1a00004 mov r0, r4 a000ae58: eb00154c bl a0010390 <__umodsi3> a000ae5c: e3e0a007 mvn sl, #7 a000ae60: e069a00a rsb sl, r9, sl 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; if ( free_size >= min_block_size || free_size == 0 ) { a000ae64: e59d1004 ldr r1, [sp, #4] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000ae68: e08aa004 add sl, sl, r4 a000ae6c: e060300a rsb r3, r0, sl a000ae70: e15a0000 cmp sl, r0 a000ae74: 11510003 cmpne r1, r3 a000ae78: 9a000005 bls a000ae94 <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( alloc_begin != 0 ) { break; } block = block->next; a000ae7c: e5999008 ldr r9, [r9, #8] a000ae80: e2863001 add r3, r6, #1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000ae84: e1570009 cmp r7, r9 a000ae88: 0a00001d beq a000af04 <_Heap_Allocate_aligned_with_boundary+0x22c> a000ae8c: e1a06003 mov r6, r3 a000ae90: eaffffa6 b a000ad30 <_Heap_Allocate_aligned_with_boundary+0x58> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { a000ae94: e3540000 cmp r4, #0 a000ae98: 0afffff7 beq a000ae7c <_Heap_Allocate_aligned_with_boundary+0x1a4> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000ae9c: e5972048 ldr r2, [r7, #72] ; 0x48 stats->searches += search_count; a000aea0: e597304c ldr r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000aea4: e1a00007 mov r0, r7 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000aea8: e2822001 add r2, r2, #1 stats->searches += search_count; a000aeac: e0833006 add r3, r3, r6 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000aeb0: e5872048 str r2, [r7, #72] ; 0x48 stats->searches += search_count; a000aeb4: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000aeb8: e1a01009 mov r1, r9 a000aebc: e1a02004 mov r2, r4 a000aec0: e1a03005 mov r3, r5 a000aec4: ebffedfb bl a00066b8 <_Heap_Block_allocate> a000aec8: e1a00004 mov r0, r4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { a000aecc: e5973044 ldr r3, [r7, #68] ; 0x44 a000aed0: e1530006 cmp r3, r6 stats->max_search = search_count; a000aed4: 35876044 strcc r6, [r7, #68] ; 0x44 } return (void *) alloc_begin; } a000aed8: e28dd01c add sp, sp, #28 a000aedc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { a000aee0: e1550003 cmp r5, r3 a000aee4: 9a000008 bls a000af0c <_Heap_Allocate_aligned_with_boundary+0x234> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000aee8: e3a00000 mov r0, #0 a000aeec: eafffff9 b a000aed8 <_Heap_Allocate_aligned_with_boundary+0x200> a000aef0: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; a000aef4: e2863001 add r3, r6, #1 <== NOT EXECUTED a000aef8: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000aefc: e1570009 cmp r7, r9 <== NOT EXECUTED a000af00: 1affffe1 bne a000ae8c <_Heap_Allocate_aligned_with_boundary+0x1b4><== NOT EXECUTED a000af04: e3a00000 mov r0, #0 a000af08: eaffffef b a000aecc <_Heap_Allocate_aligned_with_boundary+0x1f4> if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { alignment = page_size; a000af0c: e3580000 cmp r8, #0 a000af10: 01a08002 moveq r8, r2 a000af14: eaffff7c b a000ad0c <_Heap_Allocate_aligned_with_boundary+0x34> =============================================================================== a000b264 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { a000b264: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000b268: e1a05000 mov r5, r0 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { a000b26c: e0916002 adds r6, r1, r2 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { a000b270: e1a04001 mov r4, r1 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; a000b274: e5908020 ldr r8, [r0, #32] Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; a000b278: e5951030 ldr r1, [r5, #48] ; 0x30 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; a000b27c: e5900010 ldr r0, [r0, #16] Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { a000b280: e24dd024 sub sp, sp, #36 ; 0x24 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; a000b284: e3a07000 mov r7, #0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { a000b288: e58d3010 str r3, [sp, #16] Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; a000b28c: e58d0008 str r0, [sp, #8] Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; a000b290: e58d7020 str r7, [sp, #32] Heap_Block *extend_last_block = NULL; a000b294: e58d701c str r7, [sp, #28] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a000b298: e5953014 ldr r3, [r5, #20] uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; a000b29c: e58d1018 str r1, [sp, #24] uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return false; a000b2a0: 21a00007 movcs r0, r7 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { a000b2a4: 3a000001 bcc a000b2b0 <_Heap_Extend+0x4c> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } a000b2a8: e28dd024 add sp, sp, #36 ; 0x24 a000b2ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( a000b2b0: e28dc020 add ip, sp, #32 a000b2b4: e1a01002 mov r1, r2 a000b2b8: e58dc000 str ip, [sp] a000b2bc: e1a00004 mov r0, r4 a000b2c0: e28dc01c add ip, sp, #28 a000b2c4: e59d2008 ldr r2, [sp, #8] a000b2c8: e58dc004 str ip, [sp, #4] a000b2cc: ebffed62 bl a000685c <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { a000b2d0: e3500000 cmp r0, #0 a000b2d4: 0afffff3 beq a000b2a8 <_Heap_Extend+0x44> a000b2d8: e1a09008 mov r9, r8 a000b2dc: e1a0b007 mov fp, r7 a000b2e0: e58d700c str r7, [sp, #12] a000b2e4: e58d7014 str r7, [sp, #20] return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; a000b2e8: e1590008 cmp r9, r8 a000b2ec: 05953018 ldreq r3, [r5, #24] uintptr_t const sub_area_end = start_block->prev_size; a000b2f0: e599a000 ldr sl, [r9] return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; a000b2f4: 11a03009 movne r3, r9 uintptr_t const sub_area_end = start_block->prev_size; Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( a000b2f8: e1530006 cmp r3, r6 a000b2fc: 3154000a cmpcc r4, sl a000b300: 3a00006c bcc a000b4b8 <_Heap_Extend+0x254> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { a000b304: e1530006 cmp r3, r6 a000b308: 058d9014 streq r9, [sp, #20] a000b30c: 0a000001 beq a000b318 <_Heap_Extend+0xb4> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { a000b310: e156000a cmp r6, sl a000b314: 31a0b009 movcc fp, r9 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000b318: e1a0000a mov r0, sl a000b31c: e59d1008 ldr r1, [sp, #8] a000b320: eb00156f bl a00108e4 <__umodsi3> a000b324: e24a3008 sub r3, sl, #8 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { a000b328: e15a0004 cmp sl, r4 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000b32c: e0603003 rsb r3, r0, r3 start_block->prev_size = extend_area_end; a000b330: 05896000 streq r6, [r9] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) a000b334: 058d300c streq r3, [sp, #12] merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { a000b338: 0a000001 beq a000b344 <_Heap_Extend+0xe0> a000b33c: e154000a cmp r4, sl a000b340: 81a07003 movhi r7, r3 - 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; a000b344: e5939004 ldr r9, [r3, #4] a000b348: e3c99001 bic r9, r9, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000b34c: e0839009 add r9, r3, r9 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); a000b350: e1580009 cmp r8, r9 a000b354: 1affffe3 bne a000b2e8 <_Heap_Extend+0x84> if ( extend_area_begin < heap->area_begin ) { a000b358: e5953018 ldr r3, [r5, #24] a000b35c: e1540003 cmp r4, r3 heap->area_begin = extend_area_begin; a000b360: 35854018 strcc r4, [r5, #24] } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { a000b364: 3a000002 bcc a000b374 <_Heap_Extend+0x110> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { a000b368: e595301c ldr r3, [r5, #28] a000b36c: e1560003 cmp r6, r3 heap->area_end = extend_area_end; a000b370: 8585601c strhi r6, [r5, #28] } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; a000b374: e59d3020 ldr r3, [sp, #32] a000b378: e59d201c ldr r2, [sp, #28] extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { a000b37c: e595c020 ldr ip, [r5, #32] } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; a000b380: e5836000 str r6, [r3] heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = a000b384: e0631002 rsb r1, r3, r2 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; a000b388: e3810001 orr r0, r1, #1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; a000b38c: e5821000 str r1, [r2] extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { a000b390: e15c0003 cmp ip, r3 extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; a000b394: e3a01000 mov r1, #0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = a000b398: e5830004 str r0, [r3, #4] extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; a000b39c: e5821004 str r1, [r2, #4] _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; a000b3a0: 85853020 strhi r3, [r5, #32] extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { a000b3a4: 8a000002 bhi a000b3b4 <_Heap_Extend+0x150> heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { a000b3a8: e5953024 ldr r3, [r5, #36] ; 0x24 a000b3ac: e1530002 cmp r3, r2 heap->last_block = extend_last_block; a000b3b0: 35852024 strcc r2, [r5, #36] ; 0x24 } if ( merge_below_block != NULL ) { a000b3b4: e59d3014 ldr r3, [sp, #20] a000b3b8: e3530000 cmp r3, #0 a000b3bc: 0a000050 beq a000b504 <_Heap_Extend+0x2a0> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; a000b3c0: e5958010 ldr r8, [r5, #16] <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); a000b3c4: e2844008 add r4, r4, #8 <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; a000b3c8: e1a00004 mov r0, r4 <== NOT EXECUTED a000b3cc: e1a01008 mov r1, r8 <== NOT EXECUTED a000b3d0: eb001543 bl a00108e4 <__umodsi3> <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; a000b3d4: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED if ( remainder != 0 ) { a000b3d8: e3500000 cmp r0, #0 <== NOT EXECUTED return value - remainder + alignment; a000b3dc: 10844008 addne r4, r4, r8 <== NOT EXECUTED a000b3e0: 10604004 rsbne r4, r0, r4 <== NOT EXECUTED ) { uintptr_t const page_size = heap->page_size; uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = a000b3e4: e2441008 sub r1, r4, #8 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; a000b3e8: e59c2000 ldr r2, [ip] <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = a000b3ec: e061300c rsb r3, r1, ip <== NOT EXECUTED first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; a000b3f0: e3833001 orr r3, r3, #1 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; a000b3f4: e5042008 str r2, [r4, #-8] <== NOT EXECUTED new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; a000b3f8: e5813004 str r3, [r1, #4] <== NOT EXECUTED _Heap_Free_block( heap, new_first_block ); a000b3fc: e1a00005 mov r0, r5 <== NOT EXECUTED a000b400: ebffff8f bl a000b244 <_Heap_Free_block> <== NOT EXECUTED link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { a000b404: e59d000c ldr r0, [sp, #12] a000b408: e3500000 cmp r0, #0 a000b40c: 0a00002b beq a000b4c0 <_Heap_Extend+0x25c> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, a000b410: e2466008 sub r6, r6, #8 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( a000b414: e0606006 rsb r6, r0, r6 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000b418: e5951010 ldr r1, [r5, #16] a000b41c: e1a00006 mov r0, r6 a000b420: eb00152f bl a00108e4 <__umodsi3> ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) a000b424: e59d100c ldr r1, [sp, #12] a000b428: e0606006 rsb r6, r0, r6 | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); a000b42c: e1a00005 mov r0, r5 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) a000b430: e5913004 ldr r3, [r1, #4] page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = a000b434: e0862001 add r2, r6, r1 (last_block->size_and_flag - last_block_new_size) a000b438: e0663003 rsb r3, r6, r3 | HEAP_PREV_BLOCK_USED; a000b43c: e3833001 orr r3, r3, #1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = a000b440: e5823004 str r3, [r2, #4] RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a000b444: e5913004 ldr r3, [r1, #4] a000b448: e2033001 and r3, r3, #1 block->size_and_flag = size | flag; a000b44c: e1866003 orr r6, r6, r3 a000b450: e5816004 str r6, [r1, #4] (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); a000b454: ebffff7a bl a000b244 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { a000b458: e59d200c ldr r2, [sp, #12] a000b45c: e59d3014 ldr r3, [sp, #20] a000b460: e3520000 cmp r2, #0 a000b464: 03530000 cmpeq r3, #0 a000b468: 0a000021 beq a000b4f4 <_Heap_Extend+0x290> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } a000b46c: e5953024 ldr r3, [r5, #36] ; 0x24 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( a000b470: e595c020 ldr ip, [r5, #32] _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; a000b474: e5952030 ldr r2, [r5, #48] ; 0x30 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a000b478: e5930004 ldr r0, [r3, #4] * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( a000b47c: e063c00c rsb ip, r3, ip a000b480: e59d4018 ldr r4, [sp, #24] RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a000b484: e2000001 and r0, r0, #1 /* Statistics */ stats->size += extended_size; a000b488: e595102c ldr r1, [r5, #44] ; 0x2c block->size_and_flag = size | flag; a000b48c: e18c0000 orr r0, ip, r0 if ( extended_size_ptr != NULL ) a000b490: e59dc010 ldr ip, [sp, #16] _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; a000b494: e0642002 rsb r2, r4, r2 /* Statistics */ stats->size += extended_size; a000b498: e0811002 add r1, r1, r2 if ( extended_size_ptr != NULL ) a000b49c: e35c0000 cmp ip, #0 a000b4a0: e5830004 str r0, [r3, #4] _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; a000b4a4: e585102c str r1, [r5, #44] ; 0x2c if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; a000b4a8: 13a00001 movne r0, #1 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; a000b4ac: 158c2000 strne r2, [ip] return true; a000b4b0: 03a00001 moveq r0, #1 a000b4b4: eaffff7b b a000b2a8 <_Heap_Extend+0x44> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; a000b4b8: e3a00000 mov r0, #0 a000b4bc: eaffff79 b a000b2a8 <_Heap_Extend+0x44> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { a000b4c0: e3570000 cmp r7, #0 a000b4c4: 0affffe3 beq a000b458 <_Heap_Extend+0x1f4> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a000b4c8: e5971004 ldr r1, [r7, #4] ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); a000b4cc: e59d2020 ldr r2, [sp, #32] } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( a000b4d0: e59d301c ldr r3, [sp, #28] a000b4d4: e2011001 and r1, r1, #1 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); a000b4d8: e0672002 rsb r2, r7, r2 block->size_and_flag = size | flag; a000b4dc: e1822001 orr r2, r2, r1 a000b4e0: e5872004 str r2, [r7, #4] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; a000b4e4: e5932004 ldr r2, [r3, #4] a000b4e8: e3822001 orr r2, r2, #1 a000b4ec: e5832004 str r2, [r3, #4] a000b4f0: eaffffd8 b a000b458 <_Heap_Extend+0x1f4> extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { _Heap_Free_block( heap, extend_first_block ); a000b4f4: e1a00005 mov r0, r5 a000b4f8: e59d1020 ldr r1, [sp, #32] a000b4fc: ebffff50 bl a000b244 <_Heap_Free_block> a000b500: eaffffd9 b a000b46c <_Heap_Extend+0x208> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { a000b504: e35b0000 cmp fp, #0 { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; a000b508: 1062b00b rsbne fp, r2, fp a000b50c: 138bb001 orrne fp, fp, #1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = a000b510: 1582b004 strne fp, [r2, #4] a000b514: eaffffba b a000b404 <_Heap_Extend+0x1a0> =============================================================================== a000af18 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { a000af18: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a000af1c: e1a04000 mov r4, r0 a000af20: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000af24: e1a00001 mov r0, r1 a000af28: e5941010 ldr r1, [r4, #16] a000af2c: eb001517 bl a0010390 <__umodsi3> 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 a000af30: e5943020 ldr r3, [r4, #32] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000af34: e2455008 sub r5, r5, #8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000af38: e0605005 rsb r5, r0, r5 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; a000af3c: e1550003 cmp r5, r3 a000af40: 3a000030 bcc a000b008 <_Heap_Free+0xf0> a000af44: e5941024 ldr r1, [r4, #36] ; 0x24 a000af48: e1550001 cmp r5, r1 a000af4c: 8a00002d bhi a000b008 <_Heap_Free+0xf0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000af50: e595c004 ldr ip, [r5, #4] - 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; a000af54: e3cc6001 bic r6, ip, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000af58: e0852006 add r2, r5, r6 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; a000af5c: e1530002 cmp r3, r2 a000af60: 8a000028 bhi a000b008 <_Heap_Free+0xf0> a000af64: e1510002 cmp r1, r2 _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; a000af68: 33a00000 movcc r0, #0 a000af6c: 3a000027 bcc a000b010 <_Heap_Free+0xf8> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000af70: e5927004 ldr r7, [r2, #4] if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a000af74: e2170001 ands r0, r7, #1 a000af78: 0a000024 beq a000b010 <_Heap_Free+0xf8> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); a000af7c: e1510002 cmp r1, r2 - 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; a000af80: e3c77001 bic r7, r7, #1 a000af84: 03a08000 moveq r8, #0 a000af88: 0a000004 beq a000afa0 <_Heap_Free+0x88> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000af8c: e0820007 add r0, r2, r7 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; a000af90: e5900004 ldr r0, [r0, #4] return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) a000af94: e3100001 tst r0, #1 a000af98: 13a08000 movne r8, #0 a000af9c: 03a08001 moveq r8, #1 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { a000afa0: e21c0001 ands r0, ip, #1 a000afa4: 1a00001a bne a000b014 <_Heap_Free+0xfc> uintptr_t const prev_size = block->prev_size; a000afa8: e595c000 ldr ip, [r5] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000afac: e06ca005 rsb sl, ip, r5 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; a000afb0: e153000a cmp r3, sl a000afb4: 8a000015 bhi a000b010 <_Heap_Free+0xf8> a000afb8: e151000a cmp r1, sl a000afbc: 3a000013 bcc a000b010 <_Heap_Free+0xf8> 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; a000afc0: e59a0004 ldr r0, [sl, #4] return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { a000afc4: e2100001 ands r0, r0, #1 a000afc8: 0a000010 beq a000b010 <_Heap_Free+0xf8> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ a000afcc: e3580000 cmp r8, #0 a000afd0: 0a000038 beq a000b0b8 <_Heap_Free+0x1a0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000afd4: e5940038 ldr r0, [r4, #56] ; 0x38 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000afd8: e5923008 ldr r3, [r2, #8] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; a000afdc: e0867007 add r7, r6, r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000afe0: e592200c ldr r2, [r2, #12] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; a000afe4: e087c00c add ip, r7, ip _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000afe8: e2400001 sub r0, r0, #1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000afec: e38c1001 orr r1, ip, #1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; a000aff0: e5823008 str r3, [r2, #8] next->prev = prev; a000aff4: e583200c str r2, [r3, #12] } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000aff8: e5840038 str r0, [r4, #56] ; 0x38 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000affc: e58a1004 str r1, [sl, #4] next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; a000b000: e78ac00c str ip, [sl, ip] a000b004: ea00000e b a000b044 <_Heap_Free+0x12c> _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; a000b008: e3a00000 mov r0, #0 a000b00c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000b010: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ a000b014: e3580000 cmp r8, #0 a000b018: 0a000014 beq a000b070 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000b01c: e5923008 ldr r3, [r2, #8] a000b020: e592200c ldr r2, [r2, #12] prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; a000b024: e0877006 add r7, r7, r6 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000b028: e3871001 orr r1, r7, #1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; a000b02c: e5853008 str r3, [r5, #8] new_block->prev = prev; a000b030: e585200c str r2, [r5, #12] next->prev = new_block; prev->next = new_block; a000b034: e5825008 str r5, [r2, #8] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; a000b038: e583500c str r5, [r3, #12] a000b03c: e5851004 str r1, [r5, #4] next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; a000b040: e7857007 str r7, [r5, r7] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a000b044: e5942040 ldr r2, [r4, #64] ; 0x40 ++stats->frees; a000b048: e5943050 ldr r3, [r4, #80] ; 0x50 stats->free_size += block_size; a000b04c: e5941030 ldr r1, [r4, #48] ; 0x30 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a000b050: e2422001 sub r2, r2, #1 ++stats->frees; a000b054: e2833001 add r3, r3, #1 stats->free_size += block_size; a000b058: e0816006 add r6, r1, r6 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a000b05c: e5842040 str r2, [r4, #64] ; 0x40 ++stats->frees; a000b060: e5843050 str r3, [r4, #80] ; 0x50 stats->free_size += block_size; a000b064: e5846030 str r6, [r4, #48] ; 0x30 return( true ); a000b068: e3a00001 mov r0, #1 a000b06c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; a000b070: e3863001 orr r3, r6, #1 a000b074: e5853004 str r3, [r5, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; a000b078: e5943038 ldr r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { a000b07c: e594c03c ldr ip, [r4, #60] ; 0x3c } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000b080: e5920004 ldr r0, [r2, #4] RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; a000b084: e5941008 ldr r1, [r4, #8] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; a000b088: e2833001 add r3, r3, #1 } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000b08c: e3c00001 bic r0, r0, #1 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { a000b090: e153000c cmp r3, ip new_block->next = next; a000b094: e5851008 str r1, [r5, #8] new_block->prev = block_before; a000b098: e585400c str r4, [r5, #12] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000b09c: e5820004 str r0, [r2, #4] block_before->next = new_block; next->prev = new_block; a000b0a0: e581500c str r5, [r1, #12] next_block->prev_size = block_size; a000b0a4: e7856006 str r6, [r5, r6] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; a000b0a8: e5845008 str r5, [r4, #8] /* Statistics */ ++stats->free_blocks; a000b0ac: e5843038 str r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; a000b0b0: 8584303c strhi r3, [r4, #60] ; 0x3c a000b0b4: eaffffe2 b a000b044 <_Heap_Free+0x12c> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; a000b0b8: e086c00c add ip, r6, ip prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000b0bc: e38c3001 orr r3, ip, #1 a000b0c0: e58a3004 str r3, [sl, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000b0c4: e5923004 ldr r3, [r2, #4] next_block->prev_size = size; a000b0c8: e785c006 str ip, [r5, r6] _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000b0cc: e3c33001 bic r3, r3, #1 a000b0d0: e5823004 str r3, [r2, #4] a000b0d4: eaffffda b a000b044 <_Heap_Free+0x12c> =============================================================================== a0012048 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { a0012048: e92d40f0 push {r4, r5, r6, r7, lr} a001204c: e1a04000 mov r4, r0 a0012050: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a0012054: e1a00001 mov r0, r1 a0012058: e5941010 ldr r1, [r4, #16] a001205c: e1a07002 mov r7, r2 a0012060: ebfff8ca bl a0010390 <__umodsi3> 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 a0012064: e5943020 ldr r3, [r4, #32] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a0012068: e2456008 sub r6, r5, #8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a001206c: e0600006 rsb r0, r0, r6 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; a0012070: e1500003 cmp r0, r3 a0012074: 3a000012 bcc a00120c4 <_Heap_Size_of_alloc_area+0x7c> a0012078: e5942024 ldr r2, [r4, #36] ; 0x24 a001207c: e1500002 cmp r0, r2 a0012080: 8a00000f bhi a00120c4 <_Heap_Size_of_alloc_area+0x7c> - 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; a0012084: e5906004 ldr r6, [r0, #4] a0012088: e3c66001 bic r6, r6, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a001208c: e0806006 add r6, r0, r6 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; a0012090: e1530006 cmp r3, r6 a0012094: 8a00000a bhi a00120c4 <_Heap_Size_of_alloc_area+0x7c> a0012098: e1520006 cmp r2, r6 if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; a001209c: 33a00000 movcc r0, #0 a00120a0: 3a000009 bcc a00120cc <_Heap_Size_of_alloc_area+0x84> 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; a00120a4: e5960004 ldr r0, [r6, #4] block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) a00120a8: e2100001 ands r0, r0, #1 a00120ac: 0a000006 beq a00120cc <_Heap_Size_of_alloc_area+0x84> ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; a00120b0: e2655004 rsb r5, r5, #4 a00120b4: e0856006 add r6, r5, r6 a00120b8: e5876000 str r6, [r7] return true; a00120bc: e3a00001 mov r0, #1 a00120c0: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; a00120c4: e3a00000 mov r0, #0 a00120c8: e8bd80f0 pop {r4, r5, r6, r7, pc} } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } a00120cc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a000741c <_Heap_Walk>: Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { a000741c: e59f3578 ldr r3, [pc, #1400] ; a000799c <_Heap_Walk+0x580> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0007420: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0007424: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { a0007428: e5933000 ldr r3, [r3] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a000742c: e59f256c ldr r2, [pc, #1388] ; a00079a0 <_Heap_Walk+0x584> a0007430: e59f956c ldr r9, [pc, #1388] ; a00079a4 <_Heap_Walk+0x588> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0007434: e1a0a001 mov sl, r1 uintptr_t const page_size = heap->page_size; a0007438: e5901010 ldr r1, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a000743c: 11a09002 movne r9, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { a0007440: e3530003 cmp r3, #3 int source, bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a0007444: e5902014 ldr r2, [r0, #20] Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; a0007448: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a000744c: e24dd038 sub sp, sp, #56 ; 0x38 a0007450: e1a04000 mov r4, r0 uintptr_t const page_size = heap->page_size; a0007454: e58d1024 str r1, [sp, #36] ; 0x24 uintptr_t const min_block_size = heap->min_block_size; a0007458: e58d2028 str r2, [sp, #40] ; 0x28 Heap_Block *const first_block = heap->first_block; a000745c: e5908020 ldr r8, [r0, #32] Heap_Block *const last_block = heap->last_block; a0007460: e58d302c str r3, [sp, #44] ; 0x2c Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { a0007464: 0a000002 beq a0007474 <_Heap_Walk+0x58> } block = next_block; } while ( block != first_block ); return true; a0007468: e3a00001 mov r0, #1 } a000746c: e28dd038 add sp, sp, #56 ; 0x38 a0007470: 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)( a0007474: e594101c ldr r1, [r4, #28] a0007478: e5900018 ldr r0, [r0, #24] a000747c: e5942008 ldr r2, [r4, #8] a0007480: e594300c ldr r3, [r4, #12] a0007484: e59dc028 ldr ip, [sp, #40] ; 0x28 a0007488: e58d1008 str r1, [sp, #8] a000748c: e59d102c ldr r1, [sp, #44] ; 0x2c a0007490: e58d0004 str r0, [sp, #4] a0007494: e58d2014 str r2, [sp, #20] a0007498: e58d1010 str r1, [sp, #16] a000749c: e58d3018 str r3, [sp, #24] a00074a0: e59f2500 ldr r2, [pc, #1280] ; a00079a8 <_Heap_Walk+0x58c> a00074a4: e58dc000 str ip, [sp] a00074a8: e58d800c str r8, [sp, #12] a00074ac: e1a0000a mov r0, sl a00074b0: e3a01000 mov r1, #0 a00074b4: e59d3024 ldr r3, [sp, #36] ; 0x24 a00074b8: e12fff39 blx r9 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { a00074bc: e59d2024 ldr r2, [sp, #36] ; 0x24 a00074c0: e3520000 cmp r2, #0 a00074c4: 0a000024 beq a000755c <_Heap_Walk+0x140> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { a00074c8: e59d3024 ldr r3, [sp, #36] ; 0x24 a00074cc: e2135007 ands r5, r3, #7 a00074d0: 1a000027 bne a0007574 <_Heap_Walk+0x158> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a00074d4: e59d0028 ldr r0, [sp, #40] ; 0x28 a00074d8: e59d1024 ldr r1, [sp, #36] ; 0x24 a00074dc: ebffe562 bl a0000a6c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { a00074e0: e250b000 subs fp, r0, #0 a00074e4: 1a000028 bne a000758c <_Heap_Walk+0x170> a00074e8: e2880008 add r0, r8, #8 a00074ec: e59d1024 ldr r1, [sp, #36] ; 0x24 a00074f0: ebffe55d bl a0000a6c <__umodsi3> ); return false; } if ( a00074f4: e2506000 subs r6, r0, #0 a00074f8: 1a00002a bne a00075a8 <_Heap_Walk+0x18c> block = next_block; } while ( block != first_block ); return true; } a00074fc: e598b004 ldr fp, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { a0007500: e21b5001 ands r5, fp, #1 a0007504: 0a0000bf beq a0007808 <_Heap_Walk+0x3ec> - 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; a0007508: e59dc02c ldr ip, [sp, #44] ; 0x2c a000750c: e59c3004 ldr r3, [ip, #4] a0007510: e3c33001 bic r3, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0007514: e08c3003 add r3, ip, r3 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; a0007518: e5935004 ldr r5, [r3, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { a000751c: e2155001 ands r5, r5, #1 a0007520: 0a000007 beq a0007544 <_Heap_Walk+0x128> ); return false; } if ( a0007524: e1580003 cmp r8, r3 a0007528: 0a000025 beq a00075c4 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( a000752c: e1a0000a mov r0, sl <== NOT EXECUTED a0007530: e3a01001 mov r1, #1 <== NOT EXECUTED a0007534: e59f2470 ldr r2, [pc, #1136] ; a00079ac <_Heap_Walk+0x590> <== NOT EXECUTED a0007538: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000753c: e1a00006 mov r0, r6 <== NOT EXECUTED a0007540: eaffffc9 b a000746c <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( a0007544: e1a0000a mov r0, sl a0007548: e3a01001 mov r1, #1 a000754c: e59f245c ldr r2, [pc, #1116] ; a00079b0 <_Heap_Walk+0x594> a0007550: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007554: e1a00005 mov r0, r5 a0007558: eaffffc3 b a000746c <_Heap_Walk+0x50> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); a000755c: e1a0000a mov r0, sl a0007560: e3a01001 mov r1, #1 a0007564: e59f2448 ldr r2, [pc, #1096] ; a00079b4 <_Heap_Walk+0x598> a0007568: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000756c: e59d0024 ldr r0, [sp, #36] ; 0x24 a0007570: eaffffbd b a000746c <_Heap_Walk+0x50> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( a0007574: e1a0000a mov r0, sl a0007578: e3a01001 mov r1, #1 a000757c: e59f2434 ldr r2, [pc, #1076] ; a00079b8 <_Heap_Walk+0x59c> a0007580: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007584: e3a00000 mov r0, #0 a0007588: eaffffb7 b a000746c <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( a000758c: e1a0000a mov r0, sl a0007590: e3a01001 mov r1, #1 a0007594: e59f2420 ldr r2, [pc, #1056] ; a00079bc <_Heap_Walk+0x5a0> a0007598: e59d3028 ldr r3, [sp, #40] ; 0x28 a000759c: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00075a0: e1a00005 mov r0, r5 a00075a4: eaffffb0 b a000746c <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( a00075a8: e1a0000a mov r0, sl a00075ac: e3a01001 mov r1, #1 a00075b0: e59f2408 ldr r2, [pc, #1032] ; a00079c0 <_Heap_Walk+0x5a4> a00075b4: e1a03008 mov r3, r8 a00075b8: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00075bc: e1a0000b mov r0, fp a00075c0: eaffffa9 b a000746c <_Heap_Walk+0x50> block = next_block; } while ( block != first_block ); return true; } a00075c4: e5945008 ldr r5, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a00075c8: e5947010 ldr r7, [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 ) { a00075cc: e1540005 cmp r4, r5 a00075d0: 05943020 ldreq r3, [r4, #32] a00075d4: 0a00000c beq a000760c <_Heap_Walk+0x1f0> block = next_block; } while ( block != first_block ); return true; } a00075d8: e5943020 ldr r3, [r4, #32] 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; a00075dc: e1530005 cmp r3, r5 a00075e0: 9a00008e bls a0007820 <_Heap_Walk+0x404> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( a00075e4: e1a0000a mov r0, sl a00075e8: e3a01001 mov r1, #1 a00075ec: e59f23d0 ldr r2, [pc, #976] ; a00079c4 <_Heap_Walk+0x5a8> a00075f0: e1a03005 mov r3, r5 a00075f4: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00075f8: e3a00000 mov r0, #0 a00075fc: eaffff9a b a000746c <_Heap_Walk+0x50> a0007600: e1a03008 mov r3, r8 a0007604: e59db034 ldr fp, [sp, #52] ; 0x34 a0007608: e59d8030 ldr r8, [sp, #48] ; 0x30 ); return false; } if ( _Heap_Is_used( free_block ) ) { a000760c: e1a06008 mov r6, r8 - 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; a0007610: e3cb7001 bic r7, fp, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0007614: e0875006 add r5, r7, r6 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; a0007618: e1530005 cmp r3, r5 a000761c: 9a000007 bls a0007640 <_Heap_Walk+0x224> Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( a0007620: e1a0000a mov r0, sl a0007624: e58d5000 str r5, [sp] a0007628: e3a01001 mov r1, #1 a000762c: e59f2394 ldr r2, [pc, #916] ; a00079c8 <_Heap_Walk+0x5ac> a0007630: e1a03006 mov r3, r6 a0007634: e12fff39 blx r9 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; a0007638: e3a00000 mov r0, #0 a000763c: eaffff8a b a000746c <_Heap_Walk+0x50> a0007640: e5943024 ldr r3, [r4, #36] ; 0x24 a0007644: e1530005 cmp r3, r5 a0007648: 3afffff4 bcc a0007620 <_Heap_Walk+0x204> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000764c: e59d1024 ldr r1, [sp, #36] ; 0x24 a0007650: e1a00007 mov r0, r7 a0007654: ebffe504 bl a0000a6c <__umodsi3> uintptr_t const block_begin = (uintptr_t) block; 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; bool const is_not_last_block = block != last_block; a0007658: e59d102c ldr r1, [sp, #44] ; 0x2c a000765c: e0563001 subs r3, r6, r1 a0007660: 13a03001 movne r3, #1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { a0007664: e3500000 cmp r0, #0 a0007668: 0a000001 beq a0007674 <_Heap_Walk+0x258> a000766c: e3530000 cmp r3, #0 a0007670: 1a0000a2 bne a0007900 <_Heap_Walk+0x4e4> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { a0007674: e59d2028 ldr r2, [sp, #40] ; 0x28 a0007678: e1520007 cmp r2, r7 a000767c: 9a000001 bls a0007688 <_Heap_Walk+0x26c> a0007680: e3530000 cmp r3, #0 a0007684: 1a0000a5 bne a0007920 <_Heap_Walk+0x504> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { a0007688: e1560005 cmp r6, r5 a000768c: 3a000001 bcc a0007698 <_Heap_Walk+0x27c> a0007690: e3530000 cmp r3, #0 a0007694: 1a0000aa bne a0007944 <_Heap_Walk+0x528> 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; a0007698: e5953004 ldr r3, [r5, #4] a000769c: e20bb001 and fp, fp, #1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a00076a0: e3130001 tst r3, #1 a00076a4: 0a000016 beq a0007704 <_Heap_Walk+0x2e8> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { a00076a8: e35b0000 cmp fp, #0 a00076ac: 0a00000b beq a00076e0 <_Heap_Walk+0x2c4> (*printer)( a00076b0: e58d7000 str r7, [sp] a00076b4: e1a0000a mov r0, sl a00076b8: e3a01000 mov r1, #0 a00076bc: e59f2308 ldr r2, [pc, #776] ; a00079cc <_Heap_Walk+0x5b0> a00076c0: e1a03006 mov r3, r6 a00076c4: e12fff39 blx r9 block->prev_size ); } block = next_block; } while ( block != first_block ); a00076c8: e1580005 cmp r8, r5 a00076cc: 0affff65 beq a0007468 <_Heap_Walk+0x4c> a00076d0: e595b004 ldr fp, [r5, #4] a00076d4: e5943020 ldr r3, [r4, #32] a00076d8: e1a06005 mov r6, r5 a00076dc: eaffffcb b a0007610 <_Heap_Walk+0x1f4> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( a00076e0: e58d7000 str r7, [sp] a00076e4: e5963000 ldr r3, [r6] a00076e8: e1a0000a mov r0, sl a00076ec: e1a0100b mov r1, fp a00076f0: e58d3004 str r3, [sp, #4] a00076f4: e59f22d4 ldr r2, [pc, #724] ; a00079d0 <_Heap_Walk+0x5b4> a00076f8: e1a03006 mov r3, r6 a00076fc: e12fff39 blx r9 a0007700: eafffff0 b a00076c8 <_Heap_Walk+0x2ac> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? a0007704: e596200c ldr r2, [r6, #12] 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)( a0007708: e5943008 ldr r3, [r4, #8] block = next_block; } while ( block != first_block ); return true; } a000770c: e594100c ldr r1, [r4, #12] 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)( a0007710: e1530002 cmp r3, r2 a0007714: 059f02b8 ldreq r0, [pc, #696] ; a00079d4 <_Heap_Walk+0x5b8> a0007718: 0a000003 beq a000772c <_Heap_Walk+0x310> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), a000771c: e59f32b4 ldr r3, [pc, #692] ; a00079d8 <_Heap_Walk+0x5bc> a0007720: e1540002 cmp r4, r2 a0007724: e59f02b0 ldr r0, [pc, #688] ; a00079dc <_Heap_Walk+0x5c0> a0007728: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? a000772c: e5963008 ldr r3, [r6, #8] 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)( a0007730: e1510003 cmp r1, r3 a0007734: 059f12a4 ldreq r1, [pc, #676] ; a00079e0 <_Heap_Walk+0x5c4> a0007738: 0a000003 beq a000774c <_Heap_Walk+0x330> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") a000773c: e59fc2a0 ldr ip, [pc, #672] ; a00079e4 <_Heap_Walk+0x5c8> a0007740: e1540003 cmp r4, r3 a0007744: e59f1290 ldr r1, [pc, #656] ; a00079dc <_Heap_Walk+0x5c0> a0007748: 01a0100c moveq 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)( a000774c: e58d2004 str r2, [sp, #4] a0007750: e58d0008 str r0, [sp, #8] a0007754: e58d300c str r3, [sp, #12] a0007758: e58d1010 str r1, [sp, #16] a000775c: e1a03006 mov r3, r6 a0007760: e58d7000 str r7, [sp] a0007764: e1a0000a mov r0, sl a0007768: e3a01000 mov r1, #0 a000776c: e59f2274 ldr r2, [pc, #628] ; a00079e8 <_Heap_Walk+0x5cc> a0007770: e12fff39 blx r9 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { a0007774: e5953000 ldr r3, [r5] a0007778: e1570003 cmp r7, r3 a000777c: 1a000010 bne a00077c4 <_Heap_Walk+0x3a8> ); return false; } if ( !prev_used ) { a0007780: e35b0000 cmp fp, #0 a0007784: 0a000018 beq a00077ec <_Heap_Walk+0x3d0> block = next_block; } while ( block != first_block ); return true; } a0007788: 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 ) { a000778c: e1540003 cmp r4, r3 a0007790: 0a000004 beq a00077a8 <_Heap_Walk+0x38c> if ( free_block == block ) { a0007794: e1560003 cmp r6, r3 a0007798: 0affffca beq a00076c8 <_Heap_Walk+0x2ac> return true; } free_block = free_block->next; a000779c: 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 ) { a00077a0: e1540003 cmp r4, r3 a00077a4: 1afffffa bne a0007794 <_Heap_Walk+0x378> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( a00077a8: e1a0000a mov r0, sl a00077ac: e3a01001 mov r1, #1 a00077b0: e59f2234 ldr r2, [pc, #564] ; a00079ec <_Heap_Walk+0x5d0> a00077b4: e1a03006 mov r3, r6 a00077b8: e12fff39 blx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a00077bc: e3a00000 mov r0, #0 a00077c0: eaffff29 b a000746c <_Heap_Walk+0x50> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( a00077c4: e58d3004 str r3, [sp, #4] a00077c8: e1a0000a mov r0, sl a00077cc: e58d7000 str r7, [sp] a00077d0: e58d5008 str r5, [sp, #8] a00077d4: e3a01001 mov r1, #1 a00077d8: e59f2210 ldr r2, [pc, #528] ; a00079f0 <_Heap_Walk+0x5d4> a00077dc: e1a03006 mov r3, r6 a00077e0: e12fff39 blx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a00077e4: e3a00000 mov r0, #0 a00077e8: eaffff1f b a000746c <_Heap_Walk+0x50> return false; } if ( !prev_used ) { (*printer)( a00077ec: e1a0000a mov r0, sl a00077f0: e3a01001 mov r1, #1 a00077f4: e59f21f8 ldr r2, [pc, #504] ; a00079f4 <_Heap_Walk+0x5d8> a00077f8: e1a03006 mov r3, r6 a00077fc: e12fff39 blx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a0007800: e1a0000b mov r0, fp a0007804: eaffff18 b a000746c <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( a0007808: e1a0000a mov r0, sl a000780c: e3a01001 mov r1, #1 a0007810: e59f21e0 ldr r2, [pc, #480] ; a00079f8 <_Heap_Walk+0x5dc> a0007814: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007818: e1a00005 mov r0, r5 a000781c: eaffff12 b a000746c <_Heap_Walk+0x50> 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; a0007820: e594c024 ldr ip, [r4, #36] ; 0x24 a0007824: e15c0005 cmp ip, r5 a0007828: 3affff6d bcc a00075e4 <_Heap_Walk+0x1c8> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000782c: e2850008 add r0, r5, #8 a0007830: e1a01007 mov r1, r7 a0007834: e58d3020 str r3, [sp, #32] a0007838: e58dc01c str ip, [sp, #28] a000783c: ebffe48a bl a0000a6c <__umodsi3> ); return false; } if ( a0007840: e3500000 cmp r0, #0 a0007844: e59d3020 ldr r3, [sp, #32] a0007848: e59dc01c ldr ip, [sp, #28] a000784c: 1a000044 bne a0007964 <_Heap_Walk+0x548> - 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; a0007850: e5952004 ldr r2, [r5, #4] a0007854: e3c22001 bic r2, r2, #1 block = next_block; } while ( block != first_block ); return true; } a0007858: e0852002 add r2, r5, r2 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; a000785c: e5922004 ldr r2, [r2, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a0007860: e3120001 tst r2, #1 a0007864: 1a000045 bne a0007980 <_Heap_Walk+0x564> a0007868: e58d8030 str r8, [sp, #48] ; 0x30 a000786c: e58db034 str fp, [sp, #52] ; 0x34 a0007870: e1a01004 mov r1, r4 a0007874: e1a06005 mov r6, r5 a0007878: e1a08003 mov r8, r3 a000787c: e1a0b00c mov fp, ip a0007880: ea000013 b a00078d4 <_Heap_Walk+0x4b8> return false; } prev_block = free_block; free_block = free_block->next; a0007884: e5955008 ldr r5, [r5, #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 ) { a0007888: e1540005 cmp r4, r5 a000788c: 0affff5b beq a0007600 <_Heap_Walk+0x1e4> 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; a0007890: e1580005 cmp r8, r5 a0007894: 8affff52 bhi a00075e4 <_Heap_Walk+0x1c8> a0007898: e155000b cmp r5, fp RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000789c: e2850008 add r0, r5, #8 a00078a0: e1a01007 mov r1, r7 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; a00078a4: 8affff4e bhi a00075e4 <_Heap_Walk+0x1c8> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a00078a8: ebffe46f bl a0000a6c <__umodsi3> ); return false; } if ( a00078ac: e3500000 cmp r0, #0 a00078b0: 1a00002b bne a0007964 <_Heap_Walk+0x548> - 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; a00078b4: e5953004 ldr r3, [r5, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a00078b8: e1a01006 mov r1, r6 a00078bc: e1a06005 mov r6, r5 a00078c0: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } a00078c4: e0833005 add r3, r3, r5 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; a00078c8: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a00078cc: e3130001 tst r3, #1 a00078d0: 1a00002a bne a0007980 <_Heap_Walk+0x564> ); return false; } if ( free_block->prev != prev_block ) { a00078d4: e595200c ldr r2, [r5, #12] a00078d8: e1520001 cmp r2, r1 a00078dc: 0affffe8 beq a0007884 <_Heap_Walk+0x468> (*printer)( a00078e0: e58d2000 str r2, [sp] a00078e4: e1a0000a mov r0, sl a00078e8: e3a01001 mov r1, #1 a00078ec: e59f2108 ldr r2, [pc, #264] ; a00079fc <_Heap_Walk+0x5e0> a00078f0: e1a03005 mov r3, r5 a00078f4: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00078f8: e3a00000 mov r0, #0 a00078fc: eafffeda b a000746c <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( a0007900: e1a0000a mov r0, sl a0007904: e58d7000 str r7, [sp] a0007908: e3a01001 mov r1, #1 a000790c: e59f20ec ldr r2, [pc, #236] ; a0007a00 <_Heap_Walk+0x5e4> a0007910: e1a03006 mov r3, r6 a0007914: e12fff39 blx r9 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; a0007918: e3a00000 mov r0, #0 a000791c: eafffed2 b a000746c <_Heap_Walk+0x50> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( a0007920: e58d2004 str r2, [sp, #4] a0007924: e1a0000a mov r0, sl a0007928: e58d7000 str r7, [sp] a000792c: e3a01001 mov r1, #1 a0007930: e59f20cc ldr r2, [pc, #204] ; a0007a04 <_Heap_Walk+0x5e8> a0007934: e1a03006 mov r3, r6 a0007938: e12fff39 blx r9 block, block_size, min_block_size ); return false; a000793c: e3a00000 mov r0, #0 a0007940: eafffec9 b a000746c <_Heap_Walk+0x50> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( a0007944: e1a0000a mov r0, sl a0007948: e58d5000 str r5, [sp] a000794c: e3a01001 mov r1, #1 a0007950: e59f20b0 ldr r2, [pc, #176] ; a0007a08 <_Heap_Walk+0x5ec> a0007954: e1a03006 mov r3, r6 a0007958: e12fff39 blx r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; a000795c: e3a00000 mov r0, #0 a0007960: eafffec1 b a000746c <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( a0007964: e1a0000a mov r0, sl a0007968: e3a01001 mov r1, #1 a000796c: e59f2098 ldr r2, [pc, #152] ; a0007a0c <_Heap_Walk+0x5f0> a0007970: e1a03005 mov r3, r5 a0007974: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007978: e3a00000 mov r0, #0 a000797c: eafffeba b a000746c <_Heap_Walk+0x50> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( a0007980: e1a0000a mov r0, sl a0007984: e3a01001 mov r1, #1 a0007988: e59f2080 ldr r2, [pc, #128] ; a0007a10 <_Heap_Walk+0x5f4> a000798c: e1a03005 mov r3, r5 a0007990: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007994: e3a00000 mov r0, #0 a0007998: eafffeb3 b a000746c <_Heap_Walk+0x50> =============================================================================== a0006904 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { a0006904: 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 ) a0006908: e5904034 ldr r4, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { a000690c: e24dd014 sub sp, sp, #20 a0006910: 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 ) a0006914: e3540000 cmp r4, #0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a0006918: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a000691c: 0a00009c beq a0006b94 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; a0006920: e1d081b4 ldrh r8, [r0, #20] a0006924: e1d0a1b0 ldrh sl, [r0, #16] a0006928: e1a01008 mov r1, r8 a000692c: e1a0000a mov r0, sl a0006930: eb002650 bl a0010278 <__aeabi_uidiv> a0006934: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { a0006938: e1b03823 lsrs r3, r3, #16 a000693c: 0a00009a beq a0006bac <_Objects_Extend_information+0x2a8> if ( information->object_blocks[ block ] == NULL ) { a0006940: e5949000 ldr r9, [r4] a0006944: e3590000 cmp r9, #0 a0006948: 01a01008 moveq r1, r8 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a000694c: 01a06007 moveq r6, r7 index_base = minimum_index; block = 0; a0006950: 01a04009 moveq r4, r9 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { a0006954: 0a00000c beq a000698c <_Objects_Extend_information+0x88> a0006958: e1a02004 mov r2, r4 a000695c: e1a01008 mov r1, r8 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a0006960: e1a06007 mov r6, r7 index_base = minimum_index; block = 0; a0006964: e3a04000 mov r4, #0 a0006968: ea000002 b a0006978 <_Objects_Extend_information+0x74> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { a000696c: e5b29004 ldr r9, [r2, #4]! a0006970: e3590000 cmp r9, #0 a0006974: 0a000004 beq a000698c <_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++ ) { a0006978: e2844001 add r4, r4, #1 a000697c: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; a0006980: e0866008 add r6, r6, r8 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { a0006984: 8afffff8 bhi a000696c <_Objects_Extend_information+0x68> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; a0006988: e3a09001 mov r9, #1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; a000698c: 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 ) { a0006990: e35a0801 cmp sl, #65536 ; 0x10000 a0006994: 2a000064 bcs a0006b2c <_Objects_Extend_information+0x228> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { a0006998: e5d52012 ldrb r2, [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; a000699c: e5950018 ldr r0, [r5, #24] if ( information->auto_extend ) { a00069a0: e3520000 cmp r2, #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; a00069a4: e0000091 mul r0, r1, r0 if ( information->auto_extend ) { a00069a8: 1a000061 bne a0006b34 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); a00069ac: e58d3000 str r3, [sp] a00069b0: eb00085d bl a0008b2c <_Workspace_Allocate_or_fatal_error> a00069b4: e59d3000 ldr r3, [sp] a00069b8: e1a08000 mov r8, r0 } /* * Do we need to grow the tables? */ if ( do_extend ) { a00069bc: e3590000 cmp r9, #0 a00069c0: 0a00003a beq a0006ab0 <_Objects_Extend_information+0x1ac> */ /* * Up the block count and maximum */ block_count++; a00069c4: e283b001 add fp, r3, #1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + a00069c8: e08b008b add r0, fp, fp, lsl #1 ((maximum + minimum_index) * sizeof(Objects_Control *)); a00069cc: e08a0000 add r0, sl, r0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + a00069d0: e0800007 add r0, r0, r7 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); a00069d4: e1a00100 lsl r0, r0, #2 a00069d8: e58d3000 str r3, [sp] a00069dc: eb000848 bl a0008b04 <_Workspace_Allocate> if ( !object_blocks ) { a00069e0: e2509000 subs r9, r0, #0 a00069e4: e59d3000 ldr r3, [sp] a00069e8: 0a000074 beq a0006bc0 <_Objects_Extend_information+0x2bc> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { a00069ec: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); a00069f0: e089c10b add ip, r9, fp, lsl #2 a00069f4: e089b18b add fp, r9, fp, lsl #3 a00069f8: e1570002 cmp r7, r2 a00069fc: 3a000052 bcc a0006b4c <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0006a00: e3570000 cmp r7, #0 a0006a04: 13a02000 movne r2, #0 a0006a08: 11a0100b movne r1, fp local_table[ index ] = NULL; a0006a0c: 11a00002 movne r0, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0006a10: 0a000003 beq a0006a24 <_Objects_Extend_information+0x120> a0006a14: e2822001 add r2, r2, #1 a0006a18: e1570002 cmp r7, r2 local_table[ index ] = NULL; a0006a1c: e4810004 str r0, [r1], #4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0006a20: 8afffffb bhi a0006a14 <_Objects_Extend_information+0x110> a0006a24: 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 ); a0006a28: e1d511b4 ldrh r1, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; a0006a2c: e3a00000 mov r0, #0 a0006a30: e7890003 str r0, [r9, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); a0006a34: 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 ; a0006a38: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; a0006a3c: e78c0003 str r0, [ip, r3] for ( index=index_base ; a0006a40: 2a000005 bcs a0006a5c <_Objects_Extend_information+0x158> a0006a44: e08b2106 add r2, fp, r6, lsl #2 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( a0006a48: e1a03006 mov r3, r6 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { a0006a4c: 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 ; a0006a50: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; a0006a54: 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 ; a0006a58: 3afffffb bcc a0006a4c <_Objects_Extend_information+0x148> a0006a5c: e10f3000 mrs r3, CPSR a0006a60: e3832080 orr r2, r3, #128 ; 0x80 a0006a64: e129f002 msr CPSR_fc, r2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a0006a68: e5952000 ldr r2, [r5] 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( a0006a6c: 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; a0006a70: e1a0a80a lsl sl, sl, #16 a0006a74: e1a02c02 lsl r2, r2, #24 a0006a78: e3822801 orr r2, r2, #65536 ; 0x10000 a0006a7c: e1a0a82a lsr sl, sl, #16 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | a0006a80: e1822d81 orr r2, r2, r1, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a0006a84: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; a0006a88: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; a0006a8c: e585c030 str ip, [r5, #48] ; 0x30 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; a0006a90: e5859034 str r9, [r5, #52] ; 0x34 information->inactive_per_block = inactive_per_block; information->local_table = local_table; a0006a94: e585b01c str fp, [r5, #28] information->maximum = (Objects_Maximum) maximum; a0006a98: e1c5a1b0 strh sl, [r5, #16] information->maximum_id = _Objects_Build_id( a0006a9c: e585200c str r2, [r5, #12] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0006aa0: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) a0006aa4: e3500000 cmp r0, #0 a0006aa8: 0a000000 beq a0006ab0 <_Objects_Extend_information+0x1ac> _Workspace_Free( old_tables ); a0006aac: eb00081a bl a0008b1c <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0006ab0: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a0006ab4: e28d7008 add r7, sp, #8 a0006ab8: e1a01008 mov r1, r8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0006abc: e7838104 str r8, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a0006ac0: e1a00007 mov r0, r7 a0006ac4: e1d521b4 ldrh r2, [r5, #20] a0006ac8: e5953018 ldr r3, [r5, #24] a0006acc: eb000ff0 bl a000aa94 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0006ad0: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0006ad4: 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 ) { a0006ad8: ea000009 b a0006b04 <_Objects_Extend_information+0x200> a0006adc: e5953000 ldr r3, [r5] the_object->id = _Objects_Build_id( a0006ae0: e1d520b4 ldrh r2, [r5, #4] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0006ae4: e1a00008 mov r0, r8 a0006ae8: e1a03c03 lsl r3, r3, #24 a0006aec: e3833801 orr r3, r3, #65536 ; 0x10000 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | a0006af0: e1833d82 orr r3, r3, r2, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a0006af4: e1833006 orr r3, r3, r6 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( a0006af8: e5813008 str r3, [r1, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0006afc: ebfffce1 bl a0005e88 <_Chain_Append> index++; a0006b00: 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 ) { a0006b04: e1a00007 mov r0, r7 a0006b08: ebfffcf1 bl a0005ed4 <_Chain_Get> a0006b0c: e2501000 subs r1, r0, #0 a0006b10: 1afffff1 bne a0006adc <_Objects_Extend_information+0x1d8> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); a0006b14: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a0006b18: e1d531b4 ldrh r3, [r5, #20] a0006b1c: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); a0006b20: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a0006b24: e7813004 str r3, [r1, r4] information->inactive = a0006b28: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } a0006b2c: e28dd014 add sp, sp, #20 a0006b30: 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 ); a0006b34: e58d3000 str r3, [sp] a0006b38: eb0007f1 bl a0008b04 <_Workspace_Allocate> if ( !new_object_block ) a0006b3c: e2508000 subs r8, r0, #0 a0006b40: e59d3000 ldr r3, [sp] a0006b44: 1affff9c bne a00069bc <_Objects_Extend_information+0xb8> a0006b48: eafffff7 b a0006b2c <_Objects_Extend_information+0x228> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, a0006b4c: e1a03103 lsl r3, r3, #2 a0006b50: e5951034 ldr r1, [r5, #52] ; 0x34 a0006b54: e1a02003 mov r2, r3 a0006b58: e88d1008 stm sp, {r3, ip} a0006b5c: eb001a54 bl a000d4b4 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, a0006b60: e89d1008 ldm sp, {r3, ip} a0006b64: e5951030 ldr r1, [r5, #48] ; 0x30 a0006b68: e1a0000c mov r0, ip a0006b6c: e1a02003 mov r2, r3 a0006b70: eb001a4f bl a000d4b4 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); a0006b74: e1d521b0 ldrh r2, [r5, #16] information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, a0006b78: e1a0000b mov r0, fp a0006b7c: e595101c ldr r1, [r5, #28] information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); a0006b80: e0872002 add r2, r7, r2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, a0006b84: e1a02102 lsl r2, r2, #2 a0006b88: eb001a49 bl a000d4b4 a0006b8c: e89d1008 ldm sp, {r3, ip} a0006b90: eaffffa4 b a0006a28 <_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 ) a0006b94: e1d0a1b0 ldrh sl, [r0, #16] a0006b98: e1d011b4 ldrh r1, [r0, #20] /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a0006b9c: e1a06007 mov r6, r7 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; a0006ba0: e3a09001 mov r9, #1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; a0006ba4: e1a03004 mov r3, r4 a0006ba8: eaffff77 b a000698c <_Objects_Extend_information+0x88> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { a0006bac: e1a01008 mov r1, r8 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a0006bb0: e1a06007 mov r6, r7 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; a0006bb4: e3a09001 mov r9, #1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; a0006bb8: e1a04003 mov r4, r3 <== NOT EXECUTED a0006bbc: eaffff72 b a000698c <_Objects_Extend_information+0x88> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); a0006bc0: e1a00008 mov r0, r8 a0006bc4: eb0007d4 bl a0008b1c <_Workspace_Free> return; a0006bc8: eaffffd7 b a0006b2c <_Objects_Extend_information+0x228> =============================================================================== a0006f1c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { a0006f1c: e92d40f0 push {r4, r5, r6, r7, lr} /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); a0006f20: e1d040b8 ldrh r4, [r0, #8] block_count = (information->maximum - index_base) / a0006f24: e1d051b4 ldrh r5, [r0, #20] */ void _Objects_Shrink_information( Objects_Information *information ) { a0006f28: e1a06000 mov r6, r0 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / a0006f2c: e1d001b0 ldrh r0, [r0, #16] a0006f30: e1a01005 mov r1, r5 a0006f34: e0640000 rsb r0, r4, r0 a0006f38: eb0024ce bl a0010278 <__aeabi_uidiv> information->allocation_size; for ( block = 0; block < block_count; block++ ) { a0006f3c: e3500000 cmp r0, #0 a0006f40: 0a00000d beq a0006f7c <_Objects_Shrink_information+0x60> if ( information->inactive_per_block[ block ] == a0006f44: e5962030 ldr r2, [r6, #48] ; 0x30 a0006f48: e5923000 ldr r3, [r2] a0006f4c: e1550003 cmp r5, r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { a0006f50: 13a03000 movne r3, #0 if ( information->inactive_per_block[ block ] == a0006f54: 1a000005 bne a0006f70 <_Objects_Shrink_information+0x54> a0006f58: ea000008 b a0006f80 <_Objects_Shrink_information+0x64> <== NOT EXECUTED a0006f5c: e5b21004 ldr r1, [r2, #4]! information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; a0006f60: e0844005 add r4, r4, r5 a0006f64: e1a07103 lsl r7, r3, #2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == a0006f68: e1550001 cmp r5, r1 a0006f6c: 0a000004 beq a0006f84 <_Objects_Shrink_information+0x68> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { a0006f70: e2833001 add r3, r3, #1 a0006f74: e1500003 cmp r0, r3 a0006f78: 8afffff7 bhi a0006f5c <_Objects_Shrink_information+0x40> a0006f7c: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == a0006f80: e3a07000 mov r7, #0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); a0006f84: e5960020 ldr r0, [r6, #32] a0006f88: ea000002 b a0006f98 <_Objects_Shrink_information+0x7c> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); a0006f8c: e3550000 cmp r5, #0 a0006f90: 0a00000b beq a0006fc4 <_Objects_Shrink_information+0xa8> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; a0006f94: e1a00005 mov r0, r5 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); a0006f98: e1d030b8 ldrh r3, [r0, #8] /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; a0006f9c: e5905000 ldr r5, [r0] if ((index >= index_base) && a0006fa0: e1530004 cmp r3, r4 a0006fa4: 3afffff8 bcc a0006f8c <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { a0006fa8: e1d621b4 ldrh r2, [r6, #20] a0006fac: e0842002 add r2, r4, r2 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && a0006fb0: e1530002 cmp r3, r2 a0006fb4: 2afffff4 bcs a0006f8c <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); a0006fb8: ebfffbbd bl a0005eb4 <_Chain_Extract> } } while ( the_object ); a0006fbc: e3550000 cmp r5, #0 a0006fc0: 1afffff3 bne a0006f94 <_Objects_Shrink_information+0x78> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); a0006fc4: e5963034 ldr r3, [r6, #52] ; 0x34 a0006fc8: e7930007 ldr r0, [r3, r7] a0006fcc: eb0006d2 bl a0008b1c <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; a0006fd0: e1d602bc ldrh r0, [r6, #44] ; 0x2c a0006fd4: e1d631b4 ldrh r3, [r6, #20] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; a0006fd8: e5961034 ldr r1, [r6, #52] ; 0x34 information->inactive_per_block[ block ] = 0; a0006fdc: e5962030 ldr r2, [r6, #48] ; 0x30 information->inactive -= information->allocation_size; a0006fe0: e0633000 rsb r3, r3, r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; a0006fe4: e7815007 str r5, [r1, r7] information->inactive_per_block[ block ] = 0; a0006fe8: e7825007 str r5, [r2, r7] information->inactive -= information->allocation_size; a0006fec: e1c632bc strh r3, [r6, #44] ; 0x2c return; a0006ff0: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0006550 <_TOD_Validate>: { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a0006550: e59f30bc ldr r3, [pc, #188] ; a0006614 <_TOD_Validate+0xc4> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { a0006554: e92d4010 push {r4, lr} uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0006558: e2504000 subs r4, r0, #0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a000655c: e593100c ldr r1, [r3, #12] if ((!the_tod) || a0006560: 0a000029 beq a000660c <_TOD_Validate+0xbc> ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / a0006564: e3a0093d mov r0, #999424 ; 0xf4000 a0006568: e2800d09 add r0, r0, #576 ; 0x240 a000656c: eb004521 bl a00179f8 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0006570: e5943018 ldr r3, [r4, #24] a0006574: e1500003 cmp r0, r3 a0006578: 9a00001f bls a00065fc <_TOD_Validate+0xac> (the_tod->ticks >= ticks_per_second) || a000657c: e5943014 ldr r3, [r4, #20] a0006580: e353003b cmp r3, #59 ; 0x3b a0006584: 8a00001c bhi a00065fc <_TOD_Validate+0xac> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || a0006588: e5943010 ldr r3, [r4, #16] a000658c: e353003b cmp r3, #59 ; 0x3b a0006590: 8a000019 bhi a00065fc <_TOD_Validate+0xac> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || a0006594: e594300c ldr r3, [r4, #12] a0006598: e3530017 cmp r3, #23 a000659c: 8a000016 bhi a00065fc <_TOD_Validate+0xac> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || a00065a0: e5940004 ldr r0, [r4, #4] rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || a00065a4: e3500000 cmp r0, #0 a00065a8: 0a000016 beq a0006608 <_TOD_Validate+0xb8> (the_tod->month == 0) || a00065ac: e350000c cmp r0, #12 a00065b0: 8a000011 bhi a00065fc <_TOD_Validate+0xac> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a00065b4: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || a00065b8: e3a03d1f mov r3, #1984 ; 0x7c0 a00065bc: e2833003 add r3, r3, #3 a00065c0: e1520003 cmp r2, r3 a00065c4: 9a00000c bls a00065fc <_TOD_Validate+0xac> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) a00065c8: e5944008 ldr r4, [r4, #8] (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a00065cc: e3540000 cmp r4, #0 a00065d0: 0a00000b beq a0006604 <_TOD_Validate+0xb4> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) a00065d4: e3120003 tst r2, #3 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; a00065d8: 059f3038 ldreq r3, [pc, #56] ; a0006618 <_TOD_Validate+0xc8> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a00065dc: 159f3034 ldrne r3, [pc, #52] ; a0006618 <_TOD_Validate+0xc8> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; a00065e0: 0280000d addeq r0, r0, #13 a00065e4: 07930100 ldreq r0, [r3, r0, lsl #2] else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a00065e8: 17930100 ldrne r0, [r3, r0, lsl #2] * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( a00065ec: e1500004 cmp r0, r4 a00065f0: 33a00000 movcc r0, #0 a00065f4: 23a00001 movcs r0, #1 a00065f8: e8bd8010 pop {r4, pc} (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; a00065fc: e3a00000 mov r0, #0 a0006600: e8bd8010 pop {r4, pc} a0006604: e1a00004 mov r0, r4 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } a0006608: e8bd8010 pop {r4, pc} <== NOT EXECUTED (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; a000660c: e1a00004 mov r0, r4 <== NOT EXECUTED a0006610: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a00079d0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a00079d0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; a00079d4: e3a05000 mov r5, #0 a00079d8: e58150f4 str r5, [r1, #244] ; 0xf4 a00079dc: e58150f8 str r5, [r1, #248] ; 0xf8 extensions_area = NULL; the_thread->libc_reent = NULL; a00079e0: e58150f0 str r5, [r1, #240] ; 0xf0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a00079e4: e1a04001 mov r4, r1 a00079e8: e1a0a000 mov sl, r0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); a00079ec: e1a00001 mov r0, r1 a00079f0: e1a01003 mov r1, r3 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a00079f4: e1a06003 mov r6, r3 a00079f8: e59d7024 ldr r7, [sp, #36] ; 0x24 a00079fc: e5dd8028 ldrb r8, [sp, #40] ; 0x28 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); a0007a00: eb000228 bl a00082a8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) a0007a04: e1500005 cmp r0, r5 a0007a08: 13a03000 movne r3, #0 a0007a0c: 03a03001 moveq r3, #1 a0007a10: e1500006 cmp r0, r6 a0007a14: 21a06003 movcs r6, r3 a0007a18: 33836001 orrcc r6, r3, #1 a0007a1c: e1560005 cmp r6, r5 a0007a20: 1a000045 bne a0007b3c <_Thread_Initialize+0x16c> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { a0007a24: e59f9164 ldr r9, [pc, #356] ; a0007b90 <_Thread_Initialize+0x1c0> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; a0007a28: e59430bc ldr r3, [r4, #188] ; 0xbc the_stack->size = size; a0007a2c: e58400b4 str r0, [r4, #180] ; 0xb4 a0007a30: e5995000 ldr r5, [r9] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; a0007a34: e58430b8 str r3, [r4, #184] ; 0xb8 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0007a38: e5846050 str r6, [r4, #80] ; 0x50 a0007a3c: e3550000 cmp r5, #0 the_watchdog->routine = routine; a0007a40: e5846064 str r6, [r4, #100] ; 0x64 the_watchdog->id = id; a0007a44: e5846068 str r6, [r4, #104] ; 0x68 the_watchdog->user_data = user_data; a0007a48: e584606c str r6, [r4, #108] ; 0x6c (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; a0007a4c: 058450fc streq r5, [r4, #252] ; 0xfc #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { a0007a50: 1a00003b bne a0007b44 <_Thread_Initialize+0x174> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; a0007a54: e59d302c ldr r3, [sp, #44] ; 0x2c Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread ); a0007a58: e59f0134 ldr r0, [pc, #308] ; a0007b94 <_Thread_Initialize+0x1c4> } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; a0007a5c: e3a06000 mov r6, #0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; a0007a60: e58430a4 str r3, [r4, #164] ; 0xa4 the_thread->Start.budget_callout = budget_callout; a0007a64: e59d3030 ldr r3, [sp, #48] ; 0x30 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; a0007a68: e3a09001 mov r9, #1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; a0007a6c: e5c480a0 strb r8, [r4, #160] ; 0xa0 the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; a0007a70: e58430a8 str r3, [r4, #168] ; 0xa8 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0007a74: e59d3034 ldr r3, [sp, #52] ; 0x34 the_thread->current_state = STATES_DORMANT; a0007a78: e5849010 str r9, [r4, #16] the_thread->Wait.queue = NULL; a0007a7c: e5846044 str r6, [r4, #68] ; 0x44 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0007a80: e58430ac str r3, [r4, #172] ; 0xac the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; a0007a84: e584601c str r6, [r4, #28] the_thread->real_priority = priority; a0007a88: e5847018 str r7, [r4, #24] the_thread->Start.initial_priority = priority; a0007a8c: e58470b0 str r7, [r4, #176] ; 0xb0 RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return a0007a90: e5903014 ldr r3, [r0, #20] a0007a94: e1a01004 mov r1, r4 a0007a98: e12fff33 blx r3 sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread ); if ( !sched ) a0007a9c: e2508000 subs r8, r0, #0 a0007aa0: 0a00000d beq a0007adc <_Thread_Initialize+0x10c> goto failed; _Thread_Set_priority( the_thread, priority ); a0007aa4: e1a00004 mov r0, r4 a0007aa8: e1a01007 mov r1, r7 a0007aac: eb0001b7 bl a0008190 <_Thread_Set_priority> _Thread_Stack_Free( the_thread ); return false; } a0007ab0: e59a301c ldr r3, [sl, #28] Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a0007ab4: e1d420b8 ldrh r2, [r4, #8] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); a0007ab8: e5846084 str r6, [r4, #132] ; 0x84 a0007abc: e5846088 str r6, [r4, #136] ; 0x88 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0007ac0: e7834102 str r4, [r3, r2, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0007ac4: e59d3038 ldr r3, [sp, #56] ; 0x38 * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); a0007ac8: e1a00004 mov r0, r4 a0007acc: e584300c str r3, [r4, #12] a0007ad0: eb0002e6 bl a0008670 <_User_extensions_Thread_create> if ( extension_status ) a0007ad4: e1500006 cmp r0, r6 a0007ad8: 1a000028 bne a0007b80 <_Thread_Initialize+0x1b0> return true; failed: if ( the_thread->libc_reent ) a0007adc: e59400f0 ldr r0, [r4, #240] ; 0xf0 a0007ae0: e3500000 cmp r0, #0 a0007ae4: 0a000000 beq a0007aec <_Thread_Initialize+0x11c> _Workspace_Free( the_thread->libc_reent ); a0007ae8: eb00040b bl a0008b1c <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0007aec: e59400f4 ldr r0, [r4, #244] ; 0xf4 a0007af0: e3500000 cmp r0, #0 a0007af4: 0a000000 beq a0007afc <_Thread_Initialize+0x12c> _Workspace_Free( the_thread->API_Extensions[i] ); a0007af8: eb000407 bl a0008b1c <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0007afc: e59400f8 ldr r0, [r4, #248] ; 0xf8 a0007b00: e3500000 cmp r0, #0 a0007b04: 0a000000 beq a0007b0c <_Thread_Initialize+0x13c> _Workspace_Free( the_thread->API_Extensions[i] ); a0007b08: eb000403 bl a0008b1c <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) a0007b0c: e3550000 cmp r5, #0 a0007b10: 0a000001 beq a0007b1c <_Thread_Initialize+0x14c> (void) _Workspace_Free( extensions_area ); a0007b14: e1a00005 mov r0, r5 a0007b18: eb0003ff bl a0008b1c <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif if ( sched ) a0007b1c: e3580000 cmp r8, #0 a0007b20: 0a000001 beq a0007b2c <_Thread_Initialize+0x15c> (void) _Workspace_Free( sched ); a0007b24: e1a00008 mov r0, r8 a0007b28: eb0003fb bl a0008b1c <_Workspace_Free> _Thread_Stack_Free( the_thread ); a0007b2c: e1a00004 mov r0, r4 a0007b30: eb0001f7 bl a0008314 <_Thread_Stack_Free> return false; a0007b34: e3a00000 mov r0, #0 a0007b38: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ a0007b3c: e1a00005 mov r0, r5 a0007b40: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( a0007b44: e2855001 add r5, r5, #1 a0007b48: e1a00105 lsl r0, r5, #2 a0007b4c: eb0003ec bl a0008b04 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) a0007b50: e2505000 subs r5, r0, #0 a0007b54: 0a00000b beq a0007b88 <_Thread_Initialize+0x1b8> goto failed; } the_thread->extensions = (void **) extensions_area; a0007b58: e5991000 ldr r1, [r9] a0007b5c: e58450fc str r5, [r4, #252] ; 0xfc a0007b60: e1a03006 mov r3, r6 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; a0007b64: e1a02006 mov r2, r6 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0007b68: e2833001 add r3, r3, #1 a0007b6c: e1530001 cmp r3, r1 the_thread->extensions[i] = NULL; a0007b70: e7852106 str r2, [r5, r6, lsl #2] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0007b74: e1a06003 mov r6, r3 a0007b78: 9afffffa bls a0007b68 <_Thread_Initialize+0x198> a0007b7c: eaffffb4 b a0007a54 <_Thread_Initialize+0x84> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; a0007b80: e1a00009 mov r0, r9 _Thread_Stack_Free( the_thread ); return false; } a0007b84: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; a0007b88: e1a08005 mov r8, r5 a0007b8c: eaffffd2 b a0007adc <_Thread_Initialize+0x10c> =============================================================================== a0007e60 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; a0007e60: 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 ) { a0007e64: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); a0007e68: e281403c add r4, r1, #60 ; 0x3c */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); a0007e6c: e281c038 add ip, r1, #56 ; 0x38 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a0007e70: e5814038 str r4, [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 ) ) a0007e74: e3130020 tst r3, #32 head->previous = NULL; a0007e78: e3a04000 mov r4, #0 tail->previous = head; a0007e7c: e581c040 str ip, [r1, #64] ; 0x40 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; a0007e80: e581403c str r4, [r1, #60] ; 0x3c RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); a0007e84: e1a0c323 lsr ip, r3, #6 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; a0007e88: e5905038 ldr r5, [r0, #56] ; 0x38 if ( _Thread_queue_Is_reverse_search( priority ) ) a0007e8c: 0a00001f beq a0007f10 <_Thread_queue_Enqueue_priority+0xb0> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } a0007e90: e3a0a00c mov sl, #12 a0007e94: e59f917c ldr r9, [pc, #380] ; a0008018 <_Thread_queue_Enqueue_priority+0x1b8> a0007e98: e02a0a9c mla sl, ip, sl, r0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; a0007e9c: e5d94000 ldrb r4, [r9] a0007ea0: e2844001 add r4, r4, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0007ea4: e10f7000 mrs r7, CPSR a0007ea8: e387c080 orr ip, r7, #128 ; 0x80 a0007eac: e129f00c msr CPSR_fc, ip a0007eb0: e1a08007 mov r8, r7 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } a0007eb4: e59ac008 ldr ip, [sl, #8] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a0007eb8: e15c000a cmp ip, sl a0007ebc: 1a000009 bne a0007ee8 <_Thread_queue_Enqueue_priority+0x88> a0007ec0: ea00000b b a0007ef4 <_Thread_queue_Enqueue_priority+0x94> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0007ec4: e10f6000 mrs r6, CPSR a0007ec8: e129f007 msr CPSR_fc, r7 a0007ecc: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); a0007ed0: e59c6010 ldr r6, [ip, #16] 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) ) { a0007ed4: e1150006 tst r5, r6 a0007ed8: 0a000034 beq a0007fb0 <_Thread_queue_Enqueue_priority+0x150> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; a0007edc: e59cc004 ldr ip, [ip, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a0007ee0: e15c000a cmp ip, sl a0007ee4: 0a000002 beq a0007ef4 <_Thread_queue_Enqueue_priority+0x94> search_priority = search_thread->current_priority; a0007ee8: e59c4014 ldr r4, [ip, #20] if ( priority >= search_priority ) a0007eec: e1530004 cmp r3, r4 a0007ef0: 3afffff3 bcc a0007ec4 <_Thread_queue_Enqueue_priority+0x64> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a0007ef4: e5905030 ldr r5, [r0, #48] ; 0x30 a0007ef8: e3550001 cmp r5, #1 a0007efc: 0a00002f beq a0007fc0 <_Thread_queue_Enqueue_priority+0x160> * 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; a0007f00: e5828000 str r8, [r2] return the_thread_queue->sync_state; } a0007f04: e1a00005 mov r0, r5 a0007f08: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} a0007f0c: e12fff1e bx lr a0007f10: e3a0900c mov r9, #12 a0007f14: e00c0c99 mul ip, r9, ip RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); a0007f18: e28ca004 add sl, ip, #4 a0007f1c: e080900c add r9, r0, ip a0007f20: e080a00a add sl, r0, sl static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0007f24: e10f7000 mrs r7, CPSR a0007f28: e387c080 orr ip, r7, #128 ; 0x80 a0007f2c: e129f00c msr CPSR_fc, ip a0007f30: e1a08007 mov r8, r7 a0007f34: e599c000 ldr ip, [r9] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a0007f38: e15c000a cmp ip, sl a0007f3c: 1a000009 bne a0007f68 <_Thread_queue_Enqueue_priority+0x108> a0007f40: ea000032 b a0008010 <_Thread_queue_Enqueue_priority+0x1b0> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0007f44: e10f6000 mrs r6, CPSR a0007f48: e129f007 msr CPSR_fc, r7 a0007f4c: e129f006 msr CPSR_fc, r6 a0007f50: e59c6010 ldr r6, [ip, #16] 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) ) { a0007f54: e1150006 tst r5, r6 a0007f58: 0a000016 beq a0007fb8 <_Thread_queue_Enqueue_priority+0x158> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; a0007f5c: e59cc000 ldr ip, [ip] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a0007f60: e15c000a cmp ip, sl a0007f64: 0a000002 beq a0007f74 <_Thread_queue_Enqueue_priority+0x114> search_priority = search_thread->current_priority; a0007f68: e59c4014 ldr r4, [ip, #20] if ( priority <= search_priority ) a0007f6c: e1530004 cmp r3, r4 a0007f70: 8afffff3 bhi a0007f44 <_Thread_queue_Enqueue_priority+0xe4> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a0007f74: e5905030 ldr r5, [r0, #48] ; 0x30 a0007f78: e3550001 cmp r5, #1 a0007f7c: 1affffdf bne a0007f00 <_Thread_queue_Enqueue_priority+0xa0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) a0007f80: e1530004 cmp r3, r4 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; a0007f84: e3a03000 mov r3, #0 a0007f88: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0007f8c: 0a000016 beq a0007fec <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; a0007f90: e59c3004 ldr r3, [ip, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0007f94: e581c000 str ip, [r1] the_node->previous = previous_node; a0007f98: e5813004 str r3, [r1, #4] previous_node->next = the_node; a0007f9c: e5831000 str r1, [r3] search_node->previous = the_node; a0007fa0: e58c1004 str r1, [ip, #4] the_thread->Wait.queue = the_thread_queue; a0007fa4: e5810044 str r0, [r1, #68] ; 0x44 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0007fa8: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0007fac: eaffffd4 b a0007f04 <_Thread_queue_Enqueue_priority+0xa4> a0007fb0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED a0007fb4: eaffffb8 b a0007e9c <_Thread_queue_Enqueue_priority+0x3c> <== NOT EXECUTED a0007fb8: e129f007 msr CPSR_fc, r7 a0007fbc: eaffffd8 b a0007f24 <_Thread_queue_Enqueue_priority+0xc4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) a0007fc0: e1530004 cmp r3, r4 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; a0007fc4: e3a03000 mov r3, #0 a0007fc8: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0007fcc: 0a000006 beq a0007fec <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; a0007fd0: e59c3000 ldr r3, [ip] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; a0007fd4: e8811008 stm r1, {r3, ip} search_node->next = the_node; next_node->previous = the_node; a0007fd8: 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; a0007fdc: e58c1000 str r1, [ip] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0007fe0: e5810044 str r0, [r1, #68] ; 0x44 a0007fe4: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0007fe8: eaffffc5 b a0007f04 <_Thread_queue_Enqueue_priority+0xa4> equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; a0007fec: e59c3040 ldr r3, [ip, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; _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 ); a0007ff0: e28c203c add r2, ip, #60 ; 0x3c previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0007ff4: e881000c stm r1, {r2, r3} the_node->previous = previous_node; previous_node->next = the_node; a0007ff8: e5831000 str r1, [r3] search_node->previous = the_node; a0007ffc: e58c1040 str r1, [ip, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; a0008000: e5810044 str r0, [r1, #68] ; 0x44 a0008004: e129f008 msr CPSR_fc, r8 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0008008: e3a05001 mov r5, #1 a000800c: eaffffbc b a0007f04 <_Thread_queue_Enqueue_priority+0xa4> if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; a0008010: e3e04000 mvn r4, #0 a0008014: eaffffd6 b a0007f74 <_Thread_queue_Enqueue_priority+0x114> =============================================================================== a000a194 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) a000a194: e5902000 ldr r2, [r0] a000a198: e5913000 ldr r3, [r1] a000a19c: e1520003 cmp r2, r3 return true; a000a1a0: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) a000a1a4: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) a000a1a8: ba000005 blt a000a1c4 <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( a000a1ac: e5900004 ldr r0, [r0, #4] a000a1b0: e5913004 ldr r3, [r1, #4] a000a1b4: e1500003 cmp r0, r3 a000a1b8: d3a00000 movle r0, #0 a000a1bc: c3a00001 movgt r0, #1 a000a1c0: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; a000a1c4: e3a00000 mov r0, #0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } a000a1c8: e12fff1e bx lr =============================================================================== a0008670 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { a0008670: e92d40f0 push {r4, r5, r6, r7, lr} return false; } } return true; } a0008674: e59f504c ldr r5, [pc, #76] ; a00086c8 <_User_extensions_Thread_create+0x58> #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { a0008678: e1a06000 mov r6, r0 return false; } } return true; } a000867c: e4954004 ldr r4, [r5], #4 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); a0008680: e1540005 cmp r4, r5 a0008684: 0a00000d beq a00086c0 <_User_extensions_Thread_create+0x50> the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( a0008688: e59f703c ldr r7, [pc, #60] ; a00086cc <_User_extensions_Thread_create+0x5c> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { a000868c: e5943014 ldr r3, [r4, #20] status = (*the_extension->Callouts.thread_create)( a0008690: e1a01006 mov r1, r6 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { a0008694: e3530000 cmp r3, #0 a0008698: 0a000003 beq a00086ac <_User_extensions_Thread_create+0x3c> status = (*the_extension->Callouts.thread_create)( a000869c: e5970004 ldr r0, [r7, #4] a00086a0: e12fff33 blx r3 _Thread_Executing, the_thread ); if ( !status ) a00086a4: e3500000 cmp r0, #0 a00086a8: 0a000005 beq a00086c4 <_User_extensions_Thread_create+0x54> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { a00086ac: e5944000 ldr r4, [r4] { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); a00086b0: e1540005 cmp r4, r5 a00086b4: 1afffff4 bne a000868c <_User_extensions_Thread_create+0x1c> if ( !status ) return false; } } return true; a00086b8: e3a00001 mov r0, #1 a00086bc: e8bd80f0 pop {r4, r5, r6, r7, pc} a00086c0: e3a00001 mov r0, #1 <== NOT EXECUTED } a00086c4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000a4c4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a000a4c4: e92d41f0 push {r4, r5, r6, r7, r8, lr} a000a4c8: e1a04000 mov r4, r0 a000a4cc: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000a4d0: e10f3000 mrs r3, CPSR a000a4d4: e3832080 orr r2, r3, #128 ; 0x80 a000a4d8: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } a000a4dc: e1a07000 mov r7, r0 a000a4e0: 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 ) ) { a000a4e4: e1520007 cmp r2, r7 a000a4e8: 0a000018 beq a000a550 <_Watchdog_Adjust+0x8c> switch ( direction ) { a000a4ec: e3510000 cmp r1, #0 a000a4f0: 1a000018 bne a000a558 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a000a4f4: e3550000 cmp r5, #0 a000a4f8: 0a000014 beq a000a550 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a000a4fc: e5926010 ldr r6, [r2, #16] a000a500: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000a504: 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 ) { a000a508: 2a000005 bcs a000a524 <_Watchdog_Adjust+0x60> a000a50c: ea000018 b a000a574 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a000a510: e0555006 subs r5, r5, r6 a000a514: 0a00000d beq a000a550 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a000a518: e5926010 ldr r6, [r2, #16] a000a51c: e1560005 cmp r6, r5 a000a520: 8a000013 bhi a000a574 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000a524: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000a528: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a000a52c: e1a00004 mov r0, r4 a000a530: eb0000aa bl a000a7e0 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000a534: e10f3000 mrs r3, CPSR a000a538: e3832080 orr r2, r3, #128 ; 0x80 a000a53c: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } a000a540: e5941000 ldr r1, [r4] _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a000a544: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); a000a548: e1a02001 mov r2, r1 a000a54c: 1affffef bne a000a510 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000a550: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a000a554: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a000a558: e3510001 cmp r1, #1 a000a55c: 1afffffb bne a000a550 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a000a560: e5921010 ldr r1, [r2, #16] a000a564: e0815005 add r5, r1, r5 a000a568: e5825010 str r5, [r2, #16] a000a56c: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a000a570: 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; a000a574: e0655006 rsb r5, r5, r6 a000a578: e5825010 str r5, [r2, #16] break; a000a57c: eafffff3 b a000a550 <_Watchdog_Adjust+0x8c> =============================================================================== a000629c : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a000629c: e92d4030 push {r4, r5, lr} a00062a0: e1a04002 mov r4, r2 a00062a4: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); a00062a8: eb000136 bl a0006788 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { a00062ac: e3500000 cmp r0, #0 a00062b0: 1a000000 bne a00062b8 sc = rtems_event_send( task, events ); } return sc; } a00062b4: e8bd8030 pop {r4, r5, pc} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a00062b8: e1a00004 mov r0, r4 a00062bc: e1a01005 mov r1, r5 } return sc; } a00062c0: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a00062c4: eafffd86 b a00058e4 =============================================================================== a0006354 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a0006354: e92d4030 push {r4, r5, lr} a0006358: e1a04002 mov r4, r2 a000635c: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); a0006360: eb000157 bl a00068c4 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { a0006364: e3500000 cmp r0, #0 a0006368: 1a000000 bne a0006370 sc = rtems_event_send( task, events ); } return sc; } a000636c: e8bd8030 pop {r4, r5, pc} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a0006370: e1a00004 mov r0, r4 a0006374: e1a01005 mov r1, r5 } return sc; } a0006378: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a000637c: eafffd58 b a00058e4 =============================================================================== a0006e00 : 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 ) { a0006e00: e92d4030 push {r4, r5, lr} a0006e04: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) a0006e08: e59f014c ldr r0, [pc, #332] ; a0006f5c 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; a0006e0c: e59f314c ldr r3, [pc, #332] ; a0006f60 if ( rtems_interrupt_is_in_progress() ) a0006e10: e5900000 ldr r0, [r0] a0006e14: 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; a0006e18: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) a0006e1c: 1a000033 bne a0006ef0 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) a0006e20: e3520000 cmp r2, #0 a0006e24: 0a000041 beq a0006f30 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) a0006e28: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; a0006e2c: e5820000 str r0, [r2] if ( driver_table == NULL ) a0006e30: 0a00003e beq a0006f30 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006e34: e591c000 ldr ip, [r1] a0006e38: e35c0000 cmp ip, #0 a0006e3c: 0a000038 beq a0006f24 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) a0006e40: e1500004 cmp r0, r4 a0006e44: 9a000027 bls a0006ee8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a0006e48: e59f0114 ldr r0, [pc, #276] ; a0006f64 a0006e4c: e590c000 ldr ip, [r0] a0006e50: e28cc001 add ip, ip, #1 a0006e54: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { a0006e58: e3540000 cmp r4, #0 a0006e5c: 1a000025 bne a0006ef8 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; a0006e60: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { a0006e64: e35c0000 cmp ip, #0 a0006e68: 0a000032 beq a0006f38 a0006e6c: e59fe0f4 ldr lr, [pc, #244] ; a0006f68 a0006e70: e59e3000 ldr r3, [lr] a0006e74: ea000003 b a0006e88 a0006e78: e2844001 add r4, r4, #1 a0006e7c: e15c0004 cmp ip, r4 a0006e80: e2833018 add r3, r3, #24 a0006e84: 9a000005 bls a0006ea0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006e88: e5930000 ldr r0, [r3] a0006e8c: e3500000 cmp r0, #0 a0006e90: 1afffff8 bne a0006e78 a0006e94: e5930004 ldr r0, [r3, #4] a0006e98: e3500000 cmp r0, #0 a0006e9c: 1afffff5 bne a0006e78 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) a0006ea0: e15c0004 cmp ip, r4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a0006ea4: e5824000 str r4, [r2] if ( m != n ) a0006ea8: 0a000023 beq a0006f3c a0006eac: e3a0c018 mov ip, #24 a0006eb0: e00c0c94 mul ip, r4, ip } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; a0006eb4: e59e5000 ldr r5, [lr] a0006eb8: e1a0e001 mov lr, r1 a0006ebc: e8be000f ldm lr!, {r0, r1, r2, r3} a0006ec0: e085c00c add ip, r5, ip a0006ec4: e8ac000f stmia ip!, {r0, r1, r2, r3} a0006ec8: e89e0003 ldm lr, {r0, r1} a0006ecc: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); a0006ed0: eb000748 bl a0008bf8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); a0006ed4: e3a01000 mov r1, #0 a0006ed8: e1a00004 mov r0, r4 a0006edc: e1a02001 mov r2, r1 } a0006ee0: e8bd4030 pop {r4, r5, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); a0006ee4: ea001edd b a000ea60 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; a0006ee8: e3a0000a mov r0, #10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } a0006eec: e8bd8030 pop {r4, r5, pc} ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; a0006ef0: e3a00012 mov r0, #18 a0006ef4: e8bd8030 pop {r4, r5, pc} _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; a0006ef8: e59fe068 ldr lr, [pc, #104] ; a0006f68 a0006efc: e3a0c018 mov ip, #24 a0006f00: e00c0c94 mul ip, r4, ip a0006f04: e59e3000 ldr r3, [lr] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006f08: e793000c ldr r0, [r3, ip] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; a0006f0c: e083300c add r3, r3, ip static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006f10: e3500000 cmp r0, #0 a0006f14: 0a00000b beq a0006f48 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(); a0006f18: eb000736 bl a0008bf8 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; a0006f1c: e3a0000c mov r0, #12 a0006f20: e8bd8030 pop {r4, r5, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006f24: e591c004 ldr ip, [r1, #4] a0006f28: e35c0000 cmp ip, #0 a0006f2c: 1affffc3 bne a0006e40 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; a0006f30: e3a00009 mov r0, #9 a0006f34: e8bd8030 pop {r4, r5, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a0006f38: 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(); a0006f3c: eb00072d bl a0008bf8 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; a0006f40: e3a00005 mov r0, #5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; a0006f44: e8bd8030 pop {r4, r5, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006f48: e5933004 ldr r3, [r3, #4] a0006f4c: e3530000 cmp r3, #0 a0006f50: 1afffff0 bne a0006f18 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; a0006f54: e5824000 str r4, [r2] a0006f58: eaffffd5 b a0006eb4 =============================================================================== a000c770 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { a000c770: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) a000c774: e2525000 subs r5, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { a000c778: e1a04000 mov r4, r0 a000c77c: e1a06001 mov r6, r1 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) a000c780: 0a000053 beq a000c8d4 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; a000c784: e59f9158 ldr r9, [pc, #344] ; a000c8e4 a000c788: e5997004 ldr r7, [r9, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; a000c78c: e59780f4 ldr r8, [r7, #244] ; 0xf4 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; a000c790: e5d7a074 ldrb sl, [r7, #116] ; 0x74 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) a000c794: e597307c ldr r3, [r7, #124] ; 0x7c old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a000c798: e5d8b008 ldrb fp, [r8, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; a000c79c: e35a0000 cmp sl, #0 a000c7a0: 03a0ac01 moveq sl, #256 ; 0x100 a000c7a4: 13a0a000 movne sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) a000c7a8: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; a000c7ac: 138aac02 orrne sl, sl, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a000c7b0: e35b0000 cmp fp, #0 a000c7b4: 03a0bb01 moveq fp, #1024 ; 0x400 a000c7b8: 13a0b000 movne fp, #0 old_mode |= _ISR_Get_level(); a000c7bc: ebfff1cc bl a0008ef4 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a000c7c0: e18bb000 orr fp, fp, r0 old_mode |= _ISR_Get_level(); a000c7c4: e18ba00a orr sl, fp, sl *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) a000c7c8: e3160c01 tst r6, #256 ; 0x100 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; a000c7cc: e585a000 str sl, [r5] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) a000c7d0: 0a000003 beq a000c7e4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; a000c7d4: e3140c01 tst r4, #256 ; 0x100 a000c7d8: 13a03000 movne r3, #0 a000c7dc: 03a03001 moveq r3, #1 a000c7e0: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { a000c7e4: e3160c02 tst r6, #512 ; 0x200 a000c7e8: 1a00001c bne a000c860 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) a000c7ec: e3160080 tst r6, #128 ; 0x80 a000c7f0: 1a000023 bne a000c884 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { a000c7f4: e2166b01 ands r6, r6, #1024 ; 0x400 a000c7f8: 0a000012 beq a000c848 is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a000c7fc: e5d82008 ldrb r2, [r8, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( a000c800: e3140b01 tst r4, #1024 ; 0x400 a000c804: 13a03000 movne r3, #0 a000c808: 03a03001 moveq r3, #1 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a000c80c: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; a000c810: 03a06000 moveq r6, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a000c814: 0a00000b beq a000c848 asr->is_enabled = is_asr_enabled; a000c818: e5c83008 strb r3, [r8, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000c81c: e10f3000 mrs r3, CPSR a000c820: e3832080 orr r2, r3, #128 ; 0x80 a000c824: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; a000c828: e5981018 ldr r1, [r8, #24] information->signals_pending = information->signals_posted; a000c82c: e5982014 ldr r2, [r8, #20] information->signals_posted = _signals; a000c830: e5881014 str r1, [r8, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; a000c834: e5882018 str r2, [r8, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000c838: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { a000c83c: e5986014 ldr r6, [r8, #20] a000c840: e3560000 cmp r6, #0 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; a000c844: 13a06001 movne r6, #1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { a000c848: e59f3098 ldr r3, [pc, #152] ; a000c8e8 a000c84c: e5933000 ldr r3, [r3] a000c850: e3530003 cmp r3, #3 a000c854: 0a00000d beq a000c890 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a000c858: e3a00000 mov r0, #0 <== NOT EXECUTED a000c85c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { a000c860: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; a000c864: 13a03001 movne r3, #1 a000c868: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; a000c86c: 159f3078 ldrne r3, [pc, #120] ; a000c8ec } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; a000c870: 0587307c streq r3, [r7, #124] ; 0x7c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; a000c874: 15933000 ldrne r3, [r3] a000c878: 15873078 strne r3, [r7, #120] ; 0x78 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) a000c87c: e3160080 tst r6, #128 ; 0x80 a000c880: 0affffdb beq a000c7f4 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); a000c884: e2040080 and r0, r4, #128 ; 0x80 a000c888: ebfff194 bl a0008ee0 <_CPU_ISR_Set_level> a000c88c: eaffffd8 b a000c7f4 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || a000c890: e3560000 cmp r6, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; a000c894: e5993004 ldr r3, [r9, #4] if ( are_signals_pending || a000c898: 1a000008 bne a000c8c0 a000c89c: e59f2040 ldr r2, [pc, #64] ; a000c8e4 a000c8a0: e5922008 ldr r2, [r2, #8] a000c8a4: e1530002 cmp r3, r2 a000c8a8: 0a00000b beq a000c8dc (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { a000c8ac: e5d33074 ldrb r3, [r3, #116] ; 0x74 a000c8b0: e3530000 cmp r3, #0 a000c8b4: 1a000001 bne a000c8c0 if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a000c8b8: e1a00006 mov r0, r6 <== NOT EXECUTED } a000c8bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED _Thread_Dispatch_necessary = true; a000c8c0: e3a03001 mov r3, #1 a000c8c4: e5c93010 strb r3, [r9, #16] } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); a000c8c8: ebffebc0 bl a00077d0 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; a000c8cc: e3a00000 mov r0, #0 a000c8d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; a000c8d4: e3a00009 mov r0, #9 a000c8d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a000c8dc: e1a00006 mov r0, r6 a000c8e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}