RTEMS 4.11Annotated Report
Sat Jul 17 02:47:33 2010
a0016ae4 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a0016ae4: 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
)
{
a0016ae8: 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 ) {
a0016aec: 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
)
{
a0016af0: e1a07000 mov r7, r0
a0016af4: e1a05002 mov r5, r2
a0016af8: e1a08001 mov r8, r1
a0016afc: 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 ) {
a0016b00: 3a000013 bcc a0016b54 <_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 ) {
a0016b04: e5906048 ldr r6, [r0, #72] ; 0x48
a0016b08: e3560000 cmp r6, #0
a0016b0c: 0a000009 beq a0016b38 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a0016b10: e3a00000 mov r0, #0
a0016b14: e58a0000 str r0, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0016b18: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0016b1c: e594002c ldr r0, [r4, #44] ; 0x2c
a0016b20: e1a01008 mov r1, r8
a0016b24: e1a02005 mov r2, r5
a0016b28: eb00248f bl a001fd6c <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016b2c: 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;
a0016b30: e2866001 add r6, r6, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016b34: 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 =
a0016b38: e1a00007 mov r0, r7
a0016b3c: eb000a67 bl a00194e0 <_Thread_queue_Dequeue>
a0016b40: e2504000 subs r4, r0, #0
a0016b44: 1afffff4 bne a0016b1c <_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;
a0016b48: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0016b4c: e1a00004 mov r0, r4
a0016b50: 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;
a0016b54: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0016b58: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000b450 <_Chain_Initialize>:
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000b450: e3520000 cmp r2, #0
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
a000b454: e3a0c000 mov ip, #0
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
a000b458: e92d0070 push {r4, r5, r6}
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
a000b45c: e580c004 str ip, [r0, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
a000b460: e1a04000 mov r4, r0
next = starting_address;
a000b464: 11a05002 movne r5, r2
a000b468: 11a0c001 movne ip, r1
while ( count-- ) {
a000b46c: 1a000002 bne a000b47c <_Chain_Initialize+0x2c>
a000b470: ea000008 b a000b498 <_Chain_Initialize+0x48> <== NOT EXECUTED
a000b474: e1a0400c mov r4, ip
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
a000b478: e1a0c006 mov ip, r6
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000b47c: e2555001 subs r5, r5, #1
current->next = next;
a000b480: e584c000 str ip, [r4]
next->previous = current;
a000b484: e58c4004 str r4, [ip, #4]
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
a000b488: e08c6003 add r6, ip, r3
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000b48c: 1afffff8 bne a000b474 <_Chain_Initialize+0x24>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
a000b490: e2422001 sub r2, r2, #1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000b494: e0241293 mla r4, r3, r2, r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000b498: 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 );
a000b49c: e5843000 str r3, [r4]
the_chain->last = current;
a000b4a0: e5804008 str r4, [r0, #8]
}
a000b4a4: e8bd0070 pop {r4, r5, r6}
a000b4a8: e12fff1e bx lr
a000b68c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b68c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000b690: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
a000b694: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b698: e24dd01c sub sp, sp, #28
a000b69c: e1a05001 mov r5, r1
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
a000b6a0: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b6a4: e1a07000 mov r7, r0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
a000b6a8: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b6ac: e1a0b003 mov fp, r3
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000b6b0: e5909008 ldr r9, [r0, #8]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
a000b6b4: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
a000b6b8: 2a000073 bcs a000b88c <_Heap_Allocate_aligned_with_boundary+0x200>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a000b6bc: e3530000 cmp r3, #0
a000b6c0: 1a00006f bne a000b884 <_Heap_Allocate_aligned_with_boundary+0x1f8>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000b6c4: e1570009 cmp r7, r9
a000b6c8: 0a00006f beq a000b88c <_Heap_Allocate_aligned_with_boundary+0x200>
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
a000b6cc: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
a000b6d0: e2651004 rsb r1, r5, #4
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000b6d4: e3a06000 mov r6, #0
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
a000b6d8: e2833007 add r3, r3, #7
a000b6dc: e58d3010 str r3, [sp, #16]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
a000b6e0: 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 ) {
a000b6e4: e599a004 ldr sl, [r9, #4]
a000b6e8: e59d2000 ldr r2, [sp]
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
a000b6ec: e2866001 add r6, r6, #1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
a000b6f0: e152000a cmp r2, sl
a000b6f4: 2a00004f bcs a000b838 <_Heap_Allocate_aligned_with_boundary+0x1ac>
if ( alignment == 0 ) {
a000b6f8: 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;
a000b6fc: 02894008 addeq r4, r9, #8
a000b700: 0a00004a beq a000b830 <_Heap_Allocate_aligned_with_boundary+0x1a4>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000b704: 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_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000b708: 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;
a000b70c: 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;
a000b710: 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;
a000b714: 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_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000b718: e081400a add r4, r1, sl
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000b71c: 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;
a000b720: e0633002 rsb r3, r3, r2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b724: 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
a000b728: e083a00a add sl, r3, sl
a000b72c: 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;
a000b730: e2893008 add r3, r9, #8
a000b734: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b738: eb0016b5 bl a0011214 <__umodsi3>
a000b73c: 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 ) {
a000b740: e15a0004 cmp sl, r4
a000b744: 2a000003 bcs a000b758 <_Heap_Allocate_aligned_with_boundary+0xcc>
a000b748: e1a0000a mov r0, sl
a000b74c: e1a01008 mov r1, r8
a000b750: eb0016af bl a0011214 <__umodsi3>
a000b754: e060400a rsb r4, r0, sl
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a000b758: e35b0000 cmp fp, #0
a000b75c: 0a000025 beq a000b7f8 <_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;
a000b760: e084a005 add sl, r4, r5
a000b764: e1a0000a mov r0, sl
a000b768: e1a0100b mov r1, fp
a000b76c: eb0016a8 bl a0011214 <__umodsi3>
a000b770: 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 ) {
a000b774: e1540000 cmp r4, r0
a000b778: 23a03000 movcs r3, #0
a000b77c: 33a03001 movcc r3, #1
a000b780: e15a0000 cmp sl, r0
a000b784: 93a03000 movls r3, #0
a000b788: e3530000 cmp r3, #0
a000b78c: 0a000019 beq a000b7f8 <_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;
a000b790: e59d1008 ldr r1, [sp, #8]
a000b794: e081a005 add sl, 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 ) {
a000b798: e15a0000 cmp sl, r0
a000b79c: 958d6018 strls r6, [sp, #24]
a000b7a0: 9a000002 bls a000b7b0 <_Heap_Allocate_aligned_with_boundary+0x124>
a000b7a4: ea000023 b a000b838 <_Heap_Allocate_aligned_with_boundary+0x1ac>
a000b7a8: e15a0000 cmp sl, r0
a000b7ac: 8a000038 bhi a000b894 <_Heap_Allocate_aligned_with_boundary+0x208>
return 0;
}
alloc_begin = boundary_line - alloc_size;
a000b7b0: e0654000 rsb r4, r5, r0
a000b7b4: e1a01008 mov r1, r8
a000b7b8: e1a00004 mov r0, r4
a000b7bc: eb001694 bl a0011214 <__umodsi3>
a000b7c0: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a000b7c4: e0846005 add r6, r4, r5
a000b7c8: e1a00006 mov r0, r6
a000b7cc: e1a0100b mov r1, fp
a000b7d0: eb00168f bl a0011214 <__umodsi3>
a000b7d4: e0600006 rsb r0, r0, r6
/* 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 ) {
a000b7d8: e1560000 cmp r6, r0
a000b7dc: 93a06000 movls r6, #0
a000b7e0: 83a06001 movhi r6, #1
a000b7e4: e1540000 cmp r4, r0
a000b7e8: 23a06000 movcs r6, #0
a000b7ec: e3560000 cmp r6, #0
a000b7f0: 1affffec bne a000b7a8 <_Heap_Allocate_aligned_with_boundary+0x11c>
a000b7f4: e59d6018 ldr r6, [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 ) {
a000b7f8: e59d2008 ldr r2, [sp, #8]
a000b7fc: e1520004 cmp r2, r4
a000b800: 8a00000c bhi a000b838 <_Heap_Allocate_aligned_with_boundary+0x1ac>
a000b804: e59d100c ldr r1, [sp, #12]
a000b808: e1a00004 mov r0, r4
a000b80c: eb001680 bl a0011214 <__umodsi3>
a000b810: e3e0a007 mvn sl, #7
a000b814: 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 ) {
a000b818: 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);
a000b81c: e08aa004 add sl, sl, r4
a000b820: e060300a rsb r3, r0, sl
a000b824: e15a0000 cmp sl, r0
a000b828: 11510003 cmpne r1, r3
a000b82c: 8a000001 bhi a000b838 <_Heap_Allocate_aligned_with_boundary+0x1ac>
boundary
);
}
}
if ( alloc_begin != 0 ) {
a000b830: e3540000 cmp r4, #0
a000b834: 1a000004 bne a000b84c <_Heap_Allocate_aligned_with_boundary+0x1c0>
break;
}
block = block->next;
a000b838: e5999008 ldr r9, [r9, #8]
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000b83c: e1570009 cmp r7, r9
a000b840: 1affffa7 bne a000b6e4 <_Heap_Allocate_aligned_with_boundary+0x58>
a000b844: e3a00000 mov r0, #0
a000b848: ea000008 b a000b870 <_Heap_Allocate_aligned_with_boundary+0x1e4>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
a000b84c: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000b850: e1a00007 mov r0, r7
a000b854: e1a01009 mov r1, r9
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
a000b858: e0833006 add r3, r3, r6
a000b85c: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000b860: e1a02004 mov r2, r4
a000b864: e1a03005 mov r3, r5
a000b868: ebffebbe bl a0006768 <_Heap_Block_allocate>
a000b86c: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000b870: e5973044 ldr r3, [r7, #68] ; 0x44
a000b874: e1530006 cmp r3, r6
stats->max_search = search_count;
a000b878: 35876044 strcc r6, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
a000b87c: e28dd01c add sp, sp, #28
a000b880: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
a000b884: e1550003 cmp r5, r3
a000b888: 9a000006 bls a000b8a8 <_Heap_Allocate_aligned_with_boundary+0x21c>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000b88c: e3a00000 mov r0, #0
a000b890: eafffff9 b a000b87c <_Heap_Allocate_aligned_with_boundary+0x1f0>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
a000b894: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED
a000b898: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000b89c: e1570009 cmp r7, r9 <== NOT EXECUTED
a000b8a0: 1affff8f bne a000b6e4 <_Heap_Allocate_aligned_with_boundary+0x58><== NOT EXECUTED
a000b8a4: eaffffe6 b a000b844 <_Heap_Allocate_aligned_with_boundary+0x1b8><== NOT EXECUTED
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
a000b8a8: e3580000 cmp r8, #0
a000b8ac: 01a08002 moveq r8, r2
a000b8b0: eaffff83 b a000b6c4 <_Heap_Allocate_aligned_with_boundary+0x38>
a000b8b4 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
a000b8b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000b8b8: e1a04000 mov r4, r0
a000b8bc: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b8c0: e1a00001 mov r0, r1
a000b8c4: e5941010 ldr r1, [r4, #16]
a000b8c8: eb001651 bl a0011214 <__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
a000b8cc: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b8d0: 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);
a000b8d4: 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;
a000b8d8: e1550003 cmp r5, r3
a000b8dc: 3a000030 bcc a000b9a4 <_Heap_Free+0xf0>
a000b8e0: e5941024 ldr r1, [r4, #36] ; 0x24
a000b8e4: e1550001 cmp r5, r1
a000b8e8: 8a00002d bhi a000b9a4 <_Heap_Free+0xf0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b8ec: 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;
a000b8f0: 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);
a000b8f4: 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;
a000b8f8: e1530002 cmp r3, r2
a000b8fc: 8a000028 bhi a000b9a4 <_Heap_Free+0xf0>
a000b900: e1510002 cmp r1, r2
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000b904: 33a00000 movcc r0, #0
a000b908: 3a000027 bcc a000b9ac <_Heap_Free+0xf8>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b90c: 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 ) ) {
a000b910: e2170001 ands r0, r7, #1
a000b914: 0a000024 beq a000b9ac <_Heap_Free+0xf8>
return false;
}
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 ));
a000b918: 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;
a000b91c: e3c77001 bic r7, r7, #1
a000b920: 03a08000 moveq r8, #0
a000b924: 0a000004 beq a000b93c <_Heap_Free+0x88>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b928: 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;
a000b92c: e5900004 ldr r0, [r0, #4]
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
a000b930: e3100001 tst r0, #1
a000b934: 13a08000 movne r8, #0
a000b938: 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 ) ) {
a000b93c: e21c0001 ands r0, ip, #1
a000b940: 1a00001a bne a000b9b0 <_Heap_Free+0xfc>
uintptr_t const prev_size = block->prev_size;
a000b944: 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);
a000b948: 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;
a000b94c: e153000a cmp r3, sl
a000b950: 8a000015 bhi a000b9ac <_Heap_Free+0xf8>
a000b954: e151000a cmp r1, sl
a000b958: 3a000013 bcc a000b9ac <_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;
a000b95c: 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) ) {
a000b960: e2100001 ands r0, r0, #1
a000b964: 0a000010 beq a000b9ac <_Heap_Free+0xf8>
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
a000b968: e3580000 cmp r8, #0
a000b96c: 0a000038 beq a000ba54 <_Heap_Free+0x1a0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000b970: e5940038 ldr r0, [r4, #56] ; 0x38
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b974: 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;
a000b978: e0867007 add r7, r6, r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b97c: 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;
a000b980: e087c00c add ip, r7, ip
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000b984: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000b988: 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;
a000b98c: e5823008 str r3, [r2, #8]
next->prev = prev;
a000b990: 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;
a000b994: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000b998: 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;
a000b99c: e78ac00c str ip, [sl, ip]
a000b9a0: ea00000e b a000b9e0 <_Heap_Free+0x12c>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000b9a4: e3a00000 mov r0, #0
a000b9a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b9ac: 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 */
a000b9b0: e3580000 cmp r8, #0
a000b9b4: 0a000014 beq a000ba0c <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b9b8: e5923008 ldr r3, [r2, #8]
a000b9bc: 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;
a000b9c0: e0877006 add r7, r7, r6
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000b9c4: e3871001 orr r1, r7, #1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
a000b9c8: e5853008 str r3, [r5, #8]
new_block->prev = prev;
a000b9cc: e585200c str r2, [r5, #12]
next->prev = new_block;
prev->next = new_block;
a000b9d0: e5825008 str r5, [r2, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a000b9d4: e583500c str r5, [r3, #12]
a000b9d8: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
a000b9dc: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000b9e0: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
a000b9e4: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a000b9e8: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000b9ec: e2422001 sub r2, r2, #1
++stats->frees;
a000b9f0: e2833001 add r3, r3, #1
stats->free_size += block_size;
a000b9f4: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000b9f8: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
a000b9fc: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a000ba00: e5846030 str r6, [r4, #48] ; 0x30
return( true );
a000ba04: e3a00001 mov r0, #1
a000ba08: 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;
a000ba0c: e3863001 orr r3, r6, #1
a000ba10: e5853004 str r3, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a000ba14: e5943038 ldr r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
a000ba18: 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;
a000ba1c: 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;
a000ba20: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a000ba24: 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;
a000ba28: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
a000ba2c: e153000c cmp r3, ip
new_block->next = next;
a000ba30: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
a000ba34: 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;
a000ba38: e5820004 str r0, [r2, #4]
block_before->next = new_block;
next->prev = new_block;
a000ba3c: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
a000ba40: 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;
a000ba44: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
a000ba48: e5843038 str r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
a000ba4c: 8584303c strhi r3, [r4, #60] ; 0x3c
a000ba50: eaffffe2 b a000b9e0 <_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;
a000ba54: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000ba58: e38c3001 orr r3, ip, #1
a000ba5c: e58a3004 str r3, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000ba60: e5923004 ldr r3, [r2, #4]
next_block->prev_size = size;
a000ba64: 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;
a000ba68: e3c33001 bic r3, r3, #1
a000ba6c: e5823004 str r3, [r2, #4]
a000ba70: eaffffda b a000b9e0 <_Heap_Free+0x12c>
a0012f24 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
a0012f24: e92d40f0 push {r4, r5, r6, r7, lr}
a0012f28: e1a04000 mov r4, r0
a0012f2c: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0012f30: e1a00001 mov r0, r1
a0012f34: e5941010 ldr r1, [r4, #16]
a0012f38: e1a07002 mov r7, r2
a0012f3c: ebfff8b4 bl a0011214 <__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
a0012f40: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0012f44: 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);
a0012f48: 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;
a0012f4c: e1500003 cmp r0, r3
a0012f50: 3a000012 bcc a0012fa0 <_Heap_Size_of_alloc_area+0x7c>
a0012f54: e5942024 ldr r2, [r4, #36] ; 0x24
a0012f58: e1500002 cmp r0, r2
a0012f5c: 8a00000f bhi a0012fa0 <_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;
a0012f60: e5906004 ldr r6, [r0, #4]
a0012f64: 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);
a0012f68: 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;
a0012f6c: e1530006 cmp r3, r6
a0012f70: 8a00000a bhi a0012fa0 <_Heap_Size_of_alloc_area+0x7c>
a0012f74: e1520006 cmp r2, r6
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0012f78: 33a00000 movcc r0, #0
a0012f7c: 3a000009 bcc a0012fa8 <_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;
a0012f80: 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 )
a0012f84: e2100001 ands r0, r0, #1
a0012f88: 0a000006 beq a0012fa8 <_Heap_Size_of_alloc_area+0x84>
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
a0012f8c: e2655004 rsb r5, r5, #4
a0012f90: e0856006 add r6, r5, r6
a0012f94: e5876000 str r6, [r7]
return true;
a0012f98: e3a00001 mov r0, #1
a0012f9c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0012fa0: e3a00000 mov r0, #0
a0012fa4: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
}
a0012fa8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a00074b4 <_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() ) ) {
a00074b4: e59f3578 ldr r3, [pc, #1400] ; a0007a34 <_Heap_Walk+0x580>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a00074b8: 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;
a00074bc: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a00074c0: 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;
a00074c4: e59f256c ldr r2, [pc, #1388] ; a0007a38 <_Heap_Walk+0x584>
a00074c8: e59f956c ldr r9, [pc, #1388] ; a0007a3c <_Heap_Walk+0x588>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a00074cc: e1a0a001 mov sl, r1
uintptr_t const page_size = heap->page_size;
a00074d0: 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;
a00074d4: 11a09002 movne r9, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a00074d8: 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;
a00074dc: e5902014 ldr r2, [r0, #20]
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a00074e0: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a00074e4: e24dd038 sub sp, sp, #56 ; 0x38
a00074e8: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
a00074ec: e58d1024 str r1, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
a00074f0: e58d2028 str r2, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
a00074f4: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a00074f8: 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() ) ) {
a00074fc: 0a000002 beq a000750c <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
a0007500: e3a00001 mov r0, #1
}
a0007504: e28dd038 add sp, sp, #56 ; 0x38
a0007508: 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)(
a000750c: e594101c ldr r1, [r4, #28]
a0007510: e5900018 ldr r0, [r0, #24]
a0007514: e5942008 ldr r2, [r4, #8]
a0007518: e594300c ldr r3, [r4, #12]
a000751c: e59dc028 ldr ip, [sp, #40] ; 0x28
a0007520: e58d1008 str r1, [sp, #8]
a0007524: e59d102c ldr r1, [sp, #44] ; 0x2c
a0007528: e58d0004 str r0, [sp, #4]
a000752c: e58d2014 str r2, [sp, #20]
a0007530: e58d1010 str r1, [sp, #16]
a0007534: e58d3018 str r3, [sp, #24]
a0007538: e59f2500 ldr r2, [pc, #1280] ; a0007a40 <_Heap_Walk+0x58c>
a000753c: e58dc000 str ip, [sp]
a0007540: e58d800c str r8, [sp, #12]
a0007544: e1a0000a mov r0, sl
a0007548: e3a01000 mov r1, #0
a000754c: e59d3024 ldr r3, [sp, #36] ; 0x24
a0007550: e12fff39 blx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a0007554: e59d2024 ldr r2, [sp, #36] ; 0x24
a0007558: e3520000 cmp r2, #0
a000755c: 0a000024 beq a00075f4 <_Heap_Walk+0x140>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a0007560: e59d3024 ldr r3, [sp, #36] ; 0x24
a0007564: e2135003 ands r5, r3, #3
a0007568: 1a000027 bne a000760c <_Heap_Walk+0x158>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000756c: e59d0028 ldr r0, [sp, #40] ; 0x28
a0007570: e59d1024 ldr r1, [sp, #36] ; 0x24
a0007574: ebffe53c bl a0000a6c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a0007578: e250b000 subs fp, r0, #0
a000757c: 1a000028 bne a0007624 <_Heap_Walk+0x170>
a0007580: e2880008 add r0, r8, #8
a0007584: e59d1024 ldr r1, [sp, #36] ; 0x24
a0007588: ebffe537 bl a0000a6c <__umodsi3>
);
return false;
}
if (
a000758c: e2506000 subs r6, r0, #0
a0007590: 1a00002a bne a0007640 <_Heap_Walk+0x18c>
block = next_block;
} while ( block != first_block );
return true;
}
a0007594: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a0007598: e21b5001 ands r5, fp, #1
a000759c: 0a0000bf beq a00078a0 <_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;
a00075a0: e59dc02c ldr ip, [sp, #44] ; 0x2c
a00075a4: e59c3004 ldr r3, [ip, #4]
a00075a8: 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);
a00075ac: 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;
a00075b0: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a00075b4: e2155001 ands r5, r5, #1
a00075b8: 0a000007 beq a00075dc <_Heap_Walk+0x128>
);
return false;
}
if (
a00075bc: e1580003 cmp r8, r3
a00075c0: 0a000025 beq a000765c <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a00075c4: e1a0000a mov r0, sl <== NOT EXECUTED
a00075c8: e3a01001 mov r1, #1 <== NOT EXECUTED
a00075cc: e59f2470 ldr r2, [pc, #1136] ; a0007a44 <_Heap_Walk+0x590> <== NOT EXECUTED
a00075d0: 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;
a00075d4: e1a00006 mov r0, r6 <== NOT EXECUTED
a00075d8: eaffffc9 b a0007504 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
a00075dc: e1a0000a mov r0, sl
a00075e0: e3a01001 mov r1, #1
a00075e4: e59f245c ldr r2, [pc, #1116] ; a0007a48 <_Heap_Walk+0x594>
a00075e8: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00075ec: e1a00005 mov r0, r5
a00075f0: eaffffc3 b a0007504 <_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" );
a00075f4: e1a0000a mov r0, sl
a00075f8: e3a01001 mov r1, #1
a00075fc: e59f2448 ldr r2, [pc, #1096] ; a0007a4c <_Heap_Walk+0x598>
a0007600: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007604: e59d0024 ldr r0, [sp, #36] ; 0x24
a0007608: eaffffbd b a0007504 <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
a000760c: e1a0000a mov r0, sl
a0007610: e3a01001 mov r1, #1
a0007614: e59f2434 ldr r2, [pc, #1076] ; a0007a50 <_Heap_Walk+0x59c>
a0007618: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000761c: e3a00000 mov r0, #0
a0007620: eaffffb7 b a0007504 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
a0007624: e1a0000a mov r0, sl
a0007628: e3a01001 mov r1, #1
a000762c: e59f2420 ldr r2, [pc, #1056] ; a0007a54 <_Heap_Walk+0x5a0>
a0007630: e59d3028 ldr r3, [sp, #40] ; 0x28
a0007634: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007638: e1a00005 mov r0, r5
a000763c: eaffffb0 b a0007504 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a0007640: e1a0000a mov r0, sl
a0007644: e3a01001 mov r1, #1
a0007648: e59f2408 ldr r2, [pc, #1032] ; a0007a58 <_Heap_Walk+0x5a4>
a000764c: e1a03008 mov r3, r8
a0007650: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007654: e1a0000b mov r0, fp
a0007658: eaffffa9 b a0007504 <_Heap_Walk+0x50>
block = next_block;
} while ( block != first_block );
return true;
}
a000765c: e5945008 ldr r5, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a0007660: 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 ) {
a0007664: e1540005 cmp r4, r5
a0007668: 05943020 ldreq r3, [r4, #32]
a000766c: 0a00000c beq a00076a4 <_Heap_Walk+0x1f0>
block = next_block;
} while ( block != first_block );
return true;
}
a0007670: 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;
a0007674: e1530005 cmp r3, r5
a0007678: 9a00008e bls a00078b8 <_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)(
a000767c: e1a0000a mov r0, sl
a0007680: e3a01001 mov r1, #1
a0007684: e59f23d0 ldr r2, [pc, #976] ; a0007a5c <_Heap_Walk+0x5a8>
a0007688: e1a03005 mov r3, r5
a000768c: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007690: e3a00000 mov r0, #0
a0007694: eaffff9a b a0007504 <_Heap_Walk+0x50>
a0007698: e1a03008 mov r3, r8
a000769c: e59db034 ldr fp, [sp, #52] ; 0x34
a00076a0: e59d8030 ldr r8, [sp, #48] ; 0x30
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a00076a4: 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;
a00076a8: 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);
a00076ac: 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;
a00076b0: e1530005 cmp r3, r5
a00076b4: 9a000007 bls a00076d8 <_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)(
a00076b8: e1a0000a mov r0, sl
a00076bc: e58d5000 str r5, [sp]
a00076c0: e3a01001 mov r1, #1
a00076c4: e59f2394 ldr r2, [pc, #916] ; a0007a60 <_Heap_Walk+0x5ac>
a00076c8: e1a03006 mov r3, r6
a00076cc: e12fff39 blx r9
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
a00076d0: e3a00000 mov r0, #0
a00076d4: eaffff8a b a0007504 <_Heap_Walk+0x50>
a00076d8: e5943024 ldr r3, [r4, #36] ; 0x24
a00076dc: e1530005 cmp r3, r5
a00076e0: 3afffff4 bcc a00076b8 <_Heap_Walk+0x204>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a00076e4: e59d1024 ldr r1, [sp, #36] ; 0x24
a00076e8: e1a00007 mov r0, r7
a00076ec: ebffe4de 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;
a00076f0: e59d102c ldr r1, [sp, #44] ; 0x2c
a00076f4: e0563001 subs r3, r6, r1
a00076f8: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a00076fc: e3500000 cmp r0, #0
a0007700: 0a000001 beq a000770c <_Heap_Walk+0x258>
a0007704: e3530000 cmp r3, #0
a0007708: 1a0000a2 bne a0007998 <_Heap_Walk+0x4e4>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a000770c: e59d2028 ldr r2, [sp, #40] ; 0x28
a0007710: e1520007 cmp r2, r7
a0007714: 9a000001 bls a0007720 <_Heap_Walk+0x26c>
a0007718: e3530000 cmp r3, #0
a000771c: 1a0000a5 bne a00079b8 <_Heap_Walk+0x504>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a0007720: e1560005 cmp r6, r5
a0007724: 3a000001 bcc a0007730 <_Heap_Walk+0x27c>
a0007728: e3530000 cmp r3, #0
a000772c: 1a0000aa bne a00079dc <_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;
a0007730: e5953004 ldr r3, [r5, #4]
a0007734: e20bb001 and fp, fp, #1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a0007738: e3130001 tst r3, #1
a000773c: 0a000016 beq a000779c <_Heap_Walk+0x2e8>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a0007740: e35b0000 cmp fp, #0
a0007744: 0a00000b beq a0007778 <_Heap_Walk+0x2c4>
(*printer)(
a0007748: e58d7000 str r7, [sp]
a000774c: e1a0000a mov r0, sl
a0007750: e3a01000 mov r1, #0
a0007754: e59f2308 ldr r2, [pc, #776] ; a0007a64 <_Heap_Walk+0x5b0>
a0007758: e1a03006 mov r3, r6
a000775c: e12fff39 blx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a0007760: e1580005 cmp r8, r5
a0007764: 0affff65 beq a0007500 <_Heap_Walk+0x4c>
a0007768: e595b004 ldr fp, [r5, #4]
a000776c: e5943020 ldr r3, [r4, #32]
a0007770: e1a06005 mov r6, r5
a0007774: eaffffcb b a00076a8 <_Heap_Walk+0x1f4>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a0007778: e58d7000 str r7, [sp]
a000777c: e5963000 ldr r3, [r6]
a0007780: e1a0000a mov r0, sl
a0007784: e1a0100b mov r1, fp
a0007788: e58d3004 str r3, [sp, #4]
a000778c: e59f22d4 ldr r2, [pc, #724] ; a0007a68 <_Heap_Walk+0x5b4>
a0007790: e1a03006 mov r3, r6
a0007794: e12fff39 blx r9
a0007798: eafffff0 b a0007760 <_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 ?
a000779c: 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)(
a00077a0: e5943008 ldr r3, [r4, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a00077a4: 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)(
a00077a8: e1530002 cmp r3, r2
a00077ac: 059f02b8 ldreq r0, [pc, #696] ; a0007a6c <_Heap_Walk+0x5b8>
a00077b0: 0a000003 beq a00077c4 <_Heap_Walk+0x310>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a00077b4: e59f32b4 ldr r3, [pc, #692] ; a0007a70 <_Heap_Walk+0x5bc>
a00077b8: e1540002 cmp r4, r2
a00077bc: e59f02b0 ldr r0, [pc, #688] ; a0007a74 <_Heap_Walk+0x5c0>
a00077c0: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a00077c4: 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)(
a00077c8: e1510003 cmp r1, r3
a00077cc: 059f12a4 ldreq r1, [pc, #676] ; a0007a78 <_Heap_Walk+0x5c4>
a00077d0: 0a000003 beq a00077e4 <_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)" : "")
a00077d4: e59fc2a0 ldr ip, [pc, #672] ; a0007a7c <_Heap_Walk+0x5c8>
a00077d8: e1540003 cmp r4, r3
a00077dc: e59f1290 ldr r1, [pc, #656] ; a0007a74 <_Heap_Walk+0x5c0>
a00077e0: 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)(
a00077e4: e58d2004 str r2, [sp, #4]
a00077e8: e58d0008 str r0, [sp, #8]
a00077ec: e58d300c str r3, [sp, #12]
a00077f0: e58d1010 str r1, [sp, #16]
a00077f4: e1a03006 mov r3, r6
a00077f8: e58d7000 str r7, [sp]
a00077fc: e1a0000a mov r0, sl
a0007800: e3a01000 mov r1, #0
a0007804: e59f2274 ldr r2, [pc, #628] ; a0007a80 <_Heap_Walk+0x5cc>
a0007808: e12fff39 blx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a000780c: e5953000 ldr r3, [r5]
a0007810: e1570003 cmp r7, r3
a0007814: 1a000010 bne a000785c <_Heap_Walk+0x3a8>
);
return false;
}
if ( !prev_used ) {
a0007818: e35b0000 cmp fp, #0
a000781c: 0a000018 beq a0007884 <_Heap_Walk+0x3d0>
block = next_block;
} while ( block != first_block );
return true;
}
a0007820: 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 ) {
a0007824: e1540003 cmp r4, r3
a0007828: 0a000004 beq a0007840 <_Heap_Walk+0x38c>
if ( free_block == block ) {
a000782c: e1560003 cmp r6, r3
a0007830: 0affffca beq a0007760 <_Heap_Walk+0x2ac>
return true;
}
free_block = free_block->next;
a0007834: 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 ) {
a0007838: e1540003 cmp r4, r3
a000783c: 1afffffa bne a000782c <_Heap_Walk+0x378>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a0007840: e1a0000a mov r0, sl
a0007844: e3a01001 mov r1, #1
a0007848: e59f2234 ldr r2, [pc, #564] ; a0007a84 <_Heap_Walk+0x5d0>
a000784c: e1a03006 mov r3, r6
a0007850: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a0007854: e3a00000 mov r0, #0
a0007858: eaffff29 b a0007504 <_Heap_Walk+0x50>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
a000785c: e58d3004 str r3, [sp, #4]
a0007860: e1a0000a mov r0, sl
a0007864: e58d7000 str r7, [sp]
a0007868: e58d5008 str r5, [sp, #8]
a000786c: e3a01001 mov r1, #1
a0007870: e59f2210 ldr r2, [pc, #528] ; a0007a88 <_Heap_Walk+0x5d4>
a0007874: e1a03006 mov r3, r6
a0007878: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000787c: e3a00000 mov r0, #0
a0007880: eaffff1f b a0007504 <_Heap_Walk+0x50>
return false;
}
if ( !prev_used ) {
(*printer)(
a0007884: e1a0000a mov r0, sl
a0007888: e3a01001 mov r1, #1
a000788c: e59f21f8 ldr r2, [pc, #504] ; a0007a8c <_Heap_Walk+0x5d8>
a0007890: e1a03006 mov r3, r6
a0007894: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a0007898: e1a0000b mov r0, fp
a000789c: eaffff18 b a0007504 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
a00078a0: e1a0000a mov r0, sl
a00078a4: e3a01001 mov r1, #1
a00078a8: e59f21e0 ldr r2, [pc, #480] ; a0007a90 <_Heap_Walk+0x5dc>
a00078ac: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00078b0: e1a00005 mov r0, r5
a00078b4: eaffff12 b a0007504 <_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;
a00078b8: e594c024 ldr ip, [r4, #36] ; 0x24
a00078bc: e15c0005 cmp ip, r5
a00078c0: 3affff6d bcc a000767c <_Heap_Walk+0x1c8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a00078c4: e2850008 add r0, r5, #8
a00078c8: e1a01007 mov r1, r7
a00078cc: e58d301c str r3, [sp, #28]
a00078d0: e58dc020 str ip, [sp, #32]
a00078d4: ebffe464 bl a0000a6c <__umodsi3>
);
return false;
}
if (
a00078d8: e3500000 cmp r0, #0
a00078dc: e59d301c ldr r3, [sp, #28]
a00078e0: e59dc020 ldr ip, [sp, #32]
a00078e4: 1a000044 bne a00079fc <_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;
a00078e8: e5952004 ldr r2, [r5, #4]
a00078ec: e3c22001 bic r2, r2, #1
block = next_block;
} while ( block != first_block );
return true;
}
a00078f0: 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;
a00078f4: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a00078f8: e3120001 tst r2, #1
a00078fc: 1a000045 bne a0007a18 <_Heap_Walk+0x564>
a0007900: e58d8030 str r8, [sp, #48] ; 0x30
a0007904: e58db034 str fp, [sp, #52] ; 0x34
a0007908: e1a01004 mov r1, r4
a000790c: e1a06005 mov r6, r5
a0007910: e1a0b00c mov fp, ip
a0007914: e1a08003 mov r8, r3
a0007918: ea000013 b a000796c <_Heap_Walk+0x4b8>
return false;
}
prev_block = free_block;
free_block = free_block->next;
a000791c: 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 ) {
a0007920: e1540005 cmp r4, r5
a0007924: 0affff5b beq a0007698 <_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;
a0007928: e1580005 cmp r8, r5
a000792c: 8affff52 bhi a000767c <_Heap_Walk+0x1c8>
a0007930: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0007934: e2850008 add r0, r5, #8
a0007938: 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;
a000793c: 8affff4e bhi a000767c <_Heap_Walk+0x1c8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0007940: ebffe449 bl a0000a6c <__umodsi3>
);
return false;
}
if (
a0007944: e3500000 cmp r0, #0
a0007948: 1a00002b bne a00079fc <_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;
a000794c: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0007950: e1a01006 mov r1, r6
a0007954: e1a06005 mov r6, r5
a0007958: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a000795c: 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;
a0007960: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0007964: e3130001 tst r3, #1
a0007968: 1a00002a bne a0007a18 <_Heap_Walk+0x564>
);
return false;
}
if ( free_block->prev != prev_block ) {
a000796c: e595200c ldr r2, [r5, #12]
a0007970: e1520001 cmp r2, r1
a0007974: 0affffe8 beq a000791c <_Heap_Walk+0x468>
(*printer)(
a0007978: e58d2000 str r2, [sp]
a000797c: e1a0000a mov r0, sl
a0007980: e3a01001 mov r1, #1
a0007984: e59f2108 ldr r2, [pc, #264] ; a0007a94 <_Heap_Walk+0x5e0>
a0007988: e1a03005 mov r3, r5
a000798c: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007990: e3a00000 mov r0, #0
a0007994: eafffeda b a0007504 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
a0007998: e1a0000a mov r0, sl
a000799c: e58d7000 str r7, [sp]
a00079a0: e3a01001 mov r1, #1
a00079a4: e59f20ec ldr r2, [pc, #236] ; a0007a98 <_Heap_Walk+0x5e4>
a00079a8: e1a03006 mov r3, r6
a00079ac: e12fff39 blx r9
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
a00079b0: e3a00000 mov r0, #0
a00079b4: eafffed2 b a0007504 <_Heap_Walk+0x50>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
a00079b8: e58d2004 str r2, [sp, #4]
a00079bc: e1a0000a mov r0, sl
a00079c0: e58d7000 str r7, [sp]
a00079c4: e3a01001 mov r1, #1
a00079c8: e59f20cc ldr r2, [pc, #204] ; a0007a9c <_Heap_Walk+0x5e8>
a00079cc: e1a03006 mov r3, r6
a00079d0: e12fff39 blx r9
block,
block_size,
min_block_size
);
return false;
a00079d4: e3a00000 mov r0, #0
a00079d8: eafffec9 b a0007504 <_Heap_Walk+0x50>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
a00079dc: e1a0000a mov r0, sl
a00079e0: e58d5000 str r5, [sp]
a00079e4: e3a01001 mov r1, #1
a00079e8: e59f20b0 ldr r2, [pc, #176] ; a0007aa0 <_Heap_Walk+0x5ec>
a00079ec: e1a03006 mov r3, r6
a00079f0: e12fff39 blx r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
a00079f4: e3a00000 mov r0, #0
a00079f8: eafffec1 b a0007504 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a00079fc: e1a0000a mov r0, sl
a0007a00: e3a01001 mov r1, #1
a0007a04: e59f2098 ldr r2, [pc, #152] ; a0007aa4 <_Heap_Walk+0x5f0>
a0007a08: e1a03005 mov r3, r5
a0007a0c: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007a10: e3a00000 mov r0, #0
a0007a14: eafffeba b a0007504 <_Heap_Walk+0x50>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
a0007a18: e1a0000a mov r0, sl
a0007a1c: e3a01001 mov r1, #1
a0007a20: e59f2080 ldr r2, [pc, #128] ; a0007aa8 <_Heap_Walk+0x5f4>
a0007a24: e1a03005 mov r3, r5
a0007a28: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007a2c: e3a00000 mov r0, #0
a0007a30: eafffeb3 b a0007504 <_Heap_Walk+0x50>
a00069b4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a00069b4: 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 )
a00069b8: e5904034 ldr r4, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a00069bc: e24dd014 sub sp, sp, #20
a00069c0: 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 )
a00069c4: 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 );
a00069c8: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a00069cc: 0a00009c beq a0006c44 <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
a00069d0: e1d081b4 ldrh r8, [r0, #20]
a00069d4: e1d0a1b0 ldrh sl, [r0, #16]
a00069d8: e1a01008 mov r1, r8
a00069dc: e1a0000a mov r0, sl
a00069e0: eb0029c5 bl a00110fc <__aeabi_uidiv>
a00069e4: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
a00069e8: e1b03823 lsrs r3, r3, #16
a00069ec: 0a00009a beq a0006c5c <_Objects_Extend_information+0x2a8>
if ( information->object_blocks[ block ] == NULL ) {
a00069f0: e5949000 ldr r9, [r4]
a00069f4: e3590000 cmp r9, #0
a00069f8: 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 );
a00069fc: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
a0006a00: 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 ) {
a0006a04: 0a00000c beq a0006a3c <_Objects_Extend_information+0x88>
a0006a08: e1a02004 mov r2, r4
a0006a0c: 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 );
a0006a10: e1a06007 mov r6, r7
index_base = minimum_index;
block = 0;
a0006a14: e3a04000 mov r4, #0
a0006a18: ea000002 b a0006a28 <_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 ) {
a0006a1c: e5b29004 ldr r9, [r2, #4]!
a0006a20: e3590000 cmp r9, #0
a0006a24: 0a000004 beq a0006a3c <_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++ ) {
a0006a28: e2844001 add r4, r4, #1
a0006a2c: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
a0006a30: 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++ ) {
a0006a34: 8afffff8 bhi a0006a1c <_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;
a0006a38: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
a0006a3c: 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 ) {
a0006a40: e35a0801 cmp sl, #65536 ; 0x10000
a0006a44: 2a000064 bcs a0006bdc <_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 ) {
a0006a48: 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;
a0006a4c: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
a0006a50: 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;
a0006a54: e0000091 mul r0, r1, r0
if ( information->auto_extend ) {
a0006a58: 1a000061 bne a0006be4 <_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 );
a0006a5c: e58d3000 str r3, [sp]
a0006a60: eb00084a bl a0008b90 <_Workspace_Allocate_or_fatal_error>
a0006a64: e59d3000 ldr r3, [sp]
a0006a68: e1a08000 mov r8, r0
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
a0006a6c: e3590000 cmp r9, #0
a0006a70: 0a00003a beq a0006b60 <_Objects_Extend_information+0x1ac>
*/
/*
* Up the block count and maximum
*/
block_count++;
a0006a74: e283b001 add fp, r3, #1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a0006a78: e08b008b add r0, fp, fp, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
a0006a7c: e08a0000 add r0, sl, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a0006a80: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
a0006a84: e1a00100 lsl r0, r0, #2
a0006a88: e58d3000 str r3, [sp]
a0006a8c: eb000835 bl a0008b68 <_Workspace_Allocate>
if ( !object_blocks ) {
a0006a90: e2509000 subs r9, r0, #0
a0006a94: e59d3000 ldr r3, [sp]
a0006a98: 0a000074 beq a0006c70 <_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 ) {
a0006a9c: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
a0006aa0: e089c10b add ip, r9, fp, lsl #2
a0006aa4: e089b18b add fp, r9, fp, lsl #3
a0006aa8: e1570002 cmp r7, r2
a0006aac: 3a000052 bcc a0006bfc <_Objects_Extend_information+0x248>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006ab0: e3570000 cmp r7, #0
a0006ab4: 13a02000 movne r2, #0
a0006ab8: 11a0100b movne r1, fp
local_table[ index ] = NULL;
a0006abc: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006ac0: 0a000003 beq a0006ad4 <_Objects_Extend_information+0x120>
a0006ac4: e2822001 add r2, r2, #1
a0006ac8: e1570002 cmp r7, r2
local_table[ index ] = NULL;
a0006acc: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006ad0: 8afffffb bhi a0006ac4 <_Objects_Extend_information+0x110>
a0006ad4: 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 );
a0006ad8: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
a0006adc: e3a00000 mov r0, #0
a0006ae0: e7890003 str r0, [r9, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a0006ae4: 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 ;
a0006ae8: e1560001 cmp r6, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
a0006aec: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
a0006af0: 2a000005 bcs a0006b0c <_Objects_Extend_information+0x158>
a0006af4: e08b2106 add r2, fp, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
a0006af8: 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++ ) {
a0006afc: 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 ;
a0006b00: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
a0006b04: 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 ;
a0006b08: 3afffffb bcc a0006afc <_Objects_Extend_information+0x148>
a0006b0c: e10f3000 mrs r3, CPSR
a0006b10: e3832080 orr r2, r3, #128 ; 0x80
a0006b14: e129f002 msr CPSR_fc, r2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a0006b18: 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(
a0006b1c: 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;
a0006b20: e1a0a80a lsl sl, sl, #16
a0006b24: e1a02c02 lsl r2, r2, #24
a0006b28: e3822801 orr r2, r2, #65536 ; 0x10000
a0006b2c: e1a0a82a lsr sl, sl, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a0006b30: 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) |
a0006b34: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
a0006b38: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
a0006b3c: e585c030 str ip, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
a0006b40: e5859034 str r9, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
a0006b44: e585b01c str fp, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
a0006b48: e1c5a1b0 strh sl, [r5, #16]
information->maximum_id = _Objects_Build_id(
a0006b4c: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0006b50: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
a0006b54: e3500000 cmp r0, #0
a0006b58: 0a000000 beq a0006b60 <_Objects_Extend_information+0x1ac>
_Workspace_Free( old_tables );
a0006b5c: eb000807 bl a0008b80 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006b60: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a0006b64: e28d7008 add r7, sp, #8
a0006b68: e1a01008 mov r1, r8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006b6c: e7838104 str r8, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a0006b70: e1a00007 mov r0, r7
a0006b74: e1d521b4 ldrh r2, [r5, #20]
a0006b78: e5953018 ldr r3, [r5, #24]
a0006b7c: eb001233 bl a000b450 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006b80: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006b84: 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 ) {
a0006b88: ea000009 b a0006bb4 <_Objects_Extend_information+0x200>
a0006b8c: e5953000 ldr r3, [r5]
the_object->id = _Objects_Build_id(
a0006b90: e1d520b4 ldrh r2, [r5, #4]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006b94: e1a00008 mov r0, r8
a0006b98: e1a03c03 lsl r3, r3, #24
a0006b9c: e3833801 orr r3, r3, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a0006ba0: 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) |
a0006ba4: e1833006 orr r3, r3, r6
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
a0006ba8: e5813008 str r3, [r1, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006bac: ebfffcdd bl a0005f28 <_Chain_Append>
index++;
a0006bb0: 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 ) {
a0006bb4: e1a00007 mov r0, r7
a0006bb8: ebfffced bl a0005f74 <_Chain_Get>
a0006bbc: e2501000 subs r1, r0, #0
a0006bc0: 1afffff1 bne a0006b8c <_Objects_Extend_information+0x1d8>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a0006bc4: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006bc8: e1d531b4 ldrh r3, [r5, #20]
a0006bcc: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a0006bd0: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006bd4: e7813004 str r3, [r1, r4]
information->inactive =
a0006bd8: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
a0006bdc: e28dd014 add sp, sp, #20
a0006be0: 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 );
a0006be4: e58d3000 str r3, [sp]
a0006be8: eb0007de bl a0008b68 <_Workspace_Allocate>
if ( !new_object_block )
a0006bec: e2508000 subs r8, r0, #0
a0006bf0: e59d3000 ldr r3, [sp]
a0006bf4: 1affff9c bne a0006a6c <_Objects_Extend_information+0xb8>
a0006bf8: eafffff7 b a0006bdc <_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,
a0006bfc: e1a03103 lsl r3, r3, #2
a0006c00: e5951034 ldr r1, [r5, #52] ; 0x34
a0006c04: e1a02003 mov r2, r3
a0006c08: e88d1008 stm sp, {r3, ip}
a0006c0c: eb001db9 bl a000e2f8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
a0006c10: e89d1008 ldm sp, {r3, ip}
a0006c14: e5951030 ldr r1, [r5, #48] ; 0x30
a0006c18: e1a0000c mov r0, ip
a0006c1c: e1a02003 mov r2, r3
a0006c20: eb001db4 bl a000e2f8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a0006c24: 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,
a0006c28: e1a0000b mov r0, fp
a0006c2c: e595101c ldr r1, [r5, #28]
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a0006c30: 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,
a0006c34: e1a02102 lsl r2, r2, #2
a0006c38: eb001dae bl a000e2f8 <memcpy>
a0006c3c: e89d1008 ldm sp, {r3, ip}
a0006c40: eaffffa4 b a0006ad8 <_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 )
a0006c44: e1d0a1b0 ldrh sl, [r0, #16]
a0006c48: 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 );
a0006c4c: 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;
a0006c50: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
a0006c54: e1a03004 mov r3, r4
a0006c58: eaffff77 b a0006a3c <_Objects_Extend_information+0x88>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a0006c5c: 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 );
a0006c60: 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;
a0006c64: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
a0006c68: e1a04003 mov r4, r3 <== NOT EXECUTED
a0006c6c: eaffff72 b a0006a3c <_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 );
a0006c70: e1a00008 mov r0, r8
a0006c74: eb0007c1 bl a0008b80 <_Workspace_Free>
return;
a0006c78: eaffffd7 b a0006bdc <_Objects_Extend_information+0x228>
a000767c <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000767c: e92d40f0 push {r4, r5, r6, r7, lr}
a0007680: e1a05000 mov r5, r0
a0007684: e1a06001 mov r6, r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a0007688: e1a00002 mov r0, r2
a000768c: e1d513ba ldrh r1, [r5, #58] ; 0x3a
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a0007690: e1a07002 mov r7, r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a0007694: eb00222c bl a000ff4c <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a0007698: e5d53038 ldrb r3, [r5, #56] ; 0x38
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000769c: e1a04000 mov r4, r0
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a00076a0: e3530000 cmp r3, #0
a00076a4: 1a000017 bne a0007708 <_Objects_Set_name+0x8c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a00076a8: e5d72000 ldrb r2, [r7]
a00076ac: e3500001 cmp r0, #1
a00076b0: e1a02c02 lsl r2, r2, #24
a00076b4: 9a00000c bls a00076ec <_Objects_Set_name+0x70>
a00076b8: e5d73001 ldrb r3, [r7, #1]
a00076bc: e3500002 cmp r0, #2
a00076c0: e1822803 orr r2, r2, r3, lsl #16
a00076c4: 0a000009 beq a00076f0 <_Objects_Set_name+0x74>
a00076c8: e5d73002 ldrb r3, [r7, #2]
a00076cc: e3500003 cmp r0, #3
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a00076d0: e3a00001 mov r0, #1
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a00076d4: e1822403 orr r2, r2, r3, lsl #8
a00076d8: 15d73003 ldrbne r3, [r7, #3]
a00076dc: 03a03020 moveq r3, #32
a00076e0: e1823003 orr r3, r2, r3
a00076e4: e586300c str r3, [r6, #12]
a00076e8: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00076ec: e3822602 orr r2, r2, #2097152 ; 0x200000
a00076f0: e3822a02 orr r2, r2, #8192 ; 0x2000
a00076f4: e3a03020 mov r3, #32
a00076f8: e1823003 orr r3, r2, r3
a00076fc: e586300c str r3, [r6, #12]
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a0007700: e3a00001 mov r0, #1
a0007704: e8bd80f0 pop {r4, r5, r6, r7, pc}
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
a0007708: e2800001 add r0, r0, #1
a000770c: eb0006f1 bl a00092d8 <_Workspace_Allocate>
if ( !d )
a0007710: e2505000 subs r5, r0, #0
a0007714: 0a00000e beq a0007754 <_Objects_Set_name+0xd8>
return false;
if ( the_object->name.name_p ) {
a0007718: e596000c ldr r0, [r6, #12]
a000771c: e3500000 cmp r0, #0
a0007720: 0a000002 beq a0007730 <_Objects_Set_name+0xb4>
_Workspace_Free( (void *)the_object->name.name_p );
a0007724: eb0006f1 bl a00092f0 <_Workspace_Free>
the_object->name.name_p = NULL;
a0007728: e3a03000 mov r3, #0
a000772c: e586300c str r3, [r6, #12]
}
strncpy( d, name, length );
a0007730: e1a00005 mov r0, r5
a0007734: e1a01007 mov r1, r7
a0007738: e1a02004 mov r2, r4
a000773c: eb0021c7 bl a000fe60 <strncpy>
d[length] = '\0';
a0007740: e3a03000 mov r3, #0
a0007744: e7c53004 strb r3, [r5, r4]
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a0007748: e3a00001 mov r0, #1
the_object->name.name_p = NULL;
}
strncpy( d, name, length );
d[length] = '\0';
the_object->name.name_p = d;
a000774c: e586500c str r5, [r6, #12]
a0007750: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
a0007754: e1a00005 mov r0, r5 <== NOT EXECUTED
);
}
return true;
}
a0007758: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0006fec <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a0006fec: 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 );
a0006ff0: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
a0006ff4: e1d051b4 ldrh r5, [r0, #20]
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a0006ff8: 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) /
a0006ffc: e1d001b0 ldrh r0, [r0, #16]
a0007000: e1a01005 mov r1, r5
a0007004: e0640000 rsb r0, r4, r0
a0007008: eb00283b bl a00110fc <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
a000700c: e3500000 cmp r0, #0
a0007010: 0a00000d beq a000704c <_Objects_Shrink_information+0x60>
if ( information->inactive_per_block[ block ] ==
a0007014: e5962030 ldr r2, [r6, #48] ; 0x30
a0007018: e5923000 ldr r3, [r2]
a000701c: 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++ ) {
a0007020: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
a0007024: 1a000005 bne a0007040 <_Objects_Shrink_information+0x54>
a0007028: ea000008 b a0007050 <_Objects_Shrink_information+0x64> <== NOT EXECUTED
a000702c: e5b21004 ldr r1, [r2, #4]!
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
a0007030: e0844005 add r4, r4, r5
a0007034: 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 ] ==
a0007038: e1550001 cmp r5, r1
a000703c: 0a000004 beq a0007054 <_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++ ) {
a0007040: e2833001 add r3, r3, #1
a0007044: e1500003 cmp r0, r3
a0007048: 8afffff7 bhi a000702c <_Objects_Shrink_information+0x40>
a000704c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
a0007050: 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;
a0007054: e5960020 ldr r0, [r6, #32]
a0007058: ea000002 b a0007068 <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
a000705c: e3550000 cmp r5, #0
a0007060: 0a00000b beq a0007094 <_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;
a0007064: 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 );
a0007068: 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;
a000706c: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
a0007070: e1530004 cmp r3, r4
a0007074: 3afffff8 bcc a000705c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
a0007078: e1d621b4 ldrh r2, [r6, #20]
a000707c: 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) &&
a0007080: e1530002 cmp r3, r2
a0007084: 2afffff4 bcs a000705c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
a0007088: ebfffbb1 bl a0005f54 <_Chain_Extract>
}
}
while ( the_object );
a000708c: e3550000 cmp r5, #0
a0007090: 1afffff3 bne a0007064 <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
a0007094: e5963034 ldr r3, [r6, #52] ; 0x34
a0007098: e7930007 ldr r0, [r3, r7]
a000709c: eb0006b7 bl a0008b80 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
a00070a0: e1d602bc ldrh r0, [r6, #44] ; 0x2c
a00070a4: 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;
a00070a8: e5961034 ldr r1, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
a00070ac: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
a00070b0: 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;
a00070b4: e7815007 str r5, [r1, r7]
information->inactive_per_block[ block ] = 0;
a00070b8: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
a00070bc: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
a00070c0: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00066ac <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a00066ac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a00066b0: e24dd004 sub sp, sp, #4
a00066b4: e1a04001 mov r4, r1
a00066b8: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
a00066bc: e1a00001 mov r0, r1
a00066c0: e1a0100d mov r1, sp
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a00066c4: e1a08002 mov r8, r2
a00066c8: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
a00066cc: eb00005a bl a000683c <_POSIX_Mutex_Get>
a00066d0: e3500000 cmp r0, #0
a00066d4: 0a00000a beq a0006704 <_POSIX_Condition_variables_Wait_support+0x58>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a00066d8: e59f30d8 ldr r3, [pc, #216] ; a00067b8 <_POSIX_Condition_variables_Wait_support+0x10c>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a00066dc: e1a00006 mov r0, r6
a00066e0: e1a0100d mov r1, sp
a00066e4: e5932000 ldr r2, [r3]
a00066e8: e2422001 sub r2, r2, #1
a00066ec: e5832000 str r2, [r3]
a00066f0: ebffff74 bl a00064c8 <_POSIX_Condition_variables_Get>
switch ( location ) {
a00066f4: e59d3000 ldr r3, [sp]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a00066f8: e1a0a000 mov sl, r0
switch ( location ) {
a00066fc: e3530000 cmp r3, #0
a0006700: 0a000003 beq a0006714 <_POSIX_Condition_variables_Wait_support+0x68>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a0006704: e3a05016 mov r5, #22
}
a0006708: e1a00005 mov r0, r5
a000670c: e28dd004 add sp, sp, #4
a0006710: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
a0006714: e5903014 ldr r3, [r0, #20]
a0006718: e3530000 cmp r3, #0
a000671c: 0a000005 beq a0006738 <_POSIX_Condition_variables_Wait_support+0x8c>
a0006720: e5942000 ldr r2, [r4]
a0006724: e1530002 cmp r3, r2
a0006728: 0a000002 beq a0006738 <_POSIX_Condition_variables_Wait_support+0x8c>
_Thread_Enable_dispatch();
a000672c: eb000c93 bl a0009980 <_Thread_Enable_dispatch>
return EINVAL;
a0006730: e3a05016 mov r5, #22
a0006734: eafffff3 b a0006708 <_POSIX_Condition_variables_Wait_support+0x5c>
}
(void) pthread_mutex_unlock( mutex );
a0006738: e1a00004 mov r0, r4
a000673c: eb0000e7 bl a0006ae0 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
a0006740: e3570000 cmp r7, #0
a0006744: 0a000006 beq a0006764 <_POSIX_Condition_variables_Wait_support+0xb8>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
a0006748: eb000c8c bl a0009980 <_Thread_Enable_dispatch>
status = ETIMEDOUT;
a000674c: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
a0006750: e1a00004 mov r0, r4
a0006754: eb0000c0 bl a0006a5c <pthread_mutex_lock>
if ( mutex_status )
return EINVAL;
a0006758: e3500000 cmp r0, #0
a000675c: 13a05016 movne r5, #22
a0006760: eaffffe8 b a0006708 <_POSIX_Condition_variables_Wait_support+0x5c>
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a0006764: e59f5050 ldr r5, [pc, #80] ; a00067bc <_POSIX_Condition_variables_Wait_support+0x110>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a0006768: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
a000676c: e28a0018 add r0, sl, #24
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a0006770: e5953004 ldr r3, [r5, #4]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a0006774: e58a2014 str r2, [sl, #20]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0006778: e3a02001 mov r2, #1
a000677c: e58a2048 str r2, [sl, #72] ; 0x48
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a0006780: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
a0006784: e5962000 ldr r2, [r6]
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
a0006788: e1a01008 mov r1, r8
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
a000678c: e5830044 str r0, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
a0006790: e5832020 str r2, [r3, #32]
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
a0006794: e59f2024 ldr r2, [pc, #36] ; a00067c0 <_POSIX_Condition_variables_Wait_support+0x114>
a0006798: eb000db1 bl a0009e64 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a000679c: eb000c77 bl a0009980 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
a00067a0: e5953004 ldr r3, [r5, #4]
a00067a4: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
a00067a8: e3550074 cmp r5, #116 ; 0x74
a00067ac: 13550000 cmpne r5, #0
a00067b0: 0affffe6 beq a0006750 <_POSIX_Condition_variables_Wait_support+0xa4>
a00067b4: eaffffd3 b a0006708 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
a000d9bc <_POSIX_signals_Clear_process_signals>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000d9bc: e10f2000 mrs r2, CPSR
a000d9c0: e3823080 orr r3, r2, #128 ; 0x80
a000d9c4: e129f003 msr CPSR_fc, r3
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
a000d9c8: e3a0300c mov r3, #12
a000d9cc: e0030390 mul r3, r0, r3
a000d9d0: e59f1048 ldr r1, [pc, #72] ; a000da20 <_POSIX_signals_Clear_process_signals+0x64>
a000d9d4: e7911003 ldr r1, [r1, r3]
a000d9d8: e3510002 cmp r1, #2
a000d9dc: 0a000007 beq a000da00 <_POSIX_signals_Clear_process_signals+0x44>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
a000d9e0: e59f303c ldr r3, [pc, #60] ; a000da24 <_POSIX_signals_Clear_process_signals+0x68>
a000d9e4: e3a0c001 mov ip, #1
a000d9e8: e2400001 sub r0, r0, #1
a000d9ec: e5931000 ldr r1, [r3]
a000d9f0: e1c1001c bic r0, r1, ip, lsl r0
a000d9f4: e5830000 str r0, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000d9f8: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
a000d9fc: e12fff1e bx lr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a000da00: e59f1020 ldr r1, [pc, #32] ; a000da28 <_POSIX_signals_Clear_process_signals+0x6c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000da04: e283c004 add ip, r3, #4
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
a000da08: e7913003 ldr r3, [r1, r3]
a000da0c: e08c1001 add r1, ip, r1
a000da10: e1530001 cmp r3, r1
a000da14: 0afffff1 beq a000d9e0 <_POSIX_signals_Clear_process_signals+0x24>
a000da18: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
}
a000da1c: e12fff1e bx lr <== NOT EXECUTED
a00065bc <_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();
a00065bc: e59f30bc ldr r3, [pc, #188] ; a0006680 <_TOD_Validate+0xc4>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a00065c0: 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) ||
a00065c4: 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();
a00065c8: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a00065cc: 0a000029 beq a0006678 <_TOD_Validate+0xbc>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a00065d0: e3a0093d mov r0, #999424 ; 0xf4000
a00065d4: e2800d09 add r0, r0, #576 ; 0x240
a00065d8: eb00490e bl a0018a18 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a00065dc: e5943018 ldr r3, [r4, #24]
a00065e0: e1500003 cmp r0, r3
a00065e4: 9a00001f bls a0006668 <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a00065e8: e5943014 ldr r3, [r4, #20]
a00065ec: e353003b cmp r3, #59 ; 0x3b
a00065f0: 8a00001c bhi a0006668 <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a00065f4: e5943010 ldr r3, [r4, #16]
a00065f8: e353003b cmp r3, #59 ; 0x3b
a00065fc: 8a000019 bhi a0006668 <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a0006600: e594300c ldr r3, [r4, #12]
a0006604: e3530017 cmp r3, #23
a0006608: 8a000016 bhi a0006668 <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a000660c: 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) ||
a0006610: e3500000 cmp r0, #0
a0006614: 0a000016 beq a0006674 <_TOD_Validate+0xb8>
(the_tod->month == 0) ||
a0006618: e350000c cmp r0, #12
a000661c: 8a000011 bhi a0006668 <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a0006620: 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) ||
a0006624: e3a03d1f mov r3, #1984 ; 0x7c0
a0006628: e2833003 add r3, r3, #3
a000662c: e1520003 cmp r2, r3
a0006630: 9a00000c bls a0006668 <_TOD_Validate+0xac>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a0006634: 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) ||
a0006638: e3540000 cmp r4, #0
a000663c: 0a00000b beq a0006670 <_TOD_Validate+0xb4>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a0006640: e3120003 tst r2, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a0006644: 059f3038 ldreq r3, [pc, #56] ; a0006684 <_TOD_Validate+0xc8>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a0006648: 159f3034 ldrne r3, [pc, #52] ; a0006684 <_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 ];
a000664c: 0280000d addeq r0, r0, #13
a0006650: 07930100 ldreq r0, [r3, r0, lsl #2]
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a0006654: 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(
a0006658: e1500004 cmp r0, r4
a000665c: 33a00000 movcc r0, #0
a0006660: 23a00001 movcs r0, #1
a0006664: 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;
a0006668: e3a00000 mov r0, #0
a000666c: e8bd8010 pop {r4, pc}
a0006670: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
a0006674: 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;
a0006678: e1a00004 mov r0, r4 <== NOT EXECUTED
a000667c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0007cb8 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
a0007cb8: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
a0007cbc: e92d0ff0 push {r4, r5, r6, r7, r8, r9, sl, fp}
a0007cc0: e281403c add r4, r1, #60 ; 0x3c
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
a0007cc4: e281c038 add ip, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0007cc8: e5814038 str r4, [r1, #56] ; 0x38
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
a0007ccc: e3130020 tst r3, #32
the_chain->permanent_null = NULL;
a0007cd0: e3a04000 mov r4, #0
the_chain->last = _Chain_Head(the_chain);
a0007cd4: e581c040 str ip, [r1, #64] ; 0x40
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
a0007cd8: e581403c str r4, [r1, #60] ; 0x3c
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
a0007cdc: e1a0c323 lsr ip, r3, #6
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
a0007ce0: e5905038 ldr r5, [r0, #56] ; 0x38
if ( _Thread_queue_Is_reverse_search( priority ) )
a0007ce4: 1a00001f bne a0007d68 <_Thread_queue_Enqueue_priority+0xb0>
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
a0007ce8: e3a0900c mov r9, #12
a0007cec: e00c0c99 mul ip, r9, ip
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a0007cf0: e28c8004 add r8, ip, #4
a0007cf4: e080900c add r9, r0, ip
a0007cf8: e0808008 add r8, r0, r8
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0007cfc: e10f7000 mrs r7, CPSR
a0007d00: e387c080 orr ip, r7, #128 ; 0x80
a0007d04: e129f00c msr CPSR_fc, ip
a0007d08: e1a0a007 mov sl, r7
a0007d0c: e599c000 ldr ip, [r9]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a0007d10: e15c0008 cmp ip, r8
a0007d14: 1a000009 bne a0007d40 <_Thread_queue_Enqueue_priority+0x88>
a0007d18: ea000054 b a0007e70 <_Thread_queue_Enqueue_priority+0x1b8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a0007d1c: e10f6000 mrs r6, CPSR
a0007d20: e129f007 msr CPSR_fc, r7
a0007d24: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
a0007d28: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
a0007d2c: e1150006 tst r5, r6
a0007d30: 0a000036 beq a0007e10 <_Thread_queue_Enqueue_priority+0x158>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
a0007d34: e59cc000 ldr ip, [ip]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a0007d38: e15c0008 cmp ip, r8
a0007d3c: 0a000002 beq a0007d4c <_Thread_queue_Enqueue_priority+0x94>
search_priority = search_thread->current_priority;
a0007d40: e59c4014 ldr r4, [ip, #20]
if ( priority <= search_priority )
a0007d44: e1530004 cmp r3, r4
a0007d48: 8afffff3 bhi a0007d1c <_Thread_queue_Enqueue_priority+0x64>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
a0007d4c: e5905030 ldr r5, [r0, #48] ; 0x30
a0007d50: e3550001 cmp r5, #1
a0007d54: 0a00002f beq a0007e18 <_Thread_queue_Enqueue_priority+0x160>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
a0007d58: e582a000 str sl, [r2]
return the_thread_queue->sync_state;
}
a0007d5c: e1a00005 mov r0, r5
a0007d60: e8bd0ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp}
a0007d64: e12fff1e bx lr
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
a0007d68: e3a0800c mov r8, #12
a0007d6c: e028089c mla r8, ip, r8, r0
a0007d70: e59f9100 ldr r9, [pc, #256] ; a0007e78 <_Thread_queue_Enqueue_priority+0x1c0>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
a0007d74: e1a0b008 mov fp, r8
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a0007d78: e5d94000 ldrb r4, [r9]
a0007d7c: e2844001 add r4, r4, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0007d80: e10f7000 mrs r7, CPSR
a0007d84: e387c080 orr ip, r7, #128 ; 0x80
a0007d88: e129f00c msr CPSR_fc, ip
a0007d8c: e1a0a007 mov sl, r7
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
a0007d90: e59bc008 ldr ip, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a0007d94: e15c0008 cmp ip, r8
a0007d98: 1a000009 bne a0007dc4 <_Thread_queue_Enqueue_priority+0x10c>
a0007d9c: ea00000b b a0007dd0 <_Thread_queue_Enqueue_priority+0x118>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a0007da0: e10f6000 mrs r6, CPSR
a0007da4: e129f007 msr CPSR_fc, r7
a0007da8: e129f006 msr CPSR_fc, r6
a0007dac: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
a0007db0: e1150006 tst r5, r6
a0007db4: 0a000013 beq a0007e08 <_Thread_queue_Enqueue_priority+0x150>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
a0007db8: e59cc004 ldr ip, [ip, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a0007dbc: e15c0008 cmp ip, r8
a0007dc0: 0a000002 beq a0007dd0 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
a0007dc4: e59c4014 ldr r4, [ip, #20]
if ( priority >= search_priority )
a0007dc8: e1530004 cmp r3, r4
a0007dcc: 3afffff3 bcc a0007da0 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a0007dd0: e5905030 ldr r5, [r0, #48] ; 0x30
a0007dd4: e3550001 cmp r5, #1
a0007dd8: 1affffde bne a0007d58 <_Thread_queue_Enqueue_priority+0xa0>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a0007ddc: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a0007de0: e3a03000 mov r3, #0
a0007de4: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a0007de8: 0a000016 beq a0007e48 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
a0007dec: e59c3000 ldr r3, [ip]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
a0007df0: e8811008 stm r1, {r3, ip}
search_node->next = the_node;
next_node->previous = the_node;
a0007df4: e5831004 str r1, [r3, #4]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
a0007df8: e58c1000 str r1, [ip]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a0007dfc: e5810044 str r0, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0007e00: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0007e04: eaffffd4 b a0007d5c <_Thread_queue_Enqueue_priority+0xa4>
a0007e08: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
a0007e0c: eaffffd9 b a0007d78 <_Thread_queue_Enqueue_priority+0xc0> <== NOT EXECUTED
a0007e10: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
a0007e14: eaffffb8 b a0007cfc <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a0007e18: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a0007e1c: e3a03000 mov r3, #0
a0007e20: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a0007e24: 0a000007 beq a0007e48 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
a0007e28: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a0007e2c: e581c000 str ip, [r1]
the_node->previous = previous_node;
a0007e30: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a0007e34: e5831000 str r1, [r3]
search_node->previous = the_node;
a0007e38: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
a0007e3c: e5810044 str r0, [r1, #68] ; 0x44
a0007e40: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0007e44: eaffffc4 b a0007d5c <_Thread_queue_Enqueue_priority+0xa4>
a0007e48: e28cc03c add ip, ip, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
a0007e4c: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a0007e50: e581c000 str ip, [r1]
the_node->previous = previous_node;
a0007e54: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a0007e58: e5831000 str r1, [r3]
search_node->previous = the_node;
a0007e5c: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
a0007e60: e5810044 str r0, [r1, #68] ; 0x44
a0007e64: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0007e68: e3a05001 mov r5, #1
a0007e6c: eaffffba b a0007d5c <_Thread_queue_Enqueue_priority+0xa4>
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
a0007e70: e3e04000 mvn r4, #0
a0007e74: eaffffb4 b a0007d4c <_Thread_queue_Enqueue_priority+0x94>
a000bbe4 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
a000bbe4: e92d4070 push {r4, r5, r6, lr}
a000bbe8: e20220ff and r2, r2, #255 ; 0xff
a000bbec: e24dd004 sub sp, sp, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000bbf0: e10fc000 mrs ip, CPSR
a000bbf4: e38c3080 orr r3, ip, #128 ; 0x80
a000bbf8: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
a000bbfc: e5910010 ldr r0, [r1, #16]
a000bc00: e3a03bef mov r3, #244736 ; 0x3bc00
a000bc04: e2833e2e add r3, r3, #736 ; 0x2e0
a000bc08: e0003003 and r3, r0, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a000bc0c: e3530000 cmp r3, #0
a000bc10: 0a000021 beq a000bc9c <_Thread_queue_Extract_priority_helper+0xb8>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a000bc14: e5913038 ldr r3, [r1, #56] ; 0x38
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
a000bc18: e8910030 ldm r1, {r4, r5}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000bc1c: e281003c add r0, r1, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000bc20: e1530000 cmp r3, r0
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
a000bc24: 05854000 streq r4, [r5]
next_node->previous = previous_node;
a000bc28: 05845004 streq r5, [r4, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000bc2c: 0a00000c beq a000bc64 <_Thread_queue_Extract_priority_helper+0x80>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
a000bc30: e5910040 ldr r0, [r1, #64] ; 0x40
new_second_node = new_first_node->next;
a000bc34: e5936000 ldr r6, [r3]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000bc38: e5843004 str r3, [r4, #4]
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000bc3c: e1500003 cmp r0, r3
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
a000bc40: e5853000 str r3, [r5]
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000bc44: e8830030 stm r3, {r4, r5}
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000bc48: 0a000005 beq a000bc64 <_Thread_queue_Extract_priority_helper+0x80>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
a000bc4c: e2835038 add r5, r3, #56 ; 0x38
a000bc50: e283403c add r4, r3, #60 ; 0x3c
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
new_second_node->previous =
a000bc54: e5865004 str r5, [r6, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
a000bc58: e5836038 str r6, [r3, #56] ; 0x38
new_first_thread->Wait.Block2n.last = last_node;
a000bc5c: e5830040 str r0, [r3, #64] ; 0x40
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
a000bc60: e5804000 str r4, [r0]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a000bc64: e3520000 cmp r2, #0
a000bc68: 1a000008 bne a000bc90 <_Thread_queue_Extract_priority_helper+0xac>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000bc6c: e5913050 ldr r3, [r1, #80] ; 0x50
a000bc70: e3530002 cmp r3, #2
a000bc74: 0a00000a beq a000bca4 <_Thread_queue_Extract_priority_helper+0xc0>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000bc78: e129f00c msr CPSR_fc, ip
a000bc7c: e1a00001 mov r0, r1
a000bc80: e59f103c ldr r1, [pc, #60] ; a000bcc4 <_Thread_queue_Extract_priority_helper+0xe0>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000bc84: e28dd004 add sp, sp, #4
a000bc88: e8bd4070 pop {r4, r5, r6, lr}
a000bc8c: eaffedad b a0007348 <_Thread_Clear_state>
a000bc90: e129f00c msr CPSR_fc, ip
a000bc94: e28dd004 add sp, sp, #4
a000bc98: e8bd8070 pop {r4, r5, r6, pc}
a000bc9c: e129f00c msr CPSR_fc, ip
a000bca0: eafffffb b a000bc94 <_Thread_queue_Extract_priority_helper+0xb0>
a000bca4: e3a03003 mov r3, #3 <== NOT EXECUTED
a000bca8: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a000bcac: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000bcb0: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a000bcb4: e58d1000 str r1, [sp] <== NOT EXECUTED
a000bcb8: ebfff340 bl a00089c0 <_Watchdog_Remove> <== NOT EXECUTED
a000bcbc: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a000bcc0: eaffffed b a000bc7c <_Thread_queue_Extract_priority_helper+0x98><== NOT EXECUTED
a0015e6c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a0015e6c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0015e70: e24dd024 sub sp, sp, #36 ; 0x24
a0015e74: e28d700c add r7, sp, #12
a0015e78: e28d2018 add r2, sp, #24
a0015e7c: e282a004 add sl, r2, #4
a0015e80: e2872004 add r2, r7, #4
a0015e84: 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);
a0015e88: e28d2018 add r2, sp, #24
a0015e8c: e58d2020 str r2, [sp, #32]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0015e90: e59d2000 ldr r2, [sp]
a0015e94: e59f91cc ldr r9, [pc, #460] ; a0016068 <_Timer_server_Body+0x1fc>
a0015e98: e59fb1cc ldr fp, [pc, #460] ; a001606c <_Timer_server_Body+0x200>
a0015e9c: e58d200c str r2, [sp, #12]
a0015ea0: e2802008 add r2, r0, #8
the_chain->permanent_null = NULL;
a0015ea4: e3a03000 mov r3, #0
a0015ea8: e58d2004 str r2, [sp, #4]
a0015eac: e2802040 add r2, r0, #64 ; 0x40
a0015eb0: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0015eb4: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
a0015eb8: e58d301c str r3, [sp, #28]
a0015ebc: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
a0015ec0: e58d7014 str r7, [sp, #20]
a0015ec4: e2806030 add r6, r0, #48 ; 0x30
a0015ec8: e2808068 add r8, r0, #104 ; 0x68
a0015ecc: 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;
a0015ed0: e28d3018 add r3, sp, #24
a0015ed4: 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;
a0015ed8: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a0015edc: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0015ee0: e1a02007 mov r2, r7
a0015ee4: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a0015ee8: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0015eec: e0611003 rsb r1, r1, r3
a0015ef0: eb0011d7 bl a001a654 <_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();
a0015ef4: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a0015ef8: 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 ) {
a0015efc: e1550002 cmp r5, r2
a0015f00: 8a000022 bhi a0015f90 <_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 ) {
a0015f04: 3a000018 bcc a0015f6c <_Timer_server_Body+0x100>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
a0015f08: 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 );
a0015f0c: e5940078 ldr r0, [r4, #120] ; 0x78
a0015f10: eb0002cf bl a0016a54 <_Chain_Get>
if ( timer == NULL ) {
a0015f14: e2501000 subs r1, r0, #0
a0015f18: 0a00000b beq a0015f4c <_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 ) {
a0015f1c: e5913038 ldr r3, [r1, #56] ; 0x38
a0015f20: e3530001 cmp r3, #1
a0015f24: 0a000015 beq a0015f80 <_Timer_server_Body+0x114>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a0015f28: e3530003 cmp r3, #3
a0015f2c: 1afffff6 bne a0015f0c <_Timer_server_Body+0xa0>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a0015f30: e2811010 add r1, r1, #16
a0015f34: e1a00008 mov r0, r8
a0015f38: eb0011ef bl a001a6fc <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a0015f3c: e5940078 ldr r0, [r4, #120] ; 0x78
a0015f40: eb0002c3 bl a0016a54 <_Chain_Get>
if ( timer == NULL ) {
a0015f44: e2501000 subs r1, r0, #0
a0015f48: 1afffff3 bne a0015f1c <_Timer_server_Body+0xb0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015f4c: e10f2000 mrs r2, CPSR
a0015f50: e3823080 orr r3, r2, #128 ; 0x80
a0015f54: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
a0015f58: e59d3018 ldr r3, [sp, #24]
a0015f5c: e15a0003 cmp sl, r3
a0015f60: 0a00000f beq a0015fa4 <_Timer_server_Body+0x138>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015f64: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a0015f68: eaffffda b a0015ed8 <_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 );
a0015f6c: e1a00008 mov r0, r8
a0015f70: e3a01001 mov r1, #1
a0015f74: e0652002 rsb r2, r5, r2
a0015f78: eb001186 bl a001a598 <_Watchdog_Adjust>
a0015f7c: eaffffe1 b a0015f08 <_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 );
a0015f80: e1a00006 mov r0, r6
a0015f84: e2811010 add r1, r1, #16
a0015f88: eb0011db bl a001a6fc <_Watchdog_Insert>
a0015f8c: eaffffde b a0015f0c <_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 );
a0015f90: e0621005 rsb r1, r2, r5
a0015f94: e1a00008 mov r0, r8
a0015f98: e1a02007 mov r2, r7
a0015f9c: eb0011ac bl a001a654 <_Watchdog_Adjust_to_chain>
a0015fa0: eaffffd8 b a0015f08 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
a0015fa4: e5841078 str r1, [r4, #120] ; 0x78
a0015fa8: 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 ) ) {
a0015fac: e59d300c ldr r3, [sp, #12]
a0015fb0: e59d2000 ldr r2, [sp]
a0015fb4: e1520003 cmp r2, r3
a0015fb8: 0a000015 beq a0016014 <_Timer_server_Body+0x1a8>
a0015fbc: e1a05004 mov r5, r4
a0015fc0: e59d4000 ldr r4, [sp]
a0015fc4: ea000009 b a0015ff0 <_Timer_server_Body+0x184>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
a0015fc8: e5923000 ldr r3, [r2]
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
a0015fcc: 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;
a0015fd0: 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;
a0015fd4: e3a03000 mov r3, #0
a0015fd8: e5823008 str r3, [r2, #8]
a0015fdc: 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 );
a0015fe0: e592301c ldr r3, [r2, #28]
a0015fe4: e5920020 ldr r0, [r2, #32]
a0015fe8: e5921024 ldr r1, [r2, #36] ; 0x24
a0015fec: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015ff0: e10f1000 mrs r1, CPSR
a0015ff4: e3813080 orr r3, r1, #128 ; 0x80
a0015ff8: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a0015ffc: e59d200c ldr r2, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0016000: e1540002 cmp r4, r2
a0016004: 1affffef bne a0015fc8 <_Timer_server_Body+0x15c>
a0016008: e1a04005 mov r4, r5
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001600c: e129f001 msr CPSR_fc, r1
a0016010: eaffffae b a0015ed0 <_Timer_server_Body+0x64>
}
} else {
ts->active = false;
a0016014: e3a02000 mov r2, #0
a0016018: e5c4207c strb r2, [r4, #124] ; 0x7c
a001601c: e59f204c ldr r2, [pc, #76] ; a0016070 <_Timer_server_Body+0x204>
a0016020: e5923000 ldr r3, [r2]
a0016024: e2833001 add r3, r3, #1
a0016028: e5823000 str r3, [r2]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
a001602c: e3a01008 mov r1, #8
a0016030: e5940000 ldr r0, [r4]
a0016034: eb000eed bl a0019bf0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a0016038: e1a00004 mov r0, r4
a001603c: ebffff5e bl a0015dbc <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a0016040: e1a00004 mov r0, r4
a0016044: ebffff72 bl a0015e14 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a0016048: eb000c47 bl a001916c <_Thread_Enable_dispatch>
ts->active = true;
a001604c: e3a03001 mov r3, #1
a0016050: 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 );
a0016054: e59d0004 ldr r0, [sp, #4]
a0016058: eb001214 bl a001a8b0 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a001605c: e59d0008 ldr r0, [sp, #8]
a0016060: eb001212 bl a001a8b0 <_Watchdog_Remove>
a0016064: eaffff99 b a0015ed0 <_Timer_server_Body+0x64>
a00086d4 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a00086d4: 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 ;
a00086d8: e59f504c ldr r5, [pc, #76] ; a000872c <_User_extensions_Thread_create+0x58>
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a00086dc: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
a00086e0: e4954004 ldr r4, [r5], #4
a00086e4: e1540005 cmp r4, r5
a00086e8: 0a00000d beq a0008724 <_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)(
a00086ec: e59f703c ldr r7, [pc, #60] ; a0008730 <_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 ) {
a00086f0: e5943014 ldr r3, [r4, #20]
status = (*the_extension->Callouts.thread_create)(
a00086f4: 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 ) {
a00086f8: e3530000 cmp r3, #0
a00086fc: 0a000003 beq a0008710 <_User_extensions_Thread_create+0x3c>
status = (*the_extension->Callouts.thread_create)(
a0008700: e5970004 ldr r0, [r7, #4]
a0008704: e12fff33 blx r3
_Thread_Executing,
the_thread
);
if ( !status )
a0008708: e3500000 cmp r0, #0
a000870c: 0a000005 beq a0008728 <_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 ) {
a0008710: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
a0008714: e1540005 cmp r4, r5
a0008718: 1afffff4 bne a00086f0 <_User_extensions_Thread_create+0x1c>
if ( !status )
return false;
}
}
return true;
a000871c: e3a00001 mov r0, #1
a0008720: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0008724: e3a00001 mov r0, #1 <== NOT EXECUTED
}
a0008728: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000a6c0 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000a6c0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000a6c4: e1a04000 mov r4, r0
a000a6c8: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a6cc: e10f3000 mrs r3, CPSR
a000a6d0: e3832080 orr r2, r3, #128 ; 0x80
a000a6d4: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a000a6d8: e1a07000 mov r7, r0
a000a6dc: 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 ) ) {
a000a6e0: e1520007 cmp r2, r7
a000a6e4: 0a000018 beq a000a74c <_Watchdog_Adjust+0x8c>
switch ( direction ) {
a000a6e8: e3510000 cmp r1, #0
a000a6ec: 1a000018 bne a000a754 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a6f0: e3550000 cmp r5, #0
a000a6f4: 0a000014 beq a000a74c <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a6f8: e5926010 ldr r6, [r2, #16]
a000a6fc: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a700: 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 ) {
a000a704: 2a000005 bcs a000a720 <_Watchdog_Adjust+0x60>
a000a708: ea000018 b a000a770 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a70c: e0555006 subs r5, r5, r6
a000a710: 0a00000d beq a000a74c <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a714: e5926010 ldr r6, [r2, #16]
a000a718: e1560005 cmp r6, r5
a000a71c: 8a000013 bhi a000a770 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a720: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a724: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000a728: e1a00004 mov r0, r4
a000a72c: eb0000aa bl a000a9dc <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a730: e10f3000 mrs r3, CPSR
a000a734: e3832080 orr r2, r3, #128 ; 0x80
a000a738: e129f002 msr CPSR_fc, r2
a000a73c: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000a740: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
a000a744: e1a02001 mov r2, r1
a000a748: 1affffef bne a000a70c <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a74c: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a750: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000a754: e3510001 cmp r1, #1
a000a758: 1afffffb bne a000a74c <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000a75c: e5921010 ldr r1, [r2, #16]
a000a760: e0815005 add r5, r1, r5
a000a764: e5825010 str r5, [r2, #16]
a000a768: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a76c: 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;
a000a770: e0655006 rsb r5, r5, r6
a000a774: e5825010 str r5, [r2, #16]
break;
a000a778: eafffff3 b a000a74c <_Watchdog_Adjust+0x8c>
a0021a7c <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
a0021a7c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0021a80: e24dd00c sub sp, sp, #12
a0021a84: e1a04000 mov r4, r0
a0021a88: e1a05001 mov r5, r1
a0021a8c: e1a07002 mov r7, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
a0021a90: ebffff37 bl a0021774 <getpid>
a0021a94: e1500004 cmp r0, r4
a0021a98: 1a000094 bne a0021cf0 <killinfo+0x274>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
a0021a9c: e3550000 cmp r5, #0
a0021aa0: 0a000097 beq a0021d04 <killinfo+0x288>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a0021aa4: e2454001 sub r4, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a0021aa8: e354001f cmp r4, #31
a0021aac: 8a000094 bhi a0021d04 <killinfo+0x288>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
a0021ab0: e59f6278 ldr r6, [pc, #632] ; a0021d30 <killinfo+0x2b4>
a0021ab4: e3a0300c mov r3, #12
a0021ab8: e0236395 mla r3, r5, r3, r6
a0021abc: e5933008 ldr r3, [r3, #8]
a0021ac0: e3530001 cmp r3, #1
return 0;
a0021ac4: 03a00000 moveq r0, #0
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
a0021ac8: 0a000039 beq a0021bb4 <killinfo+0x138>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
a0021acc: e3550008 cmp r5, #8
a0021ad0: 13550004 cmpne r5, #4
a0021ad4: 0a000038 beq a0021bbc <killinfo+0x140>
a0021ad8: e355000b cmp r5, #11
a0021adc: 0a000036 beq a0021bbc <killinfo+0x140>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a0021ae0: e3a03001 mov r3, #1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
a0021ae4: e3570000 cmp r7, #0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
a0021ae8: e58d3004 str r3, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
a0021aec: e58d5000 str r5, [sp]
a0021af0: e1a04413 lsl r4, r3, r4
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
a0021af4: 15973000 ldrne r3, [r7]
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
a0021af8: 058d7008 streq r7, [sp, #8]
} else {
siginfo->si_value = *value;
a0021afc: 158d3008 strne r3, [sp, #8]
a0021b00: e59f322c ldr r3, [pc, #556] ; a0021d34 <killinfo+0x2b8>
a0021b04: e5932000 ldr r2, [r3]
a0021b08: e2822001 add r2, r2, #1
a0021b0c: e5832000 str r2, [r3]
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
a0021b10: e59f3220 ldr r3, [pc, #544] ; a0021d38 <killinfo+0x2bc>
a0021b14: e5930004 ldr r0, [r3, #4]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
a0021b18: e5903108 ldr r3, [r0, #264] ; 0x108
a0021b1c: e59330cc ldr r3, [r3, #204] ; 0xcc
a0021b20: e1d43003 bics r3, r4, r3
a0021b24: 1a000014 bne a0021b7c <killinfo+0x100>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
a0021b28: e59fc20c ldr ip, [pc, #524] ; a0021d3c <killinfo+0x2c0>
a0021b2c: e49c3004 ldr r3, [ip], #4
a0021b30: e153000c cmp r3, ip
a0021b34: 0a000033 beq a0021c08 <killinfo+0x18c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021b38: e5932030 ldr r2, [r3, #48] ; 0x30
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
a0021b3c: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0021b40: e5931108 ldr r1, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021b44: e1140002 tst r4, r2
a0021b48: 0a000008 beq a0021b70 <killinfo+0xf4>
a0021b4c: ea00000a b a0021b7c <killinfo+0x100>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
a0021b50: e5933000 ldr r3, [r3]
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
a0021b54: e153000c cmp r3, ip
a0021b58: 0a00002a beq a0021c08 <killinfo+0x18c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021b5c: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0021b60: e5931108 ldr r1, [r3, #264] ; 0x108 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
a0021b64: e1a00003 mov r0, r3 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021b68: e1140002 tst r4, r2 <== NOT EXECUTED
a0021b6c: 1a000002 bne a0021b7c <killinfo+0x100> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
a0021b70: e59120cc ldr r2, [r1, #204] ; 0xcc
a0021b74: e1d42002 bics r2, r4, r2
a0021b78: 0afffff4 beq a0021b50 <killinfo+0xd4>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
a0021b7c: e1a01005 mov r1, r5
a0021b80: e1a0200d mov r2, sp
a0021b84: eb00007b bl a0021d78 <_POSIX_signals_Unblock_thread>
a0021b88: e3500000 cmp r0, #0
a0021b8c: 1a000006 bne a0021bac <killinfo+0x130>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
a0021b90: e1a00004 mov r0, r4
a0021b94: eb00006d bl a0021d50 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
a0021b98: e3a0300c mov r3, #12
a0021b9c: e0050593 mul r5, r3, r5
a0021ba0: e7963005 ldr r3, [r6, r5]
a0021ba4: e3530002 cmp r3, #2
a0021ba8: 0a000007 beq a0021bcc <killinfo+0x150>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
a0021bac: ebffac5f bl a000cd30 <_Thread_Enable_dispatch>
return 0;
a0021bb0: e3a00000 mov r0, #0
}
a0021bb4: e28dd00c add sp, sp, #12
a0021bb8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
a0021bbc: eb0000f3 bl a0021f90 <pthread_self>
a0021bc0: e1a01005 mov r1, r5
a0021bc4: eb0000b8 bl a0021eac <pthread_kill>
a0021bc8: eafffff9 b a0021bb4 <killinfo+0x138>
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
a0021bcc: e59f016c ldr r0, [pc, #364] ; a0021d40 <killinfo+0x2c4>
a0021bd0: ebffa653 bl a000b524 <_Chain_Get>
if ( !psiginfo ) {
a0021bd4: e2501000 subs r1, r0, #0
a0021bd8: 0a00004e beq a0021d18 <killinfo+0x29c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a0021bdc: e28d3004 add r3, sp, #4
a0021be0: e4932004 ldr r2, [r3], #4
a0021be4: e59d0000 ldr r0, [sp]
a0021be8: e5933000 ldr r3, [r3]
a0021bec: e5810008 str r0, [r1, #8]
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a0021bf0: e59f014c ldr r0, [pc, #332] ; a0021d44 <killinfo+0x2c8>
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a0021bf4: e581200c str r2, [r1, #12]
a0021bf8: e5813010 str r3, [r1, #16]
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a0021bfc: e0800005 add r0, r0, r5
a0021c00: ebffa634 bl a000b4d8 <_Chain_Append>
a0021c04: eaffffe8 b a0021bac <killinfo+0x130>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a0021c08: e59f3138 ldr r3, [pc, #312] ; a0021d48 <killinfo+0x2cc>
a0021c0c: e59fa138 ldr sl, [pc, #312] ; a0021d4c <killinfo+0x2d0>
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
a0021c10: e3a00000 mov r0, #0
interested_priority = PRIORITY_MAXIMUM + 1;
a0021c14: e5d3e000 ldrb lr, [r3]
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
a0021c18: e28a9008 add r9, sl, #8
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a0021c1c: e28ee001 add lr, lr, #1
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
a0021c20: e5ba3004 ldr r3, [sl, #4]!
a0021c24: e3530000 cmp r3, #0
a0021c28: 0a000020 beq a0021cb0 <killinfo+0x234>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
a0021c2c: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
a0021c30: e1d371b0 ldrh r7, [r3, #16]
object_table = the_info->local_table;
a0021c34: e593101c ldr r1, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
a0021c38: e3570000 cmp r7, #0
a0021c3c: 0a00001b beq a0021cb0 <killinfo+0x234>
a0021c40: e3a02001 mov r2, #1
the_thread = (Thread_Control *) object_table[ index ];
a0021c44: e5b13004 ldr r3, [r1, #4]!
if ( !the_thread )
a0021c48: e3530000 cmp r3, #0
a0021c4c: 0a000014 beq a0021ca4 <killinfo+0x228>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
a0021c50: e593c014 ldr ip, [r3, #20]
a0021c54: e15c000e cmp ip, lr
a0021c58: 8a000011 bhi a0021ca4 <killinfo+0x228>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
a0021c5c: e5938108 ldr r8, [r3, #264] ; 0x108
a0021c60: e59880cc ldr r8, [r8, #204] ; 0xcc
a0021c64: e1d48008 bics r8, r4, r8
a0021c68: 0a00000d beq a0021ca4 <killinfo+0x228>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
a0021c6c: e15c000e cmp ip, lr
a0021c70: 3a000018 bcc a0021cd8 <killinfo+0x25c>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
a0021c74: e5908010 ldr r8, [r0, #16]
a0021c78: e3580000 cmp r8, #0
a0021c7c: 0a000008 beq a0021ca4 <killinfo+0x228>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a0021c80: e593b010 ldr fp, [r3, #16]
a0021c84: e35b0000 cmp fp, #0
a0021c88: 0a000012 beq a0021cd8 <killinfo+0x25c>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
a0021c8c: e3180201 tst r8, #268435456 ; 0x10000000
a0021c90: 1a000003 bne a0021ca4 <killinfo+0x228>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
a0021c94: e20bb201 and fp, fp, #268435456 ; 0x10000000
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
a0021c98: e35b0000 cmp fp, #0
a0021c9c: 11a0e00c movne lr, ip
a0021ca0: 11a00003 movne r0, r3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a0021ca4: e2822001 add r2, r2, #1
a0021ca8: e1570002 cmp r7, r2
a0021cac: 2affffe4 bcs a0021c44 <killinfo+0x1c8>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
a0021cb0: e15a0009 cmp sl, r9
a0021cb4: 1affffd9 bne a0021c20 <killinfo+0x1a4>
}
}
}
}
if ( interested ) {
a0021cb8: e3500000 cmp r0, #0
a0021cbc: 0affffb3 beq a0021b90 <killinfo+0x114>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
a0021cc0: e1a01005 mov r1, r5
a0021cc4: e1a0200d mov r2, sp
a0021cc8: eb00002a bl a0021d78 <_POSIX_signals_Unblock_thread>
a0021ccc: e3500000 cmp r0, #0
a0021cd0: 0affffae beq a0021b90 <killinfo+0x114>
a0021cd4: eaffffb4 b a0021bac <killinfo+0x130> <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a0021cd8: e2822001 add r2, r2, #1
a0021cdc: e1570002 cmp r7, r2
*/
if ( !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a0021ce0: e1a0e00c mov lr, ip
a0021ce4: e1a00003 mov r0, r3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a0021ce8: 2affffd5 bcs a0021c44 <killinfo+0x1c8>
a0021cec: eaffffef b a0021cb0 <killinfo+0x234>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
a0021cf0: ebffc516 bl a0013150 <__errno>
a0021cf4: e3a03003 mov r3, #3
a0021cf8: e5803000 str r3, [r0]
a0021cfc: e3e00000 mvn r0, #0
a0021d00: eaffffab b a0021bb4 <killinfo+0x138>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
a0021d04: ebffc511 bl a0013150 <__errno>
a0021d08: e3a03016 mov r3, #22
a0021d0c: e5803000 str r3, [r0]
a0021d10: e3e00000 mvn r0, #0
a0021d14: eaffffa6 b a0021bb4 <killinfo+0x138>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
a0021d18: ebffac04 bl a000cd30 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
a0021d1c: ebffc50b bl a0013150 <__errno>
a0021d20: e3a0300b mov r3, #11
a0021d24: e5803000 str r3, [r0]
a0021d28: e3e00000 mvn r0, #0
a0021d2c: eaffffa0 b a0021bb4 <killinfo+0x138>
a0009cb4 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
a0009cb4: e3500000 cmp r0, #0
a0009cb8: 0a00000e beq a0009cf8 <pthread_attr_setschedpolicy+0x44>
a0009cbc: e5903000 ldr r3, [r0]
a0009cc0: e3530000 cmp r3, #0
a0009cc4: 0a00000b beq a0009cf8 <pthread_attr_setschedpolicy+0x44>
return EINVAL;
switch ( policy ) {
a0009cc8: e3510004 cmp r1, #4
a0009ccc: 9a000001 bls a0009cd8 <pthread_attr_setschedpolicy+0x24>
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a0009cd0: e3a00086 mov r0, #134 ; 0x86
}
}
a0009cd4: e12fff1e bx lr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a0009cd8: e3a03001 mov r3, #1
a0009cdc: e1a03113 lsl r3, r3, r1
a0009ce0: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
a0009ce4: 15801014 strne r1, [r0, #20]
return 0;
a0009ce8: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a0009cec: 112fff1e bxne lr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a0009cf0: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
a0009cf4: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a0009cf8: e3a00016 mov r0, #22
a0009cfc: e12fff1e bx lr
a000652c <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a000652c: e92d40f0 push {r4, r5, r6, r7, lr}
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
a0006530: e59f60a8 ldr r6, [pc, #168] ; a00065e0 <pthread_cond_init+0xb4>
a0006534: e3510000 cmp r1, #0
a0006538: 11a06001 movne r6, r1
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a000653c: e5963004 ldr r3, [r6, #4]
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a0006540: e1a05000 mov r5, r0
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a0006544: e3530001 cmp r3, #1
a0006548: 0a00001f beq a00065cc <pthread_cond_init+0xa0>
return EINVAL;
if ( !the_attr->is_initialized )
a000654c: e5963000 ldr r3, [r6]
a0006550: e3530000 cmp r3, #0
a0006554: 1a000001 bne a0006560 <pthread_cond_init+0x34>
return EINVAL;
a0006558: e3a00016 mov r0, #22
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000655c: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0006560: e59f307c ldr r3, [pc, #124] ; a00065e4 <pthread_cond_init+0xb8>
a0006564: e5932000 ldr r2, [r3]
a0006568: e2822001 add r2, r2, #1
a000656c: e5832000 str r2, [r3]
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
a0006570: e59f7070 ldr r7, [pc, #112] ; a00065e8 <pthread_cond_init+0xbc>
a0006574: e1a00007 mov r0, r7
a0006578: eb00099b bl a0008bec <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
a000657c: e2504000 subs r4, r0, #0
a0006580: 0a000013 beq a00065d4 <pthread_cond_init+0xa8>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a0006584: e5963004 ldr r3, [r6, #4]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a0006588: e3a06000 mov r6, #0
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
a000658c: e2840018 add r0, r4, #24
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a0006590: e5843010 str r3, [r4, #16]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
a0006594: e1a01006 mov r1, r6
a0006598: e3a02b02 mov r2, #2048 ; 0x800
a000659c: e3a03074 mov r3, #116 ; 0x74
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a00065a0: e5846014 str r6, [r4, #20]
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
a00065a4: eb000efd bl a000a1a0 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a00065a8: e5943008 ldr r3, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00065ac: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a00065b0: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00065b4: e7824721 str r4, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a00065b8: e584600c str r6, [r4, #12]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
a00065bc: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a00065c0: eb000cee bl a0009980 <_Thread_Enable_dispatch>
return 0;
a00065c4: e1a00006 mov r0, r6
a00065c8: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
a00065cc: e3a00016 mov r0, #22 <== NOT EXECUTED
a00065d0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
a00065d4: eb000ce9 bl a0009980 <_Thread_Enable_dispatch>
return ENOMEM;
a00065d8: e3a0000c mov r0, #12
a00065dc: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00055f4 <pthread_key_create>:
a00055f4: e59f30f8 ldr r3, [pc, #248] ; a00056f4 <pthread_key_create+0x100>
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
a00055f8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a00055fc: e5932000 ldr r2, [r3]
a0005600: e1a08000 mov r8, r0
a0005604: e1a04001 mov r4, r1
a0005608: e2822001 add r2, r2, #1
a000560c: e5832000 str r2, [r3]
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
a0005610: e59f00e0 ldr r0, [pc, #224] ; a00056f8 <pthread_key_create+0x104>
a0005614: eb0008a8 bl a00078bc <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
a0005618: e2507000 subs r7, r0, #0
a000561c: 0a000023 beq a00056b0 <pthread_key_create+0xbc>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
a0005620: e59f60d4 ldr r6, [pc, #212] ; a00056fc <pthread_key_create+0x108>
a0005624: e5874010 str r4, [r7, #16]
a0005628: e1a05007 mov r5, r7
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
a000562c: e3a04001 mov r4, #1
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
a0005630: e5b63004 ldr r3, [r6, #4]!
a0005634: e3530000 cmp r3, #0
a0005638: 0a00001a beq a00056a8 <pthread_key_create+0xb4>
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
a000563c: e5933004 ldr r3, [r3, #4]
a0005640: e1d3a1b0 ldrh sl, [r3, #16]
a0005644: e28aa001 add sl, sl, #1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
a0005648: e1a0a10a lsl sl, sl, #2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
a000564c: e1a0000a mov r0, sl
a0005650: eb001161 bl a0009bdc <_Workspace_Allocate>
if ( !table ) {
a0005654: e2503000 subs r3, r0, #0
a0005658: 0a000017 beq a00056bc <pthread_key_create+0xc8>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
a000565c: e5853018 str r3, [r5, #24]
memset( table, '\0', bytes_to_allocate );
a0005660: e3a01000 mov r1, #0
a0005664: e1a0200a mov r2, sl
a0005668: eb0026fd bl a000f264 <memset>
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
a000566c: e2844001 add r4, r4, #1
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
a0005670: e3540004 cmp r4, #4
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
a0005674: e2855004 add r5, r5, #4
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
a0005678: 1affffec bne a0005630 <pthread_key_create+0x3c>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000567c: e59f2074 ldr r2, [pc, #116] ; a00056f8 <pthread_key_create+0x104>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a0005680: e5973008 ldr r3, [r7, #8]
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a0005684: e3a04000 mov r4, #0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0005688: e592201c ldr r2, [r2, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000568c: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0005690: e7827721 str r7, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a0005694: e587400c str r4, [r7, #12]
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
a0005698: e5883000 str r3, [r8]
_Thread_Enable_dispatch();
a000569c: eb000beb bl a0008650 <_Thread_Enable_dispatch>
return 0;
a00056a0: e1a00004 mov r0, r4
}
a00056a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
a00056a8: e5853018 str r3, [r5, #24] <== NOT EXECUTED
a00056ac: eaffffee b a000566c <pthread_key_create+0x78> <== NOT EXECUTED
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
a00056b0: eb000be6 bl a0008650 <_Thread_Enable_dispatch>
return EAGAIN;
a00056b4: e3a0000b mov r0, #11
a00056b8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
a00056bc: e2545001 subs r5, r4, #1
a00056c0: 0a000005 beq a00056dc <pthread_key_create+0xe8>
int _EXFUN(pthread_once,
(pthread_once_t *__once_control, void (*__init_routine)(void)));
/* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */
int _EXFUN(pthread_key_create,
a00056c4: e2844005 add r4, r4, #5
a00056c8: e0874104 add r4, r7, r4, lsl #2
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
a00056cc: e5340004 ldr r0, [r4, #-4]!
a00056d0: eb001147 bl a0009bf4 <_Workspace_Free>
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
a00056d4: e2555001 subs r5, r5, #1
a00056d8: 1afffffb bne a00056cc <pthread_key_create+0xd8>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
a00056dc: e59f0014 ldr r0, [pc, #20] ; a00056f8 <pthread_key_create+0x104>
a00056e0: e1a01007 mov r1, r7
a00056e4: eb000950 bl a0007c2c <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
a00056e8: eb000bd8 bl a0008650 <_Thread_Enable_dispatch>
return ENOMEM;
a00056ec: e3a0000c mov r0, #12
a00056f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a00075e4 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
a00075e4: e3500000 cmp r0, #0
a00075e8: 0a000008 beq a0007610 <pthread_mutexattr_setpshared+0x2c>
a00075ec: e5903000 ldr r3, [r0]
a00075f0: e3530000 cmp r3, #0
a00075f4: 0a000005 beq a0007610 <pthread_mutexattr_setpshared+0x2c>
return EINVAL;
switch ( pshared ) {
a00075f8: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a00075fc: 95801004 strls r1, [r0, #4]
return 0;
a0007600: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a0007604: 912fff1e bxls lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a0007608: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000760c: e12fff1e bx lr <== NOT EXECUTED
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a0007610: e3a00016 mov r0, #22
a0007614: e12fff1e bx lr
a00071f0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
a00071f0: e3500000 cmp r0, #0
a00071f4: 0a000008 beq a000721c <pthread_rwlockattr_setpshared+0x2c>
return EINVAL;
if ( !attr->is_initialized )
a00071f8: e5903000 ldr r3, [r0]
a00071fc: e3530000 cmp r3, #0
a0007200: 0a000005 beq a000721c <pthread_rwlockattr_setpshared+0x2c>
return EINVAL;
switch ( pshared ) {
a0007204: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a0007208: 95801004 strls r1, [r0, #4]
return 0;
a000720c: 93a00000 movls r0, #0
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a0007210: 912fff1e bxls lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a0007214: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a0007218: e12fff1e bx lr <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a000721c: e3a00016 mov r0, #22
a0007220: e12fff1e bx lr
a0005bd4 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
a0005bd4: e92d4010 push {r4, lr}
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
a0005bd8: e59f4058 ldr r4, [pc, #88] ; a0005c38 <pthread_testcancel+0x64>
a0005bdc: e5943000 ldr r3, [r4]
a0005be0: e3530000 cmp r3, #0
a0005be4: 1a000010 bne a0005c2c <pthread_testcancel+0x58>
a0005be8: e59f304c ldr r3, [pc, #76] ; a0005c3c <pthread_testcancel+0x68>
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0005bec: e5942004 ldr r2, [r4, #4]
a0005bf0: e5931000 ldr r1, [r3]
a0005bf4: e5922108 ldr r2, [r2, #264] ; 0x108
a0005bf8: e2811001 add r1, r1, #1
a0005bfc: e5831000 str r1, [r3]
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
a0005c00: e59230d4 ldr r3, [r2, #212] ; 0xd4
a0005c04: e3530000 cmp r3, #0
a0005c08: 1a000008 bne a0005c30 <pthread_testcancel+0x5c>
a0005c0c: e59230dc ldr r3, [r2, #220] ; 0xdc
a0005c10: e3530000 cmp r3, #0
a0005c14: 0a000005 beq a0005c30 <pthread_testcancel+0x5c>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a0005c18: eb0009c1 bl a0008324 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a0005c1c: e5940004 ldr r0, [r4, #4]
a0005c20: e3e01000 mvn r1, #0
}
a0005c24: e8bd4010 pop {r4, lr}
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a0005c28: ea0017a9 b a000bad4 <_POSIX_Thread_Exit>
a0005c2c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
a0005c30: e8bd4010 pop {r4, lr}
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a0005c34: ea0009ba b a0008324 <_Thread_Enable_dispatch>
a0006e58 <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
)
{
a0006e58: e92d4030 push {r4, r5, lr}
a0006e5c: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a0006e60: e59f014c ldr r0, [pc, #332] ; a0006fb4 <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;
a0006e64: e59f314c ldr r3, [pc, #332] ; a0006fb8 <rtems_io_register_driver+0x160>
if ( rtems_interrupt_is_in_progress() )
a0006e68: e5900000 ldr r0, [r0]
a0006e6c: 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;
a0006e70: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
a0006e74: 1a000033 bne a0006f48 <rtems_io_register_driver+0xf0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
a0006e78: e3520000 cmp r2, #0
a0006e7c: 0a000041 beq a0006f88 <rtems_io_register_driver+0x130>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a0006e80: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a0006e84: e5820000 str r0, [r2]
if ( driver_table == NULL )
a0006e88: 0a00003e beq a0006f88 <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;
a0006e8c: e591c000 ldr ip, [r1]
a0006e90: e35c0000 cmp ip, #0
a0006e94: 0a000038 beq a0006f7c <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 )
a0006e98: e1500004 cmp r0, r4
a0006e9c: 9a000027 bls a0006f40 <rtems_io_register_driver+0xe8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0006ea0: e59f0114 ldr r0, [pc, #276] ; a0006fbc <rtems_io_register_driver+0x164>
a0006ea4: e590c000 ldr ip, [r0]
a0006ea8: e28cc001 add ip, ip, #1
a0006eac: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a0006eb0: e3540000 cmp r4, #0
a0006eb4: 1a000025 bne a0006f50 <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;
a0006eb8: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a0006ebc: e35c0000 cmp ip, #0
a0006ec0: 0a000032 beq a0006f90 <rtems_io_register_driver+0x138>
a0006ec4: e59fe0f4 ldr lr, [pc, #244] ; a0006fc0 <rtems_io_register_driver+0x168>
a0006ec8: e59e3000 ldr r3, [lr]
a0006ecc: ea000003 b a0006ee0 <rtems_io_register_driver+0x88>
a0006ed0: e2844001 add r4, r4, #1
a0006ed4: e15c0004 cmp ip, r4
a0006ed8: e2833018 add r3, r3, #24
a0006edc: 9a000005 bls a0006ef8 <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;
a0006ee0: e5930000 ldr r0, [r3]
a0006ee4: e3500000 cmp r0, #0
a0006ee8: 1afffff8 bne a0006ed0 <rtems_io_register_driver+0x78>
a0006eec: e5930004 ldr r0, [r3, #4]
a0006ef0: e3500000 cmp r0, #0
a0006ef4: 1afffff5 bne a0006ed0 <rtems_io_register_driver+0x78>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a0006ef8: e15c0004 cmp ip, r4
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0006efc: e5824000 str r4, [r2]
if ( m != n )
a0006f00: 0a000023 beq a0006f94 <rtems_io_register_driver+0x13c>
a0006f04: e3a0c018 mov ip, #24
a0006f08: e00c0c94 mul ip, r4, ip
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a0006f0c: e59e5000 ldr r5, [lr]
a0006f10: e1a0e001 mov lr, r1
a0006f14: e8be000f ldm lr!, {r0, r1, r2, r3}
a0006f18: e085c00c add ip, r5, ip
a0006f1c: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006f20: e89e0003 ldm lr, {r0, r1}
a0006f24: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
a0006f28: eb0006b6 bl a0008a08 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a0006f2c: e3a01000 mov r1, #0
a0006f30: e1a00004 mov r0, r4
a0006f34: e1a02001 mov r2, r1
}
a0006f38: e8bd4030 pop {r4, r5, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a0006f3c: ea002132 b a000f40c <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
a0006f40: e3a0000a mov r0, #10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
a0006f44: 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;
a0006f48: e3a00012 mov r0, #18
a0006f4c: 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;
a0006f50: e59fe068 ldr lr, [pc, #104] ; a0006fc0 <rtems_io_register_driver+0x168>
a0006f54: e3a0c018 mov ip, #24
a0006f58: e00c0c94 mul ip, r4, ip
a0006f5c: 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;
a0006f60: 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;
a0006f64: 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;
a0006f68: e3500000 cmp r0, #0
a0006f6c: 0a00000b beq a0006fa0 <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();
a0006f70: eb0006a4 bl a0008a08 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
a0006f74: e3a0000c mov r0, #12
a0006f78: 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;
a0006f7c: e591c004 ldr ip, [r1, #4]
a0006f80: e35c0000 cmp ip, #0
a0006f84: 1affffc3 bne a0006e98 <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;
a0006f88: e3a00009 mov r0, #9
a0006f8c: e8bd8030 pop {r4, r5, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0006f90: 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();
a0006f94: eb00069b bl a0008a08 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
a0006f98: 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;
a0006f9c: 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;
a0006fa0: e5933004 ldr r3, [r3, #4]
a0006fa4: e3530000 cmp r3, #0
a0006fa8: 1afffff0 bne a0006f70 <rtems_io_register_driver+0x118>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a0006fac: e5824000 str r4, [r2]
a0006fb0: eaffffd5 b a0006f0c <rtems_io_register_driver+0xb4>
a0005880 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a0005880: e3500001 cmp r0, #1
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
a0005884: e52de004 push {lr} ; (str lr, [sp, #-4]!)
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a0005888: 0a00000d beq a00058c4 <rtems_object_get_api_class_name+0x44>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
a000588c: e3500002 cmp r0, #2
a0005890: 0a000004 beq a00058a8 <rtems_object_get_api_class_name+0x28>
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
a0005894: e3500003 cmp r0, #3
api_assoc = rtems_object_api_posix_assoc;
a0005898: 059f003c ldreq r0, [pc, #60] ; a00058dc <rtems_object_get_api_class_name+0x5c>
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
a000589c: 0a000002 beq a00058ac <rtems_object_get_api_class_name+0x2c>
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
a00058a0: e59f0038 ldr r0, [pc, #56] ; a00058e0 <rtems_object_get_api_class_name+0x60>
a00058a4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
a00058a8: e59f0034 ldr r0, [pc, #52] ; a00058e4 <rtems_object_get_api_class_name+0x64>
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
a00058ac: eb001359 bl a000a618 <rtems_assoc_ptr_by_local>
if ( class_assoc )
a00058b0: e3500000 cmp r0, #0
return class_assoc->name;
a00058b4: 15900000 ldrne r0, [r0]
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
a00058b8: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
return class_assoc->name;
return "BAD CLASS";
a00058bc: e59f0024 ldr r0, [pc, #36] ; a00058e8 <rtems_object_get_api_class_name+0x68>
}
a00058c0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
a00058c4: e59f0020 ldr r0, [pc, #32] ; a00058ec <rtems_object_get_api_class_name+0x6c>
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
a00058c8: eb001352 bl a000a618 <rtems_assoc_ptr_by_local>
if ( class_assoc )
a00058cc: e3500000 cmp r0, #0
return class_assoc->name;
a00058d0: 15900000 ldrne r0, [r0]
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
a00058d4: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
a00058d8: eafffff7 b a00058bc <rtems_object_get_api_class_name+0x3c> <== NOT EXECUTED
a000d504 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000d504: 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 )
a000d508: e2525000 subs r5, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000d50c: e1a04000 mov r4, r0
a000d510: 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 )
a000d514: 0a000056 beq a000d674 <rtems_task_mode+0x170>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
a000d518: e59f915c ldr r9, [pc, #348] ; a000d67c <rtems_task_mode+0x178>
a000d51c: e5997004 ldr r7, [r9, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a000d520: e5978104 ldr r8, [r7, #260] ; 0x104
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a000d524: e5d7a074 ldrb sl, [r7, #116] ; 0x74
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000d528: 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;
a000d52c: 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;
a000d530: e35a0000 cmp sl, #0
a000d534: 03a0ac01 moveq sl, #256 ; 0x100
a000d538: 13a0a000 movne sl, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000d53c: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
a000d540: 138aac02 orrne sl, sl, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000d544: e35b0000 cmp fp, #0
a000d548: 03a0bb01 moveq fp, #1024 ; 0x400
a000d54c: 13a0b000 movne fp, #0
old_mode |= _ISR_Get_level();
a000d550: ebffee80 bl a0008f58 <_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;
a000d554: e18bb000 orr fp, fp, r0
old_mode |= _ISR_Get_level();
a000d558: e18ba00a orr sl, fp, sl
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000d55c: 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;
a000d560: e585a000 str sl, [r5]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000d564: 0a000003 beq a000d578 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
a000d568: e3140c01 tst r4, #256 ; 0x100
a000d56c: 13a03000 movne r3, #0
a000d570: 03a03001 moveq r3, #1
a000d574: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
a000d578: e3160c02 tst r6, #512 ; 0x200
a000d57c: 1a00001c bne a000d5f4 <rtems_task_mode+0xf0>
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000d580: e3160080 tst r6, #128 ; 0x80
a000d584: 1a000023 bne a000d618 <rtems_task_mode+0x114>
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
a000d588: e2166b01 ands r6, r6, #1024 ; 0x400
a000d58c: 0a000012 beq a000d5dc <rtems_task_mode+0xd8>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a000d590: e5d82008 ldrb r2, [r8, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
a000d594: e3140b01 tst r4, #1024 ; 0x400
a000d598: 13a03000 movne r3, #0
a000d59c: 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 ) {
a000d5a0: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000d5a4: 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 ) {
a000d5a8: 0a00000b beq a000d5dc <rtems_task_mode+0xd8>
asr->is_enabled = is_asr_enabled;
a000d5ac: e5c83008 strb r3, [r8, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000d5b0: e10f3000 mrs r3, CPSR
a000d5b4: e3832080 orr r2, r3, #128 ; 0x80
a000d5b8: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
a000d5bc: e5981018 ldr r1, [r8, #24]
information->signals_pending = information->signals_posted;
a000d5c0: e5982014 ldr r2, [r8, #20]
information->signals_posted = _signals;
a000d5c4: 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;
a000d5c8: e5882018 str r2, [r8, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000d5cc: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
a000d5d0: e5986014 ldr r6, [r8, #20]
a000d5d4: e3560000 cmp r6, #0
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000d5d8: 13a06001 movne r6, #1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
a000d5dc: e59f309c ldr r3, [pc, #156] ; a000d680 <rtems_task_mode+0x17c>
a000d5e0: e5933000 ldr r3, [r3]
a000d5e4: e3530003 cmp r3, #3
a000d5e8: 0a00000d beq a000d624 <rtems_task_mode+0x120>
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
a000d5ec: e3a00000 mov r0, #0 <== NOT EXECUTED
a000d5f0: 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) ) {
a000d5f4: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a000d5f8: 13a03001 movne r3, #1
a000d5fc: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000d600: 159f307c ldrne r3, [pc, #124] ; a000d684 <rtems_task_mode+0x180>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a000d604: 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;
a000d608: 15933000 ldrne r3, [r3]
a000d60c: 15873078 strne r3, [r7, #120] ; 0x78
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000d610: e3160080 tst r6, #128 ; 0x80
a000d614: 0affffdb beq a000d588 <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 ) );
a000d618: e2040080 and r0, r4, #128 ; 0x80
a000d61c: ebffee48 bl a0008f44 <_CPU_ISR_Set_level>
a000d620: eaffffd8 b a000d588 <rtems_task_mode+0x84>
*/
RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
a000d624: e5993004 ldr r3, [r9, #4]
if ( !_States_Is_ready( executing->current_state ) ||
a000d628: e5932010 ldr r2, [r3, #16]
a000d62c: e3520000 cmp r2, #0
a000d630: 1a00000a bne a000d660 <rtems_task_mode+0x15c>
a000d634: e59f2040 ldr r2, [pc, #64] ; a000d67c <rtems_task_mode+0x178>
a000d638: e5922008 ldr r2, [r2, #8]
a000d63c: e1530002 cmp r3, r2
a000d640: 0a000002 beq a000d650 <rtems_task_mode+0x14c>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
a000d644: e5d33074 ldrb r3, [r3, #116] ; 0x74
a000d648: e3530000 cmp r3, #0
a000d64c: 1a000003 bne a000d660 <rtems_task_mode+0x15c>
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
a000d650: e3560000 cmp r6, #0
a000d654: 1a000003 bne a000d668 <rtems_task_mode+0x164>
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
a000d658: e1a00006 mov r0, r6
}
a000d65c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
_Context_Switch_necessary = true;
a000d660: e3a03001 mov r3, #1
a000d664: e5c93010 strb r3, [r9, #16]
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
a000d668: ebffe7dc bl a00075e0 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
a000d66c: e3a00000 mov r0, #0
a000d670: 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;
a000d674: e3a00009 mov r0, #9
a000d678: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0015bd8 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0015bd8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a0015bdc: e1a06001 mov r6, r1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a0015be0: e59f10cc ldr r1, [pc, #204] ; a0015cb4 <rtems_timer_server_fire_after+0xdc>
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0015be4: e1a07000 mov r7, r0
a0015be8: e24dd004 sub sp, sp, #4
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a0015bec: e5914000 ldr r4, [r1]
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0015bf0: e1a05002 mov r5, r2
a0015bf4: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a0015bf8: e3540000 cmp r4, #0
return RTEMS_INCORRECT_STATE;
a0015bfc: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a0015c00: 0a000005 beq a0015c1c <rtems_timer_server_fire_after+0x44>
return RTEMS_INCORRECT_STATE;
if ( !routine )
a0015c04: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a0015c08: 03a00009 moveq r0, #9
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
a0015c0c: 0a000002 beq a0015c1c <rtems_timer_server_fire_after+0x44>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a0015c10: e3560000 cmp r6, #0
return RTEMS_INVALID_NUMBER;
a0015c14: 03a0000a moveq r0, #10
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a0015c18: 1a000001 bne a0015c24 <rtems_timer_server_fire_after+0x4c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0015c1c: e28dd004 add sp, sp, #4
a0015c20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a0015c24: e59f008c ldr r0, [pc, #140] ; a0015cb8 <rtems_timer_server_fire_after+0xe0>
a0015c28: e1a01007 mov r1, r7
a0015c2c: e1a0200d mov r2, sp
a0015c30: eb000afa bl a0018820 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0015c34: e59d3000 ldr r3, [sp]
a0015c38: e1a0a000 mov sl, r0
a0015c3c: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0015c40: 13a00004 movne r0, #4
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0015c44: 1afffff4 bne a0015c1c <rtems_timer_server_fire_after+0x44>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0015c48: e28a0010 add r0, sl, #16
a0015c4c: eb001317 bl a001a8b0 <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015c50: e10f2000 mrs r2, CPSR
a0015c54: e3823080 orr r3, r2, #128 ; 0x80
a0015c58: e129f003 msr CPSR_fc, r3
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
a0015c5c: e59a3018 ldr r3, [sl, #24]
a0015c60: e3530000 cmp r3, #0
a0015c64: 1a00000e bne a0015ca4 <rtems_timer_server_fire_after+0xcc>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
a0015c68: e3a01001 mov r1, #1
a0015c6c: e58a1038 str r1, [sl, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0015c70: e58a3018 str r3, [sl, #24]
the_watchdog->routine = routine;
a0015c74: e58a502c str r5, [sl, #44] ; 0x2c
the_watchdog->id = id;
a0015c78: e58a7030 str r7, [sl, #48] ; 0x30
the_watchdog->user_data = user_data;
a0015c7c: e58a8034 str r8, [sl, #52] ; 0x34
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
a0015c80: e58a601c str r6, [sl, #28]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015c84: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
(*timer_server->schedule_operation)( timer_server, the_timer );
a0015c88: e1a00004 mov r0, r4
a0015c8c: e5943004 ldr r3, [r4, #4]
a0015c90: e1a0100a mov r1, sl
a0015c94: e12fff33 blx r3
_Thread_Enable_dispatch();
a0015c98: eb000d33 bl a001916c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0015c9c: e3a00000 mov r0, #0
a0015ca0: eaffffdd b a0015c1c <rtems_timer_server_fire_after+0x44>
a0015ca4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
_Thread_Enable_dispatch();
a0015ca8: eb000d2f bl a001916c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0015cac: e3a00000 mov r0, #0 <== NOT EXECUTED
a0015cb0: eaffffd9 b a0015c1c <rtems_timer_server_fire_after+0x44> <== NOT EXECUTED
a000867c <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
a000867c: e92d4010 push {r4, lr}
a0008680: e24dd004 sub sp, sp, #4
a0008684: e1a04000 mov r4, r0
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a0008688: e1a00001 mov r0, r1
a000868c: e1a0100d mov r1, sp
a0008690: eb00164d bl a000dfcc <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a0008694: e3500003 cmp r0, #3
a0008698: 0a000005 beq a00086b4 <sem_timedwait+0x38>
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a000869c: e1a00004 mov r0, r4 <== NOT EXECUTED
a00086a0: e3a01000 mov r1, #0 <== NOT EXECUTED
a00086a4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a00086a8: eb001960 bl a000ec30 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
a00086ac: e28dd004 add sp, sp, #4
a00086b0: e8bd8010 pop {r4, pc}
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a00086b4: e1a00004 mov r0, r4
a00086b8: e3a01001 mov r1, #1
a00086bc: e59d2000 ldr r2, [sp]
a00086c0: eb00195a bl a000ec30 <_POSIX_Semaphore_Wait_support>
a00086c4: eafffff8 b a00086ac <sem_timedwait+0x30>
a0005ebc <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
a0005ebc: e3520000 cmp r2, #0
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
a0005ec0: e92d4070 push {r4, r5, r6, lr}
a0005ec4: e1a04000 mov r4, r0
a0005ec8: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
a0005ecc: 0a00000a beq a0005efc <sigaction+0x40>
*oact = _POSIX_signals_Vectors[ sig ];
a0005ed0: e3a0100c mov r1, #12
a0005ed4: e59f00ec ldr r0, [pc, #236] ; a0005fc8 <sigaction+0x10c>
a0005ed8: e0010194 mul r1, r4, r1
a0005edc: e1a03002 mov r3, r2
a0005ee0: e790c001 ldr ip, [r0, r1]
a0005ee4: e0801001 add r1, r0, r1
a0005ee8: e483c004 str ip, [r3], #4
a0005eec: e5910004 ldr r0, [r1, #4]
a0005ef0: e5820004 str r0, [r2, #4]
a0005ef4: e5912008 ldr r2, [r1, #8]
a0005ef8: e5832004 str r2, [r3, #4]
if ( !sig )
a0005efc: e3540000 cmp r4, #0
a0005f00: 0a00002b beq a0005fb4 <sigaction+0xf8>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a0005f04: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a0005f08: e353001f cmp r3, #31
a0005f0c: 8a000028 bhi a0005fb4 <sigaction+0xf8>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
a0005f10: e3540009 cmp r4, #9
a0005f14: 0a000026 beq a0005fb4 <sigaction+0xf8>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
a0005f18: e3550000 cmp r5, #0
a0005f1c: 0a000022 beq a0005fac <sigaction+0xf0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0005f20: e10f6000 mrs r6, CPSR
a0005f24: e3863080 orr r3, r6, #128 ; 0x80
a0005f28: e129f003 msr CPSR_fc, r3
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
a0005f2c: e5953008 ldr r3, [r5, #8]
a0005f30: e3530000 cmp r3, #0
a0005f34: 0a00000f beq a0005f78 <sigaction+0xbc>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
a0005f38: e1a00004 mov r0, r4
a0005f3c: eb001724 bl a000bbd4 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
a0005f40: e1a03005 mov r3, r5
a0005f44: e3a0000c mov r0, #12
a0005f48: e4931004 ldr r1, [r3], #4
a0005f4c: e59f2074 ldr r2, [pc, #116] ; a0005fc8 <sigaction+0x10c>
a0005f50: e0040490 mul r4, r0, r4
a0005f54: e7821004 str r1, [r2, r4]
a0005f58: e5951004 ldr r1, [r5, #4]
a0005f5c: e0824004 add r4, r2, r4
a0005f60: e5841004 str r1, [r4, #4]
a0005f64: e5933004 ldr r3, [r3, #4]
a0005f68: e5843008 str r3, [r4, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0005f6c: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
a0005f70: e3a00000 mov r0, #0
a0005f74: e8bd8070 pop {r4, r5, r6, pc}
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
a0005f78: e3a0300c mov r3, #12
a0005f7c: e0040493 mul r4, r3, r4
a0005f80: e59f1044 ldr r1, [pc, #68] ; a0005fcc <sigaction+0x110>
a0005f84: e59f203c ldr r2, [pc, #60] ; a0005fc8 <sigaction+0x10c>
a0005f88: e0813004 add r3, r1, r4
a0005f8c: e791c004 ldr ip, [r1, r4]
a0005f90: e9930003 ldmib r3, {r0, r1}
a0005f94: e0823004 add r3, r2, r4
a0005f98: e782c004 str ip, [r2, r4]
a0005f9c: e9830003 stmib r3, {r0, r1}
a0005fa0: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
a0005fa4: e3a00000 mov r0, #0
a0005fa8: e8bd8070 pop {r4, r5, r6, pc}
a0005fac: e1a00005 mov r0, r5 <== NOT EXECUTED
}
a0005fb0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
a0005fb4: eb002379 bl a000eda0 <__errno>
a0005fb8: e3a03016 mov r3, #22
a0005fbc: e5803000 str r3, [r0]
a0005fc0: e3e00000 mvn r0, #0
a0005fc4: e8bd8070 pop {r4, r5, r6, pc}
a0008404 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
a0008404: e92d4010 push {r4, lr}
a0008408: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
a000840c: e3a01000 mov r1, #0
a0008410: e1a02001 mov r2, r1
a0008414: ebffff8a bl a0008244 <sigtimedwait>
if ( status != -1 ) {
a0008418: e3700001 cmn r0, #1
a000841c: 0a000004 beq a0008434 <sigwait+0x30>
if ( sig )
a0008420: e3540000 cmp r4, #0
a0008424: 0a000005 beq a0008440 <sigwait+0x3c>
*sig = status;
a0008428: e5840000 str r0, [r4]
return 0;
a000842c: e3a00000 mov r0, #0
a0008430: e8bd8010 pop {r4, pc}
}
return errno;
a0008434: eb0022d3 bl a0010f88 <__errno>
a0008438: e5900000 ldr r0, [r0]
a000843c: e8bd8010 pop {r4, pc}
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
a0008440: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
a0008444: e8bd8010 pop {r4, pc} <== NOT EXECUTED