RTEMS 4.11Annotated Report
Fri Oct 8 22:07:30 2010
a0016a20 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a0016a20: 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
)
{
a0016a24: 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 ) {
a0016a28: 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
)
{
a0016a2c: e1a07000 mov r7, r0
a0016a30: e1a05002 mov r5, r2
a0016a34: e1a08001 mov r8, r1
a0016a38: 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 ) {
a0016a3c: 3a000013 bcc a0016a90 <_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 ) {
a0016a40: e5906048 ldr r6, [r0, #72] ; 0x48
a0016a44: e3560000 cmp r6, #0
a0016a48: 0a000009 beq a0016a74 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a0016a4c: e3a00000 mov r0, #0
a0016a50: e58a0000 str r0, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0016a54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0016a58: e594002c ldr r0, [r4, #44] ; 0x2c
a0016a5c: e1a01008 mov r1, r8
a0016a60: e1a02005 mov r2, r5
a0016a64: eb002494 bl a001fcbc <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016a68: 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;
a0016a6c: e2866001 add r6, r6, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016a70: 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 =
a0016a74: e1a00007 mov r0, r7
a0016a78: eb000a69 bl a0019424 <_Thread_queue_Dequeue>
a0016a7c: e2504000 subs r4, r0, #0
a0016a80: 1afffff4 bne a0016a58 <_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;
a0016a84: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0016a88: e1a00004 mov r0, r4
a0016a8c: 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;
a0016a90: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0016a94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000b3d8 <_Chain_Initialize>:
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000b3d8: e3520000 cmp r2, #0
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
a000b3dc: e3a0c000 mov ip, #0
next = starting_address;
while ( count-- ) {
a000b3e0: 12422001 subne r2, r2, #1
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
a000b3e4: e92d0070 push {r4, r5, r6}
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
a000b3e8: e580c004 str ip, [r0, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
a000b3ec: e1a04000 mov r4, r0
next = starting_address;
while ( count-- ) {
a000b3f0: 11a06002 movne r6, r2
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
a000b3f4: 11a0c001 movne ip, r1
while ( count-- ) {
a000b3f8: 1a000003 bne a000b40c <_Chain_Initialize+0x34>
a000b3fc: ea000008 b a000b424 <_Chain_Initialize+0x4c> <== NOT EXECUTED
a000b400: e1a0400c mov r4, ip
a000b404: e2422001 sub r2, r2, #1
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
a000b408: e1a0c005 mov ip, r5
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000b40c: e3520000 cmp r2, #0
current->next = next;
a000b410: e584c000 str ip, [r4]
next->previous = current;
a000b414: e58c4004 str r4, [ip, #4]
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
a000b418: e08c5003 add r5, ip, r3
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
a000b41c: 1afffff7 bne a000b400 <_Chain_Initialize+0x28>
a000b420: e0241396 mla r4, r6, r3, r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000b424: 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 );
a000b428: e5843000 str r3, [r4]
the_chain->last = current;
a000b42c: e5804008 str r4, [r0, #8]
}
a000b430: e8bd0070 pop {r4, r5, r6}
a000b434: e12fff1e bx lr
a000b618 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b618: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000b61c: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
a000b620: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b624: e24dd01c sub sp, sp, #28
a000b628: e1a05001 mov r5, r1
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000b62c: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b630: e1a07000 mov r7, r0
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000b634: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b638: e1a0b003 mov fp, r3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
a000b63c: e58d200c str r2, [sp, #12]
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000b640: 2a000078 bcs a000b828 <_Heap_Allocate_aligned_with_boundary+0x210>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a000b644: e3530000 cmp r3, #0
a000b648: 1a000074 bne a000b820 <_Heap_Allocate_aligned_with_boundary+0x208>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000b64c: e5979008 ldr r9, [r7, #8]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000b650: e1570009 cmp r7, r9
a000b654: 0a000073 beq a000b828 <_Heap_Allocate_aligned_with_boundary+0x210>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000b658: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000b65c: e2651004 rsb r1, r5, #4
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000b660: e3a06001 mov r6, #1
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000b664: e2833007 add r3, r3, #7
a000b668: e58d3010 str r3, [sp, #16]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000b66c: 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 ) {
a000b670: e599a004 ldr sl, [r9, #4]
a000b674: e59d2000 ldr r2, [sp]
a000b678: e152000a cmp r2, sl
a000b67c: 2a00004e bcs a000b7bc <_Heap_Allocate_aligned_with_boundary+0x1a4>
if ( alignment == 0 ) {
a000b680: 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;
a000b684: 02894008 addeq r4, r9, #8
a000b688: 0a000051 beq a000b7d4 <_Heap_Allocate_aligned_with_boundary+0x1bc>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000b68c: e5973014 ldr r3, [r7, #20]
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000b690: 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;
a000b694: 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;
a000b698: 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;
a000b69c: e089a00a add sl, r9, sl
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000b6a0: e081400a add r4, r1, sl
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000b6a4: 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;
a000b6a8: e0633002 rsb r3, r3, r2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b6ac: 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
a000b6b0: e083a00a add sl, r3, sl
a000b6b4: 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;
a000b6b8: e2893008 add r3, r9, #8
a000b6bc: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b6c0: eb0016a6 bl a0011160 <__umodsi3>
a000b6c4: 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 ) {
a000b6c8: e15a0004 cmp sl, r4
a000b6cc: 2a000003 bcs a000b6e0 <_Heap_Allocate_aligned_with_boundary+0xc8>
a000b6d0: e1a0000a mov r0, sl
a000b6d4: e1a01008 mov r1, r8
a000b6d8: eb0016a0 bl a0011160 <__umodsi3>
a000b6dc: e060400a rsb r4, r0, sl
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a000b6e0: e35b0000 cmp fp, #0
a000b6e4: 0a000026 beq a000b784 <_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;
a000b6e8: e084a005 add sl, r4, r5
a000b6ec: e1a0000a mov r0, sl
a000b6f0: e1a0100b mov r1, fp
a000b6f4: eb001699 bl a0011160 <__umodsi3>
a000b6f8: 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 ) {
a000b6fc: e15a0000 cmp sl, r0
a000b700: 93a0a000 movls sl, #0
a000b704: 83a0a001 movhi sl, #1
a000b708: e1540000 cmp r4, r0
a000b70c: 23a0a000 movcs sl, #0
a000b710: e35a0000 cmp sl, #0
a000b714: 0a00001a beq a000b784 <_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;
a000b718: e59d1008 ldr r1, [sp, #8]
a000b71c: e0813005 add r3, r1, r5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
a000b720: e1530000 cmp r3, r0
a000b724: 958d9018 strls r9, [sp, #24]
a000b728: 91a09003 movls r9, r3
a000b72c: 9a000002 bls a000b73c <_Heap_Allocate_aligned_with_boundary+0x124>
a000b730: ea000021 b a000b7bc <_Heap_Allocate_aligned_with_boundary+0x1a4>
a000b734: e1590000 cmp r9, r0
a000b738: 8a00003c bhi a000b830 <_Heap_Allocate_aligned_with_boundary+0x218>
return 0;
}
alloc_begin = boundary_line - alloc_size;
a000b73c: e0654000 rsb r4, r5, r0
a000b740: e1a01008 mov r1, r8
a000b744: e1a00004 mov r0, r4
a000b748: eb001684 bl a0011160 <__umodsi3>
a000b74c: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a000b750: e084a005 add sl, r4, r5
a000b754: e1a0000a mov r0, sl
a000b758: e1a0100b mov r1, fp
a000b75c: eb00167f bl a0011160 <__umodsi3>
a000b760: 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 ) {
a000b764: e15a0000 cmp sl, r0
a000b768: 93a0a000 movls sl, #0
a000b76c: 83a0a001 movhi sl, #1
a000b770: e1540000 cmp r4, r0
a000b774: 23a0a000 movcs sl, #0
a000b778: e35a0000 cmp sl, #0
a000b77c: 1affffec bne a000b734 <_Heap_Allocate_aligned_with_boundary+0x11c>
a000b780: e59d9018 ldr r9, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
a000b784: e59d2008 ldr r2, [sp, #8]
a000b788: e1520004 cmp r2, r4
a000b78c: 8a00000a bhi a000b7bc <_Heap_Allocate_aligned_with_boundary+0x1a4>
a000b790: e59d100c ldr r1, [sp, #12]
a000b794: e1a00004 mov r0, r4
a000b798: eb001670 bl a0011160 <__umodsi3>
a000b79c: e3e0a007 mvn sl, #7
a000b7a0: 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 ) {
a000b7a4: 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);
a000b7a8: e08aa004 add sl, sl, r4
a000b7ac: e060300a rsb r3, r0, sl
a000b7b0: e15a0000 cmp sl, r0
a000b7b4: 11510003 cmpne r1, r3
a000b7b8: 9a000005 bls a000b7d4 <_Heap_Allocate_aligned_with_boundary+0x1bc>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
a000b7bc: e5999008 ldr r9, [r9, #8]
a000b7c0: e2863001 add r3, r6, #1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000b7c4: e1570009 cmp r7, r9
a000b7c8: 0a00001d beq a000b844 <_Heap_Allocate_aligned_with_boundary+0x22c>
a000b7cc: e1a06003 mov r6, r3
a000b7d0: eaffffa6 b a000b670 <_Heap_Allocate_aligned_with_boundary+0x58>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
a000b7d4: e3540000 cmp r4, #0
a000b7d8: 0afffff7 beq a000b7bc <_Heap_Allocate_aligned_with_boundary+0x1a4>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000b7dc: e5972048 ldr r2, [r7, #72] ; 0x48
stats->searches += search_count;
a000b7e0: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000b7e4: e1a00007 mov r0, r7
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000b7e8: e2822001 add r2, r2, #1
stats->searches += search_count;
a000b7ec: e0833006 add r3, r3, r6
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000b7f0: e5872048 str r2, [r7, #72] ; 0x48
stats->searches += search_count;
a000b7f4: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000b7f8: e1a01009 mov r1, r9
a000b7fc: e1a02004 mov r2, r4
a000b800: e1a03005 mov r3, r5
a000b804: ebffebba bl a00066f4 <_Heap_Block_allocate>
a000b808: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000b80c: e5973044 ldr r3, [r7, #68] ; 0x44
a000b810: e1530006 cmp r3, r6
stats->max_search = search_count;
a000b814: 35876044 strcc r6, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
a000b818: e28dd01c add sp, sp, #28
a000b81c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
a000b820: e1550003 cmp r5, r3
a000b824: 9a000008 bls a000b84c <_Heap_Allocate_aligned_with_boundary+0x234>
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000b828: e3a00000 mov r0, #0
a000b82c: eafffff9 b a000b818 <_Heap_Allocate_aligned_with_boundary+0x200>
a000b830: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
a000b834: e2863001 add r3, r6, #1 <== NOT EXECUTED
a000b838: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000b83c: e1570009 cmp r7, r9 <== NOT EXECUTED
a000b840: 1affffe1 bne a000b7cc <_Heap_Allocate_aligned_with_boundary+0x1b4><== NOT EXECUTED
a000b844: e3a00000 mov r0, #0
a000b848: eaffffef b a000b80c <_Heap_Allocate_aligned_with_boundary+0x1f4>
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
a000b84c: e3580000 cmp r8, #0
a000b850: 01a08002 moveq r8, r2
a000b854: eaffff7c b a000b64c <_Heap_Allocate_aligned_with_boundary+0x34>
a000b858 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
a000b858: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000b85c: e1a04000 mov r4, r0
a000b860: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b864: e1a00001 mov r0, r1
a000b868: e5941010 ldr r1, [r4, #16]
a000b86c: eb00163b bl a0011160 <__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
a000b870: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000b874: 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);
a000b878: 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;
a000b87c: e1550003 cmp r5, r3
a000b880: 3a000030 bcc a000b948 <_Heap_Free+0xf0>
a000b884: e5941024 ldr r1, [r4, #36] ; 0x24
a000b888: e1550001 cmp r5, r1
a000b88c: 8a00002d bhi a000b948 <_Heap_Free+0xf0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b890: 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;
a000b894: 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);
a000b898: 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;
a000b89c: e1530002 cmp r3, r2
a000b8a0: 8a000028 bhi a000b948 <_Heap_Free+0xf0>
a000b8a4: e1510002 cmp r1, r2
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000b8a8: 33a00000 movcc r0, #0
a000b8ac: 3a000027 bcc a000b950 <_Heap_Free+0xf8>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b8b0: 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 ) ) {
a000b8b4: e2170001 ands r0, r7, #1
a000b8b8: 0a000024 beq a000b950 <_Heap_Free+0xf8>
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
a000b8bc: 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;
a000b8c0: e3c77001 bic r7, r7, #1
a000b8c4: 03a08000 moveq r8, #0
a000b8c8: 0a000004 beq a000b8e0 <_Heap_Free+0x88>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b8cc: 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;
a000b8d0: e5900004 ldr r0, [r0, #4]
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
a000b8d4: e3100001 tst r0, #1
a000b8d8: 13a08000 movne r8, #0
a000b8dc: 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 ) ) {
a000b8e0: e21c0001 ands r0, ip, #1
a000b8e4: 1a00001a bne a000b954 <_Heap_Free+0xfc>
uintptr_t const prev_size = block->prev_size;
a000b8e8: 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);
a000b8ec: 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;
a000b8f0: e153000a cmp r3, sl
a000b8f4: 8a000015 bhi a000b950 <_Heap_Free+0xf8>
a000b8f8: e151000a cmp r1, sl
a000b8fc: 3a000013 bcc a000b950 <_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;
a000b900: 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) ) {
a000b904: e2100001 ands r0, r0, #1
a000b908: 0a000010 beq a000b950 <_Heap_Free+0xf8>
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
a000b90c: e3580000 cmp r8, #0
a000b910: 0a000038 beq a000b9f8 <_Heap_Free+0x1a0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000b914: e5940038 ldr r0, [r4, #56] ; 0x38
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b918: 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;
a000b91c: e0867007 add r7, r6, r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b920: 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;
a000b924: e087c00c add ip, r7, ip
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000b928: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000b92c: 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;
a000b930: e5823008 str r3, [r2, #8]
next->prev = prev;
a000b934: 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;
a000b938: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000b93c: 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;
a000b940: e78ac00c str ip, [sl, ip]
a000b944: ea00000e b a000b984 <_Heap_Free+0x12c>
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000b948: e3a00000 mov r0, #0
a000b94c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b950: 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 */
a000b954: e3580000 cmp r8, #0
a000b958: 0a000014 beq a000b9b0 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000b95c: e5923008 ldr r3, [r2, #8]
a000b960: 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;
a000b964: e0877006 add r7, r7, r6
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000b968: e3871001 orr r1, r7, #1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
a000b96c: e5853008 str r3, [r5, #8]
new_block->prev = prev;
a000b970: e585200c str r2, [r5, #12]
next->prev = new_block;
prev->next = new_block;
a000b974: e5825008 str r5, [r2, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a000b978: e583500c str r5, [r3, #12]
a000b97c: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
a000b980: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000b984: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
a000b988: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a000b98c: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000b990: e2422001 sub r2, r2, #1
++stats->frees;
a000b994: e2833001 add r3, r3, #1
stats->free_size += block_size;
a000b998: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a000b99c: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
a000b9a0: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a000b9a4: e5846030 str r6, [r4, #48] ; 0x30
return( true );
a000b9a8: e3a00001 mov r0, #1
a000b9ac: 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;
a000b9b0: e3863001 orr r3, r6, #1
a000b9b4: e5853004 str r3, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a000b9b8: e5943038 ldr r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
a000b9bc: 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;
a000b9c0: 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;
a000b9c4: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a000b9c8: 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;
a000b9cc: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
a000b9d0: e153000c cmp r3, ip
new_block->next = next;
a000b9d4: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
a000b9d8: 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;
a000b9dc: e5820004 str r0, [r2, #4]
block_before->next = new_block;
next->prev = new_block;
a000b9e0: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
a000b9e4: 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;
a000b9e8: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
a000b9ec: e5843038 str r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
a000b9f0: 8584303c strhi r3, [r4, #60] ; 0x3c
a000b9f4: eaffffe2 b a000b984 <_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;
a000b9f8: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000b9fc: e38c3001 orr r3, ip, #1
a000ba00: e58a3004 str r3, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000ba04: e5923004 ldr r3, [r2, #4]
next_block->prev_size = size;
a000ba08: 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;
a000ba0c: e3c33001 bic r3, r3, #1
a000ba10: e5823004 str r3, [r2, #4]
a000ba14: eaffffda b a000b984 <_Heap_Free+0x12c>
a0012e18 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
a0012e18: e92d40f0 push {r4, r5, r6, r7, lr}
a0012e1c: e1a04000 mov r4, r0
a0012e20: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0012e24: e1a00001 mov r0, r1
a0012e28: e5941010 ldr r1, [r4, #16]
a0012e2c: e1a07002 mov r7, r2
a0012e30: ebfff8ca bl a0011160 <__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
a0012e34: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0012e38: 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);
a0012e3c: 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;
a0012e40: e1500003 cmp r0, r3
a0012e44: 3a000012 bcc a0012e94 <_Heap_Size_of_alloc_area+0x7c>
a0012e48: e5942024 ldr r2, [r4, #36] ; 0x24
a0012e4c: e1500002 cmp r0, r2
a0012e50: 8a00000f bhi a0012e94 <_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;
a0012e54: e5906004 ldr r6, [r0, #4]
a0012e58: 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);
a0012e5c: 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;
a0012e60: e1530006 cmp r3, r6
a0012e64: 8a00000a bhi a0012e94 <_Heap_Size_of_alloc_area+0x7c>
a0012e68: e1520006 cmp r2, r6
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0012e6c: 33a00000 movcc r0, #0
a0012e70: 3a000009 bcc a0012e9c <_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;
a0012e74: 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 )
a0012e78: e2100001 ands r0, r0, #1
a0012e7c: 0a000006 beq a0012e9c <_Heap_Size_of_alloc_area+0x84>
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
a0012e80: e2655004 rsb r5, r5, #4
a0012e84: e0856006 add r6, r5, r6
a0012e88: e5876000 str r6, [r7]
return true;
a0012e8c: e3a00001 mov r0, #1
a0012e90: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0012e94: e3a00000 mov r0, #0
a0012e98: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
a0012e9c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0007458 <_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() ) ) {
a0007458: e59f3578 ldr r3, [pc, #1400] ; a00079d8 <_Heap_Walk+0x580>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000745c: 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;
a0007460: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0007464: 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;
a0007468: e59f256c ldr r2, [pc, #1388] ; a00079dc <_Heap_Walk+0x584>
a000746c: e59f956c ldr r9, [pc, #1388] ; a00079e0 <_Heap_Walk+0x588>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0007470: e1a0a001 mov sl, r1
uintptr_t const page_size = heap->page_size;
a0007474: 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;
a0007478: 11a09002 movne r9, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000747c: 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;
a0007480: e5902014 ldr r2, [r0, #20]
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a0007484: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0007488: e24dd038 sub sp, sp, #56 ; 0x38
a000748c: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
a0007490: e58d1024 str r1, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
a0007494: e58d2028 str r2, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
a0007498: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a000749c: 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() ) ) {
a00074a0: 0a000002 beq a00074b0 <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
a00074a4: e3a00001 mov r0, #1
}
a00074a8: e28dd038 add sp, sp, #56 ; 0x38
a00074ac: 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)(
a00074b0: e594101c ldr r1, [r4, #28]
a00074b4: e5900018 ldr r0, [r0, #24]
a00074b8: e5942008 ldr r2, [r4, #8]
a00074bc: e594300c ldr r3, [r4, #12]
a00074c0: e59dc028 ldr ip, [sp, #40] ; 0x28
a00074c4: e58d1008 str r1, [sp, #8]
a00074c8: e59d102c ldr r1, [sp, #44] ; 0x2c
a00074cc: e58d0004 str r0, [sp, #4]
a00074d0: e58d2014 str r2, [sp, #20]
a00074d4: e58d1010 str r1, [sp, #16]
a00074d8: e58d3018 str r3, [sp, #24]
a00074dc: e59f2500 ldr r2, [pc, #1280] ; a00079e4 <_Heap_Walk+0x58c>
a00074e0: e58dc000 str ip, [sp]
a00074e4: e58d800c str r8, [sp, #12]
a00074e8: e1a0000a mov r0, sl
a00074ec: e3a01000 mov r1, #0
a00074f0: e59d3024 ldr r3, [sp, #36] ; 0x24
a00074f4: e12fff39 blx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a00074f8: e59d2024 ldr r2, [sp, #36] ; 0x24
a00074fc: e3520000 cmp r2, #0
a0007500: 0a000024 beq a0007598 <_Heap_Walk+0x140>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a0007504: e59d3024 ldr r3, [sp, #36] ; 0x24
a0007508: e2135003 ands r5, r3, #3
a000750c: 1a000027 bne a00075b0 <_Heap_Walk+0x158>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0007510: e59d0028 ldr r0, [sp, #40] ; 0x28
a0007514: e59d1024 ldr r1, [sp, #36] ; 0x24
a0007518: ebffe553 bl a0000a6c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a000751c: e250b000 subs fp, r0, #0
a0007520: 1a000028 bne a00075c8 <_Heap_Walk+0x170>
a0007524: e2880008 add r0, r8, #8
a0007528: e59d1024 ldr r1, [sp, #36] ; 0x24
a000752c: ebffe54e bl a0000a6c <__umodsi3>
);
return false;
}
if (
a0007530: e2506000 subs r6, r0, #0
a0007534: 1a00002a bne a00075e4 <_Heap_Walk+0x18c>
block = next_block;
} while ( block != first_block );
return true;
}
a0007538: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a000753c: e21b5001 ands r5, fp, #1
a0007540: 0a0000bf beq a0007844 <_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;
a0007544: e59dc02c ldr ip, [sp, #44] ; 0x2c
a0007548: e59c3004 ldr r3, [ip, #4]
a000754c: 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);
a0007550: 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;
a0007554: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a0007558: e2155001 ands r5, r5, #1
a000755c: 0a000007 beq a0007580 <_Heap_Walk+0x128>
);
return false;
}
if (
a0007560: e1580003 cmp r8, r3
a0007564: 0a000025 beq a0007600 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a0007568: e1a0000a mov r0, sl <== NOT EXECUTED
a000756c: e3a01001 mov r1, #1 <== NOT EXECUTED
a0007570: e59f2470 ldr r2, [pc, #1136] ; a00079e8 <_Heap_Walk+0x590> <== NOT EXECUTED
a0007574: 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;
a0007578: e1a00006 mov r0, r6 <== NOT EXECUTED
a000757c: eaffffc9 b a00074a8 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
a0007580: e1a0000a mov r0, sl
a0007584: e3a01001 mov r1, #1
a0007588: e59f245c ldr r2, [pc, #1116] ; a00079ec <_Heap_Walk+0x594>
a000758c: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007590: e1a00005 mov r0, r5
a0007594: eaffffc3 b a00074a8 <_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" );
a0007598: e1a0000a mov r0, sl
a000759c: e3a01001 mov r1, #1
a00075a0: e59f2448 ldr r2, [pc, #1096] ; a00079f0 <_Heap_Walk+0x598>
a00075a4: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00075a8: e59d0024 ldr r0, [sp, #36] ; 0x24
a00075ac: eaffffbd b a00074a8 <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
a00075b0: e1a0000a mov r0, sl
a00075b4: e3a01001 mov r1, #1
a00075b8: e59f2434 ldr r2, [pc, #1076] ; a00079f4 <_Heap_Walk+0x59c>
a00075bc: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00075c0: e3a00000 mov r0, #0
a00075c4: eaffffb7 b a00074a8 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
a00075c8: e1a0000a mov r0, sl
a00075cc: e3a01001 mov r1, #1
a00075d0: e59f2420 ldr r2, [pc, #1056] ; a00079f8 <_Heap_Walk+0x5a0>
a00075d4: e59d3028 ldr r3, [sp, #40] ; 0x28
a00075d8: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00075dc: e1a00005 mov r0, r5
a00075e0: eaffffb0 b a00074a8 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a00075e4: e1a0000a mov r0, sl
a00075e8: e3a01001 mov r1, #1
a00075ec: e59f2408 ldr r2, [pc, #1032] ; a00079fc <_Heap_Walk+0x5a4>
a00075f0: e1a03008 mov r3, r8
a00075f4: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00075f8: e1a0000b mov r0, fp
a00075fc: eaffffa9 b a00074a8 <_Heap_Walk+0x50>
block = next_block;
} while ( block != first_block );
return true;
}
a0007600: e5945008 ldr r5, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a0007604: 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 ) {
a0007608: e1540005 cmp r4, r5
a000760c: 05943020 ldreq r3, [r4, #32]
a0007610: 0a00000c beq a0007648 <_Heap_Walk+0x1f0>
block = next_block;
} while ( block != first_block );
return true;
}
a0007614: 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;
a0007618: e1530005 cmp r3, r5
a000761c: 9a00008e bls a000785c <_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)(
a0007620: e1a0000a mov r0, sl
a0007624: e3a01001 mov r1, #1
a0007628: e59f23d0 ldr r2, [pc, #976] ; a0007a00 <_Heap_Walk+0x5a8>
a000762c: e1a03005 mov r3, r5
a0007630: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007634: e3a00000 mov r0, #0
a0007638: eaffff9a b a00074a8 <_Heap_Walk+0x50>
a000763c: e1a03008 mov r3, r8
a0007640: e59db034 ldr fp, [sp, #52] ; 0x34
a0007644: e59d8030 ldr r8, [sp, #48] ; 0x30
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0007648: 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;
a000764c: 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);
a0007650: 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;
a0007654: e1530005 cmp r3, r5
a0007658: 9a000007 bls a000767c <_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)(
a000765c: e1a0000a mov r0, sl
a0007660: e58d5000 str r5, [sp]
a0007664: e3a01001 mov r1, #1
a0007668: e59f2394 ldr r2, [pc, #916] ; a0007a04 <_Heap_Walk+0x5ac>
a000766c: e1a03006 mov r3, r6
a0007670: e12fff39 blx r9
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
a0007674: e3a00000 mov r0, #0
a0007678: eaffff8a b a00074a8 <_Heap_Walk+0x50>
a000767c: e5943024 ldr r3, [r4, #36] ; 0x24
a0007680: e1530005 cmp r3, r5
a0007684: 3afffff4 bcc a000765c <_Heap_Walk+0x204>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0007688: e59d1024 ldr r1, [sp, #36] ; 0x24
a000768c: e1a00007 mov r0, r7
a0007690: ebffe4f5 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;
a0007694: e59d102c ldr r1, [sp, #44] ; 0x2c
a0007698: e0563001 subs r3, r6, r1
a000769c: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a00076a0: e3500000 cmp r0, #0
a00076a4: 0a000001 beq a00076b0 <_Heap_Walk+0x258>
a00076a8: e3530000 cmp r3, #0
a00076ac: 1a0000a2 bne a000793c <_Heap_Walk+0x4e4>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a00076b0: e59d2028 ldr r2, [sp, #40] ; 0x28
a00076b4: e1520007 cmp r2, r7
a00076b8: 9a000001 bls a00076c4 <_Heap_Walk+0x26c>
a00076bc: e3530000 cmp r3, #0
a00076c0: 1a0000a5 bne a000795c <_Heap_Walk+0x504>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a00076c4: e1560005 cmp r6, r5
a00076c8: 3a000001 bcc a00076d4 <_Heap_Walk+0x27c>
a00076cc: e3530000 cmp r3, #0
a00076d0: 1a0000aa bne a0007980 <_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;
a00076d4: e5953004 ldr r3, [r5, #4]
a00076d8: e20bb001 and fp, fp, #1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a00076dc: e3130001 tst r3, #1
a00076e0: 0a000016 beq a0007740 <_Heap_Walk+0x2e8>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a00076e4: e35b0000 cmp fp, #0
a00076e8: 0a00000b beq a000771c <_Heap_Walk+0x2c4>
(*printer)(
a00076ec: e58d7000 str r7, [sp]
a00076f0: e1a0000a mov r0, sl
a00076f4: e3a01000 mov r1, #0
a00076f8: e59f2308 ldr r2, [pc, #776] ; a0007a08 <_Heap_Walk+0x5b0>
a00076fc: e1a03006 mov r3, r6
a0007700: e12fff39 blx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a0007704: e1580005 cmp r8, r5
a0007708: 0affff65 beq a00074a4 <_Heap_Walk+0x4c>
a000770c: e595b004 ldr fp, [r5, #4]
a0007710: e5943020 ldr r3, [r4, #32]
a0007714: e1a06005 mov r6, r5
a0007718: eaffffcb b a000764c <_Heap_Walk+0x1f4>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a000771c: e58d7000 str r7, [sp]
a0007720: e5963000 ldr r3, [r6]
a0007724: e1a0000a mov r0, sl
a0007728: e1a0100b mov r1, fp
a000772c: e58d3004 str r3, [sp, #4]
a0007730: e59f22d4 ldr r2, [pc, #724] ; a0007a0c <_Heap_Walk+0x5b4>
a0007734: e1a03006 mov r3, r6
a0007738: e12fff39 blx r9
a000773c: eafffff0 b a0007704 <_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 ?
a0007740: 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)(
a0007744: e5943008 ldr r3, [r4, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a0007748: 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)(
a000774c: e1530002 cmp r3, r2
a0007750: 059f02b8 ldreq r0, [pc, #696] ; a0007a10 <_Heap_Walk+0x5b8>
a0007754: 0a000003 beq a0007768 <_Heap_Walk+0x310>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a0007758: e59f32b4 ldr r3, [pc, #692] ; a0007a14 <_Heap_Walk+0x5bc>
a000775c: e1540002 cmp r4, r2
a0007760: e59f02b0 ldr r0, [pc, #688] ; a0007a18 <_Heap_Walk+0x5c0>
a0007764: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a0007768: 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)(
a000776c: e1510003 cmp r1, r3
a0007770: 059f12a4 ldreq r1, [pc, #676] ; a0007a1c <_Heap_Walk+0x5c4>
a0007774: 0a000003 beq a0007788 <_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)" : "")
a0007778: e59fc2a0 ldr ip, [pc, #672] ; a0007a20 <_Heap_Walk+0x5c8>
a000777c: e1540003 cmp r4, r3
a0007780: e59f1290 ldr r1, [pc, #656] ; a0007a18 <_Heap_Walk+0x5c0>
a0007784: 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)(
a0007788: e58d2004 str r2, [sp, #4]
a000778c: e58d0008 str r0, [sp, #8]
a0007790: e58d300c str r3, [sp, #12]
a0007794: e58d1010 str r1, [sp, #16]
a0007798: e1a03006 mov r3, r6
a000779c: e58d7000 str r7, [sp]
a00077a0: e1a0000a mov r0, sl
a00077a4: e3a01000 mov r1, #0
a00077a8: e59f2274 ldr r2, [pc, #628] ; a0007a24 <_Heap_Walk+0x5cc>
a00077ac: e12fff39 blx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a00077b0: e5953000 ldr r3, [r5]
a00077b4: e1570003 cmp r7, r3
a00077b8: 1a000010 bne a0007800 <_Heap_Walk+0x3a8>
);
return false;
}
if ( !prev_used ) {
a00077bc: e35b0000 cmp fp, #0
a00077c0: 0a000018 beq a0007828 <_Heap_Walk+0x3d0>
block = next_block;
} while ( block != first_block );
return true;
}
a00077c4: 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 ) {
a00077c8: e1540003 cmp r4, r3
a00077cc: 0a000004 beq a00077e4 <_Heap_Walk+0x38c>
if ( free_block == block ) {
a00077d0: e1560003 cmp r6, r3
a00077d4: 0affffca beq a0007704 <_Heap_Walk+0x2ac>
return true;
}
free_block = free_block->next;
a00077d8: 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 ) {
a00077dc: e1540003 cmp r4, r3
a00077e0: 1afffffa bne a00077d0 <_Heap_Walk+0x378>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a00077e4: e1a0000a mov r0, sl
a00077e8: e3a01001 mov r1, #1
a00077ec: e59f2234 ldr r2, [pc, #564] ; a0007a28 <_Heap_Walk+0x5d0>
a00077f0: e1a03006 mov r3, r6
a00077f4: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a00077f8: e3a00000 mov r0, #0
a00077fc: eaffff29 b a00074a8 <_Heap_Walk+0x50>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
a0007800: e58d3004 str r3, [sp, #4]
a0007804: e1a0000a mov r0, sl
a0007808: e58d7000 str r7, [sp]
a000780c: e58d5008 str r5, [sp, #8]
a0007810: e3a01001 mov r1, #1
a0007814: e59f2210 ldr r2, [pc, #528] ; a0007a2c <_Heap_Walk+0x5d4>
a0007818: e1a03006 mov r3, r6
a000781c: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a0007820: e3a00000 mov r0, #0
a0007824: eaffff1f b a00074a8 <_Heap_Walk+0x50>
return false;
}
if ( !prev_used ) {
(*printer)(
a0007828: e1a0000a mov r0, sl
a000782c: e3a01001 mov r1, #1
a0007830: e59f21f8 ldr r2, [pc, #504] ; a0007a30 <_Heap_Walk+0x5d8>
a0007834: e1a03006 mov r3, r6
a0007838: e12fff39 blx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000783c: e1a0000b mov r0, fp
a0007840: eaffff18 b a00074a8 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
a0007844: e1a0000a mov r0, sl
a0007848: e3a01001 mov r1, #1
a000784c: e59f21e0 ldr r2, [pc, #480] ; a0007a34 <_Heap_Walk+0x5dc>
a0007850: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007854: e1a00005 mov r0, r5
a0007858: eaffff12 b a00074a8 <_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;
a000785c: e594c024 ldr ip, [r4, #36] ; 0x24
a0007860: e15c0005 cmp ip, r5
a0007864: 3affff6d bcc a0007620 <_Heap_Walk+0x1c8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0007868: e2850008 add r0, r5, #8
a000786c: e1a01007 mov r1, r7
a0007870: e58d3020 str r3, [sp, #32]
a0007874: e58dc01c str ip, [sp, #28]
a0007878: ebffe47b bl a0000a6c <__umodsi3>
);
return false;
}
if (
a000787c: e3500000 cmp r0, #0
a0007880: e59d3020 ldr r3, [sp, #32]
a0007884: e59dc01c ldr ip, [sp, #28]
a0007888: 1a000044 bne a00079a0 <_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;
a000788c: e5952004 ldr r2, [r5, #4]
a0007890: e3c22001 bic r2, r2, #1
block = next_block;
} while ( block != first_block );
return true;
}
a0007894: 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;
a0007898: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000789c: e3120001 tst r2, #1
a00078a0: 1a000045 bne a00079bc <_Heap_Walk+0x564>
a00078a4: e58d8030 str r8, [sp, #48] ; 0x30
a00078a8: e58db034 str fp, [sp, #52] ; 0x34
a00078ac: e1a01004 mov r1, r4
a00078b0: e1a06005 mov r6, r5
a00078b4: e1a08003 mov r8, r3
a00078b8: e1a0b00c mov fp, ip
a00078bc: ea000013 b a0007910 <_Heap_Walk+0x4b8>
return false;
}
prev_block = free_block;
free_block = free_block->next;
a00078c0: 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 ) {
a00078c4: e1540005 cmp r4, r5
a00078c8: 0affff5b beq a000763c <_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;
a00078cc: e1580005 cmp r8, r5
a00078d0: 8affff52 bhi a0007620 <_Heap_Walk+0x1c8>
a00078d4: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a00078d8: e2850008 add r0, r5, #8
a00078dc: 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;
a00078e0: 8affff4e bhi a0007620 <_Heap_Walk+0x1c8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a00078e4: ebffe460 bl a0000a6c <__umodsi3>
);
return false;
}
if (
a00078e8: e3500000 cmp r0, #0
a00078ec: 1a00002b bne a00079a0 <_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;
a00078f0: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a00078f4: e1a01006 mov r1, r6
a00078f8: e1a06005 mov r6, r5
a00078fc: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a0007900: 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;
a0007904: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0007908: e3130001 tst r3, #1
a000790c: 1a00002a bne a00079bc <_Heap_Walk+0x564>
);
return false;
}
if ( free_block->prev != prev_block ) {
a0007910: e595200c ldr r2, [r5, #12]
a0007914: e1520001 cmp r2, r1
a0007918: 0affffe8 beq a00078c0 <_Heap_Walk+0x468>
(*printer)(
a000791c: e58d2000 str r2, [sp]
a0007920: e1a0000a mov r0, sl
a0007924: e3a01001 mov r1, #1
a0007928: e59f2108 ldr r2, [pc, #264] ; a0007a38 <_Heap_Walk+0x5e0>
a000792c: e1a03005 mov r3, r5
a0007930: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0007934: e3a00000 mov r0, #0
a0007938: eafffeda b a00074a8 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
a000793c: e1a0000a mov r0, sl
a0007940: e58d7000 str r7, [sp]
a0007944: e3a01001 mov r1, #1
a0007948: e59f20ec ldr r2, [pc, #236] ; a0007a3c <_Heap_Walk+0x5e4>
a000794c: e1a03006 mov r3, r6
a0007950: e12fff39 blx r9
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
a0007954: e3a00000 mov r0, #0
a0007958: eafffed2 b a00074a8 <_Heap_Walk+0x50>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
a000795c: e58d2004 str r2, [sp, #4]
a0007960: e1a0000a mov r0, sl
a0007964: e58d7000 str r7, [sp]
a0007968: e3a01001 mov r1, #1
a000796c: e59f20cc ldr r2, [pc, #204] ; a0007a40 <_Heap_Walk+0x5e8>
a0007970: e1a03006 mov r3, r6
a0007974: e12fff39 blx r9
block,
block_size,
min_block_size
);
return false;
a0007978: e3a00000 mov r0, #0
a000797c: eafffec9 b a00074a8 <_Heap_Walk+0x50>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
a0007980: e1a0000a mov r0, sl
a0007984: e58d5000 str r5, [sp]
a0007988: e3a01001 mov r1, #1
a000798c: e59f20b0 ldr r2, [pc, #176] ; a0007a44 <_Heap_Walk+0x5ec>
a0007990: e1a03006 mov r3, r6
a0007994: e12fff39 blx r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
a0007998: e3a00000 mov r0, #0
a000799c: eafffec1 b a00074a8 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a00079a0: e1a0000a mov r0, sl
a00079a4: e3a01001 mov r1, #1
a00079a8: e59f2098 ldr r2, [pc, #152] ; a0007a48 <_Heap_Walk+0x5f0>
a00079ac: e1a03005 mov r3, r5
a00079b0: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00079b4: e3a00000 mov r0, #0
a00079b8: eafffeba b a00074a8 <_Heap_Walk+0x50>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
a00079bc: e1a0000a mov r0, sl
a00079c0: e3a01001 mov r1, #1
a00079c4: e59f2080 ldr r2, [pc, #128] ; a0007a4c <_Heap_Walk+0x5f4>
a00079c8: e1a03005 mov r3, r5
a00079cc: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a00079d0: e3a00000 mov r0, #0
a00079d4: eafffeb3 b a00074a8 <_Heap_Walk+0x50>
a0006940 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a0006940: 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 )
a0006944: e5904034 ldr r4, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a0006948: e24dd014 sub sp, sp, #20
a000694c: 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 )
a0006950: 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 );
a0006954: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a0006958: 0a00009c beq a0006bd0 <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
a000695c: e1d081b4 ldrh r8, [r0, #20]
a0006960: e1d0a1b0 ldrh sl, [r0, #16]
a0006964: e1a01008 mov r1, r8
a0006968: e1a0000a mov r0, sl
a000696c: eb0029b5 bl a0011048 <__aeabi_uidiv>
a0006970: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
a0006974: e1b03823 lsrs r3, r3, #16
a0006978: 0a00009a beq a0006be8 <_Objects_Extend_information+0x2a8>
if ( information->object_blocks[ block ] == NULL ) {
a000697c: e5949000 ldr r9, [r4]
a0006980: e3590000 cmp r9, #0
a0006984: 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 );
a0006988: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
a000698c: 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 ) {
a0006990: 0a00000c beq a00069c8 <_Objects_Extend_information+0x88>
a0006994: e1a02004 mov r2, r4
a0006998: 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 );
a000699c: e1a06007 mov r6, r7
index_base = minimum_index;
block = 0;
a00069a0: e3a04000 mov r4, #0
a00069a4: ea000002 b a00069b4 <_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 ) {
a00069a8: e5b29004 ldr r9, [r2, #4]!
a00069ac: e3590000 cmp r9, #0
a00069b0: 0a000004 beq a00069c8 <_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++ ) {
a00069b4: e2844001 add r4, r4, #1
a00069b8: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
a00069bc: 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++ ) {
a00069c0: 8afffff8 bhi a00069a8 <_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;
a00069c4: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
a00069c8: 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 ) {
a00069cc: e35a0801 cmp sl, #65536 ; 0x10000
a00069d0: 2a000064 bcs a0006b68 <_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 ) {
a00069d4: 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;
a00069d8: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
a00069dc: 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;
a00069e0: e0000091 mul r0, r1, r0
if ( information->auto_extend ) {
a00069e4: 1a000061 bne a0006b70 <_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 );
a00069e8: e58d3000 str r3, [sp]
a00069ec: eb00084a bl a0008b1c <_Workspace_Allocate_or_fatal_error>
a00069f0: e59d3000 ldr r3, [sp]
a00069f4: e1a08000 mov r8, r0
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
a00069f8: e3590000 cmp r9, #0
a00069fc: 0a00003a beq a0006aec <_Objects_Extend_information+0x1ac>
*/
/*
* Up the block count and maximum
*/
block_count++;
a0006a00: e283b001 add fp, r3, #1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a0006a04: e08b008b add r0, fp, fp, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
a0006a08: e08a0000 add r0, sl, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a0006a0c: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
a0006a10: e1a00100 lsl r0, r0, #2
a0006a14: e58d3000 str r3, [sp]
a0006a18: eb000835 bl a0008af4 <_Workspace_Allocate>
if ( !object_blocks ) {
a0006a1c: e2509000 subs r9, r0, #0
a0006a20: e59d3000 ldr r3, [sp]
a0006a24: 0a000074 beq a0006bfc <_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 ) {
a0006a28: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
a0006a2c: e089c10b add ip, r9, fp, lsl #2
a0006a30: e089b18b add fp, r9, fp, lsl #3
a0006a34: e1570002 cmp r7, r2
a0006a38: 3a000052 bcc a0006b88 <_Objects_Extend_information+0x248>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006a3c: e3570000 cmp r7, #0
a0006a40: 13a02000 movne r2, #0
a0006a44: 11a0100b movne r1, fp
local_table[ index ] = NULL;
a0006a48: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006a4c: 0a000003 beq a0006a60 <_Objects_Extend_information+0x120>
a0006a50: e2822001 add r2, r2, #1
a0006a54: e1570002 cmp r7, r2
local_table[ index ] = NULL;
a0006a58: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a0006a5c: 8afffffb bhi a0006a50 <_Objects_Extend_information+0x110>
a0006a60: 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 );
a0006a64: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
a0006a68: e3a00000 mov r0, #0
a0006a6c: e7890003 str r0, [r9, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a0006a70: 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 ;
a0006a74: e1560001 cmp r6, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
a0006a78: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
a0006a7c: 2a000005 bcs a0006a98 <_Objects_Extend_information+0x158>
a0006a80: e08b2106 add r2, fp, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
a0006a84: 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++ ) {
a0006a88: 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 ;
a0006a8c: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
a0006a90: 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 ;
a0006a94: 3afffffb bcc a0006a88 <_Objects_Extend_information+0x148>
a0006a98: e10f3000 mrs r3, CPSR
a0006a9c: e3832080 orr r2, r3, #128 ; 0x80
a0006aa0: e129f002 msr CPSR_fc, r2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a0006aa4: 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(
a0006aa8: 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;
a0006aac: e1a0a80a lsl sl, sl, #16
a0006ab0: e1a02c02 lsl r2, r2, #24
a0006ab4: e3822801 orr r2, r2, #65536 ; 0x10000
a0006ab8: e1a0a82a lsr sl, sl, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a0006abc: 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) |
a0006ac0: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
a0006ac4: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
a0006ac8: e585c030 str ip, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
a0006acc: e5859034 str r9, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
a0006ad0: e585b01c str fp, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
a0006ad4: e1c5a1b0 strh sl, [r5, #16]
information->maximum_id = _Objects_Build_id(
a0006ad8: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0006adc: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
a0006ae0: e3500000 cmp r0, #0
a0006ae4: 0a000000 beq a0006aec <_Objects_Extend_information+0x1ac>
_Workspace_Free( old_tables );
a0006ae8: eb000807 bl a0008b0c <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006aec: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a0006af0: e28d7008 add r7, sp, #8
a0006af4: e1a01008 mov r1, r8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006af8: e7838104 str r8, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a0006afc: e1a00007 mov r0, r7
a0006b00: e1d521b4 ldrh r2, [r5, #20]
a0006b04: e5953018 ldr r3, [r5, #24]
a0006b08: eb001232 bl a000b3d8 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006b0c: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006b10: 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 ) {
a0006b14: ea000009 b a0006b40 <_Objects_Extend_information+0x200>
a0006b18: e5953000 ldr r3, [r5]
the_object->id = _Objects_Build_id(
a0006b1c: e1d520b4 ldrh r2, [r5, #4]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006b20: e1a00008 mov r0, r8
a0006b24: e1a03c03 lsl r3, r3, #24
a0006b28: e3833801 orr r3, r3, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a0006b2c: 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) |
a0006b30: e1833006 orr r3, r3, r6
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
a0006b34: e5813008 str r3, [r1, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a0006b38: ebfffce1 bl a0005ec4 <_Chain_Append>
index++;
a0006b3c: 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 ) {
a0006b40: e1a00007 mov r0, r7
a0006b44: ebfffcf1 bl a0005f10 <_Chain_Get>
a0006b48: e2501000 subs r1, r0, #0
a0006b4c: 1afffff1 bne a0006b18 <_Objects_Extend_information+0x1d8>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a0006b50: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006b54: e1d531b4 ldrh r3, [r5, #20]
a0006b58: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a0006b5c: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006b60: e7813004 str r3, [r1, r4]
information->inactive =
a0006b64: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
a0006b68: e28dd014 add sp, sp, #20
a0006b6c: 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 );
a0006b70: e58d3000 str r3, [sp]
a0006b74: eb0007de bl a0008af4 <_Workspace_Allocate>
if ( !new_object_block )
a0006b78: e2508000 subs r8, r0, #0
a0006b7c: e59d3000 ldr r3, [sp]
a0006b80: 1affff9c bne a00069f8 <_Objects_Extend_information+0xb8>
a0006b84: eafffff7 b a0006b68 <_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,
a0006b88: e1a03103 lsl r3, r3, #2
a0006b8c: e5951034 ldr r1, [r5, #52] ; 0x34
a0006b90: e1a02003 mov r2, r3
a0006b94: e88d1008 stm sp, {r3, ip}
a0006b98: eb001db9 bl a000e284 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
a0006b9c: e89d1008 ldm sp, {r3, ip}
a0006ba0: e5951030 ldr r1, [r5, #48] ; 0x30
a0006ba4: e1a0000c mov r0, ip
a0006ba8: e1a02003 mov r2, r3
a0006bac: eb001db4 bl a000e284 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a0006bb0: 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,
a0006bb4: e1a0000b mov r0, fp
a0006bb8: e595101c ldr r1, [r5, #28]
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a0006bbc: 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,
a0006bc0: e1a02102 lsl r2, r2, #2
a0006bc4: eb001dae bl a000e284 <memcpy>
a0006bc8: e89d1008 ldm sp, {r3, ip}
a0006bcc: eaffffa4 b a0006a64 <_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 )
a0006bd0: e1d0a1b0 ldrh sl, [r0, #16]
a0006bd4: 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 );
a0006bd8: 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;
a0006bdc: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
a0006be0: e1a03004 mov r3, r4
a0006be4: eaffff77 b a00069c8 <_Objects_Extend_information+0x88>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a0006be8: 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 );
a0006bec: 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;
a0006bf0: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
a0006bf4: e1a04003 mov r4, r3 <== NOT EXECUTED
a0006bf8: eaffff72 b a00069c8 <_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 );
a0006bfc: e1a00008 mov r0, r8
a0006c00: eb0007c1 bl a0008b0c <_Workspace_Free>
return;
a0006c04: eaffffd7 b a0006b68 <_Objects_Extend_information+0x228>
a0006f84 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a0006f84: 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 );
a0006f88: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
a0006f8c: e1d051b4 ldrh r5, [r0, #20]
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a0006f90: 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) /
a0006f94: e1d001b0 ldrh r0, [r0, #16]
a0006f98: e1a01005 mov r1, r5
a0006f9c: e0640000 rsb r0, r4, r0
a0006fa0: eb002828 bl a0011048 <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
a0006fa4: e3500000 cmp r0, #0
a0006fa8: 0a00000d beq a0006fe4 <_Objects_Shrink_information+0x60>
if ( information->inactive_per_block[ block ] ==
a0006fac: e5962030 ldr r2, [r6, #48] ; 0x30
a0006fb0: e5923000 ldr r3, [r2]
a0006fb4: 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++ ) {
a0006fb8: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
a0006fbc: 1a000005 bne a0006fd8 <_Objects_Shrink_information+0x54>
a0006fc0: ea000008 b a0006fe8 <_Objects_Shrink_information+0x64> <== NOT EXECUTED
a0006fc4: e5b21004 ldr r1, [r2, #4]!
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
a0006fc8: e0844005 add r4, r4, r5
a0006fcc: 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 ] ==
a0006fd0: e1550001 cmp r5, r1
a0006fd4: 0a000004 beq a0006fec <_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++ ) {
a0006fd8: e2833001 add r3, r3, #1
a0006fdc: e1500003 cmp r0, r3
a0006fe0: 8afffff7 bhi a0006fc4 <_Objects_Shrink_information+0x40>
a0006fe4: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
a0006fe8: 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;
a0006fec: e5960020 ldr r0, [r6, #32]
a0006ff0: ea000002 b a0007000 <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
a0006ff4: e3550000 cmp r5, #0
a0006ff8: 0a00000b beq a000702c <_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;
a0006ffc: 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 );
a0007000: 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;
a0007004: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
a0007008: e1530004 cmp r3, r4
a000700c: 3afffff8 bcc a0006ff4 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
a0007010: e1d621b4 ldrh r2, [r6, #20]
a0007014: 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) &&
a0007018: e1530002 cmp r3, r2
a000701c: 2afffff4 bcs a0006ff4 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
a0007020: ebfffbb2 bl a0005ef0 <_Chain_Extract>
}
}
while ( the_object );
a0007024: e3550000 cmp r5, #0
a0007028: 1afffff3 bne a0006ffc <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
a000702c: e5963034 ldr r3, [r6, #52] ; 0x34
a0007030: e7930007 ldr r0, [r3, r7]
a0007034: eb0006b4 bl a0008b0c <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
a0007038: e1d602bc ldrh r0, [r6, #44] ; 0x2c
a000703c: 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;
a0007040: e5961034 ldr r1, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
a0007044: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
a0007048: 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;
a000704c: e7815007 str r5, [r1, r7]
information->inactive_per_block[ block ] = 0;
a0007050: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
a0007054: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
a0007058: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000d948 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000d948: e10f2000 mrs r2, CPSR
a000d94c: e3823080 orr r3, r2, #128 ; 0x80
a000d950: 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 ) {
a000d954: e3a0300c mov r3, #12
a000d958: e0030390 mul r3, r0, r3
a000d95c: e59f1048 ldr r1, [pc, #72] ; a000d9ac <_POSIX_signals_Clear_process_signals+0x64>
a000d960: e7911003 ldr r1, [r1, r3]
a000d964: e3510002 cmp r1, #2
a000d968: 0a000007 beq a000d98c <_POSIX_signals_Clear_process_signals+0x44>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
a000d96c: e59f303c ldr r3, [pc, #60] ; a000d9b0 <_POSIX_signals_Clear_process_signals+0x68>
a000d970: e3a0c001 mov ip, #1
a000d974: e2400001 sub r0, r0, #1
a000d978: e5931000 ldr r1, [r3]
a000d97c: e1c1001c bic r0, r1, ip, lsl r0
a000d980: e5830000 str r0, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000d984: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
a000d988: e12fff1e bx lr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a000d98c: e59f1020 ldr r1, [pc, #32] ; a000d9b4 <_POSIX_signals_Clear_process_signals+0x6c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000d990: 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 ] ) )
a000d994: e7913003 ldr r3, [r1, r3]
a000d998: e08c1001 add r1, ip, r1
a000d99c: e1530001 cmp r3, r1
a000d9a0: 0afffff1 beq a000d96c <_POSIX_signals_Clear_process_signals+0x24>
a000d9a4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
}
a000d9a8: e12fff1e bx lr <== NOT EXECUTED
a0021c88 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
a0021c88: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
a0021c8c: e5905010 ldr r5, [r0, #16]
a0021c90: e3a03201 mov r3, #268435456 ; 0x10000000
a0021c94: e2833902 add r3, r3, #32768 ; 0x8000
a0021c98: e1a0c003 mov ip, r3
a0021c9c: e0053003 and r3, r5, r3
a0021ca0: e2417001 sub r7, r1, #1
a0021ca4: e3a06001 mov r6, #1
a0021ca8: e153000c cmp r3, ip
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
a0021cac: e1a04000 mov r4, r0
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0021cb0: e5903108 ldr r3, [r0, #264] ; 0x108
a0021cb4: e1a07716 lsl r7, r6, r7
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
a0021cb8: 0a000012 beq a0021d08 <_POSIX_signals_Unblock_thread+0x80>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
a0021cbc: e59330d0 ldr r3, [r3, #208] ; 0xd0
a0021cc0: e1d77003 bics r7, r7, r3
a0021cc4: 0a00000d beq a0021d00 <_POSIX_signals_Unblock_thread+0x78>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
a0021cc8: e2157201 ands r7, r5, #268435456 ; 0x10000000
a0021ccc: 0a000009 beq a0021cf8 <_POSIX_signals_Unblock_thread+0x70>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
a0021cd0: e3a06bef mov r6, #244736 ; 0x3bc00
a0021cd4: e2866e2e add r6, r6, #736 ; 0x2e0
a0021cd8: e0056006 and r6, r5, r6
the_thread->Wait.return_code = EINTR;
a0021cdc: e3a03004 mov r3, #4
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
a0021ce0: e3560000 cmp r6, #0
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
the_thread->Wait.return_code = EINTR;
a0021ce4: e5803034 str r3, [r0, #52] ; 0x34
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
a0021ce8: 1a000030 bne a0021db0 <_POSIX_signals_Unblock_thread+0x128>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
a0021cec: e2150008 ands r0, r5, #8
a0021cf0: 1a000027 bne a0021d94 <_POSIX_signals_Unblock_thread+0x10c>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
a0021cf4: e8bd80f0 pop {r4, r5, r6, r7, pc}
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
a0021cf8: e3550000 cmp r5, #0
a0021cfc: 0a000019 beq a0021d68 <_POSIX_signals_Unblock_thread+0xe0>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a0021d00: e1a00007 mov r0, r7
a0021d04: e8bd80f0 pop {r4, r5, r6, r7, pc}
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
a0021d08: e5900030 ldr r0, [r0, #48] ; 0x30
a0021d0c: e1170000 tst r7, r0
a0021d10: 0a000010 beq a0021d58 <_POSIX_signals_Unblock_thread+0xd0>
the_thread->Wait.return_code = EINTR;
a0021d14: e3a03004 mov r3, #4
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
a0021d18: e3520000 cmp r2, #0
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
a0021d1c: e5843034 str r3, [r4, #52] ; 0x34
the_info = (siginfo_t *) the_thread->Wait.return_argument;
a0021d20: e5940028 ldr r0, [r4, #40] ; 0x28
if ( !info ) {
a0021d24: 0a000024 beq a0021dbc <_POSIX_signals_Unblock_thread+0x134>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
a0021d28: e1a01002 mov r1, r2
a0021d2c: e491c004 ldr ip, [r1], #4
a0021d30: e1a03000 mov r3, r0
a0021d34: e483c004 str ip, [r3], #4
a0021d38: e5922004 ldr r2, [r2, #4]
a0021d3c: e5802004 str r2, [r0, #4]
a0021d40: e5912004 ldr r2, [r1, #4]
a0021d44: e5832004 str r2, [r3, #4]
}
_Thread_queue_Extract_with_proxy( the_thread );
a0021d48: e1a00004 mov r0, r4
a0021d4c: ebffadad bl a000d408 <_Thread_queue_Extract_with_proxy>
return true;
a0021d50: e3a00001 mov r0, #1
a0021d54: e8bd80f0 pop {r4, r5, r6, r7, pc}
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
a0021d58: e59300d0 ldr r0, [r3, #208] ; 0xd0
a0021d5c: e1d70000 bics r0, r7, r0
a0021d60: 1affffeb bne a0021d14 <_POSIX_signals_Unblock_thread+0x8c>
a0021d64: eaffffe2 b a0021cf4 <_POSIX_signals_Unblock_thread+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a0021d68: e59f205c ldr r2, [pc, #92] ; a0021dcc <_POSIX_signals_Unblock_thread+0x144>
a0021d6c: e5920000 ldr r0, [r2]
a0021d70: e3500000 cmp r0, #0
a0021d74: 0affffde beq a0021cf4 <_POSIX_signals_Unblock_thread+0x6c>
a0021d78: e5923004 ldr r3, [r2, #4]
a0021d7c: e1540003 cmp r4, r3
_Thread_Dispatch_necessary = true;
}
}
return false;
a0021d80: 11a00005 movne r0, r5
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a0021d84: 1affffda bne a0021cf4 <_POSIX_signals_Unblock_thread+0x6c>
_Thread_Dispatch_necessary = true;
a0021d88: e5c26010 strb r6, [r2, #16]
}
}
return false;
a0021d8c: e1a00005 mov r0, r5
a0021d90: e8bd80f0 pop {r4, r5, r6, r7, pc}
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
a0021d94: e2840048 add r0, r4, #72 ; 0x48
a0021d98: ebffb06b bl a000df4c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a0021d9c: e1a00004 mov r0, r4
a0021da0: e59f1028 ldr r1, [pc, #40] ; a0021dd0 <_POSIX_signals_Unblock_thread+0x148>
a0021da4: ebffaacd bl a000c8e0 <_Thread_Clear_state>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a0021da8: e1a00006 mov r0, r6
a0021dac: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
a0021db0: ebffad94 bl a000d408 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a0021db4: e3a00000 mov r0, #0 <== NOT EXECUTED
a0021db8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
a0021dbc: e3a03001 mov r3, #1
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
a0021dc0: e880000a stm r0, {r1, r3}
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
a0021dc4: e5802008 str r2, [r0, #8]
a0021dc8: eaffffde b a0021d48 <_POSIX_signals_Unblock_thread+0xc0>
a0006548 <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a0006548: e59f30bc ldr r3, [pc, #188] ; a000660c <_TOD_Validate+0xc4>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a000654c: e92d4010 push {r4, lr}
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a0006550: e2504000 subs r4, r0, #0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a0006554: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a0006558: 0a000029 beq a0006604 <_TOD_Validate+0xbc>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a000655c: e3a0093d mov r0, #999424 ; 0xf4000
a0006560: e2800d09 add r0, r0, #576 ; 0x240
a0006564: eb0048fa bl a0018954 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a0006568: e5943018 ldr r3, [r4, #24]
a000656c: e1500003 cmp r0, r3
a0006570: 9a00001f bls a00065f4 <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a0006574: e5943014 ldr r3, [r4, #20]
a0006578: e353003b cmp r3, #59 ; 0x3b
a000657c: 8a00001c bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a0006580: e5943010 ldr r3, [r4, #16]
a0006584: e353003b cmp r3, #59 ; 0x3b
a0006588: 8a000019 bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a000658c: e594300c ldr r3, [r4, #12]
a0006590: e3530017 cmp r3, #23
a0006594: 8a000016 bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a0006598: e5940004 ldr r0, [r4, #4]
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
a000659c: e3500000 cmp r0, #0
a00065a0: 0a000016 beq a0006600 <_TOD_Validate+0xb8>
(the_tod->month == 0) ||
a00065a4: e350000c cmp r0, #12
a00065a8: 8a000011 bhi a00065f4 <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a00065ac: e5942000 ldr r2, [r4]
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
a00065b0: e3a03d1f mov r3, #1984 ; 0x7c0
a00065b4: e2833003 add r3, r3, #3
a00065b8: e1520003 cmp r2, r3
a00065bc: 9a00000c bls a00065f4 <_TOD_Validate+0xac>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a00065c0: e5944008 ldr r4, [r4, #8]
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a00065c4: e3540000 cmp r4, #0
a00065c8: 0a00000b beq a00065fc <_TOD_Validate+0xb4>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a00065cc: e3120003 tst r2, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a00065d0: 059f3038 ldreq r3, [pc, #56] ; a0006610 <_TOD_Validate+0xc8>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a00065d4: 159f3034 ldrne r3, [pc, #52] ; a0006610 <_TOD_Validate+0xc8>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a00065d8: 0280000d addeq r0, r0, #13
a00065dc: 07930100 ldreq r0, [r3, r0, lsl #2]
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a00065e0: 17930100 ldrne r0, [r3, r0, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
a00065e4: e1500004 cmp r0, r4
a00065e8: 33a00000 movcc r0, #0
a00065ec: 23a00001 movcs r0, #1
a00065f0: e8bd8010 pop {r4, pc}
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
a00065f4: e3a00000 mov r0, #0
a00065f8: e8bd8010 pop {r4, pc}
a00065fc: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
a0006600: e8bd8010 pop {r4, pc} <== NOT EXECUTED
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
a0006604: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006608: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0007c44 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
a0007c44: 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
)
{
a0007c48: e92d0ff0 push {r4, r5, r6, r7, r8, r9, sl, fp}
a0007c4c: 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 );
a0007c50: e281c038 add ip, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0007c54: 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 ) )
a0007c58: e3130020 tst r3, #32
the_chain->permanent_null = NULL;
a0007c5c: e3a04000 mov r4, #0
the_chain->last = _Chain_Head(the_chain);
a0007c60: 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;
a0007c64: 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);
a0007c68: 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;
a0007c6c: e5905038 ldr r5, [r0, #56] ; 0x38
if ( _Thread_queue_Is_reverse_search( priority ) )
a0007c70: 1a00001f bne a0007cf4 <_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;
a0007c74: e3a0900c mov r9, #12
a0007c78: e00c0c99 mul ip, r9, ip
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a0007c7c: e28c8004 add r8, ip, #4
a0007c80: e080900c add r9, r0, ip
a0007c84: e0808008 add r8, r0, r8
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0007c88: e10f7000 mrs r7, CPSR
a0007c8c: e387c080 orr ip, r7, #128 ; 0x80
a0007c90: e129f00c msr CPSR_fc, ip
a0007c94: e1a0a007 mov sl, r7
a0007c98: e599c000 ldr ip, [r9]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a0007c9c: e15c0008 cmp ip, r8
a0007ca0: 1a000009 bne a0007ccc <_Thread_queue_Enqueue_priority+0x88>
a0007ca4: ea000054 b a0007dfc <_Thread_queue_Enqueue_priority+0x1b8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a0007ca8: e10f6000 mrs r6, CPSR
a0007cac: e129f007 msr CPSR_fc, r7
a0007cb0: 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);
a0007cb4: 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) ) {
a0007cb8: e1150006 tst r5, r6
a0007cbc: 0a000036 beq a0007d9c <_Thread_queue_Enqueue_priority+0x158>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
a0007cc0: 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 ) ) {
a0007cc4: e15c0008 cmp ip, r8
a0007cc8: 0a000002 beq a0007cd8 <_Thread_queue_Enqueue_priority+0x94>
search_priority = search_thread->current_priority;
a0007ccc: e59c4014 ldr r4, [ip, #20]
if ( priority <= search_priority )
a0007cd0: e1530004 cmp r3, r4
a0007cd4: 8afffff3 bhi a0007ca8 <_Thread_queue_Enqueue_priority+0x64>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
a0007cd8: e5905030 ldr r5, [r0, #48] ; 0x30
a0007cdc: e3550001 cmp r5, #1
a0007ce0: 0a00002f beq a0007da4 <_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;
a0007ce4: e582a000 str sl, [r2]
return the_thread_queue->sync_state;
}
a0007ce8: e1a00005 mov r0, r5
a0007cec: e8bd0ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp}
a0007cf0: 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 ];
a0007cf4: e3a0800c mov r8, #12
a0007cf8: e028089c mla r8, ip, r8, r0
a0007cfc: e59f9100 ldr r9, [pc, #256] ; a0007e04 <_Thread_queue_Enqueue_priority+0x1c0>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
a0007d00: 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;
a0007d04: e5d94000 ldrb r4, [r9]
a0007d08: e2844001 add r4, r4, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0007d0c: e10f7000 mrs r7, CPSR
a0007d10: e387c080 orr ip, r7, #128 ; 0x80
a0007d14: e129f00c msr CPSR_fc, ip
a0007d18: e1a0a007 mov sl, r7
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
a0007d1c: e59bc008 ldr ip, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a0007d20: e15c0008 cmp ip, r8
a0007d24: 1a000009 bne a0007d50 <_Thread_queue_Enqueue_priority+0x10c>
a0007d28: ea00000b b a0007d5c <_Thread_queue_Enqueue_priority+0x118>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a0007d2c: e10f6000 mrs r6, CPSR
a0007d30: e129f007 msr CPSR_fc, r7
a0007d34: e129f006 msr CPSR_fc, r6
a0007d38: 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) ) {
a0007d3c: e1150006 tst r5, r6
a0007d40: 0a000013 beq a0007d94 <_Thread_queue_Enqueue_priority+0x150>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
a0007d44: 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 ) ) {
a0007d48: e15c0008 cmp ip, r8
a0007d4c: 0a000002 beq a0007d5c <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
a0007d50: e59c4014 ldr r4, [ip, #20]
if ( priority >= search_priority )
a0007d54: e1530004 cmp r3, r4
a0007d58: 3afffff3 bcc a0007d2c <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a0007d5c: e5905030 ldr r5, [r0, #48] ; 0x30
a0007d60: e3550001 cmp r5, #1
a0007d64: 1affffde bne a0007ce4 <_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 )
a0007d68: 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;
a0007d6c: e3a03000 mov r3, #0
a0007d70: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a0007d74: 0a000016 beq a0007dd4 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
a0007d78: e59c3000 ldr r3, [ip]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
a0007d7c: e8811008 stm r1, {r3, ip}
search_node->next = the_node;
next_node->previous = the_node;
a0007d80: 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;
a0007d84: e58c1000 str r1, [ip]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a0007d88: e5810044 str r0, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0007d8c: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0007d90: eaffffd4 b a0007ce8 <_Thread_queue_Enqueue_priority+0xa4>
a0007d94: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
a0007d98: eaffffd9 b a0007d04 <_Thread_queue_Enqueue_priority+0xc0> <== NOT EXECUTED
a0007d9c: e129f007 msr CPSR_fc, r7
a0007da0: eaffffb8 b a0007c88 <_Thread_queue_Enqueue_priority+0x44>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a0007da4: 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;
a0007da8: e3a03000 mov r3, #0
a0007dac: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a0007db0: 0a000007 beq a0007dd4 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
a0007db4: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a0007db8: e581c000 str ip, [r1]
the_node->previous = previous_node;
a0007dbc: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a0007dc0: e5831000 str r1, [r3]
search_node->previous = the_node;
a0007dc4: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
a0007dc8: e5810044 str r0, [r1, #68] ; 0x44
a0007dcc: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0007dd0: eaffffc4 b a0007ce8 <_Thread_queue_Enqueue_priority+0xa4>
a0007dd4: 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;
a0007dd8: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a0007ddc: e581c000 str ip, [r1]
the_node->previous = previous_node;
a0007de0: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a0007de4: e5831000 str r1, [r3]
search_node->previous = the_node;
a0007de8: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
a0007dec: e5810044 str r0, [r1, #68] ; 0x44
a0007df0: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0007df4: e3a05001 mov r5, #1
a0007df8: eaffffba b a0007ce8 <_Thread_queue_Enqueue_priority+0xa4>
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
a0007dfc: e3e04000 mvn r4, #0
a0007e00: eaffffb4 b a0007cd8 <_Thread_queue_Enqueue_priority+0x94>
a0015d94 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a0015d94: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0015d98: e24dd024 sub sp, sp, #36 ; 0x24
a0015d9c: e28d700c add r7, sp, #12
a0015da0: e28d2018 add r2, sp, #24
a0015da4: e282a004 add sl, r2, #4
a0015da8: e2872004 add r2, r7, #4
a0015dac: e58d2000 str r2, [sp]
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
a0015db0: e28d2018 add r2, sp, #24
a0015db4: e58d2020 str r2, [sp, #32]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0015db8: e59d2000 ldr r2, [sp]
a0015dbc: e59f91cc ldr r9, [pc, #460] ; a0015f90 <_Timer_server_Body+0x1fc>
a0015dc0: e59fb1cc ldr fp, [pc, #460] ; a0015f94 <_Timer_server_Body+0x200>
a0015dc4: e58d200c str r2, [sp, #12]
a0015dc8: e2802008 add r2, r0, #8
the_chain->permanent_null = NULL;
a0015dcc: e3a03000 mov r3, #0
a0015dd0: e58d2004 str r2, [sp, #4]
a0015dd4: e2802040 add r2, r0, #64 ; 0x40
a0015dd8: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0015ddc: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
a0015de0: e58d301c str r3, [sp, #28]
a0015de4: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
a0015de8: e58d7014 str r7, [sp, #20]
a0015dec: e2806030 add r6, r0, #48 ; 0x30
a0015df0: e2808068 add r8, r0, #104 ; 0x68
a0015df4: e58d2008 str r2, [sp, #8]
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
a0015df8: e28d3018 add r3, sp, #24
a0015dfc: e5843078 str r3, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
a0015e00: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a0015e04: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0015e08: e1a02007 mov r2, r7
a0015e0c: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a0015e10: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0015e14: e0611003 rsb r1, r1, r3
a0015e18: eb0011de bl a001a598 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a0015e1c: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a0015e20: e5942074 ldr r2, [r4, #116] ; 0x74
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
a0015e24: e1550002 cmp r5, r2
a0015e28: 8a000022 bhi a0015eb8 <_Timer_server_Body+0x124>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
a0015e2c: 3a000018 bcc a0015e94 <_Timer_server_Body+0x100>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
a0015e30: e5845074 str r5, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a0015e34: e5940078 ldr r0, [r4, #120] ; 0x78
a0015e38: eb0002d3 bl a001698c <_Chain_Get>
if ( timer == NULL ) {
a0015e3c: e2501000 subs r1, r0, #0
a0015e40: 0a00000b beq a0015e74 <_Timer_server_Body+0xe0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a0015e44: e5913038 ldr r3, [r1, #56] ; 0x38
a0015e48: e3530001 cmp r3, #1
a0015e4c: 0a000015 beq a0015ea8 <_Timer_server_Body+0x114>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a0015e50: e3530003 cmp r3, #3
a0015e54: 1afffff6 bne a0015e34 <_Timer_server_Body+0xa0>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a0015e58: e2811010 add r1, r1, #16
a0015e5c: e1a00008 mov r0, r8
a0015e60: eb0011f6 bl a001a640 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a0015e64: e5940078 ldr r0, [r4, #120] ; 0x78
a0015e68: eb0002c7 bl a001698c <_Chain_Get>
if ( timer == NULL ) {
a0015e6c: e2501000 subs r1, r0, #0
a0015e70: 1afffff3 bne a0015e44 <_Timer_server_Body+0xb0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015e74: e10f2000 mrs r2, CPSR
a0015e78: e3823080 orr r3, r2, #128 ; 0x80
a0015e7c: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
a0015e80: e59d3018 ldr r3, [sp, #24]
a0015e84: e15a0003 cmp sl, r3
a0015e88: 0a00000f beq a0015ecc <_Timer_server_Body+0x138>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015e8c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a0015e90: eaffffda b a0015e00 <_Timer_server_Body+0x6c> <== NOT EXECUTED
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
a0015e94: e1a00008 mov r0, r8
a0015e98: e3a01001 mov r1, #1
a0015e9c: e0652002 rsb r2, r5, r2
a0015ea0: eb00118d bl a001a4dc <_Watchdog_Adjust>
a0015ea4: eaffffe1 b a0015e30 <_Timer_server_Body+0x9c>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a0015ea8: e1a00006 mov r0, r6
a0015eac: e2811010 add r1, r1, #16
a0015eb0: eb0011e2 bl a001a640 <_Watchdog_Insert>
a0015eb4: eaffffde b a0015e34 <_Timer_server_Body+0xa0>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0015eb8: e0621005 rsb r1, r2, r5
a0015ebc: e1a00008 mov r0, r8
a0015ec0: e1a02007 mov r2, r7
a0015ec4: eb0011b3 bl a001a598 <_Watchdog_Adjust_to_chain>
a0015ec8: eaffffd8 b a0015e30 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
a0015ecc: e5841078 str r1, [r4, #120] ; 0x78
a0015ed0: e129f002 msr CPSR_fc, r2
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
a0015ed4: e59d300c ldr r3, [sp, #12]
a0015ed8: e59d2000 ldr r2, [sp]
a0015edc: e1520003 cmp r2, r3
a0015ee0: 0a000015 beq a0015f3c <_Timer_server_Body+0x1a8>
a0015ee4: e1a05004 mov r5, r4
a0015ee8: e59d4000 ldr r4, [sp]
a0015eec: ea000009 b a0015f18 <_Timer_server_Body+0x184>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
a0015ef0: e5923000 ldr r3, [r2]
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
a0015ef4: e5837004 str r7, [r3, #4]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
a0015ef8: e58d300c str r3, [sp, #12]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
a0015efc: e3a03000 mov r3, #0
a0015f00: e5823008 str r3, [r2, #8]
a0015f04: e129f001 msr CPSR_fc, r1
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
a0015f08: e592301c ldr r3, [r2, #28]
a0015f0c: e5920020 ldr r0, [r2, #32]
a0015f10: e5921024 ldr r1, [r2, #36] ; 0x24
a0015f14: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015f18: e10f1000 mrs r1, CPSR
a0015f1c: e3813080 orr r3, r1, #128 ; 0x80
a0015f20: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a0015f24: e59d200c ldr r2, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0015f28: e1540002 cmp r4, r2
a0015f2c: 1affffef bne a0015ef0 <_Timer_server_Body+0x15c>
a0015f30: e1a04005 mov r4, r5
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015f34: e129f001 msr CPSR_fc, r1
a0015f38: eaffffae b a0015df8 <_Timer_server_Body+0x64>
}
} else {
ts->active = false;
a0015f3c: e3a02000 mov r2, #0
a0015f40: e5c4207c strb r2, [r4, #124] ; 0x7c
a0015f44: e59f204c ldr r2, [pc, #76] ; a0015f98 <_Timer_server_Body+0x204>
a0015f48: e5923000 ldr r3, [r2]
a0015f4c: e2833001 add r3, r3, #1
a0015f50: e5823000 str r3, [r2]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
a0015f54: e3a01008 mov r1, #8
a0015f58: e5940000 ldr r0, [r4]
a0015f5c: eb000ef4 bl a0019b34 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a0015f60: e1a00004 mov r0, r4
a0015f64: ebffff5e bl a0015ce4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a0015f68: e1a00004 mov r0, r4
a0015f6c: ebffff72 bl a0015d3c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a0015f70: eb000c51 bl a00190bc <_Thread_Enable_dispatch>
ts->active = true;
a0015f74: e3a03001 mov r3, #1
a0015f78: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
a0015f7c: e59d0004 ldr r0, [sp, #4]
a0015f80: eb00121b bl a001a7f4 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a0015f84: e59d0008 ldr r0, [sp, #8]
a0015f88: eb001219 bl a001a7f4 <_Watchdog_Remove>
a0015f8c: eaffff99 b a0015df8 <_Timer_server_Body+0x64>
a0008660 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a0008660: 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 ;
a0008664: e59f504c ldr r5, [pc, #76] ; a00086b8 <_User_extensions_Thread_create+0x58>
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a0008668: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
a000866c: e4954004 ldr r4, [r5], #4
a0008670: e1540005 cmp r4, r5
a0008674: 0a00000d beq a00086b0 <_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)(
a0008678: e59f703c ldr r7, [pc, #60] ; a00086bc <_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 ) {
a000867c: e5943014 ldr r3, [r4, #20]
status = (*the_extension->Callouts.thread_create)(
a0008680: 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 ) {
a0008684: e3530000 cmp r3, #0
a0008688: 0a000003 beq a000869c <_User_extensions_Thread_create+0x3c>
status = (*the_extension->Callouts.thread_create)(
a000868c: e5970004 ldr r0, [r7, #4]
a0008690: e12fff33 blx r3
_Thread_Executing,
the_thread
);
if ( !status )
a0008694: e3500000 cmp r0, #0
a0008698: 0a000005 beq a00086b4 <_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 ) {
a000869c: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
a00086a0: e1540005 cmp r4, r5
a00086a4: 1afffff4 bne a000867c <_User_extensions_Thread_create+0x1c>
if ( !status )
return false;
}
}
return true;
a00086a8: e3a00001 mov r0, #1
a00086ac: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00086b0: e3a00001 mov r0, #1 <== NOT EXECUTED
}
a00086b4: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000a640 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000a640: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000a644: e1a04000 mov r4, r0
a000a648: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a64c: e10f3000 mrs r3, CPSR
a000a650: e3832080 orr r2, r3, #128 ; 0x80
a000a654: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a000a658: e1a07000 mov r7, r0
a000a65c: 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 ) ) {
a000a660: e1520007 cmp r2, r7
a000a664: 0a000018 beq a000a6cc <_Watchdog_Adjust+0x8c>
switch ( direction ) {
a000a668: e3510000 cmp r1, #0
a000a66c: 1a000018 bne a000a6d4 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a670: e3550000 cmp r5, #0
a000a674: 0a000014 beq a000a6cc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a678: e5926010 ldr r6, [r2, #16]
a000a67c: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a680: 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 ) {
a000a684: 2a000005 bcs a000a6a0 <_Watchdog_Adjust+0x60>
a000a688: ea000018 b a000a6f0 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a68c: e0555006 subs r5, r5, r6
a000a690: 0a00000d beq a000a6cc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a694: e5926010 ldr r6, [r2, #16]
a000a698: e1560005 cmp r6, r5
a000a69c: 8a000013 bhi a000a6f0 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a6a0: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a6a4: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000a6a8: e1a00004 mov r0, r4
a000a6ac: eb0000aa bl a000a95c <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a6b0: e10f3000 mrs r3, CPSR
a000a6b4: e3832080 orr r2, r3, #128 ; 0x80
a000a6b8: e129f002 msr CPSR_fc, r2
a000a6bc: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000a6c0: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
a000a6c4: e1a02001 mov r2, r1
a000a6c8: 1affffef bne a000a68c <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a6cc: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a6d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000a6d4: e3510001 cmp r1, #1
a000a6d8: 1afffffb bne a000a6cc <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000a6dc: e5921010 ldr r1, [r2, #16]
a000a6e0: e0815005 add r5, r1, r5
a000a6e4: e5825010 str r5, [r2, #16]
a000a6e8: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a6ec: 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;
a000a6f0: e0655006 rsb r5, r5, r6
a000a6f4: e5825010 str r5, [r2, #16]
break;
a000a6f8: eafffff3 b a000a6cc <_Watchdog_Adjust+0x8c>
a0021984 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
a0021984: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0021988: e24dd00c sub sp, sp, #12
a002198c: e1a04000 mov r4, r0
a0021990: e1a05001 mov r5, r1
a0021994: e1a07002 mov r7, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
a0021998: ebffff37 bl a002167c <getpid>
a002199c: e1500004 cmp r0, r4
a00219a0: 1a000096 bne a0021c00 <killinfo+0x27c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
a00219a4: e3550000 cmp r5, #0
a00219a8: 0a000099 beq a0021c14 <killinfo+0x290>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a00219ac: e2454001 sub r4, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a00219b0: e354001f cmp r4, #31
a00219b4: 8a000096 bhi a0021c14 <killinfo+0x290>
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 )
a00219b8: e59f6280 ldr r6, [pc, #640] ; a0021c40 <killinfo+0x2bc>
a00219bc: e3a0300c mov r3, #12
a00219c0: e0236395 mla r3, r5, r3, r6
a00219c4: e5933008 ldr r3, [r3, #8]
a00219c8: e3530001 cmp r3, #1
return 0;
a00219cc: 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 )
a00219d0: 0a000039 beq a0021abc <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 ) )
a00219d4: e3550008 cmp r5, #8
a00219d8: 13550004 cmpne r5, #4
a00219dc: 0a000038 beq a0021ac4 <killinfo+0x140>
a00219e0: e355000b cmp r5, #11
a00219e4: 0a000036 beq a0021ac4 <killinfo+0x140>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a00219e8: e3a03001 mov r3, #1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
a00219ec: e3570000 cmp r7, #0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
a00219f0: e58d3004 str r3, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
a00219f4: e58d5000 str r5, [sp]
a00219f8: e1a04413 lsl r4, r3, r4
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
a00219fc: 15973000 ldrne r3, [r7]
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
a0021a00: 058d7008 streq r7, [sp, #8]
} else {
siginfo->si_value = *value;
a0021a04: 158d3008 strne r3, [sp, #8]
a0021a08: e59f3234 ldr r3, [pc, #564] ; a0021c44 <killinfo+0x2c0>
a0021a0c: e5932000 ldr r2, [r3]
a0021a10: e2822001 add r2, r2, #1
a0021a14: 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;
a0021a18: e59f3228 ldr r3, [pc, #552] ; a0021c48 <killinfo+0x2c4>
a0021a1c: e5930004 ldr r0, [r3, #4]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
a0021a20: e5903108 ldr r3, [r0, #264] ; 0x108
a0021a24: e59330d0 ldr r3, [r3, #208] ; 0xd0
a0021a28: e1d43003 bics r3, r4, r3
a0021a2c: 1a000014 bne a0021a84 <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 ;
a0021a30: e59fc214 ldr ip, [pc, #532] ; a0021c4c <killinfo+0x2c8>
a0021a34: e49c3004 ldr r3, [ip], #4
a0021a38: e153000c cmp r3, ip
a0021a3c: 0a000033 beq a0021b10 <killinfo+0x18c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021a40: 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;
a0021a44: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0021a48: e5931108 ldr r1, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021a4c: e1140002 tst r4, r2
a0021a50: 0a000008 beq a0021a78 <killinfo+0xf4>
a0021a54: ea00000a b a0021a84 <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 ) {
a0021a58: 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 ;
a0021a5c: e153000c cmp r3, ip
a0021a60: 0a00002a beq a0021b10 <killinfo+0x18c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021a64: 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 ];
a0021a68: 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;
a0021a6c: e1a00003 mov r0, r3 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0021a70: e1140002 tst r4, r2 <== NOT EXECUTED
a0021a74: 1a000002 bne a0021a84 <killinfo+0x100> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
a0021a78: e59120d0 ldr r2, [r1, #208] ; 0xd0
a0021a7c: e1d42002 bics r2, r4, r2
a0021a80: 0afffff4 beq a0021a58 <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 ) ) {
a0021a84: e1a01005 mov r1, r5
a0021a88: e1a0200d mov r2, sp
a0021a8c: eb00007d bl a0021c88 <_POSIX_signals_Unblock_thread>
a0021a90: e3500000 cmp r0, #0
a0021a94: 1a000006 bne a0021ab4 <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 );
a0021a98: e1a00004 mov r0, r4
a0021a9c: eb00006f bl a0021c60 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
a0021aa0: e3a0300c mov r3, #12
a0021aa4: e0050593 mul r5, r3, r5
a0021aa8: e7963005 ldr r3, [r6, r5]
a0021aac: e3530002 cmp r3, #2
a0021ab0: 0a000007 beq a0021ad4 <killinfo+0x150>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
a0021ab4: ebffac81 bl a000ccc0 <_Thread_Enable_dispatch>
return 0;
a0021ab8: e3a00000 mov r0, #0
}
a0021abc: e28dd00c add sp, sp, #12
a0021ac0: 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 );
a0021ac4: eb0000fb bl a0021eb8 <pthread_self>
a0021ac8: e1a01005 mov r1, r5
a0021acc: eb0000c0 bl a0021dd4 <pthread_kill>
a0021ad0: eafffff9 b a0021abc <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 );
a0021ad4: e59f0174 ldr r0, [pc, #372] ; a0021c50 <killinfo+0x2cc>
a0021ad8: ebffa676 bl a000b4b8 <_Chain_Get>
if ( !psiginfo ) {
a0021adc: e2501000 subs r1, r0, #0
a0021ae0: 0a000050 beq a0021c28 <killinfo+0x2a4>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a0021ae4: e28d3004 add r3, sp, #4
a0021ae8: e4932004 ldr r2, [r3], #4
a0021aec: e59d0000 ldr r0, [sp]
a0021af0: e5933000 ldr r3, [r3]
a0021af4: e5810008 str r0, [r1, #8]
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a0021af8: e59f0154 ldr r0, [pc, #340] ; a0021c54 <killinfo+0x2d0>
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a0021afc: e581200c str r2, [r1, #12]
a0021b00: e5813010 str r3, [r1, #16]
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a0021b04: e0800005 add r0, r0, r5
a0021b08: ebffa657 bl a000b46c <_Chain_Append>
a0021b0c: eaffffe8 b a0021ab4 <killinfo+0x130>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a0021b10: e59f3140 ldr r3, [pc, #320] ; a0021c58 <killinfo+0x2d4>
a0021b14: e59fa140 ldr sl, [pc, #320] ; a0021c5c <killinfo+0x2d8>
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
a0021b18: e3a00000 mov r0, #0
interested_priority = PRIORITY_MAXIMUM + 1;
a0021b1c: e5d3e000 ldrb lr, [r3]
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
a0021b20: e28a9008 add r9, sl, #8
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a0021b24: 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 ] )
a0021b28: e5ba3004 ldr r3, [sl, #4]!
a0021b2c: e3530000 cmp r3, #0
a0021b30: 0a000022 beq a0021bc0 <killinfo+0x23c>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
a0021b34: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
a0021b38: e1d371b0 ldrh r7, [r3, #16]
object_table = the_info->local_table;
a0021b3c: e593101c ldr r1, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
a0021b40: e3570000 cmp r7, #0
a0021b44: 0a00001d beq a0021bc0 <killinfo+0x23c>
a0021b48: e3a02001 mov r2, #1
the_thread = (Thread_Control *) object_table[ index ];
a0021b4c: e5b13004 ldr r3, [r1, #4]!
if ( !the_thread )
a0021b50: e3530000 cmp r3, #0
a0021b54: 0a000016 beq a0021bb4 <killinfo+0x230>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
a0021b58: e593c014 ldr ip, [r3, #20]
a0021b5c: e15c000e cmp ip, lr
a0021b60: 8a000013 bhi a0021bb4 <killinfo+0x230>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
a0021b64: e5938108 ldr r8, [r3, #264] ; 0x108
a0021b68: e59880d0 ldr r8, [r8, #208] ; 0xd0
a0021b6c: e1d48008 bics r8, r4, r8
a0021b70: 0a00000f beq a0021bb4 <killinfo+0x230>
*
* 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 ) {
a0021b74: e15c000e cmp ip, lr
a0021b78: 3a00001a bcc a0021be8 <killinfo+0x264>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
a0021b7c: e3500000 cmp r0, #0
a0021b80: 0a00000b beq a0021bb4 <killinfo+0x230>
a0021b84: e5908010 ldr r8, [r0, #16]
a0021b88: e3580000 cmp r8, #0
a0021b8c: 0a000008 beq a0021bb4 <killinfo+0x230>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a0021b90: e593b010 ldr fp, [r3, #16]
a0021b94: e35b0000 cmp fp, #0
a0021b98: 0a000012 beq a0021be8 <killinfo+0x264>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
a0021b9c: e3180201 tst r8, #268435456 ; 0x10000000
a0021ba0: 1a000003 bne a0021bb4 <killinfo+0x230>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
a0021ba4: e20bb201 and fp, fp, #268435456 ; 0x10000000
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
a0021ba8: e35b0000 cmp fp, #0
a0021bac: 11a0e00c movne lr, ip
a0021bb0: 11a00003 movne r0, r3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a0021bb4: e2822001 add r2, r2, #1
a0021bb8: e1570002 cmp r7, r2
a0021bbc: 2affffe2 bcs a0021b4c <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++) {
a0021bc0: e15a0009 cmp sl, r9
a0021bc4: 1affffd7 bne a0021b28 <killinfo+0x1a4>
}
}
}
}
if ( interested ) {
a0021bc8: e3500000 cmp r0, #0
a0021bcc: 0affffb1 beq a0021a98 <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 ) ) {
a0021bd0: e1a01005 mov r1, r5
a0021bd4: e1a0200d mov r2, sp
a0021bd8: eb00002a bl a0021c88 <_POSIX_signals_Unblock_thread>
a0021bdc: e3500000 cmp r0, #0
a0021be0: 0affffac beq a0021a98 <killinfo+0x114>
a0021be4: eaffffb2 b a0021ab4 <killinfo+0x130> <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a0021be8: e2822001 add r2, r2, #1
a0021bec: e1570002 cmp r7, r2
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a0021bf0: e1a0e00c mov lr, ip
a0021bf4: e1a00003 mov r0, r3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a0021bf8: 2affffd3 bcs a0021b4c <killinfo+0x1c8>
a0021bfc: eaffffef b a0021bc0 <killinfo+0x23c>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
a0021c00: ebffc534 bl a00130d8 <__errno>
a0021c04: e3a03003 mov r3, #3
a0021c08: e5803000 str r3, [r0]
a0021c0c: e3e00000 mvn r0, #0
a0021c10: eaffffa9 b a0021abc <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 );
a0021c14: ebffc52f bl a00130d8 <__errno>
a0021c18: e3a03016 mov r3, #22
a0021c1c: e5803000 str r3, [r0]
a0021c20: e3e00000 mvn r0, #0
a0021c24: eaffffa4 b a0021abc <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();
a0021c28: ebffac24 bl a000ccc0 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
a0021c2c: ebffc529 bl a00130d8 <__errno>
a0021c30: e3a0300b mov r3, #11
a0021c34: e5803000 str r3, [r0]
a0021c38: e3e00000 mvn r0, #0
a0021c3c: eaffff9e b a0021abc <killinfo+0x138>
a000a79c <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
a000a79c: e3500000 cmp r0, #0
a000a7a0: 0a00000e beq a000a7e0 <pthread_attr_setschedpolicy+0x44>
a000a7a4: e5903000 ldr r3, [r0]
a000a7a8: e3530000 cmp r3, #0
a000a7ac: 0a00000b beq a000a7e0 <pthread_attr_setschedpolicy+0x44>
return EINVAL;
switch ( policy ) {
a000a7b0: e3510004 cmp r1, #4
a000a7b4: 9a000001 bls a000a7c0 <pthread_attr_setschedpolicy+0x24>
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a000a7b8: e3a00086 mov r0, #134 ; 0x86
}
}
a000a7bc: e12fff1e bx lr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a000a7c0: e3a03001 mov r3, #1
a000a7c4: e1a03113 lsl r3, r3, r1
a000a7c8: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
a000a7cc: 15801014 strne r1, [r0, #20]
return 0;
a000a7d0: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a000a7d4: 112fff1e bxne lr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a000a7d8: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
a000a7dc: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000a7e0: e3a00016 mov r0, #22
a000a7e4: e12fff1e bx lr
a00064c8 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a00064c8: 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;
a00064cc: e59f60ac ldr r6, [pc, #172] ; a0006580 <pthread_cond_init+0xb8>
a00064d0: e3510000 cmp r1, #0
a00064d4: 11a06001 movne r6, r1
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a00064d8: e5963004 ldr r3, [r6, #4]
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a00064dc: e1a05000 mov r5, r0
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a00064e0: e3530001 cmp r3, #1
a00064e4: 0a000020 beq a000656c <pthread_cond_init+0xa4>
return EINVAL;
if ( !the_attr->is_initialized )
a00064e8: e5963000 ldr r3, [r6]
a00064ec: e3530000 cmp r3, #0
a00064f0: 1a000001 bne a00064fc <pthread_cond_init+0x34>
return EINVAL;
a00064f4: e3a00016 mov r0, #22
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a00064f8: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a00064fc: e59f3080 ldr r3, [pc, #128] ; a0006584 <pthread_cond_init+0xbc>
a0006500: e5932000 ldr r2, [r3]
a0006504: e2822001 add r2, r2, #1
a0006508: 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 );
a000650c: e59f7074 ldr r7, [pc, #116] ; a0006588 <pthread_cond_init+0xc0>
a0006510: e1a00007 mov r0, r7
a0006514: eb000998 bl a0008b7c <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
a0006518: e2504000 subs r4, r0, #0
a000651c: 0a000014 beq a0006574 <pthread_cond_init+0xac>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a0006520: e5963004 ldr r3, [r6, #4]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
a0006524: e3a02201 mov r2, #268435456 ; 0x10000000
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a0006528: e3a06000 mov r6, #0
_Thread_queue_Initialize(
a000652c: e2840018 add r0, r4, #24
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a0006530: e5843010 str r3, [r4, #16]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
a0006534: e1a01006 mov r1, r6
a0006538: e2822b02 add r2, r2, #2048 ; 0x800
a000653c: e3a03074 mov r3, #116 ; 0x74
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a0006540: e5846014 str r6, [r4, #20]
_Thread_queue_Initialize(
a0006544: eb000ef9 bl a000a130 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a0006548: e5943008 ldr r3, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000654c: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a0006550: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0006554: 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;
a0006558: e584600c str r6, [r4, #12]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
a000655c: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a0006560: eb000ced bl a000991c <_Thread_Enable_dispatch>
return 0;
a0006564: e1a00006 mov r0, r6
a0006568: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
a000656c: e3a00016 mov r0, #22 <== NOT EXECUTED
a0006570: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
a0006574: eb000ce8 bl a000991c <_Thread_Enable_dispatch>
return ENOMEM;
a0006578: e3a0000c mov r0, #12
a000657c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0007580 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
a0007580: e3500000 cmp r0, #0
a0007584: 0a000008 beq a00075ac <pthread_mutexattr_setpshared+0x2c>
a0007588: e5903000 ldr r3, [r0]
a000758c: e3530000 cmp r3, #0
a0007590: 0a000005 beq a00075ac <pthread_mutexattr_setpshared+0x2c>
return EINVAL;
switch ( pshared ) {
a0007594: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a0007598: 95801004 strls r1, [r0, #4]
return 0;
a000759c: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a00075a0: 912fff1e bxls lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a00075a4: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a00075a8: e12fff1e bx lr <== NOT EXECUTED
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a00075ac: e3a00016 mov r0, #22
a00075b0: e12fff1e bx lr
a0006870 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a0006870: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a0006874: e2505000 subs r5, r0, #0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a0006878: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000687c: 0a00001d beq a00068f8 <pthread_rwlock_timedrdlock+0x88>
*
* 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 );
a0006880: e1a00001 mov r0, r1
a0006884: e28d1004 add r1, sp, #4
a0006888: eb0019d4 bl a000cfe0 <_POSIX_Absolute_timeout_to_ticks>
a000688c: e5951000 ldr r1, [r5]
a0006890: e1a04000 mov r4, r0
a0006894: e28d2008 add r2, sp, #8
a0006898: e59f0098 ldr r0, [pc, #152] ; a0006938 <pthread_rwlock_timedrdlock+0xc8>
a000689c: eb000aac bl a0009354 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a00068a0: e59d3008 ldr r3, [sp, #8]
a00068a4: e3530000 cmp r3, #0
a00068a8: 1a000012 bne a00068f8 <pthread_rwlock_timedrdlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a00068ac: e5951000 ldr r1, [r5]
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
a00068b0: e3540003 cmp r4, #3
a00068b4: 13a05000 movne r5, #0
a00068b8: 03a05001 moveq r5, #1
a00068bc: e58d3000 str r3, [sp]
a00068c0: e2800010 add r0, r0, #16
a00068c4: e1a02005 mov r2, r5
a00068c8: e59d3004 ldr r3, [sp, #4]
a00068cc: eb000736 bl a00085ac <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a00068d0: eb000cd2 bl a0009c20 <_Thread_Enable_dispatch>
if ( !do_wait ) {
a00068d4: e3550000 cmp r5, #0
a00068d8: 1a000011 bne a0006924 <pthread_rwlock_timedrdlock+0xb4>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
a00068dc: e59f3058 ldr r3, [pc, #88] ; a000693c <pthread_rwlock_timedrdlock+0xcc>
a00068e0: e5933004 ldr r3, [r3, #4]
a00068e4: e5930034 ldr r0, [r3, #52] ; 0x34
a00068e8: e3500002 cmp r0, #2
a00068ec: 0a000004 beq a0006904 <pthread_rwlock_timedrdlock+0x94>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a00068f0: eb000046 bl a0006a10 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a00068f4: ea000000 b a00068fc <pthread_rwlock_timedrdlock+0x8c>
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
a00068f8: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a00068fc: e28dd00c add sp, sp, #12
a0006900: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a0006904: e3540000 cmp r4, #0
a0006908: 0afffffa beq a00068f8 <pthread_rwlock_timedrdlock+0x88>
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000690c: e2444001 sub r4, r4, #1
a0006910: e3540001 cmp r4, #1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a0006914: 93a00074 movls r0, #116 ; 0x74
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a0006918: 9afffff7 bls a00068fc <pthread_rwlock_timedrdlock+0x8c>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000691c: eb00003b bl a0006a10 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a0006920: eafffff5 b a00068fc <pthread_rwlock_timedrdlock+0x8c> <== NOT EXECUTED
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
a0006924: e59f3010 ldr r3, [pc, #16] ; a000693c <pthread_rwlock_timedrdlock+0xcc>
a0006928: e5933004 ldr r3, [r3, #4]
a000692c: e5930034 ldr r0, [r3, #52] ; 0x34
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a0006930: eb000036 bl a0006a10 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a0006934: eafffff0 b a00068fc <pthread_rwlock_timedrdlock+0x8c>
a0006940 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a0006940: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a0006944: e2505000 subs r5, r0, #0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a0006948: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000694c: 0a00001d beq a00069c8 <pthread_rwlock_timedwrlock+0x88>
*
* 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 );
a0006950: e1a00001 mov r0, r1
a0006954: e28d1004 add r1, sp, #4
a0006958: eb0019a0 bl a000cfe0 <_POSIX_Absolute_timeout_to_ticks>
a000695c: e5951000 ldr r1, [r5]
a0006960: e1a04000 mov r4, r0
a0006964: e28d2008 add r2, sp, #8
a0006968: e59f0098 ldr r0, [pc, #152] ; a0006a08 <pthread_rwlock_timedwrlock+0xc8>
a000696c: eb000a78 bl a0009354 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a0006970: e59d3008 ldr r3, [sp, #8]
a0006974: e3530000 cmp r3, #0
a0006978: 1a000012 bne a00069c8 <pthread_rwlock_timedwrlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a000697c: e5951000 ldr r1, [r5]
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
a0006980: e3540003 cmp r4, #3
a0006984: 13a05000 movne r5, #0
a0006988: 03a05001 moveq r5, #1
a000698c: e58d3000 str r3, [sp]
a0006990: e2800010 add r0, r0, #16
a0006994: e1a02005 mov r2, r5
a0006998: e59d3004 ldr r3, [sp, #4]
a000699c: eb000739 bl a0008688 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a00069a0: eb000c9e bl a0009c20 <_Thread_Enable_dispatch>
if ( !do_wait &&
a00069a4: e3550000 cmp r5, #0
a00069a8: 1a000011 bne a00069f4 <pthread_rwlock_timedwrlock+0xb4>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
a00069ac: e59f3058 ldr r3, [pc, #88] ; a0006a0c <pthread_rwlock_timedwrlock+0xcc>
a00069b0: e5933004 ldr r3, [r3, #4]
a00069b4: e5930034 ldr r0, [r3, #52] ; 0x34
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
a00069b8: e3500002 cmp r0, #2
a00069bc: 0a000004 beq a00069d4 <pthread_rwlock_timedwrlock+0x94>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a00069c0: eb000012 bl a0006a10 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a00069c4: ea000000 b a00069cc <pthread_rwlock_timedwrlock+0x8c>
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
a00069c8: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a00069cc: e28dd00c add sp, sp, #12
a00069d0: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a00069d4: e3540000 cmp r4, #0
a00069d8: 0afffffa beq a00069c8 <pthread_rwlock_timedwrlock+0x88>
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a00069dc: e2444001 sub r4, r4, #1
a00069e0: e3540001 cmp r4, #1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a00069e4: 93a00074 movls r0, #116 ; 0x74
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a00069e8: 9afffff7 bls a00069cc <pthread_rwlock_timedwrlock+0x8c>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a00069ec: eb000007 bl a0006a10 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a00069f0: eafffff5 b a00069cc <pthread_rwlock_timedwrlock+0x8c> <== NOT EXECUTED
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
a00069f4: e59f3010 ldr r3, [pc, #16] ; a0006a0c <pthread_rwlock_timedwrlock+0xcc>
a00069f8: e5933004 ldr r3, [r3, #4]
a00069fc: e5930034 ldr r0, [r3, #52] ; 0x34
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a0006a00: eb000002 bl a0006a10 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a0006a04: eafffff0 b a00069cc <pthread_rwlock_timedwrlock+0x8c>
a00071a0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
a00071a0: e3500000 cmp r0, #0
a00071a4: 0a000008 beq a00071cc <pthread_rwlockattr_setpshared+0x2c>
return EINVAL;
if ( !attr->is_initialized )
a00071a8: e5903000 ldr r3, [r0]
a00071ac: e3530000 cmp r3, #0
a00071b0: 0a000005 beq a00071cc <pthread_rwlockattr_setpshared+0x2c>
return EINVAL;
switch ( pshared ) {
a00071b4: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a00071b8: 95801004 strls r1, [r0, #4]
return 0;
a00071bc: 93a00000 movls r0, #0
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a00071c0: 912fff1e bxls lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a00071c4: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a00071c8: e12fff1e bx lr <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a00071cc: e3a00016 mov r0, #22
a00071d0: e12fff1e bx lr
a0005b70 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
a0005b70: 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() )
a0005b74: e59f4058 ldr r4, [pc, #88] ; a0005bd4 <pthread_testcancel+0x64>
a0005b78: e5943000 ldr r3, [r4]
a0005b7c: e3530000 cmp r3, #0
a0005b80: 1a000010 bne a0005bc8 <pthread_testcancel+0x58>
a0005b84: e59f304c ldr r3, [pc, #76] ; a0005bd8 <pthread_testcancel+0x68>
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0005b88: e5942004 ldr r2, [r4, #4]
a0005b8c: e5931000 ldr r1, [r3]
a0005b90: e5922108 ldr r2, [r2, #264] ; 0x108
a0005b94: e2811001 add r1, r1, #1
a0005b98: e5831000 str r1, [r3]
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
a0005b9c: e59230d8 ldr r3, [r2, #216] ; 0xd8
a0005ba0: e3530000 cmp r3, #0
a0005ba4: 1a000008 bne a0005bcc <pthread_testcancel+0x5c>
a0005ba8: e59230e0 ldr r3, [r2, #224] ; 0xe0
a0005bac: e3530000 cmp r3, #0
a0005bb0: 0a000005 beq a0005bcc <pthread_testcancel+0x5c>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a0005bb4: eb0009c0 bl a00082bc <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a0005bb8: e5940004 ldr r0, [r4, #4]
a0005bbc: e3e01000 mvn r1, #0
}
a0005bc0: e8bd4010 pop {r4, lr}
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a0005bc4: ea0017a1 b a000ba50 <_POSIX_Thread_Exit>
a0005bc8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
a0005bcc: e8bd4010 pop {r4, lr}
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a0005bd0: ea0009b9 b a00082bc <_Thread_Enable_dispatch>
a00060f0 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a00060f0: e92d4030 push {r4, r5, lr}
a00060f4: e1a04002 mov r4, r2
a00060f8: e1a05003 mov r5, r3
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
a00060fc: eb000148 bl a0006624 <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
a0006100: e3500000 cmp r0, #0
a0006104: 1a000000 bne a000610c <rtems_chain_append_with_notification+0x1c>
sc = rtems_event_send( task, events );
}
return sc;
}
a0006108: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
a000610c: e1a00004 mov r0, r4
a0006110: e1a01005 mov r1, r5
}
return sc;
}
a0006114: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
a0006118: eafffd89 b a0005744 <rtems_event_send>
a000611c <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
a000611c: e92d4030 push {r4, r5, lr}
a0006120: e1a04001 mov r4, r1
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
a0006124: e1a01003 mov r1, r3
a0006128: e1a05002 mov r5, r2
a000612c: eb000161 bl a00066b8 <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
a0006130: e3500000 cmp r0, #0
a0006134: 1a000000 bne a000613c <rtems_chain_get_with_notification+0x20>
sc = rtems_event_send( task, events );
}
return sc;
}
a0006138: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
a000613c: e1a00004 mov r0, r4
a0006140: e1a01005 mov r1, r5
}
return sc;
}
a0006144: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
a0006148: eafffd7d b a0005744 <rtems_event_send>
a00061a8 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a00061a8: e92d4030 push {r4, r5, lr}
a00061ac: e1a04002 mov r4, r2
a00061b0: e1a05003 mov r5, r3
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
a00061b4: eb00016b bl a0006768 <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
a00061b8: e3500000 cmp r0, #0
a00061bc: 1a000000 bne a00061c4 <rtems_chain_prepend_with_notification+0x1c>
sc = rtems_event_send( task, events );
}
return sc;
}
a00061c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
a00061c4: e1a00004 mov r0, r4
a00061c8: e1a01005 mov r1, r5
}
return sc;
}
a00061cc: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
a00061d0: eafffd5b b a0005744 <rtems_event_send>
a0006df4 <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
)
{
a0006df4: e92d4030 push {r4, r5, lr}
a0006df8: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a0006dfc: e59f014c ldr r0, [pc, #332] ; a0006f50 <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;
a0006e00: e59f314c ldr r3, [pc, #332] ; a0006f54 <rtems_io_register_driver+0x160>
if ( rtems_interrupt_is_in_progress() )
a0006e04: e5900000 ldr r0, [r0]
a0006e08: 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;
a0006e0c: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
a0006e10: 1a000033 bne a0006ee4 <rtems_io_register_driver+0xf0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
a0006e14: e3520000 cmp r2, #0
a0006e18: 0a000041 beq a0006f24 <rtems_io_register_driver+0x130>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a0006e1c: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a0006e20: e5820000 str r0, [r2]
if ( driver_table == NULL )
a0006e24: 0a00003e beq a0006f24 <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;
a0006e28: e591c000 ldr ip, [r1]
a0006e2c: e35c0000 cmp ip, #0
a0006e30: 0a000038 beq a0006f18 <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 )
a0006e34: e1500004 cmp r0, r4
a0006e38: 9a000027 bls a0006edc <rtems_io_register_driver+0xe8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0006e3c: e59f0114 ldr r0, [pc, #276] ; a0006f58 <rtems_io_register_driver+0x164>
a0006e40: e590c000 ldr ip, [r0]
a0006e44: e28cc001 add ip, ip, #1
a0006e48: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a0006e4c: e3540000 cmp r4, #0
a0006e50: 1a000025 bne a0006eec <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;
a0006e54: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a0006e58: e35c0000 cmp ip, #0
a0006e5c: 0a000032 beq a0006f2c <rtems_io_register_driver+0x138>
a0006e60: e59fe0f4 ldr lr, [pc, #244] ; a0006f5c <rtems_io_register_driver+0x168>
a0006e64: e59e3000 ldr r3, [lr]
a0006e68: ea000003 b a0006e7c <rtems_io_register_driver+0x88>
a0006e6c: e2844001 add r4, r4, #1
a0006e70: e15c0004 cmp ip, r4
a0006e74: e2833018 add r3, r3, #24
a0006e78: 9a000005 bls a0006e94 <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;
a0006e7c: e5930000 ldr r0, [r3]
a0006e80: e3500000 cmp r0, #0
a0006e84: 1afffff8 bne a0006e6c <rtems_io_register_driver+0x78>
a0006e88: e5930004 ldr r0, [r3, #4]
a0006e8c: e3500000 cmp r0, #0
a0006e90: 1afffff5 bne a0006e6c <rtems_io_register_driver+0x78>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a0006e94: e15c0004 cmp ip, r4
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0006e98: e5824000 str r4, [r2]
if ( m != n )
a0006e9c: 0a000023 beq a0006f30 <rtems_io_register_driver+0x13c>
a0006ea0: e3a0c018 mov ip, #24
a0006ea4: e00c0c94 mul ip, r4, ip
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a0006ea8: e59e5000 ldr r5, [lr]
a0006eac: e1a0e001 mov lr, r1
a0006eb0: e8be000f ldm lr!, {r0, r1, r2, r3}
a0006eb4: e085c00c add ip, r5, ip
a0006eb8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006ebc: e89e0003 ldm lr, {r0, r1}
a0006ec0: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
a0006ec4: eb0006b5 bl a00089a0 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a0006ec8: e3a01000 mov r1, #0
a0006ecc: e1a00004 mov r0, r4
a0006ed0: e1a02001 mov r2, r1
}
a0006ed4: e8bd4030 pop {r4, r5, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a0006ed8: ea00212b b a000f38c <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
a0006edc: e3a0000a mov r0, #10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
a0006ee0: 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;
a0006ee4: e3a00012 mov r0, #18
a0006ee8: 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;
a0006eec: e59fe068 ldr lr, [pc, #104] ; a0006f5c <rtems_io_register_driver+0x168>
a0006ef0: e3a0c018 mov ip, #24
a0006ef4: e00c0c94 mul ip, r4, ip
a0006ef8: 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;
a0006efc: 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;
a0006f00: 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;
a0006f04: e3500000 cmp r0, #0
a0006f08: 0a00000b beq a0006f3c <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();
a0006f0c: eb0006a3 bl a00089a0 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
a0006f10: e3a0000c mov r0, #12
a0006f14: 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;
a0006f18: e591c004 ldr ip, [r1, #4]
a0006f1c: e35c0000 cmp ip, #0
a0006f20: 1affffc3 bne a0006e34 <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;
a0006f24: e3a00009 mov r0, #9
a0006f28: e8bd8030 pop {r4, r5, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0006f2c: 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();
a0006f30: eb00069a bl a00089a0 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
a0006f34: 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;
a0006f38: 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;
a0006f3c: e5933004 ldr r3, [r3, #4]
a0006f40: e3530000 cmp r3, #0
a0006f44: 1afffff0 bne a0006f0c <rtems_io_register_driver+0x118>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a0006f48: e5824000 str r4, [r2]
a0006f4c: eaffffd5 b a0006ea8 <rtems_io_register_driver+0xb4>
a0005814 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a0005814: e3500001 cmp r0, #1
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
a0005818: 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 )
a000581c: 0a00000d beq a0005858 <rtems_object_get_api_class_name+0x44>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
a0005820: e3500002 cmp r0, #2
a0005824: 0a000004 beq a000583c <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 )
a0005828: e3500003 cmp r0, #3
api_assoc = rtems_object_api_posix_assoc;
a000582c: 059f003c ldreq r0, [pc, #60] ; a0005870 <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 )
a0005830: 0a000002 beq a0005840 <rtems_object_get_api_class_name+0x2c>
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
a0005834: e59f0038 ldr r0, [pc, #56] ; a0005874 <rtems_object_get_api_class_name+0x60>
a0005838: 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;
a000583c: e59f0034 ldr r0, [pc, #52] ; a0005878 <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 );
a0005840: eb001352 bl a000a590 <rtems_assoc_ptr_by_local>
if ( class_assoc )
a0005844: e3500000 cmp r0, #0
return class_assoc->name;
a0005848: 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 )
a000584c: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
return class_assoc->name;
return "BAD CLASS";
a0005850: e59f0024 ldr r0, [pc, #36] ; a000587c <rtems_object_get_api_class_name+0x68>
}
a0005854: 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;
a0005858: e59f0020 ldr r0, [pc, #32] ; a0005880 <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 );
a000585c: eb00134b bl a000a590 <rtems_assoc_ptr_by_local>
if ( class_assoc )
a0005860: e3500000 cmp r0, #0
return class_assoc->name;
a0005864: 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 )
a0005868: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
a000586c: eafffff7 b a0005850 <rtems_object_get_api_class_name+0x3c> <== NOT EXECUTED
a000d494 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000d494: 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 )
a000d498: e2525000 subs r5, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000d49c: e1a04000 mov r4, r0
a000d4a0: 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 )
a000d4a4: 0a000053 beq a000d5f8 <rtems_task_mode+0x164>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
a000d4a8: e59f9158 ldr r9, [pc, #344] ; a000d608 <rtems_task_mode+0x174>
a000d4ac: e5997004 ldr r7, [r9, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a000d4b0: e5978104 ldr r8, [r7, #260] ; 0x104
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a000d4b4: e5d7a074 ldrb sl, [r7, #116] ; 0x74
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000d4b8: 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;
a000d4bc: 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;
a000d4c0: e35a0000 cmp sl, #0
a000d4c4: 03a0ac01 moveq sl, #256 ; 0x100
a000d4c8: 13a0a000 movne sl, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000d4cc: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
a000d4d0: 138aac02 orrne sl, sl, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000d4d4: e35b0000 cmp fp, #0
a000d4d8: 03a0bb01 moveq fp, #1024 ; 0x400
a000d4dc: 13a0b000 movne fp, #0
old_mode |= _ISR_Get_level();
a000d4e0: ebffee7f bl a0008ee4 <_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;
a000d4e4: e18bb000 orr fp, fp, r0
old_mode |= _ISR_Get_level();
a000d4e8: e18ba00a orr sl, fp, sl
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000d4ec: 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;
a000d4f0: e585a000 str sl, [r5]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000d4f4: 0a000003 beq a000d508 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
a000d4f8: e3140c01 tst r4, #256 ; 0x100
a000d4fc: 13a03000 movne r3, #0
a000d500: 03a03001 moveq r3, #1
a000d504: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
a000d508: e3160c02 tst r6, #512 ; 0x200
a000d50c: 1a00001c bne a000d584 <rtems_task_mode+0xf0>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000d510: e3160080 tst r6, #128 ; 0x80
a000d514: 1a000023 bne a000d5a8 <rtems_task_mode+0x114>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
a000d518: e2166b01 ands r6, r6, #1024 ; 0x400
a000d51c: 0a000012 beq a000d56c <rtems_task_mode+0xd8>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a000d520: e5d82008 ldrb r2, [r8, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
a000d524: e3140b01 tst r4, #1024 ; 0x400
a000d528: 13a03000 movne r3, #0
a000d52c: 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 ) {
a000d530: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000d534: 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 ) {
a000d538: 0a00000b beq a000d56c <rtems_task_mode+0xd8>
asr->is_enabled = is_asr_enabled;
a000d53c: e5c83008 strb r3, [r8, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000d540: e10f3000 mrs r3, CPSR
a000d544: e3832080 orr r2, r3, #128 ; 0x80
a000d548: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
a000d54c: e5981018 ldr r1, [r8, #24]
information->signals_pending = information->signals_posted;
a000d550: e5982014 ldr r2, [r8, #20]
information->signals_posted = _signals;
a000d554: 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;
a000d558: e5882018 str r2, [r8, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000d55c: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
a000d560: e5986014 ldr r6, [r8, #20]
a000d564: e3560000 cmp r6, #0
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000d568: 13a06001 movne r6, #1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a000d56c: e59f3098 ldr r3, [pc, #152] ; a000d60c <rtems_task_mode+0x178>
a000d570: e5933000 ldr r3, [r3]
a000d574: e3530003 cmp r3, #3
a000d578: 0a00000d beq a000d5b4 <rtems_task_mode+0x120>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000d57c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000d580: 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) ) {
a000d584: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a000d588: 13a03001 movne r3, #1
a000d58c: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000d590: 159f3078 ldrne r3, [pc, #120] ; a000d610 <rtems_task_mode+0x17c>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a000d594: 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;
a000d598: 15933000 ldrne r3, [r3]
a000d59c: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000d5a0: e3160080 tst r6, #128 ; 0x80
a000d5a4: 0affffdb beq a000d518 <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 ) );
a000d5a8: e2040080 and r0, r4, #128 ; 0x80
a000d5ac: ebffee47 bl a0008ed0 <_CPU_ISR_Set_level>
a000d5b0: eaffffd8 b a000d518 <rtems_task_mode+0x84>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
a000d5b4: e3560000 cmp r6, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a000d5b8: e5993004 ldr r3, [r9, #4]
if ( are_signals_pending ||
a000d5bc: 1a000008 bne a000d5e4 <rtems_task_mode+0x150>
a000d5c0: e59f2040 ldr r2, [pc, #64] ; a000d608 <rtems_task_mode+0x174>
a000d5c4: e5922008 ldr r2, [r2, #8]
a000d5c8: e1530002 cmp r3, r2
a000d5cc: 0a00000b beq a000d600 <rtems_task_mode+0x16c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
a000d5d0: e5d33074 ldrb r3, [r3, #116] ; 0x74
a000d5d4: e3530000 cmp r3, #0
a000d5d8: 1a000001 bne a000d5e4 <rtems_task_mode+0x150>
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000d5dc: e1a00006 mov r0, r6 <== NOT EXECUTED
}
a000d5e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a000d5e4: e3a03001 mov r3, #1
a000d5e8: e5c93010 strb r3, [r9, #16]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
a000d5ec: ebffe7e1 bl a0007578 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
a000d5f0: e3a00000 mov r0, #0
a000d5f4: 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;
a000d5f8: e3a00009 mov r0, #9
a000d5fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000d600: e1a00006 mov r0, r6
a000d604: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0008618 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
a0008618: e92d4010 push {r4, lr}
a000861c: e24dd004 sub sp, sp, #4
a0008620: 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 );
a0008624: e1a00001 mov r0, r1
a0008628: e1a0100d mov r1, sp
a000862c: eb001645 bl a000df48 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a0008630: e3500003 cmp r0, #3
a0008634: 0a000005 beq a0008650 <sem_timedwait+0x38>
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a0008638: e1a00004 mov r0, r4 <== NOT EXECUTED
a000863c: e3a01000 mov r1, #0 <== NOT EXECUTED
a0008640: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a0008644: eb00195b bl a000ebb8 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
a0008648: e28dd004 add sp, sp, #4
a000864c: 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 );
a0008650: e1a00004 mov r0, r4
a0008654: e3a01001 mov r1, #1
a0008658: e59d2000 ldr r2, [sp]
a000865c: eb001955 bl a000ebb8 <_POSIX_Semaphore_Wait_support>
a0008660: eafffff8 b a0008648 <sem_timedwait+0x30>
a0005e58 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
a0005e58: e3520000 cmp r2, #0
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
a0005e5c: e92d4070 push {r4, r5, r6, lr}
a0005e60: e1a04000 mov r4, r0
a0005e64: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
a0005e68: 0a00000a beq a0005e98 <sigaction+0x40>
*oact = _POSIX_signals_Vectors[ sig ];
a0005e6c: e3a0100c mov r1, #12
a0005e70: e59f00ec ldr r0, [pc, #236] ; a0005f64 <sigaction+0x10c>
a0005e74: e0010194 mul r1, r4, r1
a0005e78: e1a03002 mov r3, r2
a0005e7c: e790c001 ldr ip, [r0, r1]
a0005e80: e0801001 add r1, r0, r1
a0005e84: e483c004 str ip, [r3], #4
a0005e88: e5910004 ldr r0, [r1, #4]
a0005e8c: e5820004 str r0, [r2, #4]
a0005e90: e5912008 ldr r2, [r1, #8]
a0005e94: e5832004 str r2, [r3, #4]
if ( !sig )
a0005e98: e3540000 cmp r4, #0
a0005e9c: 0a00002b beq a0005f50 <sigaction+0xf8>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a0005ea0: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a0005ea4: e353001f cmp r3, #31
a0005ea8: 8a000028 bhi a0005f50 <sigaction+0xf8>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
a0005eac: e3540009 cmp r4, #9
a0005eb0: 0a000026 beq a0005f50 <sigaction+0xf8>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
a0005eb4: e3550000 cmp r5, #0
a0005eb8: 0a000022 beq a0005f48 <sigaction+0xf0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0005ebc: e10f6000 mrs r6, CPSR
a0005ec0: e3863080 orr r3, r6, #128 ; 0x80
a0005ec4: 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 ) {
a0005ec8: e5953008 ldr r3, [r5, #8]
a0005ecc: e3530000 cmp r3, #0
a0005ed0: 0a00000f beq a0005f14 <sigaction+0xbc>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
a0005ed4: e1a00004 mov r0, r4
a0005ed8: eb001719 bl a000bb44 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
a0005edc: e1a03005 mov r3, r5
a0005ee0: e3a0000c mov r0, #12
a0005ee4: e4931004 ldr r1, [r3], #4
a0005ee8: e59f2074 ldr r2, [pc, #116] ; a0005f64 <sigaction+0x10c>
a0005eec: e0040490 mul r4, r0, r4
a0005ef0: e7821004 str r1, [r2, r4]
a0005ef4: e5951004 ldr r1, [r5, #4]
a0005ef8: e0824004 add r4, r2, r4
a0005efc: e5841004 str r1, [r4, #4]
a0005f00: e5933004 ldr r3, [r3, #4]
a0005f04: e5843008 str r3, [r4, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0005f08: 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;
a0005f0c: e3a00000 mov r0, #0
a0005f10: 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 ];
a0005f14: e3a0300c mov r3, #12
a0005f18: e0040493 mul r4, r3, r4
a0005f1c: e59f1044 ldr r1, [pc, #68] ; a0005f68 <sigaction+0x110>
a0005f20: e59f203c ldr r2, [pc, #60] ; a0005f64 <sigaction+0x10c>
a0005f24: e0813004 add r3, r1, r4
a0005f28: e791c004 ldr ip, [r1, r4]
a0005f2c: e9930003 ldmib r3, {r0, r1}
a0005f30: e0823004 add r3, r2, r4
a0005f34: e782c004 str ip, [r2, r4]
a0005f38: e9830003 stmib r3, {r0, r1}
a0005f3c: 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;
a0005f40: e3a00000 mov r0, #0
a0005f44: e8bd8070 pop {r4, r5, r6, pc}
a0005f48: e1a00005 mov r0, r5 <== NOT EXECUTED
}
a0005f4c: 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 );
a0005f50: eb00237b bl a000ed44 <__errno>
a0005f54: e3a03016 mov r3, #22
a0005f58: e5803000 str r3, [r0]
a0005f5c: e3e00000 mvn r0, #0
a0005f60: e8bd8070 pop {r4, r5, r6, pc}
a00084b4 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
a00084b4: e92d4010 push {r4, lr}
a00084b8: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
a00084bc: e3a01000 mov r1, #0
a00084c0: e1a02001 mov r2, r1
a00084c4: ebffff7f bl a00082c8 <sigtimedwait>
if ( status != -1 ) {
a00084c8: e3700001 cmn r0, #1
a00084cc: 0a000004 beq a00084e4 <sigwait+0x30>
if ( sig )
a00084d0: e3540000 cmp r4, #0
a00084d4: 0a000005 beq a00084f0 <sigwait+0x3c>
*sig = status;
a00084d8: e5840000 str r0, [r4]
return 0;
a00084dc: e3a00000 mov r0, #0
a00084e0: e8bd8010 pop {r4, pc}
}
return errno;
a00084e4: eb0022d4 bl a001103c <__errno>
a00084e8: e5900000 ldr r0, [r0]
a00084ec: e8bd8010 pop {r4, pc}
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
a00084f0: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
a00084f4: e8bd8010 pop {r4, pc} <== NOT EXECUTED