=============================================================================== 30016c94 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30016c94: 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 ) { 30016c98: 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 ) { 30016c9c: 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 ) { 30016ca0: e1a07000 mov r7, r0 30016ca4: e1a05002 mov r5, r2 30016ca8: e1a08001 mov r8, r1 30016cac: 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 ) { 30016cb0: 3a000016 bcc 30016d10 <_CORE_message_queue_Broadcast+0x7c> * 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 ) { 30016cb4: e5906048 ldr r6, [r0, #72] ; 0x48 30016cb8: e3560000 cmp r6, #0 *count = 0; 30016cbc: 13a00000 movne r0, #0 30016cc0: 158a0000 strne r0, [sl] * 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 ) { 30016cc4: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30016cc8: e1a00007 mov r0, r7 30016ccc: eb000abf bl 300197d0 <_Thread_queue_Dequeue> 30016cd0: e2504000 subs r4, r0, #0 30016cd4: 0a00000a beq 30016d04 <_CORE_message_queue_Broadcast+0x70> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30016cd8: e594002c ldr r0, [r4, #44] ; 0x2c 30016cdc: e1a01008 mov r1, r8 30016ce0: e1a02005 mov r2, r5 30016ce4: eb002040 bl 3001edec buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30016ce8: e5943028 ldr r3, [r4, #40] ; 0x28 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30016cec: e1a00007 mov r0, r7 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30016cf0: 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 = 30016cf4: eb000ab5 bl 300197d0 <_Thread_queue_Dequeue> 30016cf8: e2504000 subs r4, r0, #0 _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 30016cfc: e2866001 add r6, r6, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30016d00: 1afffff4 bne 30016cd8 <_CORE_message_queue_Broadcast+0x44> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 30016d04: e58a6000 str r6, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 30016d08: e1a00004 mov r0, r4 30016d0c: 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; 30016d10: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30016d14: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 3000ac38 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 3000ac38: e59f215c ldr r2, [pc, #348] ; 3000ad9c <_CORE_mutex_Seize_interrupt_trylock+0x164> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 3000ac3c: 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 ) { 3000ac40: e1a03000 mov r3, r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 3000ac44: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 3000ac48: e3a00000 mov r0, #0 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 3000ac4c: e15c0000 cmp ip, r0 3000ac50: 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; 3000ac54: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 3000ac58: 0a00000e beq 3000ac98 <_CORE_mutex_Seize_interrupt_trylock+0x60> return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 3000ac5c: e593c048 ldr ip, [r3, #72] ; 0x48 the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 3000ac60: e5925008 ldr r5, [r2, #8] the_mutex->nest_count = 1; 3000ac64: e3a04001 mov r4, #1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 3000ac68: 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; 3000ac6c: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; 3000ac70: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; 3000ac74: e5835060 str r5, [r3, #96] ; 0x60 the_mutex->nest_count = 1; 3000ac78: e5834054 str r4, [r3, #84] ; 0x54 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 3000ac7c: 0a000013 beq 3000acd0 <_CORE_mutex_Seize_interrupt_trylock+0x98> 3000ac80: e35c0003 cmp ip, #3 3000ac84: 0a000018 beq 3000acec <_CORE_mutex_Seize_interrupt_trylock+0xb4> 3000ac88: e5913000 ldr r3, [r1] 3000ac8c: e129f003 msr CPSR_fc, r3 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); return 0; 3000ac90: e3a00000 mov r0, #0 3000ac94: 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 ) ) { 3000ac98: e593005c ldr r0, [r3, #92] ; 0x5c 3000ac9c: e1520000 cmp r2, r0 /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 3000aca0: 13a00001 movne r0, #1 /* * 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 ) ) { 3000aca4: 18bd80f0 popne {r4, r5, r6, r7, pc} switch ( the_mutex->Attributes.lock_nesting_behavior ) { 3000aca8: e5930040 ldr r0, [r3, #64] ; 0x40 3000acac: e3500000 cmp r0, #0 3000acb0: 1a00001e bne 3000ad30 <_CORE_mutex_Seize_interrupt_trylock+0xf8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 3000acb4: e5932054 ldr r2, [r3, #84] ; 0x54 3000acb8: e2822001 add r2, r2, #1 3000acbc: e5832054 str r2, [r3, #84] ; 0x54 3000acc0: e5913000 ldr r3, [r1] 3000acc4: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; 3000acc8: e3a00000 mov r0, #0 3000accc: 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++; 3000acd0: e592301c ldr r3, [r2, #28] 3000acd4: e2833001 add r3, r3, #1 3000acd8: e582301c str r3, [r2, #28] 3000acdc: e5913000 ldr r3, [r1] 3000ace0: e129f003 msr CPSR_fc, r3 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); return 0; 3000ace4: e3a00000 mov r0, #0 3000ace8: 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++; 3000acec: e592c01c ldr ip, [r2, #28] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 3000acf0: e593704c ldr r7, [r3, #76] ; 0x4c current = executing->current_priority; 3000acf4: e5926014 ldr r6, [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++; 3000acf8: e08c5004 add r5, ip, r4 Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 3000acfc: e1570006 cmp r7, r6 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 3000ad00: e582501c str r5, [r2, #28] Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 3000ad04: 0a000020 beq 3000ad8c <_CORE_mutex_Seize_interrupt_trylock+0x154> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 3000ad08: 3a000012 bcc 3000ad58 <_CORE_mutex_Seize_interrupt_trylock+0x120> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 3000ad0c: e3a05006 mov r5, #6 3000ad10: e5825034 str r5, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; 3000ad14: e5834050 str r4, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ 3000ad18: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ 3000ad1c: e582c01c str ip, [r2, #28] 3000ad20: e5913000 ldr r3, [r1] 3000ad24: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; 3000ad28: e3a00000 mov r0, #0 3000ad2c: 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 ) { 3000ad30: e3500001 cmp r0, #1 3000ad34: 0a000001 beq 3000ad40 <_CORE_mutex_Seize_interrupt_trylock+0x108> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 3000ad38: e3a00001 mov r0, #1 3000ad3c: 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; 3000ad40: e3a03002 mov r3, #2 <== NOT EXECUTED 3000ad44: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED 3000ad48: e5913000 ldr r3, [r1] <== NOT EXECUTED 3000ad4c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _ISR_Enable( *level_p ); return 0; 3000ad50: e3a00000 mov r0, #0 <== NOT EXECUTED 3000ad54: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000ad58: e59f2040 ldr r2, [pc, #64] ; 3000ada0 <_CORE_mutex_Seize_interrupt_trylock+0x168> 3000ad5c: e5920000 ldr r0, [r2] 3000ad60: e2800001 add r0, r0, #1 3000ad64: e5820000 str r0, [r2] 3000ad68: e5912000 ldr r2, [r1] 3000ad6c: e129f002 msr CPSR_fc, r2 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 3000ad70: e3a02000 mov r2, #0 3000ad74: e593005c ldr r0, [r3, #92] ; 0x5c 3000ad78: e593104c ldr r1, [r3, #76] ; 0x4c 3000ad7c: ebfff1ff bl 30007580 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 3000ad80: ebfff338 bl 30007a68 <_Thread_Enable_dispatch> return 0; 3000ad84: e3a00000 mov r0, #0 3000ad88: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000ad8c: e5913000 ldr r3, [r1] 3000ad90: e129f003 msr CPSR_fc, r3 ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); return 0; 3000ad94: e3a00000 mov r0, #0 3000ad98: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 3000ae18 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000ae18: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000ae1c: 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; 3000ae20: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000ae24: e24dd01c sub sp, sp, #28 3000ae28: 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 ) { 3000ae2c: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000ae30: 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 ) { 3000ae34: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000ae38: 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; 3000ae3c: 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 ) { 3000ae40: 2a000078 bcs 3000b028 <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 3000ae44: e3530000 cmp r3, #0 3000ae48: 1a000074 bne 3000b020 <_Heap_Allocate_aligned_with_boundary+0x208> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 3000ae4c: 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 ) { 3000ae50: e1570009 cmp r7, r9 3000ae54: 0a000073 beq 3000b028 <_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 3000ae58: e59d300c ldr r3, [sp, #12] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 3000ae5c: e2651004 rsb r1, r5, #4 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 3000ae60: e2833007 add r3, r3, #7 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 3000ae64: 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 3000ae68: e58d3010 str r3, [sp, #16] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 3000ae6c: 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 ) { 3000ae70: e599a004 ldr sl, [r9, #4] 3000ae74: e59d2000 ldr r2, [sp] 3000ae78: e152000a cmp r2, sl 3000ae7c: 2a00004e bcs 3000afbc <_Heap_Allocate_aligned_with_boundary+0x1a4> if ( alignment == 0 ) { 3000ae80: 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; 3000ae84: 02894008 addeq r4, r9, #8 3000ae88: 0a000051 beq 3000afd4 <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 3000ae8c: 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; 3000ae90: 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; 3000ae94: 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; 3000ae98: 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; 3000ae9c: 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; 3000aea0: e081400a add r4, r1, sl if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 3000aea4: 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; 3000aea8: e0633002 rsb r3, r3, r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000aeac: 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 3000aeb0: e083a00a add sl, r3, sl 3000aeb4: 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; 3000aeb8: e2893008 add r3, r9, #8 3000aebc: e58d3008 str r3, [sp, #8] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000aec0: eb00156c bl 30010478 <__umodsi3> 3000aec4: 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 ) { 3000aec8: e15a0004 cmp sl, r4 3000aecc: 2a000003 bcs 3000aee0 <_Heap_Allocate_aligned_with_boundary+0xc8> 3000aed0: e1a0000a mov r0, sl 3000aed4: e1a01008 mov r1, r8 3000aed8: eb001566 bl 30010478 <__umodsi3> 3000aedc: e060400a rsb r4, r0, sl } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 3000aee0: e35b0000 cmp fp, #0 3000aee4: 0a000026 beq 3000af84 <_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; 3000aee8: e084a005 add sl, r4, r5 3000aeec: e1a0000a mov r0, sl 3000aef0: e1a0100b mov r1, fp 3000aef4: eb00155f bl 30010478 <__umodsi3> 3000aef8: 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 ) { 3000aefc: e15a0000 cmp sl, r0 3000af00: 93a0a000 movls sl, #0 3000af04: 83a0a001 movhi sl, #1 3000af08: e1540000 cmp r4, r0 3000af0c: 23a0a000 movcs sl, #0 3000af10: e35a0000 cmp sl, #0 3000af14: 0a00001a beq 3000af84 <_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; 3000af18: e59d1008 ldr r1, [sp, #8] 3000af1c: 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 ) { 3000af20: e1530000 cmp r3, r0 3000af24: 958d9018 strls r9, [sp, #24] 3000af28: 91a09003 movls r9, r3 3000af2c: 9a000002 bls 3000af3c <_Heap_Allocate_aligned_with_boundary+0x124> 3000af30: ea000021 b 3000afbc <_Heap_Allocate_aligned_with_boundary+0x1a4> 3000af34: e1590000 cmp r9, r0 3000af38: 8a00003c bhi 3000b030 <_Heap_Allocate_aligned_with_boundary+0x218> return 0; } alloc_begin = boundary_line - alloc_size; 3000af3c: e0654000 rsb r4, r5, r0 3000af40: e1a01008 mov r1, r8 3000af44: e1a00004 mov r0, r4 3000af48: eb00154a bl 30010478 <__umodsi3> 3000af4c: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 3000af50: e084a005 add sl, r4, r5 3000af54: e1a0000a mov r0, sl 3000af58: e1a0100b mov r1, fp 3000af5c: eb001545 bl 30010478 <__umodsi3> 3000af60: 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 ) { 3000af64: e15a0000 cmp sl, r0 3000af68: 93a0a000 movls sl, #0 3000af6c: 83a0a001 movhi sl, #1 3000af70: e1540000 cmp r4, r0 3000af74: 23a0a000 movcs sl, #0 3000af78: e35a0000 cmp sl, #0 3000af7c: 1affffec bne 3000af34 <_Heap_Allocate_aligned_with_boundary+0x11c> 3000af80: 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 ) { 3000af84: e59d2008 ldr r2, [sp, #8] 3000af88: e1520004 cmp r2, r4 3000af8c: 8a00000a bhi 3000afbc <_Heap_Allocate_aligned_with_boundary+0x1a4> 3000af90: e59d100c ldr r1, [sp, #12] 3000af94: e1a00004 mov r0, r4 3000af98: eb001536 bl 30010478 <__umodsi3> 3000af9c: e3e0a007 mvn sl, #7 3000afa0: e069a00a rsb sl, r9, sl uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 3000afa4: e08aa004 add sl, sl, r4 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 ) { 3000afa8: e59d1004 ldr r1, [sp, #4] 3000afac: e060300a rsb r3, r0, sl 3000afb0: e15a0000 cmp sl, r0 3000afb4: 11510003 cmpne r1, r3 3000afb8: 9a000005 bls 3000afd4 <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( alloc_begin != 0 ) { break; } block = block->next; 3000afbc: e5999008 ldr r9, [r9, #8] 3000afc0: 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 ) { 3000afc4: e1570009 cmp r7, r9 3000afc8: 0a00001d beq 3000b044 <_Heap_Allocate_aligned_with_boundary+0x22c> 3000afcc: e1a06003 mov r6, r3 3000afd0: eaffffa6 b 3000ae70 <_Heap_Allocate_aligned_with_boundary+0x58> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 3000afd4: e3540000 cmp r4, #0 3000afd8: 0afffff7 beq 3000afbc <_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; 3000afdc: e5972048 ldr r2, [r7, #72] ; 0x48 stats->searches += search_count; 3000afe0: e597304c ldr r3, [r7, #76] ; 0x4c search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 3000afe4: e2822001 add r2, r2, #1 stats->searches += search_count; 3000afe8: 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; 3000afec: e5872048 str r2, [r7, #72] ; 0x48 stats->searches += search_count; 3000aff0: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 3000aff4: e1a00007 mov r0, r7 3000aff8: e1a01009 mov r1, r9 3000affc: e1a02004 mov r2, r4 3000b000: e1a03005 mov r3, r5 3000b004: ebffee05 bl 30006820 <_Heap_Block_allocate> 3000b008: e1a00004 mov r0, r4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 3000b00c: e5973044 ldr r3, [r7, #68] ; 0x44 3000b010: e1530006 cmp r3, r6 stats->max_search = search_count; 3000b014: 35876044 strcc r6, [r7, #68] ; 0x44 } return (void *) alloc_begin; } 3000b018: e28dd01c add sp, sp, #28 3000b01c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 3000b020: e1550003 cmp r5, r3 3000b024: 9a000008 bls 3000b04c <_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 ) { 3000b028: e3a00000 mov r0, #0 3000b02c: eafffff9 b 3000b018 <_Heap_Allocate_aligned_with_boundary+0x200> 3000b030: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; 3000b034: e2863001 add r3, r6, #1 <== NOT EXECUTED 3000b038: 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 ) { 3000b03c: e1570009 cmp r7, r9 <== NOT EXECUTED 3000b040: 1affffe1 bne 3000afcc <_Heap_Allocate_aligned_with_boundary+0x1b4><== NOT EXECUTED 3000b044: e3a00000 mov r0, #0 3000b048: eaffffef b 3000b00c <_Heap_Allocate_aligned_with_boundary+0x1f4> if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { alignment = page_size; 3000b04c: e3580000 cmp r8, #0 3000b050: 01a08002 moveq r8, r2 3000b054: eaffff7c b 3000ae4c <_Heap_Allocate_aligned_with_boundary+0x34> =============================================================================== 3000b058 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 3000b058: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000b05c: e1a04000 mov r4, r0 3000b060: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000b064: e1a00001 mov r0, r1 3000b068: e5941010 ldr r1, [r4, #16] 3000b06c: eb001501 bl 30010478 <__umodsi3> 3000b070: e2455008 sub r5, r5, #8 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 3000b074: e5943020 ldr r3, [r4, #32] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 3000b078: 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; 3000b07c: e1550003 cmp r5, r3 3000b080: 3a00002f bcc 3000b144 <_Heap_Free+0xec> 3000b084: e5941024 ldr r1, [r4, #36] ; 0x24 3000b088: e1550001 cmp r5, r1 3000b08c: 8a00002c bhi 3000b144 <_Heap_Free+0xec> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000b090: 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; 3000b094: 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); 3000b098: 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; 3000b09c: e1530002 cmp r3, r2 3000b0a0: 8a000027 bhi 3000b144 <_Heap_Free+0xec> 3000b0a4: e1510002 cmp r1, r2 3000b0a8: 3a000027 bcc 3000b14c <_Heap_Free+0xf4> 3000b0ac: 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 ) ) { 3000b0b0: e2170001 ands r0, r7, #1 3000b0b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} 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 )); 3000b0b8: 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; 3000b0bc: e3c77001 bic r7, r7, #1 3000b0c0: 03a08000 moveq r8, #0 3000b0c4: 0a000004 beq 3000b0dc <_Heap_Free+0x84> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000b0c8: 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; 3000b0cc: e5900004 ldr r0, [r0, #4] return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 3000b0d0: e3100001 tst r0, #1 3000b0d4: 13a08000 movne r8, #0 3000b0d8: 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 ) ) { 3000b0dc: e21c0001 ands r0, ip, #1 3000b0e0: 1a00001b bne 3000b154 <_Heap_Free+0xfc> uintptr_t const prev_size = block->prev_size; 3000b0e4: 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); 3000b0e8: 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; 3000b0ec: e153000a cmp r3, sl 3000b0f0: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc} 3000b0f4: e151000a cmp r1, sl 3000b0f8: 38bd85f0 popcc {r4, r5, r6, r7, r8, sl, pc} 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; 3000b0fc: 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) ) { 3000b100: e2100001 ands r0, r0, #1 3000b104: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 3000b108: e3580000 cmp r8, #0 3000b10c: 0a000039 beq 3000b1f8 <_Heap_Free+0x1a0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 3000b110: e5940038 ldr r0, [r4, #56] ; 0x38 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 3000b114: e0867007 add r7, r6, r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000b118: 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; 3000b11c: e087c00c add ip, r7, ip --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000b120: e592200c ldr r2, [r2, #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; 3000b124: e2400001 sub r0, r0, #1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000b128: 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; 3000b12c: e5823008 str r3, [r2, #8] next->prev = prev; 3000b130: 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; 3000b134: e5840038 str r0, [r4, #56] ; 0x38 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000b138: 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; 3000b13c: e78ac00c str ip, [sl, ip] 3000b140: ea00000f b 3000b184 <_Heap_Free+0x12c> _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; 3000b144: e3a00000 mov r0, #0 3000b148: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3000b14c: e3a00000 mov r0, #0 <== NOT EXECUTED --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000b150: 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 */ 3000b154: e3580000 cmp r8, #0 3000b158: 0a000014 beq 3000b1b0 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000b15c: e5923008 ldr r3, [r2, #8] 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; 3000b160: e0877006 add r7, r7, r6 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000b164: e592200c ldr r2, [r2, #12] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000b168: e3871001 orr r1, r7, #1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 3000b16c: e5853008 str r3, [r5, #8] new_block->prev = prev; 3000b170: e585200c str r2, [r5, #12] next->prev = new_block; prev->next = new_block; 3000b174: e5825008 str r5, [r2, #8] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 3000b178: e583500c str r5, [r3, #12] 3000b17c: e5851004 str r1, [r5, #4] next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 3000b180: e7857007 str r7, [r5, r7] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 3000b184: e5942040 ldr r2, [r4, #64] ; 0x40 ++stats->frees; 3000b188: e5943050 ldr r3, [r4, #80] ; 0x50 stats->free_size += block_size; 3000b18c: e5941030 ldr r1, [r4, #48] ; 0x30 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 3000b190: e2422001 sub r2, r2, #1 ++stats->frees; 3000b194: e2833001 add r3, r3, #1 stats->free_size += block_size; 3000b198: e0816006 add r6, r1, r6 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 3000b19c: e5842040 str r2, [r4, #64] ; 0x40 ++stats->frees; 3000b1a0: e5843050 str r3, [r4, #80] ; 0x50 stats->free_size += block_size; 3000b1a4: e5846030 str r6, [r4, #48] ; 0x30 return( true ); 3000b1a8: e3a00001 mov r0, #1 3000b1ac: 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; 3000b1b0: e3863001 orr r3, r6, #1 3000b1b4: e5853004 str r3, [r5, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 3000b1b8: e5943038 ldr r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { 3000b1bc: 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; 3000b1c0: 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; 3000b1c4: e5941008 ldr r1, [r4, #8] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 3000b1c8: 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; 3000b1cc: e3c00001 bic r0, r0, #1 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { 3000b1d0: e153000c cmp r3, ip new_block->next = next; 3000b1d4: e5851008 str r1, [r5, #8] new_block->prev = block_before; 3000b1d8: 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; 3000b1dc: e5820004 str r0, [r2, #4] block_before->next = new_block; next->prev = new_block; 3000b1e0: e581500c str r5, [r1, #12] next_block->prev_size = block_size; 3000b1e4: 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; 3000b1e8: e5845008 str r5, [r4, #8] /* Statistics */ ++stats->free_blocks; 3000b1ec: e5843038 str r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 3000b1f0: 8584303c strhi r3, [r4, #60] ; 0x3c 3000b1f4: eaffffe2 b 3000b184 <_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; 3000b1f8: e086c00c add ip, r6, ip prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000b1fc: e38c3001 orr r3, ip, #1 3000b200: e58a3004 str r3, [sl, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 3000b204: e5923004 ldr r3, [r2, #4] next_block->prev_size = size; 3000b208: 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; 3000b20c: e3c33001 bic r3, r3, #1 3000b210: e5823004 str r3, [r2, #4] 3000b214: eaffffda b 3000b184 <_Heap_Free+0x12c> =============================================================================== 300129a8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 300129a8: e92d40f0 push {r4, r5, r6, r7, lr} 300129ac: e1a04000 mov r4, r0 300129b0: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 300129b4: e1a00001 mov r0, r1 300129b8: e5941010 ldr r1, [r4, #16] 300129bc: e1a07002 mov r7, r2 300129c0: ebfff6ac bl 30010478 <__umodsi3> 300129c4: e2456008 sub r6, r5, #8 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 300129c8: e5943020 ldr r3, [r4, #32] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 300129cc: 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; 300129d0: e1500003 cmp r0, r3 300129d4: 3a000010 bcc 30012a1c <_Heap_Size_of_alloc_area+0x74> 300129d8: e5942024 ldr r2, [r4, #36] ; 0x24 300129dc: e1500002 cmp r0, r2 300129e0: 8a00000d bhi 30012a1c <_Heap_Size_of_alloc_area+0x74> - 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; 300129e4: e5906004 ldr r6, [r0, #4] 300129e8: 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); 300129ec: 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; 300129f0: e1530006 cmp r3, r6 300129f4: 8a000008 bhi 30012a1c <_Heap_Size_of_alloc_area+0x74> 300129f8: e1520006 cmp r2, r6 300129fc: 3a000008 bcc 30012a24 <_Heap_Size_of_alloc_area+0x7c> 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; 30012a00: 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 ) 30012a04: e2100001 ands r0, r0, #1 ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 30012a08: 12655004 rsbne r5, r5, #4 30012a0c: 10856006 addne r6, r5, r6 30012a10: 15876000 strne r6, [r7] return true; 30012a14: 13a00001 movne r0, #1 30012a18: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 30012a1c: e3a00000 mov r0, #0 30012a20: e8bd80f0 pop {r4, r5, r6, r7, pc} 30012a24: e3a00000 mov r0, #0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 30012a28: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 30007580 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30007580: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 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() ) ) { 30007584: e59f35cc ldr r3, [pc, #1484] ; 30007b58 <_Heap_Walk+0x5d8> 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; 30007588: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 3000758c: 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; 30007590: e59f25c4 ldr r2, [pc, #1476] ; 30007b5c <_Heap_Walk+0x5dc> 30007594: e59f95c4 ldr r9, [pc, #1476] ; 30007b60 <_Heap_Walk+0x5e0> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30007598: e1a0a001 mov sl, r1 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; 3000759c: 11a09002 movne r9, r2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 300075a0: e5901010 ldr r1, [r0, #16] 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() ) ) { 300075a4: 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; 300075a8: e5902014 ldr r2, [r0, #20] Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 300075ac: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 300075b0: e24dd038 sub sp, sp, #56 ; 0x38 300075b4: e1a04000 mov r4, r0 uintptr_t const page_size = heap->page_size; 300075b8: e58d1024 str r1, [sp, #36] ; 0x24 uintptr_t const min_block_size = heap->min_block_size; 300075bc: e58d2028 str r2, [sp, #40] ; 0x28 Heap_Block *const first_block = heap->first_block; 300075c0: e5908020 ldr r8, [r0, #32] Heap_Block *const last_block = heap->last_block; 300075c4: 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() ) ) { 300075c8: 0a000002 beq 300075d8 <_Heap_Walk+0x58> } block = next_block; } while ( block != first_block ); return true; 300075cc: e3a00001 mov r0, #1 } 300075d0: e28dd038 add sp, sp, #56 ; 0x38 300075d4: 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)( 300075d8: e594101c ldr r1, [r4, #28] 300075dc: e5900018 ldr r0, [r0, #24] 300075e0: e5942008 ldr r2, [r4, #8] 300075e4: e594300c ldr r3, [r4, #12] 300075e8: e59dc028 ldr ip, [sp, #40] ; 0x28 300075ec: e58d1008 str r1, [sp, #8] 300075f0: e59d102c ldr r1, [sp, #44] ; 0x2c 300075f4: e58d0004 str r0, [sp, #4] 300075f8: e58d1010 str r1, [sp, #16] 300075fc: e58d2014 str r2, [sp, #20] 30007600: e58d3018 str r3, [sp, #24] 30007604: e59f2558 ldr r2, [pc, #1368] ; 30007b64 <_Heap_Walk+0x5e4> 30007608: e58dc000 str ip, [sp] 3000760c: e58d800c str r8, [sp, #12] 30007610: e1a0000a mov r0, sl 30007614: e3a01000 mov r1, #0 30007618: e59d3024 ldr r3, [sp, #36] ; 0x24 3000761c: e1a0e00f mov lr, pc 30007620: e12fff19 bx r9 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 30007624: e59d2024 ldr r2, [sp, #36] ; 0x24 30007628: e3520000 cmp r2, #0 3000762c: 0a000026 beq 300076cc <_Heap_Walk+0x14c> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 30007630: e59d3024 ldr r3, [sp, #36] ; 0x24 30007634: e2135007 ands r5, r3, #7 30007638: 1a00002a bne 300076e8 <_Heap_Walk+0x168> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 3000763c: e59d0028 ldr r0, [sp, #40] ; 0x28 30007640: e59d1024 ldr r1, [sp, #36] ; 0x24 30007644: ebffe552 bl 30000b94 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 30007648: e250b000 subs fp, r0, #0 3000764c: 1a00002c bne 30007704 <_Heap_Walk+0x184> 30007650: e2880008 add r0, r8, #8 30007654: e59d1024 ldr r1, [sp, #36] ; 0x24 30007658: ebffe54d bl 30000b94 <__umodsi3> ); return false; } if ( 3000765c: e2506000 subs r6, r0, #0 30007660: 1a00002f bne 30007724 <_Heap_Walk+0x1a4> block = next_block; } while ( block != first_block ); return true; } 30007664: e598b004 ldr fp, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 30007668: e21b5001 ands r5, fp, #1 3000766c: 0a0000cd beq 300079a8 <_Heap_Walk+0x428> - 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; 30007670: e59dc02c ldr ip, [sp, #44] ; 0x2c 30007674: e59c3004 ldr r3, [ip, #4] 30007678: 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); 3000767c: 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; 30007680: e5935004 ldr r5, [r3, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 30007684: e2155001 ands r5, r5, #1 30007688: 0a000008 beq 300076b0 <_Heap_Walk+0x130> ); return false; } if ( 3000768c: e1580003 cmp r8, r3 30007690: 0a00002b beq 30007744 <_Heap_Walk+0x1c4> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 30007694: e1a0000a mov r0, sl <== NOT EXECUTED 30007698: e3a01001 mov r1, #1 <== NOT EXECUTED 3000769c: e59f24c4 ldr r2, [pc, #1220] ; 30007b68 <_Heap_Walk+0x5e8> <== NOT EXECUTED 300076a0: e1a0e00f mov lr, pc <== NOT EXECUTED 300076a4: e12fff19 bx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300076a8: e1a00006 mov r0, r6 <== NOT EXECUTED 300076ac: eaffffc7 b 300075d0 <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 300076b0: e1a0000a mov r0, sl 300076b4: e3a01001 mov r1, #1 300076b8: e59f24ac ldr r2, [pc, #1196] ; 30007b6c <_Heap_Walk+0x5ec> 300076bc: e1a0e00f mov lr, pc 300076c0: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300076c4: e1a00005 mov r0, r5 300076c8: eaffffc0 b 300075d0 <_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" ); 300076cc: e1a0000a mov r0, sl 300076d0: e3a01001 mov r1, #1 300076d4: e59f2494 ldr r2, [pc, #1172] ; 30007b70 <_Heap_Walk+0x5f0> 300076d8: e1a0e00f mov lr, pc 300076dc: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300076e0: e59d0024 ldr r0, [sp, #36] ; 0x24 300076e4: eaffffb9 b 300075d0 <_Heap_Walk+0x50> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 300076e8: e1a0000a mov r0, sl 300076ec: e3a01001 mov r1, #1 300076f0: e59f247c ldr r2, [pc, #1148] ; 30007b74 <_Heap_Walk+0x5f4> 300076f4: e1a0e00f mov lr, pc 300076f8: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300076fc: e3a00000 mov r0, #0 30007700: eaffffb2 b 300075d0 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 30007704: e1a0000a mov r0, sl 30007708: e3a01001 mov r1, #1 3000770c: e59f2464 ldr r2, [pc, #1124] ; 30007b78 <_Heap_Walk+0x5f8> 30007710: e59d3028 ldr r3, [sp, #40] ; 0x28 30007714: e1a0e00f mov lr, pc 30007718: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 3000771c: e1a00005 mov r0, r5 30007720: eaffffaa b 300075d0 <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 30007724: e1a0000a mov r0, sl 30007728: e3a01001 mov r1, #1 3000772c: e59f2448 ldr r2, [pc, #1096] ; 30007b7c <_Heap_Walk+0x5fc> 30007730: e1a03008 mov r3, r8 30007734: e1a0e00f mov lr, pc 30007738: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 3000773c: e1a0000b mov r0, fp 30007740: eaffffa2 b 300075d0 <_Heap_Walk+0x50> block = next_block; } while ( block != first_block ); return true; } 30007744: e5945008 ldr r5, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30007748: 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 ) { 3000774c: e1540005 cmp r4, r5 30007750: 05943020 ldreq r3, [r4, #32] 30007754: 0a00000d beq 30007790 <_Heap_Walk+0x210> block = next_block; } while ( block != first_block ); return true; } 30007758: 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; 3000775c: e1530005 cmp r3, r5 30007760: 9a000097 bls 300079c4 <_Heap_Walk+0x444> 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)( 30007764: e1a0000a mov r0, sl 30007768: e3a01001 mov r1, #1 3000776c: e59f240c ldr r2, [pc, #1036] ; 30007b80 <_Heap_Walk+0x600> 30007770: e1a03005 mov r3, r5 30007774: e1a0e00f mov lr, pc 30007778: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 3000777c: e3a00000 mov r0, #0 30007780: eaffff92 b 300075d0 <_Heap_Walk+0x50> 30007784: e1a03008 mov r3, r8 30007788: e59db034 ldr fp, [sp, #52] ; 0x34 3000778c: e59d8030 ldr r8, [sp, #48] ; 0x30 ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007790: 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; 30007794: 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); 30007798: 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; 3000779c: e1530005 cmp r3, r5 300077a0: 9a000008 bls 300077c8 <_Heap_Walk+0x248> 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)( 300077a4: e1a0000a mov r0, sl 300077a8: e58d5000 str r5, [sp] 300077ac: e3a01001 mov r1, #1 300077b0: e59f23cc ldr r2, [pc, #972] ; 30007b84 <_Heap_Walk+0x604> 300077b4: e1a03006 mov r3, r6 300077b8: e1a0e00f mov lr, pc 300077bc: e12fff19 bx r9 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 300077c0: e3a00000 mov r0, #0 300077c4: eaffff81 b 300075d0 <_Heap_Walk+0x50> 300077c8: e5943024 ldr r3, [r4, #36] ; 0x24 300077cc: e1530005 cmp r3, r5 300077d0: 3afffff3 bcc 300077a4 <_Heap_Walk+0x224> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 300077d4: e59d1024 ldr r1, [sp, #36] ; 0x24 300077d8: e1a00007 mov r0, r7 300077dc: ebffe4ec bl 30000b94 <__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; 300077e0: e59d102c ldr r1, [sp, #44] ; 0x2c 300077e4: e0563001 subs r3, r6, r1 300077e8: 13a03001 movne r3, #1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 300077ec: e3500000 cmp r0, #0 300077f0: 0a000001 beq 300077fc <_Heap_Walk+0x27c> 300077f4: e3530000 cmp r3, #0 300077f8: 1a0000aa bne 30007aa8 <_Heap_Walk+0x528> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 300077fc: e59d2028 ldr r2, [sp, #40] ; 0x28 30007800: e1520007 cmp r2, r7 30007804: 9a000001 bls 30007810 <_Heap_Walk+0x290> 30007808: e3530000 cmp r3, #0 3000780c: 1a0000ae bne 30007acc <_Heap_Walk+0x54c> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 30007810: e1560005 cmp r6, r5 30007814: 3a000001 bcc 30007820 <_Heap_Walk+0x2a0> 30007818: e3530000 cmp r3, #0 3000781c: 1a0000b4 bne 30007af4 <_Heap_Walk+0x574> 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; 30007820: e5953004 ldr r3, [r5, #4] 30007824: e20bb001 and fp, fp, #1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 30007828: e3130001 tst r3, #1 3000782c: 0a000018 beq 30007894 <_Heap_Walk+0x314> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 30007830: e35b0000 cmp fp, #0 30007834: 0a00000c beq 3000786c <_Heap_Walk+0x2ec> (*printer)( 30007838: e58d7000 str r7, [sp] 3000783c: e1a0000a mov r0, sl 30007840: e3a01000 mov r1, #0 30007844: e59f233c ldr r2, [pc, #828] ; 30007b88 <_Heap_Walk+0x608> 30007848: e1a03006 mov r3, r6 3000784c: e1a0e00f mov lr, pc 30007850: e12fff19 bx r9 block->prev_size ); } block = next_block; } while ( block != first_block ); 30007854: e1580005 cmp r8, r5 30007858: 0affff5b beq 300075cc <_Heap_Walk+0x4c> 3000785c: e595b004 ldr fp, [r5, #4] 30007860: e5943020 ldr r3, [r4, #32] 30007864: e1a06005 mov r6, r5 30007868: eaffffc9 b 30007794 <_Heap_Walk+0x214> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 3000786c: e58d7000 str r7, [sp] 30007870: e5963000 ldr r3, [r6] 30007874: e1a0000a mov r0, sl 30007878: e58d3004 str r3, [sp, #4] 3000787c: e1a0100b mov r1, fp 30007880: e59f2304 ldr r2, [pc, #772] ; 30007b8c <_Heap_Walk+0x60c> 30007884: e1a03006 mov r3, r6 30007888: e1a0e00f mov lr, pc 3000788c: e12fff19 bx r9 30007890: eaffffef b 30007854 <_Heap_Walk+0x2d4> 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 ? 30007894: 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)( 30007898: e5943008 ldr r3, [r4, #8] block = next_block; } while ( block != first_block ); return true; } 3000789c: 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)( 300078a0: e1530002 cmp r3, r2 300078a4: 059f02e4 ldreq r0, [pc, #740] ; 30007b90 <_Heap_Walk+0x610> 300078a8: 0a000003 beq 300078bc <_Heap_Walk+0x33c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 300078ac: e59f32e0 ldr r3, [pc, #736] ; 30007b94 <_Heap_Walk+0x614> 300078b0: e1540002 cmp r4, r2 300078b4: e59f02dc ldr r0, [pc, #732] ; 30007b98 <_Heap_Walk+0x618> 300078b8: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 300078bc: 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)( 300078c0: e1510003 cmp r1, r3 300078c4: 059f12d0 ldreq r1, [pc, #720] ; 30007b9c <_Heap_Walk+0x61c> 300078c8: 0a000003 beq 300078dc <_Heap_Walk+0x35c> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 300078cc: e59fc2cc ldr ip, [pc, #716] ; 30007ba0 <_Heap_Walk+0x620> 300078d0: e1540003 cmp r4, r3 300078d4: e59f12bc ldr r1, [pc, #700] ; 30007b98 <_Heap_Walk+0x618> 300078d8: 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)( 300078dc: e58d2004 str r2, [sp, #4] 300078e0: e58d0008 str r0, [sp, #8] 300078e4: e58d300c str r3, [sp, #12] 300078e8: e58d1010 str r1, [sp, #16] 300078ec: e1a03006 mov r3, r6 300078f0: e58d7000 str r7, [sp] 300078f4: e1a0000a mov r0, sl 300078f8: e3a01000 mov r1, #0 300078fc: e59f22a0 ldr r2, [pc, #672] ; 30007ba4 <_Heap_Walk+0x624> 30007900: e1a0e00f mov lr, pc 30007904: e12fff19 bx r9 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 30007908: e5953000 ldr r3, [r5] 3000790c: e1570003 cmp r7, r3 30007910: 1a000011 bne 3000795c <_Heap_Walk+0x3dc> ); return false; } if ( !prev_used ) { 30007914: e35b0000 cmp fp, #0 30007918: 0a00001a beq 30007988 <_Heap_Walk+0x408> block = next_block; } while ( block != first_block ); return true; } 3000791c: 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 ) { 30007920: e1540003 cmp r4, r3 30007924: 0a000004 beq 3000793c <_Heap_Walk+0x3bc> if ( free_block == block ) { 30007928: e1560003 cmp r6, r3 3000792c: 0affffc8 beq 30007854 <_Heap_Walk+0x2d4> return true; } free_block = free_block->next; 30007930: 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 ) { 30007934: e1540003 cmp r4, r3 30007938: 1afffffa bne 30007928 <_Heap_Walk+0x3a8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 3000793c: e1a0000a mov r0, sl 30007940: e3a01001 mov r1, #1 30007944: e59f225c ldr r2, [pc, #604] ; 30007ba8 <_Heap_Walk+0x628> 30007948: e1a03006 mov r3, r6 3000794c: e1a0e00f mov lr, pc 30007950: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 30007954: e3a00000 mov r0, #0 30007958: eaffff1c b 300075d0 <_Heap_Walk+0x50> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 3000795c: e58d3004 str r3, [sp, #4] 30007960: e1a0000a mov r0, sl 30007964: e58d7000 str r7, [sp] 30007968: e58d5008 str r5, [sp, #8] 3000796c: e3a01001 mov r1, #1 30007970: e59f2234 ldr r2, [pc, #564] ; 30007bac <_Heap_Walk+0x62c> 30007974: e1a03006 mov r3, r6 30007978: e1a0e00f mov lr, pc 3000797c: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 30007980: e3a00000 mov r0, #0 30007984: eaffff11 b 300075d0 <_Heap_Walk+0x50> return false; } if ( !prev_used ) { (*printer)( 30007988: e1a0000a mov r0, sl 3000798c: e3a01001 mov r1, #1 30007990: e59f2218 ldr r2, [pc, #536] ; 30007bb0 <_Heap_Walk+0x630> 30007994: e1a03006 mov r3, r6 30007998: e1a0e00f mov lr, pc 3000799c: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 300079a0: e1a0000b mov r0, fp 300079a4: eaffff09 b 300075d0 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 300079a8: e1a0000a mov r0, sl 300079ac: e3a01001 mov r1, #1 300079b0: e59f21fc ldr r2, [pc, #508] ; 30007bb4 <_Heap_Walk+0x634> 300079b4: e1a0e00f mov lr, pc 300079b8: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300079bc: e1a00005 mov r0, r5 300079c0: eaffff02 b 300075d0 <_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; 300079c4: e594c024 ldr ip, [r4, #36] ; 0x24 300079c8: e15c0005 cmp ip, r5 300079cc: 3affff64 bcc 30007764 <_Heap_Walk+0x1e4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 300079d0: e2850008 add r0, r5, #8 300079d4: e1a01007 mov r1, r7 300079d8: e58d3020 str r3, [sp, #32] 300079dc: e58dc01c str ip, [sp, #28] 300079e0: ebffe46b bl 30000b94 <__umodsi3> ); return false; } if ( 300079e4: e3500000 cmp r0, #0 300079e8: e59d3020 ldr r3, [sp, #32] 300079ec: e59dc01c ldr ip, [sp, #28] 300079f0: 1a000048 bne 30007b18 <_Heap_Walk+0x598> - 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; 300079f4: e5952004 ldr r2, [r5, #4] 300079f8: e3c22001 bic r2, r2, #1 block = next_block; } while ( block != first_block ); return true; } 300079fc: 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; 30007a00: e5922004 ldr r2, [r2, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007a04: e3120001 tst r2, #1 30007a08: 1a00004a bne 30007b38 <_Heap_Walk+0x5b8> 30007a0c: e58d8030 str r8, [sp, #48] ; 0x30 30007a10: e58db034 str fp, [sp, #52] ; 0x34 30007a14: e1a01004 mov r1, r4 30007a18: e1a06005 mov r6, r5 30007a1c: e1a08003 mov r8, r3 30007a20: e1a0b00c mov fp, ip 30007a24: ea000013 b 30007a78 <_Heap_Walk+0x4f8> return false; } prev_block = free_block; free_block = free_block->next; 30007a28: 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 ) { 30007a2c: e1540005 cmp r4, r5 30007a30: 0affff53 beq 30007784 <_Heap_Walk+0x204> 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; 30007a34: e1580005 cmp r8, r5 30007a38: 8affff49 bhi 30007764 <_Heap_Walk+0x1e4> 30007a3c: e155000b cmp r5, fp RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007a40: e2850008 add r0, r5, #8 30007a44: 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; 30007a48: 8affff45 bhi 30007764 <_Heap_Walk+0x1e4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007a4c: ebffe450 bl 30000b94 <__umodsi3> ); return false; } if ( 30007a50: e3500000 cmp r0, #0 30007a54: 1a00002f bne 30007b18 <_Heap_Walk+0x598> - 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; 30007a58: e5953004 ldr r3, [r5, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007a5c: e1a01006 mov r1, r6 30007a60: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 30007a64: 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; 30007a68: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007a6c: e1a06005 mov r6, r5 30007a70: e3130001 tst r3, #1 30007a74: 1a00002f bne 30007b38 <_Heap_Walk+0x5b8> ); return false; } if ( free_block->prev != prev_block ) { 30007a78: e595200c ldr r2, [r5, #12] 30007a7c: e1520001 cmp r2, r1 30007a80: 0affffe8 beq 30007a28 <_Heap_Walk+0x4a8> (*printer)( 30007a84: e58d2000 str r2, [sp] 30007a88: e1a0000a mov r0, sl 30007a8c: e3a01001 mov r1, #1 30007a90: e59f2120 ldr r2, [pc, #288] ; 30007bb8 <_Heap_Walk+0x638> 30007a94: e1a03005 mov r3, r5 30007a98: e1a0e00f mov lr, pc 30007a9c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007aa0: e3a00000 mov r0, #0 30007aa4: eafffec9 b 300075d0 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 30007aa8: e1a0000a mov r0, sl 30007aac: e58d7000 str r7, [sp] 30007ab0: e3a01001 mov r1, #1 30007ab4: e59f2100 ldr r2, [pc, #256] ; 30007bbc <_Heap_Walk+0x63c> 30007ab8: e1a03006 mov r3, r6 30007abc: e1a0e00f mov lr, pc 30007ac0: e12fff19 bx r9 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 30007ac4: e3a00000 mov r0, #0 30007ac8: eafffec0 b 300075d0 <_Heap_Walk+0x50> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 30007acc: e58d2004 str r2, [sp, #4] 30007ad0: e1a0000a mov r0, sl 30007ad4: e58d7000 str r7, [sp] 30007ad8: e3a01001 mov r1, #1 30007adc: e59f20dc ldr r2, [pc, #220] ; 30007bc0 <_Heap_Walk+0x640> 30007ae0: e1a03006 mov r3, r6 30007ae4: e1a0e00f mov lr, pc 30007ae8: e12fff19 bx r9 block, block_size, min_block_size ); return false; 30007aec: e3a00000 mov r0, #0 30007af0: eafffeb6 b 300075d0 <_Heap_Walk+0x50> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 30007af4: e1a0000a mov r0, sl 30007af8: e58d5000 str r5, [sp] 30007afc: e3a01001 mov r1, #1 30007b00: e59f20bc ldr r2, [pc, #188] ; 30007bc4 <_Heap_Walk+0x644> 30007b04: e1a03006 mov r3, r6 30007b08: e1a0e00f mov lr, pc 30007b0c: e12fff19 bx r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 30007b10: e3a00000 mov r0, #0 30007b14: eafffead b 300075d0 <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 30007b18: e1a0000a mov r0, sl 30007b1c: e3a01001 mov r1, #1 30007b20: e59f20a0 ldr r2, [pc, #160] ; 30007bc8 <_Heap_Walk+0x648> 30007b24: e1a03005 mov r3, r5 30007b28: e1a0e00f mov lr, pc 30007b2c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007b30: e3a00000 mov r0, #0 30007b34: eafffea5 b 300075d0 <_Heap_Walk+0x50> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 30007b38: e1a0000a mov r0, sl 30007b3c: e3a01001 mov r1, #1 30007b40: e59f2084 ldr r2, [pc, #132] ; 30007bcc <_Heap_Walk+0x64c> 30007b44: e1a03005 mov r3, r5 30007b48: e1a0e00f mov lr, pc 30007b4c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007b50: e3a00000 mov r0, #0 30007b54: eafffe9d b 300075d0 <_Heap_Walk+0x50> =============================================================================== 30006964 <_Internal_error_Occurred>: bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 30006964: e59f303c ldr r3, [pc, #60] ; 300069a8 <_Internal_error_Occurred+0x44> void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30006968: e201c0ff and ip, r1, #255 ; 0xff 3000696c: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 30006970: e1a0100c mov r1, ip bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 30006974: e5830000 str r0, [r3] _Internal_errors_What_happened.is_internal = is_internal; 30006978: e5c3c004 strb ip, [r3, #4] _Internal_errors_What_happened.the_error = the_error; 3000697c: e5832008 str r2, [r3, #8] void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30006980: e1a04002 mov r4, r2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 30006984: eb000777 bl 30008768 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 30006988: e59f301c ldr r3, [pc, #28] ; 300069ac <_Internal_error_Occurred+0x48><== NOT EXECUTED 3000698c: e3a02005 mov r2, #5 <== NOT EXECUTED 30006990: e5832000 str r2, [r3] <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30006994: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30006998: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 3000699c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 300069a0: e1a00004 mov r0, r4 <== NOT EXECUTED 300069a4: eafffffe b 300069a4 <_Internal_error_Occurred+0x40> <== NOT EXECUTED =============================================================================== 30006a6c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30006a6c: 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 ) 30006a70: e5904034 ldr r4, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { 30006a74: e24dd014 sub sp, sp, #20 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 30006a78: e3540000 cmp r4, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 30006a7c: e1a05000 mov r5, r0 /* * 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 ); 30006a80: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 30006a84: 0a00009b beq 30006cf8 <_Objects_Extend_information+0x28c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 30006a88: e1d081b4 ldrh r8, [r0, #20] 30006a8c: e1d0a1b0 ldrh sl, [r0, #16] 30006a90: e1a01008 mov r1, r8 30006a94: e1a0000a mov r0, sl 30006a98: eb002630 bl 30010360 <__aeabi_uidiv> 30006a9c: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 30006aa0: e1b03823 lsrs r3, r3, #16 30006aa4: 0a000099 beq 30006d10 <_Objects_Extend_information+0x2a4> if ( information->object_blocks[ block ] == NULL ) { 30006aa8: e5949000 ldr r9, [r4] 30006aac: e3590000 cmp r9, #0 30006ab0: 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 ); 30006ab4: 01a06007 moveq r6, r7 index_base = minimum_index; block = 0; 30006ab8: 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 ) { 30006abc: 0a00000c beq 30006af4 <_Objects_Extend_information+0x88> 30006ac0: e1a02004 mov r2, r4 30006ac4: 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 ); 30006ac8: e1a06007 mov r6, r7 index_base = minimum_index; block = 0; 30006acc: e3a04000 mov r4, #0 30006ad0: ea000002 b 30006ae0 <_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 ) { 30006ad4: e5b29004 ldr r9, [r2, #4]! 30006ad8: e3590000 cmp r9, #0 30006adc: 0a000004 beq 30006af4 <_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++ ) { 30006ae0: e2844001 add r4, r4, #1 30006ae4: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 30006ae8: 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++ ) { 30006aec: 8afffff8 bhi 30006ad4 <_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; 30006af0: e3a09001 mov r9, #1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 30006af4: 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 ) { 30006af8: e35a0801 cmp sl, #65536 ; 0x10000 30006afc: 2a000063 bcs 30006c90 <_Objects_Extend_information+0x224> /* * 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 ) { 30006b00: 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; 30006b04: e5950018 ldr r0, [r5, #24] if ( information->auto_extend ) { 30006b08: 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; 30006b0c: e0000091 mul r0, r1, r0 if ( information->auto_extend ) { 30006b10: 1a000060 bne 30006c98 <_Objects_Extend_information+0x22c> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 30006b14: e58d3000 str r3, [sp] 30006b18: eb000855 bl 30008c74 <_Workspace_Allocate_or_fatal_error> 30006b1c: e59d3000 ldr r3, [sp] 30006b20: e1a08000 mov r8, r0 } /* * Do we need to grow the tables? */ if ( do_extend ) { 30006b24: e3590000 cmp r9, #0 30006b28: 0a000039 beq 30006c14 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 30006b2c: e283b001 add fp, r3, #1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 30006b30: e08b008b add r0, fp, fp, lsl #1 ((maximum + minimum_index) * sizeof(Objects_Control *)); 30006b34: e08a0000 add r0, sl, r0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 30006b38: e0800007 add r0, r0, r7 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 30006b3c: e1a00100 lsl r0, r0, #2 30006b40: e58d3000 str r3, [sp] 30006b44: eb000840 bl 30008c4c <_Workspace_Allocate> if ( !object_blocks ) { 30006b48: e2509000 subs r9, r0, #0 30006b4c: e59d3000 ldr r3, [sp] 30006b50: 0a000073 beq 30006d24 <_Objects_Extend_information+0x2b8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30006b54: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 30006b58: e089c10b add ip, r9, fp, lsl #2 30006b5c: e1570002 cmp r7, r2 30006b60: e089b18b add fp, r9, fp, lsl #3 30006b64: 3a000051 bcc 30006cb0 <_Objects_Extend_information+0x244> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30006b68: e3570000 cmp r7, #0 30006b6c: 13a02000 movne r2, #0 30006b70: 11a0100b movne r1, fp local_table[ index ] = NULL; 30006b74: 11a00002 movne r0, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30006b78: 0a000003 beq 30006b8c <_Objects_Extend_information+0x120> 30006b7c: e2822001 add r2, r2, #1 30006b80: e1570002 cmp r7, r2 local_table[ index ] = NULL; 30006b84: e4810004 str r0, [r1], #4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30006b88: 8afffffb bhi 30006b7c <_Objects_Extend_information+0x110> 30006b8c: 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 ); 30006b90: e1d511b4 ldrh r1, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30006b94: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30006b98: 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 ; 30006b9c: e1560001 cmp r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30006ba0: e7890003 str r0, [r9, r3] inactive_per_block[block_count] = 0; 30006ba4: e78c0003 str r0, [ip, r3] for ( index=index_base ; 30006ba8: 2a000005 bcs 30006bc4 <_Objects_Extend_information+0x158> 30006bac: e08b2106 add r2, fp, r6, lsl #2 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 30006bb0: 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++ ) { 30006bb4: 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 ; 30006bb8: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 30006bbc: 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 ; 30006bc0: 3afffffb bcc 30006bb4 <_Objects_Extend_information+0x148> 30006bc4: e10f3000 mrs r3, CPSR 30006bc8: e3832080 orr r2, r3, #128 ; 0x80 30006bcc: e129f002 msr CPSR_fc, r2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 30006bd0: 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( 30006bd4: e1d510b4 ldrh r1, [r5, #4] 30006bd8: e1a02c02 lsl r2, r2, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 30006bdc: e1a0a80a lsl sl, sl, #16 30006be0: e3822801 orr r2, r2, #65536 ; 0x10000 30006be4: e1a0a82a lsr sl, sl, #16 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 30006be8: 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) | 30006bec: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 30006bf0: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 30006bf4: e585c030 str ip, [r5, #48] ; 0x30 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30006bf8: e5859034 str r9, [r5, #52] ; 0x34 information->inactive_per_block = inactive_per_block; information->local_table = local_table; 30006bfc: e585b01c str fp, [r5, #28] information->maximum = (Objects_Maximum) maximum; 30006c00: e1c5a1b0 strh sl, [r5, #16] information->maximum_id = _Objects_Build_id( 30006c04: e585200c str r2, [r5, #12] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30006c08: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 30006c0c: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 30006c10: 1b000813 blne 30008c64 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006c14: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30006c18: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006c1c: e7838104 str r8, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30006c20: e1a01008 mov r1, r8 30006c24: e1a00007 mov r0, r7 30006c28: e1d521b4 ldrh r2, [r5, #20] 30006c2c: e5953018 ldr r3, [r5, #24] 30006c30: eb000fe7 bl 3000abd4 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006c34: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30006c38: 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 ) { 30006c3c: ea000009 b 30006c68 <_Objects_Extend_information+0x1fc> 30006c40: e5953000 ldr r3, [r5] the_object->id = _Objects_Build_id( 30006c44: e1d520b4 ldrh r2, [r5, #4] 30006c48: e1a03c03 lsl r3, r3, #24 30006c4c: e3833801 orr r3, r3, #65536 ; 0x10000 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 30006c50: 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) | 30006c54: e1833006 orr r3, r3, r6 30006c58: e5813008 str r3, [r1, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30006c5c: e1a00008 mov r0, r8 30006c60: ebfffce8 bl 30006008 <_Chain_Append> index++; 30006c64: 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 ) { 30006c68: e1a00007 mov r0, r7 30006c6c: ebfffcf8 bl 30006054 <_Chain_Get> 30006c70: e2501000 subs r1, r0, #0 30006c74: 1afffff1 bne 30006c40 <_Objects_Extend_information+0x1d4> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 30006c78: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30006c7c: e1d531b4 ldrh r3, [r5, #20] 30006c80: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 30006c84: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30006c88: e7813004 str r3, [r1, r4] information->inactive = 30006c8c: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 30006c90: e28dd014 add sp, sp, #20 30006c94: 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 ); 30006c98: e58d3000 str r3, [sp] 30006c9c: eb0007ea bl 30008c4c <_Workspace_Allocate> if ( !new_object_block ) 30006ca0: e2508000 subs r8, r0, #0 30006ca4: e59d3000 ldr r3, [sp] 30006ca8: 1affff9d bne 30006b24 <_Objects_Extend_information+0xb8> 30006cac: eafffff7 b 30006c90 <_Objects_Extend_information+0x224> /* * 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, 30006cb0: e1a03103 lsl r3, r3, #2 30006cb4: e5951034 ldr r1, [r5, #52] ; 0x34 30006cb8: e1a02003 mov r2, r3 30006cbc: e88d1008 stm sp, {r3, ip} 30006cc0: eb001a35 bl 3000d59c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 30006cc4: e89d1008 ldm sp, {r3, ip} 30006cc8: e1a0000c mov r0, ip 30006ccc: e1a02003 mov r2, r3 30006cd0: e5951030 ldr r1, [r5, #48] ; 0x30 30006cd4: eb001a30 bl 3000d59c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 30006cd8: 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, 30006cdc: e1a0000b mov r0, fp information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 30006ce0: 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, 30006ce4: e595101c ldr r1, [r5, #28] 30006ce8: e1a02102 lsl r2, r2, #2 30006cec: eb001a2a bl 3000d59c 30006cf0: e89d1008 ldm sp, {r3, ip} 30006cf4: eaffffa5 b 30006b90 <_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 ) 30006cf8: e1d0a1b0 ldrh sl, [r0, #16] 30006cfc: 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 ); 30006d00: 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; 30006d04: e3a09001 mov r9, #1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 30006d08: e1a03004 mov r3, r4 30006d0c: eaffff78 b 30006af4 <_Objects_Extend_information+0x88> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30006d10: 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 ); 30006d14: 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; 30006d18: e3a09001 mov r9, #1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 30006d1c: e1a04003 mov r4, r3 <== NOT EXECUTED 30006d20: eaffff73 b 30006af4 <_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 ); 30006d24: e1a00008 mov r0, r8 30006d28: eb0007cd bl 30008c64 <_Workspace_Free> return; 30006d2c: eaffffd7 b 30006c90 <_Objects_Extend_information+0x224> =============================================================================== 30007074 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 30007074: 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 ); 30007078: e1d040b8 ldrh r4, [r0, #8] block_count = (information->maximum - index_base) / 3000707c: e1d051b4 ldrh r5, [r0, #20] */ void _Objects_Shrink_information( Objects_Information *information ) { 30007080: 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) / 30007084: e1d001b0 ldrh r0, [r0, #16] 30007088: e1a01005 mov r1, r5 3000708c: e0640000 rsb r0, r4, r0 30007090: eb0024b2 bl 30010360 <__aeabi_uidiv> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 30007094: e3500000 cmp r0, #0 30007098: 08bd80f0 popeq {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 3000709c: e5962030 ldr r2, [r6, #48] ; 0x30 300070a0: e5923000 ldr r3, [r2] 300070a4: 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++ ) { 300070a8: 13a03000 movne r3, #0 if ( information->inactive_per_block[ block ] == 300070ac: 1a000005 bne 300070c8 <_Objects_Shrink_information+0x54> 300070b0: ea000008 b 300070d8 <_Objects_Shrink_information+0x64> <== NOT EXECUTED 300070b4: e5b21004 ldr r1, [r2, #4]! information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 300070b8: e0844005 add r4, r4, r5 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 ] == 300070bc: e1550001 cmp r5, r1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 300070c0: 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 ] == 300070c4: 0a000004 beq 300070dc <_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++ ) { 300070c8: e2833001 add r3, r3, #1 300070cc: e1500003 cmp r0, r3 300070d0: 8afffff7 bhi 300070b4 <_Objects_Shrink_information+0x40> 300070d4: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 300070d8: 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 ); 300070dc: e5960020 ldr r0, [r6, #32] 300070e0: ea000002 b 300070f0 <_Objects_Shrink_information+0x7c> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 300070e4: e3550000 cmp r5, #0 300070e8: 0a00000b beq 3000711c <_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; 300070ec: 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 ); 300070f0: 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; 300070f4: e5905000 ldr r5, [r0] if ((index >= index_base) && 300070f8: e1530004 cmp r3, r4 300070fc: 3afffff8 bcc 300070e4 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { 30007100: e1d621b4 ldrh r2, [r6, #20] 30007104: 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) && 30007108: e1530002 cmp r3, r2 3000710c: 2afffff4 bcs 300070e4 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 30007110: ebfffbc7 bl 30006034 <_Chain_Extract> } } while ( the_object ); 30007114: e3550000 cmp r5, #0 30007118: 1afffff3 bne 300070ec <_Objects_Shrink_information+0x78> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 3000711c: e5963034 ldr r3, [r6, #52] ; 0x34 30007120: e7930007 ldr r0, [r3, r7] 30007124: eb0006ce bl 30008c64 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 30007128: e1d602bc ldrh r0, [r6, #44] ; 0x2c 3000712c: 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; 30007130: e5961034 ldr r1, [r6, #52] ; 0x34 information->inactive_per_block[ block ] = 0; 30007134: e5962030 ldr r2, [r6, #48] ; 0x30 information->inactive -= information->allocation_size; 30007138: 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; 3000713c: e7815007 str r5, [r1, r7] information->inactive_per_block[ block ] = 0; 30007140: e7825007 str r5, [r2, r7] information->inactive -= information->allocation_size; 30007144: e1c632bc strh r3, [r6, #44] ; 0x2c return; 30007148: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 300066d0 <_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(); 300066d0: e59f30b0 ldr r3, [pc, #176] ; 30006788 <_TOD_Validate+0xb8> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 300066d4: 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) || 300066d8: 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(); 300066dc: e593100c ldr r1, [r3, #12] (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; 300066e0: 01a00004 moveq r0, r4 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) || 300066e4: 08bd8010 popeq {r4, pc} ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 300066e8: e59f009c ldr r0, [pc, #156] ; 3000678c <_TOD_Validate+0xbc> 300066ec: eb0044f8 bl 30017ad4 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 300066f0: e5943018 ldr r3, [r4, #24] 300066f4: e1500003 cmp r0, r3 300066f8: 9a00001e bls 30006778 <_TOD_Validate+0xa8> (the_tod->ticks >= ticks_per_second) || 300066fc: e5943014 ldr r3, [r4, #20] 30006700: e353003b cmp r3, #59 ; 0x3b 30006704: 8a00001b bhi 30006778 <_TOD_Validate+0xa8> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 30006708: e5943010 ldr r3, [r4, #16] 3000670c: e353003b cmp r3, #59 ; 0x3b 30006710: 8a000018 bhi 30006778 <_TOD_Validate+0xa8> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 30006714: e594300c ldr r3, [r4, #12] 30006718: e3530017 cmp r3, #23 3000671c: 8a000015 bhi 30006778 <_TOD_Validate+0xa8> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 30006720: 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) || 30006724: e3500000 cmp r0, #0 30006728: 08bd8010 popeq {r4, pc} (the_tod->month == 0) || 3000672c: e350000c cmp r0, #12 30006730: 8a000010 bhi 30006778 <_TOD_Validate+0xa8> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 30006734: e5943000 ldr r3, [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) || 30006738: e59f2050 ldr r2, [pc, #80] ; 30006790 <_TOD_Validate+0xc0> 3000673c: e1530002 cmp r3, r2 30006740: 9a00000c bls 30006778 <_TOD_Validate+0xa8> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 30006744: 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) || 30006748: e3540000 cmp r4, #0 3000674c: 0a00000b beq 30006780 <_TOD_Validate+0xb0> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 30006750: e3130003 tst r3, #3 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 30006754: 059f3038 ldreq r3, [pc, #56] ; 30006794 <_TOD_Validate+0xc4> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 30006758: 159f3034 ldrne r3, [pc, #52] ; 30006794 <_TOD_Validate+0xc4> (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 ]; 3000675c: 0280000d addeq r0, r0, #13 30006760: 07930100 ldreq r0, [r3, r0, lsl #2] else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 30006764: 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( 30006768: e1500004 cmp r0, r4 3000676c: 33a00000 movcc r0, #0 30006770: 23a00001 movcs r0, #1 30006774: 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; 30006778: e3a00000 mov r0, #0 3000677c: e8bd8010 pop {r4, pc} 30006780: e1a00004 mov r0, r4 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } 30006784: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 3000a2d8 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 3000a2d8: e5902000 ldr r2, [r0] 3000a2dc: e5913000 ldr r3, [r1] 3000a2e0: e1520003 cmp r2, r3 return true; 3000a2e4: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 3000a2e8: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) 3000a2ec: ba000005 blt 3000a308 <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( 3000a2f0: e5900004 ldr r0, [r0, #4] 3000a2f4: e5913004 ldr r3, [r1, #4] 3000a2f8: e1500003 cmp r0, r3 3000a2fc: d3a00000 movle r0, #0 3000a300: c3a00001 movgt r0, #1 3000a304: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 3000a308: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 3000a30c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30008768 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008768: e92d41f0 push {r4, r5, r6, r7, r8, lr} the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 3000876c: e59f5040 ldr r5, [pc, #64] ; 300087b4 <_User_extensions_Fatal+0x4c> void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008770: e1a08000 mov r8, r0 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 30008774: e5954008 ldr r4, [r5, #8] void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008778: e1a07002 mov r7, r2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 3000877c: e1540005 cmp r4, r5 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008780: e20160ff and r6, r1, #255 ; 0xff Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 30008784: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 30008788: e5943030 ldr r3, [r4, #48] ; 0x30 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 3000878c: e1a00008 mov r0, r8 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 30008790: e3530000 cmp r3, #0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 30008794: e1a01006 mov r1, r6 30008798: e1a02007 mov r2, r7 3000879c: 11a0e00f movne lr, pc 300087a0: 112fff13 bxne r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 300087a4: e5944004 ldr r4, [r4, #4] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 300087a8: e1540005 cmp r4, r5 300087ac: 1afffff5 bne 30008788 <_User_extensions_Fatal+0x20> 300087b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 300087b8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 300087b8: e92d40f0 push {r4, r5, r6, r7, lr} return false; } } return true; } 300087bc: e59f5050 ldr r5, [pc, #80] ; 30008814 <_User_extensions_Thread_create+0x5c> #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 300087c0: e1a06000 mov r6, r0 return false; } } return true; } 300087c4: e4954004 ldr r4, [r5], #4 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 300087c8: e1540005 cmp r4, r5 300087cc: 0a00000e beq 3000880c <_User_extensions_Thread_create+0x54> 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)( 300087d0: e59f7040 ldr r7, [pc, #64] ; 30008818 <_User_extensions_Thread_create+0x60> !_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 ) { 300087d4: e5943014 ldr r3, [r4, #20] status = (*the_extension->Callouts.thread_create)( 300087d8: 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 ) { 300087dc: e3530000 cmp r3, #0 300087e0: 0a000004 beq 300087f8 <_User_extensions_Thread_create+0x40> status = (*the_extension->Callouts.thread_create)( 300087e4: e5970004 ldr r0, [r7, #4] 300087e8: e1a0e00f mov lr, pc 300087ec: e12fff13 bx r3 _Thread_Executing, the_thread ); if ( !status ) 300087f0: e3500000 cmp r0, #0 300087f4: 08bd80f0 popeq {r4, r5, r6, r7, pc} 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 ) { 300087f8: e5944000 ldr r4, [r4] { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 300087fc: e1540005 cmp r4, r5 30008800: 1afffff3 bne 300087d4 <_User_extensions_Thread_create+0x1c> if ( !status ) return false; } } return true; 30008804: e3a00001 mov r0, #1 30008808: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000880c: e3a00001 mov r0, #1 <== NOT EXECUTED } 30008810: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 3000a5f8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 3000a5f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000a5fc: e1a04000 mov r4, r0 3000a600: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000a604: e10f3000 mrs r3, CPSR 3000a608: e3832080 orr r2, r3, #128 ; 0x80 3000a60c: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } 3000a610: e1a07000 mov r7, r0 3000a614: 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 ) ) { 3000a618: e1520007 cmp r2, r7 3000a61c: 0a000018 beq 3000a684 <_Watchdog_Adjust+0x8c> switch ( direction ) { 3000a620: e3510000 cmp r1, #0 3000a624: 1a000018 bne 3000a68c <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000a628: e3550000 cmp r5, #0 3000a62c: 0a000014 beq 3000a684 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 3000a630: e5926010 ldr r6, [r2, #16] 3000a634: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 3000a638: 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 ) { 3000a63c: 2a000005 bcs 3000a658 <_Watchdog_Adjust+0x60> 3000a640: ea000018 b 3000a6a8 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000a644: e0555006 subs r5, r5, r6 3000a648: 0a00000d beq 3000a684 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 3000a64c: e5926010 ldr r6, [r2, #16] 3000a650: e1560005 cmp r6, r5 3000a654: 8a000013 bhi 3000a6a8 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 3000a658: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000a65c: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); 3000a660: e1a00004 mov r0, r4 3000a664: eb0000aa bl 3000a914 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000a668: e10f3000 mrs r3, CPSR 3000a66c: e3832080 orr r2, r3, #128 ; 0x80 3000a670: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } 3000a674: e5941000 ldr r1, [r4] _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 3000a678: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 3000a67c: e1a02001 mov r2, r1 3000a680: 1affffef bne 3000a644 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000a684: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 3000a688: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 3000a68c: e3510001 cmp r1, #1 3000a690: 1afffffb bne 3000a684 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 3000a694: e5921010 ldr r1, [r2, #16] 3000a698: e0815005 add r5, r1, r5 3000a69c: e5825010 str r5, [r2, #16] 3000a6a0: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 3000a6a4: 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; 3000a6a8: e0655006 rsb r5, r5, r6 3000a6ac: e5825010 str r5, [r2, #16] break; 3000a6b0: eafffff3 b 3000a684 <_Watchdog_Adjust+0x8c> =============================================================================== 300072e0 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 300072e0: e59fc150 ldr ip, [pc, #336] ; 30007438 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; 300072e4: e59f3150 ldr r3, [pc, #336] ; 3000743c if ( rtems_interrupt_is_in_progress() ) 300072e8: e59cc000 ldr ip, [ip] rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 300072ec: e92d4030 push {r4, r5, lr} rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 300072f0: e35c0000 cmp ip, #0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 300072f4: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 300072f8: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 300072fc: 13a00012 movne r0, #18 rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 30007300: 18bd8030 popne {r4, r5, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 30007304: e3520000 cmp r2, #0 30007308: 0a00003f beq 3000740c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 3000730c: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 30007310: e5820000 str r0, [r2] if ( driver_table == NULL ) 30007314: 0a00003c beq 3000740c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007318: e591c000 ldr ip, [r1] 3000731c: e35c0000 cmp ip, #0 30007320: 0a000036 beq 30007400 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 30007324: e1500004 cmp r0, r4 30007328: 9a000027 bls 300073cc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000732c: e59f010c ldr r0, [pc, #268] ; 30007440 30007330: e590c000 ldr ip, [r0] 30007334: e28cc001 add ip, ip, #1 30007338: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 3000733c: e3540000 cmp r4, #0 30007340: 1a000023 bne 300073d4 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 30007344: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 30007348: e35c0000 cmp ip, #0 3000734c: 0a000030 beq 30007414 30007350: e59fe0ec ldr lr, [pc, #236] ; 30007444 30007354: e59e3000 ldr r3, [lr] 30007358: ea000003 b 3000736c 3000735c: e2844001 add r4, r4, #1 30007360: e15c0004 cmp ip, r4 30007364: e2833018 add r3, r3, #24 30007368: 9a000005 bls 30007384 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 3000736c: e5930000 ldr r0, [r3] 30007370: e3500000 cmp r0, #0 30007374: 1afffff8 bne 3000735c 30007378: e5930004 ldr r0, [r3, #4] 3000737c: e3500000 cmp r0, #0 30007380: 1afffff5 bne 3000735c } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 30007384: e15c0004 cmp ip, r4 30007388: 1084c084 addne ip, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 3000738c: e5824000 str r4, [r2] if ( m != n ) 30007390: 11a0c18c lslne ip, ip, #3 30007394: 0a00001f beq 30007418 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 30007398: e59e5000 ldr r5, [lr] 3000739c: e1a0e001 mov lr, r1 300073a0: e085c00c add ip, r5, ip 300073a4: e8be000f ldm lr!, {r0, r1, r2, r3} 300073a8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300073ac: e89e0003 ldm lr, {r0, r1} 300073b0: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 300073b4: eb000759 bl 30009120 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 300073b8: e3a01000 mov r1, #0 300073bc: e1a00004 mov r0, r4 300073c0: e1a02001 mov r2, r1 } 300073c4: e8bd4030 pop {r4, r5, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 300073c8: ea001f1b b 3000f03c if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 300073cc: e3a0000a mov r0, #10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 300073d0: 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; 300073d4: e59fe068 ldr lr, [pc, #104] ; 30007444 300073d8: e0840084 add r0, r4, r4, lsl #1 300073dc: e59e3000 ldr r3, [lr] 300073e0: e1a0c180 lsl ip, r0, #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 300073e4: e7930180 ldr r0, [r3, r0, lsl #3] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 300073e8: 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; 300073ec: e3500000 cmp r0, #0 300073f0: 0a00000b beq 30007424 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(); 300073f4: eb000749 bl 30009120 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 300073f8: e3a0000c mov r0, #12 300073fc: 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; 30007400: e591c004 ldr ip, [r1, #4] 30007404: e35c0000 cmp ip, #0 30007408: 1affffc5 bne 30007324 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 3000740c: e3a00009 mov r0, #9 30007410: e8bd8030 pop {r4, r5, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 30007414: 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(); 30007418: eb000740 bl 30009120 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 3000741c: 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; 30007420: 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; 30007424: e5933004 ldr r3, [r3, #4] 30007428: e3530000 cmp r3, #0 3000742c: 1afffff0 bne 300073f4 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 30007430: e5824000 str r4, [r2] 30007434: eaffffd7 b 30007398 =============================================================================== 3000c864 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000c864: 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 ) 3000c868: e2525000 subs r5, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000c86c: e1a04000 mov r4, r0 3000c870: e1a06001 mov r6, r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 3000c874: 03a00009 moveq r0, #9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 3000c878: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 3000c87c: e59f9148 ldr r9, [pc, #328] ; 3000c9cc 3000c880: e5997004 ldr r7, [r9, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 3000c884: e5d7a074 ldrb sl, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3000c888: e59780f4 ldr r8, [r7, #244] ; 0xf4 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000c88c: e597307c ldr r3, [r7, #124] ; 0x7c executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 3000c890: e35a0000 cmp sl, #0 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; 3000c894: 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; 3000c898: 03a0ac01 moveq sl, #256 ; 0x100 3000c89c: 13a0a000 movne sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000c8a0: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 3000c8a4: 138aac02 orrne sl, sl, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 3000c8a8: e35b0000 cmp fp, #0 3000c8ac: 03a0bb01 moveq fp, #1024 ; 0x400 3000c8b0: 13a0b000 movne fp, #0 old_mode |= _ISR_Get_level(); 3000c8b4: ebfff1e0 bl 3000903c <_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; 3000c8b8: e18bb000 orr fp, fp, r0 old_mode |= _ISR_Get_level(); 3000c8bc: e18ba00a orr sl, fp, sl *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000c8c0: 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; 3000c8c4: e585a000 str sl, [r5] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000c8c8: 0a000003 beq 3000c8dc executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 3000c8cc: e3140c01 tst r4, #256 ; 0x100 3000c8d0: 13a03000 movne r3, #0 3000c8d4: 03a03001 moveq r3, #1 3000c8d8: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { 3000c8dc: e3160c02 tst r6, #512 ; 0x200 3000c8e0: 1a000028 bne 3000c988 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 3000c8e4: e3160080 tst r6, #128 ; 0x80 3000c8e8: 1a00002f bne 3000c9ac * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 3000c8ec: e2166b01 ands r6, r6, #1024 ; 0x400 3000c8f0: 0a000012 beq 3000c940 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000c8f4: e3140b01 tst r4, #1024 ; 0x400 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 ) { 3000c8f8: e5d82008 ldrb r2, [r8, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000c8fc: 13a03000 movne r3, #0 3000c900: 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 ) { 3000c904: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000c908: 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 ) { 3000c90c: 0a00000b beq 3000c940 asr->is_enabled = is_asr_enabled; 3000c910: e5c83008 strb r3, [r8, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000c914: e10f3000 mrs r3, CPSR 3000c918: e3832080 orr r2, r3, #128 ; 0x80 3000c91c: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; 3000c920: e5981018 ldr r1, [r8, #24] information->signals_pending = information->signals_posted; 3000c924: e5982014 ldr r2, [r8, #20] information->signals_posted = _signals; 3000c928: 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; 3000c92c: e5882018 str r2, [r8, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000c930: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 3000c934: e5986014 ldr r6, [r8, #20] 3000c938: e3560000 cmp r6, #0 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000c93c: 13a06001 movne r6, #1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 3000c940: e59f3088 ldr r3, [pc, #136] ; 3000c9d0 3000c944: e5933000 ldr r3, [r3] 3000c948: e3530003 cmp r3, #3 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 3000c94c: 13a00000 movne r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 3000c950: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || 3000c954: e3560000 cmp r6, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 3000c958: e5993004 ldr r3, [r9, #4] if ( are_signals_pending || 3000c95c: 1a000015 bne 3000c9b8 3000c960: e59f2064 ldr r2, [pc, #100] ; 3000c9cc 3000c964: e5922008 ldr r2, [r2, #8] 3000c968: e1530002 cmp r3, r2 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 3000c96c: 01a00006 moveq r0, r6 3000c970: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 3000c974: e5d33074 ldrb r3, [r3, #116] ; 0x74 3000c978: e3530000 cmp r3, #0 3000c97c: 1a00000d bne 3000c9b8 3000c980: e1a00006 mov r0, r6 <== NOT EXECUTED } 3000c984: 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) ) { 3000c988: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000c98c: 159f3040 ldrne r3, [pc, #64] ; 3000c9d4 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) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 3000c990: 13a02001 movne r2, #1 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000c994: 15933000 ldrne r3, [r3] 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) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 3000c998: 1587207c strne r2, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000c99c: 15873078 strne r3, [r7, #120] ; 0x78 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 3000c9a0: 0587307c streq r3, [r7, #124] ; 0x7c } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 3000c9a4: e3160080 tst r6, #128 ; 0x80 3000c9a8: 0affffcf beq 3000c8ec */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 3000c9ac: e2040080 and r0, r4, #128 ; 0x80 3000c9b0: ebfff19c bl 30009028 <_CPU_ISR_Set_level> 3000c9b4: eaffffcc b 3000c8ec _Thread_Dispatch_necessary = true; 3000c9b8: e3a03001 mov r3, #1 3000c9bc: e5c93010 strb r3, [r9, #16] } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 3000c9c0: ebffebd6 bl 30007920 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 3000c9c4: e3a00000 mov r0, #0 3000c9c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}