RTEMS 4.11Annotated Report
Fri Oct 8 22:40:26 2010
a00169d4 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a00169d4: 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
)
{
a00169d8: 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 ) {
a00169dc: 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
)
{
a00169e0: e1a07000 mov r7, r0
a00169e4: e1a05002 mov r5, r2
a00169e8: e1a08001 mov r8, r1
a00169ec: 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 ) {
a00169f0: 3a000013 bcc a0016a44 <_CORE_message_queue_Broadcast+0x70>
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
a00169f4: e5906048 ldr r6, [r0, #72] ; 0x48
a00169f8: e3560000 cmp r6, #0
a00169fc: 0a000009 beq a0016a28 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a0016a00: e3a00000 mov r0, #0
a0016a04: e58a0000 str r0, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0016a08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0016a0c: e594002c ldr r0, [r4, #44] ; 0x2c
a0016a10: e1a01008 mov r1, r8
a0016a14: e1a02005 mov r2, r5
a0016a18: eb002077 bl a001ebfc <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016a1c: e5943028 ldr r3, [r4, #40] ; 0x28
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
a0016a20: e2866001 add r6, r6, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016a24: 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 =
a0016a28: e1a00007 mov r0, r7
a0016a2c: eb000a1e bl a00192ac <_Thread_queue_Dequeue>
a0016a30: e2504000 subs r4, r0, #0
a0016a34: 1afffff4 bne a0016a0c <_CORE_message_queue_Broadcast+0x38>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
a0016a38: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0016a3c: e1a00004 mov r0, r4
a0016a40: 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;
a0016a44: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0016a48: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000a9fc <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000a9fc: e59f2160 ldr r2, [pc, #352] ; a000ab64 <_CORE_mutex_Seize_interrupt_trylock+0x168>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000aa00: 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
)
{
a000aa04: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000aa08: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a000aa0c: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000aa10: e15c0000 cmp ip, r0
a000aa14: 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;
a000aa18: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000aa1c: 0a00000e beq a000aa5c <_CORE_mutex_Seize_interrupt_trylock+0x60>
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a000aa20: e593c048 ldr ip, [r3, #72] ; 0x48
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a000aa24: e5925008 ldr r5, [r2, #8]
the_mutex->nest_count = 1;
a000aa28: e3a04001 mov r4, #1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000aa2c: 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;
a000aa30: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
a000aa34: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
a000aa38: e5835060 str r5, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a000aa3c: e5834054 str r4, [r3, #84] ; 0x54
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000aa40: 0a00000a beq a000aa70 <_CORE_mutex_Seize_interrupt_trylock+0x74>
a000aa44: e35c0003 cmp ip, #3
a000aa48: 0a000019 beq a000aab4 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
a000aa4c: e5913000 ldr r3, [r1]
a000aa50: e129f003 msr CPSR_fc, r3
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
a000aa54: e3a00000 mov r0, #0
a000aa58: 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 ) ) {
a000aa5c: e593005c ldr r0, [r3, #92] ; 0x5c
a000aa60: e1520000 cmp r2, r0
a000aa64: 0a000008 beq a000aa8c <_CORE_mutex_Seize_interrupt_trylock+0x90>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a000aa68: e3a00001 mov r0, #1
a000aa6c: 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++;
a000aa70: e592301c ldr r3, [r2, #28]
a000aa74: e2833001 add r3, r3, #1
a000aa78: e582301c str r3, [r2, #28]
a000aa7c: e5913000 ldr r3, [r1]
a000aa80: e129f003 msr CPSR_fc, r3
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
a000aa84: e3a00000 mov r0, #0
a000aa88: 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 ) {
a000aa8c: e5930040 ldr r0, [r3, #64] ; 0x40
a000aa90: e3500000 cmp r0, #0
a000aa94: 1a000017 bne a000aaf8 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a000aa98: e5932054 ldr r2, [r3, #84] ; 0x54
a000aa9c: e2822001 add r2, r2, #1
a000aaa0: e5832054 str r2, [r3, #84] ; 0x54
a000aaa4: e5913000 ldr r3, [r1]
a000aaa8: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a000aaac: e3a00000 mov r0, #0
a000aab0: 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++;
a000aab4: e592c01c ldr ip, [r2, #28]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a000aab8: e593604c ldr r6, [r3, #76] ; 0x4c
current = executing->current_priority;
a000aabc: e5925014 ldr r5, [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++;
a000aac0: e08c7004 add r7, ip, r4
a000aac4: e582701c str r7, [r2, #28]
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
a000aac8: e1560005 cmp r6, r5
a000aacc: 0a000020 beq a000ab54 <_CORE_mutex_Seize_interrupt_trylock+0x158>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
a000aad0: 3a000012 bcc a000ab20 <_CORE_mutex_Seize_interrupt_trylock+0x124>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a000aad4: e3a05006 mov r5, #6
a000aad8: e5825034 str r5, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000aadc: e5834050 str r4, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a000aae0: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a000aae4: e582c01c str ip, [r2, #28]
a000aae8: e5913000 ldr r3, [r1]
a000aaec: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a000aaf0: e3a00000 mov r0, #0
a000aaf4: 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 ) {
a000aaf8: e3500001 cmp r0, #1
a000aafc: 0a000001 beq a000ab08 <_CORE_mutex_Seize_interrupt_trylock+0x10c>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a000ab00: e3a00001 mov r0, #1
a000ab04: 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;
a000ab08: e3a03002 mov r3, #2 <== NOT EXECUTED
a000ab0c: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
a000ab10: e5913000 ldr r3, [r1] <== NOT EXECUTED
a000ab14: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( *level_p );
return 0;
a000ab18: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ab1c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000ab20: e59f2040 ldr r2, [pc, #64] ; a000ab68 <_CORE_mutex_Seize_interrupt_trylock+0x16c>
a000ab24: e5920000 ldr r0, [r2]
a000ab28: e2800001 add r0, r0, #1
a000ab2c: e5820000 str r0, [r2]
a000ab30: e5912000 ldr r2, [r1]
a000ab34: e129f002 msr CPSR_fc, r2
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a000ab38: e3a02000 mov r2, #0
a000ab3c: e593005c ldr r0, [r3, #92] ; 0x5c
a000ab40: e593104c ldr r1, [r3, #76] ; 0x4c
a000ab44: ebfff160 bl a00070cc <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a000ab48: ebfff2be bl a0007648 <_Thread_Enable_dispatch>
return 0;
a000ab4c: e3a00000 mov r0, #0
a000ab50: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000ab54: e5913000 ldr r3, [r1]
a000ab58: e129f003 msr CPSR_fc, r3
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
return 0;
a000ab5c: e3a00000 mov r0, #0
a000ab60: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000a99c <_Chain_Initialize>:
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000a99c: e3520000 cmp r2, #0
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
a000a9a0: e3a0c000 mov ip, #0
next = starting_address;
while ( count-- ) {
a000a9a4: 12422001 subne r2, r2, #1
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
a000a9a8: e92d0070 push {r4, r5, r6}
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
a000a9ac: e580c004 str ip, [r0, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
a000a9b0: e1a04000 mov r4, r0
next = starting_address;
while ( count-- ) {
a000a9b4: 11a06002 movne r6, r2
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
a000a9b8: 11a0c001 movne ip, r1
while ( count-- ) {
a000a9bc: 1a000003 bne a000a9d0 <_Chain_Initialize+0x34>
a000a9c0: ea000008 b a000a9e8 <_Chain_Initialize+0x4c> <== NOT EXECUTED
a000a9c4: e1a0400c mov r4, ip
a000a9c8: e2422001 sub r2, r2, #1
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
a000a9cc: e1a0c005 mov ip, r5
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000a9d0: e3520000 cmp r2, #0
current->next = next;
a000a9d4: e584c000 str ip, [r4]
next->previous = current;
a000a9d8: e58c4004 str r4, [ip, #4]
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
a000a9dc: e08c5003 add r5, ip, r3
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000a9e0: 1afffff7 bne a000a9c4 <_Chain_Initialize+0x28>
a000a9e4: e0241396 mla r4, r6, r3, r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000a9e8: 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 );
a000a9ec: e5843000 str r3, [r4]
the_chain->last = current;
a000a9f0: e5804008 str r4, [r0, #8]
}
a000a9f4: e8bd0070 pop {r4, r5, r6}
a000a9f8: e12fff1e bx lr
a000abdc <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000abdc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000abe0: 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;
a000abe4: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000abe8: e24dd01c sub sp, sp, #28
a000abec: 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 ) {
a000abf0: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000abf4: 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 ) {
a000abf8: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000abfc: 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;
a000ac00: 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 ) {
a000ac04: 2a000078 bcs a000adec <_Heap_Allocate_aligned_with_boundary+0x210>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a000ac08: e3530000 cmp r3, #0
a000ac0c: 1a000074 bne a000ade4 <_Heap_Allocate_aligned_with_boundary+0x208>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000ac10: 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 ) {
a000ac14: e1570009 cmp r7, r9
a000ac18: 0a000073 beq a000adec <_Heap_Allocate_aligned_with_boundary+0x210>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000ac1c: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000ac20: e2651004 rsb r1, r5, #4
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000ac24: e3a06001 mov r6, #1
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000ac28: e2833007 add r3, r3, #7
a000ac2c: e58d3010 str r3, [sp, #16]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000ac30: e58d1014 str r1, [sp, #20]
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
a000ac34: e599a004 ldr sl, [r9, #4]
a000ac38: e59d2000 ldr r2, [sp]
a000ac3c: e152000a cmp r2, sl
a000ac40: 2a00004e bcs a000ad80 <_Heap_Allocate_aligned_with_boundary+0x1a4>
if ( alignment == 0 ) {
a000ac44: 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;
a000ac48: 02894008 addeq r4, r9, #8
a000ac4c: 0a000051 beq a000ad98 <_Heap_Allocate_aligned_with_boundary+0x1bc>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000ac50: 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;
a000ac54: 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;
a000ac58: 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;
a000ac5c: 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;
a000ac60: 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;
a000ac64: e081400a add r4, r1, sl
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000ac68: 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;
a000ac6c: e0633002 rsb r3, r3, r2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ac70: 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
a000ac74: e083a00a add sl, r3, sl
a000ac78: 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;
a000ac7c: e2893008 add r3, r9, #8
a000ac80: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ac84: eb00156c bl a001023c <__umodsi3>
a000ac88: 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 ) {
a000ac8c: e15a0004 cmp sl, r4
a000ac90: 2a000003 bcs a000aca4 <_Heap_Allocate_aligned_with_boundary+0xc8>
a000ac94: e1a0000a mov r0, sl
a000ac98: e1a01008 mov r1, r8
a000ac9c: eb001566 bl a001023c <__umodsi3>
a000aca0: e060400a rsb r4, r0, sl
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a000aca4: e35b0000 cmp fp, #0
a000aca8: 0a000026 beq a000ad48 <_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;
a000acac: e084a005 add sl, r4, r5
a000acb0: e1a0000a mov r0, sl
a000acb4: e1a0100b mov r1, fp
a000acb8: eb00155f bl a001023c <__umodsi3>
a000acbc: 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 ) {
a000acc0: e15a0000 cmp sl, r0
a000acc4: 93a0a000 movls sl, #0
a000acc8: 83a0a001 movhi sl, #1
a000accc: e1540000 cmp r4, r0
a000acd0: 23a0a000 movcs sl, #0
a000acd4: e35a0000 cmp sl, #0
a000acd8: 0a00001a beq a000ad48 <_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;
a000acdc: e59d1008 ldr r1, [sp, #8]
a000ace0: 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 ) {
a000ace4: e1530000 cmp r3, r0
a000ace8: 958d9018 strls r9, [sp, #24]
a000acec: 91a09003 movls r9, r3
a000acf0: 9a000002 bls a000ad00 <_Heap_Allocate_aligned_with_boundary+0x124>
a000acf4: ea000021 b a000ad80 <_Heap_Allocate_aligned_with_boundary+0x1a4>
a000acf8: e1590000 cmp r9, r0
a000acfc: 8a00003c bhi a000adf4 <_Heap_Allocate_aligned_with_boundary+0x218>
return 0;
}
alloc_begin = boundary_line - alloc_size;
a000ad00: e0654000 rsb r4, r5, r0
a000ad04: e1a01008 mov r1, r8
a000ad08: e1a00004 mov r0, r4
a000ad0c: eb00154a bl a001023c <__umodsi3>
a000ad10: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a000ad14: e084a005 add sl, r4, r5
a000ad18: e1a0000a mov r0, sl
a000ad1c: e1a0100b mov r1, fp
a000ad20: eb001545 bl a001023c <__umodsi3>
a000ad24: 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 ) {
a000ad28: e15a0000 cmp sl, r0
a000ad2c: 93a0a000 movls sl, #0
a000ad30: 83a0a001 movhi sl, #1
a000ad34: e1540000 cmp r4, r0
a000ad38: 23a0a000 movcs sl, #0
a000ad3c: e35a0000 cmp sl, #0
a000ad40: 1affffec bne a000acf8 <_Heap_Allocate_aligned_with_boundary+0x11c>
a000ad44: 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 ) {
a000ad48: e59d2008 ldr r2, [sp, #8]
a000ad4c: e1520004 cmp r2, r4
a000ad50: 8a00000a bhi a000ad80 <_Heap_Allocate_aligned_with_boundary+0x1a4>
a000ad54: e59d100c ldr r1, [sp, #12]
a000ad58: e1a00004 mov r0, r4
a000ad5c: eb001536 bl a001023c <__umodsi3>
a000ad60: e3e0a007 mvn sl, #7
a000ad64: e069a00a rsb sl, r9, sl
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 ) {
a000ad68: e59d1004 ldr r1, [sp, #4]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000ad6c: e08aa004 add sl, sl, r4
a000ad70: e060300a rsb r3, r0, sl
a000ad74: e15a0000 cmp sl, r0
a000ad78: 11510003 cmpne r1, r3
a000ad7c: 9a000005 bls a000ad98 <_Heap_Allocate_aligned_with_boundary+0x1bc>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
a000ad80: e5999008 ldr r9, [r9, #8]
a000ad84: 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 ) {
a000ad88: e1570009 cmp r7, r9
a000ad8c: 0a00001d beq a000ae08 <_Heap_Allocate_aligned_with_boundary+0x22c>
a000ad90: e1a06003 mov r6, r3
a000ad94: eaffffa6 b a000ac34 <_Heap_Allocate_aligned_with_boundary+0x58>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
a000ad98: e3540000 cmp r4, #0
a000ad9c: 0afffff7 beq a000ad80 <_Heap_Allocate_aligned_with_boundary+0x1a4>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000ada0: e5972048 ldr r2, [r7, #72] ; 0x48
stats->searches += search_count;
a000ada4: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000ada8: e1a00007 mov r0, r7
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000adac: e2822001 add r2, r2, #1
stats->searches += search_count;
a000adb0: 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;
a000adb4: e5872048 str r2, [r7, #72] ; 0x48
stats->searches += search_count;
a000adb8: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000adbc: e1a01009 mov r1, r9
a000adc0: e1a02004 mov r2, r4
a000adc4: e1a03005 mov r3, r5
a000adc8: ebffee36 bl a00066a8 <_Heap_Block_allocate>
a000adcc: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000add0: e5973044 ldr r3, [r7, #68] ; 0x44
a000add4: e1530006 cmp r3, r6
stats->max_search = search_count;
a000add8: 35876044 strcc r6, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
a000addc: e28dd01c add sp, sp, #28
a000ade0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
a000ade4: e1550003 cmp r5, r3
a000ade8: 9a000008 bls a000ae10 <_Heap_Allocate_aligned_with_boundary+0x234>
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000adec: e3a00000 mov r0, #0
a000adf0: eafffff9 b a000addc <_Heap_Allocate_aligned_with_boundary+0x200>
a000adf4: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
a000adf8: e2863001 add r3, r6, #1 <== NOT EXECUTED
a000adfc: 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 ) {
a000ae00: e1570009 cmp r7, r9 <== NOT EXECUTED
a000ae04: 1affffe1 bne a000ad90 <_Heap_Allocate_aligned_with_boundary+0x1b4><== NOT EXECUTED
a000ae08: e3a00000 mov r0, #0
a000ae0c: eaffffef b a000add0 <_Heap_Allocate_aligned_with_boundary+0x1f4>
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
a000ae10: e3580000 cmp r8, #0
a000ae14: 01a08002 moveq r8, r2
a000ae18: eaffff7c b a000ac10 <_Heap_Allocate_aligned_with_boundary+0x34>
a000ae1c <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
a000ae1c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000ae20: e1a04000 mov r4, r0
a000ae24: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ae28: e1a00001 mov r0, r1
a000ae2c: e5941010 ldr r1, [r4, #16]
a000ae30: eb001501 bl a001023c <__umodsi3>
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
a000ae34: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ae38: e2455008 sub r5, r5, #8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000ae3c: 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;
a000ae40: e1550003 cmp r5, r3
a000ae44: 3a000030 bcc a000af0c <_Heap_Free+0xf0>
a000ae48: e5941024 ldr r1, [r4, #36] ; 0x24
a000ae4c: e1550001 cmp r5, r1
a000ae50: 8a00002d bhi a000af0c <_Heap_Free+0xf0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ae54: 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;
a000ae58: 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);
a000ae5c: 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;
a000ae60: e1530002 cmp r3, r2
a000ae64: 8a000028 bhi a000af0c <_Heap_Free+0xf0>
a000ae68: e1510002 cmp r1, r2
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000ae6c: 33a00000 movcc r0, #0
a000ae70: 3a000027 bcc a000af14 <_Heap_Free+0xf8>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ae74: 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 ) ) {
a000ae78: e2170001 ands r0, r7, #1
a000ae7c: 0a000024 beq a000af14 <_Heap_Free+0xf8>
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 ));
a000ae80: 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;
a000ae84: e3c77001 bic r7, r7, #1
a000ae88: 03a08000 moveq r8, #0
a000ae8c: 0a000004 beq a000aea4 <_Heap_Free+0x88>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ae90: 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;
a000ae94: e5900004 ldr r0, [r0, #4]
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
a000ae98: e3100001 tst r0, #1
a000ae9c: 13a08000 movne r8, #0
a000aea0: 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 ) ) {
a000aea4: e21c0001 ands r0, ip, #1
a000aea8: 1a00001a bne a000af18 <_Heap_Free+0xfc>
uintptr_t const prev_size = block->prev_size;
a000aeac: 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);
a000aeb0: 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;
a000aeb4: e153000a cmp r3, sl
a000aeb8: 8a000015 bhi a000af14 <_Heap_Free+0xf8>
a000aebc: e151000a cmp r1, sl
a000aec0: 3a000013 bcc a000af14 <_Heap_Free+0xf8>
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;
a000aec4: 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) ) {
a000aec8: e2100001 ands r0, r0, #1
a000aecc: 0a000010 beq a000af14 <_Heap_Free+0xf8>
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
a000aed0: e3580000 cmp r8, #0
a000aed4: 0a000038 beq a000afbc <_Heap_Free+0x1a0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000aed8: e5940038 ldr r0, [r4, #56] ; 0x38
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000aedc: 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;
a000aee0: e0867007 add r7, r6, r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000aee4: e592200c ldr r2, [r2, #12]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
a000aee8: e087c00c add ip, r7, ip
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000aeec: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000aef0: 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;
a000aef4: e5823008 str r3, [r2, #8]
next->prev = prev;
a000aef8: 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;
a000aefc: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000af00: 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;
a000af04: e78ac00c str ip, [sl, ip]
a000af08: ea00000e b a000af48 <_Heap_Free+0x12c>
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000af0c: e3a00000 mov r0, #0
a000af10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000af14: 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 */
a000af18: e3580000 cmp r8, #0
a000af1c: 0a000014 beq a000af74 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000af20: e5923008 ldr r3, [r2, #8]
a000af24: e592200c ldr r2, [r2, #12]
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;
a000af28: e0877006 add r7, r7, r6
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000af2c: e3871001 orr r1, r7, #1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
a000af30: e5853008 str r3, [r5, #8]
new_block->prev = prev;
a000af34: e585200c str r2, [r5, #12]
next->prev = new_block;
prev->next = new_block;
a000af38: e5825008 str r5, [r2, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a000af3c: e583500c str r5, [r3, #12]
a000af40: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
a000af44: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000af48: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
a000af4c: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a000af50: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000af54: e2422001 sub r2, r2, #1
++stats->frees;
a000af58: e2833001 add r3, r3, #1
stats->free_size += block_size;
a000af5c: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000af60: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
a000af64: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a000af68: e5846030 str r6, [r4, #48] ; 0x30
return( true );
a000af6c: e3a00001 mov r0, #1
a000af70: 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;
a000af74: e3863001 orr r3, r6, #1
a000af78: e5853004 str r3, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a000af7c: e5943038 ldr r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
a000af80: e594c03c ldr ip, [r4, #60] ; 0x3c
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000af84: 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;
a000af88: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a000af8c: 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;
a000af90: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
a000af94: e153000c cmp r3, ip
new_block->next = next;
a000af98: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
a000af9c: 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;
a000afa0: e5820004 str r0, [r2, #4]
block_before->next = new_block;
next->prev = new_block;
a000afa4: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
a000afa8: 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;
a000afac: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
a000afb0: e5843038 str r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
a000afb4: 8584303c strhi r3, [r4, #60] ; 0x3c
a000afb8: eaffffe2 b a000af48 <_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;
a000afbc: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000afc0: e38c3001 orr r3, ip, #1
a000afc4: e58a3004 str r3, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000afc8: e5923004 ldr r3, [r2, #4]
next_block->prev_size = size;
a000afcc: e785c006 str ip, [r5, r6]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000afd0: e3c33001 bic r3, r3, #1
a000afd4: e5823004 str r3, [r2, #4]
a000afd8: eaffffda b a000af48 <_Heap_Free+0x12c>
a0011ef4 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
a0011ef4: e92d40f0 push {r4, r5, r6, r7, lr}
a0011ef8: e1a04000 mov r4, r0
a0011efc: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0011f00: e1a00001 mov r0, r1
a0011f04: e5941010 ldr r1, [r4, #16]
a0011f08: e1a07002 mov r7, r2
a0011f0c: ebfff8ca bl a001023c <__umodsi3>
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
a0011f10: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0011f14: e2456008 sub r6, r5, #8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a0011f18: 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;
a0011f1c: e1500003 cmp r0, r3
a0011f20: 3a000012 bcc a0011f70 <_Heap_Size_of_alloc_area+0x7c>
a0011f24: e5942024 ldr r2, [r4, #36] ; 0x24
a0011f28: e1500002 cmp r0, r2
a0011f2c: 8a00000f bhi a0011f70 <_Heap_Size_of_alloc_area+0x7c>
- 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;
a0011f30: e5906004 ldr r6, [r0, #4]
a0011f34: 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);
a0011f38: 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;
a0011f3c: e1530006 cmp r3, r6
a0011f40: 8a00000a bhi a0011f70 <_Heap_Size_of_alloc_area+0x7c>
a0011f44: e1520006 cmp r2, r6
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0011f48: 33a00000 movcc r0, #0
a0011f4c: 3a000009 bcc a0011f78 <_Heap_Size_of_alloc_area+0x84>
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;
a0011f50: 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 )
a0011f54: e2100001 ands r0, r0, #1
a0011f58: 0a000006 beq a0011f78 <_Heap_Size_of_alloc_area+0x84>
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
a0011f5c: e2655004 rsb r5, r5, #4
a0011f60: e0856006 add r6, r5, r6
a0011f64: e5876000 str r6, [r7]
return true;
a0011f68: e3a00001 mov r0, #1
a0011f6c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0011f70: e3a00000 mov r0, #0
a0011f74: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
a0011f78: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000740c <_Heap_Walk>:
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() ) ) {
a000740c: e59f3578 ldr r3, [pc, #1400] ; a000798c <_Heap_Walk+0x580>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0007410: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
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;
a0007414: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0007418: 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;
a000741c: e59f256c ldr r2, [pc, #1388] ; a0007990 <_Heap_Walk+0x584>
a0007420: e59f956c ldr r9, [pc, #1388] ; a0007994 <_Heap_Walk+0x588>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0007424: e1a0a001 mov sl, r1
uintptr_t const page_size = heap->page_size;
a0007428: e5901010 ldr r1, [r0, #16]
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;
a000742c: 11a09002 movne r9, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0007430: 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;
a0007434: e5902014 ldr r2, [r0, #20]
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a0007438: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000743c: e24dd038 sub sp, sp, #56 ; 0x38
a0007440: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
a0007444: e58d1024 str r1, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
a0007448: e58d2028 str r2, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
a000744c: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a0007450: 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() ) ) {
a0007454: 0a000002 beq a0007464 <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
a0007458: e3a00001 mov r0, #1
}
a000745c: e28dd038 add sp, sp, #56 ; 0x38
a0007460: 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)(
a0007464: e594101c ldr r1, [r4, #28]
a0007468: e5900018 ldr r0, [r0, #24]
a000746c: e5942008 ldr r2, [r4, #8]
a0007470: e594300c ldr r3, [r4, #12]
a0007474: e59dc028 ldr ip, [sp, #40] ; 0x28
a0007478: e58d1008 str r1, [sp, #8]
a000747c: e59d102c ldr r1, [sp, #44] ; 0x2c
a0007480: e58d0004 str r0, [sp, #4]
a0007484: e58d2014 str r2, [sp, #20]
a0007488: e58d1010 str r1, [sp, #16]
a000748c: e58d3018 str r3, [sp, #24]
a0007490: e59f2500 ldr r2, [pc, #1280] ; a0007998 <_Heap_Walk+0x58c>
a0007494: e58dc000 str ip, [sp]
a0007498: e58d800c str r8, [sp, #12]
a000749c: e1a0000a mov r0, sl
a00074a0: e3a01000 mov r1, #0
a00074a4: e59d3024 ldr r3, [sp, #36] ; 0x24
a00074a8: e12fff39 blx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a00074ac: e59d2024 ldr r2, [sp, #36] ; 0x24
a00074b0: e3520000 cmp r2, #0
a00074b4: 0a000024 beq a000754c <_Heap_Walk+0x140>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a00074b8: e59d3024 ldr r3, [sp, #36] ; 0x24
a00074bc: e2135003 ands r5, r3, #3
a00074c0: 1a000027 bne a0007564 <_Heap_Walk+0x158>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a00074c4: e59d0028 ldr r0, [sp, #40] ; 0x28
a00074c8: e59d1024 ldr r1, [sp, #36] ; 0x24
a00074cc: ebffe566 bl a0000a6c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a00074d0: e250b000 subs fp, r0, #0
a00074d4: 1a000028 bne a000757c <_Heap_Walk+0x170>
a00074d8: e2880008 add r0, r8, #8
a00074dc: e59d1024 ldr r1, [sp, #36] ; 0x24
a00074e0: ebffe561 bl a0000a6c <__umodsi3>
);
return false;
}
if (
a00074e4: e2506000 subs r6, r0, #0
a00074e8: 1a00002a bne a0007598 <_Heap_Walk+0x18c>
block = next_block;
} while ( block != first_block );
return true;
}
a00074ec: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a00074f0: e21b5001 ands r5, fp, #1
a00074f4: 0a0000bf beq a00077f8 <_Heap_Walk+0x3ec>
- 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;
a00074f8: e59dc02c ldr ip, [sp, #44] ; 0x2c
a00074fc: e59c3004 ldr r3, [ip, #4]
a0007500: 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);
a0007504: 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;
a0007508: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a000750c: e2155001 ands r5, r5, #1
a0007510: 0a000007 beq a0007534 <_Heap_Walk+0x128>
);
return false;
}
if (
a0007514: e1580003 cmp r8, r3
a0007518: 0a000025 beq a00075b4 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a000751c: e1a0000a mov r0, sl <== NOT EXECUTED
a0007520: e3a01001 mov r1, #1 <== NOT EXECUTED
a0007524: e59f2470 ldr r2, [pc, #1136] ; a000799c <_Heap_Walk+0x590> <== NOT EXECUTED
a0007528: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000752c: e1a00006 mov r0, r6 <== NOT EXECUTED
a0007530: eaffffc9 b a000745c <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
a0007534: e1a0000a mov r0, sl
a0007538: e3a01001 mov r1, #1
a000753c: e59f245c ldr r2, [pc, #1116] ; a00079a0 <_Heap_Walk+0x594>
a0007540: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007544: e1a00005 mov r0, r5
a0007548: eaffffc3 b a000745c <_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" );
a000754c: e1a0000a mov r0, sl
a0007550: e3a01001 mov r1, #1
a0007554: e59f2448 ldr r2, [pc, #1096] ; a00079a4 <_Heap_Walk+0x598>
a0007558: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000755c: e59d0024 ldr r0, [sp, #36] ; 0x24
a0007560: eaffffbd b a000745c <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
a0007564: e1a0000a mov r0, sl
a0007568: e3a01001 mov r1, #1
a000756c: e59f2434 ldr r2, [pc, #1076] ; a00079a8 <_Heap_Walk+0x59c>
a0007570: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007574: e3a00000 mov r0, #0
a0007578: eaffffb7 b a000745c <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
a000757c: e1a0000a mov r0, sl
a0007580: e3a01001 mov r1, #1
a0007584: e59f2420 ldr r2, [pc, #1056] ; a00079ac <_Heap_Walk+0x5a0>
a0007588: e59d3028 ldr r3, [sp, #40] ; 0x28
a000758c: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007590: e1a00005 mov r0, r5
a0007594: eaffffb0 b a000745c <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a0007598: e1a0000a mov r0, sl
a000759c: e3a01001 mov r1, #1
a00075a0: e59f2408 ldr r2, [pc, #1032] ; a00079b0 <_Heap_Walk+0x5a4>
a00075a4: e1a03008 mov r3, r8
a00075a8: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00075ac: e1a0000b mov r0, fp
a00075b0: eaffffa9 b a000745c <_Heap_Walk+0x50>
block = next_block;
} while ( block != first_block );
return true;
}
a00075b4: e5945008 ldr r5, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a00075b8: 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 ) {
a00075bc: e1540005 cmp r4, r5
a00075c0: 05943020 ldreq r3, [r4, #32]
a00075c4: 0a00000c beq a00075fc <_Heap_Walk+0x1f0>
block = next_block;
} while ( block != first_block );
return true;
}
a00075c8: 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;
a00075cc: e1530005 cmp r3, r5
a00075d0: 9a00008e bls a0007810 <_Heap_Walk+0x404>
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)(
a00075d4: e1a0000a mov r0, sl
a00075d8: e3a01001 mov r1, #1
a00075dc: e59f23d0 ldr r2, [pc, #976] ; a00079b4 <_Heap_Walk+0x5a8>
a00075e0: e1a03005 mov r3, r5
a00075e4: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00075e8: e3a00000 mov r0, #0
a00075ec: eaffff9a b a000745c <_Heap_Walk+0x50>
a00075f0: e1a03008 mov r3, r8
a00075f4: e59db034 ldr fp, [sp, #52] ; 0x34
a00075f8: e59d8030 ldr r8, [sp, #48] ; 0x30
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a00075fc: 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;
a0007600: 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);
a0007604: 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;
a0007608: e1530005 cmp r3, r5
a000760c: 9a000007 bls a0007630 <_Heap_Walk+0x224>
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)(
a0007610: e1a0000a mov r0, sl
a0007614: e58d5000 str r5, [sp]
a0007618: e3a01001 mov r1, #1
a000761c: e59f2394 ldr r2, [pc, #916] ; a00079b8 <_Heap_Walk+0x5ac>
a0007620: e1a03006 mov r3, r6
a0007624: e12fff39 blx r9
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
a0007628: e3a00000 mov r0, #0
a000762c: eaffff8a b a000745c <_Heap_Walk+0x50>
a0007630: e5943024 ldr r3, [r4, #36] ; 0x24
a0007634: e1530005 cmp r3, r5
a0007638: 3afffff4 bcc a0007610 <_Heap_Walk+0x204>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000763c: e59d1024 ldr r1, [sp, #36] ; 0x24
a0007640: e1a00007 mov r0, r7
a0007644: ebffe508 bl a0000a6c <__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;
a0007648: e59d102c ldr r1, [sp, #44] ; 0x2c
a000764c: e0563001 subs r3, r6, r1
a0007650: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a0007654: e3500000 cmp r0, #0
a0007658: 0a000001 beq a0007664 <_Heap_Walk+0x258>
a000765c: e3530000 cmp r3, #0
a0007660: 1a0000a2 bne a00078f0 <_Heap_Walk+0x4e4>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a0007664: e59d2028 ldr r2, [sp, #40] ; 0x28
a0007668: e1520007 cmp r2, r7
a000766c: 9a000001 bls a0007678 <_Heap_Walk+0x26c>
a0007670: e3530000 cmp r3, #0
a0007674: 1a0000a5 bne a0007910 <_Heap_Walk+0x504>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a0007678: e1560005 cmp r6, r5
a000767c: 3a000001 bcc a0007688 <_Heap_Walk+0x27c>
a0007680: e3530000 cmp r3, #0
a0007684: 1a0000aa bne a0007934 <_Heap_Walk+0x528>
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;
a0007688: e5953004 ldr r3, [r5, #4]
a000768c: e20bb001 and fp, fp, #1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a0007690: e3130001 tst r3, #1
a0007694: 0a000016 beq a00076f4 <_Heap_Walk+0x2e8>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a0007698: e35b0000 cmp fp, #0
a000769c: 0a00000b beq a00076d0 <_Heap_Walk+0x2c4>
(*printer)(
a00076a0: e58d7000 str r7, [sp]
a00076a4: e1a0000a mov r0, sl
a00076a8: e3a01000 mov r1, #0
a00076ac: e59f2308 ldr r2, [pc, #776] ; a00079bc <_Heap_Walk+0x5b0>
a00076b0: e1a03006 mov r3, r6
a00076b4: e12fff39 blx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a00076b8: e1580005 cmp r8, r5
a00076bc: 0affff65 beq a0007458 <_Heap_Walk+0x4c>
a00076c0: e595b004 ldr fp, [r5, #4]
a00076c4: e5943020 ldr r3, [r4, #32]
a00076c8: e1a06005 mov r6, r5
a00076cc: eaffffcb b a0007600 <_Heap_Walk+0x1f4>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a00076d0: e58d7000 str r7, [sp]
a00076d4: e5963000 ldr r3, [r6]
a00076d8: e1a0000a mov r0, sl
a00076dc: e1a0100b mov r1, fp
a00076e0: e58d3004 str r3, [sp, #4]
a00076e4: e59f22d4 ldr r2, [pc, #724] ; a00079c0 <_Heap_Walk+0x5b4>
a00076e8: e1a03006 mov r3, r6
a00076ec: e12fff39 blx r9
a00076f0: eafffff0 b a00076b8 <_Heap_Walk+0x2ac>
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 ?
a00076f4: 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)(
a00076f8: e5943008 ldr r3, [r4, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a00076fc: 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)(
a0007700: e1530002 cmp r3, r2
a0007704: 059f02b8 ldreq r0, [pc, #696] ; a00079c4 <_Heap_Walk+0x5b8>
a0007708: 0a000003 beq a000771c <_Heap_Walk+0x310>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a000770c: e59f32b4 ldr r3, [pc, #692] ; a00079c8 <_Heap_Walk+0x5bc>
a0007710: e1540002 cmp r4, r2
a0007714: e59f02b0 ldr r0, [pc, #688] ; a00079cc <_Heap_Walk+0x5c0>
a0007718: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a000771c: 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)(
a0007720: e1510003 cmp r1, r3
a0007724: 059f12a4 ldreq r1, [pc, #676] ; a00079d0 <_Heap_Walk+0x5c4>
a0007728: 0a000003 beq a000773c <_Heap_Walk+0x330>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
a000772c: e59fc2a0 ldr ip, [pc, #672] ; a00079d4 <_Heap_Walk+0x5c8>
a0007730: e1540003 cmp r4, r3
a0007734: e59f1290 ldr r1, [pc, #656] ; a00079cc <_Heap_Walk+0x5c0>
a0007738: 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)(
a000773c: e58d2004 str r2, [sp, #4]
a0007740: e58d0008 str r0, [sp, #8]
a0007744: e58d300c str r3, [sp, #12]
a0007748: e58d1010 str r1, [sp, #16]
a000774c: e1a03006 mov r3, r6
a0007750: e58d7000 str r7, [sp]
a0007754: e1a0000a mov r0, sl
a0007758: e3a01000 mov r1, #0
a000775c: e59f2274 ldr r2, [pc, #628] ; a00079d8 <_Heap_Walk+0x5cc>
a0007760: e12fff39 blx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a0007764: e5953000 ldr r3, [r5]
a0007768: e1570003 cmp r7, r3
a000776c: 1a000010 bne a00077b4 <_Heap_Walk+0x3a8>
);
return false;
}
if ( !prev_used ) {
a0007770: e35b0000 cmp fp, #0
a0007774: 0a000018 beq a00077dc <_Heap_Walk+0x3d0>
block = next_block;
} while ( block != first_block );
return true;
}
a0007778: 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 ) {
a000777c: e1540003 cmp r4, r3
a0007780: 0a000004 beq a0007798 <_Heap_Walk+0x38c>
if ( free_block == block ) {
a0007784: e1560003 cmp r6, r3
a0007788: 0affffca beq a00076b8 <_Heap_Walk+0x2ac>
return true;
}
free_block = free_block->next;
a000778c: 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 ) {
a0007790: e1540003 cmp r4, r3
a0007794: 1afffffa bne a0007784 <_Heap_Walk+0x378>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a0007798: e1a0000a mov r0, sl
a000779c: e3a01001 mov r1, #1
a00077a0: e59f2234 ldr r2, [pc, #564] ; a00079dc <_Heap_Walk+0x5d0>
a00077a4: e1a03006 mov r3, r6
a00077a8: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a00077ac: e3a00000 mov r0, #0
a00077b0: eaffff29 b a000745c <_Heap_Walk+0x50>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
a00077b4: e58d3004 str r3, [sp, #4]
a00077b8: e1a0000a mov r0, sl
a00077bc: e58d7000 str r7, [sp]
a00077c0: e58d5008 str r5, [sp, #8]
a00077c4: e3a01001 mov r1, #1
a00077c8: e59f2210 ldr r2, [pc, #528] ; a00079e0 <_Heap_Walk+0x5d4>
a00077cc: e1a03006 mov r3, r6
a00077d0: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a00077d4: e3a00000 mov r0, #0
a00077d8: eaffff1f b a000745c <_Heap_Walk+0x50>
return false;
}
if ( !prev_used ) {
(*printer)(
a00077dc: e1a0000a mov r0, sl
a00077e0: e3a01001 mov r1, #1
a00077e4: e59f21f8 ldr r2, [pc, #504] ; a00079e4 <_Heap_Walk+0x5d8>
a00077e8: e1a03006 mov r3, r6
a00077ec: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a00077f0: e1a0000b mov r0, fp
a00077f4: eaffff18 b a000745c <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
a00077f8: e1a0000a mov r0, sl
a00077fc: e3a01001 mov r1, #1
a0007800: e59f21e0 ldr r2, [pc, #480] ; a00079e8 <_Heap_Walk+0x5dc>
a0007804: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007808: e1a00005 mov r0, r5
a000780c: eaffff12 b a000745c <_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;
a0007810: e594c024 ldr ip, [r4, #36] ; 0x24
a0007814: e15c0005 cmp ip, r5
a0007818: 3affff6d bcc a00075d4 <_Heap_Walk+0x1c8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000781c: e2850008 add r0, r5, #8
a0007820: e1a01007 mov r1, r7
a0007824: e58d3020 str r3, [sp, #32]
a0007828: e58dc01c str ip, [sp, #28]
a000782c: ebffe48e bl a0000a6c <__umodsi3>
);
return false;
}
if (
a0007830: e3500000 cmp r0, #0
a0007834: e59d3020 ldr r3, [sp, #32]
a0007838: e59dc01c ldr ip, [sp, #28]
a000783c: 1a000044 bne a0007954 <_Heap_Walk+0x548>
- 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;
a0007840: e5952004 ldr r2, [r5, #4]
a0007844: e3c22001 bic r2, r2, #1
block = next_block;
} while ( block != first_block );
return true;
}
a0007848: 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;
a000784c: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0007850: e3120001 tst r2, #1
a0007854: 1a000045 bne a0007970 <_Heap_Walk+0x564>
a0007858: e58d8030 str r8, [sp, #48] ; 0x30
a000785c: e58db034 str fp, [sp, #52] ; 0x34
a0007860: e1a01004 mov r1, r4
a0007864: e1a06005 mov r6, r5
a0007868: e1a08003 mov r8, r3
a000786c: e1a0b00c mov fp, ip
a0007870: ea000013 b a00078c4 <_Heap_Walk+0x4b8>
return false;
}
prev_block = free_block;
free_block = free_block->next;
a0007874: 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 ) {
a0007878: e1540005 cmp r4, r5
a000787c: 0affff5b beq a00075f0 <_Heap_Walk+0x1e4>
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;
a0007880: e1580005 cmp r8, r5
a0007884: 8affff52 bhi a00075d4 <_Heap_Walk+0x1c8>
a0007888: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000788c: e2850008 add r0, r5, #8
a0007890: 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;
a0007894: 8affff4e bhi a00075d4 <_Heap_Walk+0x1c8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0007898: ebffe473 bl a0000a6c <__umodsi3>
);
return false;
}
if (
a000789c: e3500000 cmp r0, #0
a00078a0: 1a00002b bne a0007954 <_Heap_Walk+0x548>
- 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;
a00078a4: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a00078a8: e1a01006 mov r1, r6
a00078ac: e1a06005 mov r6, r5
a00078b0: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a00078b4: 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;
a00078b8: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a00078bc: e3130001 tst r3, #1
a00078c0: 1a00002a bne a0007970 <_Heap_Walk+0x564>
);
return false;
}
if ( free_block->prev != prev_block ) {
a00078c4: e595200c ldr r2, [r5, #12]
a00078c8: e1520001 cmp r2, r1
a00078cc: 0affffe8 beq a0007874 <_Heap_Walk+0x468>
(*printer)(
a00078d0: e58d2000 str r2, [sp]
a00078d4: e1a0000a mov r0, sl
a00078d8: e3a01001 mov r1, #1
a00078dc: e59f2108 ldr r2, [pc, #264] ; a00079ec <_Heap_Walk+0x5e0>
a00078e0: e1a03005 mov r3, r5
a00078e4: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00078e8: e3a00000 mov r0, #0
a00078ec: eafffeda b a000745c <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
a00078f0: e1a0000a mov r0, sl
a00078f4: e58d7000 str r7, [sp]
a00078f8: e3a01001 mov r1, #1
a00078fc: e59f20ec ldr r2, [pc, #236] ; a00079f0 <_Heap_Walk+0x5e4>
a0007900: e1a03006 mov r3, r6
a0007904: e12fff39 blx r9
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
a0007908: e3a00000 mov r0, #0
a000790c: eafffed2 b a000745c <_Heap_Walk+0x50>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
a0007910: e58d2004 str r2, [sp, #4]
a0007914: e1a0000a mov r0, sl
a0007918: e58d7000 str r7, [sp]
a000791c: e3a01001 mov r1, #1
a0007920: e59f20cc ldr r2, [pc, #204] ; a00079f4 <_Heap_Walk+0x5e8>
a0007924: e1a03006 mov r3, r6
a0007928: e12fff39 blx r9
block,
block_size,
min_block_size
);
return false;
a000792c: e3a00000 mov r0, #0
a0007930: eafffec9 b a000745c <_Heap_Walk+0x50>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
a0007934: e1a0000a mov r0, sl
a0007938: e58d5000 str r5, [sp]
a000793c: e3a01001 mov r1, #1
a0007940: e59f20b0 ldr r2, [pc, #176] ; a00079f8 <_Heap_Walk+0x5ec>
a0007944: e1a03006 mov r3, r6
a0007948: e12fff39 blx r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
a000794c: e3a00000 mov r0, #0
a0007950: eafffec1 b a000745c <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a0007954: e1a0000a mov r0, sl
a0007958: e3a01001 mov r1, #1
a000795c: e59f2098 ldr r2, [pc, #152] ; a00079fc <_Heap_Walk+0x5f0>
a0007960: e1a03005 mov r3, r5
a0007964: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007968: e3a00000 mov r0, #0
a000796c: eafffeba b a000745c <_Heap_Walk+0x50>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
a0007970: e1a0000a mov r0, sl
a0007974: e3a01001 mov r1, #1
a0007978: e59f2080 ldr r2, [pc, #128] ; a0007a00 <_Heap_Walk+0x5f4>
a000797c: e1a03005 mov r3, r5
a0007980: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007984: e3a00000 mov r0, #0
a0007988: eafffeb3 b a000745c <_Heap_Walk+0x50>
a00067ec <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
a00067ec: e59f303c ldr r3, [pc, #60] ; a0006830 <_Internal_error_Occurred+0x44>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a00067f0: e201c0ff and ip, r1, #255 ; 0xff
a00067f4: 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 );
a00067f8: e1a0100c mov r1, ip
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
a00067fc: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
a0006800: e5c3c004 strb ip, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
a0006804: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a0006808: 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 );
a000680c: eb000745 bl a0008528 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
a0006810: e59f301c ldr r3, [pc, #28] ; a0006834 <_Internal_error_Occurred+0x48><== NOT EXECUTED
a0006814: e3a02005 mov r2, #5 <== NOT EXECUTED
a0006818: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000681c: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a0006820: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
a0006824: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
a0006828: e1a00004 mov r0, r4 <== NOT EXECUTED
a000682c: eafffffe b a000682c <_Internal_error_Occurred+0x40> <== NOT EXECUTED
a00068f4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a00068f4: 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 )
a00068f8: e5904034 ldr r4, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a00068fc: e24dd014 sub sp, sp, #20
a0006900: e1a05000 mov r5, r0
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a0006904: e3540000 cmp r4, #0
/*
* 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 );
a0006908: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a000690c: 0a00009c beq a0006b84 <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
a0006910: e1d081b4 ldrh r8, [r0, #20]
a0006914: e1d0a1b0 ldrh sl, [r0, #16]
a0006918: e1a01008 mov r1, r8
a000691c: e1a0000a mov r0, sl
a0006920: eb0025ff bl a0010124 <__aeabi_uidiv>
a0006924: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
a0006928: e1b03823 lsrs r3, r3, #16
a000692c: 0a00009a beq a0006b9c <_Objects_Extend_information+0x2a8>
if ( information->object_blocks[ block ] == NULL ) {
a0006930: e5949000 ldr r9, [r4]
a0006934: e3590000 cmp r9, #0
a0006938: 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 );
a000693c: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
a0006940: 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 ) {
a0006944: 0a00000c beq a000697c <_Objects_Extend_information+0x88>
a0006948: e1a02004 mov r2, r4
a000694c: 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 );
a0006950: e1a06007 mov r6, r7
index_base = minimum_index;
block = 0;
a0006954: e3a04000 mov r4, #0
a0006958: ea000002 b a0006968 <_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 ) {
a000695c: e5b29004 ldr r9, [r2, #4]!
a0006960: e3590000 cmp r9, #0
a0006964: 0a000004 beq a000697c <_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++ ) {
a0006968: e2844001 add r4, r4, #1
a000696c: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
a0006970: 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++ ) {
a0006974: 8afffff8 bhi a000695c <_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;
a0006978: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
a000697c: 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 ) {
a0006980: e35a0801 cmp sl, #65536 ; 0x10000
a0006984: 2a000064 bcs a0006b1c <_Objects_Extend_information+0x228>
/*
* 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 ) {
a0006988: 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;
a000698c: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
a0006990: 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;
a0006994: e0000091 mul r0, r1, r0
if ( information->auto_extend ) {
a0006998: 1a000061 bne a0006b24 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
a000699c: e58d3000 str r3, [sp]
a00069a0: eb000823 bl a0008a34 <_Workspace_Allocate_or_fatal_error>
a00069a4: e59d3000 ldr r3, [sp]
a00069a8: e1a08000 mov r8, r0
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
a00069ac: e3590000 cmp r9, #0
a00069b0: 0a00003a beq a0006aa0 <_Objects_Extend_information+0x1ac>
*/
/*
* Up the block count and maximum
*/
block_count++;
a00069b4: e283b001 add fp, r3, #1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a00069b8: e08b008b add r0, fp, fp, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
a00069bc: e08a0000 add r0, sl, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a00069c0: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
a00069c4: e1a00100 lsl r0, r0, #2
a00069c8: e58d3000 str r3, [sp]
a00069cc: eb00080e bl a0008a0c <_Workspace_Allocate>
if ( !object_blocks ) {
a00069d0: e2509000 subs r9, r0, #0
a00069d4: e59d3000 ldr r3, [sp]
a00069d8: 0a000074 beq a0006bb0 <_Objects_Extend_information+0x2bc>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
a00069dc: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
a00069e0: e089c10b add ip, r9, fp, lsl #2
a00069e4: e089b18b add fp, r9, fp, lsl #3
a00069e8: e1570002 cmp r7, r2
a00069ec: 3a000052 bcc a0006b3c <_Objects_Extend_information+0x248>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a00069f0: e3570000 cmp r7, #0
a00069f4: 13a02000 movne r2, #0
a00069f8: 11a0100b movne r1, fp
local_table[ index ] = NULL;
a00069fc: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006a00: 0a000003 beq a0006a14 <_Objects_Extend_information+0x120>
a0006a04: e2822001 add r2, r2, #1
a0006a08: e1570002 cmp r7, r2
local_table[ index ] = NULL;
a0006a0c: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006a10: 8afffffb bhi a0006a04 <_Objects_Extend_information+0x110>
a0006a14: 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 );
a0006a18: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
a0006a1c: e3a00000 mov r0, #0
a0006a20: e7890003 str r0, [r9, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a0006a24: e0861001 add r1, r6, r1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a0006a28: e1560001 cmp r6, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
a0006a2c: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
a0006a30: 2a000005 bcs a0006a4c <_Objects_Extend_information+0x158>
a0006a34: e08b2106 add r2, fp, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
a0006a38: 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++ ) {
a0006a3c: 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 ;
a0006a40: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
a0006a44: 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 ;
a0006a48: 3afffffb bcc a0006a3c <_Objects_Extend_information+0x148>
a0006a4c: e10f3000 mrs r3, CPSR
a0006a50: e3832080 orr r2, r3, #128 ; 0x80
a0006a54: e129f002 msr CPSR_fc, r2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a0006a58: 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(
a0006a5c: e1d510b4 ldrh r1, [r5, #4]
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;
a0006a60: e1a0a80a lsl sl, sl, #16
a0006a64: e1a02c02 lsl r2, r2, #24
a0006a68: e3822801 orr r2, r2, #65536 ; 0x10000
a0006a6c: e1a0a82a lsr sl, sl, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a0006a70: 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) |
a0006a74: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
a0006a78: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
a0006a7c: e585c030 str ip, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
a0006a80: e5859034 str r9, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
a0006a84: e585b01c str fp, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
a0006a88: e1c5a1b0 strh sl, [r5, #16]
information->maximum_id = _Objects_Build_id(
a0006a8c: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0006a90: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
a0006a94: e3500000 cmp r0, #0
a0006a98: 0a000000 beq a0006aa0 <_Objects_Extend_information+0x1ac>
_Workspace_Free( old_tables );
a0006a9c: eb0007e0 bl a0008a24 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006aa0: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a0006aa4: e28d7008 add r7, sp, #8
a0006aa8: e1a01008 mov r1, r8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006aac: e7838104 str r8, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a0006ab0: e1a00007 mov r0, r7
a0006ab4: e1d521b4 ldrh r2, [r5, #20]
a0006ab8: e5953018 ldr r3, [r5, #24]
a0006abc: eb000fb6 bl a000a99c <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006ac0: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006ac4: 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 ) {
a0006ac8: ea000009 b a0006af4 <_Objects_Extend_information+0x200>
a0006acc: e5953000 ldr r3, [r5]
the_object->id = _Objects_Build_id(
a0006ad0: e1d520b4 ldrh r2, [r5, #4]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006ad4: e1a00008 mov r0, r8
a0006ad8: e1a03c03 lsl r3, r3, #24
a0006adc: e3833801 orr r3, r3, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a0006ae0: 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) |
a0006ae4: e1833006 orr r3, r3, r6
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
a0006ae8: e5813008 str r3, [r1, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006aec: ebfffce1 bl a0005e78 <_Chain_Append>
index++;
a0006af0: 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 ) {
a0006af4: e1a00007 mov r0, r7
a0006af8: ebfffcf1 bl a0005ec4 <_Chain_Get>
a0006afc: e2501000 subs r1, r0, #0
a0006b00: 1afffff1 bne a0006acc <_Objects_Extend_information+0x1d8>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a0006b04: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006b08: e1d531b4 ldrh r3, [r5, #20]
a0006b0c: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a0006b10: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006b14: e7813004 str r3, [r1, r4]
information->inactive =
a0006b18: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
a0006b1c: e28dd014 add sp, sp, #20
a0006b20: 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 );
a0006b24: e58d3000 str r3, [sp]
a0006b28: eb0007b7 bl a0008a0c <_Workspace_Allocate>
if ( !new_object_block )
a0006b2c: e2508000 subs r8, r0, #0
a0006b30: e59d3000 ldr r3, [sp]
a0006b34: 1affff9c bne a00069ac <_Objects_Extend_information+0xb8>
a0006b38: eafffff7 b a0006b1c <_Objects_Extend_information+0x228>
/*
* 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,
a0006b3c: e1a03103 lsl r3, r3, #2
a0006b40: e5951034 ldr r1, [r5, #52] ; 0x34
a0006b44: e1a02003 mov r2, r3
a0006b48: e88d1008 stm sp, {r3, ip}
a0006b4c: eb001a03 bl a000d360 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
a0006b50: e89d1008 ldm sp, {r3, ip}
a0006b54: e5951030 ldr r1, [r5, #48] ; 0x30
a0006b58: e1a0000c mov r0, ip
a0006b5c: e1a02003 mov r2, r3
a0006b60: eb0019fe bl a000d360 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a0006b64: e1d521b0 ldrh r2, [r5, #16]
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
a0006b68: e1a0000b mov r0, fp
a0006b6c: e595101c ldr r1, [r5, #28]
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a0006b70: 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,
a0006b74: e1a02102 lsl r2, r2, #2
a0006b78: eb0019f8 bl a000d360 <memcpy>
a0006b7c: e89d1008 ldm sp, {r3, ip}
a0006b80: eaffffa4 b a0006a18 <_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 )
a0006b84: e1d0a1b0 ldrh sl, [r0, #16]
a0006b88: 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 );
a0006b8c: 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;
a0006b90: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
a0006b94: e1a03004 mov r3, r4
a0006b98: eaffff77 b a000697c <_Objects_Extend_information+0x88>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a0006b9c: 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 );
a0006ba0: 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;
a0006ba4: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
a0006ba8: e1a04003 mov r4, r3 <== NOT EXECUTED
a0006bac: eaffff72 b a000697c <_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 );
a0006bb0: e1a00008 mov r0, r8
a0006bb4: eb00079a bl a0008a24 <_Workspace_Free>
return;
a0006bb8: eaffffd7 b a0006b1c <_Objects_Extend_information+0x228>
a0006f0c <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a0006f0c: 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 );
a0006f10: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
a0006f14: e1d051b4 ldrh r5, [r0, #20]
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a0006f18: 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) /
a0006f1c: e1d001b0 ldrh r0, [r0, #16]
a0006f20: e1a01005 mov r1, r5
a0006f24: e0640000 rsb r0, r4, r0
a0006f28: eb00247d bl a0010124 <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
a0006f2c: e3500000 cmp r0, #0
a0006f30: 0a00000d beq a0006f6c <_Objects_Shrink_information+0x60>
if ( information->inactive_per_block[ block ] ==
a0006f34: e5962030 ldr r2, [r6, #48] ; 0x30
a0006f38: e5923000 ldr r3, [r2]
a0006f3c: 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++ ) {
a0006f40: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
a0006f44: 1a000005 bne a0006f60 <_Objects_Shrink_information+0x54>
a0006f48: ea000008 b a0006f70 <_Objects_Shrink_information+0x64> <== NOT EXECUTED
a0006f4c: e5b21004 ldr r1, [r2, #4]!
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
a0006f50: e0844005 add r4, r4, r5
a0006f54: 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 ] ==
a0006f58: e1550001 cmp r5, r1
a0006f5c: 0a000004 beq a0006f74 <_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++ ) {
a0006f60: e2833001 add r3, r3, #1
a0006f64: e1500003 cmp r0, r3
a0006f68: 8afffff7 bhi a0006f4c <_Objects_Shrink_information+0x40>
a0006f6c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
a0006f70: 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;
a0006f74: e5960020 ldr r0, [r6, #32]
a0006f78: ea000002 b a0006f88 <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
a0006f7c: e3550000 cmp r5, #0
a0006f80: 0a00000b beq a0006fb4 <_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;
a0006f84: 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 );
a0006f88: 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;
a0006f8c: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
a0006f90: e1530004 cmp r3, r4
a0006f94: 3afffff8 bcc a0006f7c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
a0006f98: e1d621b4 ldrh r2, [r6, #20]
a0006f9c: 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) &&
a0006fa0: e1530002 cmp r3, r2
a0006fa4: 2afffff4 bcs a0006f7c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
a0006fa8: ebfffbbd bl a0005ea4 <_Chain_Extract>
}
}
while ( the_object );
a0006fac: e3550000 cmp r5, #0
a0006fb0: 1afffff3 bne a0006f84 <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
a0006fb4: e5963034 ldr r3, [r6, #52] ; 0x34
a0006fb8: e7930007 ldr r0, [r3, r7]
a0006fbc: eb000698 bl a0008a24 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
a0006fc0: e1d602bc ldrh r0, [r6, #44] ; 0x2c
a0006fc4: 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;
a0006fc8: e5961034 ldr r1, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
a0006fcc: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
a0006fd0: 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;
a0006fd4: e7815007 str r5, [r1, r7]
information->inactive_per_block[ block ] = 0;
a0006fd8: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
a0006fdc: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
a0006fe0: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0006548 <_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();
a0006548: e59f30bc ldr r3, [pc, #188] ; a000660c <_TOD_Validate+0xc4>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a000654c: 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) ||
a0006550: 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();
a0006554: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a0006558: 0a000029 beq a0006604 <_TOD_Validate+0xbc>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a000655c: e3a0093d mov r0, #999424 ; 0xf4000
a0006560: e2800d09 add r0, r0, #576 ; 0x240
a0006564: eb004527 bl a0017a08 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a0006568: e5943018 ldr r3, [r4, #24]
a000656c: e1500003 cmp r0, r3
a0006570: 9a00001f bls a00065f4 <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a0006574: e5943014 ldr r3, [r4, #20]
a0006578: e353003b cmp r3, #59 ; 0x3b
a000657c: 8a00001c bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a0006580: e5943010 ldr r3, [r4, #16]
a0006584: e353003b cmp r3, #59 ; 0x3b
a0006588: 8a000019 bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a000658c: e594300c ldr r3, [r4, #12]
a0006590: e3530017 cmp r3, #23
a0006594: 8a000016 bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a0006598: 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) ||
a000659c: e3500000 cmp r0, #0
a00065a0: 0a000016 beq a0006600 <_TOD_Validate+0xb8>
(the_tod->month == 0) ||
a00065a4: e350000c cmp r0, #12
a00065a8: 8a000011 bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a00065ac: 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) ||
a00065b0: e3a03d1f mov r3, #1984 ; 0x7c0
a00065b4: e2833003 add r3, r3, #3
a00065b8: e1520003 cmp r2, r3
a00065bc: 9a00000c bls a00065f4 <_TOD_Validate+0xac>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a00065c0: 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) ||
a00065c4: e3540000 cmp r4, #0
a00065c8: 0a00000b beq a00065fc <_TOD_Validate+0xb4>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a00065cc: e3120003 tst r2, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a00065d0: 059f3038 ldreq r3, [pc, #56] ; a0006610 <_TOD_Validate+0xc8>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a00065d4: 159f3034 ldrne r3, [pc, #52] ; a0006610 <_TOD_Validate+0xc8>
(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 ];
a00065d8: 0280000d addeq r0, r0, #13
a00065dc: 07930100 ldreq r0, [r3, r0, lsl #2]
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a00065e0: 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(
a00065e4: e1500004 cmp r0, r4
a00065e8: 33a00000 movcc r0, #0
a00065ec: 23a00001 movcs r0, #1
a00065f0: 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;
a00065f4: e3a00000 mov r0, #0
a00065f8: e8bd8010 pop {r4, pc}
a00065fc: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
a0006600: e8bd8010 pop {r4, pc} <== NOT EXECUTED
(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;
a0006604: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006608: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0007700 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007700: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
a0007704: e3a05000 mov r5, #0
a0007708: e5815100 str r5, [r1, #256] ; 0x100
a000770c: e5815104 str r5, [r1, #260] ; 0x104
extensions_area = NULL;
the_thread->libc_reent = NULL;
a0007710: e58150fc str r5, [r1, #252] ; 0xfc
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007714: e1a04001 mov r4, r1
a0007718: e1a0a000 mov sl, r0
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a000771c: e1a00001 mov r0, r1
a0007720: e1a01003 mov r1, r3
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007724: e1a06003 mov r6, r3
a0007728: e59d8024 ldr r8, [sp, #36] ; 0x24
a000772c: e5dd9028 ldrb r9, [sp, #40] ; 0x28
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a0007730: eb00027b bl a0008124 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
a0007734: e1500005 cmp r0, r5
a0007738: 13a07000 movne r7, #0
a000773c: 03a07001 moveq r7, #1
a0007740: e1500006 cmp r0, r6
a0007744: 33877001 orrcc r7, r7, #1
a0007748: e1570005 cmp r7, r5
a000774c: 1a00003d bne a0007848 <_Thread_Initialize+0x148>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a0007750: e59f5134 ldr r5, [pc, #308] ; a000788c <_Thread_Initialize+0x18c>
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a0007754: e59430c8 ldr r3, [r4, #200] ; 0xc8
the_stack->size = size;
a0007758: e58400c0 str r0, [r4, #192] ; 0xc0
a000775c: e5956000 ldr r6, [r5]
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a0007760: e58430c4 str r3, [r4, #196] ; 0xc4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0007764: e5847050 str r7, [r4, #80] ; 0x50
a0007768: e3560000 cmp r6, #0
the_watchdog->routine = routine;
a000776c: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a0007770: e5847068 str r7, [r4, #104] ; 0x68
the_watchdog->user_data = user_data;
a0007774: e584706c str r7, [r4, #108] ; 0x6c
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a0007778: 05846108 streq r6, [r4, #264] ; 0x108
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a000777c: 1a000033 bne a0007850 <_Thread_Initialize+0x150>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a0007780: e59d302c ldr r3, [sp, #44] ; 0x2c
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a0007784: e3a07000 mov r7, #0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a0007788: e3a05001 mov r5, #1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a000778c: e58430b0 str r3, [r4, #176] ; 0xb0
the_thread->Start.budget_callout = budget_callout;
a0007790: e59d3030 ldr r3, [sp, #48] ; 0x30
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
a0007794: e1a00004 mov r0, r4
a0007798: e1a01008 mov r1, r8
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
a000779c: e58430b4 str r3, [r4, #180] ; 0xb4
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a00077a0: e59d3034 ldr r3, [sp, #52] ; 0x34
the_thread->current_state = STATES_DORMANT;
a00077a4: e5845010 str r5, [r4, #16]
the_thread->Wait.queue = NULL;
a00077a8: e5847044 str r7, [r4, #68] ; 0x44
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a00077ac: e58430b8 str r3, [r4, #184] ; 0xb8
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
a00077b0: e584701c str r7, [r4, #28]
the_thread->real_priority = priority;
a00077b4: e5848018 str r8, [r4, #24]
the_thread->Start.initial_priority = priority;
a00077b8: e58480bc str r8, [r4, #188] ; 0xbc
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
a00077bc: e5c490ac strb r9, [r4, #172] ; 0xac
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
a00077c0: eb0001c3 bl a0007ed4 <_Thread_Set_priority>
_Thread_Stack_Free( the_thread );
return false;
}
a00077c4: e59a301c ldr r3, [sl, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a00077c8: e1d420b8 ldrh r2, [r4, #8]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
a00077cc: e5847084 str r7, [r4, #132] ; 0x84
a00077d0: e5847088 str r7, [r4, #136] ; 0x88
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00077d4: e7834102 str r4, [r3, r2, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a00077d8: e59d3038 ldr r3, [sp, #56] ; 0x38
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
a00077dc: e1a00004 mov r0, r4
a00077e0: e584300c str r3, [r4, #12]
a00077e4: eb000363 bl a0008578 <_User_extensions_Thread_create>
if ( extension_status )
a00077e8: e1500007 cmp r0, r7
a00077ec: 1a000013 bne a0007840 <_Thread_Initialize+0x140>
return true;
failed:
if ( the_thread->libc_reent )
a00077f0: e59400fc ldr r0, [r4, #252] ; 0xfc
a00077f4: e3500000 cmp r0, #0
a00077f8: 0a000000 beq a0007800 <_Thread_Initialize+0x100>
_Workspace_Free( the_thread->libc_reent );
a00077fc: eb000488 bl a0008a24 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a0007800: e5940100 ldr r0, [r4, #256] ; 0x100
a0007804: e3500000 cmp r0, #0
a0007808: 0a000000 beq a0007810 <_Thread_Initialize+0x110>
_Workspace_Free( the_thread->API_Extensions[i] );
a000780c: eb000484 bl a0008a24 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a0007810: e5940104 ldr r0, [r4, #260] ; 0x104
a0007814: e3500000 cmp r0, #0
a0007818: 0a000000 beq a0007820 <_Thread_Initialize+0x120>
_Workspace_Free( the_thread->API_Extensions[i] );
a000781c: eb000480 bl a0008a24 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
a0007820: e3560000 cmp r6, #0
a0007824: 0a000001 beq a0007830 <_Thread_Initialize+0x130>
(void) _Workspace_Free( extensions_area );
a0007828: e1a00006 mov r0, r6
a000782c: eb00047c bl a0008a24 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
a0007830: e1a00004 mov r0, r4
a0007834: eb000255 bl a0008190 <_Thread_Stack_Free>
return false;
a0007838: e3a00000 mov r0, #0
a000783c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
a0007840: e1a00005 mov r0, r5
_Thread_Stack_Free( the_thread );
return false;
}
a0007844: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
a0007848: e1a00005 mov r0, r5
a000784c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
a0007850: e2866001 add r6, r6, #1
a0007854: e1a00106 lsl r0, r6, #2
a0007858: eb00046b bl a0008a0c <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
a000785c: e2506000 subs r6, r0, #0
a0007860: 0affffe2 beq a00077f0 <_Thread_Initialize+0xf0>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a0007864: e5951000 ldr r1, [r5]
a0007868: e5846108 str r6, [r4, #264] ; 0x108
a000786c: e1a03007 mov r3, r7
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
a0007870: e1a02007 mov r2, r7
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a0007874: e2833001 add r3, r3, #1
a0007878: e1530001 cmp r3, r1
the_thread->extensions[i] = NULL;
a000787c: e7862107 str r2, [r6, r7, lsl #2]
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a0007880: e1a07003 mov r7, r3
a0007884: 9afffffa bls a0007874 <_Thread_Initialize+0x174>
a0007888: eaffffbc b a0007780 <_Thread_Initialize+0x80>
a0015d94 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a0015d94: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0015d98: e24dd024 sub sp, sp, #36 ; 0x24
a0015d9c: e28d700c add r7, sp, #12
a0015da0: e28d2018 add r2, sp, #24
a0015da4: e282a004 add sl, r2, #4
a0015da8: e2872004 add r2, r7, #4
a0015dac: 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);
a0015db0: e28d2018 add r2, sp, #24
a0015db4: e58d2020 str r2, [sp, #32]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0015db8: e59d2000 ldr r2, [sp]
a0015dbc: e59f91cc ldr r9, [pc, #460] ; a0015f90 <_Timer_server_Body+0x1fc>
a0015dc0: e59fb1cc ldr fp, [pc, #460] ; a0015f94 <_Timer_server_Body+0x200>
a0015dc4: e58d200c str r2, [sp, #12]
a0015dc8: e2802008 add r2, r0, #8
the_chain->permanent_null = NULL;
a0015dcc: e3a03000 mov r3, #0
a0015dd0: e58d2004 str r2, [sp, #4]
a0015dd4: e2802040 add r2, r0, #64 ; 0x40
a0015dd8: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0015ddc: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
a0015de0: e58d301c str r3, [sp, #28]
a0015de4: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
a0015de8: e58d7014 str r7, [sp, #20]
a0015dec: e2806030 add r6, r0, #48 ; 0x30
a0015df0: e2808068 add r8, r0, #104 ; 0x68
a0015df4: e58d2008 str r2, [sp, #8]
{
/*
* 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;
a0015df8: e28d3018 add r3, sp, #24
a0015dfc: 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;
a0015e00: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a0015e04: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0015e08: e1a02007 mov r2, r7
a0015e0c: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a0015e10: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0015e14: e0611003 rsb r1, r1, r3
a0015e18: eb001170 bl a001a3e0 <_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();
a0015e1c: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a0015e20: 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 ) {
a0015e24: e1550002 cmp r5, r2
a0015e28: 8a000022 bhi a0015eb8 <_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 ) {
a0015e2c: 3a000018 bcc a0015e94 <_Timer_server_Body+0x100>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
a0015e30: 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 );
a0015e34: e5940078 ldr r0, [r4, #120] ; 0x78
a0015e38: eb0002c0 bl a0016940 <_Chain_Get>
if ( timer == NULL ) {
a0015e3c: e2501000 subs r1, r0, #0
a0015e40: 0a00000b beq a0015e74 <_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 ) {
a0015e44: e5913038 ldr r3, [r1, #56] ; 0x38
a0015e48: e3530001 cmp r3, #1
a0015e4c: 0a000015 beq a0015ea8 <_Timer_server_Body+0x114>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a0015e50: e3530003 cmp r3, #3
a0015e54: 1afffff6 bne a0015e34 <_Timer_server_Body+0xa0>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a0015e58: e2811010 add r1, r1, #16
a0015e5c: e1a00008 mov r0, r8
a0015e60: eb001188 bl a001a488 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a0015e64: e5940078 ldr r0, [r4, #120] ; 0x78
a0015e68: eb0002b4 bl a0016940 <_Chain_Get>
if ( timer == NULL ) {
a0015e6c: e2501000 subs r1, r0, #0
a0015e70: 1afffff3 bne a0015e44 <_Timer_server_Body+0xb0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015e74: e10f2000 mrs r2, CPSR
a0015e78: e3823080 orr r3, r2, #128 ; 0x80
a0015e7c: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
a0015e80: e59d3018 ldr r3, [sp, #24]
a0015e84: e15a0003 cmp sl, r3
a0015e88: 0a00000f beq a0015ecc <_Timer_server_Body+0x138>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015e8c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a0015e90: eaffffda b a0015e00 <_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 );
a0015e94: e1a00008 mov r0, r8
a0015e98: e3a01001 mov r1, #1
a0015e9c: e0652002 rsb r2, r5, r2
a0015ea0: eb00111f bl a001a324 <_Watchdog_Adjust>
a0015ea4: eaffffe1 b a0015e30 <_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 );
a0015ea8: e1a00006 mov r0, r6
a0015eac: e2811010 add r1, r1, #16
a0015eb0: eb001174 bl a001a488 <_Watchdog_Insert>
a0015eb4: eaffffde b a0015e34 <_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 );
a0015eb8: e0621005 rsb r1, r2, r5
a0015ebc: e1a00008 mov r0, r8
a0015ec0: e1a02007 mov r2, r7
a0015ec4: eb001145 bl a001a3e0 <_Watchdog_Adjust_to_chain>
a0015ec8: eaffffd8 b a0015e30 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
a0015ecc: e5841078 str r1, [r4, #120] ; 0x78
a0015ed0: 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 ) ) {
a0015ed4: e59d300c ldr r3, [sp, #12]
a0015ed8: e59d2000 ldr r2, [sp]
a0015edc: e1520003 cmp r2, r3
a0015ee0: 0a000015 beq a0015f3c <_Timer_server_Body+0x1a8>
a0015ee4: e1a05004 mov r5, r4
a0015ee8: e59d4000 ldr r4, [sp]
a0015eec: ea000009 b a0015f18 <_Timer_server_Body+0x184>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
a0015ef0: e5923000 ldr r3, [r2]
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
a0015ef4: e5837004 str r7, [r3, #4]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
a0015ef8: e58d300c str r3, [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;
a0015efc: e3a03000 mov r3, #0
a0015f00: e5823008 str r3, [r2, #8]
a0015f04: 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 );
a0015f08: e592301c ldr r3, [r2, #28]
a0015f0c: e5920020 ldr r0, [r2, #32]
a0015f10: e5921024 ldr r1, [r2, #36] ; 0x24
a0015f14: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015f18: e10f1000 mrs r1, CPSR
a0015f1c: e3813080 orr r3, r1, #128 ; 0x80
a0015f20: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a0015f24: e59d200c ldr r2, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0015f28: e1540002 cmp r4, r2
a0015f2c: 1affffef bne a0015ef0 <_Timer_server_Body+0x15c>
a0015f30: e1a04005 mov r4, r5
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015f34: e129f001 msr CPSR_fc, r1
a0015f38: eaffffae b a0015df8 <_Timer_server_Body+0x64>
}
} else {
ts->active = false;
a0015f3c: e3a02000 mov r2, #0
a0015f40: e5c4207c strb r2, [r4, #124] ; 0x7c
a0015f44: e59f204c ldr r2, [pc, #76] ; a0015f98 <_Timer_server_Body+0x204>
a0015f48: e5923000 ldr r3, [r2]
a0015f4c: e2833001 add r3, r3, #1
a0015f50: e5823000 str r3, [r2]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
a0015f54: e3a01008 mov r1, #8
a0015f58: e5940000 ldr r0, [r4]
a0015f5c: eb000e96 bl a00199bc <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a0015f60: e1a00004 mov r0, r4
a0015f64: ebffff5e bl a0015ce4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a0015f68: e1a00004 mov r0, r4
a0015f6c: ebffff72 bl a0015d3c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a0015f70: eb000bff bl a0018f74 <_Thread_Enable_dispatch>
ts->active = true;
a0015f74: e3a03001 mov r3, #1
a0015f78: 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 );
a0015f7c: e59d0004 ldr r0, [sp, #4]
a0015f80: eb0011ad bl a001a63c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a0015f84: e59d0008 ldr r0, [sp, #8]
a0015f88: eb0011ab bl a001a63c <_Watchdog_Remove>
a0015f8c: eaffff99 b a0015df8 <_Timer_server_Body+0x64>
a000a194 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a000a194: e5902000 ldr r2, [r0]
a000a198: e5913000 ldr r3, [r1]
a000a19c: e1520003 cmp r2, r3
return true;
a000a1a0: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a000a1a4: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
a000a1a8: ba000005 blt a000a1c4 <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
a000a1ac: e5900004 ldr r0, [r0, #4]
a000a1b0: e5913004 ldr r3, [r1, #4]
a000a1b4: e1500003 cmp r0, r3
a000a1b8: d3a00000 movle r0, #0
a000a1bc: c3a00001 movgt r0, #1
a000a1c0: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
a000a1c4: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
a000a1c8: e12fff1e bx lr <== NOT EXECUTED
a000a1cc <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000a1cc: e5902000 ldr r2, [r0]
a000a1d0: e5913000 ldr r3, [r1]
a000a1d4: e1520003 cmp r2, r3
return true;
a000a1d8: b3a00001 movlt r0, #1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000a1dc: b12fff1e bxlt lr
return true;
if ( lhs->tv_sec > rhs->tv_sec )
a000a1e0: ca000005 bgt a000a1fc <_Timespec_Less_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
a000a1e4: e5900004 ldr r0, [r0, #4]
a000a1e8: e5913004 ldr r3, [r1, #4]
a000a1ec: e1500003 cmp r0, r3
a000a1f0: a3a00000 movge r0, #0
a000a1f4: b3a00001 movlt r0, #1
a000a1f8: e12fff1e bx lr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
a000a1fc: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
a000a200: e12fff1e bx lr <== NOT EXECUTED
a0008528 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a0008528: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
a000852c: e59f5040 ldr r5, [pc, #64] ; a0008574 <_User_extensions_Fatal+0x4c>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a0008530: e1a08000 mov r8, r0
a0008534: e1a07002 mov r7, r2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
a0008538: e5954008 ldr r4, [r5, #8]
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000853c: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
a0008540: e1540005 cmp r4, r5
a0008544: 0a000009 beq a0008570 <_User_extensions_Fatal+0x48>
!_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 )
a0008548: e5943030 ldr r3, [r4, #48] ; 0x30
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a000854c: e1a00008 mov r0, r8
a0008550: e1a01006 mov r1, r6
!_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 )
a0008554: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a0008558: e1a02007 mov r2, r7
!_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 )
a000855c: 0a000000 beq a0008564 <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a0008560: e12fff33 blx 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 ) {
a0008564: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
a0008568: e1540005 cmp r4, r5
a000856c: 1afffff5 bne a0008548 <_User_extensions_Fatal+0x20>
a0008570: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0008578 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a0008578: 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 ;
a000857c: e59f504c ldr r5, [pc, #76] ; a00085d0 <_User_extensions_Thread_create+0x58>
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a0008580: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
a0008584: e4954004 ldr r4, [r5], #4
a0008588: e1540005 cmp r4, r5
a000858c: 0a00000d beq a00085c8 <_User_extensions_Thread_create+0x50>
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)(
a0008590: e59f703c ldr r7, [pc, #60] ; a00085d4 <_User_extensions_Thread_create+0x5c>
!_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 ) {
a0008594: e5943014 ldr r3, [r4, #20]
status = (*the_extension->Callouts.thread_create)(
a0008598: 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 ) {
a000859c: e3530000 cmp r3, #0
a00085a0: 0a000003 beq a00085b4 <_User_extensions_Thread_create+0x3c>
status = (*the_extension->Callouts.thread_create)(
a00085a4: e5970004 ldr r0, [r7, #4]
a00085a8: e12fff33 blx r3
_Thread_Executing,
the_thread
);
if ( !status )
a00085ac: e3500000 cmp r0, #0
a00085b0: 0a000005 beq a00085cc <_User_extensions_Thread_create+0x54>
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 ) {
a00085b4: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
a00085b8: e1540005 cmp r4, r5
a00085bc: 1afffff4 bne a0008594 <_User_extensions_Thread_create+0x1c>
if ( !status )
return false;
}
}
return true;
a00085c0: e3a00001 mov r0, #1
a00085c4: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00085c8: e3a00001 mov r0, #1 <== NOT EXECUTED
}
a00085cc: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000a530 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000a530: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000a534: e1a04000 mov r4, r0
a000a538: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a53c: e10f3000 mrs r3, CPSR
a000a540: e3832080 orr r2, r3, #128 ; 0x80
a000a544: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a000a548: e1a07000 mov r7, r0
a000a54c: 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 ) ) {
a000a550: e1520007 cmp r2, r7
a000a554: 0a000018 beq a000a5bc <_Watchdog_Adjust+0x8c>
switch ( direction ) {
a000a558: e3510000 cmp r1, #0
a000a55c: 1a000018 bne a000a5c4 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a560: e3550000 cmp r5, #0
a000a564: 0a000014 beq a000a5bc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a568: e5926010 ldr r6, [r2, #16]
a000a56c: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a570: 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 ) {
a000a574: 2a000005 bcs a000a590 <_Watchdog_Adjust+0x60>
a000a578: ea000018 b a000a5e0 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a57c: e0555006 subs r5, r5, r6
a000a580: 0a00000d beq a000a5bc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a584: e5926010 ldr r6, [r2, #16]
a000a588: e1560005 cmp r6, r5
a000a58c: 8a000013 bhi a000a5e0 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a590: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a594: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000a598: e1a00004 mov r0, r4
a000a59c: eb0000aa bl a000a84c <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a5a0: e10f3000 mrs r3, CPSR
a000a5a4: e3832080 orr r2, r3, #128 ; 0x80
a000a5a8: e129f002 msr CPSR_fc, r2
a000a5ac: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000a5b0: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
a000a5b4: e1a02001 mov r2, r1
a000a5b8: 1affffef bne a000a57c <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a5bc: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a5c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000a5c4: e3510001 cmp r1, #1
a000a5c8: 1afffffb bne a000a5bc <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000a5cc: e5921010 ldr r1, [r2, #16]
a000a5d0: e0815005 add r5, r1, r5
a000a5d4: e5825010 str r5, [r2, #16]
a000a5d8: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a5dc: 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;
a000a5e0: e0655006 rsb r5, r5, r6
a000a5e4: e5825010 str r5, [r2, #16]
break;
a000a5e8: eafffff3 b a000a5bc <_Watchdog_Adjust+0x8c>
a00060f0 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a00060f0: e92d4030 push {r4, r5, lr}
a00060f4: e1a04002 mov r4, r2
a00060f8: e1a05003 mov r5, r3
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
a00060fc: eb000135 bl a00065d8 <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
a0006100: e3500000 cmp r0, #0
a0006104: 1a000000 bne a000610c <rtems_chain_append_with_notification+0x1c>
sc = rtems_event_send( task, events );
}
return sc;
}
a0006108: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
a000610c: e1a00004 mov r0, r4
a0006110: e1a01005 mov r1, r5
}
return sc;
}
a0006114: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
a0006118: eafffd89 b a0005744 <rtems_event_send>
a000611c <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
a000611c: e92d4030 push {r4, r5, lr}
a0006120: e1a04001 mov r4, r1
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
a0006124: e1a01003 mov r1, r3
a0006128: e1a05002 mov r5, r2
a000612c: eb00014e bl a000666c <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
a0006130: e3500000 cmp r0, #0
a0006134: 1a000000 bne a000613c <rtems_chain_get_with_notification+0x20>
sc = rtems_event_send( task, events );
}
return sc;
}
a0006138: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
a000613c: e1a00004 mov r0, r4
a0006140: e1a01005 mov r1, r5
}
return sc;
}
a0006144: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
a0006148: eafffd7d b a0005744 <rtems_event_send>
a00061a8 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a00061a8: e92d4030 push {r4, r5, lr}
a00061ac: e1a04002 mov r4, r2
a00061b0: e1a05003 mov r5, r3
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
a00061b4: eb000158 bl a000671c <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
a00061b8: e3500000 cmp r0, #0
a00061bc: 1a000000 bne a00061c4 <rtems_chain_prepend_with_notification+0x1c>
sc = rtems_event_send( task, events );
}
return sc;
}
a00061c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
a00061c4: e1a00004 mov r0, r4
a00061c8: e1a01005 mov r1, r5
}
return sc;
}
a00061cc: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
a00061d0: eafffd5b b a0005744 <rtems_event_send>
a0006df0 <rtems_io_register_driver>:
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
)
{
a0006df0: e92d4030 push {r4, r5, lr}
a0006df4: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a0006df8: e59f014c ldr r0, [pc, #332] ; a0006f4c <rtems_io_register_driver+0x15c>
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;
a0006dfc: e59f314c ldr r3, [pc, #332] ; a0006f50 <rtems_io_register_driver+0x160>
if ( rtems_interrupt_is_in_progress() )
a0006e00: e5900000 ldr r0, [r0]
a0006e04: e3500000 cmp r0, #0
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;
a0006e08: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
a0006e0c: 1a000033 bne a0006ee0 <rtems_io_register_driver+0xf0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
a0006e10: e3520000 cmp r2, #0
a0006e14: 0a000041 beq a0006f20 <rtems_io_register_driver+0x130>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a0006e18: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a0006e1c: e5820000 str r0, [r2]
if ( driver_table == NULL )
a0006e20: 0a00003e beq a0006f20 <rtems_io_register_driver+0x130>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0006e24: e591c000 ldr ip, [r1]
a0006e28: e35c0000 cmp ip, #0
a0006e2c: 0a000038 beq a0006f14 <rtems_io_register_driver+0x124>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
a0006e30: e1500004 cmp r0, r4
a0006e34: 9a000027 bls a0006ed8 <rtems_io_register_driver+0xe8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0006e38: e59f0114 ldr r0, [pc, #276] ; a0006f54 <rtems_io_register_driver+0x164>
a0006e3c: e590c000 ldr ip, [r0]
a0006e40: e28cc001 add ip, ip, #1
a0006e44: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a0006e48: e3540000 cmp r4, #0
a0006e4c: 1a000025 bne a0006ee8 <rtems_io_register_driver+0xf8>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
a0006e50: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a0006e54: e35c0000 cmp ip, #0
a0006e58: 0a000032 beq a0006f28 <rtems_io_register_driver+0x138>
a0006e5c: e59fe0f4 ldr lr, [pc, #244] ; a0006f58 <rtems_io_register_driver+0x168>
a0006e60: e59e3000 ldr r3, [lr]
a0006e64: ea000003 b a0006e78 <rtems_io_register_driver+0x88>
a0006e68: e2844001 add r4, r4, #1
a0006e6c: e15c0004 cmp ip, r4
a0006e70: e2833018 add r3, r3, #24
a0006e74: 9a000005 bls a0006e90 <rtems_io_register_driver+0xa0>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0006e78: e5930000 ldr r0, [r3]
a0006e7c: e3500000 cmp r0, #0
a0006e80: 1afffff8 bne a0006e68 <rtems_io_register_driver+0x78>
a0006e84: e5930004 ldr r0, [r3, #4]
a0006e88: e3500000 cmp r0, #0
a0006e8c: 1afffff5 bne a0006e68 <rtems_io_register_driver+0x78>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a0006e90: e15c0004 cmp ip, r4
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0006e94: e5824000 str r4, [r2]
if ( m != n )
a0006e98: 0a000023 beq a0006f2c <rtems_io_register_driver+0x13c>
a0006e9c: e3a0c018 mov ip, #24
a0006ea0: e00c0c94 mul ip, r4, ip
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a0006ea4: e59e5000 ldr r5, [lr]
a0006ea8: e1a0e001 mov lr, r1
a0006eac: e8be000f ldm lr!, {r0, r1, r2, r3}
a0006eb0: e085c00c add ip, r5, ip
a0006eb4: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006eb8: e89e0003 ldm lr, {r0, r1}
a0006ebc: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
a0006ec0: eb000698 bl a0008928 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a0006ec4: e3a01000 mov r1, #0
a0006ec8: e1a00004 mov r0, r4
a0006ecc: e1a02001 mov r2, r1
}
a0006ed0: e8bd4030 pop {r4, r5, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a0006ed4: ea001eaa b a000e984 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
a0006ed8: e3a0000a mov r0, #10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
a0006edc: e8bd8030 pop {r4, r5, pc}
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
a0006ee0: e3a00012 mov r0, #18
a0006ee4: 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;
a0006ee8: e59fe068 ldr lr, [pc, #104] ; a0006f58 <rtems_io_register_driver+0x168>
a0006eec: e3a0c018 mov ip, #24
a0006ef0: e00c0c94 mul ip, r4, ip
a0006ef4: e59e3000 ldr r3, [lr]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0006ef8: e793000c ldr r0, [r3, ip]
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a0006efc: 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;
a0006f00: e3500000 cmp r0, #0
a0006f04: 0a00000b beq a0006f38 <rtems_io_register_driver+0x148>
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();
a0006f08: eb000686 bl a0008928 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
a0006f0c: e3a0000c mov r0, #12
a0006f10: 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;
a0006f14: e591c004 ldr ip, [r1, #4]
a0006f18: e35c0000 cmp ip, #0
a0006f1c: 1affffc3 bne a0006e30 <rtems_io_register_driver+0x40>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
a0006f20: e3a00009 mov r0, #9
a0006f24: e8bd8030 pop {r4, r5, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0006f28: 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();
a0006f2c: eb00067d bl a0008928 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
a0006f30: 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;
a0006f34: 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;
a0006f38: e5933004 ldr r3, [r3, #4]
a0006f3c: e3530000 cmp r3, #0
a0006f40: 1afffff0 bne a0006f08 <rtems_io_register_driver+0x118>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a0006f44: e5824000 str r4, [r2]
a0006f48: eaffffd5 b a0006ea4 <rtems_io_register_driver+0xb4>
a00082f4 <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)
{
a00082f4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
a00082f8: e2506000 subs r6, r0, #0
a00082fc: 0a000014 beq a0008354 <rtems_iterate_over_all_threads+0x60>
a0008300: e59f7050 ldr r7, [pc, #80] ; a0008358 <rtems_iterate_over_all_threads+0x64>
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
a0008304: e287800c add r8, r7, #12
#if defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
a0008308: e5b73004 ldr r3, [r7, #4]!
a000830c: e5935004 ldr r5, [r3, #4]
if ( !information )
a0008310: e3550000 cmp r5, #0
a0008314: 0a00000c beq a000834c <rtems_iterate_over_all_threads+0x58>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
a0008318: e1d521b0 ldrh r2, [r5, #16]
a000831c: e3520000 cmp r2, #0
a0008320: 0a000009 beq a000834c <rtems_iterate_over_all_threads+0x58>
a0008324: e3a04001 mov r4, #1
the_thread = (Thread_Control *)information->local_table[ i ];
a0008328: e595301c ldr r3, [r5, #28]
a000832c: e7930104 ldr r0, [r3, r4, lsl #2]
if ( !the_thread )
a0008330: e3500000 cmp r0, #0
a0008334: 0a000001 beq a0008340 <rtems_iterate_over_all_threads+0x4c>
continue;
(*routine)(the_thread);
a0008338: e12fff36 blx r6
a000833c: e1d521b0 ldrh r2, [r5, #16]
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
a0008340: e2844001 add r4, r4, #1
a0008344: e1520004 cmp r2, r4
a0008348: 2afffff6 bcs a0008328 <rtems_iterate_over_all_threads+0x34>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
a000834c: e1570008 cmp r7, r8
a0008350: 1affffec bne a0008308 <rtems_iterate_over_all_threads+0x14>
a0008354: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000c514 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a000c514: 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 )
a000c518: e2514000 subs r4, r1, #0
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a000c51c: e24dd014 sub sp, sp, #20
a000c520: 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;
a000c524: 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 )
a000c528: 0a000013 beq a000c57c <rtems_rate_monotonic_get_status+0x68>
a000c52c: e28d2010 add r2, sp, #16
a000c530: e59f008c ldr r0, [pc, #140] ; a000c5c4 <rtems_rate_monotonic_get_status+0xb0>
a000c534: ebfff105 bl a0008950 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000c538: e59d2010 ldr r2, [sp, #16]
a000c53c: e1a03000 mov r3, r0
a000c540: e3520000 cmp r2, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000c544: 13a00004 movne r0, #4
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000c548: 1a00000b bne a000c57c <rtems_rate_monotonic_get_status+0x68>
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a000c54c: e5932040 ldr r2, [r3, #64] ; 0x40
status->state = the_period->state;
a000c550: 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;
a000c554: 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 ) {
a000c558: e3530000 cmp r3, #0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
status->state = the_period->state;
a000c55c: e884000c stm r4, {r2, r3}
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
a000c560: 1a000007 bne a000c584 <rtems_rate_monotonic_get_status+0x70>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
a000c564: e5843008 str r3, [r4, #8]
a000c568: e584300c str r3, [r4, #12]
_Timespec_Set_to_zero( &status->executed_since_last_period );
a000c56c: e5843010 str r3, [r4, #16]
a000c570: e5843014 str r3, [r4, #20]
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
a000c574: ebfff33f bl a0009278 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000c578: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000c57c: e28dd014 add sp, sp, #20
a000c580: e8bd8010 pop {r4, pc}
} else {
/*
* Grab the current status.
*/
valid_status =
a000c584: e1a0100d mov r1, sp
a000c588: e28d2008 add r2, sp, #8
a000c58c: ebffe7a6 bl a000642c <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
a000c590: e3500000 cmp r0, #0
a000c594: 0a000007 beq a000c5b8 <rtems_rate_monotonic_get_status+0xa4>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
a000c598: e89d000c ldm sp, {r2, r3}
a000c59c: e5842008 str r2, [r4, #8]
a000c5a0: e584300c str r3, [r4, #12]
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
a000c5a4: e28d3008 add r3, sp, #8
a000c5a8: e893000c ldm r3, {r2, r3}
a000c5ac: e5842010 str r2, [r4, #16]
a000c5b0: e5843014 str r3, [r4, #20]
a000c5b4: eaffffee b a000c574 <rtems_rate_monotonic_get_status+0x60>
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
a000c5b8: ebfff32e bl a0009278 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a000c5bc: e3a0000b mov r0, #11 <== NOT EXECUTED
a000c5c0: eaffffed b a000c57c <rtems_rate_monotonic_get_status+0x68> <== NOT EXECUTED
a000c61c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000c61c: 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 )
a000c620: e2525000 subs r5, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000c624: e1a04000 mov r4, r0
a000c628: e1a06001 mov r6, r1
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
a000c62c: 0a000053 beq a000c780 <rtems_task_mode+0x164>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
a000c630: e59f9158 ldr r9, [pc, #344] ; a000c790 <rtems_task_mode+0x174>
a000c634: e5997004 ldr r7, [r9, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a000c638: e5978100 ldr r8, [r7, #256] ; 0x100
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a000c63c: e5d7a074 ldrb sl, [r7, #116] ; 0x74
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000c640: e597307c ldr r3, [r7, #124] ; 0x7c
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000c644: 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;
a000c648: e35a0000 cmp sl, #0
a000c64c: 03a0ac01 moveq sl, #256 ; 0x100
a000c650: 13a0a000 movne sl, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000c654: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
a000c658: 138aac02 orrne sl, sl, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000c65c: e35b0000 cmp fp, #0
a000c660: 03a0bb01 moveq fp, #1024 ; 0x400
a000c664: 13a0b000 movne fp, #0
old_mode |= _ISR_Get_level();
a000c668: ebfff1e3 bl a0008dfc <_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;
a000c66c: e18bb000 orr fp, fp, r0
old_mode |= _ISR_Get_level();
a000c670: e18ba00a orr sl, fp, sl
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000c674: 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;
a000c678: e585a000 str sl, [r5]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000c67c: 0a000003 beq a000c690 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
a000c680: e3140c01 tst r4, #256 ; 0x100
a000c684: 13a03000 movne r3, #0
a000c688: 03a03001 moveq r3, #1
a000c68c: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
a000c690: e3160c02 tst r6, #512 ; 0x200
a000c694: 1a00001c bne a000c70c <rtems_task_mode+0xf0>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000c698: e3160080 tst r6, #128 ; 0x80
a000c69c: 1a000023 bne a000c730 <rtems_task_mode+0x114>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
a000c6a0: e2166b01 ands r6, r6, #1024 ; 0x400
a000c6a4: 0a000012 beq a000c6f4 <rtems_task_mode+0xd8>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a000c6a8: e5d82008 ldrb r2, [r8, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
a000c6ac: e3140b01 tst r4, #1024 ; 0x400
a000c6b0: 13a03000 movne r3, #0
a000c6b4: 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 ) {
a000c6b8: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000c6bc: 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 ) {
a000c6c0: 0a00000b beq a000c6f4 <rtems_task_mode+0xd8>
asr->is_enabled = is_asr_enabled;
a000c6c4: e5c83008 strb r3, [r8, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c6c8: e10f3000 mrs r3, CPSR
a000c6cc: e3832080 orr r2, r3, #128 ; 0x80
a000c6d0: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
a000c6d4: e5981018 ldr r1, [r8, #24]
information->signals_pending = information->signals_posted;
a000c6d8: e5982014 ldr r2, [r8, #20]
information->signals_posted = _signals;
a000c6dc: 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;
a000c6e0: e5882018 str r2, [r8, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c6e4: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
a000c6e8: e5986014 ldr r6, [r8, #20]
a000c6ec: e3560000 cmp r6, #0
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000c6f0: 13a06001 movne r6, #1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a000c6f4: e59f3098 ldr r3, [pc, #152] ; a000c794 <rtems_task_mode+0x178>
a000c6f8: e5933000 ldr r3, [r3]
a000c6fc: e3530003 cmp r3, #3
a000c700: 0a00000d beq a000c73c <rtems_task_mode+0x120>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000c704: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c708: 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) ) {
a000c70c: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a000c710: 13a03001 movne r3, #1
a000c714: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000c718: 159f3078 ldrne r3, [pc, #120] ; a000c798 <rtems_task_mode+0x17c>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a000c71c: 0587307c streq r3, [r7, #124] ; 0x7c
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000c720: 15933000 ldrne r3, [r3]
a000c724: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000c728: e3160080 tst r6, #128 ; 0x80
a000c72c: 0affffdb beq a000c6a0 <rtems_task_mode+0x84>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
a000c730: e2040080 and r0, r4, #128 ; 0x80
a000c734: ebfff1ab bl a0008de8 <_CPU_ISR_Set_level>
a000c738: eaffffd8 b a000c6a0 <rtems_task_mode+0x84>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
a000c73c: e3560000 cmp r6, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a000c740: e5993004 ldr r3, [r9, #4]
if ( are_signals_pending ||
a000c744: 1a000008 bne a000c76c <rtems_task_mode+0x150>
a000c748: e59f2040 ldr r2, [pc, #64] ; a000c790 <rtems_task_mode+0x174>
a000c74c: e5922008 ldr r2, [r2, #8]
a000c750: e1530002 cmp r3, r2
a000c754: 0a00000b beq a000c788 <rtems_task_mode+0x16c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
a000c758: e5d33074 ldrb r3, [r3, #116] ; 0x74
a000c75c: e3530000 cmp r3, #0
a000c760: 1a000001 bne a000c76c <rtems_task_mode+0x150>
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000c764: e1a00006 mov r0, r6 <== NOT EXECUTED
}
a000c768: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a000c76c: e3a03001 mov r3, #1
a000c770: e5c93010 strb r3, [r9, #16]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
a000c774: ebffeb61 bl a0007500 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
a000c778: e3a00000 mov r0, #0
a000c77c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
a000c780: e3a00009 mov r0, #9
a000c784: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000c788: e1a00006 mov r0, r6
a000c78c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}