RTEMS 4.11Annotated Report
Fri Jul 16 18:21:39 2010
30014d60 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014d60: 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
)
{
30014d64: 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 ) {
30014d68: 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
)
{
30014d6c: e1a06000 mov r6, r0
30014d70: e1a0a001 mov sl, r1
30014d74: e1a07002 mov r7, r2
30014d78: 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 ) {
30014d7c: 8a000013 bhi 30014dd0 <_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 ) {
30014d80: e5905048 ldr r5, [r0, #72] ; 0x48
30014d84: e3550000 cmp r5, #0
*count = 0;
30014d88: 13a00000 movne r0, #0
30014d8c: 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 ) {
30014d90: 0a000007 beq 30014db4 <_CORE_message_queue_Broadcast+0x54>
30014d94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
30014d98: e594002c ldr r0, [r4, #44] ; 0x2c
30014d9c: e1a0100a mov r1, sl
30014da0: e1a02007 mov r2, r7
30014da4: eb001e76 bl 3001c784 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014da8: e5943028 ldr r3, [r4, #40] ; 0x28
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
30014dac: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014db0: e5837000 str r7, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30014db4: e1a00006 mov r0, r6
30014db8: eb000994 bl 30017410 <_Thread_queue_Dequeue>
30014dbc: e2504000 subs r4, r0, #0
30014dc0: 1afffff4 bne 30014d98 <_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;
30014dc4: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
30014dc8: e1a00004 mov r0, r4
30014dcc: 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;
30014dd0: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
30014dd4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
30009fb4 <_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
)
{
30009fb4: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
30009fb8: e59f2124 ldr r2, [pc, #292] ; 3000a0e4 <_CORE_mutex_Seize_interrupt_trylock+0x130>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
30009fbc: 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;
30009fc0: e3a00000 mov r0, #0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
30009fc4: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
30009fc8: e15c0000 cmp ip, r0
30009fcc: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
30009fd0: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
30009fd4: 0a00002c beq 3000a08c <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
30009fd8: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
30009fdc: e5920008 ldr r0, [r2, #8]
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;
30009fe0: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
30009fe4: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
30009fe8: e3a00001 mov r0, #1
30009fec: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
30009ff0: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
30009ff4: e3500002 cmp r0, #2
30009ff8: 0a000001 beq 3000a004 <_CORE_mutex_Seize_interrupt_trylock+0x50>
30009ffc: e3500003 cmp r0, #3
3000a000: 1a000004 bne 3000a018 <_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++;
3000a004: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
3000a008: 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++;
3000a00c: e28c4001 add r4, ip, #1
3000a010: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
3000a014: 0a000000 beq 3000a01c <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
3000a018: ea00002b b 3000a0cc <_CORE_mutex_Seize_interrupt_trylock+0x118>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
3000a01c: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
3000a020: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
3000a024: e1540000 cmp r4, r0
3000a028: 1a000000 bne 3000a030 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
3000a02c: ea000026 b 3000a0cc <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
}
if ( current > ceiling ) {
3000a030: 9a00000b bls 3000a064 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
3000a034: e59f20ac ldr r2, [pc, #172] ; 3000a0e8 <_CORE_mutex_Seize_interrupt_trylock+0x134>
3000a038: e5920000 ldr r0, [r2]
3000a03c: e2800001 add r0, r0, #1
3000a040: e5820000 str r0, [r2]
3000a044: e5912000 ldr r2, [r1]
3000a048: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
3000a04c: e3a02000 mov r2, #0
3000a050: e593005c ldr r0, [r3, #92] ; 0x5c
3000a054: e593104c ldr r1, [r3, #76] ; 0x4c
3000a058: ebfff282 bl 30006a68 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
3000a05c: ebfff3c8 bl 30006f84 <_Thread_Enable_dispatch>
3000a060: ea00001b b 3000a0d4 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
3000a064: e3a00006 mov r0, #6
3000a068: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
3000a06c: e3a00001 mov r0, #1
3000a070: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
3000a074: e3a00000 mov r0, #0
3000a078: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
3000a07c: e582c01c str ip, [r2, #28]
3000a080: e5913000 ldr r3, [r1]
3000a084: e129f003 msr CPSR_fc, r3
3000a088: 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 ) ) {
3000a08c: e593005c ldr r0, [r3, #92] ; 0x5c
3000a090: e1500002 cmp r0, r2
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
3000a094: 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 ) ) {
3000a098: 18bd8010 popne {r4, pc}
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
3000a09c: e5932040 ldr r2, [r3, #64] ; 0x40
3000a0a0: e3520000 cmp r2, #0
3000a0a4: 0a000002 beq 3000a0b4 <_CORE_mutex_Seize_interrupt_trylock+0x100>
3000a0a8: e3520001 cmp r2, #1
3000a0ac: 1a00000a bne 3000a0dc <_CORE_mutex_Seize_interrupt_trylock+0x128>
3000a0b0: ea000003 b 3000a0c4 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
3000a0b4: e5932054 ldr r2, [r3, #84] ; 0x54
3000a0b8: e2822001 add r2, r2, #1
3000a0bc: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
3000a0c0: ea000001 b 3000a0cc <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
3000a0c4: e3a03002 mov r3, #2 <== NOT EXECUTED
3000a0c8: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
3000a0cc: e5913000 ldr r3, [r1]
3000a0d0: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
3000a0d4: e3a00000 mov r0, #0
3000a0d8: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
3000a0dc: e3a00001 mov r0, #1
3000a0e0: e8bd8010 pop {r4, pc}
30006e0c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e0c: 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;
30006e10: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e14: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
30006e18: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
30006e1c: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e20: e59f4500 ldr r4, [pc, #1280] ; 30007328 <_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;
30006e24: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e28: e59f34fc ldr r3, [pc, #1276] ; 3000732c <_Heap_Walk+0x520>
30006e2c: e31200ff tst r2, #255 ; 0xff
30006e30: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e34: e59f34f4 ldr r3, [pc, #1268] ; 30007330 <_Heap_Walk+0x524>
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;
30006e38: 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() ) ) {
30006e3c: e5933000 ldr r3, [r3]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e40: e1a06000 mov r6, r0
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() ) ) {
30006e44: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e48: e1a05001 mov r5, r1
uintptr_t const page_size = heap->page_size;
30006e4c: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
30006e50: 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() ) ) {
30006e54: 1a000127 bne 300072f8 <_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)(
30006e58: e59dc024 ldr ip, [sp, #36] ; 0x24
30006e5c: e59d2020 ldr r2, [sp, #32]
30006e60: e58dc000 str ip, [sp]
30006e64: e5903018 ldr r3, [r0, #24]
30006e68: e58d3004 str r3, [sp, #4]
30006e6c: e590301c ldr r3, [r0, #28]
30006e70: e58d200c str r2, [sp, #12]
30006e74: e58d3008 str r3, [sp, #8]
30006e78: e59d3028 ldr r3, [sp, #40] ; 0x28
30006e7c: e59f24b0 ldr r2, [pc, #1200] ; 30007334 <_Heap_Walk+0x528>
30006e80: e58d3010 str r3, [sp, #16]
30006e84: e5903008 ldr r3, [r0, #8]
30006e88: e58d3014 str r3, [sp, #20]
30006e8c: e590300c ldr r3, [r0, #12]
30006e90: e1a00001 mov r0, r1
30006e94: e58d3018 str r3, [sp, #24]
30006e98: e3a01000 mov r1, #0
30006e9c: e1a03009 mov r3, r9
30006ea0: e1a0e00f mov lr, pc
30006ea4: e12fff14 bx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
30006ea8: e3590000 cmp r9, #0
30006eac: 1a000006 bne 30006ecc <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
30006eb0: e1a00005 mov r0, r5
30006eb4: e3a01001 mov r1, #1
30006eb8: e59f2478 ldr r2, [pc, #1144] ; 30007338 <_Heap_Walk+0x52c>
30006ebc: e1a0e00f mov lr, pc
30006ec0: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30006ec4: e1a08009 mov r8, r9
30006ec8: ea00010b b 300072fc <_Heap_Walk+0x4f0>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
30006ecc: e2198003 ands r8, r9, #3
(*printer)(
30006ed0: 11a00005 movne r0, r5
30006ed4: 13a01001 movne r1, #1
30006ed8: 159f245c ldrne r2, [pc, #1116] ; 3000733c <_Heap_Walk+0x530>
30006edc: 11a03009 movne r3, r9
30006ee0: 1a00010c bne 30007318 <_Heap_Walk+0x50c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006ee4: e59d0024 ldr r0, [sp, #36] ; 0x24
30006ee8: e1a01009 mov r1, r9
30006eec: ebffe72a bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
30006ef0: e250b000 subs fp, r0, #0
30006ef4: 0a000006 beq 30006f14 <_Heap_Walk+0x108>
(*printer)(
30006ef8: e1a00005 mov r0, r5
30006efc: e3a01001 mov r1, #1
30006f00: e59f2438 ldr r2, [pc, #1080] ; 30007340 <_Heap_Walk+0x534>
30006f04: e59d3024 ldr r3, [sp, #36] ; 0x24
30006f08: e1a0e00f mov lr, pc
30006f0c: e12fff14 bx r4
30006f10: ea0000f9 b 300072fc <_Heap_Walk+0x4f0>
30006f14: e59dc020 ldr ip, [sp, #32]
30006f18: e1a01009 mov r1, r9
30006f1c: e28c0008 add r0, ip, #8
30006f20: ebffe71d bl 30000b9c <__umodsi3>
);
return false;
}
if (
30006f24: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
30006f28: 11a00005 movne r0, r5
30006f2c: 13a01001 movne r1, #1
30006f30: 159f240c ldrne r2, [pc, #1036] ; 30007344 <_Heap_Walk+0x538>
30006f34: 159d3020 ldrne r3, [sp, #32]
30006f38: 1a0000cc bne 30007270 <_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;
30006f3c: e59d2020 ldr r2, [sp, #32]
30006f40: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
30006f44: e2188001 ands r8, r8, #1
(*printer)(
30006f48: 01a00005 moveq r0, r5
30006f4c: 03a01001 moveq r1, #1
30006f50: 059f23f0 ldreq r2, [pc, #1008] ; 30007348 <_Heap_Walk+0x53c>
30006f54: 0a000009 beq 30006f80 <_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;
30006f58: e59d3028 ldr r3, [sp, #40] ; 0x28
30006f5c: e5937004 ldr r7, [r3, #4]
30006f60: 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);
30006f64: 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;
30006f68: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
30006f6c: e2188001 ands r8, r8, #1
30006f70: 1a000005 bne 30006f8c <_Heap_Walk+0x180>
(*printer)(
30006f74: e59f23d0 ldr r2, [pc, #976] ; 3000734c <_Heap_Walk+0x540>
30006f78: e1a00005 mov r0, r5
30006f7c: e3a01001 mov r1, #1
30006f80: e1a0e00f mov lr, pc
30006f84: e12fff14 bx r4
30006f88: ea0000db b 300072fc <_Heap_Walk+0x4f0>
);
return false;
}
if (
30006f8c: e59dc020 ldr ip, [sp, #32]
30006f90: e157000c cmp r7, ip
30006f94: 0a000006 beq 30006fb4 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
30006f98: e1a00005 mov r0, r5 <== NOT EXECUTED
30006f9c: e3a01001 mov r1, #1 <== NOT EXECUTED
30006fa0: e59f23a8 ldr r2, [pc, #936] ; 30007350 <_Heap_Walk+0x544> <== NOT EXECUTED
30006fa4: e1a0e00f mov lr, pc <== NOT EXECUTED
30006fa8: 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;
30006fac: e1a0800a mov r8, sl <== NOT EXECUTED
30006fb0: ea0000d1 b 300072fc <_Heap_Walk+0x4f0> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
30006fb4: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
30006fb8: 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 );
30006fbc: e1a0a006 mov sl, r6
30006fc0: ea000034 b 30007098 <_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;
30006fc4: e5963020 ldr r3, [r6, #32]
30006fc8: e1530008 cmp r3, r8
30006fcc: 83a0c000 movhi ip, #0
30006fd0: 8a000003 bhi 30006fe4 <_Heap_Walk+0x1d8>
30006fd4: e596c024 ldr ip, [r6, #36] ; 0x24
30006fd8: e15c0008 cmp ip, r8
30006fdc: 33a0c000 movcc ip, #0
30006fe0: 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 ) ) {
30006fe4: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
30006fe8: 01a00005 moveq r0, r5
30006fec: 03a01001 moveq r1, #1
30006ff0: 059f235c ldreq r2, [pc, #860] ; 30007354 <_Heap_Walk+0x548>
30006ff4: 0a000012 beq 30007044 <_Heap_Walk+0x238>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006ff8: e2880008 add r0, r8, #8
30006ffc: e1a0100b mov r1, fp
30007000: ebffe6e5 bl 30000b9c <__umodsi3>
);
return false;
}
if (
30007004: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
30007008: 11a00005 movne r0, r5
3000700c: 13a01001 movne r1, #1
30007010: 159f2340 ldrne r2, [pc, #832] ; 30007358 <_Heap_Walk+0x54c>
30007014: 11a03008 movne r3, r8
30007018: 1a0000be bne 30007318 <_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;
3000701c: e5983004 ldr r3, [r8, #4]
30007020: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
30007024: 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;
30007028: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
3000702c: e2133001 ands r3, r3, #1
30007030: e58d302c str r3, [sp, #44] ; 0x2c
30007034: 0a000009 beq 30007060 <_Heap_Walk+0x254>
(*printer)(
30007038: e59f231c ldr r2, [pc, #796] ; 3000735c <_Heap_Walk+0x550>
3000703c: e1a00005 mov r0, r5
30007040: e3a01001 mov r1, #1
30007044: e1a03008 mov r3, r8
30007048: e58dc01c str ip, [sp, #28]
3000704c: e1a0e00f mov lr, pc
30007050: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007054: e59dc01c ldr ip, [sp, #28]
30007058: e1a0800c mov r8, ip
3000705c: ea0000a6 b 300072fc <_Heap_Walk+0x4f0>
);
return false;
}
if ( free_block->prev != prev_block ) {
30007060: e598300c ldr r3, [r8, #12]
30007064: e153000a cmp r3, sl
30007068: 0a000008 beq 30007090 <_Heap_Walk+0x284>
(*printer)(
3000706c: e58d3000 str r3, [sp]
30007070: e1a00005 mov r0, r5
30007074: e1a03008 mov r3, r8
30007078: e3a01001 mov r1, #1
3000707c: e59f22dc ldr r2, [pc, #732] ; 30007360 <_Heap_Walk+0x554>
30007080: e1a0e00f mov lr, pc
30007084: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007088: e59d802c ldr r8, [sp, #44] ; 0x2c
3000708c: ea00009a b 300072fc <_Heap_Walk+0x4f0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
30007090: e1a0a008 mov sl, r8
30007094: 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 ) {
30007098: e1580006 cmp r8, r6
3000709c: 1affffc8 bne 30006fc4 <_Heap_Walk+0x1b8>
300070a0: ea000000 b 300070a8 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300070a4: e1a07008 mov r7, r8
return true;
}
300070a8: 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;
300070ac: 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;
300070b0: 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);
300070b4: 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;
300070b8: e1520008 cmp r2, r8
300070bc: 83a0b000 movhi fp, #0
300070c0: 8a000003 bhi 300070d4 <_Heap_Walk+0x2c8>
300070c4: e596b024 ldr fp, [r6, #36] ; 0x24
300070c8: e15b0008 cmp fp, r8
300070cc: 33a0b000 movcc fp, #0
300070d0: 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 ) ) {
300070d4: e21bb0ff ands fp, fp, #255 ; 0xff
300070d8: 1a000007 bne 300070fc <_Heap_Walk+0x2f0>
(*printer)(
300070dc: e58d8000 str r8, [sp]
300070e0: e1a00005 mov r0, r5
300070e4: e3a01001 mov r1, #1
300070e8: e59f2274 ldr r2, [pc, #628] ; 30007364 <_Heap_Walk+0x558>
300070ec: e1a03007 mov r3, r7
300070f0: e1a0e00f mov lr, pc
300070f4: e12fff14 bx r4
300070f8: ea00005e b 30007278 <_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;
300070fc: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007100: e1a0000a mov r0, sl
30007104: e1a01009 mov r1, r9
30007108: e057b002 subs fp, r7, r2
3000710c: 13a0b001 movne fp, #1
30007110: e58d301c str r3, [sp, #28]
30007114: ebffe6a0 bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
30007118: e3500000 cmp r0, #0
3000711c: e59d301c ldr r3, [sp, #28]
30007120: 0a000005 beq 3000713c <_Heap_Walk+0x330>
30007124: e35b0000 cmp fp, #0
(*printer)(
30007128: 158da000 strne sl, [sp]
3000712c: 11a00005 movne r0, r5
30007130: 13a01001 movne r1, #1
30007134: 159f222c ldrne r2, [pc, #556] ; 30007368 <_Heap_Walk+0x55c>
30007138: 1a000014 bne 30007190 <_Heap_Walk+0x384>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
3000713c: e59dc024 ldr ip, [sp, #36] ; 0x24
30007140: e15a000c cmp sl, ip
30007144: 2a000009 bcs 30007170 <_Heap_Walk+0x364>
30007148: e35b0000 cmp fp, #0
3000714c: 0a000007 beq 30007170 <_Heap_Walk+0x364>
(*printer)(
30007150: e88d1400 stm sp, {sl, ip}
30007154: e1a00005 mov r0, r5
30007158: e3a01001 mov r1, #1
3000715c: e59f2208 ldr r2, [pc, #520] ; 3000736c <_Heap_Walk+0x560>
30007160: e1a03007 mov r3, r7
30007164: e1a0e00f mov lr, pc
30007168: e12fff14 bx r4
3000716c: ea00006b b 30007320 <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
30007170: e1580007 cmp r8, r7
30007174: 8a000009 bhi 300071a0 <_Heap_Walk+0x394>
30007178: e35b0000 cmp fp, #0
3000717c: 0a000007 beq 300071a0 <_Heap_Walk+0x394>
(*printer)(
30007180: e59f21e8 ldr r2, [pc, #488] ; 30007370 <_Heap_Walk+0x564>
30007184: e58d8000 str r8, [sp]
30007188: e1a00005 mov r0, r5
3000718c: e3a01001 mov r1, #1
30007190: e1a03007 mov r3, r7
30007194: e1a0e00f mov lr, pc
30007198: e12fff14 bx r4
3000719c: ea00005f b 30007320 <_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;
300071a0: e203b001 and fp, r3, #1
300071a4: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
300071a8: e3130001 tst r3, #1
300071ac: 1a00003b bne 300072a0 <_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 ?
300071b0: 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)(
300071b4: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
300071b8: 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)(
300071bc: e1520003 cmp r2, r3
300071c0: 059f01ac ldreq r0, [pc, #428] ; 30007374 <_Heap_Walk+0x568>
300071c4: 0a000003 beq 300071d8 <_Heap_Walk+0x3cc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
300071c8: e59f31a8 ldr r3, [pc, #424] ; 30007378 <_Heap_Walk+0x56c>
300071cc: e1520006 cmp r2, r6
300071d0: e59f01a4 ldr r0, [pc, #420] ; 3000737c <_Heap_Walk+0x570>
300071d4: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
300071d8: 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)(
300071dc: e1530001 cmp r3, r1
300071e0: 059f1198 ldreq r1, [pc, #408] ; 30007380 <_Heap_Walk+0x574>
300071e4: 0a000003 beq 300071f8 <_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)" : "")
300071e8: e59fc194 ldr ip, [pc, #404] ; 30007384 <_Heap_Walk+0x578>
300071ec: e1530006 cmp r3, r6
300071f0: e59f1184 ldr r1, [pc, #388] ; 3000737c <_Heap_Walk+0x570>
300071f4: 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)(
300071f8: e58d2004 str r2, [sp, #4]
300071fc: e58d0008 str r0, [sp, #8]
30007200: e58d300c str r3, [sp, #12]
30007204: e58d1010 str r1, [sp, #16]
30007208: e1a03007 mov r3, r7
3000720c: e58da000 str sl, [sp]
30007210: e1a00005 mov r0, r5
30007214: e3a01000 mov r1, #0
30007218: e59f2168 ldr r2, [pc, #360] ; 30007388 <_Heap_Walk+0x57c>
3000721c: e1a0e00f mov lr, pc
30007220: e12fff14 bx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
30007224: e5983000 ldr r3, [r8]
30007228: e15a0003 cmp sl, r3
3000722c: 0a000009 beq 30007258 <_Heap_Walk+0x44c>
(*printer)(
30007230: e58d3004 str r3, [sp, #4]
30007234: e58da000 str sl, [sp]
30007238: e58d8008 str r8, [sp, #8]
3000723c: e1a00005 mov r0, r5
30007240: e3a01001 mov r1, #1
30007244: e59f2140 ldr r2, [pc, #320] ; 3000738c <_Heap_Walk+0x580>
30007248: e1a03007 mov r3, r7
3000724c: e1a0e00f mov lr, pc
30007250: e12fff14 bx r4
30007254: ea000031 b 30007320 <_Heap_Walk+0x514>
);
return false;
}
if ( !prev_used ) {
30007258: e35b0000 cmp fp, #0
3000725c: 1a000007 bne 30007280 <_Heap_Walk+0x474>
(*printer)(
30007260: e59f2128 ldr r2, [pc, #296] ; 30007390 <_Heap_Walk+0x584>
30007264: e1a00005 mov r0, r5
30007268: e3a01001 mov r1, #1
3000726c: e1a03007 mov r3, r7
30007270: e1a0e00f mov lr, pc
30007274: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007278: e1a0800b mov r8, fp
3000727c: ea00001e b 300072fc <_Heap_Walk+0x4f0>
block = next_block;
} while ( block != first_block );
return true;
}
30007280: e5963008 ldr r3, [r6, #8]
30007284: ea000002 b 30007294 <_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 ) {
30007288: e1530007 cmp r3, r7
3000728c: 0a000016 beq 300072ec <_Heap_Walk+0x4e0>
return true;
}
free_block = free_block->next;
30007290: 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 ) {
30007294: e1530006 cmp r3, r6
30007298: 1afffffa bne 30007288 <_Heap_Walk+0x47c>
3000729c: ea000019 b 30007308 <_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) {
300072a0: e35b0000 cmp fp, #0
300072a4: 0a000007 beq 300072c8 <_Heap_Walk+0x4bc>
(*printer)(
300072a8: e58da000 str sl, [sp]
300072ac: e1a00005 mov r0, r5
300072b0: e3a01000 mov r1, #0
300072b4: e59f20d8 ldr r2, [pc, #216] ; 30007394 <_Heap_Walk+0x588>
300072b8: e1a03007 mov r3, r7
300072bc: e1a0e00f mov lr, pc
300072c0: e12fff14 bx r4
300072c4: ea000008 b 300072ec <_Heap_Walk+0x4e0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
300072c8: e58da000 str sl, [sp]
300072cc: e5973000 ldr r3, [r7]
300072d0: e1a00005 mov r0, r5
300072d4: e58d3004 str r3, [sp, #4]
300072d8: e1a0100b mov r1, fp
300072dc: e59f20b4 ldr r2, [pc, #180] ; 30007398 <_Heap_Walk+0x58c>
300072e0: e1a03007 mov r3, r7
300072e4: e1a0e00f mov lr, pc
300072e8: e12fff14 bx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300072ec: e59d2020 ldr r2, [sp, #32]
300072f0: e1580002 cmp r8, r2
300072f4: 1affff6a bne 300070a4 <_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;
300072f8: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
300072fc: e1a00008 mov r0, r8
30007300: e28dd030 add sp, sp, #48 ; 0x30
30007304: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
30007308: e59f208c ldr r2, [pc, #140] ; 3000739c <_Heap_Walk+0x590>
3000730c: e1a00005 mov r0, r5
30007310: e3a01001 mov r1, #1
30007314: e1a03007 mov r3, r7
30007318: e1a0e00f mov lr, pc
3000731c: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007320: e3a08000 mov r8, #0
30007324: eafffff4 b 300072fc <_Heap_Walk+0x4f0>
30006248 <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
30006248: e59f3038 ldr r3, [pc, #56] ; 30006288 <_Internal_error_Occurred+0x40>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
3000624c: e20110ff and r1, r1, #255 ; 0xff
30006250: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
30006254: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
30006258: e5c31004 strb r1, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
3000625c: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30006260: 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 );
30006264: eb0006d3 bl 30007db8 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
30006268: e59f301c ldr r3, [pc, #28] ; 3000628c <_Internal_error_Occurred+0x44><== NOT EXECUTED
3000626c: e3a02005 mov r2, #5 <== NOT EXECUTED
30006270: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30006274: e10f2000 mrs r2, CPSR <== NOT EXECUTED
30006278: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
3000627c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
30006280: e1a00004 mov r0, r4 <== NOT EXECUTED
30006284: eafffffe b 30006284 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED
30007c68 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
30007c68: e92d4011 push {r0, r4, lr}
30007c6c: e1a04001 mov r4, r1
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
30007c70: e2501000 subs r1, r0, #0
30007c74: 059f306c ldreq r3, [pc, #108] ; 30007ce8 <_Objects_Id_to_name+0x80>
30007c78: 05933004 ldreq r3, [r3, #4]
30007c7c: 05931008 ldreq r1, [r3, #8]
30007c80: e1a03c21 lsr r3, r1, #24
30007c84: 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 )
30007c88: e2432001 sub r2, r3, #1
30007c8c: e3520002 cmp r2, #2
30007c90: 8a00000d bhi 30007ccc <_Objects_Id_to_name+0x64>
30007c94: ea00000e b 30007cd4 <_Objects_Id_to_name+0x6c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
30007c98: 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 ];
30007c9c: e7930102 ldr r0, [r3, r2, lsl #2]
if ( !information )
30007ca0: e3500000 cmp r0, #0
30007ca4: 0a000008 beq 30007ccc <_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 );
30007ca8: e1a0200d mov r2, sp
30007cac: ebffffd3 bl 30007c00 <_Objects_Get>
if ( !the_object )
30007cb0: e3500000 cmp r0, #0
30007cb4: 0a000004 beq 30007ccc <_Objects_Id_to_name+0x64>
return OBJECTS_INVALID_ID;
*name = the_object->name;
30007cb8: e590300c ldr r3, [r0, #12]
30007cbc: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
30007cc0: eb00020c bl 300084f8 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
30007cc4: e3a00000 mov r0, #0
30007cc8: ea000000 b 30007cd0 <_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;
30007ccc: e3a00003 mov r0, #3
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
30007cd0: 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 ] )
30007cd4: e59f2010 ldr r2, [pc, #16] ; 30007cec <_Objects_Id_to_name+0x84>
30007cd8: e7923103 ldr r3, [r2, r3, lsl #2]
30007cdc: e3530000 cmp r3, #0
30007ce0: 1affffec bne 30007c98 <_Objects_Id_to_name+0x30>
30007ce4: eafffff8 b 30007ccc <_Objects_Id_to_name+0x64> <== NOT EXECUTED
300074b8 <_Thread_queue_Enqueue_priority>:
300074b8: e281303c add r3, r1, #60 ; 0x3c
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
300074bc: e591c014 ldr ip, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
300074c0: e5813038 str r3, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
300074c4: e3a03000 mov r3, #0
300074c8: e581303c str r3, [r1, #60] ; 0x3c
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
300074cc: e2813038 add r3, r1, #56 ; 0x38
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
300074d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
the_chain->last = _Chain_Head(the_chain);
300074d4: e5813040 str r3, [r1, #64] ; 0x40
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
300074d8: e3a0400c mov r4, #12
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
300074dc: e1a0332c lsr r3, ip, #6
300074e0: e0030394 mul r3, r4, r3
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
300074e4: e31c0020 tst ip, #32
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
300074e8: e0807003 add r7, r0, r3
block_state = the_thread_queue->state;
300074ec: e5908038 ldr r8, [r0, #56] ; 0x38
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
300074f0: 159fa15c ldrne sl, [pc, #348] ; 30007654 <_Thread_queue_Enqueue_priority+0x19c>
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
300074f4: 11a0b007 movne fp, r7
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
300074f8: 1a000024 bne 30007590 <_Thread_queue_Enqueue_priority+0xd8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300074fc: e2833004 add r3, r3, #4
30007500: e080a003 add sl, r0, r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007504: e10f4000 mrs r4, CPSR
30007508: e3843080 orr r3, r4, #128 ; 0x80
3000750c: e129f003 msr CPSR_fc, r3
30007510: e1a05004 mov r5, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
30007514: e3e06000 mvn r6, #0
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
30007518: e5973000 ldr r3, [r7]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
3000751c: ea00000b b 30007550 <_Thread_queue_Enqueue_priority+0x98>
search_priority = search_thread->current_priority;
30007520: e5936014 ldr r6, [r3, #20]
if ( priority <= search_priority )
30007524: e15c0006 cmp ip, r6
30007528: 9a00000a bls 30007558 <_Thread_queue_Enqueue_priority+0xa0>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
3000752c: e10f9000 mrs r9, CPSR
30007530: e129f004 msr CPSR_fc, r4
30007534: e129f009 msr CPSR_fc, r9
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
30007538: e5939010 ldr r9, [r3, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
3000753c: e1180009 tst r8, r9
30007540: 1a000001 bne 3000754c <_Thread_queue_Enqueue_priority+0x94>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007544: e129f004 msr CPSR_fc, r4
30007548: eaffffed b 30007504 <_Thread_queue_Enqueue_priority+0x4c>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
3000754c: e5933000 ldr r3, [r3]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007550: e153000a cmp r3, sl
30007554: 1afffff1 bne 30007520 <_Thread_queue_Enqueue_priority+0x68>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
30007558: e5907030 ldr r7, [r0, #48] ; 0x30
3000755c: e3570001 cmp r7, #1
30007560: 1a000038 bne 30007648 <_Thread_queue_Enqueue_priority+0x190>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007564: e3a02000 mov r2, #0
if ( priority == search_priority )
30007568: e15c0006 cmp ip, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
3000756c: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
30007570: 0a00002a beq 30007620 <_Thread_queue_Enqueue_priority+0x168>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
30007574: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007578: e5813000 str r3, [r1]
the_node->previous = previous_node;
3000757c: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
30007580: e5821000 str r1, [r2]
search_node->previous = the_node;
30007584: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
30007588: e5810044 str r0, [r1, #68] ; 0x44
_ISR_Enable( level );
3000758c: ea000021 b 30007618 <_Thread_queue_Enqueue_priority+0x160>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
30007590: e5da6000 ldrb r6, [sl]
30007594: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007598: e10f4000 mrs r4, CPSR
3000759c: e3843080 orr r3, r4, #128 ; 0x80
300075a0: e129f003 msr CPSR_fc, r3
300075a4: e1a05004 mov r5, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
300075a8: e59b3008 ldr r3, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
300075ac: ea00000b b 300075e0 <_Thread_queue_Enqueue_priority+0x128>
search_priority = search_thread->current_priority;
300075b0: e5936014 ldr r6, [r3, #20]
if ( priority >= search_priority )
300075b4: e15c0006 cmp ip, r6
300075b8: 2a00000a bcs 300075e8 <_Thread_queue_Enqueue_priority+0x130>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
300075bc: e10f9000 mrs r9, CPSR
300075c0: e129f004 msr CPSR_fc, r4
300075c4: e129f009 msr CPSR_fc, r9
300075c8: e5939010 ldr r9, [r3, #16]
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
300075cc: e1180009 tst r8, r9
300075d0: 1a000001 bne 300075dc <_Thread_queue_Enqueue_priority+0x124>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300075d4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
300075d8: eaffffec b 30007590 <_Thread_queue_Enqueue_priority+0xd8> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
300075dc: e5933004 ldr r3, [r3, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
300075e0: e1530007 cmp r3, r7
300075e4: 1afffff1 bne 300075b0 <_Thread_queue_Enqueue_priority+0xf8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
300075e8: e5907030 ldr r7, [r0, #48] ; 0x30
300075ec: e3570001 cmp r7, #1
300075f0: 1a000014 bne 30007648 <_Thread_queue_Enqueue_priority+0x190>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
300075f4: e3a02000 mov r2, #0
if ( priority == search_priority )
300075f8: e15c0006 cmp ip, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
300075fc: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
30007600: 0a000006 beq 30007620 <_Thread_queue_Enqueue_priority+0x168>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
30007604: e5932000 ldr r2, [r3]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
30007608: e881000c stm r1, {r2, r3}
search_node->next = the_node;
next_node->previous = the_node;
3000760c: e5821004 str r1, [r2, #4]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
30007610: e5831000 str r1, [r3]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
30007614: e5810044 str r0, [r1, #68] ; 0x44
30007618: e129f004 msr CPSR_fc, r4
3000761c: ea000007 b 30007640 <_Thread_queue_Enqueue_priority+0x188>
30007620: e283303c add r3, r3, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
30007624: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007628: e5813000 str r3, [r1]
the_node->previous = previous_node;
3000762c: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
30007630: e5821000 str r1, [r2]
search_node->previous = the_node;
30007634: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
30007638: e5810044 str r0, [r1, #68] ; 0x44
3000763c: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007640: e3a00001 mov r0, #1
30007644: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
30007648: e5825000 str r5, [r2]
return the_thread_queue->sync_state;
3000764c: e5900030 ldr r0, [r0, #48] ; 0x30
}
30007650: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000a654 <_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
)
{
3000a654: e92d4070 push {r4, r5, r6, lr}
3000a658: e20220ff and r2, r2, #255 ; 0xff
3000a65c: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a660: e10f1000 mrs r1, CPSR
3000a664: e3813080 orr r3, r1, #128 ; 0x80
3000a668: 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);
3000a66c: e59f30a8 ldr r3, [pc, #168] ; 3000a71c <_Thread_queue_Extract_priority_helper+0xc8>
3000a670: e5940010 ldr r0, [r4, #16]
3000a674: 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 ) ) {
3000a678: e3530000 cmp r3, #0
3000a67c: 1a000000 bne 3000a684 <_Thread_queue_Extract_priority_helper+0x30>
_ISR_Enable( level );
3000a680: ea000015 b 3000a6dc <_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));
3000a684: 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;
3000a688: e8941001 ldm r4, {r0, ip}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000a68c: e284503c add r5, r4, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000a690: 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;
3000a694: 058c0000 streq r0, [ip]
next_node->previous = previous_node;
3000a698: 0580c004 streq ip, [r0, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000a69c: 0a00000c beq 3000a6d4 <_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;
3000a6a0: e5945040 ldr r5, [r4, #64] ; 0x40
new_second_node = new_first_node->next;
3000a6a4: e5936000 ldr r6, [r3]
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 ) ) {
3000a6a8: e1530005 cmp r3, r5
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;
3000a6ac: e58c3000 str r3, [ip]
next_node->previous = new_first_node;
3000a6b0: e5803004 str r3, [r0, #4]
new_first_node->next = next_node;
3000a6b4: e8831001 stm r3, {r0, ip}
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
3000a6b8: 0a000005 beq 3000a6d4 <_Thread_queue_Extract_priority_helper+0x80>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
3000a6bc: 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 =
3000a6c0: e5860004 str r0, [r6, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
3000a6c4: e5836038 str r6, [r3, #56] ; 0x38
new_first_thread->Wait.Block2n.last = last_node;
3000a6c8: e5835040 str r5, [r3, #64] ; 0x40
3000a6cc: e283303c add r3, r3, #60 ; 0x3c
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
3000a6d0: e5853000 str r3, [r5]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
3000a6d4: e3520000 cmp r2, #0
3000a6d8: 0a000001 beq 3000a6e4 <_Thread_queue_Extract_priority_helper+0x90>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a6dc: e129f001 msr CPSR_fc, r1
3000a6e0: e8bd8070 pop {r4, r5, r6, pc}
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
3000a6e4: e5943050 ldr r3, [r4, #80] ; 0x50
3000a6e8: e3530002 cmp r3, #2
3000a6ec: 0a000001 beq 3000a6f8 <_Thread_queue_Extract_priority_helper+0xa4>
3000a6f0: e129f001 msr CPSR_fc, r1
3000a6f4: ea000004 b 3000a70c <_Thread_queue_Extract_priority_helper+0xb8>
3000a6f8: e3a03003 mov r3, #3 <== NOT EXECUTED
3000a6fc: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
3000a700: 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 );
3000a704: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
3000a708: ebfff65c bl 30008080 <_Watchdog_Remove> <== NOT EXECUTED
3000a70c: e59f100c ldr r1, [pc, #12] ; 3000a720 <_Thread_queue_Extract_priority_helper+0xcc>
3000a710: e1a00004 mov r0, r4
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
3000a714: e8bd4070 pop {r4, r5, r6, lr}
3000a718: eafff136 b 30006bf8 <_Thread_Clear_state>
3001423c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
3001423c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30014240: e24dd018 sub sp, sp, #24
30014244: 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;
30014248: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3001424c: e28ba004 add sl, fp, #4
30014250: e28d7004 add r7, sp, #4
30014254: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30014258: e58da00c str sl, [sp, #12]
the_chain->permanent_null = NULL;
3001425c: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
30014260: e58db014 str fp, [sp, #20]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30014264: e1a0500d mov r5, sp
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30014268: e58d7000 str r7, [sp]
the_chain->permanent_null = NULL;
3001426c: e98d2008 stmib sp, {r3, sp}
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014270: 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;
30014274: 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 );
30014278: 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;
3001427c: e59f2150 ldr r2, [pc, #336] ; 300143d4 <_Timer_server_Body+0x198>
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014280: e1a00009 mov r0, r9
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
30014284: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
30014288: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
3001428c: e1a02005 mov r2, r5
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
30014290: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014294: e0611003 rsb r1, r1, r3
30014298: eb00106b bl 3001844c <_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();
3001429c: e59f3134 ldr r3, [pc, #308] ; 300143d8 <_Timer_server_Body+0x19c>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
300142a0: 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();
300142a4: 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 ) {
300142a8: e1560002 cmp r6, r2
300142ac: 9a000004 bls 300142c4 <_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 );
300142b0: e0621006 rsb r1, r2, r6
300142b4: e1a00008 mov r0, r8
300142b8: e1a02005 mov r2, r5
300142bc: eb001062 bl 3001844c <_Watchdog_Adjust_to_chain>
300142c0: ea000003 b 300142d4 <_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 );
300142c4: 31a00008 movcc r0, r8
300142c8: 33a01001 movcc r1, #1
300142cc: 30662002 rsbcc r2, r6, r2
300142d0: 3b001035 blcc 300183ac <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
300142d4: 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 );
300142d8: e5940078 ldr r0, [r4, #120] ; 0x78
300142dc: eb000282 bl 30014cec <_Chain_Get>
if ( timer == NULL ) {
300142e0: e2506000 subs r6, r0, #0
300142e4: 0a000009 beq 30014310 <_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 ) {
300142e8: e5963038 ldr r3, [r6, #56] ; 0x38
300142ec: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
300142f0: 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 ) {
300142f4: 0a000002 beq 30014304 <_Timer_server_Body+0xc8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
300142f8: e3530003 cmp r3, #3
300142fc: 1afffff5 bne 300142d8 <_Timer_server_Body+0x9c>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
30014300: e1a00008 mov r0, r8
30014304: e2861010 add r1, r6, #16
30014308: eb00107a bl 300184f8 <_Watchdog_Insert>
3001430c: eafffff1 b 300142d8 <_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 );
30014310: ebffff97 bl 30014174 <arm_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
30014314: e59d300c ldr r3, [sp, #12]
30014318: e153000a cmp r3, sl
3001431c: 1a000006 bne 3001433c <_Timer_server_Body+0x100>
ts->insert_chain = NULL;
30014320: e5846078 str r6, [r4, #120] ; 0x78
30014324: 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 ) ) {
30014328: e59d3000 ldr r3, [sp]
3001432c: e1530007 cmp r3, r7
)
{
if ( !_Chain_Is_empty(the_chain))
return _Chain_Get_first_unprotected(the_chain);
else
return NULL;
30014330: 13a06000 movne r6, #0
30014334: 1a000002 bne 30014344 <_Timer_server_Body+0x108>
30014338: ea000013 b 3001438c <_Timer_server_Body+0x150>
3001433c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
30014340: eaffffcd b 3001427c <_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 );
30014344: ebffff8a bl 30014174 <arm_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
30014348: e59d3000 ldr r3, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
3001434c: e1530007 cmp r3, r7
30014350: 0a00000b beq 30014384 <_Timer_server_Body+0x148>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
30014354: e5932000 ldr r2, [r3]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
30014358: e3530000 cmp r3, #0
the_chain->first = new_first;
3001435c: e58d2000 str r2, [sp]
new_first->previous = _Chain_Head(the_chain);
30014360: e5825004 str r5, [r2, #4]
30014364: 0a000006 beq 30014384 <_Timer_server_Body+0x148>
watchdog->state = WATCHDOG_INACTIVE;
30014368: e5836008 str r6, [r3, #8]
3001436c: 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 );
30014370: e5930020 ldr r0, [r3, #32]
30014374: e5931024 ldr r1, [r3, #36] ; 0x24
30014378: e1a0e00f mov lr, pc
3001437c: e593f01c ldr pc, [r3, #28]
}
30014380: eaffffef b 30014344 <_Timer_server_Body+0x108>
30014384: e129f000 msr CPSR_fc, r0
30014388: eaffffb9 b 30014274 <_Timer_server_Body+0x38>
} else {
ts->active = false;
3001438c: e3a03000 mov r3, #0
30014390: e5c4307c strb r3, [r4, #124] ; 0x7c
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
30014394: ebffff7a bl 30014184 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
30014398: e3a01008 mov r1, #8
3001439c: e5940000 ldr r0, [r4]
300143a0: eb000dc1 bl 30017aac <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
300143a4: e1a00004 mov r0, r4
300143a8: ebffff7b bl 3001419c <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
300143ac: e1a00004 mov r0, r4
300143b0: ebffff8d bl 300141ec <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
300143b4: eb000b49 bl 300170e0 <_Thread_Enable_dispatch>
ts->active = true;
300143b8: e3a03001 mov r3, #1
300143bc: 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 );
300143c0: e2840008 add r0, r4, #8
300143c4: eb0010a1 bl 30018650 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
300143c8: e2840040 add r0, r4, #64 ; 0x40
300143cc: eb00109f bl 30018650 <_Watchdog_Remove>
300143d0: eaffffa7 b 30014274 <_Timer_server_Body+0x38>
300098c8 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
300098c8: e5902000 ldr r2, [r0]
300098cc: e5913000 ldr r3, [r1]
300098d0: e1520003 cmp r2, r3
return true;
300098d4: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
300098d8: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
300098dc: ba000005 blt 300098f8 <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
300098e0: e5900004 ldr r0, [r0, #4]
300098e4: e5913004 ldr r3, [r1, #4]
300098e8: e1500003 cmp r0, r3
300098ec: d3a00000 movle r0, #0
300098f0: c3a00001 movgt r0, #1
300098f4: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
300098f8: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
300098fc: e12fff1e bx lr <== NOT EXECUTED
30007db8 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007db8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007dbc: e59f503c ldr r5, [pc, #60] ; 30007e00 <_User_extensions_Fatal+0x48>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007dc0: e1a08000 mov r8, r0
30007dc4: e1a07002 mov r7, r2
30007dc8: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007dcc: e5954008 ldr r4, [r5, #8]
30007dd0: ea000007 b 30007df4 <_User_extensions_Fatal+0x3c>
!_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 )
30007dd4: e5943030 ldr r3, [r4, #48] ; 0x30
30007dd8: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
30007ddc: 11a00008 movne r0, r8
30007de0: 11a01006 movne r1, r6
30007de4: 11a02007 movne r2, r7
30007de8: 11a0e00f movne lr, pc
30007dec: 112fff13 bxne r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
30007df0: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007df4: e1540005 cmp r4, r5
30007df8: 1afffff5 bne 30007dd4 <_User_extensions_Fatal+0x1c>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
30007dfc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
3000b97c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000b97c: 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 )
3000b980: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000b984: e1a04000 mov r4, r0
3000b988: 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;
3000b98c: 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 )
3000b990: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
3000b994: e59f314c ldr r3, [pc, #332] ; 3000bae8 <rtems_task_mode+0x16c>
3000b998: 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;
3000b99c: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
3000b9a0: 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 )
3000b9a4: 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;
3000b9a8: 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;
3000b9ac: 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;
3000b9b0: 03a08c01 moveq r8, #256 ; 0x100
3000b9b4: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
3000b9b8: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
3000b9bc: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
3000b9c0: e3590000 cmp r9, #0
3000b9c4: 03a09b01 moveq r9, #1024 ; 0x400
3000b9c8: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
3000b9cc: ebfff307 bl 300085f0 <_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;
3000b9d0: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
3000b9d4: e1898008 orr r8, r9, r8
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000b9d8: 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;
3000b9dc: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000b9e0: 0a000003 beq 3000b9f4 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
3000b9e4: e3140c01 tst r4, #256 ; 0x100
3000b9e8: 13a03000 movne r3, #0
3000b9ec: 03a03001 moveq r3, #1
3000b9f0: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
3000b9f4: e3150c02 tst r5, #512 ; 0x200
3000b9f8: 0a000006 beq 3000ba18 <rtems_task_mode+0x9c>
if ( _Modes_Is_timeslice(mode_set) ) {
3000b9fc: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
3000ba00: 13a03001 movne r3, #1
3000ba04: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
3000ba08: 159f30dc ldrne r3, [pc, #220] ; 3000baec <rtems_task_mode+0x170>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
3000ba0c: 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;
3000ba10: 15933000 ldrne r3, [r3]
3000ba14: 15873078 strne r3, [r7, #120] ; 0x78
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
3000ba18: e3150080 tst r5, #128 ; 0x80
3000ba1c: 0a000001 beq 3000ba28 <rtems_task_mode+0xac>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
3000ba20: e2040080 and r0, r4, #128 ; 0x80
3000ba24: ebfff2ec bl 300085dc <_CPU_ISR_Set_level>
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
3000ba28: e2150b01 ands r0, r5, #1024 ; 0x400
3000ba2c: 0a000013 beq 3000ba80 <rtems_task_mode+0x104>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000ba30: 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 ) {
3000ba34: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000ba38: 13a03000 movne r3, #0
3000ba3c: 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 ) {
3000ba40: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000ba44: 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 ) {
3000ba48: 0a00000c beq 3000ba80 <rtems_task_mode+0x104>
asr->is_enabled = is_asr_enabled;
3000ba4c: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000ba50: e10f3000 mrs r3, CPSR
3000ba54: e3832080 orr r2, r3, #128 ; 0x80
3000ba58: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
3000ba5c: e5962018 ldr r2, [r6, #24]
information->signals_pending = information->signals_posted;
3000ba60: e5961014 ldr r1, [r6, #20]
information->signals_posted = _signals;
3000ba64: 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;
3000ba68: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000ba6c: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
3000ba70: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000ba74: e3500000 cmp r0, #0
3000ba78: 13a00001 movne r0, #1
3000ba7c: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
3000ba80: e59f3068 ldr r3, [pc, #104] ; 3000baf0 <rtems_task_mode+0x174>
3000ba84: e5933000 ldr r3, [r3]
3000ba88: e3530003 cmp r3, #3
3000ba8c: 1a000013 bne 3000bae0 <rtems_task_mode+0x164>
*/
RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
3000ba90: e59f2050 ldr r2, [pc, #80] ; 3000bae8 <rtems_task_mode+0x16c>
3000ba94: e5923004 ldr r3, [r2, #4]
if ( !_States_Is_ready( executing->current_state ) ||
3000ba98: e5931010 ldr r1, [r3, #16]
3000ba9c: e3510000 cmp r1, #0
3000baa0: 1a000005 bne 3000babc <rtems_task_mode+0x140>
3000baa4: e5922008 ldr r2, [r2, #8]
3000baa8: e1530002 cmp r3, r2
3000baac: 0a000006 beq 3000bacc <rtems_task_mode+0x150>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
3000bab0: e5d33074 ldrb r3, [r3, #116] ; 0x74
3000bab4: e3530000 cmp r3, #0
3000bab8: 0a000003 beq 3000bacc <rtems_task_mode+0x150>
_Context_Switch_necessary = true;
3000babc: e59f3024 ldr r3, [pc, #36] ; 3000bae8 <rtems_task_mode+0x16c>
3000bac0: e3a02001 mov r2, #1
3000bac4: e5c32010 strb r2, [r3, #16]
3000bac8: ea000001 b 3000bad4 <rtems_task_mode+0x158>
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
3000bacc: e3500000 cmp r0, #0
3000bad0: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
_Thread_Dispatch();
3000bad4: ebffece6 bl 30006e74 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
3000bad8: e3a00000 mov r0, #0
3000badc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000bae0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000bae4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED