RTEMS 4.11Annotated Report
Sat Jul 17 02:19:01 2010
a0014c20 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a0014c20: 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
)
{
a0014c24: 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 ) {
a0014c28: 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
)
{
a0014c2c: e1a06000 mov r6, r0
a0014c30: e1a0a001 mov sl, r1
a0014c34: e1a07002 mov r7, r2
a0014c38: 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 ) {
a0014c3c: 8a000013 bhi a0014c90 <_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 ) {
a0014c40: e5905048 ldr r5, [r0, #72] ; 0x48
a0014c44: e3550000 cmp r5, #0
a0014c48: 0a000009 beq a0014c74 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a0014c4c: e3a00000 mov r0, #0
a0014c50: e5880000 str r0, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0014c54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0014c58: e594002c ldr r0, [r4, #44] ; 0x2c
a0014c5c: e1a0100a mov r1, sl
a0014c60: e1a02007 mov r2, r7
a0014c64: eb001ea8 bl a001c70c <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0014c68: 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;
a0014c6c: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0014c70: 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 =
a0014c74: e1a00006 mov r0, r6
a0014c78: eb0009b2 bl a0017348 <_Thread_queue_Dequeue>
a0014c7c: e2504000 subs r4, r0, #0
a0014c80: 1afffff4 bne a0014c58 <_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;
a0014c84: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0014c88: e1a00004 mov r0, r4
a0014c8c: 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;
a0014c90: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0014c94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000dc6c <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dc6c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
a000dc70: e3130003 tst r3, #3
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dc74: e1a04000 mov r4, r0
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a000dc78: e3a00000 mov r0, #0
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dc7c: e1a06002 mov r6, r2
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
a000dc80: e5842044 str r2, [r4, #68] ; 0x44
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dc84: e1a05001 mov r5, r1
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a000dc88: e5840048 str r0, [r4, #72] ; 0x48
the_message_queue->maximum_message_size = maximum_message_size;
a000dc8c: e584304c str r3, [r4, #76] ; 0x4c
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
a000dc90: 01a02003 moveq r2, r3
a000dc94: 0a000003 beq a000dca8 <_CORE_message_queue_Initialize+0x3c>
allocated_message_size += sizeof(uint32_t);
a000dc98: e2832004 add r2, r3, #4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
a000dc9c: e3c22003 bic r2, r2, #3
}
if (allocated_message_size < maximum_message_size)
a000dca0: e1520003 cmp r2, r3
a000dca4: 3a00001e bcc a000dd24 <_CORE_message_queue_Initialize+0xb8>
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
a000dca8: e2827010 add r7, r2, #16
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
a000dcac: e0000796 mul r0, r6, r7
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
a000dcb0: e1500002 cmp r0, r2
a000dcb4: 3a000018 bcc a000dd1c <_CORE_message_queue_Initialize+0xb0>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a000dcb8: eb000acd bl a00107f4 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
a000dcbc: e3500000 cmp r0, #0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a000dcc0: e1a01000 mov r1, r0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
a000dcc4: e584005c str r0, [r4, #92] ; 0x5c
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
a000dcc8: 0a000015 beq a000dd24 <_CORE_message_queue_Initialize+0xb8>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
a000dccc: e2840060 add r0, r4, #96 ; 0x60
a000dcd0: e1a02006 mov r2, r6
a000dcd4: e1a03007 mov r3, r7
a000dcd8: eb001229 bl a0012584 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000dcdc: e2843054 add r3, r4, #84 ; 0x54
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
a000dce0: e5951000 ldr r1, [r5]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a000dce4: e5843050 str r3, [r4, #80] ; 0x50
the_chain->permanent_null = NULL;
a000dce8: e3a03000 mov r3, #0
a000dcec: e5843054 str r3, [r4, #84] ; 0x54
the_message_queue->message_buffers,
(size_t) maximum_pending_messages,
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
a000dcf0: e2843050 add r3, r4, #80 ; 0x50
the_chain->last = _Chain_Head(the_chain);
a000dcf4: e5843058 str r3, [r4, #88] ; 0x58
_Thread_queue_Initialize(
a000dcf8: e1a00004 mov r0, r4
a000dcfc: e3510001 cmp r1, #1
a000dd00: 13a01000 movne r1, #0
a000dd04: 03a01001 moveq r1, #1
a000dd08: e3a02080 mov r2, #128 ; 0x80
a000dd0c: e3a03006 mov r3, #6
a000dd10: eb0007e3 bl a000fca4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
a000dd14: e3a00001 mov r0, #1
a000dd18: e8bd80f0 pop {r4, r5, r6, r7, pc}
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
a000dd1c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000dd20: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
a000dd24: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0009e98 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009e98: e59f212c ldr r2, [pc, #300] ; a0009fcc <_CORE_mutex_Seize_interrupt_trylock+0x134>
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a0009e9c: e1a03000 mov r3, r0
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a0009ea0: e593c050 ldr ip, [r3, #80] ; 0x50
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009ea4: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a0009ea8: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a0009eac: e15c0000 cmp ip, r0
a0009eb0: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a0009eb4: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a0009eb8: 0a00002c beq a0009f70 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
a0009ebc: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a0009ec0: 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;
a0009ec4: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
a0009ec8: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a0009ecc: e3a00001 mov r0, #1
a0009ed0: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a0009ed4: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a0009ed8: e3500002 cmp r0, #2
a0009edc: 0a000001 beq a0009ee8 <_CORE_mutex_Seize_interrupt_trylock+0x50>
a0009ee0: e3500003 cmp r0, #3
a0009ee4: 1a000004 bne a0009efc <_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++;
a0009ee8: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a0009eec: 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++;
a0009ef0: e28c4001 add r4, ip, #1
a0009ef4: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a0009ef8: 0a000000 beq a0009f00 <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
a0009efc: ea00002a b a0009fac <_CORE_mutex_Seize_interrupt_trylock+0x114>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a0009f00: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
a0009f04: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
a0009f08: e1540000 cmp r4, r0
a0009f0c: 1a000000 bne a0009f14 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
a0009f10: ea000025 b a0009fac <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
}
if ( current > ceiling ) {
a0009f14: 9a00000b bls a0009f48 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009f18: e59f20b0 ldr r2, [pc, #176] ; a0009fd0 <_CORE_mutex_Seize_interrupt_trylock+0x138>
a0009f1c: e5920000 ldr r0, [r2]
a0009f20: e2800001 add r0, r0, #1
a0009f24: e5820000 str r0, [r2]
a0009f28: e5912000 ldr r2, [r1]
a0009f2c: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a0009f30: e3a02000 mov r2, #0
a0009f34: e593005c ldr r0, [r3, #92] ; 0x5c
a0009f38: e593104c ldr r1, [r3, #76] ; 0x4c
a0009f3c: ebfff276 bl a000691c <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a0009f40: ebfff3bf bl a0006e44 <_Thread_Enable_dispatch>
a0009f44: ea00001a b a0009fb4 <_CORE_mutex_Seize_interrupt_trylock+0x11c>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a0009f48: e3a00006 mov r0, #6
a0009f4c: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a0009f50: e3a00001 mov r0, #1
a0009f54: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a0009f58: e3a00000 mov r0, #0
a0009f5c: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a0009f60: e582c01c str ip, [r2, #28]
a0009f64: e5913000 ldr r3, [r1]
a0009f68: e129f003 msr CPSR_fc, r3
a0009f6c: 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 ) ) {
a0009f70: e593005c ldr r0, [r3, #92] ; 0x5c
a0009f74: e1500002 cmp r0, r2
a0009f78: 1a00000f bne a0009fbc <_CORE_mutex_Seize_interrupt_trylock+0x124>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a0009f7c: e5932040 ldr r2, [r3, #64] ; 0x40
a0009f80: e3520000 cmp r2, #0
a0009f84: 0a000002 beq a0009f94 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
a0009f88: e3520001 cmp r2, #1
a0009f8c: 1a00000c bne a0009fc4 <_CORE_mutex_Seize_interrupt_trylock+0x12c>
a0009f90: ea000003 b a0009fa4 <_CORE_mutex_Seize_interrupt_trylock+0x10c><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a0009f94: e5932054 ldr r2, [r3, #84] ; 0x54
a0009f98: e2822001 add r2, r2, #1
a0009f9c: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
a0009fa0: ea000001 b a0009fac <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a0009fa4: e3a03002 mov r3, #2 <== NOT EXECUTED
a0009fa8: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
a0009fac: e5913000 ldr r3, [r1]
a0009fb0: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a0009fb4: e3a00000 mov r0, #0
a0009fb8: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a0009fbc: e3a00001 mov r0, #1
a0009fc0: e8bd8010 pop {r4, pc}
a0009fc4: e3a00001 mov r0, #1
a0009fc8: e8bd8010 pop {r4, pc}
a0006c9c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006c9c: 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;
a0006ca0: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006ca4: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006ca8: e59f44c8 ldr r4, [pc, #1224] ; a0007178 <_Heap_Walk+0x4dc>
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a0006cac: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a0006cb0: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006cb4: e31200ff tst r2, #255 ; 0xff
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;
a0006cb8: e590c020 ldr ip, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a0006cbc: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006cc0: e59f34b4 ldr r3, [pc, #1204] ; a000717c <_Heap_Walk+0x4e0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006cc4: e1a06000 mov r6, r0
a0006cc8: e1a05001 mov r5, r1
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006ccc: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0006cd0: e59f34a8 ldr r3, [pc, #1192] ; a0007180 <_Heap_Walk+0x4e4>
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
a0006cd4: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
a0006cd8: 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() ) ) {
a0006cdc: e5933000 ldr r3, [r3]
a0006ce0: e3530003 cmp r3, #3
a0006ce4: 1a000118 bne a000714c <_Heap_Walk+0x4b0>
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)(
a0006ce8: e59dc024 ldr ip, [sp, #36] ; 0x24
a0006cec: e59d2020 ldr r2, [sp, #32]
a0006cf0: e58dc000 str ip, [sp]
a0006cf4: e5903018 ldr r3, [r0, #24]
a0006cf8: e58d3004 str r3, [sp, #4]
a0006cfc: e590301c ldr r3, [r0, #28]
a0006d00: e58d200c str r2, [sp, #12]
a0006d04: e59f2478 ldr r2, [pc, #1144] ; a0007184 <_Heap_Walk+0x4e8>
a0006d08: e58d3008 str r3, [sp, #8]
a0006d0c: e59d3028 ldr r3, [sp, #40] ; 0x28
a0006d10: e58d3010 str r3, [sp, #16]
a0006d14: e5903008 ldr r3, [r0, #8]
a0006d18: e58d3014 str r3, [sp, #20]
a0006d1c: e590300c ldr r3, [r0, #12]
a0006d20: e1a00001 mov r0, r1
a0006d24: e3a01000 mov r1, #0
a0006d28: e58d3018 str r3, [sp, #24]
a0006d2c: e1a03009 mov r3, r9
a0006d30: e12fff34 blx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a0006d34: e3590000 cmp r9, #0
a0006d38: 1a000005 bne a0006d54 <_Heap_Walk+0xb8>
(*printer)( source, true, "page size is zero\n" );
a0006d3c: e1a00005 mov r0, r5
a0006d40: e3a01001 mov r1, #1
a0006d44: e59f243c ldr r2, [pc, #1084] ; a0007188 <_Heap_Walk+0x4ec>
a0006d48: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006d4c: e1a08009 mov r8, r9
a0006d50: ea0000fe b a0007150 <_Heap_Walk+0x4b4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a0006d54: e2198003 ands r8, r9, #3
(*printer)(
a0006d58: 11a00005 movne r0, r5
a0006d5c: 13a01001 movne r1, #1
a0006d60: 159f2424 ldrne r2, [pc, #1060] ; a000718c <_Heap_Walk+0x4f0>
a0006d64: 11a03009 movne r3, r9
a0006d68: 1a0000ff bne a000716c <_Heap_Walk+0x4d0>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0006d6c: e59d0024 ldr r0, [sp, #36] ; 0x24
a0006d70: e1a01009 mov r1, r9
a0006d74: ebffe73e bl a0000a74 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a0006d78: e250b000 subs fp, r0, #0
a0006d7c: 0a000005 beq a0006d98 <_Heap_Walk+0xfc>
(*printer)(
a0006d80: e1a00005 mov r0, r5
a0006d84: e3a01001 mov r1, #1
a0006d88: e59f2400 ldr r2, [pc, #1024] ; a0007190 <_Heap_Walk+0x4f4>
a0006d8c: e59d3024 ldr r3, [sp, #36] ; 0x24
a0006d90: e12fff34 blx r4
a0006d94: ea0000ed b a0007150 <_Heap_Walk+0x4b4>
a0006d98: e59dc020 ldr ip, [sp, #32]
a0006d9c: e1a01009 mov r1, r9
a0006da0: e28c0008 add r0, ip, #8
a0006da4: ebffe732 bl a0000a74 <__umodsi3>
);
return false;
}
if (
a0006da8: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a0006dac: 11a00005 movne r0, r5
a0006db0: 13a01001 movne r1, #1
a0006db4: 159f23d8 ldrne r2, [pc, #984] ; a0007194 <_Heap_Walk+0x4f8>
a0006db8: 159d3020 ldrne r3, [sp, #32]
a0006dbc: 1a0000c3 bne a00070d0 <_Heap_Walk+0x434>
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;
a0006dc0: e59d2020 ldr r2, [sp, #32]
a0006dc4: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a0006dc8: e2188001 ands r8, r8, #1
(*printer)(
a0006dcc: 01a00005 moveq r0, r5
a0006dd0: 03a01001 moveq r1, #1
a0006dd4: 059f23bc ldreq r2, [pc, #956] ; a0007198 <_Heap_Walk+0x4fc>
a0006dd8: 0a000009 beq a0006e04 <_Heap_Walk+0x168>
- 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;
a0006ddc: e59d3028 ldr r3, [sp, #40] ; 0x28
a0006de0: e5937004 ldr r7, [r3, #4]
a0006de4: 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);
a0006de8: 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;
a0006dec: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a0006df0: e2188001 ands r8, r8, #1
a0006df4: 1a000004 bne a0006e0c <_Heap_Walk+0x170>
(*printer)(
a0006df8: e59f239c ldr r2, [pc, #924] ; a000719c <_Heap_Walk+0x500>
a0006dfc: e1a00005 mov r0, r5
a0006e00: e3a01001 mov r1, #1
a0006e04: e12fff34 blx r4
a0006e08: ea0000d0 b a0007150 <_Heap_Walk+0x4b4>
);
return false;
}
if (
a0006e0c: e59dc020 ldr ip, [sp, #32]
a0006e10: e157000c cmp r7, ip
a0006e14: 0a000005 beq a0006e30 <_Heap_Walk+0x194>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a0006e18: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006e1c: e3a01001 mov r1, #1 <== NOT EXECUTED
a0006e20: e59f2378 ldr r2, [pc, #888] ; a00071a0 <_Heap_Walk+0x504> <== NOT EXECUTED
a0006e24: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006e28: e1a0800a mov r8, sl <== NOT EXECUTED
a0006e2c: ea0000c7 b a0007150 <_Heap_Walk+0x4b4> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a0006e30: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
a0006e34: 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 );
a0006e38: e1a0a006 mov sl, r6
a0006e3c: ea000032 b a0006f0c <_Heap_Walk+0x270>
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;
a0006e40: e5963020 ldr r3, [r6, #32]
a0006e44: e1530008 cmp r3, r8
a0006e48: 83a0c000 movhi ip, #0
a0006e4c: 8a000003 bhi a0006e60 <_Heap_Walk+0x1c4>
a0006e50: e596c024 ldr ip, [r6, #36] ; 0x24
a0006e54: e15c0008 cmp ip, r8
a0006e58: 33a0c000 movcc ip, #0
a0006e5c: 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 ) ) {
a0006e60: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
a0006e64: 01a00005 moveq r0, r5
a0006e68: 03a01001 moveq r1, #1
a0006e6c: 059f2330 ldreq r2, [pc, #816] ; a00071a4 <_Heap_Walk+0x508>
a0006e70: 0a000012 beq a0006ec0 <_Heap_Walk+0x224>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0006e74: e2880008 add r0, r8, #8
a0006e78: e1a0100b mov r1, fp
a0006e7c: ebffe6fc bl a0000a74 <__umodsi3>
);
return false;
}
if (
a0006e80: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a0006e84: 11a00005 movne r0, r5
a0006e88: 13a01001 movne r1, #1
a0006e8c: 159f2314 ldrne r2, [pc, #788] ; a00071a8 <_Heap_Walk+0x50c>
a0006e90: 11a03008 movne r3, r8
a0006e94: 1a0000b4 bne a000716c <_Heap_Walk+0x4d0>
- 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;
a0006e98: e5983004 ldr r3, [r8, #4]
a0006e9c: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a0006ea0: 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;
a0006ea4: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0006ea8: e2133001 ands r3, r3, #1
a0006eac: e58d302c str r3, [sp, #44] ; 0x2c
a0006eb0: 0a000008 beq a0006ed8 <_Heap_Walk+0x23c>
(*printer)(
a0006eb4: e59f22f0 ldr r2, [pc, #752] ; a00071ac <_Heap_Walk+0x510>
a0006eb8: e1a00005 mov r0, r5
a0006ebc: e3a01001 mov r1, #1
a0006ec0: e1a03008 mov r3, r8
a0006ec4: e58dc01c str ip, [sp, #28]
a0006ec8: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006ecc: e59dc01c ldr ip, [sp, #28]
a0006ed0: e1a0800c mov r8, ip
a0006ed4: ea00009d b a0007150 <_Heap_Walk+0x4b4>
);
return false;
}
if ( free_block->prev != prev_block ) {
a0006ed8: e598300c ldr r3, [r8, #12]
a0006edc: e153000a cmp r3, sl
a0006ee0: 0a000007 beq a0006f04 <_Heap_Walk+0x268>
(*printer)(
a0006ee4: e58d3000 str r3, [sp]
a0006ee8: e1a00005 mov r0, r5
a0006eec: e1a03008 mov r3, r8
a0006ef0: e3a01001 mov r1, #1
a0006ef4: e59f22b4 ldr r2, [pc, #692] ; a00071b0 <_Heap_Walk+0x514>
a0006ef8: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006efc: e59d802c ldr r8, [sp, #44] ; 0x2c
a0006f00: ea000092 b a0007150 <_Heap_Walk+0x4b4>
return false;
}
prev_block = free_block;
free_block = free_block->next;
a0006f04: e1a0a008 mov sl, r8
a0006f08: 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 ) {
a0006f0c: e1580006 cmp r8, r6
a0006f10: 1affffca bne a0006e40 <_Heap_Walk+0x1a4>
a0006f14: ea000000 b a0006f1c <_Heap_Walk+0x280>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a0006f18: e1a07008 mov r7, r8
return true;
}
a0006f1c: 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;
a0006f20: 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;
a0006f24: 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);
a0006f28: 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;
a0006f2c: e1520008 cmp r2, r8
a0006f30: 83a0b000 movhi fp, #0
a0006f34: 8a000003 bhi a0006f48 <_Heap_Walk+0x2ac>
a0006f38: e596b024 ldr fp, [r6, #36] ; 0x24
a0006f3c: e15b0008 cmp fp, r8
a0006f40: 33a0b000 movcc fp, #0
a0006f44: 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 ) ) {
a0006f48: e21bb0ff ands fp, fp, #255 ; 0xff
a0006f4c: 1a000006 bne a0006f6c <_Heap_Walk+0x2d0>
(*printer)(
a0006f50: e58d8000 str r8, [sp]
a0006f54: e1a00005 mov r0, r5
a0006f58: e3a01001 mov r1, #1
a0006f5c: e59f2250 ldr r2, [pc, #592] ; a00071b4 <_Heap_Walk+0x518>
a0006f60: e1a03007 mov r3, r7
a0006f64: e12fff34 blx r4
a0006f68: ea000059 b a00070d4 <_Heap_Walk+0x438>
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;
a0006f6c: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0006f70: e1a0000a mov r0, sl
a0006f74: e1a01009 mov r1, r9
a0006f78: e057b002 subs fp, r7, r2
a0006f7c: 13a0b001 movne fp, #1
a0006f80: e58d301c str r3, [sp, #28]
a0006f84: ebffe6ba bl a0000a74 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a0006f88: e3500000 cmp r0, #0
a0006f8c: e59d301c ldr r3, [sp, #28]
a0006f90: 0a000005 beq a0006fac <_Heap_Walk+0x310>
a0006f94: e35b0000 cmp fp, #0
(*printer)(
a0006f98: 158da000 strne sl, [sp]
a0006f9c: 11a00005 movne r0, r5
a0006fa0: 13a01001 movne r1, #1
a0006fa4: 159f220c ldrne r2, [pc, #524] ; a00071b8 <_Heap_Walk+0x51c>
a0006fa8: 1a000013 bne a0006ffc <_Heap_Walk+0x360>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a0006fac: e59dc024 ldr ip, [sp, #36] ; 0x24
a0006fb0: e15a000c cmp sl, ip
a0006fb4: 2a000008 bcs a0006fdc <_Heap_Walk+0x340>
a0006fb8: e35b0000 cmp fp, #0
a0006fbc: 0a000006 beq a0006fdc <_Heap_Walk+0x340>
(*printer)(
a0006fc0: e88d1400 stm sp, {sl, ip}
a0006fc4: e1a00005 mov r0, r5
a0006fc8: e3a01001 mov r1, #1
a0006fcc: e59f21e8 ldr r2, [pc, #488] ; a00071bc <_Heap_Walk+0x520>
a0006fd0: e1a03007 mov r3, r7
a0006fd4: e12fff34 blx r4
a0006fd8: ea000064 b a0007170 <_Heap_Walk+0x4d4>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a0006fdc: e1580007 cmp r8, r7
a0006fe0: 8a000008 bhi a0007008 <_Heap_Walk+0x36c>
a0006fe4: e35b0000 cmp fp, #0
a0006fe8: 0a000006 beq a0007008 <_Heap_Walk+0x36c>
(*printer)(
a0006fec: e59f21cc ldr r2, [pc, #460] ; a00071c0 <_Heap_Walk+0x524>
a0006ff0: e58d8000 str r8, [sp]
a0006ff4: e1a00005 mov r0, r5
a0006ff8: e3a01001 mov r1, #1
a0006ffc: e1a03007 mov r3, r7
a0007000: e12fff34 blx r4
a0007004: ea000059 b a0007170 <_Heap_Walk+0x4d4>
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;
a0007008: e203b001 and fp, r3, #1
a000700c: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a0007010: e3130001 tst r3, #1
a0007014: 1a000038 bne a00070fc <_Heap_Walk+0x460>
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 ?
a0007018: 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)(
a000701c: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a0007020: 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)(
a0007024: e1520003 cmp r2, r3
a0007028: 059f0194 ldreq r0, [pc, #404] ; a00071c4 <_Heap_Walk+0x528>
a000702c: 0a000003 beq a0007040 <_Heap_Walk+0x3a4>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a0007030: e59f3190 ldr r3, [pc, #400] ; a00071c8 <_Heap_Walk+0x52c>
a0007034: e1520006 cmp r2, r6
a0007038: e59f018c ldr r0, [pc, #396] ; a00071cc <_Heap_Walk+0x530>
a000703c: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a0007040: 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)(
a0007044: e1530001 cmp r3, r1
a0007048: 059f1180 ldreq r1, [pc, #384] ; a00071d0 <_Heap_Walk+0x534>
a000704c: 0a000003 beq a0007060 <_Heap_Walk+0x3c4>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
a0007050: e59fc17c ldr ip, [pc, #380] ; a00071d4 <_Heap_Walk+0x538>
a0007054: e1530006 cmp r3, r6
a0007058: e59f116c ldr r1, [pc, #364] ; a00071cc <_Heap_Walk+0x530>
a000705c: 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)(
a0007060: e58d2004 str r2, [sp, #4]
a0007064: e58d0008 str r0, [sp, #8]
a0007068: e58d300c str r3, [sp, #12]
a000706c: e58d1010 str r1, [sp, #16]
a0007070: e1a03007 mov r3, r7
a0007074: e58da000 str sl, [sp]
a0007078: e1a00005 mov r0, r5
a000707c: e3a01000 mov r1, #0
a0007080: e59f2150 ldr r2, [pc, #336] ; a00071d8 <_Heap_Walk+0x53c>
a0007084: e12fff34 blx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a0007088: e5983000 ldr r3, [r8]
a000708c: e15a0003 cmp sl, r3
a0007090: 0a000008 beq a00070b8 <_Heap_Walk+0x41c>
(*printer)(
a0007094: e58d3004 str r3, [sp, #4]
a0007098: e58da000 str sl, [sp]
a000709c: e58d8008 str r8, [sp, #8]
a00070a0: e1a00005 mov r0, r5
a00070a4: e3a01001 mov r1, #1
a00070a8: e59f212c ldr r2, [pc, #300] ; a00071dc <_Heap_Walk+0x540>
a00070ac: e1a03007 mov r3, r7
a00070b0: e12fff34 blx r4
a00070b4: ea00002d b a0007170 <_Heap_Walk+0x4d4>
);
return false;
}
if ( !prev_used ) {
a00070b8: e35b0000 cmp fp, #0
a00070bc: 1a000006 bne a00070dc <_Heap_Walk+0x440>
(*printer)(
a00070c0: e59f2118 ldr r2, [pc, #280] ; a00071e0 <_Heap_Walk+0x544>
a00070c4: e1a00005 mov r0, r5
a00070c8: e3a01001 mov r1, #1
a00070cc: e1a03007 mov r3, r7
a00070d0: e12fff34 blx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a00070d4: e1a0800b mov r8, fp
a00070d8: ea00001c b a0007150 <_Heap_Walk+0x4b4>
block = next_block;
} while ( block != first_block );
return true;
}
a00070dc: e5963008 ldr r3, [r6, #8]
a00070e0: ea000002 b a00070f0 <_Heap_Walk+0x454>
{
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 ) {
a00070e4: e1530007 cmp r3, r7
a00070e8: 0a000014 beq a0007140 <_Heap_Walk+0x4a4>
return true;
}
free_block = free_block->next;
a00070ec: 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 ) {
a00070f0: e1530006 cmp r3, r6
a00070f4: 1afffffa bne a00070e4 <_Heap_Walk+0x448>
a00070f8: ea000017 b a000715c <_Heap_Walk+0x4c0>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a00070fc: e35b0000 cmp fp, #0
a0007100: 0a000006 beq a0007120 <_Heap_Walk+0x484>
(*printer)(
a0007104: e58da000 str sl, [sp]
a0007108: e1a00005 mov r0, r5
a000710c: e3a01000 mov r1, #0
a0007110: e59f20cc ldr r2, [pc, #204] ; a00071e4 <_Heap_Walk+0x548>
a0007114: e1a03007 mov r3, r7
a0007118: e12fff34 blx r4
a000711c: ea000007 b a0007140 <_Heap_Walk+0x4a4>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a0007120: e58da000 str sl, [sp]
a0007124: e5973000 ldr r3, [r7]
a0007128: e1a00005 mov r0, r5
a000712c: e1a0100b mov r1, fp
a0007130: e58d3004 str r3, [sp, #4]
a0007134: e59f20ac ldr r2, [pc, #172] ; a00071e8 <_Heap_Walk+0x54c>
a0007138: e1a03007 mov r3, r7
a000713c: e12fff34 blx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a0007140: e59d2020 ldr r2, [sp, #32]
a0007144: e1580002 cmp r8, r2
a0007148: 1affff72 bne a0006f18 <_Heap_Walk+0x27c>
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;
a000714c: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
a0007150: e1a00008 mov r0, r8
a0007154: e28dd030 add sp, sp, #48 ; 0x30
a0007158: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a000715c: e59f2088 ldr r2, [pc, #136] ; a00071ec <_Heap_Walk+0x550>
a0007160: e1a00005 mov r0, r5
a0007164: e3a01001 mov r1, #1
a0007168: e1a03007 mov r3, r7
a000716c: e12fff34 blx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a0007170: e3a08000 mov r8, #0
a0007174: eafffff5 b a0007150 <_Heap_Walk+0x4b4>
a0007b0c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
a0007b0c: e92d4011 push {r0, r4, lr}
a0007b10: e1a04001 mov r4, r1
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a0007b14: e2501000 subs r1, r0, #0
a0007b18: 059f306c ldreq r3, [pc, #108] ; a0007b8c <_Objects_Id_to_name+0x80>
a0007b1c: 05933004 ldreq r3, [r3, #4]
a0007b20: 05931008 ldreq r1, [r3, #8]
a0007b24: e1a03c21 lsr r3, r1, #24
a0007b28: 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 )
a0007b2c: e2432001 sub r2, r3, #1
a0007b30: e3520002 cmp r2, #2
a0007b34: 8a00000d bhi a0007b70 <_Objects_Id_to_name+0x64>
a0007b38: ea00000e b a0007b78 <_Objects_Id_to_name+0x6c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
a0007b3c: 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 ];
a0007b40: e7930102 ldr r0, [r3, r2, lsl #2]
if ( !information )
a0007b44: e3500000 cmp r0, #0
a0007b48: 0a000008 beq a0007b70 <_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 );
a0007b4c: e1a0200d mov r2, sp
a0007b50: ebffffd3 bl a0007aa4 <_Objects_Get>
if ( !the_object )
a0007b54: e3500000 cmp r0, #0
a0007b58: 0a000004 beq a0007b70 <_Objects_Id_to_name+0x64>
return OBJECTS_INVALID_ID;
*name = the_object->name;
a0007b5c: e590300c ldr r3, [r0, #12]
a0007b60: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a0007b64: eb000214 bl a00083bc <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a0007b68: e3a00000 mov r0, #0
a0007b6c: ea000000 b a0007b74 <_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;
a0007b70: e3a00003 mov r0, #3
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
a0007b74: 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 ] )
a0007b78: e59f2010 ldr r2, [pc, #16] ; a0007b90 <_Objects_Id_to_name+0x84>
a0007b7c: e7923103 ldr r3, [r2, r3, lsl #2]
a0007b80: e3530000 cmp r3, #0
a0007b84: 1affffec bne a0007b3c <_Objects_Id_to_name+0x30>
a0007b88: eafffff8 b a0007b70 <_Objects_Id_to_name+0x64> <== NOT EXECUTED
a0005e9c <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a0005e9c: e59f30b4 ldr r3, [pc, #180] ; a0005f58 <_TOD_Validate+0xbc>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a0005ea0: e92d4010 push {r4, lr}
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a0005ea4: e2504000 subs r4, r0, #0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a0005ea8: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a0005eac: 0a000021 beq a0005f38 <_TOD_Validate+0x9c>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a0005eb0: e59f00a4 ldr r0, [pc, #164] ; a0005f5c <_TOD_Validate+0xc0>
a0005eb4: eb004325 bl a0016b50 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a0005eb8: e5943018 ldr r3, [r4, #24]
a0005ebc: e1530000 cmp r3, r0
a0005ec0: 2a000020 bcs a0005f48 <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a0005ec4: e5943014 ldr r3, [r4, #20]
a0005ec8: e353003b cmp r3, #59 ; 0x3b
a0005ecc: 8a00001d bhi a0005f48 <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a0005ed0: e5943010 ldr r3, [r4, #16]
a0005ed4: e353003b cmp r3, #59 ; 0x3b
a0005ed8: 8a00001a bhi a0005f48 <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a0005edc: e594300c ldr r3, [r4, #12]
a0005ee0: e3530017 cmp r3, #23
a0005ee4: 8a000017 bhi a0005f48 <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a0005ee8: e5943004 ldr r3, [r4, #4]
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
a0005eec: e3530000 cmp r3, #0
a0005ef0: 0a000012 beq a0005f40 <_TOD_Validate+0xa4>
(the_tod->month == 0) ||
a0005ef4: e353000c cmp r3, #12
a0005ef8: 8a000012 bhi a0005f48 <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a0005efc: e5942000 ldr r2, [r4]
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
a0005f00: e59f1058 ldr r1, [pc, #88] ; a0005f60 <_TOD_Validate+0xc4>
a0005f04: e1520001 cmp r2, r1
a0005f08: 9a000010 bls a0005f50 <_TOD_Validate+0xb4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a0005f0c: e5940008 ldr r0, [r4, #8]
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a0005f10: e3500000 cmp r0, #0
a0005f14: 0a00000e beq a0005f54 <_TOD_Validate+0xb8>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a0005f18: e3120003 tst r2, #3
a0005f1c: e59f2040 ldr r2, [pc, #64] ; a0005f64 <_TOD_Validate+0xc8>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a0005f20: 0283300d addeq r3, r3, #13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a0005f24: e7924103 ldr r4, [r2, r3, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
a0005f28: e1500004 cmp r0, r4
a0005f2c: 83a00000 movhi r0, #0
a0005f30: 93a00001 movls r0, #1
a0005f34: e8bd8010 pop {r4, pc}
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
a0005f38: e1a00004 mov r0, r4 <== NOT EXECUTED
a0005f3c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0005f40: e1a00003 mov r0, r3 <== NOT EXECUTED
a0005f44: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0005f48: e3a00000 mov r0, #0
a0005f4c: e8bd8010 pop {r4, pc}
a0005f50: e3a00000 mov r0, #0
if ( the_tod->day > days_in_month )
return false;
return true;
}
a0005f54: e8bd8010 pop {r4, pc}
a0006efc <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0006efc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
a0006f00: e3a06000 mov r6, #0
a0006f04: e5816100 str r6, [r1, #256] ; 0x100
a0006f08: e5816104 str r6, [r1, #260] ; 0x104
extensions_area = NULL;
the_thread->libc_reent = NULL;
a0006f0c: e58160fc str r6, [r1, #252] ; 0xfc
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0006f10: e1a05000 mov r5, r0
a0006f14: e1a04001 mov r4, r1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a0006f18: e1a00001 mov r0, r1
a0006f1c: e1a01003 mov r1, r3
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0006f20: e1a07003 mov r7, r3
a0006f24: e59d8020 ldr r8, [sp, #32]
a0006f28: e5dda024 ldrb sl, [sp, #36] ; 0x24
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a0006f2c: eb000261 bl a00078b8 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
a0006f30: e1500006 cmp r0, r6
a0006f34: 13a03000 movne r3, #0
a0006f38: 03a03001 moveq r3, #1
a0006f3c: e1500007 cmp r0, r7
a0006f40: 21a07003 movcs r7, r3
a0006f44: 33837001 orrcc r7, r3, #1
a0006f48: e1570006 cmp r7, r6
a0006f4c: 1a00004c bne a0007084 <_Thread_Initialize+0x188>
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a0006f50: e59430c8 ldr r3, [r4, #200] ; 0xc8
the_stack->size = size;
a0006f54: e58400c0 str r0, [r4, #192] ; 0xc0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0006f58: e5847050 str r7, [r4, #80] ; 0x50
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a0006f5c: e58430c4 str r3, [r4, #196] ; 0xc4
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a0006f60: e59f312c ldr r3, [pc, #300] ; a0007094 <_Thread_Initialize+0x198>
the_watchdog->routine = routine;
a0006f64: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a0006f68: e5847068 str r7, [r4, #104] ; 0x68
a0006f6c: e5936000 ldr r6, [r3]
the_watchdog->user_data = user_data;
a0006f70: e584706c str r7, [r4, #108] ; 0x6c
a0006f74: e3560000 cmp r6, #0
a0006f78: 0a000004 beq a0006f90 <_Thread_Initialize+0x94>
extensions_area = _Workspace_Allocate(
a0006f7c: e2866001 add r6, r6, #1
a0006f80: e1a00106 lsl r0, r6, #2
a0006f84: eb000452 bl a00080d4 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
a0006f88: e2506000 subs r6, r0, #0
a0006f8c: 0a000028 beq a0007034 <_Thread_Initialize+0x138>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a0006f90: e3560000 cmp r6, #0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a0006f94: e5846108 str r6, [r4, #264] ; 0x108
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a0006f98: 0a000009 beq a0006fc4 <_Thread_Initialize+0xc8>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a0006f9c: e59f30f0 ldr r3, [pc, #240] ; a0007094 <_Thread_Initialize+0x198>
a0006fa0: e1a02006 mov r2, r6
a0006fa4: e5930000 ldr r0, [r3]
a0006fa8: e3a03000 mov r3, #0
the_thread->extensions[i] = NULL;
a0006fac: e1a01003 mov r1, r3
a0006fb0: ea000001 b a0006fbc <_Thread_Initialize+0xc0>
a0006fb4: e4821004 str r1, [r2], #4
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a0006fb8: e2833001 add r3, r3, #1
a0006fbc: e1530000 cmp r3, r0
a0006fc0: 9afffffb bls a0006fb4 <_Thread_Initialize+0xb8>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a0006fc4: e59d3028 ldr r3, [sp, #40] ; 0x28
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a0006fc8: e3a07000 mov r7, #0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
a0006fcc: e5c4a0ac strb sl, [r4, #172] ; 0xac
the_thread->Start.budget_algorithm = budget_algorithm;
a0006fd0: e58430b0 str r3, [r4, #176] ; 0xb0
the_thread->Start.budget_callout = budget_callout;
a0006fd4: e59d302c ldr r3, [sp, #44] ; 0x2c
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a0006fd8: e3a0a001 mov sl, #1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
a0006fdc: e1a00004 mov r0, r4
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
a0006fe0: e58430b4 str r3, [r4, #180] ; 0xb4
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a0006fe4: e59d3030 ldr r3, [sp, #48] ; 0x30
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
a0006fe8: e1a01008 mov r1, r8
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a0006fec: e584a010 str sl, [r4, #16]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a0006ff0: e58430b8 str r3, [r4, #184] ; 0xb8
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a0006ff4: e5847044 str r7, [r4, #68] ; 0x44
the_thread->resource_count = 0;
a0006ff8: e584701c str r7, [r4, #28]
the_thread->real_priority = priority;
a0006ffc: e5848018 str r8, [r4, #24]
the_thread->Start.initial_priority = priority;
a0007000: e58480bc str r8, [r4, #188] ; 0xbc
_Thread_Set_priority( the_thread, priority );
a0007004: eb00019d bl a0007680 <_Thread_Set_priority>
_Thread_Stack_Free( the_thread );
return false;
}
a0007008: e595301c ldr r3, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000700c: e1d420b8 ldrh r2, [r4, #8]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
a0007010: e5847084 str r7, [r4, #132] ; 0x84
a0007014: e5847088 str r7, [r4, #136] ; 0x88
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0007018: e7834102 str r4, [r3, r2, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000701c: e59d3034 ldr r3, [sp, #52] ; 0x34
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
a0007020: e1a00004 mov r0, r4
a0007024: e584300c str r3, [r4, #12]
a0007028: eb000328 bl a0007cd0 <_User_extensions_Thread_create>
if ( extension_status )
a000702c: e1500007 cmp r0, r7
a0007030: 1a000015 bne a000708c <_Thread_Initialize+0x190>
return true;
failed:
if ( the_thread->libc_reent )
a0007034: e59400fc ldr r0, [r4, #252] ; 0xfc
a0007038: e3500000 cmp r0, #0
a000703c: 0a000000 beq a0007044 <_Thread_Initialize+0x148>
_Workspace_Free( the_thread->libc_reent );
a0007040: eb000429 bl a00080ec <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a0007044: e5940100 ldr r0, [r4, #256] ; 0x100
a0007048: e3500000 cmp r0, #0
a000704c: 0a000000 beq a0007054 <_Thread_Initialize+0x158>
_Workspace_Free( the_thread->API_Extensions[i] );
a0007050: eb000425 bl a00080ec <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a0007054: e5940104 ldr r0, [r4, #260] ; 0x104
a0007058: e3500000 cmp r0, #0
a000705c: 0a000000 beq a0007064 <_Thread_Initialize+0x168>
_Workspace_Free( the_thread->API_Extensions[i] );
a0007060: eb000421 bl a00080ec <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
a0007064: e3560000 cmp r6, #0
a0007068: 0a000001 beq a0007074 <_Thread_Initialize+0x178>
(void) _Workspace_Free( extensions_area );
a000706c: e1a00006 mov r0, r6
a0007070: eb00041d bl a00080ec <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
a0007074: e1a00004 mov r0, r4
a0007078: eb000225 bl a0007914 <_Thread_Stack_Free>
return false;
a000707c: e3a00000 mov r0, #0
a0007080: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
a0007084: e1a00006 mov r0, r6
a0007088: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
a000708c: e1a0000a mov r0, sl
_Thread_Stack_Free( the_thread );
return false;
}
a0007090: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a000a53c <_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
)
{
a000a53c: e92d4070 push {r4, r5, r6, lr}
a000a540: e20220ff and r2, r2, #255 ; 0xff
a000a544: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a548: e10f1000 mrs r1, CPSR
a000a54c: e3813080 orr r3, r1, #128 ; 0x80
a000a550: 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);
a000a554: e59f30a8 ldr r3, [pc, #168] ; a000a604 <_Thread_queue_Extract_priority_helper+0xc8>
a000a558: e5940010 ldr r0, [r4, #16]
a000a55c: 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 ) ) {
a000a560: e3530000 cmp r3, #0
a000a564: 1a000000 bne a000a56c <_Thread_queue_Extract_priority_helper+0x30>
_ISR_Enable( level );
a000a568: ea000015 b a000a5c4 <_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));
a000a56c: 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;
a000a570: e8941001 ldm r4, {r0, ip}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000a574: e284503c add r5, r4, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000a578: 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;
a000a57c: 058c0000 streq r0, [ip]
next_node->previous = previous_node;
a000a580: 0580c004 streq ip, [r0, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000a584: 0a00000c beq a000a5bc <_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;
a000a588: e5945040 ldr r5, [r4, #64] ; 0x40
new_second_node = new_first_node->next;
a000a58c: e5936000 ldr r6, [r3]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000a590: e5803004 str r3, [r0, #4]
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000a594: 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;
a000a598: e58c3000 str r3, [ip]
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000a59c: e8831001 stm r3, {r0, ip}
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000a5a0: 0a000005 beq a000a5bc <_Thread_queue_Extract_priority_helper+0x80>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
a000a5a4: 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 =
a000a5a8: e5860004 str r0, [r6, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
a000a5ac: e5836038 str r6, [r3, #56] ; 0x38
new_first_thread->Wait.Block2n.last = last_node;
a000a5b0: e5835040 str r5, [r3, #64] ; 0x40
a000a5b4: e283303c add r3, r3, #60 ; 0x3c
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
a000a5b8: e5853000 str r3, [r5]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a000a5bc: e3520000 cmp r2, #0
a000a5c0: 0a000001 beq a000a5cc <_Thread_queue_Extract_priority_helper+0x90>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a5c4: e129f001 msr CPSR_fc, r1
a000a5c8: e8bd8070 pop {r4, r5, r6, pc}
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000a5cc: e5943050 ldr r3, [r4, #80] ; 0x50
a000a5d0: e3530002 cmp r3, #2
a000a5d4: 0a000001 beq a000a5e0 <_Thread_queue_Extract_priority_helper+0xa4>
a000a5d8: e129f001 msr CPSR_fc, r1
a000a5dc: ea000004 b a000a5f4 <_Thread_queue_Extract_priority_helper+0xb8>
a000a5e0: e3a03003 mov r3, #3 <== NOT EXECUTED
a000a5e4: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a000a5e8: 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 );
a000a5ec: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000a5f0: ebfff654 bl a0007f48 <_Watchdog_Remove> <== NOT EXECUTED
a000a5f4: e59f100c ldr r1, [pc, #12] ; a000a608 <_Thread_queue_Extract_priority_helper+0xcc>
a000a5f8: e1a00004 mov r0, r4
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000a5fc: e8bd4070 pop {r4, r5, r6, lr}
a000a600: eafff12a b a0006ab0 <_Thread_Clear_state>
a00140f0 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a00140f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00140f4: e24dd018 sub sp, sp, #24
a00140f8: 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;
a00140fc: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a0014100: e28ba004 add sl, fp, #4
a0014104: e28d7004 add r7, sp, #4
a0014108: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a001410c: e58da00c str sl, [sp, #12]
the_chain->permanent_null = NULL;
a0014110: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
a0014114: e58db014 str fp, [sp, #20]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a0014118: e1a0500d mov r5, sp
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a001411c: e58d7000 str r7, [sp]
the_chain->permanent_null = NULL;
a0014120: 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 );
a0014124: 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;
a0014128: 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 );
a001412c: 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;
a0014130: e59f2154 ldr r2, [pc, #340] ; a001428c <_Timer_server_Body+0x19c>
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0014134: 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;
a0014138: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a001413c: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0014140: e1a02005 mov r2, r5
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a0014144: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0014148: e0611003 rsb r1, r1, r3
a001414c: eb00108a bl a001837c <_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();
a0014150: e59f3138 ldr r3, [pc, #312] ; a0014290 <_Timer_server_Body+0x1a0>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a0014154: 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();
a0014158: 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 ) {
a001415c: e1560002 cmp r6, r2
a0014160: 9a000004 bls a0014178 <_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 );
a0014164: e0621006 rsb r1, r2, r6
a0014168: e1a00008 mov r0, r8
a001416c: e1a02005 mov r2, r5
a0014170: eb001081 bl a001837c <_Watchdog_Adjust_to_chain>
a0014174: ea000004 b a001418c <_Timer_server_Body+0x9c>
} else if ( snapshot < last_snapshot ) {
a0014178: 2a000003 bcs a001418c <_Timer_server_Body+0x9c>
/*
* 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 );
a001417c: e1a00008 mov r0, r8
a0014180: e3a01001 mov r1, #1
a0014184: e0662002 rsb r2, r6, r2
a0014188: eb001053 bl a00182dc <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
a001418c: 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 );
a0014190: e5940078 ldr r0, [r4, #120] ; 0x78
a0014194: eb000284 bl a0014bac <_Chain_Get>
if ( timer == NULL ) {
a0014198: e2506000 subs r6, r0, #0
a001419c: 0a000009 beq a00141c8 <_Timer_server_Body+0xd8>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a00141a0: e5963038 ldr r3, [r6, #56] ; 0x38
a00141a4: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a00141a8: 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 ) {
a00141ac: 0a000002 beq a00141bc <_Timer_server_Body+0xcc>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a00141b0: e3530003 cmp r3, #3
a00141b4: 1afffff5 bne a0014190 <_Timer_server_Body+0xa0>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a00141b8: e1a00008 mov r0, r8
a00141bc: e2861010 add r1, r6, #16
a00141c0: eb001098 bl a0018428 <_Watchdog_Insert>
a00141c4: eafffff1 b a0014190 <_Timer_server_Body+0xa0>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
a00141c8: ebffff96 bl a0014028 <arm_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
a00141cc: e59d300c ldr r3, [sp, #12]
a00141d0: e153000a cmp r3, sl
a00141d4: 1a000006 bne a00141f4 <_Timer_server_Body+0x104>
ts->insert_chain = NULL;
a00141d8: e5846078 str r6, [r4, #120] ; 0x78
a00141dc: 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 ) ) {
a00141e0: e59d3000 ldr r3, [sp]
a00141e4: e1530007 cmp r3, r7
)
{
if ( !_Chain_Is_empty(the_chain))
return _Chain_Get_first_unprotected(the_chain);
else
return NULL;
a00141e8: 13a06000 movne r6, #0
a00141ec: 1a000002 bne a00141fc <_Timer_server_Body+0x10c>
a00141f0: ea000013 b a0014244 <_Timer_server_Body+0x154>
a00141f4: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a00141f8: eaffffcc b a0014130 <_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 );
a00141fc: ebffff89 bl a0014028 <arm_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a0014200: e59d2000 ldr r2, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0014204: e1520007 cmp r2, r7
a0014208: 0a00000b beq a001423c <_Timer_server_Body+0x14c>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
a001420c: e5923000 ldr r3, [r2]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
a0014210: e3520000 cmp r2, #0
the_chain->first = new_first;
a0014214: e58d3000 str r3, [sp]
new_first->previous = _Chain_Head(the_chain);
a0014218: e5835004 str r5, [r3, #4]
a001421c: 0a000006 beq a001423c <_Timer_server_Body+0x14c>
watchdog->state = WATCHDOG_INACTIVE;
a0014220: e5826008 str r6, [r2, #8]
a0014224: 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 );
a0014228: e592301c ldr r3, [r2, #28]
a001422c: e5920020 ldr r0, [r2, #32]
a0014230: e5921024 ldr r1, [r2, #36] ; 0x24
a0014234: e12fff33 blx r3
}
a0014238: eaffffef b a00141fc <_Timer_server_Body+0x10c>
a001423c: e129f000 msr CPSR_fc, r0
a0014240: eaffffb8 b a0014128 <_Timer_server_Body+0x38>
} else {
ts->active = false;
a0014244: e3a03000 mov r3, #0
a0014248: e5c4307c strb r3, [r4, #124] ; 0x7c
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
a001424c: ebffff79 bl a0014038 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
a0014250: e3a01008 mov r1, #8
a0014254: e5940000 ldr r0, [r4]
a0014258: eb000de2 bl a00179e8 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a001425c: e1a00004 mov r0, r4
a0014260: ebffff7a bl a0014050 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a0014264: e1a00004 mov r0, r4
a0014268: ebffff8c bl a00140a0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a001426c: eb000b63 bl a0017000 <_Thread_Enable_dispatch>
ts->active = true;
a0014270: e3a03001 mov r3, #1
a0014274: 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 );
a0014278: e2840008 add r0, r4, #8
a001427c: eb0010bf bl a0018580 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a0014280: e2840040 add r0, r4, #64 ; 0x40
a0014284: eb0010bd bl a0018580 <_Watchdog_Remove>
a0014288: eaffffa6 b a0014128 <_Timer_server_Body+0x38>
a0009780 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a0009780: e5902000 ldr r2, [r0]
a0009784: e5913000 ldr r3, [r1]
a0009788: e1520003 cmp r2, r3
return true;
a000978c: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a0009790: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
a0009794: ba000005 blt a00097b0 <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
a0009798: e5900004 ldr r0, [r0, #4]
a000979c: e5913004 ldr r3, [r1, #4]
a00097a0: e1500003 cmp r0, r3
a00097a4: d3a00000 movle r0, #0
a00097a8: c3a00001 movgt r0, #1
a00097ac: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
a00097b0: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
a00097b4: e12fff1e bx lr <== NOT EXECUTED