=============================================================================== 00014c0c <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14c0c: 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 ) { 14c10: 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 ) { 14c14: e1520003 cmp r2, r3 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 14c18: e1a06000 mov r6, r0 14c1c: e1a0a001 mov sl, r1 14c20: e1a07002 mov r7, r2 14c24: e59d8020 ldr r8, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14c28: 8a000013 bhi 14c7c <_CORE_message_queue_Broadcast+0x70> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 14c2c: e5905048 ldr r5, [r0, #72] ; 0x48 14c30: e3550000 cmp r5, #0 *count = 0; 14c34: 13a00000 movne r0, #0 14c38: 15880000 strne r0, [r8] * 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 ) { 14c3c: 0a000007 beq 14c60 <_CORE_message_queue_Broadcast+0x54> 14c40: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 14c44: e594002c ldr r0, [r4, #44] ; 0x2c 14c48: e1a0100a mov r1, sl 14c4c: e1a02007 mov r2, r7 14c50: eb001e77 bl 1c634 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 14c54: e5943028 ldr r3, [r4, #40] ; 0x28 14c58: e5837000 str r7, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 14c5c: e2855001 add r5, r5, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 14c60: e1a00006 mov r0, r6 14c64: eb000994 bl 172bc <_Thread_queue_Dequeue> 14c68: e2504000 subs r4, r0, #0 14c6c: 1afffff4 bne 14c44 <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 14c70: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 14c74: e1a00004 mov r0, r4 14c78: 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; 14c7c: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 14c80: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00009e64 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9e64: e1a03000 mov r3, r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9e68: e59f2124 ldr r2, [pc, #292] ; 9f94 <_CORE_mutex_Seize_interrupt_trylock+0x130> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9e6c: e593c050 ldr ip, [r3, #80] ; 0x50 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9e70: e3a00000 mov r0, #0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9e74: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9e78: e15c0000 cmp ip, r0 9e7c: e92d4010 push {r4, lr} Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9e80: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9e84: 0a00002c beq 9f3c <_CORE_mutex_Seize_interrupt_trylock+0xd8> the_mutex->lock = CORE_MUTEX_LOCKED; 9e88: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9e8c: e5920008 ldr r0, [r2, #8] 9e90: e5830060 str r0, [r3, #96] ; 0x60 the_mutex->nest_count = 1; 9e94: e3a00001 mov r0, #1 9e98: e5830054 str r0, [r3, #84] ; 0x54 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9e9c: e5930048 ldr r0, [r3, #72] ; 0x48 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9ea0: e3500002 cmp r0, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 9ea4: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9ea8: 0a000001 beq 9eb4 <_CORE_mutex_Seize_interrupt_trylock+0x50> 9eac: e3500003 cmp r0, #3 9eb0: 1a000004 bne 9ec8 <_CORE_mutex_Seize_interrupt_trylock+0x64> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9eb4: e592c01c ldr ip, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9eb8: e3500003 cmp r0, #3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9ebc: e28c4001 add r4, ip, #1 9ec0: e582401c str r4, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9ec4: 0a000000 beq 9ecc <_CORE_mutex_Seize_interrupt_trylock+0x68> _ISR_Enable( *level_p ); 9ec8: ea00002b b 9f7c <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9ecc: e593004c ldr r0, [r3, #76] ; 0x4c current = executing->current_priority; 9ed0: e5924014 ldr r4, [r2, #20] if ( current == ceiling ) { 9ed4: e1540000 cmp r4, r0 9ed8: 1a000000 bne 9ee0 <_CORE_mutex_Seize_interrupt_trylock+0x7c> _ISR_Enable( *level_p ); 9edc: ea000026 b 9f7c <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 9ee0: 9a00000b bls 9f14 <_CORE_mutex_Seize_interrupt_trylock+0xb0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9ee4: e59f20ac ldr r2, [pc, #172] ; 9f98 <_CORE_mutex_Seize_interrupt_trylock+0x134> 9ee8: e5920000 ldr r0, [r2] 9eec: e2800001 add r0, r0, #1 9ef0: e5820000 str r0, [r2] 9ef4: e5912000 ldr r2, [r1] 9ef8: e129f002 msr CPSR_fc, r2 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 9efc: e3a02000 mov r2, #0 9f00: e593005c ldr r0, [r3, #92] ; 0x5c 9f04: e593104c ldr r1, [r3, #76] ; 0x4c 9f08: ebfff281 bl 6914 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 9f0c: ebfff3c7 bl 6e30 <_Thread_Enable_dispatch> 9f10: ea00001b b 9f84 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9f14: e3a00006 mov r0, #6 9f18: e5820034 str r0, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; 9f1c: e3a00001 mov r0, #1 9f20: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ 9f24: e3a00000 mov r0, #0 9f28: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ 9f2c: e582c01c str ip, [r2, #28] 9f30: e5913000 ldr r3, [r1] 9f34: e129f003 msr CPSR_fc, r3 9f38: e8bd8010 pop {r4, 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 ) ) { 9f3c: e593005c ldr r0, [r3, #92] ; 0x5c 9f40: e1500002 cmp r0, r2 /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 9f44: 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 ) ) { 9f48: 18bd8010 popne {r4, pc} switch ( the_mutex->Attributes.lock_nesting_behavior ) { 9f4c: e5932040 ldr r2, [r3, #64] ; 0x40 9f50: e3520000 cmp r2, #0 9f54: 0a000002 beq 9f64 <_CORE_mutex_Seize_interrupt_trylock+0x100> 9f58: e3520001 cmp r2, #1 9f5c: 1a00000a bne 9f8c <_CORE_mutex_Seize_interrupt_trylock+0x128> 9f60: ea000003 b 9f74 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9f64: e5932054 ldr r2, [r3, #84] ; 0x54 9f68: e2822001 add r2, r2, #1 9f6c: e5832054 str r2, [r3, #84] ; 0x54 _ISR_Enable( *level_p ); 9f70: ea000001 b 9f7c <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 9f74: e3a03002 mov r3, #2 <== NOT EXECUTED 9f78: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED 9f7c: e5913000 ldr r3, [r1] 9f80: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; 9f84: e3a00000 mov r0, #0 9f88: e8bd8010 pop {r4, pc} /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 9f8c: e3a00001 mov r0, #1 9f90: e8bd8010 pop {r4, pc} =============================================================================== 00006cb8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cb8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6cbc: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cc0: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6cc4: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6cc8: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6ccc: e59f4500 ldr r4, [pc, #1280] ; 71d4 <_Heap_Walk+0x51c> ) { uintptr_t const page_size = heap->page_size; 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; 6cd0: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6cd4: e59f34fc ldr r3, [pc, #1276] ; 71d8 <_Heap_Walk+0x520> 6cd8: e31200ff tst r2, #255 ; 0xff 6cdc: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6ce0: e59f34f4 ldr r3, [pc, #1268] ; 71dc <_Heap_Walk+0x524> 6ce4: e5933000 ldr r3, [r3] bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6ce8: e590c020 ldr ip, [r0, #32] 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() ) ) { 6cec: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cf0: e1a06000 mov r6, r0 6cf4: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 6cf8: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6cfc: e58dc020 str ip, [sp, #32] 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() ) ) { 6d00: 1a000127 bne 71a4 <_Heap_Walk+0x4ec> 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)( 6d04: e59dc024 ldr ip, [sp, #36] ; 0x24 6d08: e58dc000 str ip, [sp] 6d0c: e5903018 ldr r3, [r0, #24] 6d10: e58d3004 str r3, [sp, #4] 6d14: e590301c ldr r3, [r0, #28] 6d18: e59d2020 ldr r2, [sp, #32] 6d1c: e58d3008 str r3, [sp, #8] 6d20: e59d3028 ldr r3, [sp, #40] ; 0x28 6d24: e58d200c str r2, [sp, #12] 6d28: e58d3010 str r3, [sp, #16] 6d2c: e5903008 ldr r3, [r0, #8] 6d30: e58d3014 str r3, [sp, #20] 6d34: e590300c ldr r3, [r0, #12] 6d38: e59f24a0 ldr r2, [pc, #1184] ; 71e0 <_Heap_Walk+0x528> 6d3c: e58d3018 str r3, [sp, #24] 6d40: e1a00001 mov r0, r1 6d44: e1a03009 mov r3, r9 6d48: e3a01000 mov r1, #0 6d4c: e1a0e00f mov lr, pc 6d50: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 6d54: e3590000 cmp r9, #0 6d58: 1a000006 bne 6d78 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 6d5c: e1a00005 mov r0, r5 6d60: e3a01001 mov r1, #1 6d64: e59f2478 ldr r2, [pc, #1144] ; 71e4 <_Heap_Walk+0x52c> 6d68: e1a0e00f mov lr, pc 6d6c: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6d70: e1a08009 mov r8, r9 6d74: ea00010b b 71a8 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 6d78: e2198003 ands r8, r9, #3 (*printer)( 6d7c: 11a00005 movne r0, r5 6d80: 13a01001 movne r1, #1 6d84: 159f245c ldrne r2, [pc, #1116] ; 71e8 <_Heap_Walk+0x530> 6d88: 11a03009 movne r3, r9 6d8c: 1a00010c bne 71c4 <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6d90: e59d0024 ldr r0, [sp, #36] ; 0x24 6d94: e1a01009 mov r1, r9 6d98: ebffe781 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6d9c: e250b000 subs fp, r0, #0 6da0: 0a000006 beq 6dc0 <_Heap_Walk+0x108> (*printer)( 6da4: e1a00005 mov r0, r5 6da8: e3a01001 mov r1, #1 6dac: e59f2438 ldr r2, [pc, #1080] ; 71ec <_Heap_Walk+0x534> 6db0: e59d3024 ldr r3, [sp, #36] ; 0x24 6db4: e1a0e00f mov lr, pc 6db8: e12fff14 bx r4 6dbc: ea0000f9 b 71a8 <_Heap_Walk+0x4f0> 6dc0: e59dc020 ldr ip, [sp, #32] 6dc4: e1a01009 mov r1, r9 6dc8: e28c0008 add r0, ip, #8 6dcc: ebffe774 bl ba4 <__umodsi3> ); return false; } if ( 6dd0: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 6dd4: 11a00005 movne r0, r5 6dd8: 13a01001 movne r1, #1 6ddc: 159f240c ldrne r2, [pc, #1036] ; 71f0 <_Heap_Walk+0x538> 6de0: 159d3020 ldrne r3, [sp, #32] 6de4: 1a0000cc bne 711c <_Heap_Walk+0x464> 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; 6de8: e59d2020 ldr r2, [sp, #32] 6dec: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6df0: e2188001 ands r8, r8, #1 (*printer)( 6df4: 01a00005 moveq r0, r5 6df8: 03a01001 moveq r1, #1 6dfc: 059f23f0 ldreq r2, [pc, #1008] ; 71f4 <_Heap_Walk+0x53c> 6e00: 0a000009 beq 6e2c <_Heap_Walk+0x174> - 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; 6e04: e59d3028 ldr r3, [sp, #40] ; 0x28 6e08: e5937004 ldr r7, [r3, #4] 6e0c: e3c77001 bic r7, r7, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 6e10: e0837007 add r7, r3, 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; 6e14: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 6e18: e2188001 ands r8, r8, #1 6e1c: 1a000005 bne 6e38 <_Heap_Walk+0x180> (*printer)( 6e20: e59f23d0 ldr r2, [pc, #976] ; 71f8 <_Heap_Walk+0x540> 6e24: e1a00005 mov r0, r5 6e28: e3a01001 mov r1, #1 6e2c: e1a0e00f mov lr, pc 6e30: e12fff14 bx r4 6e34: ea0000db b 71a8 <_Heap_Walk+0x4f0> ); return false; } if ( 6e38: e59dc020 ldr ip, [sp, #32] 6e3c: e157000c cmp r7, ip 6e40: 0a000006 beq 6e60 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 6e44: e1a00005 mov r0, r5 <== NOT EXECUTED 6e48: e3a01001 mov r1, #1 <== NOT EXECUTED 6e4c: e59f23a8 ldr r2, [pc, #936] ; 71fc <_Heap_Walk+0x544> <== NOT EXECUTED 6e50: e1a0e00f mov lr, pc <== NOT EXECUTED 6e54: e12fff14 bx r4 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6e58: e1a0800a mov r8, sl <== NOT EXECUTED 6e5c: ea0000d1 b 71a8 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6e60: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 6e64: e5968008 ldr r8, [r6, #8] Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 6e68: e1a0a006 mov sl, r6 6e6c: ea000034 b 6f44 <_Heap_Walk+0x28c> 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; 6e70: e5963020 ldr r3, [r6, #32] 6e74: e1530008 cmp r3, r8 6e78: 83a0c000 movhi ip, #0 6e7c: 8a000003 bhi 6e90 <_Heap_Walk+0x1d8> 6e80: e596c024 ldr ip, [r6, #36] ; 0x24 6e84: e15c0008 cmp ip, r8 6e88: 33a0c000 movcc ip, #0 6e8c: 23a0c001 movcs ip, #1 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 6e90: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 6e94: 01a00005 moveq r0, r5 6e98: 03a01001 moveq r1, #1 6e9c: 059f235c ldreq r2, [pc, #860] ; 7200 <_Heap_Walk+0x548> 6ea0: 0a000012 beq 6ef0 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6ea4: e2880008 add r0, r8, #8 6ea8: e1a0100b mov r1, fp 6eac: ebffe73c bl ba4 <__umodsi3> ); return false; } if ( 6eb0: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 6eb4: 11a00005 movne r0, r5 6eb8: 13a01001 movne r1, #1 6ebc: 159f2340 ldrne r2, [pc, #832] ; 7204 <_Heap_Walk+0x54c> 6ec0: 11a03008 movne r3, r8 6ec4: 1a0000be bne 71c4 <_Heap_Walk+0x50c> - 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; 6ec8: e5983004 ldr r3, [r8, #4] 6ecc: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 6ed0: e0883003 add r3, r8, 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; 6ed4: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 6ed8: e2133001 ands r3, r3, #1 6edc: e58d302c str r3, [sp, #44] ; 0x2c 6ee0: 0a000009 beq 6f0c <_Heap_Walk+0x254> (*printer)( 6ee4: e59f231c ldr r2, [pc, #796] ; 7208 <_Heap_Walk+0x550> 6ee8: e1a00005 mov r0, r5 6eec: e3a01001 mov r1, #1 6ef0: e1a03008 mov r3, r8 6ef4: e58dc01c str ip, [sp, #28] 6ef8: e1a0e00f mov lr, pc 6efc: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f00: e59dc01c ldr ip, [sp, #28] 6f04: e1a0800c mov r8, ip 6f08: ea0000a6 b 71a8 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 6f0c: e598300c ldr r3, [r8, #12] 6f10: e153000a cmp r3, sl 6f14: 0a000008 beq 6f3c <_Heap_Walk+0x284> (*printer)( 6f18: e58d3000 str r3, [sp] 6f1c: e1a00005 mov r0, r5 6f20: e1a03008 mov r3, r8 6f24: e3a01001 mov r1, #1 6f28: e59f22dc ldr r2, [pc, #732] ; 720c <_Heap_Walk+0x554> 6f2c: e1a0e00f mov lr, pc 6f30: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f34: e59d802c ldr r8, [sp, #44] ; 0x2c 6f38: ea00009a b 71a8 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 6f3c: e1a0a008 mov sl, r8 6f40: e5988008 ldr r8, [r8, #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 ) { 6f44: e1580006 cmp r8, r6 6f48: 1affffc8 bne 6e70 <_Heap_Walk+0x1b8> 6f4c: ea000000 b 6f54 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 6f50: e1a07008 mov r7, r8 return true; } 6f54: e5973004 ldr r3, [r7, #4] 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; 6f58: e5962020 ldr r2, [r6, #32] - 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; 6f5c: e3c3a001 bic sl, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 6f60: e087800a add r8, r7, sl 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; 6f64: e1520008 cmp r2, r8 6f68: 83a0b000 movhi fp, #0 6f6c: 8a000003 bhi 6f80 <_Heap_Walk+0x2c8> 6f70: e596b024 ldr fp, [r6, #36] ; 0x24 6f74: e15b0008 cmp fp, r8 6f78: 33a0b000 movcc fp, #0 6f7c: 23a0b001 movcs fp, #1 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 6f80: e21bb0ff ands fp, fp, #255 ; 0xff 6f84: 1a000007 bne 6fa8 <_Heap_Walk+0x2f0> (*printer)( 6f88: e58d8000 str r8, [sp] 6f8c: e1a00005 mov r0, r5 6f90: e3a01001 mov r1, #1 6f94: e59f2274 ldr r2, [pc, #628] ; 7210 <_Heap_Walk+0x558> 6f98: e1a03007 mov r3, r7 6f9c: e1a0e00f mov lr, pc 6fa0: e12fff14 bx r4 6fa4: ea00005e b 7124 <_Heap_Walk+0x46c> 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; 6fa8: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6fac: e1a0000a mov r0, sl 6fb0: e1a01009 mov r1, r9 6fb4: e057b002 subs fp, r7, r2 6fb8: 13a0b001 movne fp, #1 6fbc: e58d301c str r3, [sp, #28] 6fc0: ebffe6f7 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 6fc4: e3500000 cmp r0, #0 6fc8: e59d301c ldr r3, [sp, #28] 6fcc: 0a000005 beq 6fe8 <_Heap_Walk+0x330> 6fd0: e35b0000 cmp fp, #0 (*printer)( 6fd4: 158da000 strne sl, [sp] 6fd8: 11a00005 movne r0, r5 6fdc: 13a01001 movne r1, #1 6fe0: 159f222c ldrne r2, [pc, #556] ; 7214 <_Heap_Walk+0x55c> 6fe4: 1a000014 bne 703c <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 6fe8: e59dc024 ldr ip, [sp, #36] ; 0x24 6fec: e15a000c cmp sl, ip 6ff0: 2a000009 bcs 701c <_Heap_Walk+0x364> 6ff4: e35b0000 cmp fp, #0 6ff8: 0a000007 beq 701c <_Heap_Walk+0x364> (*printer)( 6ffc: e88d1400 stm sp, {sl, ip} 7000: e1a00005 mov r0, r5 7004: e3a01001 mov r1, #1 7008: e59f2208 ldr r2, [pc, #520] ; 7218 <_Heap_Walk+0x560> 700c: e1a03007 mov r3, r7 7010: e1a0e00f mov lr, pc 7014: e12fff14 bx r4 7018: ea00006b b 71cc <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 701c: e1580007 cmp r8, r7 7020: 8a000009 bhi 704c <_Heap_Walk+0x394> 7024: e35b0000 cmp fp, #0 7028: 0a000007 beq 704c <_Heap_Walk+0x394> (*printer)( 702c: e58d8000 str r8, [sp] 7030: e59f21e4 ldr r2, [pc, #484] ; 721c <_Heap_Walk+0x564> 7034: e1a00005 mov r0, r5 7038: e3a01001 mov r1, #1 703c: e1a03007 mov r3, r7 7040: e1a0e00f mov lr, pc 7044: e12fff14 bx r4 7048: ea00005f b 71cc <_Heap_Walk+0x514> 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; 704c: e203b001 and fp, r3, #1 7050: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 7054: e3130001 tst r3, #1 7058: 1a00003b bne 714c <_Heap_Walk+0x494> 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 ? 705c: e597200c ldr r2, [r7, #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)( 7060: e5963008 ldr r3, [r6, #8] 7064: e1520003 cmp r2, r3 block = next_block; } while ( block != first_block ); return true; } 7068: e596100c ldr r1, [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)( 706c: 059f01ac ldreq r0, [pc, #428] ; 7220 <_Heap_Walk+0x568> 7070: 0a000003 beq 7084 <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 7074: e59f31a8 ldr r3, [pc, #424] ; 7224 <_Heap_Walk+0x56c> 7078: e1520006 cmp r2, r6 707c: e59f01a4 ldr r0, [pc, #420] ; 7228 <_Heap_Walk+0x570> 7080: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 7084: e5973008 ldr r3, [r7, #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)( 7088: e1530001 cmp r3, r1 708c: 059f1198 ldreq r1, [pc, #408] ; 722c <_Heap_Walk+0x574> 7090: 0a000003 beq 70a4 <_Heap_Walk+0x3ec> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 7094: e59fc194 ldr ip, [pc, #404] ; 7230 <_Heap_Walk+0x578> 7098: e1530006 cmp r3, r6 709c: e59f1184 ldr r1, [pc, #388] ; 7228 <_Heap_Walk+0x570> 70a0: 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)( 70a4: e58d2004 str r2, [sp, #4] 70a8: e58d0008 str r0, [sp, #8] 70ac: e58d300c str r3, [sp, #12] 70b0: e58d1010 str r1, [sp, #16] 70b4: e1a03007 mov r3, r7 70b8: e58da000 str sl, [sp] 70bc: e1a00005 mov r0, r5 70c0: e3a01000 mov r1, #0 70c4: e59f2168 ldr r2, [pc, #360] ; 7234 <_Heap_Walk+0x57c> 70c8: e1a0e00f mov lr, pc 70cc: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 70d0: e5983000 ldr r3, [r8] 70d4: e15a0003 cmp sl, r3 70d8: 0a000009 beq 7104 <_Heap_Walk+0x44c> (*printer)( 70dc: e58d3004 str r3, [sp, #4] 70e0: e58da000 str sl, [sp] 70e4: e58d8008 str r8, [sp, #8] 70e8: e1a00005 mov r0, r5 70ec: e3a01001 mov r1, #1 70f0: e59f2140 ldr r2, [pc, #320] ; 7238 <_Heap_Walk+0x580> 70f4: e1a03007 mov r3, r7 70f8: e1a0e00f mov lr, pc 70fc: e12fff14 bx r4 7100: ea000031 b 71cc <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 7104: e35b0000 cmp fp, #0 7108: 1a000007 bne 712c <_Heap_Walk+0x474> (*printer)( 710c: e59f2128 ldr r2, [pc, #296] ; 723c <_Heap_Walk+0x584> 7110: e1a00005 mov r0, r5 7114: e3a01001 mov r1, #1 7118: e1a03007 mov r3, r7 711c: e1a0e00f mov lr, pc 7120: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7124: e1a0800b mov r8, fp 7128: ea00001e b 71a8 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 712c: e5963008 ldr r3, [r6, #8] 7130: ea000002 b 7140 <_Heap_Walk+0x488> { 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 ) { if ( free_block == block ) { 7134: e1530007 cmp r3, r7 7138: 0a000016 beq 7198 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 713c: 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 ) { 7140: e1530006 cmp r3, r6 7144: 1afffffa bne 7134 <_Heap_Walk+0x47c> 7148: ea000019 b 71b4 <_Heap_Walk+0x4fc> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 714c: e35b0000 cmp fp, #0 7150: 0a000007 beq 7174 <_Heap_Walk+0x4bc> (*printer)( 7154: e58da000 str sl, [sp] 7158: e1a00005 mov r0, r5 715c: e3a01000 mov r1, #0 7160: e59f20d8 ldr r2, [pc, #216] ; 7240 <_Heap_Walk+0x588> 7164: e1a03007 mov r3, r7 7168: e1a0e00f mov lr, pc 716c: e12fff14 bx r4 7170: ea000008 b 7198 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 7174: e58da000 str sl, [sp] 7178: e5973000 ldr r3, [r7] 717c: e1a00005 mov r0, r5 7180: e58d3004 str r3, [sp, #4] 7184: e1a0100b mov r1, fp 7188: e59f20b4 ldr r2, [pc, #180] ; 7244 <_Heap_Walk+0x58c> 718c: e1a03007 mov r3, r7 7190: e1a0e00f mov lr, pc 7194: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 7198: e59d2020 ldr r2, [sp, #32] 719c: e1580002 cmp r8, r2 71a0: 1affff6a bne 6f50 <_Heap_Walk+0x298> 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() ) ) { return true; 71a4: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 71a8: e1a00008 mov r0, r8 71ac: e28dd030 add sp, sp, #48 ; 0x30 71b0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 71b4: e59f208c ldr r2, [pc, #140] ; 7248 <_Heap_Walk+0x590> 71b8: e1a00005 mov r0, r5 71bc: e3a01001 mov r1, #1 71c0: e1a03007 mov r3, r7 71c4: e1a0e00f mov lr, pc 71c8: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 71cc: e3a08000 mov r8, #0 71d0: eafffff4 b 71a8 <_Heap_Walk+0x4f0> =============================================================================== 00007b14 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 7b14: e92d4011 push {r0, r4, lr} 7b18: e1a04001 mov r4, r1 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 7b1c: e2501000 subs r1, r0, #0 7b20: 059f306c ldreq r3, [pc, #108] ; 7b94 <_Objects_Id_to_name+0x80> 7b24: 05933004 ldreq r3, [r3, #4] 7b28: 05931008 ldreq r1, [r3, #8] 7b2c: e1a03c21 lsr r3, r1, #24 7b30: e2033007 and r3, r3, #7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 7b34: e2432001 sub r2, r3, #1 7b38: e3520002 cmp r2, #2 7b3c: 8a00000d bhi 7b78 <_Objects_Id_to_name+0x64> 7b40: ea00000e b 7b80 <_Objects_Id_to_name+0x6c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 7b44: e1a02da1 lsr r2, r1, #27 if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 7b48: e7930102 ldr r0, [r3, r2, lsl #2] if ( !information ) 7b4c: e3500000 cmp r0, #0 7b50: 0a000008 beq 7b78 <_Objects_Id_to_name+0x64> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 7b54: e1a0200d mov r2, sp 7b58: ebffffd3 bl 7aac <_Objects_Get> if ( !the_object ) 7b5c: e3500000 cmp r0, #0 7b60: 0a000004 beq 7b78 <_Objects_Id_to_name+0x64> return OBJECTS_INVALID_ID; *name = the_object->name; 7b64: e590300c ldr r3, [r0, #12] 7b68: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 7b6c: eb00020c bl 83a4 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 7b70: e3a00000 mov r0, #0 7b74: ea000000 b 7b7c <_Objects_Id_to_name+0x68> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 7b78: e3a00003 mov r0, #3 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 7b7c: e8bd8018 pop {r3, r4, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 7b80: e59f2010 ldr r2, [pc, #16] ; 7b98 <_Objects_Id_to_name+0x84> 7b84: e7923103 ldr r3, [r2, r3, lsl #2] 7b88: e3530000 cmp r3, #0 7b8c: 1affffec bne 7b44 <_Objects_Id_to_name+0x30> 7b90: eafffff8 b 7b78 <_Objects_Id_to_name+0x64> <== NOT EXECUTED =============================================================================== 0000a504 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { a504: e92d4070 push {r4, r5, r6, lr} a508: e20220ff and r2, r2, #255 ; 0xff a50c: e1a04001 mov r4, r1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a510: e10f1000 mrs r1, CPSR a514: e3813080 orr r3, r1, #128 ; 0x80 a518: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); a51c: e59f30a8 ldr r3, [pc, #168] ; a5cc <_Thread_queue_Extract_priority_helper+0xc8> a520: e5940010 ldr r0, [r4, #16] a524: e0003003 and r3, r0, r3 Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a528: e3530000 cmp r3, #0 a52c: 1a000000 bne a534 <_Thread_queue_Extract_priority_helper+0x30> _ISR_Enable( level ); a530: ea000015 b a58c <_Thread_queue_Extract_priority_helper+0x88> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a534: e5943038 ldr r3, [r4, #56] ; 0x38 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; a538: e8941001 ldm r4, {r0, ip} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a53c: e284503c add r5, r4, #60 ; 0x3c previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a540: e1530005 cmp r3, r5 new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; a544: 058c0000 streq r0, [ip] next_node->previous = previous_node; a548: 0580c004 streq ip, [r0, #4] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a54c: 0a00000c beq a584 <_Thread_queue_Extract_priority_helper+0x80> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; a550: e5945040 ldr r5, [r4, #64] ; 0x40 previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a554: e1530005 cmp r3, r5 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; a558: e5936000 ldr r6, [r3] previous_node->next = new_first_node; next_node->previous = new_first_node; a55c: e5803004 str r3, [r0, #4] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; a560: e58c3000 str r3, [ip] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a564: e8831001 stm r3, {r0, ip} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a568: 0a000005 beq a584 <_Thread_queue_Extract_priority_helper+0x80> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); a56c: e2830038 add r0, r3, #56 ; 0x38 new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = a570: e5860004 str r0, [r6, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; a574: e5836038 str r6, [r3, #56] ; 0x38 new_first_thread->Wait.Block2n.last = last_node; a578: e5835040 str r5, [r3, #64] ; 0x40 a57c: e283303c add r3, r3, #60 ; 0x3c last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a580: e5853000 str r3, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a584: e3520000 cmp r2, #0 a588: 0a000001 beq a594 <_Thread_queue_Extract_priority_helper+0x90> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a58c: e129f001 msr CPSR_fc, r1 a590: e8bd8070 pop {r4, r5, r6, pc} _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a594: e5943050 ldr r3, [r4, #80] ; 0x50 a598: e3530002 cmp r3, #2 a59c: 0a000001 beq a5a8 <_Thread_queue_Extract_priority_helper+0xa4> a5a0: e129f001 msr CPSR_fc, r1 a5a4: ea000004 b a5bc <_Thread_queue_Extract_priority_helper+0xb8> a5a8: e3a03003 mov r3, #3 <== NOT EXECUTED a5ac: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED a5b0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); a5b4: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a5b8: ebfff65b bl 7f2c <_Watchdog_Remove> <== NOT EXECUTED a5bc: e59f100c ldr r1, [pc, #12] ; a5d0 <_Thread_queue_Extract_priority_helper+0xcc> a5c0: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a5c4: e8bd4070 pop {r4, r5, r6, lr} a5c8: eafff135 b 6aa4 <_Thread_Clear_state> =============================================================================== 000140e8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 140e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 140ec: e24dd018 sub sp, sp, #24 140f0: e28db00c add fp, sp, #12 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 140f4: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 140f8: e28ba004 add sl, fp, #4 140fc: e28d7004 add r7, sp, #4 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 14100: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; 14104: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); 14108: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1410c: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; 14110: e98d2008 stmib sp, {r3, sp} 14114: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 14118: e1a0500d mov r5, sp */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1411c: e2809030 add r9, r0, #48 ; 0x30 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 14120: e584b078 str fp, [r4, #120] ; 0x78 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 14124: e2848068 add r8, r4, #104 ; 0x68 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 14128: e59f2150 ldr r2, [pc, #336] ; 14280 <_Timer_server_Body+0x198> 1412c: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 14130: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14134: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 14138: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1413c: e0611003 rsb r1, r1, r3 14140: e1a00009 mov r0, r9 14144: eb00106b bl 182f8 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 14148: e59f3134 ldr r3, [pc, #308] ; 14284 <_Timer_server_Body+0x19c> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1414c: e5942074 ldr r2, [r4, #116] ; 0x74 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 14150: e5936000 ldr r6, [r3] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 14154: e1560002 cmp r6, r2 14158: 9a000004 bls 14170 <_Timer_server_Body+0x88> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1415c: e0621006 rsb r1, r2, r6 14160: e1a00008 mov r0, r8 14164: e1a02005 mov r2, r5 14168: eb001062 bl 182f8 <_Watchdog_Adjust_to_chain> 1416c: ea000003 b 14180 <_Timer_server_Body+0x98> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 14170: 31a00008 movcc r0, r8 14174: 33a01001 movcc r1, #1 14178: 30662002 rsbcc r2, r6, r2 1417c: 3b001035 blcc 18258 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 14180: e5846074 str r6, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 14184: e5940078 ldr r0, [r4, #120] ; 0x78 14188: eb000282 bl 14b98 <_Chain_Get> if ( timer == NULL ) { 1418c: e2506000 subs r6, r0, #0 14190: 0a000009 beq 141bc <_Timer_server_Body+0xd4> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 14194: e5963038 ldr r3, [r6, #56] ; 0x38 14198: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1419c: 01a00009 moveq r0, r9 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 141a0: 0a000002 beq 141b0 <_Timer_server_Body+0xc8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 141a4: e3530003 cmp r3, #3 141a8: 1afffff5 bne 14184 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 141ac: e1a00008 mov r0, r8 141b0: e2861010 add r1, r6, #16 141b4: eb00107a bl 183a4 <_Watchdog_Insert> 141b8: eafffff1 b 14184 <_Timer_server_Body+0x9c> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 141bc: ebffff97 bl 14020 if ( _Chain_Is_empty( insert_chain ) ) { 141c0: e59d300c ldr r3, [sp, #12] 141c4: e153000a cmp r3, sl 141c8: 1a000006 bne 141e8 <_Timer_server_Body+0x100> ts->insert_chain = NULL; 141cc: e5846078 str r6, [r4, #120] ; 0x78 141d0: e129f000 msr CPSR_fc, r0 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 141d4: e59d3000 ldr r3, [sp] 141d8: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; 141dc: 13a06000 movne r6, #0 141e0: 1a000002 bne 141f0 <_Timer_server_Body+0x108> 141e4: ea000013 b 14238 <_Timer_server_Body+0x150> 141e8: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 141ec: eaffffcd b 14128 <_Timer_server_Body+0x40> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 141f0: ebffff8a bl 14020 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 141f4: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 141f8: e1530007 cmp r3, r7 141fc: 0a00000b beq 14230 <_Timer_server_Body+0x148> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 14200: e5932000 ldr r2, [r3] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 14204: e3530000 cmp r3, #0 the_chain->first = new_first; 14208: e58d2000 str r2, [sp] new_first->previous = _Chain_Head(the_chain); 1420c: e5825004 str r5, [r2, #4] 14210: 0a000006 beq 14230 <_Timer_server_Body+0x148> watchdog->state = WATCHDOG_INACTIVE; 14214: e5836008 str r6, [r3, #8] 14218: e129f000 msr CPSR_fc, r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 1421c: e2830020 add r0, r3, #32 14220: e8900003 ldm r0, {r0, r1} 14224: e1a0e00f mov lr, pc 14228: e593f01c ldr pc, [r3, #28] } 1422c: eaffffef b 141f0 <_Timer_server_Body+0x108> 14230: e129f000 msr CPSR_fc, r0 14234: eaffffb9 b 14120 <_Timer_server_Body+0x38> } else { ts->active = false; 14238: e3a03000 mov r3, #0 1423c: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 14240: ebffff7a bl 14030 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 14244: e3a01008 mov r1, #8 14248: e5940000 ldr r0, [r4] 1424c: eb000dc1 bl 17958 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 14250: e1a00004 mov r0, r4 14254: ebffff7b bl 14048 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 14258: e1a00004 mov r0, r4 1425c: ebffff8d bl 14098 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 14260: eb000b49 bl 16f8c <_Thread_Enable_dispatch> ts->active = true; 14264: e3a03001 mov r3, #1 14268: e5c4307c strb r3, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1426c: e2840008 add r0, r4, #8 14270: eb0010a1 bl 184fc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 14274: e2840040 add r0, r4, #64 ; 0x40 14278: eb00109f bl 184fc <_Watchdog_Remove> 1427c: eaffffa7 b 14120 <_Timer_server_Body+0x38> =============================================================================== 00009774 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 9774: e5902000 ldr r2, [r0] 9778: e5913000 ldr r3, [r1] 977c: e1520003 cmp r2, r3 return true; 9780: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 9784: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) 9788: ba000005 blt 97a4 <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( 978c: e5900004 ldr r0, [r0, #4] 9790: e5913004 ldr r3, [r1, #4] 9794: e1500003 cmp r0, r3 9798: d3a00000 movle r0, #0 979c: c3a00001 movgt r0, #1 97a0: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 97a4: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 97a8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000b82c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { b82c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) b830: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { b834: e1a04000 mov r4, r0 b838: e1a05001 mov r5, r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; b83c: 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 ) b840: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; b844: e59f314c ldr r3, [pc, #332] ; b998 b848: e5937004 ldr r7, [r3, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; b84c: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; b850: e5976100 ldr r6, [r7, #256] ; 0x100 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) b854: 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; b858: e3580000 cmp r8, #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; b85c: e5d69008 ldrb r9, [r6, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; b860: 03a08c01 moveq r8, #256 ; 0x100 b864: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) b868: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; b86c: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; b870: e3590000 cmp r9, #0 b874: 03a09b01 moveq r9, #1024 ; 0x400 b878: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); b87c: ebfff306 bl 849c <_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; b880: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); b884: e1898008 orr r8, r9, r8 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) b888: e3150c01 tst r5, #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; b88c: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) b890: 0a000003 beq b8a4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; b894: e3140c01 tst r4, #256 ; 0x100 b898: 13a03000 movne r3, #0 b89c: 03a03001 moveq r3, #1 b8a0: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { b8a4: e3150c02 tst r5, #512 ; 0x200 b8a8: 0a000006 beq b8c8 if ( _Modes_Is_timeslice(mode_set) ) { b8ac: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; b8b0: 13a03001 movne r3, #1 b8b4: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; b8b8: 159f30dc ldrne r3, [pc, #220] ; b99c b8bc: 15933000 ldrne r3, [r3] } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; b8c0: 0587307c streq r3, [r7, #124] ; 0x7c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; b8c4: 15873078 strne r3, [r7, #120] ; 0x78 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) b8c8: e3150080 tst r5, #128 ; 0x80 b8cc: 0a000001 beq b8d8 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); b8d0: e2040080 and r0, r4, #128 ; 0x80 b8d4: ebfff2eb bl 8488 <_CPU_ISR_Set_level> */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { b8d8: e2150b01 ands r0, r5, #1024 ; 0x400 b8dc: 0a000013 beq b930 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( b8e0: 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 ) { b8e4: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( b8e8: 13a03000 movne r3, #0 b8ec: 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 ) { b8f0: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; b8f4: 03a00000 moveq r0, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { b8f8: 0a00000c beq b930 asr->is_enabled = is_asr_enabled; b8fc: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( b900: e10f3000 mrs r3, CPSR b904: e3832080 orr r2, r3, #128 ; 0x80 b908: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; b90c: e2861014 add r1, r6, #20 b910: e8910006 ldm r1, {r1, r2} information->signals_pending = information->signals_posted; information->signals_posted = _signals; b914: e5862014 str r2, [r6, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; b918: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( b91c: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { b920: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; b924: e3500000 cmp r0, #0 b928: 13a00001 movne r0, #1 b92c: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) b930: e59f3068 ldr r3, [pc, #104] ; b9a0 b934: e5933000 ldr r3, [r3] b938: e3530003 cmp r3, #3 b93c: 1a000013 bne b990 */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; b940: e59f2050 ldr r2, [pc, #80] ; b998 b944: e5923004 ldr r3, [r2, #4] if ( !_States_Is_ready( executing->current_state ) || b948: e5931010 ldr r1, [r3, #16] b94c: e3510000 cmp r1, #0 b950: 1a000005 bne b96c b954: e5922008 ldr r2, [r2, #8] b958: e1530002 cmp r3, r2 b95c: 0a000006 beq b97c ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { b960: e5d33074 ldrb r3, [r3, #116] ; 0x74 b964: e3530000 cmp r3, #0 b968: 0a000003 beq b97c _Context_Switch_necessary = true; b96c: e59f3024 ldr r3, [pc, #36] ; b998 b970: e3a02001 mov r2, #1 b974: e5c32010 strb r2, [r3, #16] b978: ea000001 b b984 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) b97c: e3500000 cmp r0, #0 b980: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch(); b984: ebffece5 bl 6d20 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; b988: e3a00000 mov r0, #0 b98c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} b990: e3a00000 mov r0, #0 <== NOT EXECUTED } b994: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED