RTEMS 4.10Annotated Report
Sat May 22 03:56:27 2010
a0016b78 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a0016b78: 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
)
{
a0016b7c: 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 ) {
a0016b80: 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
)
{
a0016b84: e1a07000 mov r7, r0
a0016b88: e1a05002 mov r5, r2
a0016b8c: e1a08001 mov r8, r1
a0016b90: 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 ) {
a0016b94: 3a000013 bcc a0016be8 <_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 ) {
a0016b98: e5906048 ldr r6, [r0, #72] ; 0x48
a0016b9c: e3560000 cmp r6, #0
a0016ba0: 0a000009 beq a0016bcc <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a0016ba4: e3a00000 mov r0, #0
a0016ba8: e58a0000 str r0, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0016bac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0016bb0: e594002c ldr r0, [r4, #44] ; 0x2c
a0016bb4: e1a01008 mov r1, r8
a0016bb8: e1a02005 mov r2, r5
a0016bbc: eb002615 bl a0020418 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016bc0: 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;
a0016bc4: e2866001 add r6, r6, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0016bc8: 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 =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
a0016bcc: e1a00007 mov r0, r7
a0016bd0: eb000a29 bl a001947c <_Thread_queue_Dequeue>
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
a0016bd4: e2504000 subs r4, r0, #0
a0016bd8: 1afffff4 bne a0016bb0 <_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;
a0016bdc: e58a6000 str r6, [sl]
a0016be0: e1a00004 mov r0, r4
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0016be4: 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 ) {
a0016be8: e3a00001 mov r0, #1 <== NOT EXECUTED
a0016bec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000ad28 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000ad28: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000ad2c: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
a000ad30: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000ad34: e24dd01c sub sp, sp, #28
a000ad38: e1a05001 mov r5, r1
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
a000ad3c: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000ad40: e1a07000 mov r7, r0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
a000ad44: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000ad48: e1a0b003 mov fp, r3
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a000ad4c: e590a008 ldr sl, [r0, #8]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
a000ad50: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
a000ad54: 2a000074 bcs a000af2c <_Heap_Allocate_aligned_with_boundary+0x204>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a000ad58: e3530000 cmp r3, #0
a000ad5c: 1a000070 bne a000af24 <_Heap_Allocate_aligned_with_boundary+0x1fc>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000ad60: e157000a cmp r7, sl
a000ad64: 03a06000 moveq r6, #0
a000ad68: 0a000072 beq a000af38 <_Heap_Allocate_aligned_with_boundary+0x210>
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;
a000ad6c: e59d300c ldr r3, [sp, #12]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000ad70: e2651004 rsb r1, r5, #4
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000ad74: e3a06000 mov r6, #0
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;
a000ad78: e2833007 add r3, r3, #7
a000ad7c: e58d3010 str r3, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000ad80: e58d1014 str r1, [sp, #20]
a000ad84: ea000004 b a000ad9c <_Heap_Allocate_aligned_with_boundary+0x74>
boundary
);
}
}
if ( alloc_begin != 0 ) {
a000ad88: e3540000 cmp r4, #0
a000ad8c: 1a000057 bne a000aef0 <_Heap_Allocate_aligned_with_boundary+0x1c8>
break;
}
block = block->next;
a000ad90: e59aa008 ldr sl, [sl, #8]
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000ad94: e157000a cmp r7, sl
a000ad98: 0a000066 beq a000af38 <_Heap_Allocate_aligned_with_boundary+0x210>
/*
* 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 ) {
a000ad9c: e59a9004 ldr r9, [sl, #4]
a000ada0: e59d2000 ldr r2, [sp]
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
a000ada4: e2866001 add r6, r6, #1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
a000ada8: e1520009 cmp r2, r9
a000adac: 2afffff7 bcs a000ad90 <_Heap_Allocate_aligned_with_boundary+0x68>
if ( alignment == 0 ) {
a000adb0: 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;
a000adb4: 028a4008 addeq r4, sl, #8
a000adb8: 0afffff2 beq a000ad88 <_Heap_Allocate_aligned_with_boundary+0x60>
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000adbc: e59d1014 ldr r1, [sp, #20]
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000adc0: e5973014 ldr r3, [r7, #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;
a000adc4: e59d2010 ldr r2, [sp, #16]
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;
a000adc8: e3c99001 bic r9, r9, #1
a000adcc: e08a9009 add r9, sl, r9
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000add0: e0814009 add r4, r1, r9
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000add4: e58d3004 str r3, [sp, #4]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000add8: e1a00004 mov r0, r4
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;
a000addc: e0633002 rsb r3, r3, r2
a000ade0: e1a01008 mov r1, r8
a000ade4: e0839009 add r9, r3, r9
a000ade8: eb003116 bl a0017248 <__umodsi3>
a000adec: e0604004 rsb r4, r0, r4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000adf0: e28a3008 add r3, sl, #8
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 ) {
a000adf4: e1590004 cmp r9, r4
a000adf8: e58d3008 str r3, [sp, #8]
a000adfc: 2a000003 bcs a000ae10 <_Heap_Allocate_aligned_with_boundary+0xe8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ae00: e1a00009 mov r0, r9
a000ae04: e1a01008 mov r1, r8
a000ae08: eb00310e bl a0017248 <__umodsi3>
a000ae0c: e0604009 rsb r4, r0, r9
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a000ae10: e35b0000 cmp fp, #0
a000ae14: 0a000025 beq a000aeb0 <_Heap_Allocate_aligned_with_boundary+0x188>
/* 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;
a000ae18: e0849005 add r9, r4, r5
a000ae1c: e1a00009 mov r0, r9
a000ae20: e1a0100b mov r1, fp
a000ae24: eb003107 bl a0017248 <__umodsi3>
a000ae28: e0600009 rsb r0, r0, r9
/* 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 ) {
a000ae2c: e1590000 cmp r9, r0
a000ae30: 93a03000 movls r3, #0
a000ae34: 83a03001 movhi r3, #1
a000ae38: e1540000 cmp r4, r0
a000ae3c: 23a03000 movcs r3, #0
a000ae40: e3530000 cmp r3, #0
a000ae44: 0a000019 beq a000aeb0 <_Heap_Allocate_aligned_with_boundary+0x188>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
a000ae48: e59d1008 ldr r1, [sp, #8]
a000ae4c: e0819005 add r9, 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 ) {
a000ae50: e1590000 cmp r9, r0
a000ae54: 958d6018 strls r6, [sp, #24]
a000ae58: 9a000002 bls a000ae68 <_Heap_Allocate_aligned_with_boundary+0x140>
a000ae5c: eaffffcb b a000ad90 <_Heap_Allocate_aligned_with_boundary+0x68>
a000ae60: e1590000 cmp r9, r0
a000ae64: 8a000035 bhi a000af40 <_Heap_Allocate_aligned_with_boundary+0x218>
return 0;
}
alloc_begin = boundary_line - alloc_size;
a000ae68: e0654000 rsb r4, r5, r0
a000ae6c: e1a01008 mov r1, r8
a000ae70: e1a00004 mov r0, r4
a000ae74: eb0030f3 bl a0017248 <__umodsi3>
a000ae78: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a000ae7c: e0846005 add r6, r4, r5
a000ae80: e1a00006 mov r0, r6
a000ae84: e1a0100b mov r1, fp
a000ae88: eb0030ee bl a0017248 <__umodsi3>
a000ae8c: e0600006 rsb r0, r0, r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
a000ae90: e1560000 cmp r6, r0
a000ae94: 93a03000 movls r3, #0
a000ae98: 83a03001 movhi r3, #1
a000ae9c: e1540000 cmp r4, r0
a000aea0: 23a03000 movcs r3, #0
a000aea4: e3530000 cmp r3, #0
a000aea8: 1affffec bne a000ae60 <_Heap_Allocate_aligned_with_boundary+0x138>
a000aeac: e59d6018 ldr r6, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
a000aeb0: e59d2008 ldr r2, [sp, #8]
a000aeb4: e1520004 cmp r2, r4
a000aeb8: 8affffb4 bhi a000ad90 <_Heap_Allocate_aligned_with_boundary+0x68>
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;
a000aebc: e59d100c ldr r1, [sp, #12]
a000aec0: e1a00004 mov r0, r4
a000aec4: eb0030df bl a0017248 <__umodsi3>
a000aec8: e3e09007 mvn r9, #7
a000aecc: e06a9009 rsb r9, sl, r9
if ( free_size >= min_block_size || free_size == 0 ) {
a000aed0: e59d1004 ldr r1, [sp, #4]
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
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;
a000aed4: e0899004 add r9, r9, r4
if ( free_size >= min_block_size || free_size == 0 ) {
a000aed8: e0603009 rsb r3, r0, r9
a000aedc: e1590000 cmp r9, r0
a000aee0: 11510003 cmpne r1, r3
a000aee4: 8affffa9 bhi a000ad90 <_Heap_Allocate_aligned_with_boundary+0x68>
boundary
);
}
}
if ( alloc_begin != 0 ) {
a000aee8: e3540000 cmp r4, #0
a000aeec: 0affffa7 beq a000ad90 <_Heap_Allocate_aligned_with_boundary+0x68>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
a000aef0: e597204c ldr r2, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000aef4: e1a0100a mov r1, sl
a000aef8: e1a03005 mov r3, r5
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
a000aefc: e0822006 add r2, r2, r6
a000af00: e587204c str r2, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000af04: e1a00007 mov r0, r7
a000af08: e1a02004 mov r2, r4
a000af0c: ebffec1a bl a0005f7c <_Heap_Block_allocate>
a000af10: e1a00004 mov r0, r4
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
a000af14: e5973044 ldr r3, [r7, #68] ; 0x44
a000af18: e1530006 cmp r3, r6
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
a000af1c: 35876044 strcc r6, [r7, #68] ; 0x44
a000af20: ea000002 b a000af30 <_Heap_Allocate_aligned_with_boundary+0x208>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
a000af24: e1550003 cmp r5, r3
a000af28: 9a000006 bls a000af48 <_Heap_Allocate_aligned_with_boundary+0x220>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
a000af2c: e3a00000 mov r0, #0
}
return (void *) alloc_begin;
}
a000af30: e28dd01c add sp, sp, #28
a000af34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
a000af38: e3a00000 mov r0, #0
a000af3c: eafffff4 b a000af14 <_Heap_Allocate_aligned_with_boundary+0x1ec>
a000af40: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED
a000af44: eaffff91 b a000ad90 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
a000af48: e3580000 cmp r8, #0
a000af4c: 01a08002 moveq r8, r2
a000af50: eaffff82 b a000ad60 <_Heap_Allocate_aligned_with_boundary+0x38>
a0010090 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
a0010090: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
a0010094: e590c01c ldr ip, [r0, #28]
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
a0010098: e1a04000 mov r4, r0
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
a001009c: e5900018 ldr r0, [r0, #24]
a00100a0: e151000c cmp r1, ip
a00100a4: 23a05000 movcs r5, #0
a00100a8: 33a05001 movcc r5, #1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
a00100ac: e1a07003 mov r7, r3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
a00100b0: e1510000 cmp r1, r0
a00100b4: 33a05000 movcc r5, #0
a00100b8: e3550000 cmp r5, #0
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
a00100bc: e5946024 ldr r6, [r4, #36] ; 0x24
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
a00100c0: 1a000012 bne a0010110 <_Heap_Extend+0x80>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
a00100c4: e151000c cmp r1, ip
a00100c8: 0a000001 beq a00100d4 <_Heap_Extend+0x44>
a00100cc: e3a00002 mov r0, #2
a00100d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
a00100d4: e3e08007 mvn r8, #7
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
a00100d8: e0811002 add r1, r1, r2
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
a00100dc: e0668008 rsb r8, r6, r8
a00100e0: e0888001 add r8, r8, r1
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
a00100e4: e584101c str r1, [r4, #28]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a00100e8: e1a00008 mov r0, r8
a00100ec: e5941010 ldr r1, [r4, #16]
a00100f0: ebffcc36 bl a00031d0 <__umodsi3>
a00100f4: e0600008 rsb r0, r0, r8
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
a00100f8: e5870000 str r0, [r7]
if( extend_size >= heap->min_block_size ) {
a00100fc: e5943014 ldr r3, [r4, #20]
a0010100: e1530000 cmp r3, r0
a0010104: 9a000003 bls a0010118 <_Heap_Extend+0x88>
a0010108: e1a00005 mov r0, r5 <== NOT EXECUTED
a001010c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
a0010110: e3a00001 mov r0, #1
a0010114: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
a0010118: e5961004 ldr r1, [r6, #4]
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
a001011c: e5942020 ldr r2, [r4, #32]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a0010120: e0803006 add r3, r0, r6
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
a0010124: e2011001 and r1, r1, #1
a0010128: e0632002 rsb r2, r3, r2
a001012c: e1801001 orr r1, r0, r1
a0010130: e3822001 orr r2, r2, #1
a0010134: e5861004 str r1, [r6, #4]
a0010138: e5832004 str r2, [r3, #4]
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
a001013c: e594802c ldr r8, [r4, #44] ; 0x2c
++stats->used_blocks;
a0010140: e5941040 ldr r1, [r4, #64] ; 0x40
--stats->frees; /* Do not count subsequent call as actual free() */
a0010144: e5942050 ldr r2, [r4, #80] ; 0x50
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
a0010148: e0880000 add r0, r8, r0
++stats->used_blocks;
a001014c: e2811001 add r1, r1, #1
--stats->frees; /* Do not count subsequent call as actual free() */
a0010150: e2422001 sub r2, r2, #1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
a0010154: e584002c str r0, [r4, #44] ; 0x2c
++stats->used_blocks;
a0010158: e5841040 str r1, [r4, #64] ; 0x40
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
a001015c: e5843024 str r3, [r4, #36] ; 0x24
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
a0010160: e5842050 str r2, [r4, #80] ; 0x50
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
a0010164: e1a00004 mov r0, r4
a0010168: e2861008 add r1, r6, #8
a001016c: ebffe8bc bl a000a464 <_Heap_Free>
a0010170: e1a00005 mov r0, r5
}
return HEAP_EXTEND_SUCCESSFUL;
}
a0010174: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0006cfc <_Heap_Walk>:
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0006cfc: e59f357c ldr r3, [pc, #1404] ; a0007280 <_Heap_Walk+0x584>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006d00: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006d04: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0006d08: e5933000 ldr r3, [r3]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006d0c: e59f2570 ldr r2, [pc, #1392] ; a0007284 <_Heap_Walk+0x588>
a0006d10: e59fa570 ldr sl, [pc, #1392] ; a0007288 <_Heap_Walk+0x58c>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006d14: e24dd038 sub sp, sp, #56 ; 0x38
a0006d18: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006d1c: 01a0a002 moveq sl, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0006d20: e3530003 cmp r3, #3
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
a0006d24: e5902010 ldr r2, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
a0006d28: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006d2c: e1a08001 mov r8, r1
uintptr_t const page_size = heap->page_size;
a0006d30: e58d2020 str r2, [sp, #32]
uintptr_t const min_block_size = heap->min_block_size;
a0006d34: e590b014 ldr fp, [r0, #20]
Heap_Block *const last_block = heap->last_block;
a0006d38: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *block = heap->first_block;
a0006d3c: e5905020 ldr r5, [r0, #32]
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0006d40: 0a000002 beq a0006d50 <_Heap_Walk+0x54>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
a0006d44: e3a00001 mov r0, #1
block = next_block;
}
return true;
}
a0006d48: e28dd038 add sp, sp, #56 ; 0x38
a0006d4c: 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)(
a0006d50: e5900018 ldr r0, [r0, #24]
a0006d54: e594101c ldr r1, [r4, #28]
a0006d58: e5942008 ldr r2, [r4, #8]
a0006d5c: e594300c ldr r3, [r4, #12]
a0006d60: e59dc024 ldr ip, [sp, #36] ; 0x24
a0006d64: e98d0003 stmib sp, {r0, r1}
a0006d68: e58d2014 str r2, [sp, #20]
a0006d6c: e58d3018 str r3, [sp, #24]
a0006d70: e59f2514 ldr r2, [pc, #1300] ; a000728c <_Heap_Walk+0x590>
a0006d74: e58db000 str fp, [sp]
a0006d78: e58d500c str r5, [sp, #12]
a0006d7c: e58dc010 str ip, [sp, #16]
a0006d80: e1a00008 mov r0, r8
a0006d84: e3a01000 mov r1, #0
a0006d88: e59d3020 ldr r3, [sp, #32]
a0006d8c: e12fff3a blx sl
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a0006d90: e59d2020 ldr r2, [sp, #32]
a0006d94: e3520000 cmp r2, #0
a0006d98: 0a000030 beq a0006e60 <_Heap_Walk+0x164>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a0006d9c: e59d3020 ldr r3, [sp, #32]
a0006da0: e2139003 ands r9, r3, #3
a0006da4: 1a000033 bne a0006e78 <_Heap_Walk+0x17c>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a0006da8: e1a0000b mov r0, fp
a0006dac: e59d1020 ldr r1, [sp, #32]
a0006db0: ebffe74c bl a0000ae8 <__umodsi3>
a0006db4: e2506000 subs r6, r0, #0
a0006db8: 1a000034 bne a0006e90 <_Heap_Walk+0x194>
);
return false;
}
if (
a0006dbc: e2850008 add r0, r5, #8
a0006dc0: e59d1020 ldr r1, [sp, #32]
a0006dc4: ebffe747 bl a0000ae8 <__umodsi3>
a0006dc8: e2509000 subs r9, r0, #0
a0006dcc: 1a000036 bne a0006eac <_Heap_Walk+0x1b0>
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;
a0006dd0: e5957004 ldr r7, [r5, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a0006dd4: e2176001 ands r6, r7, #1
a0006dd8: 0a00003a beq a0006ec8 <_Heap_Walk+0x1cc>
);
return false;
}
if ( first_block->prev_size != page_size ) {
a0006ddc: e5953000 ldr r3, [r5]
a0006de0: e59dc020 ldr ip, [sp, #32]
a0006de4: e15c0003 cmp ip, r3
a0006de8: 1a000015 bne a0006e44 <_Heap_Walk+0x148>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a0006dec: e59d2024 ldr r2, [sp, #36] ; 0x24
a0006df0: e5923004 ldr r3, [r2, #4]
a0006df4: e3c33001 bic r3, r3, #1
a0006df8: e0823003 add r3, r2, r3
a0006dfc: e5939004 ldr r9, [r3, #4]
a0006e00: e2199001 ands r9, r9, #1
a0006e04: 0a000101 beq a0007210 <_Heap_Walk+0x514>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a0006e08: e5949008 ldr r9, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a0006e0c: e5943010 ldr r3, [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 ) {
a0006e10: e1540009 cmp r4, r9
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a0006e14: e58d3028 str r3, [sp, #40] ; 0x28
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 ) {
a0006e18: 0a000065 beq a0006fb4 <_Heap_Walk+0x2b8>
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;
a0006e1c: e594c020 ldr ip, [r4, #32]
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
a0006e20: e15c0009 cmp ip, r9
a0006e24: 9a00002d bls a0006ee0 <_Heap_Walk+0x1e4>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
a0006e28: e1a00008 mov r0, r8
a0006e2c: e1a03009 mov r3, r9
a0006e30: e3a01001 mov r1, #1
a0006e34: e59f2454 ldr r2, [pc, #1108] ; a0007290 <_Heap_Walk+0x594>
a0006e38: e12fff3a blx sl
a0006e3c: e3a00000 mov r0, #0
a0006e40: eaffffc0 b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
a0006e44: e1a00008 mov r0, r8
a0006e48: e58dc000 str ip, [sp]
a0006e4c: e3a01001 mov r1, #1
a0006e50: e59f243c ldr r2, [pc, #1084] ; a0007294 <_Heap_Walk+0x598>
a0006e54: e12fff3a blx sl
a0006e58: e1a00009 mov r0, r9
a0006e5c: eaffffb9 b a0006d48 <_Heap_Walk+0x4c>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
a0006e60: e1a00008 mov r0, r8
a0006e64: e3a01001 mov r1, #1
a0006e68: e59f2428 ldr r2, [pc, #1064] ; a0007298 <_Heap_Walk+0x59c>
a0006e6c: e12fff3a blx sl
a0006e70: e59d0020 ldr r0, [sp, #32]
a0006e74: eaffffb3 b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
a0006e78: e1a00008 mov r0, r8
a0006e7c: e3a01001 mov r1, #1
a0006e80: e59f2414 ldr r2, [pc, #1044] ; a000729c <_Heap_Walk+0x5a0>
a0006e84: e12fff3a blx sl
a0006e88: e3a00000 mov r0, #0
a0006e8c: eaffffad b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
a0006e90: e1a00008 mov r0, r8
a0006e94: e1a0300b mov r3, fp
a0006e98: e3a01001 mov r1, #1
a0006e9c: e59f23fc ldr r2, [pc, #1020] ; a00072a0 <_Heap_Walk+0x5a4>
a0006ea0: e12fff3a blx sl
a0006ea4: e1a00009 mov r0, r9
a0006ea8: eaffffa6 b a0006d48 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a0006eac: e1a00008 mov r0, r8
a0006eb0: e1a03005 mov r3, r5
a0006eb4: e3a01001 mov r1, #1
a0006eb8: e59f23e4 ldr r2, [pc, #996] ; a00072a4 <_Heap_Walk+0x5a8>
a0006ebc: e12fff3a blx sl
a0006ec0: e1a00006 mov r0, r6
a0006ec4: eaffff9f b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
a0006ec8: e1a00008 mov r0, r8
a0006ecc: e3a01001 mov r1, #1
a0006ed0: e59f23d0 ldr r2, [pc, #976] ; a00072a8 <_Heap_Walk+0x5ac>
a0006ed4: e12fff3a blx sl
a0006ed8: e1a00006 mov r0, r6
a0006edc: eaffff99 b a0006d48 <_Heap_Walk+0x4c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a0006ee0: e5942024 ldr r2, [r4, #36] ; 0x24
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
a0006ee4: e1520009 cmp r2, r9
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a0006ee8: e58d202c str r2, [sp, #44] ; 0x2c
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
a0006eec: 3affffcd bcc a0006e28 <_Heap_Walk+0x12c>
);
return false;
}
if (
a0006ef0: e2890008 add r0, r9, #8
a0006ef4: e1a01003 mov r1, r3
a0006ef8: e58dc01c str ip, [sp, #28]
a0006efc: ebffe6f9 bl a0000ae8 <__umodsi3>
a0006f00: e3500000 cmp r0, #0
a0006f04: e59dc01c ldr ip, [sp, #28]
a0006f08: 1a0000c6 bne a0007228 <_Heap_Walk+0x52c>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0006f0c: e5993004 ldr r3, [r9, #4]
a0006f10: e3c33001 bic r3, r3, #1
a0006f14: e0893003 add r3, r9, r3
a0006f18: e5933004 ldr r3, [r3, #4]
a0006f1c: e3130001 tst r3, #1
a0006f20: 1a0000cf bne a0007264 <_Heap_Walk+0x568>
);
return false;
}
if ( free_block->prev != prev_block ) {
a0006f24: e599200c ldr r2, [r9, #12]
a0006f28: e1540002 cmp r4, r2
a0006f2c: 1a0000c4 bne a0007244 <_Heap_Walk+0x548>
a0006f30: e58d7030 str r7, [sp, #48] ; 0x30
a0006f34: e58db034 str fp, [sp, #52] ; 0x34
a0006f38: e59d702c ldr r7, [sp, #44] ; 0x2c
a0006f3c: e59db028 ldr fp, [sp, #40] ; 0x28
a0006f40: e58d502c str r5, [sp, #44] ; 0x2c
a0006f44: e58d6028 str r6, [sp, #40] ; 0x28
a0006f48: e1a0600c mov r6, ip
a0006f4c: ea000011 b a0006f98 <_Heap_Walk+0x29c>
a0006f50: e1590006 cmp r9, r6
a0006f54: 3affffb3 bcc a0006e28 <_Heap_Walk+0x12c>
a0006f58: e1570009 cmp r7, r9
);
return false;
}
if (
a0006f5c: e2890008 add r0, r9, #8
a0006f60: e1a0100b mov r1, fp
a0006f64: 3affffaf bcc a0006e28 <_Heap_Walk+0x12c>
a0006f68: ebffe6de bl a0000ae8 <__umodsi3>
a0006f6c: e3500000 cmp r0, #0
a0006f70: 1a0000ac bne a0007228 <_Heap_Walk+0x52c>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0006f74: e5993004 ldr r3, [r9, #4]
a0006f78: e3c33001 bic r3, r3, #1
a0006f7c: e0833009 add r3, r3, r9
a0006f80: e5933004 ldr r3, [r3, #4]
a0006f84: e3130001 tst r3, #1
a0006f88: 1a0000b5 bne a0007264 <_Heap_Walk+0x568>
);
return false;
}
if ( free_block->prev != prev_block ) {
a0006f8c: e599200c ldr r2, [r9, #12]
a0006f90: e1520005 cmp r2, r5
a0006f94: 1a0000aa bne a0007244 <_Heap_Walk+0x548>
(*printer)(
a0006f98: e1a05009 mov r5, r9
return false;
}
prev_block = free_block;
free_block = free_block->next;
a0006f9c: e5999008 ldr r9, [r9, #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 ) {
a0006fa0: e1540009 cmp r4, r9
a0006fa4: 1affffe9 bne a0006f50 <_Heap_Walk+0x254>
a0006fa8: e28d502c add r5, sp, #44 ; 0x2c
a0006fac: e89508a0 ldm r5, {r5, r7, fp}
a0006fb0: e59d6028 ldr r6, [sp, #40] ; 0x28
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
a0006fb4: e59d3024 ldr r3, [sp, #36] ; 0x24
a0006fb8: e1530005 cmp r3, r5
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
a0006fbc: 158db028 strne fp, [sp, #40] ; 0x28
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
a0006fc0: 0affff5f beq a0006d44 <_Heap_Walk+0x48>
- 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;
a0006fc4: e3c77001 bic r7, r7, #1
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;
if ( prev_used ) {
a0006fc8: e21610ff ands r1, r6, #255 ; 0xff
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a0006fcc: e0876005 add r6, r7, r5
a0006fd0: 0a000010 beq a0007018 <_Heap_Walk+0x31c>
(*printer)(
a0006fd4: e1a03005 mov r3, r5
a0006fd8: e58d7000 str r7, [sp]
a0006fdc: e1a00008 mov r0, r8
a0006fe0: e3a01000 mov r1, #0
a0006fe4: e59f22c0 ldr r2, [pc, #704] ; a00072ac <_Heap_Walk+0x5b0>
a0006fe8: e12fff3a blx sl
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
a0006fec: e5943020 ldr r3, [r4, #32]
a0006ff0: e1530006 cmp r3, r6
a0006ff4: 9a000011 bls a0007040 <_Heap_Walk+0x344>
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
a0006ff8: e1a00008 mov r0, r8
a0006ffc: e58d6000 str r6, [sp]
a0007000: e1a03005 mov r3, r5
a0007004: e3a01001 mov r1, #1
a0007008: e59f22a0 ldr r2, [pc, #672] ; a00072b0 <_Heap_Walk+0x5b4>
a000700c: e12fff3a blx sl
a0007010: e3a00000 mov r0, #0
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
a0007014: eaffff4b b a0006d48 <_Heap_Walk+0x4c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a0007018: e58d7000 str r7, [sp]
a000701c: e5953000 ldr r3, [r5]
a0007020: e1a00008 mov r0, r8
a0007024: e59f2288 ldr r2, [pc, #648] ; a00072b4 <_Heap_Walk+0x5b8>
a0007028: e58d3004 str r3, [sp, #4]
a000702c: e1a03005 mov r3, r5
a0007030: e12fff3a blx sl
a0007034: e5943020 ldr r3, [r4, #32]
a0007038: e1530006 cmp r3, r6
a000703c: 8affffed bhi a0006ff8 <_Heap_Walk+0x2fc>
a0007040: e5943024 ldr r3, [r4, #36] ; 0x24
a0007044: e1530006 cmp r3, r6
a0007048: 3affffea bcc a0006ff8 <_Heap_Walk+0x2fc>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
a000704c: e1a00007 mov r0, r7
a0007050: e59d1020 ldr r1, [sp, #32]
a0007054: ebffe6a3 bl a0000ae8 <__umodsi3>
a0007058: e2509000 subs r9, r0, #0
a000705c: 1a000051 bne a00071a8 <_Heap_Walk+0x4ac>
);
return false;
}
if ( block_size < min_block_size ) {
a0007060: e59d3028 ldr r3, [sp, #40] ; 0x28
a0007064: e1530007 cmp r3, r7
a0007068: 8a000056 bhi a00071c8 <_Heap_Walk+0x4cc>
);
return false;
}
if ( next_block_begin <= block_begin ) {
a000706c: e1550006 cmp r5, r6
a0007070: 2a00005e bcs a00071f0 <_Heap_Walk+0x4f4>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a0007074: e5963004 ldr r3, [r6, #4]
a0007078: e3130001 tst r3, #1
a000707c: 1a000034 bne a0007154 <_Heap_Walk+0x458>
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;
a0007080: e595b004 ldr fp, [r5, #4]
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)(
a0007084: e595200c ldr r2, [r5, #12]
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a0007088: e5943008 ldr r3, [r4, #8]
- 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;
a000708c: e3cb7001 bic r7, fp, #1
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
a0007090: e594100c ldr r1, [r4, #12]
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a0007094: e1530002 cmp r3, r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a0007098: e0859007 add r9, r5, r7
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a000709c: 059f0214 ldreq r0, [pc, #532] ; a00072b8 <_Heap_Walk+0x5bc>
a00070a0: 0a000003 beq a00070b4 <_Heap_Walk+0x3b8>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
a00070a4: e59fc210 ldr ip, [pc, #528] ; a00072bc <_Heap_Walk+0x5c0>
a00070a8: e1520004 cmp r2, r4
a00070ac: e59f020c ldr r0, [pc, #524] ; a00072c0 <_Heap_Walk+0x5c4>
a00070b0: 11a0000c movne r0, 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)(
a00070b4: e5953008 ldr r3, [r5, #8]
a00070b8: e1510003 cmp r1, r3
a00070bc: 059f1200 ldreq r1, [pc, #512] ; a00072c4 <_Heap_Walk+0x5c8>
a00070c0: 0a000003 beq a00070d4 <_Heap_Walk+0x3d8>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
a00070c4: e59fc1f0 ldr ip, [pc, #496] ; a00072bc <_Heap_Walk+0x5c0>
a00070c8: e1530004 cmp r3, r4
a00070cc: e59f11f4 ldr r1, [pc, #500] ; a00072c8 <_Heap_Walk+0x5cc>
a00070d0: 11a0100c movne 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)(
a00070d4: e58d2000 str r2, [sp]
a00070d8: e98d0009 stmib sp, {r0, r3}
a00070dc: e58d100c str r1, [sp, #12]
a00070e0: e1a03005 mov r3, r5
a00070e4: e1a00008 mov r0, r8
a00070e8: e3a01000 mov r1, #0
a00070ec: e59f21d8 ldr r2, [pc, #472] ; a00072cc <_Heap_Walk+0x5d0>
a00070f0: e12fff3a blx sl
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a00070f4: e5993000 ldr r3, [r9]
a00070f8: e1570003 cmp r7, r3
a00070fc: 0a000009 beq a0007128 <_Heap_Walk+0x42c>
(*printer)(
a0007100: e58d3004 str r3, [sp, #4]
a0007104: e1a00008 mov r0, r8
a0007108: e58d7000 str r7, [sp]
a000710c: e58d9008 str r9, [sp, #8]
a0007110: e1a03005 mov r3, r5
a0007114: e3a01001 mov r1, #1
a0007118: e59f21b0 ldr r2, [pc, #432] ; a00072d0 <_Heap_Walk+0x5d4>
a000711c: e12fff3a blx sl
a0007120: e3a00000 mov r0, #0
a0007124: eaffff07 b a0006d48 <_Heap_Walk+0x4c>
);
return false;
}
if ( !prev_used ) {
a0007128: e21b9001 ands r9, fp, #1
a000712c: 0a000016 beq a000718c <_Heap_Walk+0x490>
a0007130: 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 ) {
a0007134: e1530004 cmp r3, r4
a0007138: 1a000003 bne a000714c <_Heap_Walk+0x450>
a000713c: ea00000b b a0007170 <_Heap_Walk+0x474> <== NOT EXECUTED
if ( free_block == block ) {
return true;
}
free_block = free_block->next;
a0007140: 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 ) {
a0007144: e1530004 cmp r3, r4
a0007148: 0a000008 beq a0007170 <_Heap_Walk+0x474>
if ( free_block == block ) {
a000714c: e1530005 cmp r3, r5
a0007150: 1afffffa bne a0007140 <_Heap_Walk+0x444>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
a0007154: e59d2024 ldr r2, [sp, #36] ; 0x24
a0007158: e1520006 cmp r2, r6
a000715c: 0afffef8 beq a0006d44 <_Heap_Walk+0x48>
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 ) {
a0007160: e5967004 ldr r7, [r6, #4]
a0007164: e1a05006 mov r5, r6
a0007168: e2076001 and r6, r7, #1
a000716c: eaffff94 b a0006fc4 <_Heap_Walk+0x2c8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a0007170: e1a00008 mov r0, r8
a0007174: e1a03005 mov r3, r5
a0007178: e3a01001 mov r1, #1
a000717c: e59f2150 ldr r2, [pc, #336] ; a00072d4 <_Heap_Walk+0x5d8>
a0007180: e12fff3a blx sl
a0007184: e3a00000 mov r0, #0
a0007188: eafffeee b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( !prev_used ) {
(*printer)(
a000718c: e1a00008 mov r0, r8
a0007190: e1a03005 mov r3, r5
a0007194: e3a01001 mov r1, #1
a0007198: e59f2138 ldr r2, [pc, #312] ; a00072d8 <_Heap_Walk+0x5dc>
a000719c: e12fff3a blx sl
a00071a0: e1a00009 mov r0, r9
a00071a4: eafffee7 b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
a00071a8: e1a00008 mov r0, r8
a00071ac: e58d7000 str r7, [sp]
a00071b0: e1a03005 mov r3, r5
a00071b4: e3a01001 mov r1, #1
a00071b8: e59f211c ldr r2, [pc, #284] ; a00072dc <_Heap_Walk+0x5e0>
a00071bc: e12fff3a blx sl
a00071c0: e3a00000 mov r0, #0
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
a00071c4: eafffedf b a0006d48 <_Heap_Walk+0x4c>
}
if ( block_size < min_block_size ) {
(*printer)(
a00071c8: e58d3004 str r3, [sp, #4]
a00071cc: e1a00008 mov r0, r8
a00071d0: e1a0b003 mov fp, r3
a00071d4: e58d7000 str r7, [sp]
a00071d8: e1a03005 mov r3, r5
a00071dc: e3a01001 mov r1, #1
a00071e0: e59f20f8 ldr r2, [pc, #248] ; a00072e0 <_Heap_Walk+0x5e4>
a00071e4: e12fff3a blx sl
a00071e8: e1a00009 mov r0, r9
block,
block_size,
min_block_size
);
return false;
a00071ec: eafffed5 b a0006d48 <_Heap_Walk+0x4c>
}
if ( next_block_begin <= block_begin ) {
(*printer)(
a00071f0: e1a00008 mov r0, r8
a00071f4: e58d6000 str r6, [sp]
a00071f8: e1a03005 mov r3, r5
a00071fc: e3a01001 mov r1, #1
a0007200: e59f20dc ldr r2, [pc, #220] ; a00072e4 <_Heap_Walk+0x5e8>
a0007204: e12fff3a blx sl
a0007208: e1a00009 mov r0, r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
a000720c: eafffecd b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
a0007210: e1a00008 mov r0, r8
a0007214: e3a01001 mov r1, #1
a0007218: e59f20c8 ldr r2, [pc, #200] ; a00072e8 <_Heap_Walk+0x5ec>
a000721c: e12fff3a blx sl
a0007220: e1a00009 mov r0, r9
a0007224: eafffec7 b a0006d48 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a0007228: e1a00008 mov r0, r8
a000722c: e1a03009 mov r3, r9
a0007230: e3a01001 mov r1, #1
a0007234: e59f20b0 ldr r2, [pc, #176] ; a00072ec <_Heap_Walk+0x5f0>
a0007238: e12fff3a blx sl
a000723c: e3a00000 mov r0, #0
a0007240: eafffec0 b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
a0007244: e58d2000 str r2, [sp]
a0007248: e1a00008 mov r0, r8
a000724c: e1a03009 mov r3, r9
a0007250: e3a01001 mov r1, #1
a0007254: e59f2094 ldr r2, [pc, #148] ; a00072f0 <_Heap_Walk+0x5f4>
a0007258: e12fff3a blx sl
a000725c: e3a00000 mov r0, #0
a0007260: eafffeb8 b a0006d48 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
a0007264: e1a00008 mov r0, r8
a0007268: e1a03009 mov r3, r9
a000726c: e3a01001 mov r1, #1
a0007270: e59f207c ldr r2, [pc, #124] ; a00072f4 <_Heap_Walk+0x5f8>
a0007274: e12fff3a blx sl
a0007278: e3a00000 mov r0, #0
a000727c: eafffeb1 b a0006d48 <_Heap_Walk+0x4c>
a00061e4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a00061e4: 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 )
a00061e8: e5908034 ldr r8, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a00061ec: e24dd014 sub sp, sp, #20
a00061f0: 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 )
a00061f4: e3580000 cmp r8, #0
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
a00061f8: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a00061fc: 0a00009d beq a0006478 <_Objects_Extend_information+0x294>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
a0006200: e1d091b4 ldrh r9, [r0, #20]
a0006204: e1d0a1b0 ldrh sl, [r0, #16]
a0006208: e1a01009 mov r1, r9
a000620c: e1a0000a mov r0, sl
a0006210: eb0043c8 bl a0017138 <__aeabi_uidiv>
a0006214: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
a0006218: e1b03823 lsrs r3, r3, #16
a000621c: 01a01009 moveq r1, r9
a0006220: 01a06007 moveq r6, r7
a0006224: 01a04003 moveq r4, r3
a0006228: 0a00000f beq a000626c <_Objects_Extend_information+0x88>
if ( information->object_blocks[ block ] == NULL )
a000622c: e5984000 ldr r4, [r8]
a0006230: e3540000 cmp r4, #0
a0006234: 11a01009 movne r1, r9
a0006238: 11a06007 movne r6, r7
a000623c: 13a04000 movne r4, #0
a0006240: 01a01009 moveq r1, r9
a0006244: 01a06007 moveq r6, r7
a0006248: 1a000003 bne a000625c <_Objects_Extend_information+0x78>
a000624c: ea000006 b a000626c <_Objects_Extend_information+0x88> <== NOT EXECUTED
a0006250: e7982104 ldr r2, [r8, r4, lsl #2]
a0006254: e3520000 cmp r2, #0
a0006258: 0a000003 beq a000626c <_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++ ) {
a000625c: e2844001 add r4, r4, #1
a0006260: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
a0006264: e0866009 add r6, r6, r9
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a0006268: 8afffff8 bhi a0006250 <_Objects_Extend_information+0x6c>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
a000626c: 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 ) {
a0006270: e35a0801 cmp sl, #65536 ; 0x10000
a0006274: 2a000065 bcs a0006410 <_Objects_Extend_information+0x22c>
/*
* 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 ) {
a0006278: e5d50012 ldrb r0, [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;
a000627c: e5952018 ldr r2, [r5, #24]
if ( information->auto_extend ) {
a0006280: e3500000 cmp r0, #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;
a0006284: e0000192 mul r0, r2, r1
if ( information->auto_extend ) {
a0006288: 1a000062 bne a0006418 <_Objects_Extend_information+0x234>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
a000628c: e58d3000 str r3, [sp]
a0006290: eb000848 bl a00083b8 <_Workspace_Allocate_or_fatal_error>
a0006294: e59d3000 ldr r3, [sp]
a0006298: e1a09000 mov r9, r0
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
a000629c: e1d521b0 ldrh r2, [r5, #16]
a00062a0: e1560002 cmp r6, r2
a00062a4: 3a000039 bcc a0006390 <_Objects_Extend_information+0x1ac>
*/
/*
* Up the block count and maximum
*/
block_count++;
a00062a8: e283c001 add ip, r3, #1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
a00062ac: e08c008c add r0, ip, ip, lsl #1
a00062b0: e08a0000 add r0, sl, r0
a00062b4: e0800007 add r0, r0, r7
a00062b8: e1a00100 lsl r0, r0, #2
a00062bc: e88d1008 stm sp, {r3, ip}
a00062c0: eb000848 bl a00083e8 <_Workspace_Allocate>
if ( !object_blocks ) {
a00062c4: e250b000 subs fp, r0, #0
a00062c8: e89d1008 ldm sp, {r3, ip}
a00062cc: 0a00006f beq a0006490 <_Objects_Extend_information+0x2ac>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
a00062d0: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
a00062d4: e08b818c add r8, fp, ip, lsl #3
a00062d8: e08bc10c add ip, fp, ip, lsl #2
a00062dc: e1570002 cmp r7, r2
a00062e0: 3a000052 bcc a0006430 <_Objects_Extend_information+0x24c>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a00062e4: e3570000 cmp r7, #0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
a00062e8: 13a02000 movne r2, #0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
a00062ec: 11a01002 movne r1, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a00062f0: 0a000003 beq a0006304 <_Objects_Extend_information+0x120>
local_table[ index ] = NULL;
a00062f4: e7881102 str r1, [r8, r2, lsl #2]
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a00062f8: e2822001 add r2, r2, #1
a00062fc: e1570002 cmp r7, r2
a0006300: 8afffffb bhi a00062f4 <_Objects_Extend_information+0x110>
a0006304: 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 );
a0006308: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
a000630c: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0;
a0006310: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a0006314: 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 ;
a0006318: e1560001 cmp r6, r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
a000631c: e78b0003 str r0, [fp, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a0006320: 2a000005 bcs a000633c <_Objects_Extend_information+0x158>
a0006324: e0882106 add r2, r8, r6, lsl #2
a0006328: e1a03006 mov r3, r6
index < ( information->allocation_size + index_base );
index++ ) {
a000632c: 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 ;
a0006330: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
a0006334: 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 ;
a0006338: 3afffffb bcc a000632c <_Objects_Extend_information+0x148>
a000633c: e10f3000 mrs r3, CPSR
a0006340: e3832080 orr r2, r3, #128 ; 0x80
a0006344: e129f002 msr CPSR_fc, r2
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(
a0006348: e5952000 ldr r2, [r5]
a000634c: 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;
a0006350: e1a0a80a lsl sl, sl, #16
information->maximum_id = _Objects_Build_id(
a0006354: e1a02c02 lsl r2, r2, #24
a0006358: e3822801 orr r2, r2, #65536 ; 0x10000
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;
a000635c: e1a0a82a lsr sl, sl, #16
information->maximum_id = _Objects_Build_id(
a0006360: e1822d81 orr r2, r2, r1, lsl #27
a0006364: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
a0006368: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
a000636c: e585c030 str ip, [r5, #48] ; 0x30
information->local_table = local_table;
a0006370: e585801c str r8, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
a0006374: e585200c str r2, [r5, #12]
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;
a0006378: e1c5a1b0 strh sl, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
a000637c: e585b034 str fp, [r5, #52] ; 0x34
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0006380: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
a0006384: e3500000 cmp r0, #0
a0006388: 0a000000 beq a0006390 <_Objects_Extend_information+0x1ac>
_Workspace_Free( old_tables );
a000638c: eb00081b bl a0008400 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a0006390: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a0006394: e28d7008 add r7, sp, #8
a0006398: e1a01009 mov r1, r9
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a000639c: e7839104 str r9, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a00063a0: e1a00007 mov r0, r7
a00063a4: e1d521b4 ldrh r2, [r5, #20]
a00063a8: e5953018 ldr r3, [r5, #24]
a00063ac: eb0011bd bl a000aaa8 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a00063b0: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a00063b4: 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 ) {
a00063b8: ea000008 b a00063e0 <_Objects_Extend_information+0x1fc>
the_object->id = _Objects_Build_id(
a00063bc: e5952000 ldr r2, [r5]
a00063c0: e1d5c0b4 ldrh ip, [r5, #4]
a00063c4: e1a02c02 lsl r2, r2, #24
a00063c8: e3822801 orr r2, r2, #65536 ; 0x10000
a00063cc: e1822d8c orr r2, r2, ip, lsl #27
a00063d0: e1822006 orr r2, r2, r6
a00063d4: e5832008 str r2, [r3, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a00063d8: ebfffd15 bl a0005834 <_Chain_Append>
index++;
a00063dc: 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 ) {
a00063e0: e1a00007 mov r0, r7
a00063e4: ebfffd1d bl a0005860 <_Chain_Get>
a00063e8: e2503000 subs r3, r0, #0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a00063ec: e1a01003 mov r1, r3
a00063f0: e1a00008 mov r0, r8
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
a00063f4: 1afffff0 bne a00063bc <_Objects_Extend_information+0x1d8>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a00063f8: e1d531b4 ldrh r3, [r5, #20]
information->inactive =
a00063fc: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006400: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
a0006404: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a0006408: e7813004 str r3, [r1, r4]
information->inactive =
a000640c: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
a0006410: e28dd014 add sp, sp, #20
a0006414: 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 );
a0006418: e58d3000 str r3, [sp]
a000641c: eb0007f1 bl a00083e8 <_Workspace_Allocate>
if ( !new_object_block )
a0006420: e2509000 subs r9, r0, #0
a0006424: e59d3000 ldr r3, [sp]
a0006428: 1affff9b bne a000629c <_Objects_Extend_information+0xb8>
a000642c: eafffff7 b a0006410 <_Objects_Extend_information+0x22c>
/*
* 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,
a0006430: e1a03103 lsl r3, r3, #2
a0006434: e1a02003 mov r2, r3
a0006438: e5951034 ldr r1, [r5, #52] ; 0x34
a000643c: e88d1008 stm sp, {r3, ip}
a0006440: eb001fc7 bl a000e364 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
a0006444: e89d1008 ldm sp, {r3, ip}
a0006448: e5951030 ldr r1, [r5, #48] ; 0x30
a000644c: e1a0000c mov r0, ip
a0006450: e1a02003 mov r2, r3
a0006454: eb001fc2 bl a000e364 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
a0006458: e1d521b0 ldrh r2, [r5, #16]
a000645c: e1a00008 mov r0, r8
a0006460: e595101c ldr r1, [r5, #28]
a0006464: e0872002 add r2, r7, r2
a0006468: e1a02102 lsl r2, r2, #2
a000646c: eb001fbc bl a000e364 <memcpy>
a0006470: e89d1008 ldm sp, {r3, ip}
a0006474: eaffffa3 b a0006308 <_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 )
a0006478: e1a04008 mov r4, r8
a000647c: e1d0a1b0 ldrh sl, [r0, #16]
a0006480: e1d011b4 ldrh r1, [r0, #20]
a0006484: e1a06007 mov r6, r7
a0006488: e1a03008 mov r3, r8
a000648c: eaffff76 b a000626c <_Objects_Extend_information+0x88>
(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 );
a0006490: e1a00009 mov r0, r9
a0006494: eb0007d9 bl a0008400 <_Workspace_Free>
return;
a0006498: eaffffdc b a0006410 <_Objects_Extend_information+0x22c>
a0006e80 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a0006e80: e92d40f0 push {r4, r5, r6, r7, lr}
a0006e84: e1a05000 mov r5, r0
a0006e88: e1a06001 mov r6, r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a0006e8c: e1a00002 mov r0, r2
a0006e90: e1d513ba ldrh r1, [r5, #58] ; 0x3a
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a0006e94: e1a07002 mov r7, r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a0006e98: eb00242c bl a000ff50 <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a0006e9c: e5d53038 ldrb r3, [r5, #56] ; 0x38
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a0006ea0: e1a04000 mov r4, r0
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a0006ea4: e3530000 cmp r3, #0
a0006ea8: 1a000017 bne a0006f0c <_Objects_Set_name+0x8c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a0006eac: e5d72000 ldrb r2, [r7]
a0006eb0: e3500001 cmp r0, #1
a0006eb4: e1a02c02 lsl r2, r2, #24
a0006eb8: 9a00000c bls a0006ef0 <_Objects_Set_name+0x70>
a0006ebc: e5d73001 ldrb r3, [r7, #1]
a0006ec0: e3500002 cmp r0, #2
a0006ec4: e1822803 orr r2, r2, r3, lsl #16
a0006ec8: 0a000009 beq a0006ef4 <_Objects_Set_name+0x74>
a0006ecc: e5d73002 ldrb r3, [r7, #2]
a0006ed0: e3500003 cmp r0, #3
a0006ed4: e1822403 orr r2, r2, r3, lsl #8
a0006ed8: 15d73003 ldrbne r3, [r7, #3]
a0006edc: 0a000005 beq a0006ef8 <_Objects_Set_name+0x78>
a0006ee0: e1823003 orr r3, r2, r3
a0006ee4: e586300c str r3, [r6, #12]
a0006ee8: e3a00001 mov r0, #1
);
}
return true;
}
a0006eec: e8bd80f0 pop {r4, r5, r6, r7, pc}
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a0006ef0: e3822602 orr r2, r2, #2097152 ; 0x200000
a0006ef4: e3822a02 orr r2, r2, #8192 ; 0x2000
a0006ef8: e3a03020 mov r3, #32
a0006efc: e1823003 orr r3, r2, r3
a0006f00: e586300c str r3, [r6, #12]
a0006f04: e3a00001 mov r0, #1
);
}
return true;
}
a0006f08: e8bd80f0 pop {r4, r5, r6, r7, pc}
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
a0006f0c: e2800001 add r0, r0, #1
a0006f10: eb00070b bl a0008b44 <_Workspace_Allocate>
if ( !d )
a0006f14: e2505000 subs r5, r0, #0
a0006f18: 0a00000e beq a0006f58 <_Objects_Set_name+0xd8>
return false;
if ( the_object->name.name_p ) {
a0006f1c: e596000c ldr r0, [r6, #12]
a0006f20: e3500000 cmp r0, #0
a0006f24: 0a000002 beq a0006f34 <_Objects_Set_name+0xb4>
_Workspace_Free( (void *)the_object->name.name_p );
a0006f28: eb00070b bl a0008b5c <_Workspace_Free>
the_object->name.name_p = NULL;
a0006f2c: e3a03000 mov r3, #0
a0006f30: e586300c str r3, [r6, #12]
}
strncpy( d, name, length );
a0006f34: e1a01007 mov r1, r7
a0006f38: e1a00005 mov r0, r5
a0006f3c: e1a02004 mov r2, r4
a0006f40: eb0023c8 bl a000fe68 <strncpy>
d[length] = '\0';
a0006f44: e3a03000 mov r3, #0
a0006f48: e7c53004 strb r3, [r5, r4]
the_object->name.name_p = d;
a0006f4c: e3a00001 mov r0, #1
a0006f50: e586500c str r5, [r6, #12]
a0006f54: e8bd80f0 pop {r4, r5, r6, r7, pc}
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
a0006f58: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006f5c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0005fb0 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a0005fb0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a0005fb4: e1a04001 mov r4, r1
a0005fb8: e24dd004 sub sp, sp, #4
a0005fbc: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
a0005fc0: e1a0100d mov r1, sp
a0005fc4: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a0005fc8: e1a08002 mov r8, r2
a0005fcc: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
a0005fd0: eb000076 bl a00061b0 <_POSIX_Mutex_Get>
a0005fd4: e3500000 cmp r0, #0
a0005fd8: 0a00000a beq a0006008 <_POSIX_Condition_variables_Wait_support+0x58>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a0005fdc: e59f30dc ldr r3, [pc, #220] ; a00060c0 <_POSIX_Condition_variables_Wait_support+0x110>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a0005fe0: e1a0100d mov r1, sp
a0005fe4: e1a00006 mov r0, r6
a0005fe8: e5932000 ldr r2, [r3]
a0005fec: e2422001 sub r2, r2, #1
a0005ff0: e5832000 str r2, [r3]
a0005ff4: ebffff76 bl a0005dd4 <_POSIX_Condition_variables_Get>
switch ( location ) {
a0005ff8: e59d3000 ldr r3, [sp]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a0005ffc: e1a0a000 mov sl, r0
switch ( location ) {
a0006000: e3530000 cmp r3, #0
a0006004: 0a000003 beq a0006018 <_POSIX_Condition_variables_Wait_support+0x68>
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
if ( mutex_status )
a0006008: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000600c: e1a00005 mov r0, r5
a0006010: e28dd004 add sp, sp, #4
a0006014: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
a0006018: e5903014 ldr r3, [r0, #20]
a000601c: e3530000 cmp r3, #0
a0006020: 0a000005 beq a000603c <_POSIX_Condition_variables_Wait_support+0x8c>
a0006024: e5942000 ldr r2, [r4]
a0006028: e1530002 cmp r3, r2
a000602c: 0a000002 beq a000603c <_POSIX_Condition_variables_Wait_support+0x8c>
_Thread_Enable_dispatch();
a0006030: eb000c76 bl a0009210 <_Thread_Enable_dispatch>
a0006034: e3a05016 mov r5, #22
return EINVAL;
a0006038: eafffff3 b a000600c <_POSIX_Condition_variables_Wait_support+0x5c>
}
(void) pthread_mutex_unlock( mutex );
a000603c: e1a00004 mov r0, r4
a0006040: eb0000e6 bl a00063e0 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
a0006044: e3570000 cmp r7, #0
a0006048: 0a000006 beq a0006068 <_POSIX_Condition_variables_Wait_support+0xb8>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
a000604c: eb000c6f bl a0009210 <_Thread_Enable_dispatch>
a0006050: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
a0006054: e1a00004 mov r0, r4
a0006058: eb0000bf bl a000635c <pthread_mutex_lock>
if ( mutex_status )
a000605c: e3500000 cmp r0, #0
a0006060: 0affffe9 beq a000600c <_POSIX_Condition_variables_Wait_support+0x5c>
a0006064: eaffffe7 b a0006008 <_POSIX_Condition_variables_Wait_support+0x58>
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a0006068: e59f5054 ldr r5, [pc, #84] ; a00060c4 <_POSIX_Condition_variables_Wait_support+0x114>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a000606c: e5941000 ldr r1, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
a0006070: e28a2018 add r2, sl, #24
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a0006074: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a0006078: e58a1014 str r1, [sl, #20]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000607c: e3a00001 mov r0, #1
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a0006080: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
a0006084: e5961000 ldr r1, [r6]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
a0006088: e5832044 str r2, [r3, #68] ; 0x44
a000608c: e58a0048 str r0, [sl, #72] ; 0x48
_Thread_Executing->Wait.id = *cond;
a0006090: e5831020 str r1, [r3, #32]
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
a0006094: e1a00002 mov r0, r2
a0006098: e1a01008 mov r1, r8
a000609c: e59f2024 ldr r2, [pc, #36] ; a00060c8 <_POSIX_Condition_variables_Wait_support+0x118>
a00060a0: eb000da1 bl a000972c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a00060a4: eb000c59 bl a0009210 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
a00060a8: e5953000 ldr r3, [r5]
a00060ac: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
a00060b0: e3550074 cmp r5, #116 ; 0x74
a00060b4: 13550000 cmpne r5, #0
a00060b8: 0affffe5 beq a0006054 <_POSIX_Condition_variables_Wait_support+0xa4>
a00060bc: eaffffd2 b a000600c <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
a000d764 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000d764: e10f2000 mrs r2, CPSR
a000d768: e3823080 orr r3, r2, #128 ; 0x80
a000d76c: 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 ) {
a000d770: e3a0100c mov r1, #12
a000d774: e0030091 mul r3, r1, r0
a000d778: e59f105c ldr r1, [pc, #92] ; a000d7dc <_POSIX_signals_Clear_process_signals+0x78>
a000d77c: e7911003 ldr r1, [r1, r3]
a000d780: e3510002 cmp r1, #2
a000d784: 0a00000c beq a000d7bc <_POSIX_signals_Clear_process_signals+0x58>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
a000d788: e59f3050 ldr r3, [pc, #80] ; a000d7e0 <_POSIX_signals_Clear_process_signals+0x7c>
a000d78c: e3a0c001 mov ip, #1
a000d790: e2400001 sub r0, r0, #1
a000d794: e5931000 ldr r1, [r3]
a000d798: e1c1001c bic r0, r1, ip, lsl r0
if ( !_POSIX_signals_Pending )
a000d79c: e3500000 cmp r0, #0
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
a000d7a0: e5830000 str r0, [r3]
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
a000d7a4: 059f3038 ldreq r3, [pc, #56] ; a000d7e4 <_POSIX_signals_Clear_process_signals+0x80>
a000d7a8: 05931000 ldreq r1, [r3]
a000d7ac: 02411001 subeq r1, r1, #1
a000d7b0: 05831000 streq r1, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000d7b4: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
a000d7b8: e12fff1e bx lr
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
a000d7bc: e59f1024 ldr r1, [pc, #36] ; a000d7e8 <_POSIX_signals_Clear_process_signals+0x84>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a000d7c0: e791c003 ldr ip, [r1, r3]
a000d7c4: e0813003 add r3, r1, r3
a000d7c8: e2833004 add r3, r3, #4
a000d7cc: e15c0003 cmp ip, r3
a000d7d0: 0affffec beq a000d788 <_POSIX_signals_Clear_process_signals+0x24>
a000d7d4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_POSIX_signals_Pending &= ~mask;
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
}
_ISR_Enable( level );
}
a000d7d8: e12fff1e bx lr <== NOT EXECUTED
a000703c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000703c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
a0007040: e2525000 subs r5, r2, #0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007044: e24dd004 sub sp, sp, #4
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
a0007048: e3a02000 mov r2, #0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000704c: e1a06000 mov r6, r0
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
a0007050: e5812104 str r2, [r1, #260] ; 0x104
a0007054: e5812108 str r2, [r1, #264] ; 0x108
a0007058: e581210c str r2, [r1, #268] ; 0x10c
extensions_area = NULL;
the_thread->libc_reent = NULL;
a000705c: e5812100 str r2, [r1, #256] ; 0x100
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007060: e5dd9030 ldrb r9, [sp, #48] ; 0x30
a0007064: e1a04001 mov r4, r1
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
a0007068: 15c120c0 strbne r2, [r1, #192] ; 0xc0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000706c: e59d802c ldr r8, [sp, #44] ; 0x2c
a0007070: e59d7034 ldr r7, [sp, #52] ; 0x34
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
a0007074: 11a02005 movne r2, r5
a0007078: 11a00003 movne r0, r3
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
a000707c: 0a000043 beq a0007190 <_Thread_Initialize+0x154>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a0007080: e59f5198 ldr r5, [pc, #408] ; a0007220 <_Thread_Initialize+0x1e4>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0007084: e3a0b000 mov fp, #0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a0007088: e58420c8 str r2, [r4, #200] ; 0xc8
a000708c: e595a000 ldr sl, [r5]
a0007090: e584b050 str fp, [r4, #80] ; 0x50
the_stack->size = size;
a0007094: e58400c4 str r0, [r4, #196] ; 0xc4
a0007098: e15a000b cmp sl, fp
the_watchdog->routine = routine;
a000709c: e584b064 str fp, [r4, #100] ; 0x64
the_watchdog->id = id;
a00070a0: e584b068 str fp, [r4, #104] ; 0x68
the_watchdog->user_data = user_data;
a00070a4: e584b06c str fp, [r4, #108] ; 0x6c
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a00070a8: 0584a110 streq sl, [r4, #272] ; 0x110
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a00070ac: 1a000045 bne a00071c8 <_Thread_Initialize+0x18c>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
a00070b0: e59d3038 ldr r3, [sp, #56] ; 0x38
switch ( budget_algorithm ) {
a00070b4: e3570002 cmp r7, #2
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a00070b8: e58470b0 str r7, [r4, #176] ; 0xb0
the_thread->Start.budget_callout = budget_callout;
a00070bc: e58430b4 str r3, [r4, #180] ; 0xb4
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
a00070c0: 059f315c ldreq r3, [pc, #348] ; a0007224 <_Thread_Initialize+0x1e8>
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a00070c4: e3a07000 mov r7, #0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a00070c8: e3a05001 mov r5, #1
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
a00070cc: 05933000 ldreq r3, [r3]
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
a00070d0: e1a01008 mov r1, r8
a00070d4: e1a00004 mov r0, r4
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
a00070d8: 05843078 streq r3, [r4, #120] ; 0x78
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a00070dc: e59d303c ldr r3, [sp, #60] ; 0x3c
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
a00070e0: e5c490ac strb r9, [r4, #172] ; 0xac
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a00070e4: e5845010 str r5, [r4, #16]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a00070e8: e58430b8 str r3, [r4, #184] ; 0xb8
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a00070ec: e5847044 str r7, [r4, #68] ; 0x44
the_thread->resource_count = 0;
a00070f0: e584701c str r7, [r4, #28]
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
a00070f4: e5848018 str r8, [r4, #24]
the_thread->Start.initial_priority = priority;
a00070f8: e58480bc str r8, [r4, #188] ; 0xbc
_Thread_Set_priority( the_thread, priority );
a00070fc: eb0001d7 bl a0007860 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
a0007100: e5847088 str r7, [r4, #136] ; 0x88
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0007104: e59d1040 ldr r1, [sp, #64] ; 0x40
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0007108: e596301c ldr r3, [r6, #28]
a000710c: e1d420b8 ldrh r2, [r4, #8]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0007110: e584100c str r1, [r4, #12]
a0007114: e5847084 str r7, [r4, #132] ; 0x84
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0007118: e7834102 str r4, [r3, r2, lsl #2]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
a000711c: e1a00004 mov r0, r4
a0007120: eb00039a bl a0007f90 <_User_extensions_Thread_create>
if ( extension_status )
a0007124: e1500007 cmp r0, r7
a0007128: 1a000024 bne a00071c0 <_Thread_Initialize+0x184>
return true;
failed:
if ( the_thread->libc_reent )
a000712c: e5940100 ldr r0, [r4, #256] ; 0x100
a0007130: e3500000 cmp r0, #0
a0007134: 0a000000 beq a000713c <_Thread_Initialize+0x100>
_Workspace_Free( the_thread->libc_reent );
a0007138: eb0004b0 bl a0008400 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a000713c: e5940104 ldr r0, [r4, #260] ; 0x104
a0007140: e3500000 cmp r0, #0
a0007144: 0a000000 beq a000714c <_Thread_Initialize+0x110>
_Workspace_Free( the_thread->API_Extensions[i] );
a0007148: eb0004ac bl a0008400 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a000714c: e5940108 ldr r0, [r4, #264] ; 0x108
a0007150: e3500000 cmp r0, #0
a0007154: 0a000000 beq a000715c <_Thread_Initialize+0x120>
_Workspace_Free( the_thread->API_Extensions[i] );
a0007158: eb0004a8 bl a0008400 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a000715c: e594010c ldr r0, [r4, #268] ; 0x10c
a0007160: e3500000 cmp r0, #0
a0007164: 0a000000 beq a000716c <_Thread_Initialize+0x130>
_Workspace_Free( the_thread->API_Extensions[i] );
a0007168: eb0004a4 bl a0008400 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
a000716c: e35a0000 cmp sl, #0
a0007170: 0a000001 beq a000717c <_Thread_Initialize+0x140>
(void) _Workspace_Free( extensions_area );
a0007174: e1a0000a mov r0, sl
a0007178: eb0004a0 bl a0008400 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
a000717c: e1a00004 mov r0, r4
a0007180: eb00026f bl a0007b44 <_Thread_Stack_Free>
a0007184: e3a00000 mov r0, #0
return false;
}
a0007188: e28dd004 add sp, sp, #4
a000718c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a0007190: e1a00001 mov r0, r1
a0007194: e1a01003 mov r1, r3
a0007198: e58d3000 str r3, [sp]
a000719c: eb00024b bl a0007ad0 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
a00071a0: e59d3000 ldr r3, [sp]
a00071a4: e2702001 rsbs r2, r0, #1
a00071a8: 33a02000 movcc r2, #0
a00071ac: e1530000 cmp r3, r0
a00071b0: 91a03002 movls r3, r2
a00071b4: 83823001 orrhi r3, r2, #1
a00071b8: e3530000 cmp r3, #0
a00071bc: 0a000013 beq a0007210 <_Thread_Initialize+0x1d4>
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
a00071c0: e1a00005 mov r0, r5
a00071c4: eaffffef b a0007188 <_Thread_Initialize+0x14c>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
a00071c8: e28aa001 add sl, sl, #1
a00071cc: e1a0010a lsl r0, sl, #2
a00071d0: eb000484 bl a00083e8 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
a00071d4: e250a000 subs sl, r0, #0
a00071d8: 0affffd3 beq a000712c <_Thread_Initialize+0xf0>
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a00071dc: e5950000 ldr r0, [r5]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a00071e0: e584a110 str sl, [r4, #272] ; 0x110
a00071e4: e1a0200a mov r2, sl
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a00071e8: e1a0300b mov r3, fp
the_thread->extensions[i] = NULL;
a00071ec: e1a0100b mov r1, fp
a00071f0: ea000000 b a00071f8 <_Thread_Initialize+0x1bc>
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a00071f4: e5942110 ldr r2, [r4, #272] ; 0x110
a00071f8: e2833001 add r3, r3, #1
a00071fc: e1500003 cmp r0, r3
the_thread->extensions[i] = NULL;
a0007200: e782110b str r1, [r2, fp, lsl #2]
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a0007204: e1a0b003 mov fp, r3
a0007208: 2afffff9 bcs a00071f4 <_Thread_Initialize+0x1b8>
a000720c: eaffffa7 b a00070b0 <_Thread_Initialize+0x74>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
a0007210: e3a03001 mov r3, #1
a0007214: e5c430c0 strb r3, [r4, #192] ; 0xc0
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
a0007218: e59420cc ldr r2, [r4, #204] ; 0xcc
a000721c: eaffff97 b a0007080 <_Thread_Initialize+0x44>
a000754c <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
a000754c: 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
)
{
a0007550: e92d05f0 push {r4, r5, r6, r7, r8, sl}
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0007554: e281503c add r5, r1, #60 ; 0x3c
a0007558: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
a000755c: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
a0007560: e281c038 add ip, 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 ) )
a0007564: e3130020 tst r3, #32
_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 ];
a0007568: e1a04323 lsr r4, r3, #6
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
a000756c: e581503c str r5, [r1, #60] ; 0x3c
a0007570: e3a0500c mov r5, #12
the_chain->last = _Chain_Head(the_chain);
a0007574: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
a0007578: e5906038 ldr r6, [r0, #56] ; 0x38
_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 ];
a000757c: e02c0495 mla ip, r5, r4, r0
a0007580: 159fa17c ldrne sl, [pc, #380] ; a0007704 <_Thread_queue_Enqueue_priority+0x1b8>
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
a0007584: 1a00001c bne a00075fc <_Thread_queue_Enqueue_priority+0xb0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a0007588: e28ca004 add sl, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000758c: e10f8000 mrs r8, CPSR
a0007590: e3884080 orr r4, r8, #128 ; 0x80
a0007594: e129f004 msr CPSR_fc, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
a0007598: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a000759c: e154000a cmp r4, sl
a00075a0: 1a000009 bne a00075cc <_Thread_queue_Enqueue_priority+0x80>
a00075a4: ea000053 b a00076f8 <_Thread_queue_Enqueue_priority+0x1ac>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a00075a8: e10f7000 mrs r7, CPSR
a00075ac: e129f008 msr CPSR_fc, r8
a00075b0: e129f007 msr CPSR_fc, r7
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) ) {
a00075b4: e5947010 ldr r7, [r4, #16]
a00075b8: e1160007 tst r6, r7
a00075bc: 0a000034 beq a0007694 <_Thread_queue_Enqueue_priority+0x148>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
a00075c0: e5944000 ldr r4, [r4]
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 ) ) {
a00075c4: e154000a cmp r4, sl
a00075c8: 0a000002 beq a00075d8 <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
a00075cc: e5945014 ldr r5, [r4, #20]
if ( priority <= search_priority )
a00075d0: e1530005 cmp r3, r5
a00075d4: 8afffff3 bhi a00075a8 <_Thread_queue_Enqueue_priority+0x5c>
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 ) ) {
a00075d8: e1a06008 mov r6, r8
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
a00075dc: e590c030 ldr ip, [r0, #48] ; 0x30
a00075e0: e35c0001 cmp ip, #1
a00075e4: 0a00002c beq a000769c <_Thread_queue_Enqueue_priority+0x150>
* 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;
a00075e8: e5826000 str r6, [r2]
return the_thread_queue->sync_state;
a00075ec: e1a0000c mov r0, ip
}
a00075f0: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
a00075f4: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00075f8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a00075fc: e5da5000 ldrb r5, [sl]
a0007600: e2855001 add r5, r5, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0007604: e10f8000 mrs r8, CPSR
a0007608: e3884080 orr r4, r8, #128 ; 0x80
a000760c: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
a0007610: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a0007614: e154000c cmp r4, ip
a0007618: 1a000009 bne a0007644 <_Thread_queue_Enqueue_priority+0xf8>
a000761c: ea00000b b a0007650 <_Thread_queue_Enqueue_priority+0x104>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a0007620: e10f7000 mrs r7, CPSR
a0007624: e129f008 msr CPSR_fc, r8
a0007628: e129f007 msr CPSR_fc, r7
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) ) {
a000762c: e5947010 ldr r7, [r4, #16]
a0007630: e1160007 tst r6, r7
a0007634: 0affffef beq a00075f8 <_Thread_queue_Enqueue_priority+0xac>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
a0007638: e5944004 ldr r4, [r4, #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 ) ) {
a000763c: e154000c cmp r4, ip
a0007640: 0a000002 beq a0007650 <_Thread_queue_Enqueue_priority+0x104>
search_priority = search_thread->current_priority;
a0007644: e5945014 ldr r5, [r4, #20]
if ( priority >= search_priority )
a0007648: e1530005 cmp r3, r5
a000764c: 3afffff3 bcc a0007620 <_Thread_queue_Enqueue_priority+0xd4>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a0007650: e590c030 ldr ip, [r0, #48] ; 0x30
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 ) ) {
a0007654: e1a06008 mov r6, r8
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a0007658: e35c0001 cmp ip, #1
a000765c: 1affffe1 bne a00075e8 <_Thread_queue_Enqueue_priority+0x9c>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a0007660: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a0007664: e3a03000 mov r3, #0
a0007668: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a000766c: 0a000017 beq a00076d0 <_Thread_queue_Enqueue_priority+0x184>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
a0007670: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
a0007674: e5814004 str r4, [r1, #4]
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a0007678: e5810044 str r0, [r1, #68] ; 0x44
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
a000767c: e5813000 str r3, [r1]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
a0007680: 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;
a0007684: e5841000 str r1, [r4]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0007688: e129f008 msr CPSR_fc, r8
a000768c: e3a00001 mov r0, #1
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0007690: eaffffd6 b a00075f0 <_Thread_queue_Enqueue_priority+0xa4>
a0007694: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
a0007698: eaffffbb b a000758c <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a000769c: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a00076a0: e3a03000 mov r3, #0
a00076a4: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a00076a8: 0a000008 beq a00076d0 <_Thread_queue_Enqueue_priority+0x184>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
a00076ac: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a00076b0: e5814000 str r4, [r1]
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a00076b4: e5810044 str r0, [r1, #68] ; 0x44
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
a00076b8: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a00076bc: e5831000 str r1, [r3]
search_node->previous = the_node;
a00076c0: e5841004 str r1, [r4, #4]
a00076c4: e129f008 msr CPSR_fc, r8
a00076c8: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a00076cc: eaffffc7 b a00075f0 <_Thread_queue_Enqueue_priority+0xa4>
a00076d0: e284403c add r4, r4, #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;
a00076d4: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a00076d8: e5814000 str r4, [r1]
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a00076dc: e5810044 str r0, [r1, #68] ; 0x44
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
a00076e0: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a00076e4: e5831000 str r1, [r3]
search_node->previous = the_node;
a00076e8: e5841004 str r1, [r4, #4]
a00076ec: e129f006 msr CPSR_fc, r6
a00076f0: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a00076f4: eaffffbd b a00075f0 <_Thread_queue_Enqueue_priority+0xa4>
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 ) ) {
a00076f8: e1a06008 mov r6, r8
a00076fc: e3e05000 mvn r5, #0
a0007700: eaffffb5 b a00075dc <_Thread_queue_Enqueue_priority+0x90>
a00160f4 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a00160f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00160f8: e24dd024 sub sp, sp, #36 ; 0x24
a00160fc: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
a0016100: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a0016104: e28d0018 add r0, sp, #24
a0016108: e28d700c add r7, sp, #12
a001610c: e59f91c8 ldr r9, [pc, #456] ; a00162dc <_Timer_server_Body+0x1e8>
a0016110: e59fb1c8 ldr fp, [pc, #456] ; a00162e0 <_Timer_server_Body+0x1ec>
a0016114: e280a004 add sl, r0, #4
a0016118: e2872004 add r2, r7, #4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
a001611c: e58d301c str r3, [sp, #28]
the_chain->last = _Chain_Head(the_chain);
a0016120: e58d0020 str r0, [sp, #32]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
a0016124: e58d3010 str r3, [sp, #16]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a0016128: e2840040 add r0, r4, #64 ; 0x40
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
a001612c: e2843008 add r3, r4, #8
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a0016130: e58d2000 str r2, [sp]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a0016134: e58da018 str sl, [sp, #24]
a0016138: e58d200c str r2, [sp, #12]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
a001613c: e58d7014 str r7, [sp, #20]
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0016140: e2846030 add r6, r4, #48 ; 0x30
/*
* 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 );
a0016144: e2848068 add r8, r4, #104 ; 0x68
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
a0016148: e98d0009 stmib sp, {r0, r3}
{
/*
* 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;
a001614c: e28d2018 add r2, sp, #24
a0016150: e5842078 str r2, [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;
a0016154: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a0016158: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a001615c: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a0016160: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a0016164: e0611003 rsb r1, r1, r3
a0016168: e1a02007 mov r2, r7
a001616c: eb00112d bl a001a628 <_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();
a0016170: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a0016174: e5941074 ldr r1, [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 ) {
a0016178: e1550001 cmp r5, r1
a001617c: 8a000022 bhi a001620c <_Timer_server_Body+0x118>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
a0016180: 3a000018 bcc a00161e8 <_Timer_server_Body+0xf4>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
a0016184: 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 );
a0016188: e5940078 ldr r0, [r4, #120] ; 0x78
a001618c: eb00025d bl a0016b08 <_Chain_Get>
if ( timer == NULL ) {
a0016190: e3500000 cmp r0, #0
a0016194: 0a00000b beq a00161c8 <_Timer_server_Body+0xd4>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a0016198: e5903038 ldr r3, [r0, #56] ; 0x38
a001619c: e3530001 cmp r3, #1
a00161a0: 0a000015 beq a00161fc <_Timer_server_Body+0x108>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a00161a4: e3530003 cmp r3, #3
a00161a8: 1afffff6 bne a0016188 <_Timer_server_Body+0x94>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a00161ac: e2801010 add r1, r0, #16
a00161b0: e1a00008 mov r0, r8
a00161b4: eb00114a bl a001a6e4 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a00161b8: e5940078 ldr r0, [r4, #120] ; 0x78
a00161bc: eb000251 bl a0016b08 <_Chain_Get>
if ( timer == NULL ) {
a00161c0: e3500000 cmp r0, #0
a00161c4: 1afffff3 bne a0016198 <_Timer_server_Body+0xa4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00161c8: e10f2000 mrs r2, CPSR
a00161cc: e3823080 orr r3, r2, #128 ; 0x80
a00161d0: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
a00161d4: e59d3018 ldr r3, [sp, #24]
a00161d8: e15a0003 cmp sl, r3
a00161dc: 0a00000f beq a0016220 <_Timer_server_Body+0x12c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00161e0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a00161e4: eaffffda b a0016154 <_Timer_server_Body+0x60> <== 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 );
a00161e8: e0652001 rsb r2, r5, r1
a00161ec: e1a00008 mov r0, r8
a00161f0: e3a01001 mov r1, #1
a00161f4: eb0010dc bl a001a56c <_Watchdog_Adjust>
a00161f8: eaffffe1 b a0016184 <_Timer_server_Body+0x90>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a00161fc: e2801010 add r1, r0, #16
a0016200: e1a00006 mov r0, r6
a0016204: eb001136 bl a001a6e4 <_Watchdog_Insert>
a0016208: eaffffde b a0016188 <_Timer_server_Body+0x94>
/*
* 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 );
a001620c: e0611005 rsb r1, r1, r5
a0016210: e1a00008 mov r0, r8
a0016214: e1a02007 mov r2, r7
a0016218: eb001102 bl a001a628 <_Watchdog_Adjust_to_chain>
a001621c: eaffffd8 b a0016184 <_Timer_server_Body+0x90>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
a0016220: e5840078 str r0, [r4, #120] ; 0x78
a0016224: 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 ) ) {
a0016228: e59d300c ldr r3, [sp, #12]
a001622c: e59d0000 ldr r0, [sp]
a0016230: e1500003 cmp r0, r3
a0016234: 159d5000 ldrne r5, [sp]
a0016238: 1a00000a bne a0016268 <_Timer_server_Body+0x174>
a001623c: ea000011 b a0016288 <_Timer_server_Body+0x194>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
a0016240: e5923000 ldr r3, [r2]
* 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;
a0016244: e3a00000 mov r0, #0
a0016248: e5820008 str r0, [r2, #8]
the_chain->first = new_first;
a001624c: e58d300c str r3, [sp, #12]
new_first->previous = _Chain_Head(the_chain);
a0016250: e5837004 str r7, [r3, #4]
a0016254: 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 );
a0016258: e5921024 ldr r1, [r2, #36] ; 0x24
a001625c: e592301c ldr r3, [r2, #28]
a0016260: e5920020 ldr r0, [r2, #32]
a0016264: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0016268: e10f1000 mrs r1, CPSR
a001626c: e3813080 orr r3, r1, #128 ; 0x80
a0016270: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a0016274: e59d200c ldr r2, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0016278: e1550002 cmp r5, r2
a001627c: 1affffef bne a0016240 <_Timer_server_Body+0x14c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0016280: e129f001 msr CPSR_fc, r1
a0016284: eaffffb0 b a001614c <_Timer_server_Body+0x58>
a0016288: e59f0054 ldr r0, [pc, #84] ; a00162e4 <_Timer_server_Body+0x1f0>
}
} else {
ts->active = false;
a001628c: e3a02000 mov r2, #0
a0016290: e5c4207c strb r2, [r4, #124] ; 0x7c
a0016294: e5903000 ldr r3, [r0]
a0016298: e2833001 add r3, r3, #1
a001629c: e5803000 str r3, [r0]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
a00162a0: e3a01008 mov r1, #8
a00162a4: e5940000 ldr r0, [r4]
a00162a8: eb000e31 bl a0019b74 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a00162ac: e1a00004 mov r0, r4
a00162b0: ebffff63 bl a0016044 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a00162b4: e1a00004 mov r0, r4
a00162b8: ebffff77 bl a001609c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a00162bc: eb000b6c bl a0019074 <_Thread_Enable_dispatch>
ts->active = true;
a00162c0: e3a02001 mov r2, #1
a00162c4: e5c4207c strb r2, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
a00162c8: e59d0008 ldr r0, [sp, #8]
a00162cc: eb001171 bl a001a898 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a00162d0: e59d0004 ldr r0, [sp, #4]
a00162d4: eb00116f bl a001a898 <_Watchdog_Remove>
a00162d8: eaffff9b b a001614c <_Timer_server_Body+0x58>
a000a05c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000a05c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000a060: e1a04000 mov r4, r0
a000a064: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a068: e10f3000 mrs r3, CPSR
a000a06c: e3832080 orr r2, r3, #128 ; 0x80
a000a070: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a000a074: e1a07000 mov r7, r0
a000a078: 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 ) ) {
a000a07c: e1520007 cmp r2, r7
a000a080: 0a000018 beq a000a0e8 <_Watchdog_Adjust+0x8c>
switch ( direction ) {
a000a084: e3510000 cmp r1, #0
a000a088: 1a000018 bne a000a0f0 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a08c: e3550000 cmp r5, #0
a000a090: 0a000014 beq a000a0e8 <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a094: e5926010 ldr r6, [r2, #16]
a000a098: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a09c: 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 ) {
a000a0a0: 2a000005 bcs a000a0bc <_Watchdog_Adjust+0x60>
a000a0a4: ea000018 b a000a10c <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000a0a8: e0555006 subs r5, r5, r6
a000a0ac: 0a00000d beq a000a0e8 <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000a0b0: e5926010 ldr r6, [r2, #16]
a000a0b4: e1560005 cmp r6, r5
a000a0b8: 8a000013 bhi a000a10c <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000a0bc: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a0c0: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000a0c4: e1a00004 mov r0, r4
a000a0c8: eb0000aa bl a000a378 <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a0cc: e10f3000 mrs r3, CPSR
a000a0d0: e3832080 orr r2, r3, #128 ; 0x80
a000a0d4: e129f002 msr CPSR_fc, r2
a000a0d8: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000a0dc: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
a000a0e0: e1a02001 mov r2, r1
a000a0e4: 1affffef bne a000a0a8 <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a0e8: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a0ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000a0f0: e3510001 cmp r1, #1
a000a0f4: 1afffffb bne a000a0e8 <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000a0f8: e5921010 ldr r1, [r2, #16]
a000a0fc: e0815005 add r5, r1, r5
a000a100: e5825010 str r5, [r2, #16]
a000a104: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000a108: 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;
a000a10c: e0655006 rsb r5, r5, r6
a000a110: e5825010 str r5, [r2, #16]
break;
a000a114: eafffff3 b a000a0e8 <_Watchdog_Adjust+0x8c>
a000d484 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
a000d484: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000d488: e24dd00c sub sp, sp, #12
a000d48c: e1a04000 mov r4, r0
a000d490: e1a05001 mov r5, r1
a000d494: e1a07002 mov r7, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
a000d498: ebfffc15 bl a000c4f4 <getpid>
a000d49c: e1500004 cmp r0, r4
a000d4a0: 1a000097 bne a000d704 <killinfo+0x280>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
a000d4a4: e3550000 cmp r5, #0
a000d4a8: 0a00009a beq a000d718 <killinfo+0x294>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a000d4ac: e2453001 sub r3, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a000d4b0: e353001f cmp r3, #31
a000d4b4: 8a000097 bhi a000d718 <killinfo+0x294>
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 )
a000d4b8: e59f6284 ldr r6, [pc, #644] ; a000d744 <killinfo+0x2c0>
a000d4bc: e3a0100c mov r1, #12
a000d4c0: e0226591 mla r2, r1, r5, r6
a000d4c4: e5922008 ldr r2, [r2, #8]
a000d4c8: e3520001 cmp r2, #1
a000d4cc: 0a00003a beq a000d5bc <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 ) )
a000d4d0: e3550008 cmp r5, #8
a000d4d4: 13550004 cmpne r5, #4
a000d4d8: 0a00003a beq a000d5c8 <killinfo+0x144>
a000d4dc: e355000b cmp r5, #11
a000d4e0: 0a000038 beq a000d5c8 <killinfo+0x144>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a000d4e4: e3a04001 mov r4, #1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
a000d4e8: e3570000 cmp r7, #0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
a000d4ec: e58d4004 str r4, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
a000d4f0: e58d5000 str r5, [sp]
a000d4f4: e1a04314 lsl r4, r4, r3
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
a000d4f8: 15973000 ldrne r3, [r7]
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
a000d4fc: 058d7008 streq r7, [sp, #8]
} else {
siginfo->si_value = *value;
a000d500: 158d3008 strne r3, [sp, #8]
a000d504: e59f323c ldr r3, [pc, #572] ; a000d748 <killinfo+0x2c4>
a000d508: e5932000 ldr r2, [r3]
a000d50c: e2822001 add r2, r2, #1
a000d510: 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;
a000d514: e59f3230 ldr r3, [pc, #560] ; a000d74c <killinfo+0x2c8>
a000d518: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000d51c: e5903108 ldr r3, [r0, #264] ; 0x108
a000d520: e59330cc ldr r3, [r3, #204] ; 0xcc
a000d524: e1d43003 bics r3, r4, r3
a000d528: 1a000014 bne a000d580 <killinfo+0xfc>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
a000d52c: e59fc21c ldr ip, [pc, #540] ; a000d750 <killinfo+0x2cc>
a000d530: e49c3004 ldr r3, [ip], #4
a000d534: e153000c cmp r3, ip
a000d538: 0a00003a beq a000d628 <killinfo+0x1a4>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a000d53c: 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;
a000d540: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000d544: e5931108 ldr r1, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a000d548: e1140002 tst r4, r2
a000d54c: 0a000008 beq a000d574 <killinfo+0xf0>
a000d550: ea00000a b a000d580 <killinfo+0xfc>
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 ) {
a000d554: 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 ;
a000d558: e153000c cmp r3, ip
a000d55c: 0a000031 beq a000d628 <killinfo+0x1a4>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a000d560: 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 ];
a000d564: 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;
a000d568: e1a00003 mov r0, r3 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a000d56c: e1140002 tst r4, r2 <== NOT EXECUTED
a000d570: 1a000002 bne a000d580 <killinfo+0xfc> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
a000d574: e59120cc ldr r2, [r1, #204] ; 0xcc
a000d578: e1d42002 bics r2, r4, r2
a000d57c: 0afffff4 beq a000d554 <killinfo+0xd0>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
a000d580: e3a03001 mov r3, #1
a000d584: e5c03074 strb r3, [r0, #116] ; 0x74
/*
* 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 ) ) {
a000d588: e1a01005 mov r1, r5
a000d58c: e1a0200d mov r2, sp
a000d590: eb0000a7 bl a000d834 <_POSIX_signals_Unblock_thread>
a000d594: e3500000 cmp r0, #0
a000d598: 1a00001f bne a000d61c <killinfo+0x198>
/*
* 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 );
a000d59c: e1a00004 mov r0, r4
a000d5a0: eb000091 bl a000d7ec <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
a000d5a4: e3a0300c mov r3, #12
a000d5a8: e0040593 mul r4, r3, r5
a000d5ac: e7963004 ldr r3, [r6, r4]
a000d5b0: e3530002 cmp r3, #2
a000d5b4: 0a000007 beq a000d5d8 <killinfo+0x154>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
a000d5b8: ebffe671 bl a0006f84 <_Thread_Enable_dispatch>
a000d5bc: e3a00000 mov r0, #0
return 0;
}
a000d5c0: e28dd00c add sp, sp, #12
a000d5c4: 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 );
a000d5c8: eb000128 bl a000da70 <pthread_self>
a000d5cc: e1a01005 mov r1, r5
a000d5d0: eb0000e8 bl a000d978 <pthread_kill>
a000d5d4: eafffff9 b a000d5c0 <killinfo+0x13c>
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
a000d5d8: e59f0174 ldr r0, [pc, #372] ; a000d754 <killinfo+0x2d0>
a000d5dc: ebffe09f bl a0005860 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
a000d5e0: e2503000 subs r3, r0, #0
a000d5e4: 0a000050 beq a000d72c <killinfo+0x2a8>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a000d5e8: e59d1000 ldr r1, [sp]
a000d5ec: e28d2004 add r2, sp, #4
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a000d5f0: e59f0160 ldr r0, [pc, #352] ; a000d758 <killinfo+0x2d4>
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a000d5f4: e5831008 str r1, [r3, #8]
a000d5f8: e492c004 ldr ip, [r2], #4
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a000d5fc: e0800004 add r0, r0, r4
a000d600: e1a01003 mov r1, r3
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a000d604: e583c00c str ip, [r3, #12]
a000d608: e5922000 ldr r2, [r2]
a000d60c: e5832010 str r2, [r3, #16]
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a000d610: ebffe087 bl a0005834 <_Chain_Append>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
a000d614: ebffe65a bl a0006f84 <_Thread_Enable_dispatch>
a000d618: eaffffe7 b a000d5bc <killinfo+0x138>
/*
* 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 ) ) {
_Thread_Enable_dispatch();
a000d61c: ebffe658 bl a0006f84 <_Thread_Enable_dispatch>
a000d620: e3a00000 mov r0, #0
return 0;
a000d624: eaffffe5 b a000d5c0 <killinfo+0x13c>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a000d628: e59f312c ldr r3, [pc, #300] ; a000d75c <killinfo+0x2d8>
a000d62c: e59fa12c ldr sl, [pc, #300] ; a000d760 <killinfo+0x2dc>
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
a000d630: e3a00000 mov r0, #0
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a000d634: e5d3c000 ldrb ip, [r3]
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
a000d638: e28a900c add r9, sl, #12
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a000d63c: e28cc001 add ip, ip, #1
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
a000d640: e59a3008 ldr r3, [sl, #8]
a000d644: e3530000 cmp r3, #0
a000d648: 0a000020 beq a000d6d0 <killinfo+0x24c>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
a000d64c: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
a000d650: e1d3e1b0 ldrh lr, [r3, #16]
object_table = the_info->local_table;
a000d654: e593701c ldr r7, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
a000d658: e35e0000 cmp lr, #0
a000d65c: 0a00001b beq a000d6d0 <killinfo+0x24c>
a000d660: e3a03001 mov r3, #1
the_thread = (Thread_Control *) object_table[ index ];
a000d664: e7972103 ldr r2, [r7, r3, lsl #2]
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a000d668: e2833001 add r3, r3, #1
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
a000d66c: e3520000 cmp r2, #0
a000d670: 0a000014 beq a000d6c8 <killinfo+0x244>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
a000d674: e5921014 ldr r1, [r2, #20]
a000d678: e151000c cmp r1, ip
a000d67c: 8a000011 bhi a000d6c8 <killinfo+0x244>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000d680: e5928108 ldr r8, [r2, #264] ; 0x108
a000d684: e59880cc ldr r8, [r8, #204] ; 0xcc
a000d688: e1d48008 bics r8, r4, r8
a000d68c: 0a00000d beq a000d6c8 <killinfo+0x244>
*
* 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 ) {
a000d690: e151000c cmp r1, ip
a000d694: 3a000009 bcc a000d6c0 <killinfo+0x23c>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
a000d698: e5908010 ldr r8, [r0, #16]
a000d69c: e3580000 cmp r8, #0
a000d6a0: 0a000008 beq a000d6c8 <killinfo+0x244>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a000d6a4: e592b010 ldr fp, [r2, #16]
a000d6a8: e35b0000 cmp fp, #0
a000d6ac: 0a000003 beq a000d6c0 <killinfo+0x23c>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
a000d6b0: e3180201 tst r8, #268435456 ; 0x10000000
a000d6b4: 1a000003 bne a000d6c8 <killinfo+0x244>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
a000d6b8: e31b0201 tst fp, #268435456 ; 0x10000000
a000d6bc: 0a000001 beq a000d6c8 <killinfo+0x244>
a000d6c0: e1a0c001 mov ip, r1
a000d6c4: e1a00002 mov r0, r2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a000d6c8: e15e0003 cmp lr, r3
a000d6cc: 2affffe4 bcs a000d664 <killinfo+0x1e0>
a000d6d0: e28aa004 add sl, sl, #4
* + 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++) {
a000d6d4: e15a0009 cmp sl, r9
a000d6d8: 1affffd8 bne a000d640 <killinfo+0x1bc>
}
}
}
}
if ( interested ) {
a000d6dc: e3500000 cmp r0, #0
a000d6e0: 0affffad beq a000d59c <killinfo+0x118>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
a000d6e4: e3a03001 mov r3, #1
a000d6e8: e5c03074 strb r3, [r0, #116] ; 0x74
/*
* 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 ) ) {
a000d6ec: e1a01005 mov r1, r5
a000d6f0: e1a0200d mov r2, sp
a000d6f4: eb00004e bl a000d834 <_POSIX_signals_Unblock_thread>
a000d6f8: e3500000 cmp r0, #0
a000d6fc: 0affffa6 beq a000d59c <killinfo+0x118>
a000d700: eaffffc5 b a000d61c <killinfo+0x198> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
a000d704: eb000108 bl a000db2c <__errno>
a000d708: e3a03003 mov r3, #3
a000d70c: e5803000 str r3, [r0]
a000d710: e3e00000 mvn r0, #0
a000d714: eaffffa9 b a000d5c0 <killinfo+0x13c>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
a000d718: eb000103 bl a000db2c <__errno>
a000d71c: e3a03016 mov r3, #22
a000d720: e5803000 str r3, [r0]
a000d724: e3e00000 mvn r0, #0
a000d728: eaffffa4 b a000d5c0 <killinfo+0x13c>
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();
a000d72c: ebffe614 bl a0006f84 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
a000d730: eb0000fd bl a000db2c <__errno>
a000d734: e3a0300b mov r3, #11
a000d738: e5803000 str r3, [r0]
a000d73c: e3e00000 mvn r0, #0
a000d740: eaffff9e b a000d5c0 <killinfo+0x13c>
a00061c8 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a00061c8: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a00061cc: e2505000 subs r5, r0, #0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a00061d0: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a00061d4: 0a00001d beq a0006250 <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 );
a00061d8: e1a00001 mov r0, r1
a00061dc: e28d1004 add r1, sp, #4
a00061e0: eb001986 bl a000c800 <_POSIX_Absolute_timeout_to_ticks>
a00061e4: e5951000 ldr r1, [r5]
a00061e8: e1a04000 mov r4, r0
a00061ec: e28d2008 add r2, sp, #8
a00061f0: e59f0090 ldr r0, [pc, #144] ; a0006288 <pthread_rwlock_timedrdlock+0xc0>
a00061f4: eb000a81 bl a0008c00 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a00061f8: e59dc008 ldr ip, [sp, #8]
a00061fc: e35c0000 cmp ip, #0
a0006200: 1a000012 bne a0006250 <pthread_rwlock_timedrdlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a0006204: 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,
a0006208: e3540003 cmp r4, #3
a000620c: 13a05000 movne r5, #0
a0006210: 03a05001 moveq r5, #1
a0006214: e2800010 add r0, r0, #16
a0006218: e59d3004 ldr r3, [sp, #4]
a000621c: e1a02005 mov r2, r5
a0006220: e58dc000 str ip, [sp]
a0006224: eb000722 bl a0007eb4 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a0006228: eb000cb6 bl a0009508 <_Thread_Enable_dispatch>
if ( !do_wait ) {
a000622c: e3550000 cmp r5, #0
a0006230: 1a00000f bne a0006274 <pthread_rwlock_timedrdlock+0xac>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
a0006234: e59f3050 ldr r3, [pc, #80] ; a000628c <pthread_rwlock_timedrdlock+0xc4>
a0006238: e5933000 ldr r3, [r3]
a000623c: e5930034 ldr r0, [r3, #52] ; 0x34
a0006240: e3500002 cmp r0, #2
a0006244: 0a000004 beq a000625c <pthread_rwlock_timedrdlock+0x94>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a0006248: eb000042 bl a0006358 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000624c: ea000000 b a0006254 <pthread_rwlock_timedrdlock+0x8c>
a0006250: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a0006254: e28dd00c add sp, sp, #12
a0006258: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
a000625c: e3540000 cmp r4, #0
a0006260: 0afffffa beq a0006250 <pthread_rwlock_timedrdlock+0x88>
a0006264: e3540002 cmp r4, #2
a0006268: 93a00074 movls r0, #116 ; 0x74
a000626c: 9afffff8 bls a0006254 <pthread_rwlock_timedrdlock+0x8c>
a0006270: eafffff4 b a0006248 <pthread_rwlock_timedrdlock+0x80> <== NOT EXECUTED
a0006274: e59f3010 ldr r3, [pc, #16] ; a000628c <pthread_rwlock_timedrdlock+0xc4>
a0006278: e5933000 ldr r3, [r3]
a000627c: e5930034 ldr r0, [r3, #52] ; 0x34
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a0006280: eb000034 bl a0006358 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a0006284: eafffff2 b a0006254 <pthread_rwlock_timedrdlock+0x8c>
a0006290 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a0006290: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a0006294: e2505000 subs r5, r0, #0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a0006298: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000629c: 0a00001d beq a0006318 <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 );
a00062a0: e1a00001 mov r0, r1
a00062a4: e28d1004 add r1, sp, #4
a00062a8: eb001954 bl a000c800 <_POSIX_Absolute_timeout_to_ticks>
a00062ac: e5951000 ldr r1, [r5]
a00062b0: e1a04000 mov r4, r0
a00062b4: e28d2008 add r2, sp, #8
a00062b8: e59f0090 ldr r0, [pc, #144] ; a0006350 <pthread_rwlock_timedwrlock+0xc0>
a00062bc: eb000a4f bl a0008c00 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a00062c0: e59dc008 ldr ip, [sp, #8]
a00062c4: e35c0000 cmp ip, #0
a00062c8: 1a000012 bne a0006318 <pthread_rwlock_timedwrlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a00062cc: 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,
a00062d0: e3540003 cmp r4, #3
a00062d4: 13a05000 movne r5, #0
a00062d8: 03a05001 moveq r5, #1
a00062dc: e2800010 add r0, r0, #16
a00062e0: e59d3004 ldr r3, [sp, #4]
a00062e4: e1a02005 mov r2, r5
a00062e8: e58dc000 str ip, [sp]
a00062ec: eb000727 bl a0007f90 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a00062f0: eb000c84 bl a0009508 <_Thread_Enable_dispatch>
if ( !do_wait &&
a00062f4: e3550000 cmp r5, #0
a00062f8: 1a00000f bne a000633c <pthread_rwlock_timedwrlock+0xac>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
a00062fc: e59f3050 ldr r3, [pc, #80] ; a0006354 <pthread_rwlock_timedwrlock+0xc4>
a0006300: e5933000 ldr r3, [r3]
a0006304: e5930034 ldr r0, [r3, #52] ; 0x34
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
a0006308: e3500002 cmp r0, #2
a000630c: 0a000004 beq a0006324 <pthread_rwlock_timedwrlock+0x94>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a0006310: eb000010 bl a0006358 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a0006314: ea000000 b a000631c <pthread_rwlock_timedwrlock+0x8c>
a0006318: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000631c: e28dd00c add sp, sp, #12
a0006320: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
a0006324: e3540000 cmp r4, #0
a0006328: 0afffffa beq a0006318 <pthread_rwlock_timedwrlock+0x88>
a000632c: e3540002 cmp r4, #2
a0006330: 93a00074 movls r0, #116 ; 0x74
a0006334: 9afffff8 bls a000631c <pthread_rwlock_timedwrlock+0x8c>
a0006338: eafffff4 b a0006310 <pthread_rwlock_timedwrlock+0x80> <== NOT EXECUTED
a000633c: e59f3010 ldr r3, [pc, #16] ; a0006354 <pthread_rwlock_timedwrlock+0xc4>
a0006340: e5933000 ldr r3, [r3]
a0006344: e5930034 ldr r0, [r3, #52] ; 0x34
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a0006348: eb000002 bl a0006358 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000634c: eafffff2 b a000631c <pthread_rwlock_timedwrlock+0x8c>
a00054c8 <pthread_testcancel>:
* 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() )
a00054c8: e59f3060 ldr r3, [pc, #96] ; a0005530 <pthread_testcancel+0x68>
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
a00054cc: 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() )
a00054d0: e5933000 ldr r3, [r3]
a00054d4: e3530000 cmp r3, #0
a00054d8: 1a000011 bne a0005524 <pthread_testcancel+0x5c>
a00054dc: e59f3050 ldr r3, [pc, #80] ; a0005534 <pthread_testcancel+0x6c>
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a00054e0: e59f4050 ldr r4, [pc, #80] ; a0005538 <pthread_testcancel+0x70>
a00054e4: e5931000 ldr r1, [r3]
a00054e8: e5942000 ldr r2, [r4]
a00054ec: e2811001 add r1, r1, #1
a00054f0: e5831000 str r1, [r3]
a00054f4: e5923108 ldr r3, [r2, #264] ; 0x108
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
a00054f8: e59320d4 ldr r2, [r3, #212] ; 0xd4
a00054fc: e3520000 cmp r2, #0
a0005500: 1a000008 bne a0005528 <pthread_testcancel+0x60>
thread_support->cancelation_requested )
a0005504: e59330dc ldr r3, [r3, #220] ; 0xdc
a0005508: e3530000 cmp r3, #0
a000550c: 0a000005 beq a0005528 <pthread_testcancel+0x60>
cancel = true;
_Thread_Enable_dispatch();
a0005510: eb000996 bl a0007b70 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a0005514: e5940000 ldr r0, [r4]
a0005518: e3e01000 mvn r1, #0
}
a000551c: e8bd4010 pop {r4, lr}
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a0005520: ea0016f4 b a000b0f8 <_POSIX_Thread_Exit>
a0005524: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
a0005528: e8bd4010 pop {r4, lr}
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a000552c: ea00098f b a0007b70 <_Thread_Enable_dispatch>
a0006ef0 <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
)
{
a0006ef0: e92d4010 push {r4, lr}
a0006ef4: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a0006ef8: e59f0148 ldr r0, [pc, #328] ; a0007048 <rtems_io_register_driver+0x158>
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;
a0006efc: e59f3148 ldr r3, [pc, #328] ; a000704c <rtems_io_register_driver+0x15c>
if ( rtems_interrupt_is_in_progress() )
a0006f00: e5900000 ldr r0, [r0]
a0006f04: 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;
a0006f08: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
a0006f0c: 1a000032 bne a0006fdc <rtems_io_register_driver+0xec>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
a0006f10: e3520000 cmp r2, #0
a0006f14: 0a000040 beq a000701c <rtems_io_register_driver+0x12c>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a0006f18: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a0006f1c: e5820000 str r0, [r2]
if ( driver_table == NULL )
a0006f20: 0a00003d beq a000701c <rtems_io_register_driver+0x12c>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0006f24: e591c000 ldr ip, [r1]
a0006f28: e35c0000 cmp ip, #0
a0006f2c: 0a000037 beq a0007010 <rtems_io_register_driver+0x120>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
a0006f30: e1500004 cmp r0, r4
a0006f34: 9a000026 bls a0006fd4 <rtems_io_register_driver+0xe4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0006f38: e59f0110 ldr r0, [pc, #272] ; a0007050 <rtems_io_register_driver+0x160>
a0006f3c: e590c000 ldr ip, [r0]
a0006f40: e28cc001 add ip, ip, #1
a0006f44: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a0006f48: e3540000 cmp r4, #0
a0006f4c: 1a000024 bne a0006fe4 <rtems_io_register_driver+0xf4>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
a0006f50: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a0006f54: e35c0000 cmp ip, #0
a0006f58: 0a000031 beq a0007024 <rtems_io_register_driver+0x134>
a0006f5c: e59f30f0 ldr r3, [pc, #240] ; a0007054 <rtems_io_register_driver+0x164>
a0006f60: e593e000 ldr lr, [r3]
a0006f64: e1a0300e mov r3, lr
a0006f68: ea000003 b a0006f7c <rtems_io_register_driver+0x8c>
a0006f6c: e2844001 add r4, r4, #1
a0006f70: e15c0004 cmp ip, r4
a0006f74: e2833018 add r3, r3, #24
a0006f78: 9a000005 bls a0006f94 <rtems_io_register_driver+0xa4>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0006f7c: e5930000 ldr r0, [r3]
a0006f80: e3500000 cmp r0, #0
a0006f84: 1afffff8 bne a0006f6c <rtems_io_register_driver+0x7c>
a0006f88: e5930004 ldr r0, [r3, #4]
a0006f8c: e3500000 cmp r0, #0
a0006f90: 1afffff5 bne a0006f6c <rtems_io_register_driver+0x7c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a0006f94: e15c0004 cmp ip, r4
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0006f98: e5824000 str r4, [r2]
if ( m != n )
a0006f9c: 0a000021 beq a0007028 <rtems_io_register_driver+0x138>
a0006fa0: e3a03018 mov r3, #24
a0006fa4: e02ce493 mla ip, r3, r4, lr
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a0006fa8: e1a0e001 mov lr, r1
a0006fac: e8be000f ldm lr!, {r0, r1, r2, r3}
a0006fb0: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006fb4: e89e0003 ldm lr, {r0, r1}
a0006fb8: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
a0006fbc: eb0006ae bl a0008a7c <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a0006fc0: e3a01000 mov r1, #0
a0006fc4: e1a00004 mov r0, r4
a0006fc8: e1a02001 mov r2, r1
}
a0006fcc: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a0006fd0: ea0023bf b a000fed4 <rtems_io_initialize>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
a0006fd4: e3a0000a mov r0, #10
a0006fd8: e8bd8010 pop {r4, pc}
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a0006fdc: e3a00012 mov r0, #18
a0006fe0: e8bd8010 pop {r4, pc}
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a0006fe4: e3a00018 mov r0, #24
a0006fe8: e0030490 mul r3, r0, r4
a0006fec: e59f0060 ldr r0, [pc, #96] ; a0007054 <rtems_io_register_driver+0x164>
a0006ff0: e590c000 ldr ip, [r0]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0006ff4: e79c0003 ldr r0, [ip, r3]
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a0006ff8: e08cc003 add ip, ip, r3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0006ffc: e3500000 cmp r0, #0
a0007000: 0a00000b beq a0007034 <rtems_io_register_driver+0x144>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
a0007004: eb00069c bl a0008a7c <_Thread_Enable_dispatch>
a0007008: e3a0000c mov r0, #12
return RTEMS_RESOURCE_IN_USE;
a000700c: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0007010: e591c004 ldr ip, [r1, #4]
a0007014: e35c0000 cmp ip, #0
a0007018: 1affffc4 bne a0006f30 <rtems_io_register_driver+0x40>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a000701c: e3a00009 mov r0, #9
}
a0007020: e8bd8010 pop {r4, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a0007024: 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();
a0007028: eb000693 bl a0008a7c <_Thread_Enable_dispatch>
a000702c: e3a00005 mov r0, #5
return sc;
a0007030: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a0007034: e59c3004 ldr r3, [ip, #4]
a0007038: e3530000 cmp r3, #0
a000703c: 1afffff0 bne a0007004 <rtems_io_register_driver+0x114>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a0007040: e5824000 str r4, [r2]
a0007044: eaffffd7 b a0006fa8 <rtems_io_register_driver+0xb8>
a0005fd4 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
a0005fd4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a0005fd8: e1a04000 mov r4, r0
a0005fdc: e24dd008 sub sp, sp, #8
a0005fe0: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
a0005fe4: e59f0180 ldr r0, [pc, #384] ; a000616c <rtems_rate_monotonic_period+0x198>
a0005fe8: e1a01004 mov r1, r4
a0005fec: e28d2004 add r2, sp, #4
a0005ff0: eb00088f bl a0008234 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0005ff4: e59d3004 ldr r3, [sp, #4]
a0005ff8: e1a06000 mov r6, r0
a0005ffc: e3530000 cmp r3, #0
a0006000: 1a000008 bne a0006028 <rtems_rate_monotonic_period+0x54>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a0006004: e59f7164 ldr r7, [pc, #356] ; a0006170 <rtems_rate_monotonic_period+0x19c>
a0006008: e5902040 ldr r2, [r0, #64] ; 0x40
a000600c: e5973000 ldr r3, [r7]
a0006010: e1520003 cmp r2, r3
a0006014: 0a000005 beq a0006030 <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
a0006018: eb000ae9 bl a0008bc4 <_Thread_Enable_dispatch>
a000601c: e3a00017 mov r0, #23
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0006020: e28dd008 add sp, sp, #8
a0006024: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
a0006028: e3a00004 mov r0, #4
a000602c: eafffffb b a0006020 <rtems_rate_monotonic_period+0x4c>
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
a0006030: e3550000 cmp r5, #0
a0006034: 0a00002b beq a00060e8 <rtems_rate_monotonic_period+0x114>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0006038: e10f8000 mrs r8, CPSR
a000603c: e3883080 orr r3, r8, #128 ; 0x80
a0006040: e129f003 msr CPSR_fc, r3
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
switch ( the_period->state ) {
a0006044: e5903038 ldr r3, [r0, #56] ; 0x38
a0006048: e3530002 cmp r3, #2
a000604c: 0a00002b beq a0006100 <rtems_rate_monotonic_period+0x12c>
a0006050: e3530004 cmp r3, #4
a0006054: 0a000015 beq a00060b0 <rtems_rate_monotonic_period+0xdc>
a0006058: e3530000 cmp r3, #0
a000605c: 1afffff1 bne a0006028 <rtems_rate_monotonic_period+0x54>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0006060: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
a0006064: ebffff50 bl a0005dac <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
a0006068: e3a03002 mov r3, #2
a000606c: e5863038 str r3, [r6, #56] ; 0x38
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0006070: e59f30fc ldr r3, [pc, #252] ; a0006174 <rtems_rate_monotonic_period+0x1a0>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0006074: e3a07000 mov r7, #0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0006078: e59f00f8 ldr r0, [pc, #248] ; a0006178 <rtems_rate_monotonic_period+0x1a4>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000607c: e586302c str r3, [r6, #44] ; 0x2c
the_watchdog->id = id;
a0006080: e5864030 str r4, [r6, #48] ; 0x30
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0006084: e586501c str r5, [r6, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0006088: e2861010 add r1, r6, #16
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000608c: e5867018 str r7, [r6, #24]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a0006090: e5867034 str r7, [r6, #52] ; 0x34
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
a0006094: e586503c str r5, [r6, #60] ; 0x3c
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0006098: eb000fbd bl a0009f94 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a000609c: e1a00007 mov r0, r7
a00060a0: e58d0000 str r0, [sp]
a00060a4: eb000ac6 bl a0008bc4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00060a8: e59d0000 ldr r0, [sp]
a00060ac: eaffffdb b a0006020 <rtems_rate_monotonic_period+0x4c>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
a00060b0: ebffff8c bl a0005ee8 <_Rate_monotonic_Update_statistics>
a00060b4: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
a00060b8: e3a03002 mov r3, #2
a00060bc: e5863038 str r3, [r6, #56] ; 0x38
a00060c0: e2861010 add r1, r6, #16
a00060c4: e59f00ac ldr r0, [pc, #172] ; a0006178 <rtems_rate_monotonic_period+0x1a4>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a00060c8: e586501c str r5, [r6, #28]
the_period->next_length = length;
a00060cc: e586503c str r5, [r6, #60] ; 0x3c
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a00060d0: eb000faf bl a0009f94 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a00060d4: e3a00006 mov r0, #6
a00060d8: e58d0000 str r0, [sp]
a00060dc: eb000ab8 bl a0008bc4 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
a00060e0: e59d0000 ldr r0, [sp]
a00060e4: eaffffcd b a0006020 <rtems_rate_monotonic_period+0x4c>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
a00060e8: e5903038 ldr r3, [r0, #56] ; 0x38
a00060ec: e3530004 cmp r3, #4
a00060f0: 959f2084 ldrls r2, [pc, #132] ; a000617c <rtems_rate_monotonic_period+0x1a8>
a00060f4: 81a00005 movhi r0, r5
a00060f8: 97920103 ldrls r0, [r2, r3, lsl #2]
a00060fc: eaffffe7 b a00060a0 <rtems_rate_monotonic_period+0xcc>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
a0006100: ebffff78 bl a0005ee8 <_Rate_monotonic_Update_statistics>
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
a0006104: e3a03001 mov r3, #1
the_period->next_length = length;
a0006108: e586503c str r5, [r6, #60] ; 0x3c
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
a000610c: e5863038 str r3, [r6, #56] ; 0x38
a0006110: e129f008 msr CPSR_fc, r8
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a0006114: e5973000 ldr r3, [r7]
a0006118: e5962008 ldr r2, [r6, #8]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000611c: e3a01901 mov r1, #16384 ; 0x4000
a0006120: e1a00003 mov r0, r3
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a0006124: e5832020 str r2, [r3, #32]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a0006128: eb000d10 bl a0009570 <_Thread_Set_state>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000612c: e10f2000 mrs r2, CPSR
a0006130: e3823080 orr r3, r2, #128 ; 0x80
a0006134: e129f003 msr CPSR_fc, r3
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
a0006138: e3a01002 mov r1, #2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
a000613c: e5963038 ldr r3, [r6, #56] ; 0x38
the_period->state = RATE_MONOTONIC_ACTIVE;
a0006140: e5861038 str r1, [r6, #56] ; 0x38
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0006144: e129f002 msr CPSR_fc, r2
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
a0006148: e3530003 cmp r3, #3
a000614c: 0a000002 beq a000615c <rtems_rate_monotonic_period+0x188>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
a0006150: eb000a9b bl a0008bc4 <_Thread_Enable_dispatch>
a0006154: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
a0006158: eaffffb0 b a0006020 <rtems_rate_monotonic_period+0x4c>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000615c: e5970000 ldr r0, [r7] <== NOT EXECUTED
a0006160: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED
a0006164: eb000993 bl a00087b8 <_Thread_Clear_state> <== NOT EXECUTED
a0006168: eafffff8 b a0006150 <rtems_rate_monotonic_period+0x17c> <== NOT EXECUTED
a00058d0 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
a00058d0: e3500004 cmp r0, #4
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
a00058d4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
switch ( policy ) {
a00058d8: 9a000004 bls a00058f0 <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a00058dc: eb002455 bl a000ea38 <__errno>
a00058e0: e3a03016 mov r3, #22
a00058e4: e5803000 str r3, [r0]
a00058e8: e3e00000 mvn r0, #0
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
a00058ec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
a00058f0: e3a03001 mov r3, #1
a00058f4: e1a00013 lsl r0, r3, r0
a00058f8: e3100017 tst r0, #23
a00058fc: 11a00003 movne r0, r3
a0005900: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a0005904: eb00244b bl a000ea38 <__errno> <== NOT EXECUTED
a0005908: e3a03016 mov r3, #22 <== NOT EXECUTED
a000590c: e5803000 str r3, [r0] <== NOT EXECUTED
a0005910: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
a0005914: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0007f20 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
a0007f20: e92d4010 push {r4, lr}
a0007f24: e24dd004 sub sp, sp, #4
a0007f28: 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 );
a0007f2c: e1a00001 mov r0, r1
a0007f30: e1a0100d mov r1, sp
a0007f34: eb0015d0 bl a000d67c <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a0007f38: e3500003 cmp r0, #3
a0007f3c: 0a000005 beq a0007f58 <sem_timedwait+0x38>
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a0007f40: e1a00004 mov r0, r4 <== NOT EXECUTED
a0007f44: e3a01000 mov r1, #0 <== NOT EXECUTED
a0007f48: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a0007f4c: eb00188c bl a000e184 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
a0007f50: e28dd004 add sp, sp, #4
a0007f54: 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 );
a0007f58: e1a00004 mov r0, r4
a0007f5c: e3a01001 mov r1, #1
a0007f60: e59d2000 ldr r2, [sp]
a0007f64: eb001886 bl a000e184 <_POSIX_Semaphore_Wait_support>
a0007f68: eafffff8 b a0007f50 <sem_timedwait+0x30>
a00057d4 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
a00057d4: e3520000 cmp r2, #0
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
a00057d8: e92d4070 push {r4, r5, r6, lr}
a00057dc: e1a04000 mov r4, r0
a00057e0: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
a00057e4: 0a00000a beq a0005814 <sigaction+0x40>
*oact = _POSIX_signals_Vectors[ sig ];
a00057e8: e3a0300c mov r3, #12
a00057ec: e0010093 mul r1, r3, r0
a00057f0: e59f00e8 ldr r0, [pc, #232] ; a00058e0 <sigaction+0x10c>
a00057f4: e1a03002 mov r3, r2
a00057f8: e790c001 ldr ip, [r0, r1]
a00057fc: e0801001 add r1, r0, r1
a0005800: e483c004 str ip, [r3], #4
a0005804: e5910004 ldr r0, [r1, #4]
a0005808: e5820004 str r0, [r2, #4]
a000580c: e5912008 ldr r2, [r1, #8]
a0005810: e5832004 str r2, [r3, #4]
if ( !sig )
a0005814: e3540000 cmp r4, #0
a0005818: 0a00002b beq a00058cc <sigaction+0xf8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a000581c: e2443001 sub r3, r4, #1
a0005820: e353001f cmp r3, #31
a0005824: 8a000028 bhi a00058cc <sigaction+0xf8>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
a0005828: e3540009 cmp r4, #9
a000582c: 0a000026 beq a00058cc <sigaction+0xf8>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
a0005830: e3550000 cmp r5, #0
a0005834: 0a000022 beq a00058c4 <sigaction+0xf0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0005838: e10f6000 mrs r6, CPSR
a000583c: e3863080 orr r3, r6, #128 ; 0x80
a0005840: 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 ) {
a0005844: e5953008 ldr r3, [r5, #8]
a0005848: e3530000 cmp r3, #0
a000584c: 0a00000f beq a0005890 <sigaction+0xbc>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
a0005850: e1a00004 mov r0, r4
a0005854: eb0016d9 bl a000b3c0 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
a0005858: e1a03005 mov r3, r5
a000585c: e3a0100c mov r1, #12
a0005860: e4930004 ldr r0, [r3], #4
a0005864: e0020491 mul r2, r1, r4
a0005868: e59f1070 ldr r1, [pc, #112] ; a00058e0 <sigaction+0x10c>
a000586c: e7810002 str r0, [r1, r2]
a0005870: e5950004 ldr r0, [r5, #4]
a0005874: e0812002 add r2, r1, r2
a0005878: e5820004 str r0, [r2, #4]
a000587c: e5933004 ldr r3, [r3, #4]
a0005880: e5823008 str r3, [r2, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0005884: e129f006 msr CPSR_fc, r6
a0005888: e3a00000 mov r0, #0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
a000588c: 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 ];
a0005890: e3a0200c mov r2, #12
a0005894: e0030492 mul r3, r2, r4
a0005898: e59f0044 ldr r0, [pc, #68] ; a00058e4 <sigaction+0x110>
a000589c: e59f103c ldr r1, [pc, #60] ; a00058e0 <sigaction+0x10c>
a00058a0: e0802003 add r2, r0, r3
a00058a4: e7904003 ldr r4, [r0, r3]
a00058a8: e9921001 ldmib r2, {r0, ip}
a00058ac: e0812003 add r2, r1, r3
a00058b0: e7814003 str r4, [r1, r3]
a00058b4: e9821001 stmib r2, {r0, ip}
a00058b8: e129f006 msr CPSR_fc, r6
a00058bc: e3a00000 mov r0, #0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
a00058c0: e8bd8070 pop {r4, r5, r6, pc}
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
a00058c4: e1a00005 mov r0, r5 <== NOT EXECUTED
a00058c8: 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 );
a00058cc: eb0024dc bl a000ec44 <__errno>
a00058d0: e3a03016 mov r3, #22
a00058d4: e5803000 str r3, [r0]
a00058d8: e3e00000 mvn r0, #0
a00058dc: e8bd8070 pop {r4, r5, r6, pc}