RTEMS 4.11Annotated Report
Fri Oct 8 12:42:59 2010
00016b04 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
16b04: 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
)
{
16b08: 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 ) {
16b0c: e1530002 cmp r3, r2
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
16b10: e1a07000 mov r7, r0
16b14: e1a05002 mov r5, r2
16b18: e1a08001 mov r8, r1
16b1c: e59da020 ldr sl, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
16b20: 3a000016 bcc 16b80 <_CORE_message_queue_Broadcast+0x7c>
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
16b24: e5906048 ldr r6, [r0, #72] ; 0x48
16b28: e3560000 cmp r6, #0
*count = 0;
16b2c: 13a00000 movne r0, #0
16b30: 158a0000 strne r0, [sl]
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
16b34: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc}
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
16b38: e1a00007 mov r0, r7
16b3c: eb000a14 bl 19394 <_Thread_queue_Dequeue>
16b40: e2504000 subs r4, r0, #0
16b44: 0a00000a beq 16b74 <_CORE_message_queue_Broadcast+0x70>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
16b48: e594002c ldr r0, [r4, #44] ; 0x2c
16b4c: e1a01008 mov r1, r8
16b50: e1a02005 mov r2, r5
16b54: eb00204d bl 1ec90 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
16b58: e5943028 ldr r3, [r4, #40] ; 0x28
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
16b5c: e1a00007 mov r0, r7
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
16b60: e5835000 str r5, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
16b64: eb000a0a bl 19394 <_Thread_queue_Dequeue>
16b68: e2504000 subs r4, r0, #0
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
16b6c: e2866001 add r6, r6, #1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
16b70: 1afffff4 bne 16b48 <_CORE_message_queue_Broadcast+0x44>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
16b74: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
16b78: e1a00004 mov r0, r4
16b7c: 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;
16b80: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
16b84: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0000aa90 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
aa90: e59f215c ldr r2, [pc, #348] ; abf4 <_CORE_mutex_Seize_interrupt_trylock+0x164>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
aa94: e590c050 ldr ip, [r0, #80] ; 0x50
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
aa98: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
aa9c: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
aaa0: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
aaa4: e15c0000 cmp ip, r0
aaa8: e92d40f0 push {r4, r5, r6, r7, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
aaac: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
aab0: 0a00000e beq aaf0 <_CORE_mutex_Seize_interrupt_trylock+0x60>
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
aab4: e593c048 ldr ip, [r3, #72] ; 0x48
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
aab8: e5925008 ldr r5, [r2, #8]
the_mutex->nest_count = 1;
aabc: e3a04001 mov r4, #1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
aac0: e35c0002 cmp ip, #2
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
aac4: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
aac8: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
aacc: e5835060 str r5, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
aad0: e5834054 str r4, [r3, #84] ; 0x54
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
aad4: 0a000013 beq ab28 <_CORE_mutex_Seize_interrupt_trylock+0x98>
aad8: e35c0003 cmp ip, #3
aadc: 0a000018 beq ab44 <_CORE_mutex_Seize_interrupt_trylock+0xb4>
aae0: e5913000 ldr r3, [r1]
aae4: e129f003 msr CPSR_fc, r3
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
aae8: e3a00000 mov r0, #0
aaec: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
aaf0: e593005c ldr r0, [r3, #92] ; 0x5c
aaf4: e1520000 cmp r2, r0
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
aaf8: 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 ) ) {
aafc: 18bd80f0 popne {r4, r5, r6, r7, pc}
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ab00: e5930040 ldr r0, [r3, #64] ; 0x40
ab04: e3500000 cmp r0, #0
ab08: 1a00001e bne ab88 <_CORE_mutex_Seize_interrupt_trylock+0xf8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
ab0c: e5932054 ldr r2, [r3, #84] ; 0x54
ab10: e2822001 add r2, r2, #1
ab14: e5832054 str r2, [r3, #84] ; 0x54
ab18: e5913000 ldr r3, [r1]
ab1c: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
ab20: e3a00000 mov r0, #0
ab24: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ab28: e592301c ldr r3, [r2, #28]
ab2c: e2833001 add r3, r3, #1
ab30: e582301c str r3, [r2, #28]
ab34: e5913000 ldr r3, [r1]
ab38: e129f003 msr CPSR_fc, r3
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
ab3c: e3a00000 mov r0, #0
ab40: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ab44: e592c01c ldr ip, [r2, #28]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
ab48: e593704c ldr r7, [r3, #76] ; 0x4c
current = executing->current_priority;
ab4c: e5926014 ldr r6, [r2, #20]
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ab50: e08c5004 add r5, ip, r4
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
ab54: e1570006 cmp r7, r6
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ab58: e582501c str r5, [r2, #28]
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
ab5c: 0a000020 beq abe4 <_CORE_mutex_Seize_interrupt_trylock+0x154>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
ab60: 3a000012 bcc abb0 <_CORE_mutex_Seize_interrupt_trylock+0x120>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
ab64: e3a05006 mov r5, #6
ab68: e5825034 str r5, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
ab6c: e5834050 str r4, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
ab70: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
ab74: e582c01c str ip, [r2, #28]
ab78: e5913000 ldr r3, [r1]
ab7c: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
ab80: e3a00000 mov r0, #0
ab84: e8bd80f0 pop {r4, r5, r6, r7, pc}
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ab88: e3500001 cmp r0, #1
ab8c: 0a000001 beq ab98 <_CORE_mutex_Seize_interrupt_trylock+0x108>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
ab90: e3a00001 mov r0, #1
ab94: e8bd80f0 pop {r4, r5, r6, r7, pc}
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
ab98: e3a03002 mov r3, #2 <== NOT EXECUTED
ab9c: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
aba0: e5913000 ldr r3, [r1] <== NOT EXECUTED
aba4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( *level_p );
return 0;
aba8: e3a00000 mov r0, #0 <== NOT EXECUTED
abac: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
abb0: e59f2040 ldr r2, [pc, #64] ; abf8 <_CORE_mutex_Seize_interrupt_trylock+0x168>
abb4: e5920000 ldr r0, [r2]
abb8: e2800001 add r0, r0, #1
abbc: e5820000 str r0, [r2]
abc0: e5912000 ldr r2, [r1]
abc4: e129f002 msr CPSR_fc, r2
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
abc8: e3a02000 mov r2, #0
abcc: e593005c ldr r0, [r3, #92] ; 0x5c
abd0: e593104c ldr r1, [r3, #76] ; 0x4c
abd4: ebfff16e bl 7194 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
abd8: ebfff2c9 bl 7704 <_Thread_Enable_dispatch>
return 0;
abdc: e3a00000 mov r0, #0
abe0: e8bd80f0 pop {r4, r5, r6, r7, pc}
abe4: e5913000 ldr r3, [r1]
abe8: e129f003 msr CPSR_fc, r3
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
return 0;
abec: e3a00000 mov r0, #0
abf0: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000aa30 <_Chain_Initialize>:
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
aa30: e3520000 cmp r2, #0
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
aa34: e3a0c000 mov ip, #0
next = starting_address;
while ( count-- ) {
aa38: 12422001 subne r2, r2, #1
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
aa3c: e92d0070 push {r4, r5, r6}
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
aa40: e580c004 str ip, [r0, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
aa44: e1a04000 mov r4, r0
next = starting_address;
while ( count-- ) {
aa48: 11a06002 movne r6, r2
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
aa4c: 11a0c001 movne ip, r1
while ( count-- ) {
aa50: 1a000003 bne aa64 <_Chain_Initialize+0x34>
aa54: ea000008 b aa7c <_Chain_Initialize+0x4c> <== NOT EXECUTED
aa58: e1a0400c mov r4, ip
aa5c: e2422001 sub r2, r2, #1
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
aa60: e1a0c005 mov ip, r5
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
aa64: e3520000 cmp r2, #0
current->next = next;
aa68: e584c000 str ip, [r4]
next->previous = current;
aa6c: e58c4004 str r4, [ip, #4]
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
aa70: e08c5003 add r5, ip, r3
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
aa74: 1afffff7 bne aa58 <_Chain_Initialize+0x28>
aa78: e0241396 mla r4, r6, r3, r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
aa7c: e2803004 add r3, r0, #4
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
aa80: e5843000 str r3, [r4]
the_chain->last = current;
aa84: e5804008 str r4, [r0, #8]
}
aa88: e8bd0070 pop {r4, r5, r6}
aa8c: e12fff1e bx lr
0000ac70 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ac70: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
ac74: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
ac78: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ac7c: e24dd01c sub sp, sp, #28
ac80: e1a05001 mov r5, r1
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
ac84: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ac88: e1a07000 mov r7, r0
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
ac8c: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ac90: e1a0b003 mov fp, r3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
ac94: e58d200c str r2, [sp, #12]
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
ac98: 2a00007a bcs ae88 <_Heap_Allocate_aligned_with_boundary+0x218>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
ac9c: e3530000 cmp r3, #0
aca0: 1a000076 bne ae80 <_Heap_Allocate_aligned_with_boundary+0x210>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
aca4: e5979008 ldr r9, [r7, #8]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
aca8: e1570009 cmp r7, r9
acac: 0a000075 beq ae88 <_Heap_Allocate_aligned_with_boundary+0x218>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
acb0: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
acb4: e2651004 rsb r1, r5, #4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
acb8: e2833007 add r3, r3, #7
acbc: e58d3010 str r3, [sp, #16]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
acc0: e58d1014 str r1, [sp, #20]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
acc4: e3a06001 mov r6, #1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
acc8: e599a004 ldr sl, [r9, #4]
accc: e59d2000 ldr r2, [sp]
acd0: e152000a cmp r2, sl
acd4: 2a000050 bcs ae1c <_Heap_Allocate_aligned_with_boundary+0x1ac>
if ( alignment == 0 ) {
acd8: e3580000 cmp r8, #0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
acdc: 02894008 addeq r4, r9, #8
ace0: 0a000053 beq ae34 <_Heap_Allocate_aligned_with_boundary+0x1c4>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
ace4: e5973014 ldr r3, [r7, #20]
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
ace8: e59d1014 ldr r1, [sp, #20]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
acec: e59d2010 ldr r2, [sp, #16]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
acf0: e3caa001 bic sl, sl, #1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
acf4: e089a00a add sl, r9, sl
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
acf8: e081400a add r4, r1, sl
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
acfc: e58d3004 str r3, [sp, #4]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
ad00: e0633002 rsb r3, r3, r2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ad04: e1a00004 mov r0, r4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
ad08: e083a00a add sl, r3, sl
ad0c: e1a01008 mov r1, r8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ad10: e2893008 add r3, r9, #8
ad14: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ad18: eb001562 bl 102a8 <__umodsi3>
ad1c: e0604004 rsb r4, r0, r4
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
ad20: e15a0004 cmp sl, r4
ad24: 2a000003 bcs ad38 <_Heap_Allocate_aligned_with_boundary+0xc8>
ad28: e1a0000a mov r0, sl
ad2c: e1a01008 mov r1, r8
ad30: eb00155c bl 102a8 <__umodsi3>
ad34: e060400a rsb r4, r0, sl
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ad38: e35b0000 cmp fp, #0
ad3c: 0a000026 beq addc <_Heap_Allocate_aligned_with_boundary+0x16c>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
ad40: e084a005 add sl, r4, r5
ad44: e1a0000a mov r0, sl
ad48: e1a0100b mov r1, fp
ad4c: eb001555 bl 102a8 <__umodsi3>
ad50: e060000a rsb r0, r0, sl
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ad54: e15a0000 cmp sl, r0
ad58: 93a0a000 movls sl, #0
ad5c: 83a0a001 movhi sl, #1
ad60: e1540000 cmp r4, r0
ad64: 23a0a000 movcs sl, #0
ad68: e35a0000 cmp sl, #0
ad6c: 0a00001a beq addc <_Heap_Allocate_aligned_with_boundary+0x16c>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
ad70: e59d1008 ldr r1, [sp, #8]
ad74: e0813005 add r3, r1, r5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
ad78: e1530000 cmp r3, r0
ad7c: 958d9018 strls r9, [sp, #24]
ad80: 91a09003 movls r9, r3
ad84: 9a000002 bls ad94 <_Heap_Allocate_aligned_with_boundary+0x124>
ad88: ea000023 b ae1c <_Heap_Allocate_aligned_with_boundary+0x1ac>
ad8c: e1590000 cmp r9, r0
ad90: 8a00003e bhi ae90 <_Heap_Allocate_aligned_with_boundary+0x220>
return 0;
}
alloc_begin = boundary_line - alloc_size;
ad94: e0654000 rsb r4, r5, r0
ad98: e1a01008 mov r1, r8
ad9c: e1a00004 mov r0, r4
ada0: eb001540 bl 102a8 <__umodsi3>
ada4: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
ada8: e084a005 add sl, r4, r5
adac: e1a0000a mov r0, sl
adb0: e1a0100b mov r1, fp
adb4: eb00153b bl 102a8 <__umodsi3>
adb8: e060000a rsb r0, r0, sl
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
adbc: e15a0000 cmp sl, r0
adc0: 93a0a000 movls sl, #0
adc4: 83a0a001 movhi sl, #1
adc8: e1540000 cmp r4, r0
adcc: 23a0a000 movcs sl, #0
add0: e35a0000 cmp sl, #0
add4: 1affffec bne ad8c <_Heap_Allocate_aligned_with_boundary+0x11c>
add8: e59d9018 ldr r9, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
addc: e59d2008 ldr r2, [sp, #8]
ade0: e1520004 cmp r2, r4
ade4: 8a00000c bhi ae1c <_Heap_Allocate_aligned_with_boundary+0x1ac>
ade8: e59d100c ldr r1, [sp, #12]
adec: e1a00004 mov r0, r4
adf0: eb00152c bl 102a8 <__umodsi3>
adf4: e269a4ff rsb sl, r9, #-16777216 ; 0xff000000
adf8: e28aa8ff add sl, sl, #16711680 ; 0xff0000
adfc: e28aacff add sl, sl, #65280 ; 0xff00
ae00: e28aa0f8 add sl, sl, #248 ; 0xf8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ae04: e08aa004 add sl, sl, r4
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
if ( free_size >= min_block_size || free_size == 0 ) {
ae08: e59d1004 ldr r1, [sp, #4]
ae0c: e060300a rsb r3, r0, sl
ae10: e15a0000 cmp sl, r0
ae14: 11510003 cmpne r1, r3
ae18: 9a000005 bls ae34 <_Heap_Allocate_aligned_with_boundary+0x1c4>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
ae1c: e5999008 ldr r9, [r9, #8]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ae20: e1570009 cmp r7, r9
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
ae24: e2863001 add r3, r6, #1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ae28: 0a00001d beq aea4 <_Heap_Allocate_aligned_with_boundary+0x234>
ae2c: e1a06003 mov r6, r3
ae30: eaffffa4 b acc8 <_Heap_Allocate_aligned_with_boundary+0x58>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
ae34: e3540000 cmp r4, #0
ae38: 0afffff7 beq ae1c <_Heap_Allocate_aligned_with_boundary+0x1ac>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ae3c: e2872048 add r2, r7, #72 ; 0x48
ae40: e892000c ldm r2, {r2, r3}
ae44: e2822001 add r2, r2, #1
stats->searches += search_count;
ae48: e0833006 add r3, r3, r6
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ae4c: e5872048 str r2, [r7, #72] ; 0x48
stats->searches += search_count;
ae50: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ae54: e1a00007 mov r0, r7
ae58: e1a01009 mov r1, r9
ae5c: e1a02004 mov r2, r4
ae60: e1a03005 mov r3, r5
ae64: ebffee47 bl 6788 <_Heap_Block_allocate>
ae68: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
ae6c: e5973044 ldr r3, [r7, #68] ; 0x44
ae70: e1530006 cmp r3, r6
stats->max_search = search_count;
ae74: 35876044 strcc r6, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
ae78: e28dd01c add sp, sp, #28
ae7c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
ae80: e1550003 cmp r5, r3
ae84: 9a000008 bls aeac <_Heap_Allocate_aligned_with_boundary+0x23c>
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ae88: e3a00000 mov r0, #0
ae8c: eafffff9 b ae78 <_Heap_Allocate_aligned_with_boundary+0x208>
ae90: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
ae94: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ae98: e1570009 cmp r7, r9 <== NOT EXECUTED
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
ae9c: e2863001 add r3, r6, #1 <== NOT EXECUTED
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
aea0: 1affffe1 bne ae2c <_Heap_Allocate_aligned_with_boundary+0x1bc><== NOT EXECUTED
aea4: e3a00000 mov r0, #0
aea8: eaffffef b ae6c <_Heap_Allocate_aligned_with_boundary+0x1fc>
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
aeac: e3580000 cmp r8, #0
aeb0: 01a08002 moveq r8, r2
aeb4: eaffff7a b aca4 <_Heap_Allocate_aligned_with_boundary+0x34>
0000aeb8 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
aeb8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
aebc: e1a04000 mov r4, r0
aec0: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
aec4: e1a00001 mov r0, r1
aec8: e5941010 ldr r1, [r4, #16]
aecc: eb0014f5 bl 102a8 <__umodsi3>
aed0: e2455008 sub r5, r5, #8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
aed4: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
aed8: e0605005 rsb r5, r0, r5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
aedc: e1550003 cmp r5, r3
aee0: 3a00002f bcc afa4 <_Heap_Free+0xec>
aee4: e5941024 ldr r1, [r4, #36] ; 0x24
aee8: e1550001 cmp r5, r1
aeec: 8a00002c bhi afa4 <_Heap_Free+0xec>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
aef0: e595c004 ldr ip, [r5, #4]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
aef4: e3cc6001 bic r6, ip, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
aef8: e0852006 add r2, r5, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
aefc: e1530002 cmp r3, r2
af00: 8a000027 bhi afa4 <_Heap_Free+0xec>
af04: e1510002 cmp r1, r2
af08: 3a000027 bcc afac <_Heap_Free+0xf4>
af0c: e5927004 ldr r7, [r2, #4]
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
af10: e2170001 ands r0, r7, #1
af14: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
af18: e1510002 cmp r1, r2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
af1c: e3c77001 bic r7, r7, #1
af20: 03a08000 moveq r8, #0
af24: 0a000004 beq af3c <_Heap_Free+0x84>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
af28: e0820007 add r0, r2, r7
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
af2c: e5900004 ldr r0, [r0, #4]
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
af30: e3100001 tst r0, #1
af34: 13a08000 movne r8, #0
af38: 03a08001 moveq r8, #1
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
af3c: e21c0001 ands r0, ip, #1
af40: 1a00001b bne afb4 <_Heap_Free+0xfc>
uintptr_t const prev_size = block->prev_size;
af44: e595c000 ldr ip, [r5]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
af48: e06ca005 rsb sl, ip, r5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
af4c: e153000a cmp r3, sl
af50: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc}
af54: e151000a cmp r1, sl
af58: 38bd85f0 popcc {r4, r5, r6, r7, r8, sl, pc}
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
af5c: e59a0004 ldr r0, [sl, #4]
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
af60: e2100001 ands r0, r0, #1
af64: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
af68: e3580000 cmp r8, #0
af6c: 0a000039 beq b058 <_Heap_Free+0x1a0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
af70: e5940038 ldr r0, [r4, #56] ; 0x38
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
af74: e0867007 add r7, r6, r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
af78: e5923008 ldr r3, [r2, #8]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
af7c: e087c00c add ip, r7, ip
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
af80: e592200c ldr r2, [r2, #12]
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
af84: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
af88: e38c1001 orr r1, ip, #1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
af8c: e5823008 str r3, [r2, #8]
next->prev = prev;
af90: e583200c str r2, [r3, #12]
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
af94: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
af98: e58a1004 str r1, [sl, #4]
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
af9c: e78ac00c str ip, [sl, ip]
afa0: ea00000f b afe4 <_Heap_Free+0x12c>
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
afa4: e3a00000 mov r0, #0
afa8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
afac: e3a00000 mov r0, #0 <== NOT EXECUTED
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
afb0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
afb4: e3580000 cmp r8, #0
afb8: 0a000014 beq b010 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
afbc: e5923008 ldr r3, [r2, #8]
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
afc0: e0877006 add r7, r7, r6
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
afc4: e592200c ldr r2, [r2, #12]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
afc8: e3871001 orr r1, r7, #1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
afcc: e5853008 str r3, [r5, #8]
new_block->prev = prev;
afd0: e585200c str r2, [r5, #12]
next->prev = new_block;
prev->next = new_block;
afd4: e5825008 str r5, [r2, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
afd8: e583500c str r5, [r3, #12]
afdc: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
afe0: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
afe4: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
afe8: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
afec: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
aff0: e2422001 sub r2, r2, #1
++stats->frees;
aff4: e2833001 add r3, r3, #1
stats->free_size += block_size;
aff8: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
affc: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
b000: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
b004: e5846030 str r6, [r4, #48] ; 0x30
return( true );
b008: e3a00001 mov r0, #1
b00c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
b010: e3863001 orr r3, r6, #1
b014: e5853004 str r3, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
b018: e2843038 add r3, r4, #56 ; 0x38
b01c: e8931008 ldm r3, {r3, ip}
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
b020: e5920004 ldr r0, [r2, #4]
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
b024: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
b028: e2833001 add r3, r3, #1
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
b02c: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
b030: e153000c cmp r3, ip
new_block->next = next;
b034: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
b038: e585400c str r4, [r5, #12]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
b03c: e5820004 str r0, [r2, #4]
block_before->next = new_block;
next->prev = new_block;
b040: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
b044: e7856006 str r6, [r5, r6]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
b048: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
b04c: e5843038 str r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
b050: 8584303c strhi r3, [r4, #60] ; 0x3c
b054: eaffffe2 b afe4 <_Heap_Free+0x12c>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
b058: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
b05c: e38c3001 orr r3, ip, #1
b060: e58a3004 str r3, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
b064: e5923004 ldr r3, [r2, #4]
b068: e3c33001 bic r3, r3, #1
b06c: e5823004 str r3, [r2, #4]
next_block->prev_size = size;
b070: e785c006 str ip, [r5, r6]
b074: eaffffda b afe4 <_Heap_Free+0x12c>
000120d4 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
120d4: e92d40f0 push {r4, r5, r6, r7, lr}
120d8: e1a04000 mov r4, r0
120dc: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
120e0: e1a00001 mov r0, r1
120e4: e5941010 ldr r1, [r4, #16]
120e8: e1a07002 mov r7, r2
120ec: ebfff86d bl 102a8 <__umodsi3>
120f0: e2456008 sub r6, r5, #8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
120f4: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
120f8: e0600006 rsb r0, r0, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
120fc: e1500003 cmp r0, r3
12100: 3a000010 bcc 12148 <_Heap_Size_of_alloc_area+0x74>
12104: e5942024 ldr r2, [r4, #36] ; 0x24
12108: e1500002 cmp r0, r2
1210c: 8a00000d bhi 12148 <_Heap_Size_of_alloc_area+0x74>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
12110: e5906004 ldr r6, [r0, #4]
12114: e3c66001 bic r6, r6, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
12118: e0806006 add r6, r0, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
1211c: e1530006 cmp r3, r6
12120: 8a000008 bhi 12148 <_Heap_Size_of_alloc_area+0x74>
12124: e1520006 cmp r2, r6
12128: 3a000008 bcc 12150 <_Heap_Size_of_alloc_area+0x7c>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
1212c: e5960004 ldr r0, [r6, #4]
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
12130: e2100001 ands r0, r0, #1
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
12134: 12655004 rsbne r5, r5, #4
12138: 10856006 addne r6, r5, r6
1213c: 15876000 strne r6, [r7]
return true;
12140: 13a00001 movne r0, #1
12144: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
12148: e3a00000 mov r0, #0
1214c: e8bd80f0 pop {r4, r5, r6, r7, pc}
12150: e3a00000 mov r0, #0 <== NOT EXECUTED
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
12154: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000074f8 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
74f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
74fc: e59f35cc ldr r3, [pc, #1484] ; 7ad0 <_Heap_Walk+0x5d8>
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
7500: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
7504: e5933000 ldr r3, [r3]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
7508: e59f25c4 ldr r2, [pc, #1476] ; 7ad4 <_Heap_Walk+0x5dc>
750c: e59f95c4 ldr r9, [pc, #1476] ; 7ad8 <_Heap_Walk+0x5e0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
7510: e1a0a001 mov sl, r1
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
7514: 11a09002 movne r9, r2
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
7518: e5901010 ldr r1, [r0, #16]
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
751c: e3530003 cmp r3, #3
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
7520: e5902014 ldr r2, [r0, #20]
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
7524: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
7528: e24dd038 sub sp, sp, #56 ; 0x38
752c: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
7530: e58d1024 str r1, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
7534: e58d2028 str r2, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
7538: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
753c: e58d302c str r3, [sp, #44] ; 0x2c
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
7540: 0a000002 beq 7550 <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
7544: e3a00001 mov r0, #1
}
7548: e28dd038 add sp, sp, #56 ; 0x38
754c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
7550: e594101c ldr r1, [r4, #28]
7554: e5900018 ldr r0, [r0, #24]
7558: e2842008 add r2, r4, #8
755c: e892000c ldm r2, {r2, r3}
7560: e59dc028 ldr ip, [sp, #40] ; 0x28
7564: e58d1008 str r1, [sp, #8]
7568: e59d102c ldr r1, [sp, #44] ; 0x2c
756c: e58d0004 str r0, [sp, #4]
7570: e58d1010 str r1, [sp, #16]
7574: e58d2014 str r2, [sp, #20]
7578: e58d3018 str r3, [sp, #24]
757c: e59f2558 ldr r2, [pc, #1368] ; 7adc <_Heap_Walk+0x5e4>
7580: e58dc000 str ip, [sp]
7584: e58d800c str r8, [sp, #12]
7588: e1a0000a mov r0, sl
758c: e3a01000 mov r1, #0
7590: e59d3024 ldr r3, [sp, #36] ; 0x24
7594: e1a0e00f mov lr, pc
7598: e12fff19 bx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
759c: e59d2024 ldr r2, [sp, #36] ; 0x24
75a0: e3520000 cmp r2, #0
75a4: 0a000026 beq 7644 <_Heap_Walk+0x14c>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
75a8: e59d3024 ldr r3, [sp, #36] ; 0x24
75ac: e2135003 ands r5, r3, #3
75b0: 1a00002a bne 7660 <_Heap_Walk+0x168>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
75b4: e59d0028 ldr r0, [sp, #40] ; 0x28
75b8: e59d1024 ldr r1, [sp, #36] ; 0x24
75bc: ebffe577 bl ba0 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
75c0: e250b000 subs fp, r0, #0
75c4: 1a00002c bne 767c <_Heap_Walk+0x184>
75c8: e2880008 add r0, r8, #8
75cc: e59d1024 ldr r1, [sp, #36] ; 0x24
75d0: ebffe572 bl ba0 <__umodsi3>
);
return false;
}
if (
75d4: e2506000 subs r6, r0, #0
75d8: 1a00002f bne 769c <_Heap_Walk+0x1a4>
block = next_block;
} while ( block != first_block );
return true;
}
75dc: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
75e0: e21b5001 ands r5, fp, #1
75e4: 0a0000cd beq 7920 <_Heap_Walk+0x428>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
75e8: e59dc02c ldr ip, [sp, #44] ; 0x2c
75ec: e59c3004 ldr r3, [ip, #4]
75f0: e3c33001 bic r3, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
75f4: e08c3003 add r3, ip, r3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
75f8: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
75fc: e2155001 ands r5, r5, #1
7600: 0a000008 beq 7628 <_Heap_Walk+0x130>
);
return false;
}
if (
7604: e1580003 cmp r8, r3
7608: 0a00002b beq 76bc <_Heap_Walk+0x1c4>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
760c: e1a0000a mov r0, sl <== NOT EXECUTED
7610: e3a01001 mov r1, #1 <== NOT EXECUTED
7614: e59f24c4 ldr r2, [pc, #1220] ; 7ae0 <_Heap_Walk+0x5e8> <== NOT EXECUTED
7618: e1a0e00f mov lr, pc <== NOT EXECUTED
761c: e12fff19 bx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7620: e1a00006 mov r0, r6 <== NOT EXECUTED
7624: eaffffc7 b 7548 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
7628: e1a0000a mov r0, sl
762c: e3a01001 mov r1, #1
7630: e59f24ac ldr r2, [pc, #1196] ; 7ae4 <_Heap_Walk+0x5ec>
7634: e1a0e00f mov lr, pc
7638: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
763c: e1a00005 mov r0, r5
7640: eaffffc0 b 7548 <_Heap_Walk+0x50>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
7644: e1a0000a mov r0, sl
7648: e3a01001 mov r1, #1
764c: e59f2494 ldr r2, [pc, #1172] ; 7ae8 <_Heap_Walk+0x5f0>
7650: e1a0e00f mov lr, pc
7654: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7658: e59d0024 ldr r0, [sp, #36] ; 0x24
765c: eaffffb9 b 7548 <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
7660: e1a0000a mov r0, sl
7664: e3a01001 mov r1, #1
7668: e59f247c ldr r2, [pc, #1148] ; 7aec <_Heap_Walk+0x5f4>
766c: e1a0e00f mov lr, pc
7670: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7674: e3a00000 mov r0, #0
7678: eaffffb2 b 7548 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
767c: e1a0000a mov r0, sl
7680: e3a01001 mov r1, #1
7684: e59f2464 ldr r2, [pc, #1124] ; 7af0 <_Heap_Walk+0x5f8>
7688: e59d3028 ldr r3, [sp, #40] ; 0x28
768c: e1a0e00f mov lr, pc
7690: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7694: e1a00005 mov r0, r5
7698: eaffffaa b 7548 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
769c: e1a0000a mov r0, sl
76a0: e3a01001 mov r1, #1
76a4: e59f2448 ldr r2, [pc, #1096] ; 7af4 <_Heap_Walk+0x5fc>
76a8: e1a03008 mov r3, r8
76ac: e1a0e00f mov lr, pc
76b0: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
76b4: e1a0000b mov r0, fp
76b8: eaffffa2 b 7548 <_Heap_Walk+0x50>
block = next_block;
} while ( block != first_block );
return true;
}
76bc: e5945008 ldr r5, [r4, #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 ) {
76c0: e1540005 cmp r4, r5
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
76c4: e5947010 ldr r7, [r4, #16]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
76c8: 05943020 ldreq r3, [r4, #32]
76cc: 0a00000d beq 7708 <_Heap_Walk+0x210>
block = next_block;
} while ( block != first_block );
return true;
}
76d0: e5943020 ldr r3, [r4, #32]
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
76d4: e1530005 cmp r3, r5
76d8: 9a000097 bls 793c <_Heap_Walk+0x444>
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
76dc: e1a0000a mov r0, sl
76e0: e3a01001 mov r1, #1
76e4: e59f240c ldr r2, [pc, #1036] ; 7af8 <_Heap_Walk+0x600>
76e8: e1a03005 mov r3, r5
76ec: e1a0e00f mov lr, pc
76f0: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
76f4: e3a00000 mov r0, #0
76f8: eaffff92 b 7548 <_Heap_Walk+0x50>
76fc: e1a03008 mov r3, r8
7700: e28d8030 add r8, sp, #48 ; 0x30
7704: e8980900 ldm r8, {r8, fp}
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
7708: e1a06008 mov r6, r8
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
770c: e3cb7001 bic r7, fp, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
7710: e0875006 add r5, r7, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
7714: e1530005 cmp r3, r5
7718: 9a000008 bls 7740 <_Heap_Walk+0x248>
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
771c: e1a0000a mov r0, sl
7720: e58d5000 str r5, [sp]
7724: e3a01001 mov r1, #1
7728: e59f23cc ldr r2, [pc, #972] ; 7afc <_Heap_Walk+0x604>
772c: e1a03006 mov r3, r6
7730: e1a0e00f mov lr, pc
7734: e12fff19 bx r9
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
7738: e3a00000 mov r0, #0
773c: eaffff81 b 7548 <_Heap_Walk+0x50>
7740: e5943024 ldr r3, [r4, #36] ; 0x24
7744: e1530005 cmp r3, r5
7748: 3afffff3 bcc 771c <_Heap_Walk+0x224>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
774c: e59d1024 ldr r1, [sp, #36] ; 0x24
7750: e1a00007 mov r0, r7
7754: ebffe511 bl ba0 <__umodsi3>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
7758: e59d102c ldr r1, [sp, #44] ; 0x2c
775c: e0563001 subs r3, r6, r1
7760: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
7764: e3500000 cmp r0, #0
7768: 0a000001 beq 7774 <_Heap_Walk+0x27c>
776c: e3530000 cmp r3, #0
7770: 1a0000aa bne 7a20 <_Heap_Walk+0x528>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
7774: e59d2028 ldr r2, [sp, #40] ; 0x28
7778: e1520007 cmp r2, r7
777c: 9a000001 bls 7788 <_Heap_Walk+0x290>
7780: e3530000 cmp r3, #0
7784: 1a0000ae bne 7a44 <_Heap_Walk+0x54c>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
7788: e1560005 cmp r6, r5
778c: 3a000001 bcc 7798 <_Heap_Walk+0x2a0>
7790: e3530000 cmp r3, #0
7794: 1a0000b4 bne 7a6c <_Heap_Walk+0x574>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
7798: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
779c: e3130001 tst r3, #1
77a0: e20bb001 and fp, fp, #1
77a4: 0a000018 beq 780c <_Heap_Walk+0x314>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
77a8: e35b0000 cmp fp, #0
77ac: 0a00000c beq 77e4 <_Heap_Walk+0x2ec>
(*printer)(
77b0: e58d7000 str r7, [sp]
77b4: e1a0000a mov r0, sl
77b8: e3a01000 mov r1, #0
77bc: e59f233c ldr r2, [pc, #828] ; 7b00 <_Heap_Walk+0x608>
77c0: e1a03006 mov r3, r6
77c4: e1a0e00f mov lr, pc
77c8: e12fff19 bx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
77cc: e1580005 cmp r8, r5
77d0: 0affff5b beq 7544 <_Heap_Walk+0x4c>
77d4: e595b004 ldr fp, [r5, #4]
77d8: e5943020 ldr r3, [r4, #32]
77dc: e1a06005 mov r6, r5
77e0: eaffffc9 b 770c <_Heap_Walk+0x214>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
77e4: e58d7000 str r7, [sp]
77e8: e5963000 ldr r3, [r6]
77ec: e1a0000a mov r0, sl
77f0: e58d3004 str r3, [sp, #4]
77f4: e1a0100b mov r1, fp
77f8: e59f2304 ldr r2, [pc, #772] ; 7b04 <_Heap_Walk+0x60c>
77fc: e1a03006 mov r3, r6
7800: e1a0e00f mov lr, pc
7804: e12fff19 bx r9
7808: eaffffef b 77cc <_Heap_Walk+0x2d4>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
780c: e596200c ldr r2, [r6, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
7810: e5943008 ldr r3, [r4, #8]
7814: e1530002 cmp r3, r2
block = next_block;
} while ( block != first_block );
return true;
}
7818: e594100c ldr r1, [r4, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
781c: 059f02e4 ldreq r0, [pc, #740] ; 7b08 <_Heap_Walk+0x610>
7820: 0a000003 beq 7834 <_Heap_Walk+0x33c>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
7824: e59f32e0 ldr r3, [pc, #736] ; 7b0c <_Heap_Walk+0x614>
7828: e1540002 cmp r4, r2
782c: e59f02dc ldr r0, [pc, #732] ; 7b10 <_Heap_Walk+0x618>
7830: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
7834: e5963008 ldr r3, [r6, #8]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
7838: e1510003 cmp r1, r3
783c: 059f12d0 ldreq r1, [pc, #720] ; 7b14 <_Heap_Walk+0x61c>
7840: 0a000003 beq 7854 <_Heap_Walk+0x35c>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
7844: e59fc2cc ldr ip, [pc, #716] ; 7b18 <_Heap_Walk+0x620>
7848: e1540003 cmp r4, r3
784c: e59f12bc ldr r1, [pc, #700] ; 7b10 <_Heap_Walk+0x618>
7850: 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)(
7854: e58d2004 str r2, [sp, #4]
7858: e58d0008 str r0, [sp, #8]
785c: e58d300c str r3, [sp, #12]
7860: e58d1010 str r1, [sp, #16]
7864: e1a03006 mov r3, r6
7868: e58d7000 str r7, [sp]
786c: e1a0000a mov r0, sl
7870: e3a01000 mov r1, #0
7874: e59f22a0 ldr r2, [pc, #672] ; 7b1c <_Heap_Walk+0x624>
7878: e1a0e00f mov lr, pc
787c: e12fff19 bx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
7880: e5953000 ldr r3, [r5]
7884: e1570003 cmp r7, r3
7888: 1a000011 bne 78d4 <_Heap_Walk+0x3dc>
);
return false;
}
if ( !prev_used ) {
788c: e35b0000 cmp fp, #0
7890: 0a00001a beq 7900 <_Heap_Walk+0x408>
block = next_block;
} while ( block != first_block );
return true;
}
7894: e5943008 ldr r3, [r4, #8]
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
7898: e1540003 cmp r4, r3
789c: 0a000004 beq 78b4 <_Heap_Walk+0x3bc>
if ( free_block == block ) {
78a0: e1560003 cmp r6, r3
78a4: 0affffc8 beq 77cc <_Heap_Walk+0x2d4>
return true;
}
free_block = free_block->next;
78a8: 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 ) {
78ac: e1540003 cmp r4, r3
78b0: 1afffffa bne 78a0 <_Heap_Walk+0x3a8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
78b4: e1a0000a mov r0, sl
78b8: e3a01001 mov r1, #1
78bc: e59f225c ldr r2, [pc, #604] ; 7b20 <_Heap_Walk+0x628>
78c0: e1a03006 mov r3, r6
78c4: e1a0e00f mov lr, pc
78c8: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
78cc: e3a00000 mov r0, #0
78d0: eaffff1c b 7548 <_Heap_Walk+0x50>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
78d4: e58d3004 str r3, [sp, #4]
78d8: e1a0000a mov r0, sl
78dc: e58d7000 str r7, [sp]
78e0: e58d5008 str r5, [sp, #8]
78e4: e3a01001 mov r1, #1
78e8: e59f2234 ldr r2, [pc, #564] ; 7b24 <_Heap_Walk+0x62c>
78ec: e1a03006 mov r3, r6
78f0: e1a0e00f mov lr, pc
78f4: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
78f8: e3a00000 mov r0, #0
78fc: eaffff11 b 7548 <_Heap_Walk+0x50>
return false;
}
if ( !prev_used ) {
(*printer)(
7900: e1a0000a mov r0, sl
7904: e3a01001 mov r1, #1
7908: e59f2218 ldr r2, [pc, #536] ; 7b28 <_Heap_Walk+0x630>
790c: e1a03006 mov r3, r6
7910: e1a0e00f mov lr, pc
7914: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
7918: e1a0000b mov r0, fp
791c: eaffff09 b 7548 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
7920: e1a0000a mov r0, sl
7924: e3a01001 mov r1, #1
7928: e59f21fc ldr r2, [pc, #508] ; 7b2c <_Heap_Walk+0x634>
792c: e1a0e00f mov lr, pc
7930: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7934: e1a00005 mov r0, r5
7938: eaffff02 b 7548 <_Heap_Walk+0x50>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
793c: e594c024 ldr ip, [r4, #36] ; 0x24
7940: e15c0005 cmp ip, r5
7944: 3affff64 bcc 76dc <_Heap_Walk+0x1e4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
7948: e2850008 add r0, r5, #8
794c: e1a01007 mov r1, r7
7950: e58d3020 str r3, [sp, #32]
7954: e58dc01c str ip, [sp, #28]
7958: ebffe490 bl ba0 <__umodsi3>
);
return false;
}
if (
795c: e3500000 cmp r0, #0
7960: e59d3020 ldr r3, [sp, #32]
7964: e59dc01c ldr ip, [sp, #28]
7968: 1a000048 bne 7a90 <_Heap_Walk+0x598>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
796c: e5952004 ldr r2, [r5, #4]
7970: e3c22001 bic r2, r2, #1
block = next_block;
} while ( block != first_block );
return true;
}
7974: e0852002 add r2, r5, r2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
7978: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
797c: e3120001 tst r2, #1
7980: 1a00004a bne 7ab0 <_Heap_Walk+0x5b8>
7984: e58d8030 str r8, [sp, #48] ; 0x30
7988: e58db034 str fp, [sp, #52] ; 0x34
798c: e1a01004 mov r1, r4
7990: e1a06005 mov r6, r5
7994: e1a08003 mov r8, r3
7998: e1a0b00c mov fp, ip
799c: ea000013 b 79f0 <_Heap_Walk+0x4f8>
return false;
}
prev_block = free_block;
free_block = free_block->next;
79a0: e5955008 ldr r5, [r5, #8]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
79a4: e1540005 cmp r4, r5
79a8: 0affff53 beq 76fc <_Heap_Walk+0x204>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
79ac: e1580005 cmp r8, r5
79b0: 8affff49 bhi 76dc <_Heap_Walk+0x1e4>
79b4: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
79b8: e2850008 add r0, r5, #8
79bc: e1a01007 mov r1, r7
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
79c0: 8affff45 bhi 76dc <_Heap_Walk+0x1e4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
79c4: ebffe475 bl ba0 <__umodsi3>
);
return false;
}
if (
79c8: e3500000 cmp r0, #0
79cc: 1a00002f bne 7a90 <_Heap_Walk+0x598>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
79d0: e5953004 ldr r3, [r5, #4]
79d4: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
79d8: e0833005 add r3, r3, r5
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
79dc: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
79e0: e3130001 tst r3, #1
79e4: 1a000031 bne 7ab0 <_Heap_Walk+0x5b8>
79e8: e1a01006 mov r1, r6
79ec: e1a06005 mov r6, r5
);
return false;
}
if ( free_block->prev != prev_block ) {
79f0: e595200c ldr r2, [r5, #12]
79f4: e1520001 cmp r2, r1
79f8: 0affffe8 beq 79a0 <_Heap_Walk+0x4a8>
(*printer)(
79fc: e58d2000 str r2, [sp]
7a00: e1a0000a mov r0, sl
7a04: e3a01001 mov r1, #1
7a08: e59f2120 ldr r2, [pc, #288] ; 7b30 <_Heap_Walk+0x638>
7a0c: e1a03005 mov r3, r5
7a10: e1a0e00f mov lr, pc
7a14: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7a18: e3a00000 mov r0, #0
7a1c: eafffec9 b 7548 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
7a20: e1a0000a mov r0, sl
7a24: e58d7000 str r7, [sp]
7a28: e3a01001 mov r1, #1
7a2c: e59f2100 ldr r2, [pc, #256] ; 7b34 <_Heap_Walk+0x63c>
7a30: e1a03006 mov r3, r6
7a34: e1a0e00f mov lr, pc
7a38: e12fff19 bx r9
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
7a3c: e3a00000 mov r0, #0
7a40: eafffec0 b 7548 <_Heap_Walk+0x50>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
7a44: e58d2004 str r2, [sp, #4]
7a48: e1a0000a mov r0, sl
7a4c: e58d7000 str r7, [sp]
7a50: e3a01001 mov r1, #1
7a54: e59f20dc ldr r2, [pc, #220] ; 7b38 <_Heap_Walk+0x640>
7a58: e1a03006 mov r3, r6
7a5c: e1a0e00f mov lr, pc
7a60: e12fff19 bx r9
block,
block_size,
min_block_size
);
return false;
7a64: e3a00000 mov r0, #0
7a68: eafffeb6 b 7548 <_Heap_Walk+0x50>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
7a6c: e1a0000a mov r0, sl
7a70: e58d5000 str r5, [sp]
7a74: e3a01001 mov r1, #1
7a78: e59f20bc ldr r2, [pc, #188] ; 7b3c <_Heap_Walk+0x644>
7a7c: e1a03006 mov r3, r6
7a80: e1a0e00f mov lr, pc
7a84: e12fff19 bx r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
7a88: e3a00000 mov r0, #0
7a8c: eafffead b 7548 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
7a90: e1a0000a mov r0, sl
7a94: e3a01001 mov r1, #1
7a98: e59f20a0 ldr r2, [pc, #160] ; 7b40 <_Heap_Walk+0x648>
7a9c: e1a03005 mov r3, r5
7aa0: e1a0e00f mov lr, pc
7aa4: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7aa8: e3a00000 mov r0, #0
7aac: eafffea5 b 7548 <_Heap_Walk+0x50>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
7ab0: e1a0000a mov r0, sl
7ab4: e3a01001 mov r1, #1
7ab8: e59f2084 ldr r2, [pc, #132] ; 7b44 <_Heap_Walk+0x64c>
7abc: e1a03005 mov r3, r5
7ac0: e1a0e00f mov lr, pc
7ac4: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7ac8: e3a00000 mov r0, #0
7acc: eafffe9d b 7548 <_Heap_Walk+0x50>
000068cc <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
68cc: e59f303c ldr r3, [pc, #60] ; 6910 <_Internal_error_Occurred+0x44>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
68d0: e201c0ff and ip, r1, #255 ; 0xff
68d4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
68d8: e1a0100c mov r1, ip
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
68dc: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
68e0: e5c3c004 strb ip, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
68e4: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
68e8: 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 );
68ec: eb00073d bl 85e8 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
68f0: e59f301c ldr r3, [pc, #28] ; 6914 <_Internal_error_Occurred+0x48><== NOT EXECUTED
68f4: e3a02005 mov r2, #5 <== NOT EXECUTED
68f8: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
68fc: e10f2000 mrs r2, CPSR <== NOT EXECUTED
6900: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
6904: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
6908: e1a00004 mov r0, r4 <== NOT EXECUTED
690c: eafffffe b 690c <_Internal_error_Occurred+0x40> <== NOT EXECUTED
000069d4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
69d4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
69d8: e5904034 ldr r4, [r0, #52] ; 0x34
69dc: e3540000 cmp r4, #0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
69e0: e24dd014 sub sp, sp, #20
69e4: e1a05000 mov r5, r0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
69e8: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
69ec: 0a00009b beq 6c60 <_Objects_Extend_information+0x28c>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
69f0: e1d081b4 ldrh r8, [r0, #20]
69f4: e1d0a1b0 ldrh sl, [r0, #16]
69f8: e1a01008 mov r1, r8
69fc: e1a0000a mov r0, sl
6a00: eb0025e2 bl 10190 <__aeabi_uidiv>
6a04: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
6a08: e1b03823 lsrs r3, r3, #16
6a0c: 0a000099 beq 6c78 <_Objects_Extend_information+0x2a4>
if ( information->object_blocks[ block ] == NULL ) {
6a10: e5949000 ldr r9, [r4]
6a14: e3590000 cmp r9, #0
6a18: 01a01008 moveq r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
6a1c: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
6a20: 01a04009 moveq r4, r9
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
6a24: 0a00000c beq 6a5c <_Objects_Extend_information+0x88>
6a28: e1a02004 mov r2, r4
6a2c: e1a01008 mov r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
6a30: e1a06007 mov r6, r7
index_base = minimum_index;
block = 0;
6a34: e3a04000 mov r4, #0
6a38: ea000002 b 6a48 <_Objects_Extend_information+0x74>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
6a3c: e5b29004 ldr r9, [r2, #4]!
6a40: e3590000 cmp r9, #0
6a44: 0a000004 beq 6a5c <_Objects_Extend_information+0x88>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
6a48: e2844001 add r4, r4, #1
6a4c: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
6a50: e0866008 add r6, r6, r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
6a54: 8afffff8 bhi 6a3c <_Objects_Extend_information+0x68>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
6a58: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
6a5c: e08aa001 add sl, sl, r1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
6a60: e35a0801 cmp sl, #65536 ; 0x10000
6a64: 2a000063 bcs 6bf8 <_Objects_Extend_information+0x224>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
6a68: e5d52012 ldrb r2, [r5, #18]
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
6a6c: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
6a70: e3520000 cmp r2, #0
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
6a74: e0000091 mul r0, r1, r0
if ( information->auto_extend ) {
6a78: 1a000060 bne 6c00 <_Objects_Extend_information+0x22c>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
6a7c: e58d3000 str r3, [sp]
6a80: eb000811 bl 8acc <_Workspace_Allocate_or_fatal_error>
6a84: e59d3000 ldr r3, [sp]
6a88: e1a08000 mov r8, r0
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
6a8c: e3590000 cmp r9, #0
6a90: 0a000039 beq 6b7c <_Objects_Extend_information+0x1a8>
*/
/*
* Up the block count and maximum
*/
block_count++;
6a94: e283b001 add fp, r3, #1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
6a98: e08b008b add r0, fp, fp, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
6a9c: e08a0000 add r0, sl, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
6aa0: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
6aa4: e1a00100 lsl r0, r0, #2
6aa8: e58d3000 str r3, [sp]
6aac: eb0007fc bl 8aa4 <_Workspace_Allocate>
if ( !object_blocks ) {
6ab0: e2509000 subs r9, r0, #0
6ab4: e59d3000 ldr r3, [sp]
6ab8: 0a000073 beq 6c8c <_Objects_Extend_information+0x2b8>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
6abc: e1d521b0 ldrh r2, [r5, #16]
6ac0: e1570002 cmp r7, r2
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
6ac4: e089c10b add ip, r9, fp, lsl #2
6ac8: e089b18b add fp, r9, fp, lsl #3
6acc: 3a000051 bcc 6c18 <_Objects_Extend_information+0x244>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6ad0: e3570000 cmp r7, #0
6ad4: 13a02000 movne r2, #0
6ad8: 11a0100b movne r1, fp
local_table[ index ] = NULL;
6adc: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6ae0: 0a000003 beq 6af4 <_Objects_Extend_information+0x120>
6ae4: e2822001 add r2, r2, #1
6ae8: e1570002 cmp r7, r2
local_table[ index ] = NULL;
6aec: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6af0: 8afffffb bhi 6ae4 <_Objects_Extend_information+0x110>
6af4: e1a03103 lsl r3, r3, #2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
6af8: e1d511b4 ldrh r1, [r5, #20]
6afc: e0861001 add r1, r6, r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
6b00: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6b04: e1560001 cmp r6, r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
6b08: e7890003 str r0, [r9, r3]
inactive_per_block[block_count] = 0;
6b0c: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
6b10: 2a000005 bcs 6b2c <_Objects_Extend_information+0x158>
6b14: e08b2106 add r2, fp, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
6b18: e1a03006 mov r3, r6
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
6b1c: e2833001 add r3, r3, #1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6b20: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
6b24: e4820004 str r0, [r2], #4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6b28: 3afffffb bcc 6b1c <_Objects_Extend_information+0x148>
6b2c: e10f3000 mrs r3, CPSR
6b30: e3832080 orr r2, r3, #128 ; 0x80
6b34: e129f002 msr CPSR_fc, r2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
6b38: e5952000 ldr r2, [r5]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
6b3c: e1d510b4 ldrh r1, [r5, #4]
6b40: e1a02c02 lsl r2, r2, #24
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
6b44: e1a0a80a lsl sl, sl, #16
6b48: e3822801 orr r2, r2, #65536 ; 0x10000
6b4c: e1a0a82a lsr sl, sl, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
6b50: e1822d81 orr r2, r2, r1, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
6b54: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
6b58: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
6b5c: e585c030 str ip, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
6b60: e5859034 str r9, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
6b64: e585b01c str fp, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
6b68: e1c5a1b0 strh sl, [r5, #16]
information->maximum_id = _Objects_Build_id(
6b6c: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
6b70: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
6b74: e3500000 cmp r0, #0
_Workspace_Free( old_tables );
6b78: 1b0007cf blne 8abc <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6b7c: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
6b80: e28d7008 add r7, sp, #8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6b84: e7838104 str r8, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
6b88: e1a01008 mov r1, r8
6b8c: e1a00007 mov r0, r7
6b90: e1d521b4 ldrh r2, [r5, #20]
6b94: e5953018 ldr r3, [r5, #24]
6b98: eb000fa4 bl aa30 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6b9c: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6ba0: e2858020 add r8, r5, #32
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
6ba4: ea000009 b 6bd0 <_Objects_Extend_information+0x1fc>
6ba8: e5953000 ldr r3, [r5]
the_object->id = _Objects_Build_id(
6bac: e1d520b4 ldrh r2, [r5, #4]
6bb0: e1a03c03 lsl r3, r3, #24
6bb4: e3833801 orr r3, r3, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
6bb8: e1833d82 orr r3, r3, r2, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
6bbc: e1833006 orr r3, r3, r6
6bc0: e5813008 str r3, [r1, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6bc4: e1a00008 mov r0, r8
6bc8: ebfffce6 bl 5f68 <_Chain_Append>
index++;
6bcc: e2866001 add r6, r6, #1
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
6bd0: e1a00007 mov r0, r7
6bd4: ebfffcf6 bl 5fb4 <_Chain_Get>
6bd8: e2501000 subs r1, r0, #0
6bdc: 1afffff1 bne 6ba8 <_Objects_Extend_information+0x1d4>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
6be0: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6be4: e1d531b4 ldrh r3, [r5, #20]
6be8: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
6bec: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6bf0: e7813004 str r3, [r1, r4]
information->inactive =
6bf4: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
6bf8: e28dd014 add sp, sp, #20
6bfc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
6c00: e58d3000 str r3, [sp]
6c04: eb0007a6 bl 8aa4 <_Workspace_Allocate>
if ( !new_object_block )
6c08: e2508000 subs r8, r0, #0
6c0c: e59d3000 ldr r3, [sp]
6c10: 1affff9d bne 6a8c <_Objects_Extend_information+0xb8>
6c14: eafffff7 b 6bf8 <_Objects_Extend_information+0x224>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
6c18: e1a03103 lsl r3, r3, #2
6c1c: e5951034 ldr r1, [r5, #52] ; 0x34
6c20: e1a02003 mov r2, r3
6c24: e88d1008 stm sp, {r3, ip}
6c28: eb0019e7 bl d3cc <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
6c2c: e89d1008 ldm sp, {r3, ip}
6c30: e1a0000c mov r0, ip
6c34: e1a02003 mov r2, r3
6c38: e5951030 ldr r1, [r5, #48] ; 0x30
6c3c: eb0019e2 bl d3cc <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
6c40: e1d521b0 ldrh r2, [r5, #16]
6c44: e0872002 add r2, r7, r2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
6c48: e1a0000b mov r0, fp
6c4c: e595101c ldr r1, [r5, #28]
6c50: e1a02102 lsl r2, r2, #2
6c54: eb0019dc bl d3cc <memcpy>
6c58: e89d1008 ldm sp, {r3, ip}
6c5c: eaffffa5 b 6af8 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
6c60: e1d0a1b0 ldrh sl, [r0, #16]
6c64: e1d011b4 ldrh r1, [r0, #20]
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
6c68: e1a06007 mov r6, r7
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
6c6c: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
6c70: e1a03004 mov r3, r4
6c74: eaffff78 b 6a5c <_Objects_Extend_information+0x88>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
6c78: e1a01008 mov r1, r8 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
6c7c: e1a06007 mov r6, r7 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
6c80: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
6c84: e1a04003 mov r4, r3 <== NOT EXECUTED
6c88: eaffff73 b 6a5c <_Objects_Extend_information+0x88> <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
6c8c: e1a00008 mov r0, r8
6c90: eb000789 bl 8abc <_Workspace_Free>
return;
6c94: eaffffd7 b 6bf8 <_Objects_Extend_information+0x224>
00006fdc <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
6fdc: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
6fe0: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
6fe4: e1d051b4 ldrh r5, [r0, #20]
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
6fe8: e1a06000 mov r6, r0
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
6fec: e1d001b0 ldrh r0, [r0, #16]
6ff0: e1a01005 mov r1, r5
6ff4: e0640000 rsb r0, r4, r0
6ff8: eb002464 bl 10190 <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
6ffc: e3500000 cmp r0, #0
7000: 08bd80f0 popeq {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
7004: e5962030 ldr r2, [r6, #48] ; 0x30
7008: e5923000 ldr r3, [r2]
700c: e1550003 cmp r5, r3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
7010: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
7014: 1a000005 bne 7030 <_Objects_Shrink_information+0x54>
7018: ea000008 b 7040 <_Objects_Shrink_information+0x64> <== NOT EXECUTED
701c: e5b21004 ldr r1, [r2, #4]!
7020: e1550001 cmp r5, r1
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
7024: e0844005 add r4, r4, r5
7028: e1a07103 lsl r7, r3, #2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
702c: 0a000004 beq 7044 <_Objects_Shrink_information+0x68>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
7030: e2833001 add r3, r3, #1
7034: e1500003 cmp r0, r3
7038: 8afffff7 bhi 701c <_Objects_Shrink_information+0x40>
703c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
7040: e3a07000 mov r7, #0 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
7044: e5960020 ldr r0, [r6, #32]
7048: ea000002 b 7058 <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
704c: e3550000 cmp r5, #0
7050: 0a00000b beq 7084 <_Objects_Shrink_information+0xa8>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
7054: e1a00005 mov r0, r5
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
7058: e1d030b8 ldrh r3, [r0, #8]
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
705c: e1530004 cmp r3, r4
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
7060: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
7064: 3afffff8 bcc 704c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
7068: e1d621b4 ldrh r2, [r6, #20]
706c: e0842002 add r2, r4, r2
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
7070: e1530002 cmp r3, r2
7074: 2afffff4 bcs 704c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
7078: ebfffbc5 bl 5f94 <_Chain_Extract>
}
}
while ( the_object );
707c: e3550000 cmp r5, #0
7080: 1afffff3 bne 7054 <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
7084: e5963034 ldr r3, [r6, #52] ; 0x34
7088: e7930007 ldr r0, [r3, r7]
708c: eb00068a bl 8abc <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
7090: e1d602bc ldrh r0, [r6, #44] ; 0x2c
7094: e1d631b4 ldrh r3, [r6, #20]
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
7098: e5961034 ldr r1, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
709c: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
70a0: e0633000 rsb r3, r3, r0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
70a4: e7815007 str r5, [r1, r7]
information->inactive_per_block[ block ] = 0;
70a8: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
70ac: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
70b0: e8bd80f0 pop {r4, r5, r6, r7, pc}
00006640 <_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();
6640: e59f30b8 ldr r3, [pc, #184] ; 6700 <_TOD_Validate+0xc0>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
6644: 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) ||
6648: 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();
664c: e593100c ldr r1, [r3, #12]
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
6650: 01a00004 moveq r0, r4
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
6654: 08bd8010 popeq {r4, pc}
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
6658: e3a0093d mov r0, #999424 ; 0xf4000
665c: e2800d09 add r0, r0, #576 ; 0x240
6660: eb004506 bl 17a80 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
6664: e5943018 ldr r3, [r4, #24]
6668: e1500003 cmp r0, r3
666c: 9a00001f bls 66f0 <_TOD_Validate+0xb0>
(the_tod->ticks >= ticks_per_second) ||
6670: e5943014 ldr r3, [r4, #20]
6674: e353003b cmp r3, #59 ; 0x3b
6678: 8a00001c bhi 66f0 <_TOD_Validate+0xb0>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
667c: e5943010 ldr r3, [r4, #16]
6680: e353003b cmp r3, #59 ; 0x3b
6684: 8a000019 bhi 66f0 <_TOD_Validate+0xb0>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
6688: e594300c ldr r3, [r4, #12]
668c: e3530017 cmp r3, #23
6690: 8a000016 bhi 66f0 <_TOD_Validate+0xb0>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
6694: e5940004 ldr r0, [r4, #4]
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
6698: e3500000 cmp r0, #0
669c: 08bd8010 popeq {r4, pc}
(the_tod->month == 0) ||
66a0: e350000c cmp r0, #12
66a4: 8a000011 bhi 66f0 <_TOD_Validate+0xb0>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
66a8: 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) ||
66ac: e3a03d1f mov r3, #1984 ; 0x7c0
66b0: e2833003 add r3, r3, #3
66b4: e1520003 cmp r2, r3
66b8: 9a00000c bls 66f0 <_TOD_Validate+0xb0>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
66bc: e5944008 ldr r4, [r4, #8]
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
66c0: e3540000 cmp r4, #0
66c4: 0a00000b beq 66f8 <_TOD_Validate+0xb8>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
66c8: e3120003 tst r2, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
66cc: 059f3030 ldreq r3, [pc, #48] ; 6704 <_TOD_Validate+0xc4>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
66d0: 159f302c ldrne r3, [pc, #44] ; 6704 <_TOD_Validate+0xc4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
66d4: 0280000d addeq r0, r0, #13
66d8: 07930100 ldreq r0, [r3, r0, lsl #2]
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
66dc: 17930100 ldrne r0, [r3, r0, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
66e0: e1500004 cmp r0, r4
66e4: 33a00000 movcc r0, #0
66e8: 23a00001 movcs r0, #1
66ec: 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;
66f0: e3a00000 mov r0, #0
66f4: e8bd8010 pop {r4, pc}
66f8: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
66fc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00007c50 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
7c50: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
7c54: e92d0ff0 push {r4, r5, r6, r7, r8, r9, sl, fp}
7c58: e281403c add r4, 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 );
7c5c: e281c038 add ip, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7c60: e5814038 str r4, [r1, #56] ; 0x38
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
7c64: e3130020 tst r3, #32
the_chain->permanent_null = NULL;
7c68: e3a04000 mov r4, #0
7c6c: e581403c str r4, [r1, #60] ; 0x3c
the_chain->last = _Chain_Head(the_chain);
7c70: e581c040 str ip, [r1, #64] ; 0x40
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
7c74: e1a08323 lsr r8, r3, #6
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
7c78: e5905038 ldr r5, [r0, #56] ; 0x38
if ( _Thread_queue_Is_reverse_search( priority ) )
7c7c: 1a00001f bne 7d00 <_Thread_queue_Enqueue_priority+0xb0>
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
7c80: e0888088 add r8, r8, r8, lsl #1
7c84: e1a09108 lsl r9, r8, #2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
7c88: e2898004 add r8, r9, #4
7c8c: e0808008 add r8, r0, r8
7c90: e0809009 add r9, r0, r9
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7c94: e10f7000 mrs r7, CPSR
7c98: e387c080 orr ip, r7, #128 ; 0x80
7c9c: e129f00c msr CPSR_fc, ip
7ca0: e1a0a007 mov sl, r7
7ca4: e599c000 ldr ip, [r9]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7ca8: e15c0008 cmp ip, r8
7cac: 1a000009 bne 7cd8 <_Thread_queue_Enqueue_priority+0x88>
7cb0: ea000054 b 7e08 <_Thread_queue_Enqueue_priority+0x1b8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7cb4: e10f6000 mrs r6, CPSR
7cb8: e129f007 msr CPSR_fc, r7
7cbc: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
7cc0: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7cc4: e1150006 tst r5, r6
7cc8: 0a000036 beq 7da8 <_Thread_queue_Enqueue_priority+0x158>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
7ccc: e59cc000 ldr ip, [ip]
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 ) ) {
7cd0: e15c0008 cmp ip, r8
7cd4: 0a000002 beq 7ce4 <_Thread_queue_Enqueue_priority+0x94>
search_priority = search_thread->current_priority;
7cd8: e59c4014 ldr r4, [ip, #20]
if ( priority <= search_priority )
7cdc: e1530004 cmp r3, r4
7ce0: 8afffff3 bhi 7cb4 <_Thread_queue_Enqueue_priority+0x64>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
7ce4: e5905030 ldr r5, [r0, #48] ; 0x30
7ce8: e3550001 cmp r5, #1
7cec: 0a00002f beq 7db0 <_Thread_queue_Enqueue_priority+0x160>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
7cf0: e582a000 str sl, [r2]
return the_thread_queue->sync_state;
}
7cf4: e1a00005 mov r0, r5
7cf8: e8bd0ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp}
7cfc: e12fff1e bx lr
_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 ];
7d00: e0888088 add r8, r8, r8, lsl #1
7d04: e0808108 add r8, r0, r8, lsl #2
7d08: e59f9100 ldr r9, [pc, #256] ; 7e10 <_Thread_queue_Enqueue_priority+0x1c0>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
7d0c: e1a0b008 mov fp, r8
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
7d10: e5d94000 ldrb r4, [r9]
7d14: e2844001 add r4, r4, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7d18: e10f7000 mrs r7, CPSR
7d1c: e387c080 orr ip, r7, #128 ; 0x80
7d20: e129f00c msr CPSR_fc, ip
7d24: e1a0a007 mov sl, r7
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
7d28: e59bc008 ldr ip, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7d2c: e15c0008 cmp ip, r8
7d30: 1a000009 bne 7d5c <_Thread_queue_Enqueue_priority+0x10c>
7d34: ea00000b b 7d68 <_Thread_queue_Enqueue_priority+0x118>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7d38: e10f6000 mrs r6, CPSR
7d3c: e129f007 msr CPSR_fc, r7
7d40: e129f006 msr CPSR_fc, r6
7d44: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7d48: e1150006 tst r5, r6
7d4c: 0a000013 beq 7da0 <_Thread_queue_Enqueue_priority+0x150>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
7d50: e59cc004 ldr ip, [ip, #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 ) ) {
7d54: e15c0008 cmp ip, r8
7d58: 0a000002 beq 7d68 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
7d5c: e59c4014 ldr r4, [ip, #20]
if ( priority >= search_priority )
7d60: e1530004 cmp r3, r4
7d64: 3afffff3 bcc 7d38 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7d68: e5905030 ldr r5, [r0, #48] ; 0x30
7d6c: e3550001 cmp r5, #1
7d70: 1affffde bne 7cf0 <_Thread_queue_Enqueue_priority+0xa0>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
7d74: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7d78: e3a03000 mov r3, #0
7d7c: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7d80: 0a000016 beq 7de0 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
7d84: e59c3000 ldr r3, [ip]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
7d88: e8811008 stm r1, {r3, ip}
search_node->next = the_node;
next_node->previous = the_node;
7d8c: e5831004 str r1, [r3, #4]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
7d90: e58c1000 str r1, [ip]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7d94: e5810044 str r0, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7d98: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7d9c: eaffffd4 b 7cf4 <_Thread_queue_Enqueue_priority+0xa4>
7da0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
7da4: eaffffd9 b 7d10 <_Thread_queue_Enqueue_priority+0xc0> <== NOT EXECUTED
7da8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
7dac: eaffffb8 b 7c94 <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
7db0: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7db4: e3a03000 mov r3, #0
7db8: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7dbc: 0a000007 beq 7de0 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
7dc0: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7dc4: e581c000 str ip, [r1]
the_node->previous = previous_node;
7dc8: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
7dcc: e5831000 str r1, [r3]
search_node->previous = the_node;
7dd0: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
7dd4: e5810044 str r0, [r1, #68] ; 0x44
7dd8: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7ddc: eaffffc4 b 7cf4 <_Thread_queue_Enqueue_priority+0xa4>
7de0: e28cc03c add ip, ip, #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;
7de4: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7de8: e581c000 str ip, [r1]
the_node->previous = previous_node;
7dec: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
7df0: e5831000 str r1, [r3]
search_node->previous = the_node;
7df4: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
7df8: e5810044 str r0, [r1, #68] ; 0x44
7dfc: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7e00: e3a05001 mov r5, #1
7e04: eaffffba b 7cf4 <_Thread_queue_Enqueue_priority+0xa4>
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
7e08: e3e04000 mvn r4, #0
7e0c: eaffffb4 b 7ce4 <_Thread_queue_Enqueue_priority+0x94>
00015ec4 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
15ec4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
15ec8: e24dd024 sub sp, sp, #36 ; 0x24
15ecc: e28d700c add r7, sp, #12
15ed0: e28d2018 add r2, sp, #24
15ed4: e282a004 add sl, r2, #4
15ed8: e2872004 add r2, r7, #4
15edc: e58d2000 str r2, [sp]
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
15ee0: e28d2018 add r2, sp, #24
15ee4: e58d2020 str r2, [sp, #32]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15ee8: e59d2000 ldr r2, [sp]
15eec: e58d200c str r2, [sp, #12]
15ef0: e2802008 add r2, r0, #8
the_chain->permanent_null = NULL;
15ef4: e3a03000 mov r3, #0
15ef8: e58d2004 str r2, [sp, #4]
15efc: e2802040 add r2, r0, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15f00: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
15f04: e58d301c str r3, [sp, #28]
15f08: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
15f0c: e58d7014 str r7, [sp, #20]
15f10: e59f91a8 ldr r9, [pc, #424] ; 160c0 <_Timer_server_Body+0x1fc>
15f14: e59fb1a8 ldr fp, [pc, #424] ; 160c4 <_Timer_server_Body+0x200>
15f18: e58d2008 str r2, [sp, #8]
15f1c: e1a04000 mov r4, r0
15f20: e2806030 add r6, r0, #48 ; 0x30
15f24: e2808068 add r8, r0, #104 ; 0x68
{
/*
* 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;
15f28: e28d3018 add r3, sp, #24
15f2c: e5843078 str r3, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
15f30: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
15f34: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15f38: e1a02007 mov r2, r7
15f3c: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
15f40: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15f44: e0611003 rsb r1, r1, r3
15f48: eb001162 bl 1a4d8 <_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();
15f4c: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
15f50: e5942074 ldr r2, [r4, #116] ; 0x74
/*
* 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 ) {
15f54: e1550002 cmp r5, r2
15f58: 8a000022 bhi 15fe8 <_Timer_server_Body+0x124>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
15f5c: 3a000018 bcc 15fc4 <_Timer_server_Body+0x100>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
15f60: e5845074 str r5, [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 );
15f64: e5940078 ldr r0, [r4, #120] ; 0x78
15f68: eb0002c0 bl 16a70 <_Chain_Get>
if ( timer == NULL ) {
15f6c: e2501000 subs r1, r0, #0
15f70: 0a00000b beq 15fa4 <_Timer_server_Body+0xe0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
15f74: e5913038 ldr r3, [r1, #56] ; 0x38
15f78: e3530001 cmp r3, #1
15f7c: 0a000015 beq 15fd8 <_Timer_server_Body+0x114>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
15f80: e3530003 cmp r3, #3
15f84: 1afffff6 bne 15f64 <_Timer_server_Body+0xa0>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
15f88: e2811010 add r1, r1, #16
15f8c: e1a00008 mov r0, r8
15f90: eb00117a bl 1a580 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
15f94: e5940078 ldr r0, [r4, #120] ; 0x78
15f98: eb0002b4 bl 16a70 <_Chain_Get>
if ( timer == NULL ) {
15f9c: e2501000 subs r1, r0, #0
15fa0: 1afffff3 bne 15f74 <_Timer_server_Body+0xb0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
15fa4: e10f2000 mrs r2, CPSR
15fa8: e3823080 orr r3, r2, #128 ; 0x80
15fac: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
15fb0: e59d3018 ldr r3, [sp, #24]
15fb4: e15a0003 cmp sl, r3
15fb8: 0a00000f beq 15ffc <_Timer_server_Body+0x138>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
15fbc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
15fc0: eaffffda b 15f30 <_Timer_server_Body+0x6c> <== NOT EXECUTED
/*
* 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 );
15fc4: e1a00008 mov r0, r8
15fc8: e3a01001 mov r1, #1
15fcc: e0652002 rsb r2, r5, r2
15fd0: eb001111 bl 1a41c <_Watchdog_Adjust>
15fd4: eaffffe1 b 15f60 <_Timer_server_Body+0x9c>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
15fd8: e1a00006 mov r0, r6
15fdc: e2811010 add r1, r1, #16
15fe0: eb001166 bl 1a580 <_Watchdog_Insert>
15fe4: eaffffde b 15f64 <_Timer_server_Body+0xa0>
/*
* 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 );
15fe8: e0621005 rsb r1, r2, r5
15fec: e1a00008 mov r0, r8
15ff0: e1a02007 mov r2, r7
15ff4: eb001137 bl 1a4d8 <_Watchdog_Adjust_to_chain>
15ff8: eaffffd8 b 15f60 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
15ffc: e5841078 str r1, [r4, #120] ; 0x78
16000: e129f002 msr CPSR_fc, r2
_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 ) ) {
16004: e59d300c ldr r3, [sp, #12]
16008: e59d2000 ldr r2, [sp]
1600c: e1520003 cmp r2, r3
16010: 0a000015 beq 1606c <_Timer_server_Body+0x1a8>
16014: e1a05004 mov r5, r4
16018: e59d4000 ldr r4, [sp]
1601c: ea000009 b 16048 <_Timer_server_Body+0x184>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
16020: e5932000 ldr r2, [r3]
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
16024: e5827004 str r7, [r2, #4]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
16028: e58d200c str r2, [sp, #12]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
1602c: e3a02000 mov r2, #0
16030: e5832008 str r2, [r3, #8]
16034: e129f001 msr CPSR_fc, r1
/*
* 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 );
16038: e2830020 add r0, r3, #32
1603c: e8900003 ldm r0, {r0, r1}
16040: e1a0e00f mov lr, pc
16044: e593f01c ldr pc, [r3, #28]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
16048: e10f1000 mrs r1, CPSR
1604c: e3813080 orr r3, r1, #128 ; 0x80
16050: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
16054: e59d300c ldr r3, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
16058: e1540003 cmp r4, r3
1605c: 1affffef bne 16020 <_Timer_server_Body+0x15c>
16060: e1a04005 mov r4, r5
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
16064: e129f001 msr CPSR_fc, r1
16068: eaffffae b 15f28 <_Timer_server_Body+0x64>
}
} else {
ts->active = false;
1606c: e3a03000 mov r3, #0
16070: e5c4307c strb r3, [r4, #124] ; 0x7c
16074: e59f204c ldr r2, [pc, #76] ; 160c8 <_Timer_server_Body+0x204>
16078: e5923000 ldr r3, [r2]
1607c: e2833001 add r3, r3, #1
16080: e5823000 str r3, [r2]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
16084: e3a01008 mov r1, #8
16088: e5940000 ldr r0, [r4]
1608c: eb000e88 bl 19ab4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
16090: e1a00004 mov r0, r4
16094: ebffff5e bl 15e14 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
16098: e1a00004 mov r0, r4
1609c: ebffff72 bl 15e6c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
160a0: eb000bf2 bl 19070 <_Thread_Enable_dispatch>
ts->active = true;
160a4: e3a03001 mov r3, #1
160a8: 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 );
160ac: e59d0004 ldr r0, [sp, #4]
160b0: eb001195 bl 1a70c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
160b4: e59d0008 ldr r0, [sp, #8]
160b8: eb001193 bl 1a70c <_Watchdog_Remove>
160bc: eaffff99 b 15f28 <_Timer_server_Body+0x64>
0000a270 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a270: e5902000 ldr r2, [r0]
a274: e5913000 ldr r3, [r1]
a278: e1520003 cmp r2, r3
return true;
a27c: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a280: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
a284: ba000005 blt a2a0 <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
a288: e5900004 ldr r0, [r0, #4]
a28c: e5913004 ldr r3, [r1, #4]
a290: e1500003 cmp r0, r3
a294: d3a00000 movle r0, #0
a298: c3a00001 movgt r0, #1
a29c: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
a2a0: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
a2a4: e12fff1e bx lr <== NOT EXECUTED
0000a2a8 <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a2a8: e5902000 ldr r2, [r0]
a2ac: e5913000 ldr r3, [r1]
a2b0: e1520003 cmp r2, r3
return true;
a2b4: b3a00001 movlt r0, #1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a2b8: b12fff1e bxlt lr
return true;
if ( lhs->tv_sec > rhs->tv_sec )
a2bc: ca000005 bgt a2d8 <_Timespec_Less_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
a2c0: e5900004 ldr r0, [r0, #4]
a2c4: e5913004 ldr r3, [r1, #4]
a2c8: e1500003 cmp r0, r3
a2cc: a3a00000 movge r0, #0
a2d0: b3a00001 movlt r0, #1
a2d4: e12fff1e bx lr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
a2d8: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
a2dc: e12fff1e bx lr <== NOT EXECUTED
000085e8 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
85e8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
85ec: e59f5040 ldr r5, [pc, #64] ; 8634 <_User_extensions_Fatal+0x4c>
85f0: e5954008 ldr r4, [r5, #8]
85f4: e1540005 cmp r4, r5
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
85f8: e1a08000 mov r8, r0
85fc: e1a07002 mov r7, r2
8600: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8604: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
8608: e5943030 ldr r3, [r4, #48] ; 0x30
860c: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
8610: e1a00008 mov r0, r8
8614: e1a01006 mov r1, r6
8618: e1a02007 mov r2, r7
861c: 11a0e00f movne lr, pc
8620: 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 ) {
8624: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8628: e1540005 cmp r4, r5
862c: 1afffff5 bne 8608 <_User_extensions_Fatal+0x20>
8630: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00008638 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
8638: e92d40f0 push {r4, r5, r6, r7, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
863c: e59f5050 ldr r5, [pc, #80] ; 8694 <_User_extensions_Thread_create+0x5c>
8640: e4954004 ldr r4, [r5], #4
8644: e1540005 cmp r4, r5
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
8648: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
864c: 0a00000e beq 868c <_User_extensions_Thread_create+0x54>
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
8650: e59f7040 ldr r7, [pc, #64] ; 8698 <_User_extensions_Thread_create+0x60>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
8654: e5943014 ldr r3, [r4, #20]
8658: e3530000 cmp r3, #0
status = (*the_extension->Callouts.thread_create)(
865c: e1a01006 mov r1, r6
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
8660: 0a000004 beq 8678 <_User_extensions_Thread_create+0x40>
status = (*the_extension->Callouts.thread_create)(
8664: e5970004 ldr r0, [r7, #4]
8668: e1a0e00f mov lr, pc
866c: e12fff13 bx r3
_Thread_Executing,
the_thread
);
if ( !status )
8670: e3500000 cmp r0, #0
8674: 08bd80f0 popeq {r4, r5, r6, r7, pc}
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
8678: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
867c: e1540005 cmp r4, r5
8680: 1afffff3 bne 8654 <_User_extensions_Thread_create+0x1c>
if ( !status )
return false;
}
}
return true;
8684: e3a00001 mov r0, #1
8688: e8bd80f0 pop {r4, r5, r6, r7, pc}
868c: e3a00001 mov r0, #1 <== NOT EXECUTED
}
8690: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000a5f4 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a5f4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a5f8: e1a04000 mov r4, r0
a5fc: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a600: e10f3000 mrs r3, CPSR
a604: e3832080 orr r2, r3, #128 ; 0x80
a608: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a60c: e1a07000 mov r7, r0
a610: e4972004 ldr r2, [r7], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
a614: e1520007 cmp r2, r7
a618: 0a000018 beq a680 <_Watchdog_Adjust+0x8c>
switch ( direction ) {
a61c: e3510000 cmp r1, #0
a620: 1a000018 bne a688 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a624: e3550000 cmp r5, #0
a628: 0a000014 beq a680 <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a62c: e5926010 ldr r6, [r2, #16]
a630: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a634: 23a08001 movcs r8, #1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
a638: 2a000005 bcs a654 <_Watchdog_Adjust+0x60>
a63c: ea000018 b a6a4 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a640: e0555006 subs r5, r5, r6
a644: 0a00000d beq a680 <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a648: e5926010 ldr r6, [r2, #16]
a64c: e1560005 cmp r6, r5
a650: 8a000013 bhi a6a4 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a654: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a658: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a65c: e1a00004 mov r0, r4
a660: eb0000a0 bl a8e8 <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a664: e10f3000 mrs r3, CPSR
a668: e3832080 orr r2, r3, #128 ; 0x80
a66c: e129f002 msr CPSR_fc, r2
a670: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a674: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
a678: e1a02001 mov r2, r1
a67c: 1affffef bne a640 <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a680: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a684: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a688: e3510001 cmp r1, #1
a68c: 1afffffb bne a680 <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a690: e5921010 ldr r1, [r2, #16]
a694: e0815005 add r5, r1, r5
a698: e5825010 str r5, [r2, #16]
a69c: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a6a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
a6a4: e0655006 rsb r5, r5, r6
a6a8: e5825010 str r5, [r2, #16]
break;
a6ac: eafffff3 b a680 <_Watchdog_Adjust+0x8c>
00006fa8 <rtems_io_register_driver>:
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
6fa8: e59f3150 ldr r3, [pc, #336] ; 7100 <rtems_io_register_driver+0x158>
6fac: e593c000 ldr ip, [r3]
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
6fb0: e59f314c ldr r3, [pc, #332] ; 7104 <rtems_io_register_driver+0x15c>
if ( rtems_interrupt_is_in_progress() )
6fb4: e35c0000 cmp ip, #0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
6fb8: e92d4030 push {r4, r5, lr}
6fbc: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
6fc0: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
6fc4: 13a00012 movne r0, #18
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
6fc8: 18bd8030 popne {r4, r5, pc}
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
6fcc: e3520000 cmp r2, #0
6fd0: 0a00003f beq 70d4 <rtems_io_register_driver+0x12c>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
6fd4: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
6fd8: e5820000 str r0, [r2]
if ( driver_table == NULL )
6fdc: 0a00003c beq 70d4 <rtems_io_register_driver+0x12c>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
6fe0: e591c000 ldr ip, [r1]
6fe4: e35c0000 cmp ip, #0
6fe8: 0a000036 beq 70c8 <rtems_io_register_driver+0x120>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
6fec: e1500004 cmp r0, r4
6ff0: 9a000027 bls 7094 <rtems_io_register_driver+0xec>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
6ff4: e59f010c ldr r0, [pc, #268] ; 7108 <rtems_io_register_driver+0x160>
6ff8: e590c000 ldr ip, [r0]
6ffc: e28cc001 add ip, ip, #1
7000: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
7004: e3540000 cmp r4, #0
7008: 1a000023 bne 709c <rtems_io_register_driver+0xf4>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
700c: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
7010: e35c0000 cmp ip, #0
7014: 0a000030 beq 70dc <rtems_io_register_driver+0x134>
7018: e59fe0ec ldr lr, [pc, #236] ; 710c <rtems_io_register_driver+0x164>
701c: e59e3000 ldr r3, [lr]
7020: ea000003 b 7034 <rtems_io_register_driver+0x8c>
7024: e2844001 add r4, r4, #1
7028: e15c0004 cmp ip, r4
702c: e2833018 add r3, r3, #24
7030: 9a000005 bls 704c <rtems_io_register_driver+0xa4>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
7034: e5930000 ldr r0, [r3]
7038: e3500000 cmp r0, #0
703c: 1afffff8 bne 7024 <rtems_io_register_driver+0x7c>
7040: e5930004 ldr r0, [r3, #4]
7044: e3500000 cmp r0, #0
7048: 1afffff5 bne 7024 <rtems_io_register_driver+0x7c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
704c: e15c0004 cmp ip, r4
7050: 1084c084 addne ip, r4, r4, lsl #1
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
7054: e5824000 str r4, [r2]
if ( m != n )
7058: 11a0c18c lslne ip, ip, #3
705c: 0a00001f beq 70e0 <rtems_io_register_driver+0x138>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
7060: e59e5000 ldr r5, [lr]
7064: e1a0e001 mov lr, r1
7068: e8be000f ldm lr!, {r0, r1, r2, r3}
706c: e085c00c add ip, r5, ip
7070: e8ac000f stmia ip!, {r0, r1, r2, r3}
7074: e89e0003 ldm lr, {r0, r1}
7078: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
707c: eb000687 bl 8aa0 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
7080: e3a01000 mov r1, #0
7084: e1a00004 mov r0, r4
7088: e1a02001 mov r2, r1
}
708c: e8bd4030 pop {r4, r5, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
7090: ea001e8b b eac4 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
7094: e3a0000a mov r0, #10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
7098: e8bd8030 pop {r4, r5, pc}
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
709c: e59fe068 ldr lr, [pc, #104] ; 710c <rtems_io_register_driver+0x164>
70a0: e59e3000 ldr r3, [lr]
70a4: e084c084 add ip, r4, r4, lsl #1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
70a8: e793018c ldr r0, [r3, ip, lsl #3]
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
70ac: e1a0c18c lsl ip, ip, #3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
70b0: e3500000 cmp r0, #0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
70b4: e083300c add r3, r3, ip
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
70b8: 0a00000b beq 70ec <rtems_io_register_driver+0x144>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
70bc: eb000677 bl 8aa0 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
70c0: e3a0000c mov r0, #12
70c4: e8bd8030 pop {r4, r5, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
70c8: e591c004 ldr ip, [r1, #4]
70cc: e35c0000 cmp ip, #0
70d0: 1affffc5 bne 6fec <rtems_io_register_driver+0x44>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
70d4: e3a00009 mov r0, #9
70d8: e8bd8030 pop {r4, r5, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
70dc: e5824000 str r4, [r2] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
70e0: eb00066e bl 8aa0 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
70e4: e3a00005 mov r0, #5
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
70e8: e8bd8030 pop {r4, r5, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
70ec: e5933004 ldr r3, [r3, #4]
70f0: e3530000 cmp r3, #0
70f4: 1afffff0 bne 70bc <rtems_io_register_driver+0x114>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
70f8: e5824000 str r4, [r2]
70fc: eaffffd7 b 7060 <rtems_io_register_driver+0xb8>
000083dc <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
83dc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
83e0: e2506000 subs r6, r0, #0
83e4: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
83e8: e59f7054 ldr r7, [pc, #84] ; 8444 <rtems_iterate_over_all_threads+0x68>
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
83ec: e287800c add r8, r7, #12
#if defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
83f0: e5b73004 ldr r3, [r7, #4]!
83f4: e5935004 ldr r5, [r3, #4]
if ( !information )
83f8: e3550000 cmp r5, #0
83fc: 0a00000d beq 8438 <rtems_iterate_over_all_threads+0x5c>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
8400: e1d521b0 ldrh r2, [r5, #16]
8404: e3520000 cmp r2, #0
8408: 0a00000a beq 8438 <rtems_iterate_over_all_threads+0x5c>
840c: e3a04001 mov r4, #1
the_thread = (Thread_Control *)information->local_table[ i ];
8410: e595301c ldr r3, [r5, #28]
8414: e7930104 ldr r0, [r3, r4, lsl #2]
if ( !the_thread )
8418: e3500000 cmp r0, #0
841c: 0a000002 beq 842c <rtems_iterate_over_all_threads+0x50>
continue;
(*routine)(the_thread);
8420: e1a0e00f mov lr, pc
8424: e12fff16 bx r6
8428: e1d521b0 ldrh r2, [r5, #16]
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
842c: e2844001 add r4, r4, #1
8430: e1520004 cmp r2, r4
8434: 2afffff5 bcs 8410 <rtems_iterate_over_all_threads+0x34>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
8438: e1570008 cmp r7, r8
843c: 1affffeb bne 83f0 <rtems_iterate_over_all_threads+0x14>
8440: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0000c5c0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
c5c0: e92d4010 push {r4, lr}
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
c5c4: e2514000 subs r4, r1, #0
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
c5c8: e24dd014 sub sp, sp, #20
c5cc: e1a01000 mov r1, r0
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
c5d0: 03a00009 moveq r0, #9
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
c5d4: 0a000013 beq c628 <rtems_rate_monotonic_get_status+0x68>
c5d8: e28d2010 add r2, sp, #16
c5dc: e59f008c ldr r0, [pc, #140] ; c670 <rtems_rate_monotonic_get_status+0xb0>
c5e0: ebfff113 bl 8a34 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
c5e4: e59d2010 ldr r2, [sp, #16]
c5e8: e3520000 cmp r2, #0
c5ec: e1a03000 mov r3, r0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
c5f0: 13a00004 movne r0, #4
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
c5f4: 1a00000b bne c628 <rtems_rate_monotonic_get_status+0x68>
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
c5f8: e5932040 ldr r2, [r3, #64] ; 0x40
status->state = the_period->state;
c5fc: e5933038 ldr r3, [r3, #56] ; 0x38
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
c600: e5922008 ldr r2, [r2, #8]
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
c604: e3530000 cmp r3, #0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
c608: e884000c stm r4, {r2, r3}
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
c60c: 1a000007 bne c630 <rtems_rate_monotonic_get_status+0x70>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
c610: e5843008 str r3, [r4, #8]
c614: e584300c str r3, [r4, #12]
_Timespec_Set_to_zero( &status->executed_since_last_period );
c618: e5843010 str r3, [r4, #16]
c61c: e5843014 str r3, [r4, #20]
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
c620: ebfff347 bl 9344 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
c624: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
c628: e28dd014 add sp, sp, #20
c62c: e8bd8010 pop {r4, pc}
} else {
/*
* Grab the current status.
*/
valid_status =
c630: e1a0100d mov r1, sp
c634: e28d2008 add r2, sp, #8
c638: ebffe7b4 bl 6510 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
c63c: e3500000 cmp r0, #0
c640: 0a000007 beq c664 <rtems_rate_monotonic_get_status+0xa4>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
c644: e89d000c ldm sp, {r2, r3}
c648: e5842008 str r2, [r4, #8]
c64c: e584300c str r3, [r4, #12]
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
c650: e28d3008 add r3, sp, #8
c654: e893000c ldm r3, {r2, r3}
c658: e5842010 str r2, [r4, #16]
c65c: e5843014 str r3, [r4, #20]
c660: eaffffee b c620 <rtems_rate_monotonic_get_status+0x60>
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
c664: ebfff336 bl 9344 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
c668: e3a0000b mov r0, #11 <== NOT EXECUTED
c66c: eaffffed b c628 <rtems_rate_monotonic_get_status+0x68> <== NOT EXECUTED
0000c698 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
c698: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
c69c: e2525000 subs r5, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
c6a0: e1a04000 mov r4, r0
c6a4: e1a06001 mov r6, r1
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
c6a8: 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 )
c6ac: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
c6b0: e59f9148 ldr r9, [pc, #328] ; c800 <rtems_task_mode+0x168>
c6b4: e5997004 ldr r7, [r9, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
c6b8: e5d7a074 ldrb sl, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
c6bc: e5978100 ldr r8, [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 )
c6c0: 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;
c6c4: e35a0000 cmp sl, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
c6c8: e5d8b008 ldrb fp, [r8, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
c6cc: 03a0ac01 moveq sl, #256 ; 0x100
c6d0: 13a0a000 movne sl, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
c6d4: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
c6d8: 138aac02 orrne sl, sl, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
c6dc: e35b0000 cmp fp, #0
c6e0: 03a0bb01 moveq fp, #1024 ; 0x400
c6e4: 13a0b000 movne fp, #0
old_mode |= _ISR_Get_level();
c6e8: ebfff1e9 bl 8e94 <_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;
c6ec: e18bb000 orr fp, fp, r0
old_mode |= _ISR_Get_level();
c6f0: e18ba00a orr sl, fp, sl
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
c6f4: e3160c01 tst r6, #256 ; 0x100
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
c6f8: e585a000 str sl, [r5]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
c6fc: 0a000003 beq c710 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
c700: e3140c01 tst r4, #256 ; 0x100
c704: 13a03000 movne r3, #0
c708: 03a03001 moveq r3, #1
c70c: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
c710: e3160c02 tst r6, #512 ; 0x200
c714: 1a000028 bne c7bc <rtems_task_mode+0x124>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
c718: e3160080 tst r6, #128 ; 0x80
c71c: 1a00002f bne c7e0 <rtems_task_mode+0x148>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
c720: e2166b01 ands r6, r6, #1024 ; 0x400
c724: 0a000012 beq c774 <rtems_task_mode+0xdc>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
c728: 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 ) {
c72c: e5d82008 ldrb r2, [r8, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
c730: 13a03000 movne r3, #0
c734: 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 ) {
c738: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
c73c: 03a06000 moveq r6, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
c740: 0a00000b beq c774 <rtems_task_mode+0xdc>
asr->is_enabled = is_asr_enabled;
c744: e5c83008 strb r3, [r8, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
c748: e10f3000 mrs r3, CPSR
c74c: e3832080 orr r2, r3, #128 ; 0x80
c750: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
c754: e5981018 ldr r1, [r8, #24]
information->signals_pending = information->signals_posted;
c758: e5982014 ldr r2, [r8, #20]
information->signals_posted = _signals;
c75c: e5881014 str r1, [r8, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
c760: e5882018 str r2, [r8, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
c764: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
c768: e5986014 ldr r6, [r8, #20]
c76c: e3560000 cmp r6, #0
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
c770: 13a06001 movne r6, #1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
c774: e59f3088 ldr r3, [pc, #136] ; c804 <rtems_task_mode+0x16c>
c778: e5933000 ldr r3, [r3]
c77c: e3530003 cmp r3, #3
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
c780: 13a00000 movne r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
c784: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc}
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
c788: e3560000 cmp r6, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
c78c: e5993004 ldr r3, [r9, #4]
if ( are_signals_pending ||
c790: 1a000015 bne c7ec <rtems_task_mode+0x154>
c794: e59f2064 ldr r2, [pc, #100] ; c800 <rtems_task_mode+0x168>
c798: e5922008 ldr r2, [r2, #8]
c79c: e1530002 cmp r3, r2
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
c7a0: 01a00006 moveq r0, r6
c7a4: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc}
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
c7a8: e5d33074 ldrb r3, [r3, #116] ; 0x74
c7ac: e3530000 cmp r3, #0
c7b0: 1a00000d bne c7ec <rtems_task_mode+0x154>
c7b4: e1a00006 mov r0, r6 <== NOT EXECUTED
}
c7b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
c7bc: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
c7c0: 159f3040 ldrne r3, [pc, #64] ; c808 <rtems_task_mode+0x170>
c7c4: 15933000 ldrne r3, [r3]
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
c7c8: 13a02001 movne r2, #1
c7cc: 1587207c strne r2, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
c7d0: 15873078 strne r3, [r7, #120] ; 0x78
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
c7d4: 0587307c streq r3, [r7, #124] ; 0x7c
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
c7d8: e3160080 tst r6, #128 ; 0x80
c7dc: 0affffcf beq c720 <rtems_task_mode+0x88>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
c7e0: e2040080 and r0, r4, #128 ; 0x80
c7e4: ebfff1a5 bl 8e80 <_CPU_ISR_Set_level>
c7e8: eaffffcc b c720 <rtems_task_mode+0x88>
_Thread_Dispatch_necessary = true;
c7ec: e3a03001 mov r3, #1
c7f0: e5c93010 strb r3, [r9, #16]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
c7f4: ebffeb70 bl 75bc <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
c7f8: e3a00000 mov r0, #0
c7fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}