RTEMS 4.11Annotated Report
Wed Jan 26 15:50:15 2011
00014f4c <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
14f4c: 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
)
{
14f50: 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 ) {
14f54: e1520003 cmp r2, r3
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
14f58: e1a06000 mov r6, r0
14f5c: e1a0a001 mov sl, r1
14f60: e1a07002 mov r7, r2
14f64: e59d8020 ldr r8, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
14f68: 8a000013 bhi 14fbc <_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 ) {
14f6c: e5905048 ldr r5, [r0, #72] ; 0x48
14f70: e3550000 cmp r5, #0
*count = 0;
14f74: 13a00000 movne r0, #0
14f78: 15880000 strne r0, [r8]
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
14f7c: 0a000007 beq 14fa0 <_CORE_message_queue_Broadcast+0x54>
14f80: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
14f84: e594002c ldr r0, [r4, #44] ; 0x2c
14f88: e1a0100a mov r1, sl
14f8c: e1a02007 mov r2, r7
14f90: eb001e3e bl 1c890 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
14f94: e5943028 ldr r3, [r4, #40] ; 0x28
14f98: e5837000 str r7, [r3]
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
14f9c: e2855001 add r5, r5, #1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
14fa0: e1a00006 mov r0, r6
14fa4: eb000a3d bl 178a0 <_Thread_queue_Dequeue>
14fa8: e2504000 subs r4, r0, #0
14fac: 1afffff4 bne 14f84 <_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;
14fb0: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
14fb4: e1a00004 mov r0, r4
14fb8: 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;
14fbc: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
14fc0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0000a2b8 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a2b8: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a2bc: e59f2124 ldr r2, [pc, #292] ; a3e8 <_CORE_mutex_Seize_interrupt_trylock+0x130>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a2c0: e593c050 ldr ip, [r3, #80] ; 0x50
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a2c4: e3a00000 mov r0, #0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a2c8: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a2cc: e15c0000 cmp ip, r0
a2d0: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a2d4: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a2d8: 0a00002c beq a390 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
a2dc: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a2e0: e5920008 ldr r0, [r2, #8]
a2e4: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a2e8: e3a00001 mov r0, #1
a2ec: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a2f0: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a2f4: e3500002 cmp r0, #2
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
a2f8: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a2fc: 0a000001 beq a308 <_CORE_mutex_Seize_interrupt_trylock+0x50>
a300: e3500003 cmp r0, #3
a304: 1a000004 bne a31c <_CORE_mutex_Seize_interrupt_trylock+0x64>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a308: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a30c: e3500003 cmp r0, #3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a310: e28c4001 add r4, ip, #1
a314: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a318: 0a000000 beq a320 <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
a31c: ea00002b b a3d0 <_CORE_mutex_Seize_interrupt_trylock+0x118>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a320: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
a324: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
a328: e1540000 cmp r4, r0
a32c: 1a000000 bne a334 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
a330: ea000026 b a3d0 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
}
if ( current > ceiling ) {
a334: 9a00000b bls a368 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a338: e59f20ac ldr r2, [pc, #172] ; a3ec <_CORE_mutex_Seize_interrupt_trylock+0x134>
a33c: e5920000 ldr r0, [r2]
a340: e2800001 add r0, r0, #1
a344: e5820000 str r0, [r2]
a348: e5912000 ldr r2, [r1]
a34c: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a350: e3a02000 mov r2, #0
a354: e593005c ldr r0, [r3, #92] ; 0x5c
a358: e593104c ldr r1, [r3, #76] ; 0x4c
a35c: ebfff331 bl 7028 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a360: ebfff455 bl 74bc <_Thread_Enable_dispatch>
a364: ea00001b b a3d8 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a368: e3a00006 mov r0, #6
a36c: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a370: e3a00001 mov r0, #1
a374: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a378: e3a00000 mov r0, #0
a37c: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a380: e582c01c str ip, [r2, #28]
a384: e5913000 ldr r3, [r1]
a388: e129f003 msr CPSR_fc, r3
a38c: e8bd8010 pop {r4, pc}
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
a390: e593005c ldr r0, [r3, #92] ; 0x5c
a394: e1500002 cmp r0, r2
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a398: 13a00001 movne r0, #1
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
a39c: 18bd8010 popne {r4, pc}
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a3a0: e5932040 ldr r2, [r3, #64] ; 0x40
a3a4: e3520000 cmp r2, #0
a3a8: 0a000002 beq a3b8 <_CORE_mutex_Seize_interrupt_trylock+0x100>
a3ac: e3520001 cmp r2, #1
a3b0: 1a00000a bne a3e0 <_CORE_mutex_Seize_interrupt_trylock+0x128>
a3b4: ea000003 b a3c8 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a3b8: e5932054 ldr r2, [r3, #84] ; 0x54
a3bc: e2822001 add r2, r2, #1
a3c0: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
a3c4: ea000001 b a3d0 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a3c8: e3a03002 mov r3, #2 <== NOT EXECUTED
a3cc: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
a3d0: e5913000 ldr r3, [r1]
a3d4: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a3d8: e3a00000 mov r0, #0
a3dc: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a3e0: e3a00001 mov r0, #1
a3e4: e8bd8010 pop {r4, pc}
0000a968 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a968: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a96c: e1a05001 mov r5, r1
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a970: e5901020 ldr r1, [r0, #32]
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a974: e24dd028 sub sp, sp, #40 ; 0x28
a978: e58d3018 str r3, [sp, #24]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a97c: e58d1010 str r1, [sp, #16]
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
a980: e5903010 ldr r3, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a984: e5901030 ldr r1, [r0, #48] ; 0x30
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
a988: e3a08000 mov r8, #0
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
a98c: e0956002 adds r6, r5, r2
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a990: e1a04000 mov r4, r0
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
a994: e58d3014 str r3, [sp, #20]
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
a998: e58d8024 str r8, [sp, #36] ; 0x24
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a99c: e5903014 ldr r3, [r0, #20]
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
a9a0: e58d8020 str r8, [sp, #32]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a9a4: e58d101c str r1, [sp, #28]
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
a9a8: 21a00008 movcs r0, r8
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
a9ac: 2a00009d bcs ac28 <_Heap_Extend+0x2c0>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
a9b0: e28d1024 add r1, sp, #36 ; 0x24
a9b4: e58d1000 str r1, [sp]
a9b8: e28d1020 add r1, sp, #32
a9bc: e58d1004 str r1, [sp, #4]
a9c0: e1a00005 mov r0, r5
a9c4: e1a01002 mov r1, r2
a9c8: e59d2014 ldr r2, [sp, #20]
a9cc: ebffeeda bl 653c <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
a9d0: e3500000 cmp r0, #0
a9d4: 0a000093 beq ac28 <_Heap_Extend+0x2c0>
a9d8: e59da010 ldr sl, [sp, #16]
a9dc: e1a07008 mov r7, r8
a9e0: e1a09008 mov r9, r8
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a9e4: e5941018 ldr r1, [r4, #24]
a9e8: e1a03008 mov r3, r8
a9ec: e1a0c004 mov ip, r4
a9f0: ea000000 b a9f8 <_Heap_Extend+0x90>
a9f4: e1a0100a mov r1, sl
uintptr_t const sub_area_end = start_block->prev_size;
a9f8: e59a4000 ldr r4, [sl]
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
a9fc: e1560001 cmp r6, r1
aa00: 93a00000 movls r0, #0
aa04: 83a00001 movhi r0, #1
aa08: e1550004 cmp r5, r4
aa0c: 23a00000 movcs r0, #0
aa10: e3500000 cmp r0, #0
aa14: 1a000082 bne ac24 <_Heap_Extend+0x2bc>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
aa18: e1560001 cmp r6, r1
aa1c: 01a0300a moveq r3, sl
aa20: 0a000001 beq aa2c <_Heap_Extend+0xc4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
aa24: e1560004 cmp r6, r4
aa28: 31a0900a movcc r9, sl
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
aa2c: e1a00004 mov r0, r4
aa30: e59d1014 ldr r1, [sp, #20]
aa34: e58d300c str r3, [sp, #12]
aa38: e58dc008 str ip, [sp, #8]
aa3c: eb001555 bl ff98 <__umodsi3>
aa40: e244b008 sub fp, r4, #8
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
aa44: e1540005 cmp r4, r5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
aa48: e060000b rsb r0, r0, fp
aa4c: e59d300c ldr r3, [sp, #12]
aa50: e59dc008 ldr ip, [sp, #8]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
aa54: 01a07000 moveq r7, r0
start_block->prev_size = extend_area_end;
aa58: 058a6000 streq r6, [sl]
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
aa5c: 0a000000 beq aa64 <_Heap_Extend+0xfc>
aa60: 31a08000 movcc r8, r0
- 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;
aa64: e590a004 ldr sl, [r0, #4]
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
aa68: e59d2010 ldr r2, [sp, #16]
aa6c: e3caa001 bic sl, sl, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
aa70: e080a00a add sl, r0, sl
aa74: e15a0002 cmp sl, r2
aa78: 1affffdd bne a9f4 <_Heap_Extend+0x8c>
aa7c: e1a02009 mov r2, r9
aa80: e1a09003 mov r9, r3
if ( extend_area_begin < heap->area_begin ) {
aa84: e59c3018 ldr r3, [ip, #24]
aa88: e1550003 cmp r5, r3
aa8c: e1a0400c mov r4, ip
heap->area_begin = extend_area_begin;
aa90: 358c5018 strcc r5, [ip, #24]
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
aa94: 3a000002 bcc aaa4 <_Heap_Extend+0x13c>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
aa98: e59c301c ldr r3, [ip, #28]
aa9c: e1530006 cmp r3, r6
heap->area_end = extend_area_end;
aaa0: 358c601c strcc r6, [ip, #28]
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
aaa4: e59d1024 ldr r1, [sp, #36] ; 0x24
aaa8: e59d3020 ldr r3, [sp, #32]
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
aaac: e0610003 rsb r0, r1, r3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
aab0: e5816000 str r6, [r1]
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
aab4: e380c001 orr ip, r0, #1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
aab8: e5830000 str r0, [r3]
extend_last_block->size_and_flag = 0;
aabc: e3a00000 mov r0, #0
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
aac0: e581c004 str ip, [r1, #4]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
aac4: e5830004 str r0, [r3, #4]
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
aac8: e5940020 ldr r0, [r4, #32]
aacc: e1500001 cmp r0, r1
heap->first_block = extend_first_block;
aad0: 85841020 strhi r1, [r4, #32]
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
aad4: 8a000002 bhi aae4 <_Heap_Extend+0x17c>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
aad8: e5941024 ldr r1, [r4, #36] ; 0x24
aadc: e1510003 cmp r1, r3
heap->last_block = extend_last_block;
aae0: 35843024 strcc r3, [r4, #36] ; 0x24
}
if ( merge_below_block != NULL ) {
aae4: e3590000 cmp r9, #0
aae8: 0a000010 beq ab30 <_Heap_Extend+0x1c8>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
aaec: e594a010 ldr sl, [r4, #16] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
aaf0: e2855008 add r5, r5, #8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
aaf4: e1a00005 mov r0, r5 <== NOT EXECUTED
aaf8: e1a0100a mov r1, sl <== NOT EXECUTED
aafc: eb001525 bl ff98 <__umodsi3> <== NOT EXECUTED
if ( remainder != 0 ) {
ab00: e3500000 cmp r0, #0 <== NOT EXECUTED
return value - remainder + alignment;
ab04: 1085500a addne r5, r5, sl <== NOT EXECUTED
ab08: 10605005 rsbne r5, r0, r5 <== NOT EXECUTED
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ab0c: e5993000 ldr r3, [r9] <== NOT EXECUTED
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
ab10: e2451008 sub r1, r5, #8 <== NOT EXECUTED
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ab14: e5053008 str r3, [r5, #-8] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
ab18: e0613009 rsb r3, r1, r9 <== NOT EXECUTED
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
ab1c: e3833001 orr r3, r3, #1 <== NOT EXECUTED
ab20: e5053004 str r3, [r5, #-4] <== NOT EXECUTED
_Heap_Free_block( heap, new_first_block );
ab24: e1a00004 mov r0, r4 <== NOT EXECUTED
ab28: ebffff86 bl a948 <_Heap_Free_block> <== NOT EXECUTED
ab2c: ea000004 b ab44 <_Heap_Extend+0x1dc> <== NOT EXECUTED
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
ab30: e3520000 cmp r2, #0
_Heap_Link_below(
ab34: 159d3020 ldrne r3, [sp, #32]
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
ab38: 10632002 rsbne r2, r3, r2
ab3c: 13822001 orrne r2, r2, #1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
ab40: 15832004 strne r2, [r3, #4]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
ab44: e3570000 cmp r7, #0
ab48: 0a000012 beq ab98 <_Heap_Extend+0x230>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
ab4c: e2466008 sub r6, r6, #8
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
ab50: e0676006 rsb r6, r7, r6
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ab54: e5941010 ldr r1, [r4, #16]
ab58: e1a00006 mov r0, r6
ab5c: eb00150d bl ff98 <__umodsi3>
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ab60: e5972004 ldr r2, [r7, #4]
ab64: e0606006 rsb r6, r0, r6
ab68: e0662002 rsb r2, r6, r2
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ab6c: e0863007 add r3, r6, r7
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
ab70: e3822001 orr r2, r2, #1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ab74: e5832004 str r2, [r3, #4]
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ab78: e5973004 ldr r3, [r7, #4]
ab7c: e2033001 and r3, r3, #1
block->size_and_flag = size | flag;
ab80: e1866003 orr r6, r6, r3
ab84: e5876004 str r6, [r7, #4]
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ab88: e1a00004 mov r0, r4
ab8c: e1a01007 mov r1, r7
ab90: ebffff6c bl a948 <_Heap_Free_block>
ab94: ea00000b b abc8 <_Heap_Extend+0x260>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
ab98: e3580000 cmp r8, #0
ab9c: 0a000009 beq abc8 <_Heap_Extend+0x260>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
aba0: e5982004 ldr r2, [r8, #4]
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
aba4: e59d1024 ldr r1, [sp, #36] ; 0x24
aba8: e2022001 and r2, r2, #1
abac: e0681001 rsb r1, r8, r1
block->size_and_flag = size | flag;
abb0: e1812002 orr r2, r1, r2
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
abb4: e59d3020 ldr r3, [sp, #32]
abb8: e5882004 str r2, [r8, #4]
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
abbc: e5932004 ldr r2, [r3, #4]
abc0: e3822001 orr r2, r2, #1
abc4: e5832004 str r2, [r3, #4]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
abc8: e3570000 cmp r7, #0
abcc: 03590000 cmpeq r9, #0
_Heap_Free_block( heap, extend_first_block );
abd0: 01a00004 moveq r0, r4
abd4: 059d1024 ldreq r1, [sp, #36] ; 0x24
abd8: 0bffff5a bleq a948 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
abdc: e2841020 add r1, r4, #32
abe0: e891000a ldm r1, {r1, r3}
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
abe4: e5932004 ldr r2, [r3, #4]
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
abe8: e0631001 rsb r1, r3, r1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
abec: e2022001 and r2, r2, #1
block->size_and_flag = size | flag;
abf0: e1812002 orr r2, r1, r2
abf4: e5832004 str r2, [r3, #4]
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
abf8: e59d101c ldr r1, [sp, #28]
abfc: e284202c add r2, r4, #44 ; 0x2c
ac00: e892000c ldm r2, {r2, r3}
ac04: e0613003 rsb r3, r1, r3
/* Statistics */
stats->size += extended_size;
ac08: e0822003 add r2, r2, r3
ac0c: e584202c str r2, [r4, #44] ; 0x2c
if ( extended_size_ptr != NULL )
ac10: e59d2018 ldr r2, [sp, #24]
ac14: e3520000 cmp r2, #0
*extended_size_ptr = extended_size;
ac18: 15823000 strne r3, [r2]
return true;
ac1c: e3a00001 mov r0, #1
ac20: ea000000 b ac28 <_Heap_Extend+0x2c0>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
ac24: e3a00000 mov r0, #0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ac28: e28dd028 add sp, sp, #40 ; 0x28
ac2c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000709c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
709c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
70a0: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
70a4: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
70a8: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
70ac: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
70b0: e59f4500 ldr r4, [pc, #1280] ; 75b8 <_Heap_Walk+0x51c>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
70b4: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
70b8: e59f34fc ldr r3, [pc, #1276] ; 75bc <_Heap_Walk+0x520>
70bc: e31200ff tst r2, #255 ; 0xff
70c0: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
70c4: e59f34f4 ldr r3, [pc, #1268] ; 75c0 <_Heap_Walk+0x524>
70c8: e5933000 ldr r3, [r3]
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
70cc: e590c020 ldr ip, [r0, #32]
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
70d0: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
70d4: e1a06000 mov r6, r0
70d8: e1a05001 mov r5, r1
uintptr_t const page_size = heap->page_size;
70dc: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
70e0: e58dc020 str ip, [sp, #32]
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
70e4: 1a000127 bne 7588 <_Heap_Walk+0x4ec>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
70e8: e59dc024 ldr ip, [sp, #36] ; 0x24
70ec: e58dc000 str ip, [sp]
70f0: e5903018 ldr r3, [r0, #24]
70f4: e58d3004 str r3, [sp, #4]
70f8: e590301c ldr r3, [r0, #28]
70fc: e59d2020 ldr r2, [sp, #32]
7100: e58d3008 str r3, [sp, #8]
7104: e59d3028 ldr r3, [sp, #40] ; 0x28
7108: e58d200c str r2, [sp, #12]
710c: e58d3010 str r3, [sp, #16]
7110: e5903008 ldr r3, [r0, #8]
7114: e58d3014 str r3, [sp, #20]
7118: e590300c ldr r3, [r0, #12]
711c: e59f24a0 ldr r2, [pc, #1184] ; 75c4 <_Heap_Walk+0x528>
7120: e58d3018 str r3, [sp, #24]
7124: e1a00001 mov r0, r1
7128: e1a03009 mov r3, r9
712c: e3a01000 mov r1, #0
7130: e1a0e00f mov lr, pc
7134: e12fff14 bx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
7138: e3590000 cmp r9, #0
713c: 1a000006 bne 715c <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
7140: e1a00005 mov r0, r5
7144: e3a01001 mov r1, #1
7148: e59f2478 ldr r2, [pc, #1144] ; 75c8 <_Heap_Walk+0x52c>
714c: e1a0e00f mov lr, pc
7150: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7154: e1a08009 mov r8, r9
7158: ea00010b b 758c <_Heap_Walk+0x4f0>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
715c: e2198007 ands r8, r9, #7
(*printer)(
7160: 11a00005 movne r0, r5
7164: 13a01001 movne r1, #1
7168: 159f245c ldrne r2, [pc, #1116] ; 75cc <_Heap_Walk+0x530>
716c: 11a03009 movne r3, r9
7170: 1a00010c bne 75a8 <_Heap_Walk+0x50c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
7174: e59d0024 ldr r0, [sp, #36] ; 0x24
7178: e1a01009 mov r1, r9
717c: ebffe798 bl fe4 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
7180: e250b000 subs fp, r0, #0
7184: 0a000006 beq 71a4 <_Heap_Walk+0x108>
(*printer)(
7188: e1a00005 mov r0, r5
718c: e3a01001 mov r1, #1
7190: e59f2438 ldr r2, [pc, #1080] ; 75d0 <_Heap_Walk+0x534>
7194: e59d3024 ldr r3, [sp, #36] ; 0x24
7198: e1a0e00f mov lr, pc
719c: e12fff14 bx r4
71a0: ea0000f9 b 758c <_Heap_Walk+0x4f0>
71a4: e59dc020 ldr ip, [sp, #32]
71a8: e1a01009 mov r1, r9
71ac: e28c0008 add r0, ip, #8
71b0: ebffe78b bl fe4 <__umodsi3>
);
return false;
}
if (
71b4: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
71b8: 11a00005 movne r0, r5
71bc: 13a01001 movne r1, #1
71c0: 159f240c ldrne r2, [pc, #1036] ; 75d4 <_Heap_Walk+0x538>
71c4: 159d3020 ldrne r3, [sp, #32]
71c8: 1a0000cc bne 7500 <_Heap_Walk+0x464>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
71cc: e59d2020 ldr r2, [sp, #32]
71d0: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
71d4: e2188001 ands r8, r8, #1
(*printer)(
71d8: 01a00005 moveq r0, r5
71dc: 03a01001 moveq r1, #1
71e0: 059f23f0 ldreq r2, [pc, #1008] ; 75d8 <_Heap_Walk+0x53c>
71e4: 0a000009 beq 7210 <_Heap_Walk+0x174>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
71e8: e59d3028 ldr r3, [sp, #40] ; 0x28
71ec: e5937004 ldr r7, [r3, #4]
71f0: e3c77001 bic r7, r7, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
71f4: e0837007 add r7, r3, r7
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
71f8: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
71fc: e2188001 ands r8, r8, #1
7200: 1a000005 bne 721c <_Heap_Walk+0x180>
(*printer)(
7204: e59f23d0 ldr r2, [pc, #976] ; 75dc <_Heap_Walk+0x540>
7208: e1a00005 mov r0, r5
720c: e3a01001 mov r1, #1
7210: e1a0e00f mov lr, pc
7214: e12fff14 bx r4
7218: ea0000db b 758c <_Heap_Walk+0x4f0>
);
return false;
}
if (
721c: e59dc020 ldr ip, [sp, #32]
7220: e157000c cmp r7, ip
7224: 0a000006 beq 7244 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
7228: e1a00005 mov r0, r5 <== NOT EXECUTED
722c: e3a01001 mov r1, #1 <== NOT EXECUTED
7230: e59f23a8 ldr r2, [pc, #936] ; 75e0 <_Heap_Walk+0x544> <== NOT EXECUTED
7234: e1a0e00f mov lr, pc <== NOT EXECUTED
7238: e12fff14 bx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
723c: e1a0800a mov r8, sl <== NOT EXECUTED
7240: ea0000d1 b 758c <_Heap_Walk+0x4f0> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
7244: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
7248: e5968008 ldr r8, [r6, #8]
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
724c: e1a0a006 mov sl, r6
7250: ea000034 b 7328 <_Heap_Walk+0x28c>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
7254: e5963020 ldr r3, [r6, #32]
7258: e1530008 cmp r3, r8
725c: 83a0c000 movhi ip, #0
7260: 8a000003 bhi 7274 <_Heap_Walk+0x1d8>
7264: e596c024 ldr ip, [r6, #36] ; 0x24
7268: e15c0008 cmp ip, r8
726c: 33a0c000 movcc ip, #0
7270: 23a0c001 movcs ip, #1
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
7274: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
7278: 01a00005 moveq r0, r5
727c: 03a01001 moveq r1, #1
7280: 059f235c ldreq r2, [pc, #860] ; 75e4 <_Heap_Walk+0x548>
7284: 0a000012 beq 72d4 <_Heap_Walk+0x238>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
7288: e2880008 add r0, r8, #8
728c: e1a0100b mov r1, fp
7290: ebffe753 bl fe4 <__umodsi3>
);
return false;
}
if (
7294: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
7298: 11a00005 movne r0, r5
729c: 13a01001 movne r1, #1
72a0: 159f2340 ldrne r2, [pc, #832] ; 75e8 <_Heap_Walk+0x54c>
72a4: 11a03008 movne r3, r8
72a8: 1a0000be bne 75a8 <_Heap_Walk+0x50c>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
72ac: e5983004 ldr r3, [r8, #4]
72b0: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
72b4: e0883003 add r3, r8, r3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
72b8: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
72bc: e2133001 ands r3, r3, #1
72c0: e58d302c str r3, [sp, #44] ; 0x2c
72c4: 0a000009 beq 72f0 <_Heap_Walk+0x254>
(*printer)(
72c8: e59f231c ldr r2, [pc, #796] ; 75ec <_Heap_Walk+0x550>
72cc: e1a00005 mov r0, r5
72d0: e3a01001 mov r1, #1
72d4: e1a03008 mov r3, r8
72d8: e58dc01c str ip, [sp, #28]
72dc: e1a0e00f mov lr, pc
72e0: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
72e4: e59dc01c ldr ip, [sp, #28]
72e8: e1a0800c mov r8, ip
72ec: ea0000a6 b 758c <_Heap_Walk+0x4f0>
);
return false;
}
if ( free_block->prev != prev_block ) {
72f0: e598300c ldr r3, [r8, #12]
72f4: e153000a cmp r3, sl
72f8: 0a000008 beq 7320 <_Heap_Walk+0x284>
(*printer)(
72fc: e58d3000 str r3, [sp]
7300: e1a00005 mov r0, r5
7304: e1a03008 mov r3, r8
7308: e3a01001 mov r1, #1
730c: e59f22dc ldr r2, [pc, #732] ; 75f0 <_Heap_Walk+0x554>
7310: e1a0e00f mov lr, pc
7314: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7318: e59d802c ldr r8, [sp, #44] ; 0x2c
731c: ea00009a b 758c <_Heap_Walk+0x4f0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
7320: e1a0a008 mov sl, r8
7324: e5988008 ldr r8, [r8, #8]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
7328: e1580006 cmp r8, r6
732c: 1affffc8 bne 7254 <_Heap_Walk+0x1b8>
7330: ea000000 b 7338 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
7334: e1a07008 mov r7, r8
return true;
}
7338: e5973004 ldr r3, [r7, #4]
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
733c: e5962020 ldr r2, [r6, #32]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
7340: e3c3a001 bic sl, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
7344: e087800a add r8, r7, sl
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
7348: e1520008 cmp r2, r8
734c: 83a0b000 movhi fp, #0
7350: 8a000003 bhi 7364 <_Heap_Walk+0x2c8>
7354: e596b024 ldr fp, [r6, #36] ; 0x24
7358: e15b0008 cmp fp, r8
735c: 33a0b000 movcc fp, #0
7360: 23a0b001 movcs fp, #1
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
7364: e21bb0ff ands fp, fp, #255 ; 0xff
7368: 1a000007 bne 738c <_Heap_Walk+0x2f0>
(*printer)(
736c: e58d8000 str r8, [sp]
7370: e1a00005 mov r0, r5
7374: e3a01001 mov r1, #1
7378: e59f2274 ldr r2, [pc, #628] ; 75f4 <_Heap_Walk+0x558>
737c: e1a03007 mov r3, r7
7380: e1a0e00f mov lr, pc
7384: e12fff14 bx r4
7388: ea00005e b 7508 <_Heap_Walk+0x46c>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
738c: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
7390: e1a0000a mov r0, sl
7394: e1a01009 mov r1, r9
7398: e057b002 subs fp, r7, r2
739c: 13a0b001 movne fp, #1
73a0: e58d301c str r3, [sp, #28]
73a4: ebffe70e bl fe4 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
73a8: e3500000 cmp r0, #0
73ac: e59d301c ldr r3, [sp, #28]
73b0: 0a000005 beq 73cc <_Heap_Walk+0x330>
73b4: e35b0000 cmp fp, #0
(*printer)(
73b8: 158da000 strne sl, [sp]
73bc: 11a00005 movne r0, r5
73c0: 13a01001 movne r1, #1
73c4: 159f222c ldrne r2, [pc, #556] ; 75f8 <_Heap_Walk+0x55c>
73c8: 1a000014 bne 7420 <_Heap_Walk+0x384>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
73cc: e59dc024 ldr ip, [sp, #36] ; 0x24
73d0: e15a000c cmp sl, ip
73d4: 2a000009 bcs 7400 <_Heap_Walk+0x364>
73d8: e35b0000 cmp fp, #0
73dc: 0a000007 beq 7400 <_Heap_Walk+0x364>
(*printer)(
73e0: e88d1400 stm sp, {sl, ip}
73e4: e1a00005 mov r0, r5
73e8: e3a01001 mov r1, #1
73ec: e59f2208 ldr r2, [pc, #520] ; 75fc <_Heap_Walk+0x560>
73f0: e1a03007 mov r3, r7
73f4: e1a0e00f mov lr, pc
73f8: e12fff14 bx r4
73fc: ea00006b b 75b0 <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
7400: e1580007 cmp r8, r7
7404: 8a000009 bhi 7430 <_Heap_Walk+0x394>
7408: e35b0000 cmp fp, #0
740c: 0a000007 beq 7430 <_Heap_Walk+0x394>
(*printer)(
7410: e58d8000 str r8, [sp]
7414: e59f21e4 ldr r2, [pc, #484] ; 7600 <_Heap_Walk+0x564>
7418: e1a00005 mov r0, r5
741c: e3a01001 mov r1, #1
7420: e1a03007 mov r3, r7
7424: e1a0e00f mov lr, pc
7428: e12fff14 bx r4
742c: ea00005f b 75b0 <_Heap_Walk+0x514>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
7430: e203b001 and fp, r3, #1
7434: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
7438: e3130001 tst r3, #1
743c: 1a00003b bne 7530 <_Heap_Walk+0x494>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
7440: e597200c ldr r2, [r7, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
7444: e5963008 ldr r3, [r6, #8]
7448: e1520003 cmp r2, r3
block = next_block;
} while ( block != first_block );
return true;
}
744c: e596100c ldr r1, [r6, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
7450: 059f01ac ldreq r0, [pc, #428] ; 7604 <_Heap_Walk+0x568>
7454: 0a000003 beq 7468 <_Heap_Walk+0x3cc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
7458: e59f31a8 ldr r3, [pc, #424] ; 7608 <_Heap_Walk+0x56c>
745c: e1520006 cmp r2, r6
7460: e59f01a4 ldr r0, [pc, #420] ; 760c <_Heap_Walk+0x570>
7464: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
7468: e5973008 ldr r3, [r7, #8]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
746c: e1530001 cmp r3, r1
7470: 059f1198 ldreq r1, [pc, #408] ; 7610 <_Heap_Walk+0x574>
7474: 0a000003 beq 7488 <_Heap_Walk+0x3ec>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
7478: e59fc194 ldr ip, [pc, #404] ; 7614 <_Heap_Walk+0x578>
747c: e1530006 cmp r3, r6
7480: e59f1184 ldr r1, [pc, #388] ; 760c <_Heap_Walk+0x570>
7484: 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)(
7488: e58d2004 str r2, [sp, #4]
748c: e58d0008 str r0, [sp, #8]
7490: e58d300c str r3, [sp, #12]
7494: e58d1010 str r1, [sp, #16]
7498: e1a03007 mov r3, r7
749c: e58da000 str sl, [sp]
74a0: e1a00005 mov r0, r5
74a4: e3a01000 mov r1, #0
74a8: e59f2168 ldr r2, [pc, #360] ; 7618 <_Heap_Walk+0x57c>
74ac: e1a0e00f mov lr, pc
74b0: e12fff14 bx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
74b4: e5983000 ldr r3, [r8]
74b8: e15a0003 cmp sl, r3
74bc: 0a000009 beq 74e8 <_Heap_Walk+0x44c>
(*printer)(
74c0: e58d3004 str r3, [sp, #4]
74c4: e58da000 str sl, [sp]
74c8: e58d8008 str r8, [sp, #8]
74cc: e1a00005 mov r0, r5
74d0: e3a01001 mov r1, #1
74d4: e59f2140 ldr r2, [pc, #320] ; 761c <_Heap_Walk+0x580>
74d8: e1a03007 mov r3, r7
74dc: e1a0e00f mov lr, pc
74e0: e12fff14 bx r4
74e4: ea000031 b 75b0 <_Heap_Walk+0x514>
);
return false;
}
if ( !prev_used ) {
74e8: e35b0000 cmp fp, #0
74ec: 1a000007 bne 7510 <_Heap_Walk+0x474>
(*printer)(
74f0: e59f2128 ldr r2, [pc, #296] ; 7620 <_Heap_Walk+0x584>
74f4: e1a00005 mov r0, r5
74f8: e3a01001 mov r1, #1
74fc: e1a03007 mov r3, r7
7500: e1a0e00f mov lr, pc
7504: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
7508: e1a0800b mov r8, fp
750c: ea00001e b 758c <_Heap_Walk+0x4f0>
block = next_block;
} while ( block != first_block );
return true;
}
7510: e5963008 ldr r3, [r6, #8]
7514: ea000002 b 7524 <_Heap_Walk+0x488>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
7518: e1530007 cmp r3, r7
751c: 0a000016 beq 757c <_Heap_Walk+0x4e0>
return true;
}
free_block = free_block->next;
7520: 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 ) {
7524: e1530006 cmp r3, r6
7528: 1afffffa bne 7518 <_Heap_Walk+0x47c>
752c: ea000019 b 7598 <_Heap_Walk+0x4fc>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
7530: e35b0000 cmp fp, #0
7534: 0a000007 beq 7558 <_Heap_Walk+0x4bc>
(*printer)(
7538: e58da000 str sl, [sp]
753c: e1a00005 mov r0, r5
7540: e3a01000 mov r1, #0
7544: e59f20d8 ldr r2, [pc, #216] ; 7624 <_Heap_Walk+0x588>
7548: e1a03007 mov r3, r7
754c: e1a0e00f mov lr, pc
7550: e12fff14 bx r4
7554: ea000008 b 757c <_Heap_Walk+0x4e0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
7558: e58da000 str sl, [sp]
755c: e5973000 ldr r3, [r7]
7560: e1a00005 mov r0, r5
7564: e58d3004 str r3, [sp, #4]
7568: e1a0100b mov r1, fp
756c: e59f20b4 ldr r2, [pc, #180] ; 7628 <_Heap_Walk+0x58c>
7570: e1a03007 mov r3, r7
7574: e1a0e00f mov lr, pc
7578: e12fff14 bx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
757c: e59d2020 ldr r2, [sp, #32]
7580: e1580002 cmp r8, r2
7584: 1affff6a bne 7334 <_Heap_Walk+0x298>
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
7588: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
758c: e1a00008 mov r0, r8
7590: e28dd030 add sp, sp, #48 ; 0x30
7594: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
7598: e59f208c ldr r2, [pc, #140] ; 762c <_Heap_Walk+0x590>
759c: e1a00005 mov r0, r5
75a0: e3a01001 mov r1, #1
75a4: e1a03007 mov r3, r7
75a8: e1a0e00f mov lr, pc
75ac: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
75b0: e3a08000 mov r8, #0
75b4: eafffff4 b 758c <_Heap_Walk+0x4f0>
00009b2c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
9b2c: e5902000 ldr r2, [r0]
9b30: e5913000 ldr r3, [r1]
9b34: e1520003 cmp r2, r3
return true;
9b38: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
9b3c: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
9b40: ba000005 blt 9b5c <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
9b44: e5900004 ldr r0, [r0, #4]
9b48: e5913004 ldr r3, [r1, #4]
9b4c: e1500003 cmp r0, r3
9b50: d3a00000 movle r0, #0
9b54: c3a00001 movgt r0, #1
9b58: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
9b5c: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
9b60: e12fff1e bx lr
0000bc90 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
bc90: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
bc94: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
bc98: e1a04000 mov r4, r0
bc9c: e1a05001 mov r5, r1
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
bca0: 03a00009 moveq r0, #9
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
bca4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
bca8: e59f313c ldr r3, [pc, #316] ; bdec <rtems_task_mode+0x15c>
bcac: e5937004 ldr r7, [r3, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
bcb0: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
bcb4: e59760f4 ldr r6, [r7, #244] ; 0xf4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
bcb8: e597307c ldr r3, [r7, #124] ; 0x7c
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
bcbc: e3580000 cmp r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
bcc0: e5d69008 ldrb r9, [r6, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
bcc4: 03a08c01 moveq r8, #256 ; 0x100
bcc8: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
bccc: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
bcd0: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
bcd4: e3590000 cmp r9, #0
bcd8: 03a09b01 moveq r9, #1024 ; 0x400
bcdc: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
bce0: ebfff31f bl 8964 <_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;
bce4: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
bce8: e1898008 orr r8, r9, r8
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
bcec: e3150c01 tst r5, #256 ; 0x100
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
bcf0: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
bcf4: 0a000003 beq bd08 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
bcf8: e3140c01 tst r4, #256 ; 0x100
bcfc: 13a03000 movne r3, #0
bd00: 03a03001 moveq r3, #1
bd04: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
bd08: e3150c02 tst r5, #512 ; 0x200
bd0c: 0a000006 beq bd2c <rtems_task_mode+0x9c>
if ( _Modes_Is_timeslice(mode_set) ) {
bd10: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
bd14: 13a03001 movne r3, #1
bd18: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
bd1c: 159f30cc ldrne r3, [pc, #204] ; bdf0 <rtems_task_mode+0x160>
bd20: 15933000 ldrne r3, [r3]
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
bd24: 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;
bd28: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
bd2c: e3150080 tst r5, #128 ; 0x80
bd30: 0a000001 beq bd3c <rtems_task_mode+0xac>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
bd34: e2040080 and r0, r4, #128 ; 0x80
bd38: ebfff304 bl 8950 <_CPU_ISR_Set_level>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
bd3c: e2150b01 ands r0, r5, #1024 ; 0x400
bd40: 0a000013 beq bd94 <rtems_task_mode+0x104>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
bd44: e3140b01 tst r4, #1024 ; 0x400
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
bd48: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
bd4c: 13a03000 movne r3, #0
bd50: 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 ) {
bd54: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
bd58: 03a00000 moveq r0, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
bd5c: 0a00000c beq bd94 <rtems_task_mode+0x104>
asr->is_enabled = is_asr_enabled;
bd60: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
bd64: e10f3000 mrs r3, CPSR
bd68: e3832080 orr r2, r3, #128 ; 0x80
bd6c: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
bd70: e2861014 add r1, r6, #20
bd74: e8910006 ldm r1, {r1, r2}
information->signals_pending = information->signals_posted;
information->signals_posted = _signals;
bd78: e5862014 str r2, [r6, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
bd7c: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
bd80: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
bd84: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
bd88: e3500000 cmp r0, #0
bd8c: 13a00001 movne r0, #1
bd90: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
bd94: e59f3058 ldr r3, [pc, #88] ; bdf4 <rtems_task_mode+0x164>
bd98: e5933000 ldr r3, [r3]
bd9c: e3530003 cmp r3, #3
bda0: 1a00000f bne bde4 <rtems_task_mode+0x154>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
bda4: e59f2040 ldr r2, [pc, #64] ; bdec <rtems_task_mode+0x15c>
if ( are_signals_pending ||
bda8: e3500000 cmp r0, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
bdac: e5923004 ldr r3, [r2, #4]
if ( are_signals_pending ||
bdb0: 1a000005 bne bdcc <rtems_task_mode+0x13c>
bdb4: e5922008 ldr r2, [r2, #8]
bdb8: e1530002 cmp r3, r2
bdbc: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
bdc0: e5d33074 ldrb r3, [r3, #116] ; 0x74
bdc4: e3530000 cmp r3, #0
bdc8: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
_Thread_Dispatch_necessary = true;
bdcc: e59f3018 ldr r3, [pc, #24] ; bdec <rtems_task_mode+0x15c>
bdd0: e3a02001 mov r2, #1
bdd4: e5c32010 strb r2, [r3, #16]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
bdd8: ebffed73 bl 73ac <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
bddc: e3a00000 mov r0, #0
bde0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
bde4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
bde8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED