RTEMS 4.10.2Annotated Report
Tue Dec 13 20:26:09 2011
00000454 <_Barrier_Manager_initialization>:
#include <rtems/score/object.h>
#include <rtems/rtems/barrier.h>
void _Barrier_Manager_initialization(void)
{
}
454: e12fff1e bx lr
00000458 <_Dual_ported_memory_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/dpmem.h>
void _Dual_ported_memory_Manager_initialization(void)
{
}
458: e12fff1e bx lr
0000045c <_Event_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Event_Manager_initialization(void)
{
}
45c: e12fff1e bx lr
00000478 <_Extension_Manager_initialization>:
#include <rtems/extension.h>
#include <rtems/score/interr.h>
void _Extension_Manager_initialization(void)
{
}
478: e12fff1e bx lr
0000c4e8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c4e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
c4ec: 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;
c4f0: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c4f4: e24dd01c sub sp, sp, #28
c4f8: 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 ) {
c4fc: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c500: 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 ) {
c504: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
c508: 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;
c50c: 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;
c510: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
c514: 2a000076 bcs c6f4 <_Heap_Allocate_aligned_with_boundary+0x20c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
c518: e3530000 cmp r3, #0
c51c: 1a000072 bne c6ec <_Heap_Allocate_aligned_with_boundary+0x204>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c520: e157000a cmp r7, sl
c524: 03a06000 moveq r6, #0
c528: 0a000074 beq c700 <_Heap_Allocate_aligned_with_boundary+0x218>
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;
c52c: e59d300c ldr r3, [sp, #12]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
c530: e2651004 rsb r1, r5, #4
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
c534: e2833007 add r3, r3, #7
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c538: 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;
c53c: e58d3010 str r3, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
c540: e58d1014 str r1, [sp, #20]
c544: ea000004 b c55c <_Heap_Allocate_aligned_with_boundary+0x74>
boundary
);
}
}
if ( alloc_begin != 0 ) {
c548: e3540000 cmp r4, #0
c54c: 1a000059 bne c6b8 <_Heap_Allocate_aligned_with_boundary+0x1d0>
break;
}
block = block->next;
c550: e59aa008 ldr sl, [sl, #8]
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c554: e157000a cmp r7, sl
c558: 0a000068 beq c700 <_Heap_Allocate_aligned_with_boundary+0x218>
/*
* 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 ) {
c55c: e59a9004 ldr r9, [sl, #4]
c560: e59d2000 ldr r2, [sp]
c564: e1520009 cmp r2, r9
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
c568: 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 ) {
c56c: 2afffff7 bcs c550 <_Heap_Allocate_aligned_with_boundary+0x68>
if ( alignment == 0 ) {
c570: 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;
c574: 028a4008 addeq r4, sl, #8
c578: 0afffff2 beq c548 <_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;
c57c: e59d1014 ldr r1, [sp, #20]
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;
c580: e3c99001 bic r9, r9, #1
c584: e08a9009 add r9, sl, 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;
c588: 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;
c58c: e59d2010 ldr r2, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
c590: 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;
c594: e58d3004 str r3, [sp, #4]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
c598: 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;
c59c: e0633002 rsb r3, r3, r2
c5a0: e1a01008 mov r1, r8
c5a4: e0839009 add r9, r3, r9
c5a8: eb003227 bl 18e4c <__umodsi3>
c5ac: 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;
c5b0: 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 ) {
c5b4: e1590004 cmp r9, r4
c5b8: e58d3008 str r3, [sp, #8]
c5bc: 2a000003 bcs c5d0 <_Heap_Allocate_aligned_with_boundary+0xe8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
c5c0: e1a00009 mov r0, r9
c5c4: e1a01008 mov r1, r8
c5c8: eb00321f bl 18e4c <__umodsi3>
c5cc: e0604009 rsb r4, r0, r9
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
c5d0: e35b0000 cmp fp, #0
c5d4: 0a000025 beq c670 <_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;
c5d8: e0849005 add r9, r4, r5
c5dc: e1a00009 mov r0, r9
c5e0: e1a0100b mov r1, fp
c5e4: eb003218 bl 18e4c <__umodsi3>
c5e8: 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 ) {
c5ec: e1590000 cmp r9, r0
c5f0: 93a03000 movls r3, #0
c5f4: 83a03001 movhi r3, #1
c5f8: e1540000 cmp r4, r0
c5fc: 23a03000 movcs r3, #0
c600: e3530000 cmp r3, #0
c604: 0a000019 beq c670 <_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;
c608: e59d1008 ldr r1, [sp, #8]
c60c: 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 ) {
c610: e1590000 cmp r9, r0
c614: 958d6018 strls r6, [sp, #24]
c618: 9a000002 bls c628 <_Heap_Allocate_aligned_with_boundary+0x140>
c61c: eaffffcb b c550 <_Heap_Allocate_aligned_with_boundary+0x68>
c620: e1590000 cmp r9, r0
c624: 8a000037 bhi c708 <_Heap_Allocate_aligned_with_boundary+0x220>
return 0;
}
alloc_begin = boundary_line - alloc_size;
c628: e0654000 rsb r4, r5, r0
c62c: e1a01008 mov r1, r8
c630: e1a00004 mov r0, r4
c634: eb003204 bl 18e4c <__umodsi3>
c638: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
c63c: e0846005 add r6, r4, r5
c640: e1a00006 mov r0, r6
c644: e1a0100b mov r1, fp
c648: eb0031ff bl 18e4c <__umodsi3>
c64c: 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 ) {
c650: e1560000 cmp r6, r0
c654: 93a03000 movls r3, #0
c658: 83a03001 movhi r3, #1
c65c: e1540000 cmp r4, r0
c660: 23a03000 movcs r3, #0
c664: e3530000 cmp r3, #0
c668: 1affffec bne c620 <_Heap_Allocate_aligned_with_boundary+0x138>
c66c: 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 ) {
c670: e59d2008 ldr r2, [sp, #8]
c674: e1520004 cmp r2, r4
c678: 8affffb4 bhi c550 <_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;
c67c: e59d100c ldr r1, [sp, #12]
c680: e1a00004 mov r0, r4
c684: eb0031f0 bl 18e4c <__umodsi3>
c688: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000
c68c: e28998ff add r9, r9, #16711680 ; 0xff0000
c690: e2899cff add r9, r9, #65280 ; 0xff00
c694: e28990f8 add r9, r9, #248 ; 0xf8
c698: e0899004 add r9, r9, r4
if ( free_size >= min_block_size || free_size == 0 ) {
c69c: e59d1004 ldr r1, [sp, #4]
c6a0: e0603009 rsb r3, r0, r9
c6a4: e1590000 cmp r9, r0
c6a8: 11510003 cmpne r1, r3
c6ac: 8affffa7 bhi c550 <_Heap_Allocate_aligned_with_boundary+0x68>
boundary
);
}
}
if ( alloc_begin != 0 ) {
c6b0: e3540000 cmp r4, #0
c6b4: 0affffa5 beq c550 <_Heap_Allocate_aligned_with_boundary+0x68>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
c6b8: e597304c ldr r3, [r7, #76] ; 0x4c
c6bc: e0833006 add r3, r3, r6
c6c0: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
c6c4: e1a0100a mov r1, sl
c6c8: e1a03005 mov r3, r5
c6cc: e1a00007 mov r0, r7
c6d0: e1a02004 mov r2, r4
c6d4: ebffe87f bl 68d8 <_Heap_Block_allocate>
c6d8: e1a00004 mov r0, r4
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
c6dc: e5973044 ldr r3, [r7, #68] ; 0x44
c6e0: e1530006 cmp r3, r6
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
c6e4: 35876044 strcc r6, [r7, #68] ; 0x44
c6e8: ea000002 b c6f8 <_Heap_Allocate_aligned_with_boundary+0x210>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
c6ec: e1550003 cmp r5, r3
c6f0: 9a000006 bls c710 <_Heap_Allocate_aligned_with_boundary+0x228>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
c6f4: e3a00000 mov r0, #0
}
return (void *) alloc_begin;
}
c6f8: e28dd01c add sp, sp, #28
c6fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
c700: e3a00000 mov r0, #0
c704: eafffff4 b c6dc <_Heap_Allocate_aligned_with_boundary+0x1f4>
c708: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED
c70c: eaffff8f b c550 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
c710: e3580000 cmp r8, #0
c714: 01a08002 moveq r8, r2
c718: eaffff80 b c520 <_Heap_Allocate_aligned_with_boundary+0x38>
00007688 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
7688: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
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() ) ) {
768c: e59f35dc ldr r3, [pc, #1500] ; 7c70 <_Heap_Walk+0x5e8>
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;
7690: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
7694: 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;
7698: e59f25d4 ldr r2, [pc, #1492] ; 7c74 <_Heap_Walk+0x5ec>
769c: e59fa5d4 ldr sl, [pc, #1492] ; 7c78 <_Heap_Walk+0x5f0>
76a0: 01a0a002 moveq sl, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
76a4: e3530003 cmp r3, #3
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
76a8: e5902010 ldr r2, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
76ac: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
76b0: e24dd03c sub sp, sp, #60 ; 0x3c
76b4: e1a04000 mov r4, r0
76b8: e1a08001 mov r8, r1
uintptr_t const page_size = heap->page_size;
76bc: e58d2020 str r2, [sp, #32]
uintptr_t const min_block_size = heap->min_block_size;
76c0: e590b014 ldr fp, [r0, #20]
Heap_Block *const last_block = heap->last_block;
76c4: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *block = heap->first_block;
76c8: 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() ) ) {
76cc: 0a000002 beq 76dc <_Heap_Walk+0x54>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
76d0: e3a00001 mov r0, #1
block = next_block;
}
return true;
}
76d4: e28dd03c add sp, sp, #60 ; 0x3c
76d8: 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)(
76dc: e5900018 ldr r0, [r0, #24]
76e0: e594101c ldr r1, [r4, #28]
76e4: e2842008 add r2, r4, #8
76e8: e892000c ldm r2, {r2, r3}
76ec: e59dc024 ldr ip, [sp, #36] ; 0x24
76f0: e98d0003 stmib sp, {r0, r1}
76f4: e58d2014 str r2, [sp, #20]
76f8: e58d3018 str r3, [sp, #24]
76fc: e59f2578 ldr r2, [pc, #1400] ; 7c7c <_Heap_Walk+0x5f4>
7700: e58db000 str fp, [sp]
7704: e58d500c str r5, [sp, #12]
7708: e58dc010 str ip, [sp, #16]
770c: e1a00008 mov r0, r8
7710: e3a01000 mov r1, #0
7714: e59d3020 ldr r3, [sp, #32]
7718: e1a0e00f mov lr, pc
771c: e12fff1a bx sl
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
7720: e59d2020 ldr r2, [sp, #32]
7724: e3520000 cmp r2, #0
7728: 0a000032 beq 77f8 <_Heap_Walk+0x170>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
772c: e59d3020 ldr r3, [sp, #32]
7730: e2139003 ands r9, r3, #3
7734: 1a000036 bne 7814 <_Heap_Walk+0x18c>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
7738: e1a0000b mov r0, fp
773c: e59d1020 ldr r1, [sp, #32]
7740: ebffe534 bl c18 <__umodsi3>
7744: e2506000 subs r6, r0, #0
7748: 1a000038 bne 7830 <_Heap_Walk+0x1a8>
);
return false;
}
if (
774c: e2850008 add r0, r5, #8
7750: e59d1020 ldr r1, [sp, #32]
7754: ebffe52f bl c18 <__umodsi3>
7758: e2509000 subs r9, r0, #0
775c: 1a00003b bne 7850 <_Heap_Walk+0x1c8>
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;
7760: e5957004 ldr r7, [r5, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
7764: e2176001 ands r6, r7, #1
7768: 0a000040 beq 7870 <_Heap_Walk+0x1e8>
);
return false;
}
if ( first_block->prev_size != page_size ) {
776c: e5953000 ldr r3, [r5]
7770: e59dc020 ldr ip, [sp, #32]
7774: e15c0003 cmp ip, r3
7778: 1a000016 bne 77d8 <_Heap_Walk+0x150>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
777c: e59d2024 ldr r2, [sp, #36] ; 0x24
7780: e5923004 ldr r3, [r2, #4]
7784: e3c33001 bic r3, r3, #1
7788: e0823003 add r3, r2, r3
778c: e5939004 ldr r9, [r3, #4]
7790: e2199001 ands r9, r9, #1
7794: 0a000114 beq 7bec <_Heap_Walk+0x564>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
7798: e5949008 ldr r9, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
779c: 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 ) {
77a0: e1540009 cmp r4, r9
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
77a4: 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 ) {
77a8: 0a00006e beq 7968 <_Heap_Walk+0x2e0>
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;
77ac: e5942020 ldr r2, [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
77b0: e1520009 cmp r2, r9
77b4: 9a000034 bls 788c <_Heap_Walk+0x204>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
77b8: e1a00008 mov r0, r8
77bc: e1a03009 mov r3, r9
77c0: e3a01001 mov r1, #1
77c4: e59f24b4 ldr r2, [pc, #1204] ; 7c80 <_Heap_Walk+0x5f8>
77c8: e1a0e00f mov lr, pc
77cc: e12fff1a bx sl
77d0: e3a00000 mov r0, #0
77d4: eaffffbe b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
77d8: e1a00008 mov r0, r8
77dc: e58dc000 str ip, [sp]
77e0: e3a01001 mov r1, #1
77e4: e59f2498 ldr r2, [pc, #1176] ; 7c84 <_Heap_Walk+0x5fc>
77e8: e1a0e00f mov lr, pc
77ec: e12fff1a bx sl
77f0: e1a00009 mov r0, r9
77f4: eaffffb6 b 76d4 <_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" );
77f8: e1a00008 mov r0, r8
77fc: e3a01001 mov r1, #1
7800: e59f2480 ldr r2, [pc, #1152] ; 7c88 <_Heap_Walk+0x600>
7804: e1a0e00f mov lr, pc
7808: e12fff1a bx sl
780c: e59d0020 ldr r0, [sp, #32]
7810: eaffffaf b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
7814: e1a00008 mov r0, r8
7818: e3a01001 mov r1, #1
781c: e59f2468 ldr r2, [pc, #1128] ; 7c8c <_Heap_Walk+0x604>
7820: e1a0e00f mov lr, pc
7824: e12fff1a bx sl
7828: e3a00000 mov r0, #0
782c: eaffffa8 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
7830: e1a00008 mov r0, r8
7834: e1a0300b mov r3, fp
7838: e3a01001 mov r1, #1
783c: e59f244c ldr r2, [pc, #1100] ; 7c90 <_Heap_Walk+0x608>
7840: e1a0e00f mov lr, pc
7844: e12fff1a bx sl
7848: e1a00009 mov r0, r9
784c: eaffffa0 b 76d4 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
7850: e1a00008 mov r0, r8
7854: e1a03005 mov r3, r5
7858: e3a01001 mov r1, #1
785c: e59f2430 ldr r2, [pc, #1072] ; 7c94 <_Heap_Walk+0x60c>
7860: e1a0e00f mov lr, pc
7864: e12fff1a bx sl
7868: e1a00006 mov r0, r6
786c: eaffff98 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
7870: e1a00008 mov r0, r8
7874: e3a01001 mov r1, #1
7878: e59f2418 ldr r2, [pc, #1048] ; 7c98 <_Heap_Walk+0x610>
787c: e1a0e00f mov lr, pc
7880: e12fff1a bx sl
7884: e1a00006 mov r0, r6
7888: eaffff91 b 76d4 <_Heap_Walk+0x4c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
788c: e594c024 ldr ip, [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
7890: e159000c cmp r9, ip
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
7894: e58dc02c str ip, [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
7898: 8affffc6 bhi 77b8 <_Heap_Walk+0x130>
);
return false;
}
if (
789c: e2890008 add r0, r9, #8
78a0: e1a01003 mov r1, r3
78a4: e58d201c str r2, [sp, #28]
78a8: ebffe4da bl c18 <__umodsi3>
78ac: e3500000 cmp r0, #0
78b0: e59d201c ldr r2, [sp, #28]
78b4: 1a0000d3 bne 7c08 <_Heap_Walk+0x580>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
78b8: e5993004 ldr r3, [r9, #4]
78bc: e3c33001 bic r3, r3, #1
78c0: e0893003 add r3, r9, r3
78c4: e5933004 ldr r3, [r3, #4]
78c8: e3130001 tst r3, #1
78cc: 1a0000df bne 7c50 <_Heap_Walk+0x5c8>
);
return false;
}
if ( free_block->prev != prev_block ) {
78d0: e599c00c ldr ip, [r9, #12]
78d4: e15c0004 cmp ip, r4
78d8: 1a0000d3 bne 7c2c <_Heap_Walk+0x5a4>
78dc: e58d7030 str r7, [sp, #48] ; 0x30
78e0: e58db034 str fp, [sp, #52] ; 0x34
78e4: e59d702c ldr r7, [sp, #44] ; 0x2c
78e8: e59db028 ldr fp, [sp, #40] ; 0x28
78ec: e58d502c str r5, [sp, #44] ; 0x2c
78f0: e58d6038 str r6, [sp, #56] ; 0x38
78f4: e1a0500c mov r5, ip
78f8: e58d4028 str r4, [sp, #40] ; 0x28
78fc: e1a06002 mov r6, r2
7900: ea000011 b 794c <_Heap_Walk+0x2c4>
7904: e1560009 cmp r6, r9
7908: 8affffaa bhi 77b8 <_Heap_Walk+0x130>
790c: e1590007 cmp r9, r7
);
return false;
}
if (
7910: e2890008 add r0, r9, #8
7914: e1a0100b mov r1, fp
7918: 8affffa6 bhi 77b8 <_Heap_Walk+0x130>
791c: ebffe4bd bl c18 <__umodsi3>
7920: e3500000 cmp r0, #0
7924: 1a0000b7 bne 7c08 <_Heap_Walk+0x580>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
7928: e5993004 ldr r3, [r9, #4]
792c: e3c33001 bic r3, r3, #1
7930: e0833009 add r3, r3, r9
7934: e5933004 ldr r3, [r3, #4]
7938: e3130001 tst r3, #1
793c: 1a0000c3 bne 7c50 <_Heap_Walk+0x5c8>
);
return false;
}
if ( free_block->prev != prev_block ) {
7940: e599200c ldr r2, [r9, #12]
7944: e1540002 cmp r4, r2
7948: 1a0000b6 bne 7c28 <_Heap_Walk+0x5a0>
(*printer)(
794c: e1a04009 mov r4, r9
return false;
}
prev_block = free_block;
free_block = free_block->next;
7950: 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 ) {
7954: e1550009 cmp r5, r9
7958: 1affffe9 bne 7904 <_Heap_Walk+0x27c>
795c: e28d4028 add r4, sp, #40 ; 0x28
7960: e89408b0 ldm r4, {r4, r5, r7, fp}
7964: e59d6038 ldr r6, [sp, #56] ; 0x38
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
7968: e59d3024 ldr r3, [sp, #36] ; 0x24
796c: 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)" : ""),
7970: 158db028 strne fp, [sp, #40] ; 0x28
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
7974: 0affff55 beq 76d0 <_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;
7978: 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 ) {
797c: 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);
7980: e0876005 add r6, r7, r5
7984: 0a000012 beq 79d4 <_Heap_Walk+0x34c>
(*printer)(
7988: e1a03005 mov r3, r5
798c: e58d7000 str r7, [sp]
7990: e1a00008 mov r0, r8
7994: e3a01000 mov r1, #0
7998: e59f22fc ldr r2, [pc, #764] ; 7c9c <_Heap_Walk+0x614>
799c: e1a0e00f mov lr, pc
79a0: e12fff1a bx 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
79a4: e5943020 ldr r3, [r4, #32]
79a8: e1530006 cmp r3, r6
79ac: 9a000013 bls 7a00 <_Heap_Walk+0x378>
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
79b0: e1a00008 mov r0, r8
79b4: e58d6000 str r6, [sp]
79b8: e1a03005 mov r3, r5
79bc: e3a01001 mov r1, #1
79c0: e59f22d8 ldr r2, [pc, #728] ; 7ca0 <_Heap_Walk+0x618>
79c4: e1a0e00f mov lr, pc
79c8: e12fff1a bx sl
79cc: e3a00000 mov r0, #0
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
79d0: eaffff3f b 76d4 <_Heap_Walk+0x4c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
79d4: e58d7000 str r7, [sp]
79d8: e5953000 ldr r3, [r5]
79dc: e1a00008 mov r0, r8
79e0: e58d3004 str r3, [sp, #4]
79e4: e59f22b8 ldr r2, [pc, #696] ; 7ca4 <_Heap_Walk+0x61c>
79e8: e1a03005 mov r3, r5
79ec: e1a0e00f mov lr, pc
79f0: e12fff1a bx sl
79f4: e5943020 ldr r3, [r4, #32]
79f8: e1530006 cmp r3, r6
79fc: 8affffeb bhi 79b0 <_Heap_Walk+0x328>
7a00: e5943024 ldr r3, [r4, #36] ; 0x24
7a04: e1530006 cmp r3, r6
7a08: 3affffe8 bcc 79b0 <_Heap_Walk+0x328>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
7a0c: e1a00007 mov r0, r7
7a10: e59d1020 ldr r1, [sp, #32]
7a14: ebffe47f bl c18 <__umodsi3>
7a18: e2509000 subs r9, r0, #0
7a1c: 1a000055 bne 7b78 <_Heap_Walk+0x4f0>
);
return false;
}
if ( block_size < min_block_size ) {
7a20: e59d2028 ldr r2, [sp, #40] ; 0x28
7a24: e1520007 cmp r2, r7
7a28: 8a00005b bhi 7b9c <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin ) {
7a2c: e1550006 cmp r5, r6
7a30: 2a000064 bcs 7bc8 <_Heap_Walk+0x540>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
7a34: e5963004 ldr r3, [r6, #4]
7a38: e3130001 tst r3, #1
7a3c: 1a000036 bne 7b1c <_Heap_Walk+0x494>
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;
7a40: 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)(
7a44: 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;
7a48: 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;
7a4c: e3cb7001 bic r7, fp, #1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
7a50: e1530002 cmp r3, r2
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
7a54: e594100c ldr r1, [r4, #12]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
7a58: 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;
7a5c: 059f0244 ldreq r0, [pc, #580] ; 7ca8 <_Heap_Walk+0x620>
7a60: 0a000003 beq 7a74 <_Heap_Walk+0x3ec>
"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)" : ""),
7a64: e59f3240 ldr r3, [pc, #576] ; 7cac <_Heap_Walk+0x624>
7a68: e1520004 cmp r2, r4
7a6c: e59f023c ldr r0, [pc, #572] ; 7cb0 <_Heap_Walk+0x628>
7a70: 11a00003 movne r0, r3
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)(
7a74: e5953008 ldr r3, [r5, #8]
7a78: e1510003 cmp r1, r3
7a7c: 059f1230 ldreq r1, [pc, #560] ; 7cb4 <_Heap_Walk+0x62c>
7a80: 0a000003 beq 7a94 <_Heap_Walk+0x40c>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
7a84: e59fc220 ldr ip, [pc, #544] ; 7cac <_Heap_Walk+0x624>
7a88: e1530004 cmp r3, r4
7a8c: e59f1224 ldr r1, [pc, #548] ; 7cb8 <_Heap_Walk+0x630>
7a90: 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)(
7a94: e58d2000 str r2, [sp]
7a98: e98d0009 stmib sp, {r0, r3}
7a9c: e58d100c str r1, [sp, #12]
7aa0: e1a03005 mov r3, r5
7aa4: e1a00008 mov r0, r8
7aa8: e3a01000 mov r1, #0
7aac: e59f2208 ldr r2, [pc, #520] ; 7cbc <_Heap_Walk+0x634>
7ab0: e1a0e00f mov lr, pc
7ab4: e12fff1a bx sl
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
7ab8: e5993000 ldr r3, [r9]
7abc: e1570003 cmp r7, r3
7ac0: 0a00000a beq 7af0 <_Heap_Walk+0x468>
(*printer)(
7ac4: e58d3004 str r3, [sp, #4]
7ac8: e1a00008 mov r0, r8
7acc: e58d7000 str r7, [sp]
7ad0: e58d9008 str r9, [sp, #8]
7ad4: e1a03005 mov r3, r5
7ad8: e3a01001 mov r1, #1
7adc: e59f21dc ldr r2, [pc, #476] ; 7cc0 <_Heap_Walk+0x638>
7ae0: e1a0e00f mov lr, pc
7ae4: e12fff1a bx sl
7ae8: e3a00000 mov r0, #0
7aec: eafffef8 b 76d4 <_Heap_Walk+0x4c>
);
return false;
}
if ( !prev_used ) {
7af0: e21b9001 ands r9, fp, #1
7af4: 0a000017 beq 7b58 <_Heap_Walk+0x4d0>
7af8: 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 ) {
7afc: e1530004 cmp r3, r4
7b00: 1a000003 bne 7b14 <_Heap_Walk+0x48c>
7b04: ea00000b b 7b38 <_Heap_Walk+0x4b0> <== NOT EXECUTED
if ( free_block == block ) {
return true;
}
free_block = free_block->next;
7b08: 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 ) {
7b0c: e1530004 cmp r3, r4
7b10: 0a000008 beq 7b38 <_Heap_Walk+0x4b0>
if ( free_block == block ) {
7b14: e1530005 cmp r3, r5
7b18: 1afffffa bne 7b08 <_Heap_Walk+0x480>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
7b1c: e59d2024 ldr r2, [sp, #36] ; 0x24
7b20: e1520006 cmp r2, r6
7b24: 0afffee9 beq 76d0 <_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 ) {
7b28: e5967004 ldr r7, [r6, #4]
7b2c: e1a05006 mov r5, r6
7b30: e2076001 and r6, r7, #1
7b34: eaffff8f b 7978 <_Heap_Walk+0x2f0>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
7b38: e1a00008 mov r0, r8
7b3c: e1a03005 mov r3, r5
7b40: e3a01001 mov r1, #1
7b44: e59f2178 ldr r2, [pc, #376] ; 7cc4 <_Heap_Walk+0x63c>
7b48: e1a0e00f mov lr, pc
7b4c: e12fff1a bx sl
7b50: e3a00000 mov r0, #0
7b54: eafffede b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !prev_used ) {
(*printer)(
7b58: e1a00008 mov r0, r8
7b5c: e1a03005 mov r3, r5
7b60: e3a01001 mov r1, #1
7b64: e59f215c ldr r2, [pc, #348] ; 7cc8 <_Heap_Walk+0x640>
7b68: e1a0e00f mov lr, pc
7b6c: e12fff1a bx sl
7b70: e1a00009 mov r0, r9
7b74: eafffed6 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
7b78: e1a00008 mov r0, r8
7b7c: e58d7000 str r7, [sp]
7b80: e1a03005 mov r3, r5
7b84: e3a01001 mov r1, #1
7b88: e59f213c ldr r2, [pc, #316] ; 7ccc <_Heap_Walk+0x644>
7b8c: e1a0e00f mov lr, pc
7b90: e12fff1a bx sl
7b94: e3a00000 mov r0, #0
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
7b98: eafffecd b 76d4 <_Heap_Walk+0x4c>
}
if ( block_size < min_block_size ) {
(*printer)(
7b9c: e58d2004 str r2, [sp, #4]
7ba0: e1a00008 mov r0, r8
7ba4: e1a0b002 mov fp, r2
7ba8: e58d7000 str r7, [sp]
7bac: e1a03005 mov r3, r5
7bb0: e3a01001 mov r1, #1
7bb4: e59f2114 ldr r2, [pc, #276] ; 7cd0 <_Heap_Walk+0x648>
7bb8: e1a0e00f mov lr, pc
7bbc: e12fff1a bx sl
7bc0: e1a00009 mov r0, r9
block,
block_size,
min_block_size
);
return false;
7bc4: eafffec2 b 76d4 <_Heap_Walk+0x4c>
}
if ( next_block_begin <= block_begin ) {
(*printer)(
7bc8: e1a00008 mov r0, r8
7bcc: e58d6000 str r6, [sp]
7bd0: e1a03005 mov r3, r5
7bd4: e3a01001 mov r1, #1
7bd8: e59f20f4 ldr r2, [pc, #244] ; 7cd4 <_Heap_Walk+0x64c>
7bdc: e1a0e00f mov lr, pc
7be0: e12fff1a bx sl
7be4: e1a00009 mov r0, r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
7be8: eafffeb9 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
7bec: e1a00008 mov r0, r8
7bf0: e3a01001 mov r1, #1
7bf4: e59f20dc ldr r2, [pc, #220] ; 7cd8 <_Heap_Walk+0x650>
7bf8: e1a0e00f mov lr, pc
7bfc: e12fff1a bx sl
7c00: e1a00009 mov r0, r9
7c04: eafffeb2 b 76d4 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
7c08: e1a00008 mov r0, r8
7c0c: e1a03009 mov r3, r9
7c10: e3a01001 mov r1, #1
7c14: e59f20c0 ldr r2, [pc, #192] ; 7cdc <_Heap_Walk+0x654>
7c18: e1a0e00f mov lr, pc
7c1c: e12fff1a bx sl
7c20: e3a00000 mov r0, #0
7c24: eafffeaa b 76d4 <_Heap_Walk+0x4c>
);
return false;
}
if ( free_block->prev != prev_block ) {
7c28: e1a0c002 mov ip, r2
(*printer)(
7c2c: e1a00008 mov r0, r8
7c30: e58dc000 str ip, [sp]
7c34: e1a03009 mov r3, r9
7c38: e3a01001 mov r1, #1
7c3c: e59f209c ldr r2, [pc, #156] ; 7ce0 <_Heap_Walk+0x658>
7c40: e1a0e00f mov lr, pc
7c44: e12fff1a bx sl
7c48: e3a00000 mov r0, #0
7c4c: eafffea0 b 76d4 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
7c50: e1a00008 mov r0, r8
7c54: e1a03009 mov r3, r9
7c58: e3a01001 mov r1, #1
7c5c: e59f2080 ldr r2, [pc, #128] ; 7ce4 <_Heap_Walk+0x65c>
7c60: e1a0e00f mov lr, pc
7c64: e12fff1a bx sl
7c68: e3a00000 mov r0, #0
7c6c: eafffe98 b 76d4 <_Heap_Walk+0x4c>
00000460 <_Message_queue_Manager_initialization>:
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
void _Message_queue_Manager_initialization(void)
{
}
460: e12fff1e bx lr
00006b48 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
6b48: 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 )
6b4c: e5908034 ldr r8, [r0, #52] ; 0x34
6b50: e3580000 cmp r8, #0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
6b54: e24dd014 sub sp, sp, #20
6b58: e1a05000 mov r5, r0
/*
* 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 );
6b5c: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
6b60: 0a00009c beq 6dd8 <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
6b64: e1d091b4 ldrh r9, [r0, #20]
6b68: e1d0a1b0 ldrh sl, [r0, #16]
6b6c: e1a01009 mov r1, r9
6b70: e1a0000a mov r0, sl
6b74: eb004870 bl 18d3c <__aeabi_uidiv>
6b78: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
6b7c: e1b03823 lsrs r3, r3, #16
6b80: 01a01009 moveq r1, r9
6b84: 01a06007 moveq r6, r7
6b88: 01a04003 moveq r4, r3
6b8c: 0a00000f beq 6bd0 <_Objects_Extend_information+0x88>
if ( information->object_blocks[ block ] == NULL )
6b90: e5984000 ldr r4, [r8]
6b94: e3540000 cmp r4, #0
6b98: 11a01009 movne r1, r9
6b9c: 11a06007 movne r6, r7
6ba0: 13a04000 movne r4, #0
6ba4: 01a01009 moveq r1, r9
6ba8: 01a06007 moveq r6, r7
6bac: 1a000003 bne 6bc0 <_Objects_Extend_information+0x78>
6bb0: ea000006 b 6bd0 <_Objects_Extend_information+0x88> <== NOT EXECUTED
6bb4: e7982104 ldr r2, [r8, r4, lsl #2]
6bb8: e3520000 cmp r2, #0
6bbc: 0a000003 beq 6bd0 <_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++ ) {
6bc0: e2844001 add r4, r4, #1
6bc4: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
6bc8: 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++ ) {
6bcc: 8afffff8 bhi 6bb4 <_Objects_Extend_information+0x6c>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
6bd0: 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 ) {
6bd4: e35a0801 cmp sl, #65536 ; 0x10000
6bd8: 2a000064 bcs 6d70 <_Objects_Extend_information+0x228>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
6bdc: 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;
6be0: e5952018 ldr r2, [r5, #24]
if ( information->auto_extend ) {
6be4: 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;
6be8: e0000192 mul r0, r2, r1
if ( information->auto_extend ) {
6bec: 1a000061 bne 6d78 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
6bf0: e58d3000 str r3, [sp]
6bf4: eb000833 bl 8cc8 <_Workspace_Allocate_or_fatal_error>
6bf8: e59d3000 ldr r3, [sp]
6bfc: e1a09000 mov r9, r0
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
6c00: e1d521b0 ldrh r2, [r5, #16]
6c04: e1560002 cmp r6, r2
6c08: 3a000038 bcc 6cf0 <_Objects_Extend_information+0x1a8>
*/
/*
* Up the block count and maximum
*/
block_count++;
6c0c: 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 );
6c10: e08c008c add r0, ip, ip, lsl #1
6c14: e08a0000 add r0, sl, r0
6c18: e0800007 add r0, r0, r7
6c1c: e1a00100 lsl r0, r0, #2
6c20: e88d1008 stm sp, {r3, ip}
6c24: eb000833 bl 8cf8 <_Workspace_Allocate>
if ( !object_blocks ) {
6c28: e250b000 subs fp, r0, #0
6c2c: e89d1008 ldm sp, {r3, ip}
6c30: 0a00006e beq 6df0 <_Objects_Extend_information+0x2a8>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
6c34: e1d521b0 ldrh r2, [r5, #16]
6c38: e1570002 cmp r7, r2
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
6c3c: e08b818c add r8, fp, ip, lsl #3
6c40: e08bc10c add ip, fp, ip, lsl #2
6c44: 3a000051 bcc 6d90 <_Objects_Extend_information+0x248>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6c48: 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,
6c4c: 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;
6c50: 11a01002 movne r1, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
6c54: 0a000003 beq 6c68 <_Objects_Extend_information+0x120>
local_table[ index ] = NULL;
6c58: 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++ ) {
6c5c: e2822001 add r2, r2, #1
6c60: e1570002 cmp r7, r2
6c64: 8afffffb bhi 6c58 <_Objects_Extend_information+0x110>
6c68: 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 );
6c6c: e1d511b4 ldrh r1, [r5, #20]
6c70: e0861001 add r1, r6, r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
6c74: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6c78: e1560001 cmp r6, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
6c7c: e78c0003 str r0, [ip, r3]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
6c80: e78b0003 str r0, [fp, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
6c84: 2a000005 bcs 6ca0 <_Objects_Extend_information+0x158>
6c88: e0882106 add r2, r8, r6, lsl #2
6c8c: e1a03006 mov r3, r6
index < ( information->allocation_size + index_base );
index++ ) {
6c90: 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 ;
6c94: e1510003 cmp r1, r3
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
6c98: 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 ;
6c9c: 8afffffb bhi 6c90 <_Objects_Extend_information+0x148>
6ca0: e10f3000 mrs r3, CPSR
6ca4: e3832080 orr r2, r3, #128 ; 0x80
6ca8: 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(
6cac: e5952000 ldr r2, [r5]
6cb0: e1d510b4 ldrh r1, [r5, #4]
6cb4: e1a02c02 lsl r2, r2, #24
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;
6cb8: e1a0a80a lsl sl, sl, #16
information->maximum_id = _Objects_Build_id(
6cbc: 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;
6cc0: e1a0a82a lsr sl, sl, #16
information->maximum_id = _Objects_Build_id(
6cc4: e1822d81 orr r2, r2, r1, lsl #27
6cc8: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
6ccc: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
6cd0: e585c030 str ip, [r5, #48] ; 0x30
information->local_table = local_table;
6cd4: e585801c str r8, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
6cd8: 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;
6cdc: e1c5a1b0 strh sl, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
6ce0: e585b034 str fp, [r5, #52] ; 0x34
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
6ce4: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
6ce8: e3500000 cmp r0, #0
_Workspace_Free( old_tables );
6cec: 1b000807 blne 8d10 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6cf0: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
6cf4: e28d7008 add r7, sp, #8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6cf8: e7839104 str r9, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
6cfc: e1a01009 mov r1, r9
6d00: e1a00007 mov r0, r7
6d04: e1d521b4 ldrh r2, [r5, #20]
6d08: e5953018 ldr r3, [r5, #24]
6d0c: eb00153f bl c210 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
6d10: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6d14: 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 ) {
6d18: ea000008 b 6d40 <_Objects_Extend_information+0x1f8>
the_object->id = _Objects_Build_id(
6d1c: e5952000 ldr r2, [r5]
6d20: e1d5c0b4 ldrh ip, [r5, #4]
6d24: e1a02c02 lsl r2, r2, #24
6d28: e3822801 orr r2, r2, #65536 ; 0x10000
6d2c: e1822d8c orr r2, r2, ip, lsl #27
6d30: e1822006 orr r2, r2, r6
6d34: e5832008 str r2, [r3, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6d38: ebfffcf2 bl 6108 <_Chain_Append>
index++;
6d3c: 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 ) {
6d40: e1a00007 mov r0, r7
6d44: ebfffd03 bl 6158 <_Chain_Get>
6d48: e2503000 subs r3, r0, #0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
6d4c: e1a01003 mov r1, r3
6d50: 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 ) {
6d54: 1afffff0 bne 6d1c <_Objects_Extend_information+0x1d4>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6d58: e1d531b4 ldrh r3, [r5, #20]
information->inactive =
6d5c: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6d60: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
6d64: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
6d68: e7813004 str r3, [r1, r4]
information->inactive =
6d6c: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
6d70: e28dd014 add sp, sp, #20
6d74: 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 );
6d78: e58d3000 str r3, [sp]
6d7c: eb0007dd bl 8cf8 <_Workspace_Allocate>
if ( !new_object_block )
6d80: e2509000 subs r9, r0, #0
6d84: e59d3000 ldr r3, [sp]
6d88: 1affff9c bne 6c00 <_Objects_Extend_information+0xb8>
6d8c: eafffff7 b 6d70 <_Objects_Extend_information+0x228>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
6d90: e1a03103 lsl r3, r3, #2
6d94: e1a02003 mov r2, r3
6d98: e5951034 ldr r1, [r5, #52] ; 0x34
6d9c: e88d1008 stm sp, {r3, ip}
6da0: eb002469 bl ff4c <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
6da4: e89d1008 ldm sp, {r3, ip}
6da8: e1a0000c mov r0, ip
6dac: e1a02003 mov r2, r3
6db0: e5951030 ldr r1, [r5, #48] ; 0x30
6db4: eb002464 bl ff4c <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
6db8: e1d521b0 ldrh r2, [r5, #16]
6dbc: e0872002 add r2, r7, r2
6dc0: e1a02102 lsl r2, r2, #2
6dc4: e1a00008 mov r0, r8
6dc8: e595101c ldr r1, [r5, #28]
6dcc: eb00245e bl ff4c <memcpy>
6dd0: e89d1008 ldm sp, {r3, ip}
6dd4: eaffffa4 b 6c6c <_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 )
6dd8: e1a04008 mov r4, r8
6ddc: e1d0a1b0 ldrh sl, [r0, #16]
6de0: e1d011b4 ldrh r1, [r0, #20]
6de4: e1a06007 mov r6, r7
6de8: e1a03008 mov r3, r8
6dec: eaffff77 b 6bd0 <_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 );
6df0: e1a00009 mov r0, r9
6df4: eb0007c5 bl 8d10 <_Workspace_Free>
return;
6df8: eaffffdc b 6d70 <_Objects_Extend_information+0x228>
000068a4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
68a4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
68a8: e1a04001 mov r4, r1
68ac: e24dd004 sub sp, sp, #4
68b0: 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 ) ) {
68b4: e1a0100d mov r1, sp
68b8: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
68bc: e1a08002 mov r8, r2
68c0: 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 ) ) {
68c4: eb000075 bl 6aa0 <_POSIX_Mutex_Get>
68c8: e3500000 cmp r0, #0
68cc: 0a00000a beq 68fc <_POSIX_Condition_variables_Wait_support+0x58>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
68d0: e59f30dc ldr r3, [pc, #220] ; 69b4 <_POSIX_Condition_variables_Wait_support+0x110>
68d4: e5932000 ldr r2, [r3]
68d8: e2422001 sub r2, r2, #1
68dc: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
68e0: e1a0100d mov r1, sp
68e4: e1a00006 mov r0, r6
68e8: ebffff76 bl 66c8 <_POSIX_Condition_variables_Get>
switch ( location ) {
68ec: e59d3000 ldr r3, [sp]
68f0: e3530000 cmp r3, #0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
68f4: e1a0a000 mov sl, r0
switch ( location ) {
68f8: 0a000003 beq 690c <_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 )
68fc: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6900: e1a00005 mov r0, r5
6904: e28dd004 add sp, sp, #4
6908: 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 ) ) {
690c: e5903014 ldr r3, [r0, #20]
6910: e3530000 cmp r3, #0
6914: 0a000005 beq 6930 <_POSIX_Condition_variables_Wait_support+0x8c>
6918: e5942000 ldr r2, [r4]
691c: e1530002 cmp r3, r2
6920: 0a000002 beq 6930 <_POSIX_Condition_variables_Wait_support+0x8c>
_Thread_Enable_dispatch();
6924: eb000c92 bl 9b74 <_Thread_Enable_dispatch>
6928: e3a05016 mov r5, #22
return EINVAL;
692c: eafffff3 b 6900 <_POSIX_Condition_variables_Wait_support+0x5c>
}
(void) pthread_mutex_unlock( mutex );
6930: e1a00004 mov r0, r4
6934: eb0000e3 bl 6cc8 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
6938: e3570000 cmp r7, #0
693c: 0a000006 beq 695c <_POSIX_Condition_variables_Wait_support+0xb8>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
6940: eb000c8b bl 9b74 <_Thread_Enable_dispatch>
6944: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
6948: e1a00004 mov r0, r4
694c: eb0000bc bl 6c44 <pthread_mutex_lock>
if ( mutex_status )
6950: e3500000 cmp r0, #0
6954: 0affffe9 beq 6900 <_POSIX_Condition_variables_Wait_support+0x5c>
6958: eaffffe7 b 68fc <_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;
695c: e59f5054 ldr r5, [pc, #84] ; 69b8 <_POSIX_Condition_variables_Wait_support+0x114>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
6960: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6964: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
6968: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
696c: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
6970: 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;
6974: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
6978: e5831020 str r1, [r3, #32]
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;
697c: e3a01001 mov r1, #1
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;
6980: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
6984: e1a00002 mov r0, r2
6988: e58a1048 str r1, [sl, #72] ; 0x48
698c: e59f2028 ldr r2, [pc, #40] ; 69bc <_POSIX_Condition_variables_Wait_support+0x118>
6990: e1a01008 mov r1, r8
6994: eb000dbc bl a08c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
6998: eb000c75 bl 9b74 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
699c: e5953000 ldr r3, [r5]
69a0: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
69a4: e3550074 cmp r5, #116 ; 0x74
69a8: 13550000 cmpne r5, #0
69ac: 0affffe5 beq 6948 <_POSIX_Condition_variables_Wait_support+0xa4>
69b0: eaffffd2 b 6900 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
0000e834 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
e834: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
e838: e5907008 ldr r7, [r0, #8]
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
e83c: e1a0ac27 lsr sl, r7, #24
e840: e20aa007 and sl, sl, #7
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
e844: e1a07807 lsl r7, r7, #16
e848: e59f5078 ldr r5, [pc, #120] ; e8c8 <_POSIX_Keys_Run_destructors+0x94>
e84c: e1a07727 lsr r7, r7, #14
e850: e28aa005 add sl, sl, #5
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
e854: e3a08000 mov r8, #0
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
e858: e1d541b0 ldrh r4, [r5, #16]
done = true;
for ( index = 1 ; index <= max ; ++index ) {
e85c: e3540000 cmp r4, #0
e860: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
e864: e3a06001 mov r6, #1
e868: e1a01006 mov r1, r6
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
e86c: e595301c ldr r3, [r5, #28]
e870: e7932106 ldr r2, [r3, r6, lsl #2]
if ( key != NULL && key->destructor != NULL ) {
e874: e3520000 cmp r2, #0
e878: 0a00000a beq e8a8 <_POSIX_Keys_Run_destructors+0x74>
e87c: e5923010 ldr r3, [r2, #16]
e880: e3530000 cmp r3, #0
e884: 0a000007 beq e8a8 <_POSIX_Keys_Run_destructors+0x74>
void *value = key->Values [ thread_api ][ thread_index ];
e888: e792210a ldr r2, [r2, sl, lsl #2]
e88c: e7920007 ldr r0, [r2, r7]
if ( value != NULL ) {
e890: e3500000 cmp r0, #0
e894: 0a000003 beq e8a8 <_POSIX_Keys_Run_destructors+0x74>
key->Values [ thread_api ][ thread_index ] = NULL;
e898: e7828007 str r8, [r2, r7] <== NOT EXECUTED
(*key->destructor)( value );
e89c: e1a0e00f mov lr, pc <== NOT EXECUTED
e8a0: e12fff13 bx r3 <== NOT EXECUTED
e8a4: e1a01008 mov r1, r8 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
e8a8: e2866001 add r6, r6, #1
e8ac: e1a06806 lsl r6, r6, #16
e8b0: e1a06826 lsr r6, r6, #16
e8b4: e1540006 cmp r4, r6
e8b8: 2affffeb bcs e86c <_POSIX_Keys_Run_destructors+0x38>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
e8bc: e3510000 cmp r1, #0
e8c0: 0affffe4 beq e858 <_POSIX_Keys_Run_destructors+0x24>
e8c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000b004 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
b004: e92d41f0 push {r4, r5, r6, r7, r8, lr}
b008: e1a04000 mov r4, r0
b00c: e24dd010 sub sp, sp, #16
b010: e1a07001 mov r7, r1
b014: e1a06002 mov r6, r2
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
b018: e59f0118 ldr r0, [pc, #280] ; b138 <_POSIX_Message_queue_Receive_support+0x134>
b01c: e1a01004 mov r1, r4
b020: e28d200c add r2, sp, #12
b024: e1a05003 mov r5, r3
b028: e5dd8028 ldrb r8, [sp, #40] ; 0x28
b02c: eb000c43 bl e140 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
b030: e59d300c ldr r3, [sp, #12]
b034: e3530000 cmp r3, #0
b038: 0a000005 beq b054 <_POSIX_Message_queue_Receive_support+0x50>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
b03c: eb002f7f bl 16e40 <__errno>
b040: e3a03009 mov r3, #9
b044: e5803000 str r3, [r0]
b048: e3e00000 mvn r0, #0
}
b04c: e28dd010 add sp, sp, #16
b050: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
b054: e5903014 ldr r3, [r0, #20]
b058: e2032003 and r2, r3, #3
b05c: e3520001 cmp r2, #1
b060: 0a00002e beq b120 <_POSIX_Message_queue_Receive_support+0x11c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
b064: e5900010 ldr r0, [r0, #16]
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
b068: e5902068 ldr r2, [r0, #104] ; 0x68
b06c: e1520006 cmp r2, r6
b070: 8a000024 bhi b108 <_POSIX_Message_queue_Receive_support+0x104>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
b074: e3580000 cmp r8, #0
b078: 11a08723 lsrne r8, r3, #14
b07c: 12288001 eorne r8, r8, #1
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
b080: e28d3010 add r3, sp, #16
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
b084: e59dc02c ldr ip, [sp, #44] ; 0x2c
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
b088: e3e02000 mvn r2, #0
b08c: e5232008 str r2, [r3, #-8]!
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
b090: 12088001 andne r8, r8, #1
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
b094: e280001c add r0, r0, #28
b098: e1a01004 mov r1, r4
b09c: e1a02007 mov r2, r7
b0a0: e88d1100 stm sp, {r8, ip}
b0a4: eb00081a bl d114 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
b0a8: eb000e72 bl ea78 <_Thread_Enable_dispatch>
if (msg_prio) {
b0ac: e3550000 cmp r5, #0
b0b0: 0a000011 beq b0fc <_POSIX_Message_queue_Receive_support+0xf8>
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
b0b4: e59f4080 ldr r4, [pc, #128] ; b13c <_POSIX_Message_queue_Receive_support+0x138>
b0b8: e5943000 ldr r3, [r4]
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
b0bc: e5931024 ldr r1, [r3, #36] ; 0x24
b0c0: e0212fc1 eor r2, r1, r1, asr #31
b0c4: e0422fc1 sub r2, r2, r1, asr #31
b0c8: e5852000 str r2, [r5]
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
b0cc: e5933034 ldr r3, [r3, #52] ; 0x34
b0d0: e3530000 cmp r3, #0
return length_out;
b0d4: 059d0008 ldreq r0, [sp, #8]
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
b0d8: 0affffdb beq b04c <_POSIX_Message_queue_Receive_support+0x48>
return length_out;
rtems_set_errno_and_return_minus_one(
b0dc: eb002f57 bl 16e40 <__errno>
b0e0: e5943000 ldr r3, [r4]
b0e4: e1a05000 mov r5, r0
b0e8: e5930034 ldr r0, [r3, #52] ; 0x34
b0ec: eb0000b6 bl b3cc <_POSIX_Message_queue_Translate_core_message_queue_return_code>
b0f0: e5850000 str r0, [r5]
b0f4: e3e00000 mvn r0, #0
b0f8: eaffffd3 b b04c <_POSIX_Message_queue_Receive_support+0x48>
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
b0fc: e59f4038 ldr r4, [pc, #56] ; b13c <_POSIX_Message_queue_Receive_support+0x138><== NOT EXECUTED
b100: e5943000 ldr r3, [r4] <== NOT EXECUTED
b104: eafffff0 b b0cc <_POSIX_Message_queue_Receive_support+0xc8><== NOT EXECUTED
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
b108: eb000e5a bl ea78 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
b10c: eb002f4b bl 16e40 <__errno>
b110: e3a0307a mov r3, #122 ; 0x7a
b114: e5803000 str r3, [r0]
b118: e3e00000 mvn r0, #0
b11c: eaffffca b b04c <_POSIX_Message_queue_Receive_support+0x48>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
b120: eb000e54 bl ea78 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
b124: eb002f45 bl 16e40 <__errno>
b128: e3a03009 mov r3, #9
b12c: e5803000 str r3, [r0]
b130: e3e00000 mvn r0, #0
b134: eaffffc4 b b04c <_POSIX_Message_queue_Receive_support+0x48>
0000b98c <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
b98c: e92d40f0 push {r4, r5, r6, r7, lr}
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
b990: e1a00001 mov r0, r1
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
b994: e1a06001 mov r6, r1
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
b998: e5917108 ldr r7, [r1, #264] ; 0x108
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
b99c: eb000b8a bl e7cc <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
b9a0: e1a00006 mov r0, r6
b9a4: eb000ba2 bl e834 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
b9a8: e2874040 add r4, r7, #64 ; 0x40
_POSIX_Keys_Run_destructors( deleted );
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
b9ac: e5965028 ldr r5, [r6, #40] ; 0x28
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
b9b0: ea000001 b b9bc <_POSIX_Threads_Delete_extension+0x30>
*(void **)the_thread->Wait.return_argument = value_ptr;
b9b4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
b9b8: e5835000 str r5, [r3] <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
b9bc: e1a00004 mov r0, r4
b9c0: ebfff0a7 bl 7c64 <_Thread_queue_Dequeue>
b9c4: e3500000 cmp r0, #0
b9c8: 1afffff9 bne b9b4 <_POSIX_Threads_Delete_extension+0x28>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
b9cc: e5973080 ldr r3, [r7, #128] ; 0x80
b9d0: e3530004 cmp r3, #4
b9d4: 0a000004 beq b9ec <_POSIX_Threads_Delete_extension+0x60>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
b9d8: e3a03000 mov r3, #0
(void) _Workspace_Free( api );
b9dc: e1a00007 mov r0, r7
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
b9e0: e5863108 str r3, [r6, #264] ; 0x108
(void) _Workspace_Free( api );
}
b9e4: e8bd40f0 pop {r4, r5, r6, r7, lr}
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
b9e8: eafff4c8 b 8d10 <_Workspace_Free>
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
b9ec: e28700a4 add r0, r7, #164 ; 0xa4
b9f0: ebfff463 bl 8b84 <_Watchdog_Remove>
b9f4: eafffff7 b b9d8 <_POSIX_Threads_Delete_extension+0x4c>
0000f5f4 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
f5f4: e10f2000 mrs r2, CPSR
f5f8: e3823080 orr r3, r2, #128 ; 0x80
f5fc: 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 ) {
f600: e59f1064 ldr r1, [pc, #100] ; f66c <_POSIX_signals_Clear_process_signals+0x78>
f604: e0803080 add r3, r0, r0, lsl #1
f608: e1a03103 lsl r3, r3, #2
f60c: e7911003 ldr r1, [r1, r3]
f610: e3510002 cmp r1, #2
f614: 0a00000c beq f64c <_POSIX_signals_Clear_process_signals+0x58>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
f618: e59f3050 ldr r3, [pc, #80] ; f670 <_POSIX_signals_Clear_process_signals+0x7c>
f61c: e5931000 ldr r1, [r3]
f620: e3a0c001 mov ip, #1
f624: e2400001 sub r0, r0, #1
f628: e1c1001c bic r0, r1, ip, lsl r0
if ( !_POSIX_signals_Pending )
f62c: 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;
f630: e5830000 str r0, [r3]
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
f634: 059f3038 ldreq r3, [pc, #56] ; f674 <_POSIX_signals_Clear_process_signals+0x80>
f638: 05931000 ldreq r1, [r3]
f63c: 02411001 subeq r1, r1, #1
f640: 05831000 streq r1, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
f644: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
f648: 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 ] ) )
f64c: e59f1024 ldr r1, [pc, #36] ; f678 <_POSIX_signals_Clear_process_signals+0x84>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
f650: e791c003 ldr ip, [r1, r3]
f654: e0813003 add r3, r1, r3
f658: e2833004 add r3, r3, #4
f65c: e15c0003 cmp ip, r3
f660: 0affffec beq f618 <_POSIX_signals_Clear_process_signals+0x24>
f664: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_POSIX_signals_Pending &= ~mask;
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
}
_ISR_Enable( level );
}
f668: e12fff1e bx lr <== NOT EXECUTED
00000464 <_Partition_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Partition_Manager_initialization(void)
{
}
464: e12fff1e bx lr
00000474 <_Rate_monotonic_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/ratemon.h>
void _Rate_monotonic_Manager_initialization(void)
{
}
474: e12fff1e bx lr
00000468 <_Region_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Region_Manager_initialization(void)
{
}
468: e12fff1e bx lr
00007e88 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
7e88: 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
)
{
7e8c: e92d05f0 push {r4, r5, r6, r7, r8, sl}
_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 ];
7e90: e1a0c323 lsr ip, r3, #6
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7e94: e281503c add r5, r1, #60 ; 0x3c
7e98: e08cc08c add ip, ip, ip, lsl #1
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
7e9c: e3130020 tst r3, #32
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
7ea0: e2814038 add r4, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7ea4: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
7ea8: e3a05000 mov r5, #0
7eac: e581503c str r5, [r1, #60] ; 0x3c
the_chain->last = _Chain_Head(the_chain);
7eb0: e5814040 str r4, [r1, #64] ; 0x40
_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 ];
7eb4: e080c10c add ip, r0, ip, lsl #2
block_state = the_thread_queue->state;
7eb8: e5906038 ldr r6, [r0, #56] ; 0x38
7ebc: 159fa178 ldrne sl, [pc, #376] ; 803c <_Thread_queue_Enqueue_priority+0x1b4>
if ( _Thread_queue_Is_reverse_search( priority ) )
7ec0: 1a00001c bne 7f38 <_Thread_queue_Enqueue_priority+0xb0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
7ec4: e28ca004 add sl, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7ec8: e10f8000 mrs r8, CPSR
7ecc: e3884080 orr r4, r8, #128 ; 0x80
7ed0: 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;
7ed4: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7ed8: e154000a cmp r4, sl
7edc: 1a000009 bne 7f08 <_Thread_queue_Enqueue_priority+0x80>
7ee0: ea000052 b 8030 <_Thread_queue_Enqueue_priority+0x1a8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7ee4: e10f7000 mrs r7, CPSR
7ee8: e129f008 msr CPSR_fc, r8
7eec: 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) ) {
7ef0: e5947010 ldr r7, [r4, #16]
7ef4: e1160007 tst r6, r7
7ef8: 0a000033 beq 7fcc <_Thread_queue_Enqueue_priority+0x144>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
7efc: 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 ) ) {
7f00: e154000a cmp r4, sl
7f04: 0a000002 beq 7f14 <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
7f08: e5945014 ldr r5, [r4, #20]
if ( priority <= search_priority )
7f0c: e1530005 cmp r3, r5
7f10: 8afffff3 bhi 7ee4 <_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 ) ) {
7f14: e1a06008 mov r6, r8
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
7f18: e590c030 ldr ip, [r0, #48] ; 0x30
7f1c: e35c0001 cmp ip, #1
7f20: 0a00002b beq 7fd4 <_Thread_queue_Enqueue_priority+0x14c>
* 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;
7f24: e5826000 str r6, [r2]
return the_thread_queue->sync_state;
7f28: e1a0000c mov r0, ip
}
7f2c: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
7f30: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7f34: e129f008 msr CPSR_fc, r8
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
7f38: e5da5000 ldrb r5, [sl]
7f3c: e2855001 add r5, r5, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7f40: e10f8000 mrs r8, CPSR
7f44: e3884080 orr r4, r8, #128 ; 0x80
7f48: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
7f4c: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7f50: e154000c cmp r4, ip
7f54: 1a000009 bne 7f80 <_Thread_queue_Enqueue_priority+0xf8>
7f58: ea00000b b 7f8c <_Thread_queue_Enqueue_priority+0x104>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7f5c: e10f7000 mrs r7, CPSR
7f60: e129f008 msr CPSR_fc, r8
7f64: 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) ) {
7f68: e5947010 ldr r7, [r4, #16]
7f6c: e1160007 tst r6, r7
7f70: 0affffef beq 7f34 <_Thread_queue_Enqueue_priority+0xac>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
7f74: 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 ) ) {
7f78: e154000c cmp r4, ip
7f7c: 0a000002 beq 7f8c <_Thread_queue_Enqueue_priority+0x104>
search_priority = search_thread->current_priority;
7f80: e5945014 ldr r5, [r4, #20]
if ( priority >= search_priority )
7f84: e1530005 cmp r3, r5
7f88: 3afffff3 bcc 7f5c <_Thread_queue_Enqueue_priority+0xd4>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7f8c: e590c030 ldr ip, [r0, #48] ; 0x30
7f90: e35c0001 cmp ip, #1
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 ) ) {
7f94: e1a06008 mov r6, r8
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7f98: 1affffe1 bne 7f24 <_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 )
7f9c: 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;
7fa0: e3a03000 mov r3, #0
7fa4: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7fa8: 0a000016 beq 8008 <_Thread_queue_Enqueue_priority+0x180>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
7fac: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
7fb0: e8810018 stm r1, {r3, r4}
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7fb4: e5810044 str r0, [r1, #68] ; 0x44
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;
7fb8: e5841000 str r1, [r4]
next_node->previous = the_node;
7fbc: e5831004 str r1, [r3, #4]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7fc0: e129f008 msr CPSR_fc, r8
7fc4: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7fc8: eaffffd7 b 7f2c <_Thread_queue_Enqueue_priority+0xa4>
7fcc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
7fd0: eaffffbc b 7ec8 <_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 )
7fd4: 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;
7fd8: e3a03000 mov r3, #0
7fdc: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7fe0: 0a000008 beq 8008 <_Thread_queue_Enqueue_priority+0x180>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
7fe4: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7fe8: e5814000 str r4, [r1]
the_node->previous = previous_node;
7fec: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7ff0: e5810044 str r0, [r1, #68] ; 0x44
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
7ff4: e5831000 str r1, [r3]
search_node->previous = the_node;
7ff8: e5841004 str r1, [r4, #4]
7ffc: e129f008 msr CPSR_fc, r8
8000: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8004: eaffffc8 b 7f2c <_Thread_queue_Enqueue_priority+0xa4>
8008: 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;
800c: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8010: e5814000 str r4, [r1]
the_node->previous = previous_node;
8014: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
8018: e5810044 str r0, [r1, #68] ; 0x44
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
801c: e5831000 str r1, [r3]
search_node->previous = the_node;
8020: e5841004 str r1, [r4, #4]
8024: e129f006 msr CPSR_fc, r6
8028: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
802c: eaffffbe b 7f2c <_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 ) ) {
8030: e1a06008 mov r6, r8
8034: e3e05000 mvn r5, #0
8038: eaffffb6 b 7f18 <_Thread_queue_Enqueue_priority+0x90>
00000470 <_Timer_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/timer.h>
void _Timer_Manager_initialization(void)
{
}
470: e12fff1e bx lr
00016a3c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
16a3c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
16a40: e24dd024 sub sp, sp, #36 ; 0x24
16a44: e28d700c add r7, sp, #12
16a48: e28d2018 add r2, sp, #24
16a4c: 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;
16a50: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
16a54: e282a004 add sl, r2, #4
16a58: e2872004 add r2, r7, #4
16a5c: e58d2000 str r2, [sp]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
16a60: e58d301c str r3, [sp, #28]
the_chain->last = _Chain_Head(the_chain);
16a64: e28d0018 add r0, sp, #24
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
16a68: e58d200c str r2, [sp, #12]
the_chain->permanent_null = NULL;
16a6c: e58d3010 str r3, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
16a70: e2842008 add r2, r4, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16a74: e2843040 add r3, r4, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
16a78: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
16a7c: e58d0020 str r0, [sp, #32]
16a80: e58d7014 str r7, [sp, #20]
16a84: e59f91a0 ldr r9, [pc, #416] ; 16c2c <_Timer_server_Body+0x1f0>
16a88: e59fb1a0 ldr fp, [pc, #416] ; 16c30 <_Timer_server_Body+0x1f4>
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
16a8c: e58d2008 str r2, [sp, #8]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16a90: e58d3004 str r3, [sp, #4]
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16a94: 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 );
16a98: e2848068 add r8, r4, #104 ; 0x68
{
/*
* 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;
16a9c: e28d0018 add r0, sp, #24
16aa0: e5840078 str r0, [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;
16aa4: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
16aa8: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16aac: e1a00006 mov r0, r6
16ab0: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
16ab4: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16ab8: e1a02007 mov r2, r7
16abc: eb00110f bl 1af00 <_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();
16ac0: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
16ac4: 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 ) {
16ac8: e1550001 cmp r5, r1
16acc: 8a000022 bhi 16b5c <_Timer_server_Body+0x120>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
16ad0: 3a000018 bcc 16b38 <_Timer_server_Body+0xfc>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
16ad4: 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 );
16ad8: e5940078 ldr r0, [r4, #120] ; 0x78
16adc: eb000253 bl 17430 <_Chain_Get>
if ( timer == NULL ) {
16ae0: e3500000 cmp r0, #0
16ae4: 0a00000b beq 16b18 <_Timer_server_Body+0xdc>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
16ae8: e5903038 ldr r3, [r0, #56] ; 0x38
16aec: e3530001 cmp r3, #1
16af0: 0a000015 beq 16b4c <_Timer_server_Body+0x110>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
16af4: e3530003 cmp r3, #3
16af8: 1afffff6 bne 16ad8 <_Timer_server_Body+0x9c>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
16afc: e2801010 add r1, r0, #16
16b00: e1a00008 mov r0, r8
16b04: eb00112c bl 1afbc <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
16b08: e5940078 ldr r0, [r4, #120] ; 0x78
16b0c: eb000247 bl 17430 <_Chain_Get>
if ( timer == NULL ) {
16b10: e3500000 cmp r0, #0
16b14: 1afffff3 bne 16ae8 <_Timer_server_Body+0xac>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
16b18: e10f2000 mrs r2, CPSR
16b1c: e3823080 orr r3, r2, #128 ; 0x80
16b20: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
16b24: e59d3018 ldr r3, [sp, #24]
16b28: e15a0003 cmp sl, r3
16b2c: 0a00000f beq 16b70 <_Timer_server_Body+0x134>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
16b30: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
16b34: eaffffda b 16aa4 <_Timer_server_Body+0x68> <== 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 );
16b38: e0652001 rsb r2, r5, r1
16b3c: e1a00008 mov r0, r8
16b40: e3a01001 mov r1, #1
16b44: eb0010be bl 1ae44 <_Watchdog_Adjust>
16b48: eaffffe1 b 16ad4 <_Timer_server_Body+0x98>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
16b4c: e2801010 add r1, r0, #16
16b50: e1a00006 mov r0, r6
16b54: eb001118 bl 1afbc <_Watchdog_Insert>
16b58: eaffffde b 16ad8 <_Timer_server_Body+0x9c>
/*
* 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 );
16b5c: e0611005 rsb r1, r1, r5
16b60: e1a00008 mov r0, r8
16b64: e1a02007 mov r2, r7
16b68: eb0010e4 bl 1af00 <_Watchdog_Adjust_to_chain>
16b6c: eaffffd8 b 16ad4 <_Timer_server_Body+0x98>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
16b70: e5840078 str r0, [r4, #120] ; 0x78
16b74: 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 ) ) {
16b78: e59d300c ldr r3, [sp, #12]
16b7c: e59d2000 ldr r2, [sp]
16b80: e1520003 cmp r2, r3
16b84: 159d5000 ldrne r5, [sp]
16b88: 1a00000a bne 16bb8 <_Timer_server_Body+0x17c>
16b8c: ea000011 b 16bd8 <_Timer_server_Body+0x19c>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
16b90: e5932000 ldr r2, [r3]
* 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;
16b94: e3a00000 mov r0, #0
the_chain->first = new_first;
16b98: e58d200c str r2, [sp, #12]
16b9c: e5830008 str r0, [r3, #8]
new_first->previous = _Chain_Head(the_chain);
16ba0: e5827004 str r7, [r2, #4]
16ba4: 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 );
16ba8: e2830020 add r0, r3, #32
16bac: e8900003 ldm r0, {r0, r1}
16bb0: e1a0e00f mov lr, pc
16bb4: e593f01c ldr pc, [r3, #28]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
16bb8: e10f1000 mrs r1, CPSR
16bbc: e3813080 orr r3, r1, #128 ; 0x80
16bc0: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
16bc4: e59d300c ldr r3, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
16bc8: e1550003 cmp r5, r3
16bcc: 1affffef bne 16b90 <_Timer_server_Body+0x154>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
16bd0: e129f001 msr CPSR_fc, r1
16bd4: eaffffb0 b 16a9c <_Timer_server_Body+0x60>
}
} else {
ts->active = false;
16bd8: e3a02000 mov r2, #0
16bdc: e5c4207c strb r2, [r4, #124] ; 0x7c
16be0: e59f004c ldr r0, [pc, #76] ; 16c34 <_Timer_server_Body+0x1f8>
16be4: e5903000 ldr r3, [r0]
16be8: e2833001 add r3, r3, #1
16bec: e5803000 str r3, [r0]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
16bf0: e3a01008 mov r1, #8
16bf4: e5940000 ldr r0, [r4]
16bf8: eb000e15 bl 1a454 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
16bfc: e1a00004 mov r0, r4
16c00: ebffff61 bl 1698c <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
16c04: e1a00004 mov r0, r4
16c08: ebffff75 bl 169e4 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
16c0c: eb000b52 bl 1995c <_Thread_Enable_dispatch>
ts->active = true;
16c10: e3a02001 mov r2, #1
16c14: 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 );
16c18: e59d0008 ldr r0, [sp, #8]
16c1c: eb001147 bl 1b140 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16c20: e59d0004 ldr r0, [sp, #4]
16c24: eb001145 bl 1b140 <_Watchdog_Remove>
16c28: eaffff9b b 16a9c <_Timer_server_Body+0x60>
0000a970 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a970: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a974: e1a04000 mov r4, r0
a978: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a97c: e10f3000 mrs r3, CPSR
a980: e3832080 orr r2, r3, #128 ; 0x80
a984: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a988: e1a07000 mov r7, r0
a98c: 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 ) ) {
a990: e1520007 cmp r2, r7
a994: 0a000018 beq a9fc <_Watchdog_Adjust+0x8c>
switch ( direction ) {
a998: e3510000 cmp r1, #0
a99c: 1a000018 bne aa04 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a9a0: e3550000 cmp r5, #0
a9a4: 0a000014 beq a9fc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a9a8: e5926010 ldr r6, [r2, #16]
a9ac: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a9b0: 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 ) {
a9b4: 2a000005 bcs a9d0 <_Watchdog_Adjust+0x60>
a9b8: ea000018 b aa20 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a9bc: e0555006 subs r5, r5, r6
a9c0: 0a00000d beq a9fc <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
a9c4: e5926010 ldr r6, [r2, #16]
a9c8: e1560005 cmp r6, r5
a9cc: 8a000013 bhi aa20 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a9d0: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a9d4: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a9d8: e1a00004 mov r0, r4
a9dc: eb00009e bl ac5c <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a9e0: e10f3000 mrs r3, CPSR
a9e4: e3832080 orr r2, r3, #128 ; 0x80
a9e8: e129f002 msr CPSR_fc, r2
a9ec: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a9f0: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
a9f4: e1a02001 mov r2, r1
a9f8: 1affffef bne a9bc <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a9fc: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
aa00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
aa04: e3510001 cmp r1, #1
aa08: 1afffffb bne a9fc <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
aa0c: e5921010 ldr r1, [r2, #16]
aa10: e0815005 add r5, r1, r5
aa14: e5825010 str r5, [r2, #16]
aa18: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
aa1c: 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;
aa20: e0655006 rsb r5, r5, r6
aa24: e5825010 str r5, [r2, #16]
break;
aa28: eafffff3 b a9fc <_Watchdog_Adjust+0x8c>
0000e8cc <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
e8cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
e8d0: e24dd00c sub sp, sp, #12
e8d4: e1a04000 mov r4, r0
e8d8: e1a05001 mov r5, r1
e8dc: e1a08002 mov r8, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
e8e0: ebfff195 bl af3c <getpid>
e8e4: e1500004 cmp r0, r4
e8e8: 1a000096 bne eb48 <killinfo+0x27c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
e8ec: e3550000 cmp r5, #0
e8f0: 0a000099 beq eb5c <killinfo+0x290>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
e8f4: e2453001 sub r3, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
e8f8: e353001f cmp r3, #31
e8fc: 8a000096 bhi eb5c <killinfo+0x290>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
e900: e59f6280 ldr r6, [pc, #640] ; eb88 <killinfo+0x2bc>
e904: e1a07085 lsl r7, r5, #1
e908: e0872005 add r2, r7, r5
e90c: e0862102 add r2, r6, r2, lsl #2
e910: e5922008 ldr r2, [r2, #8]
e914: e3520001 cmp r2, #1
e918: 0a00003a beq ea08 <killinfo+0x13c>
/*
* 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 ) )
e91c: e3550008 cmp r5, #8
e920: 13550004 cmpne r5, #4
e924: 0a00003a beq ea14 <killinfo+0x148>
e928: e355000b cmp r5, #11
e92c: 0a000038 beq ea14 <killinfo+0x148>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
e930: e3a04001 mov r4, #1
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
e934: e58d4004 str r4, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
e938: e58d5000 str r5, [sp]
siginfo->si_code = SI_USER;
if ( !value ) {
e93c: e3580000 cmp r8, #0
e940: e1a04314 lsl r4, r4, r3
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
e944: 15983000 ldrne r3, [r8]
e948: 158d3008 strne r3, [sp, #8]
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
e94c: e59f3238 ldr r3, [pc, #568] ; eb8c <killinfo+0x2c0>
e950: e5932000 ldr r2, [r3]
e954: e2822001 add r2, r2, #1
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
e958: 058d8008 streq r8, [sp, #8]
e95c: 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;
e960: e59f3228 ldr r3, [pc, #552] ; eb90 <killinfo+0x2c4>
e964: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e968: e5903108 ldr r3, [r0, #264] ; 0x108
e96c: e59330cc ldr r3, [r3, #204] ; 0xcc
e970: e1d43003 bics r3, r4, r3
e974: 1a000014 bne e9cc <killinfo+0x100>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
e978: e59f1214 ldr r1, [pc, #532] ; eb94 <killinfo+0x2c8>
e97c: e4913004 ldr r3, [r1], #4
e980: e1530001 cmp r3, r1
e984: 0a000037 beq ea68 <killinfo+0x19c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e988: e5932030 ldr r2, [r3, #48] ; 0x30
e98c: e1140002 tst r4, r2
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
e990: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e994: e5932108 ldr r2, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e998: 0a000008 beq e9c0 <killinfo+0xf4>
e99c: ea00000a b e9cc <killinfo+0x100>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
e9a0: 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 ;
e9a4: e1530001 cmp r3, r1
e9a8: 0a00002e beq ea68 <killinfo+0x19c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e9ac: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
e9b0: e1140002 tst r4, r2 <== 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;
e9b4: e1a00003 mov r0, r3 <== NOT EXECUTED
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e9b8: e5932108 ldr r2, [r3, #264] ; 0x108 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
e9bc: 1a000002 bne e9cc <killinfo+0x100> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
e9c0: e59220cc ldr r2, [r2, #204] ; 0xcc
e9c4: e1d42002 bics r2, r4, r2
e9c8: 0afffff4 beq e9a0 <killinfo+0xd4>
* 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;
e9cc: e3a03001 mov r3, #1
e9d0: 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 ) ) {
e9d4: e1a01005 mov r1, r5
e9d8: e1a0200d mov r2, sp
e9dc: eb0000f9 bl edc8 <_POSIX_signals_Unblock_thread>
e9e0: e3500000 cmp r0, #0
e9e4: 1a00001c bne ea5c <killinfo+0x190>
* 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 );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
e9e8: e0875005 add r5, r7, r5
/*
* 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 );
e9ec: e1a00004 mov r0, r4
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
e9f0: e1a05105 lsl r5, r5, #2
/*
* 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 );
e9f4: eb0000e1 bl ed80 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
e9f8: e7963005 ldr r3, [r6, r5]
e9fc: e3530002 cmp r3, #2
ea00: 0a000007 beq ea24 <killinfo+0x158>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
ea04: ebffe3ae bl 78c4 <_Thread_Enable_dispatch>
ea08: e3a00000 mov r0, #0
return 0;
}
ea0c: e28dd00c add sp, sp, #12
ea10: 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 );
ea14: eb0001b6 bl f0f4 <pthread_self>
ea18: e1a01005 mov r1, r5
ea1c: eb000179 bl f008 <pthread_kill>
ea20: eafffff9 b ea0c <killinfo+0x140>
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
ea24: e59f016c ldr r0, [pc, #364] ; eb98 <killinfo+0x2cc>
ea28: ebffddca bl 6158 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
ea2c: e250c000 subs ip, r0, #0
ea30: 0a00004e beq eb70 <killinfo+0x2a4>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ea34: e1a0300d mov r3, sp
ea38: e8930007 ldm r3, {r0, r1, r2}
ea3c: e28c3008 add r3, ip, #8
ea40: e8830007 stm r3, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ea44: e59f0150 ldr r0, [pc, #336] ; eb9c <killinfo+0x2d0>
ea48: e1a0100c mov r1, ip
ea4c: e0800005 add r0, r0, r5
ea50: ebffddac bl 6108 <_Chain_Append>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
ea54: ebffe39a bl 78c4 <_Thread_Enable_dispatch>
ea58: eaffffea b ea08 <killinfo+0x13c>
/*
* 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();
ea5c: ebffe398 bl 78c4 <_Thread_Enable_dispatch>
ea60: e3a00000 mov r0, #0
return 0;
ea64: eaffffe8 b ea0c <killinfo+0x140>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
ea68: e59f3130 ldr r3, [pc, #304] ; eba0 <killinfo+0x2d4>
ea6c: e5d3c000 ldrb ip, [r3]
ea70: e59f812c ldr r8, [pc, #300] ; eba4 <killinfo+0x2d8>
ea74: e28cc001 add ip, ip, #1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
ea78: e3a0a000 mov sl, #0
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 ] )
ea7c: e5983008 ldr r3, [r8, #8]
ea80: e3530000 cmp r3, #0
ea84: 0a000020 beq eb0c <killinfo+0x240>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
ea88: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
ea8c: e1d301b0 ldrh r0, [r3, #16]
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
ea90: e3500000 cmp r0, #0
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
ea94: e593e01c ldr lr, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
ea98: 0a00001b beq eb0c <killinfo+0x240>
ea9c: e3a03001 mov r3, #1
the_thread = (Thread_Control *) object_table[ index ];
eaa0: e79e2103 ldr r2, [lr, r3, lsl #2]
if ( !the_thread )
eaa4: e3520000 cmp r2, #0
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
eaa8: e2833001 add r3, r3, #1
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
eaac: 0a000014 beq eb04 <killinfo+0x238>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
eab0: e5921014 ldr r1, [r2, #20]
eab4: e151000c cmp r1, ip
eab8: 8a000011 bhi eb04 <killinfo+0x238>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
eabc: e5929108 ldr r9, [r2, #264] ; 0x108
eac0: e59990cc ldr r9, [r9, #204] ; 0xcc
eac4: e1d49009 bics r9, r4, r9
eac8: 0a00000d beq eb04 <killinfo+0x238>
*
* 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 ) {
eacc: e151000c cmp r1, ip
ead0: 3a000009 bcc eafc <killinfo+0x230>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
ead4: e59a9010 ldr r9, [sl, #16]
ead8: e3590000 cmp r9, #0
eadc: 0a000008 beq eb04 <killinfo+0x238>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
eae0: e592b010 ldr fp, [r2, #16]
eae4: e35b0000 cmp fp, #0
eae8: 0a000003 beq eafc <killinfo+0x230>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
eaec: e3190201 tst r9, #268435456 ; 0x10000000
eaf0: 1a000003 bne eb04 <killinfo+0x238>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
eaf4: e31b0201 tst fp, #268435456 ; 0x10000000
eaf8: 0a000001 beq eb04 <killinfo+0x238>
eafc: e1a0c001 mov ip, r1
eb00: e1a0a002 mov sl, r2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
eb04: e1500003 cmp r0, r3
eb08: 2affffe4 bcs eaa0 <killinfo+0x1d4>
* + 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++) {
eb0c: e59f3094 ldr r3, [pc, #148] ; eba8 <killinfo+0x2dc>
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
eb10: e2888004 add r8, r8, #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++) {
eb14: e1580003 cmp r8, r3
eb18: 1affffd7 bne ea7c <killinfo+0x1b0>
}
}
}
}
if ( interested ) {
eb1c: e35a0000 cmp sl, #0
eb20: 0affffb0 beq e9e8 <killinfo+0x11c>
eb24: e1a0000a mov r0, sl
* 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;
eb28: e3a03001 mov r3, #1
eb2c: 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 ) ) {
eb30: e1a01005 mov r1, r5
eb34: e1a0200d mov r2, sp
eb38: eb0000a2 bl edc8 <_POSIX_signals_Unblock_thread>
eb3c: e3500000 cmp r0, #0
eb40: 0affffa8 beq e9e8 <killinfo+0x11c>
eb44: eaffffc4 b ea5c <killinfo+0x190> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
eb48: eb0002f1 bl f714 <__errno> <== NOT EXECUTED
eb4c: e3a03003 mov r3, #3 <== NOT EXECUTED
eb50: e5803000 str r3, [r0] <== NOT EXECUTED
eb54: e3e00000 mvn r0, #0 <== NOT EXECUTED
eb58: eaffffab b ea0c <killinfo+0x140> <== NOT EXECUTED
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
eb5c: eb0002ec bl f714 <__errno> <== NOT EXECUTED
eb60: e3a03016 mov r3, #22 <== NOT EXECUTED
eb64: e5803000 str r3, [r0] <== NOT EXECUTED
eb68: e3e00000 mvn r0, #0 <== NOT EXECUTED
eb6c: eaffffa6 b ea0c <killinfo+0x140> <== NOT EXECUTED
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();
eb70: ebffe353 bl 78c4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
eb74: eb0002e6 bl f714 <__errno>
eb78: e3a0300b mov r3, #11
eb7c: e5803000 str r3, [r0]
eb80: e3e00000 mvn r0, #0
eb84: eaffffa0 b ea0c <killinfo+0x140>
0000f008 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
f008: e92d40f0 push {r4, r5, r6, r7, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
f00c: e2516000 subs r6, r1, #0
int pthread_kill(
pthread_t thread,
int sig
)
{
f010: e24dd008 sub sp, sp, #8
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
f014: 0a000028 beq f0bc <pthread_kill+0xb4>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
f018: e2467001 sub r7, r6, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
f01c: e357001f cmp r7, #31
f020: 8a000025 bhi f0bc <pthread_kill+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
f024: e28d1004 add r1, sp, #4
f028: ebffe22e bl 78e8 <_Thread_Get>
switch ( location ) {
f02c: e59d2004 ldr r2, [sp, #4]
f030: e3520000 cmp r2, #0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
f034: e1a04000 mov r4, r0
switch ( location ) {
f038: 1a000024 bne f0d0 <pthread_kill+0xc8>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
f03c: e59f30a0 ldr r3, [pc, #160] ; f0e4 <pthread_kill+0xdc>
f040: e0861086 add r1, r6, r6, lsl #1
f044: e0833101 add r3, r3, r1, lsl #2
f048: e5933008 ldr r3, [r3, #8]
f04c: e3530001 cmp r3, #1
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
f050: e5903108 ldr r3, [r0, #264] ; 0x108
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
f054: 0a000013 beq f0a8 <pthread_kill+0xa0>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
f058: e59310d0 ldr r1, [r3, #208] ; 0xd0
f05c: e3a05001 mov r5, #1
f060: e1817715 orr r7, r1, r5, lsl r7
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
f064: e1a01006 mov r1, r6
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
f068: e58370d0 str r7, [r3, #208] ; 0xd0
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
f06c: ebffff55 bl edc8 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
f070: e59f3070 ldr r3, [pc, #112] ; f0e8 <pthread_kill+0xe0>
f074: e5933000 ldr r3, [r3]
f078: e3530000 cmp r3, #0
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
f07c: e5c45074 strb r5, [r4, #116] ; 0x74
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
f080: 0a000004 beq f098 <pthread_kill+0x90>
f084: e59f3060 ldr r3, [pc, #96] ; f0ec <pthread_kill+0xe4>
f088: e5933000 ldr r3, [r3]
f08c: e1540003 cmp r4, r3
_ISR_Signals_to_thread_executing = true;
f090: 059f3058 ldreq r3, [pc, #88] ; f0f0 <pthread_kill+0xe8>
f094: 05c35000 strbeq r5, [r3]
}
_Thread_Enable_dispatch();
f098: ebffe209 bl 78c4 <_Thread_Enable_dispatch>
f09c: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
f0a0: e28dd008 add sp, sp, #8
f0a4: e8bd80f0 pop {r4, r5, r6, r7, pc}
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
f0a8: e58d2000 str r2, [sp] <== NOT EXECUTED
f0ac: ebffe204 bl 78c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
f0b0: e59d2000 ldr r2, [sp] <== NOT EXECUTED
f0b4: e1a00002 mov r0, r2 <== NOT EXECUTED
return 0;
f0b8: eafffff8 b f0a0 <pthread_kill+0x98> <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
f0bc: eb000194 bl f714 <__errno>
f0c0: e3a03016 mov r3, #22
f0c4: e5803000 str r3, [r0]
f0c8: e3e00000 mvn r0, #0
f0cc: eafffff3 b f0a0 <pthread_kill+0x98>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
f0d0: eb00018f bl f714 <__errno> <== NOT EXECUTED
f0d4: e3a03003 mov r3, #3 <== NOT EXECUTED
f0d8: e5803000 str r3, [r0] <== NOT EXECUTED
f0dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
f0e0: eaffffee b f0a0 <pthread_kill+0x98> <== NOT EXECUTED
00006afc <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6afc: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6b00: e2505000 subs r5, r0, #0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6b04: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6b08: 0a00001d beq 6b84 <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 );
6b0c: e1a00001 mov r0, r1
6b10: e28d1004 add r1, sp, #4
6b14: eb001d2c bl dfcc <_POSIX_Absolute_timeout_to_ticks>
6b18: e5951000 ldr r1, [r5]
6b1c: e1a04000 mov r4, r0
6b20: e28d2008 add r2, sp, #8
6b24: e59f0090 ldr r0, [pc, #144] ; 6bbc <pthread_rwlock_timedrdlock+0xc0>
6b28: eb000a9d bl 95a4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
6b2c: e59dc008 ldr ip, [sp, #8]
6b30: e35c0000 cmp ip, #0
6b34: 1a000012 bne 6b84 <pthread_rwlock_timedrdlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
6b38: 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,
6b3c: e3540003 cmp r4, #3
6b40: 13a05000 movne r5, #0
6b44: 03a05001 moveq r5, #1
6b48: e2800010 add r0, r0, #16
6b4c: e59d3004 ldr r3, [sp, #4]
6b50: e1a02005 mov r2, r5
6b54: e58dc000 str ip, [sp]
6b58: eb00073e bl 8858 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
6b5c: eb000ccb bl 9e90 <_Thread_Enable_dispatch>
if ( !do_wait ) {
6b60: e3550000 cmp r5, #0
6b64: 1a00000f bne 6ba8 <pthread_rwlock_timedrdlock+0xac>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
6b68: e59f3050 ldr r3, [pc, #80] ; 6bc0 <pthread_rwlock_timedrdlock+0xc4>
6b6c: e5933000 ldr r3, [r3]
6b70: e5930034 ldr r0, [r3, #52] ; 0x34
6b74: e3500002 cmp r0, #2
6b78: 0a000004 beq 6b90 <pthread_rwlock_timedrdlock+0x94>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6b7c: eb000042 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6b80: ea000000 b 6b88 <pthread_rwlock_timedrdlock+0x8c>
6b84: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6b88: e28dd00c add sp, sp, #12
6b8c: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
6b90: e3540000 cmp r4, #0
6b94: 0afffffa beq 6b84 <pthread_rwlock_timedrdlock+0x88>
6b98: e3540002 cmp r4, #2
6b9c: 93a00074 movls r0, #116 ; 0x74
6ba0: 9afffff8 bls 6b88 <pthread_rwlock_timedrdlock+0x8c>
6ba4: eafffff4 b 6b7c <pthread_rwlock_timedrdlock+0x80> <== NOT EXECUTED
6ba8: e59f3010 ldr r3, [pc, #16] ; 6bc0 <pthread_rwlock_timedrdlock+0xc4>
6bac: e5933000 ldr r3, [r3]
6bb0: e5930034 ldr r0, [r3, #52] ; 0x34
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6bb4: eb000034 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6bb8: eafffff2 b 6b88 <pthread_rwlock_timedrdlock+0x8c>
00006bc4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6bc4: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6bc8: e2505000 subs r5, r0, #0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
6bcc: e24dd00c sub sp, sp, #12
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
6bd0: 0a00001d beq 6c4c <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 );
6bd4: e1a00001 mov r0, r1
6bd8: e28d1004 add r1, sp, #4
6bdc: eb001cfa bl dfcc <_POSIX_Absolute_timeout_to_ticks>
6be0: e5951000 ldr r1, [r5]
6be4: e1a04000 mov r4, r0
6be8: e28d2008 add r2, sp, #8
6bec: e59f0090 ldr r0, [pc, #144] ; 6c84 <pthread_rwlock_timedwrlock+0xc0>
6bf0: eb000a6b bl 95a4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
6bf4: e59dc008 ldr ip, [sp, #8]
6bf8: e35c0000 cmp ip, #0
6bfc: 1a000012 bne 6c4c <pthread_rwlock_timedwrlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
6c00: 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,
6c04: e3540003 cmp r4, #3
6c08: 13a05000 movne r5, #0
6c0c: 03a05001 moveq r5, #1
6c10: e2800010 add r0, r0, #16
6c14: e59d3004 ldr r3, [sp, #4]
6c18: e1a02005 mov r2, r5
6c1c: e58dc000 str ip, [sp]
6c20: eb000743 bl 8934 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
6c24: eb000c99 bl 9e90 <_Thread_Enable_dispatch>
if ( !do_wait &&
6c28: e3550000 cmp r5, #0
6c2c: 1a00000f bne 6c70 <pthread_rwlock_timedwrlock+0xac>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
6c30: e59f3050 ldr r3, [pc, #80] ; 6c88 <pthread_rwlock_timedwrlock+0xc4>
6c34: e5933000 ldr r3, [r3]
6c38: e5930034 ldr r0, [r3, #52] ; 0x34
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
6c3c: e3500002 cmp r0, #2
6c40: 0a000004 beq 6c58 <pthread_rwlock_timedwrlock+0x94>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6c44: eb000010 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6c48: ea000000 b 6c50 <pthread_rwlock_timedwrlock+0x8c>
6c4c: e3a00016 mov r0, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6c50: e28dd00c add sp, sp, #12
6c54: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
6c58: e3540000 cmp r4, #0
6c5c: 0afffffa beq 6c4c <pthread_rwlock_timedwrlock+0x88>
6c60: e3540002 cmp r4, #2
6c64: 93a00074 movls r0, #116 ; 0x74
6c68: 9afffff8 bls 6c50 <pthread_rwlock_timedwrlock+0x8c>
6c6c: eafffff4 b 6c44 <pthread_rwlock_timedwrlock+0x80> <== NOT EXECUTED
6c70: e59f3010 ldr r3, [pc, #16] ; 6c88 <pthread_rwlock_timedwrlock+0xc4>
6c74: e5933000 ldr r3, [r3]
6c78: e5930034 ldr r0, [r3, #52] ; 0x34
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
6c7c: eb000002 bl 6c8c <_POSIX_RWLock_Translate_core_RWLock_return_code>
6c80: eafffff2 b 6c50 <pthread_rwlock_timedwrlock+0x8c>
000071f4 <rtems_io_register_driver>:
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
71f4: e59f3148 ldr r3, [pc, #328] ; 7344 <rtems_io_register_driver+0x150>
71f8: e593c000 ldr ip, [r3]
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;
71fc: e59f3144 ldr r3, [pc, #324] ; 7348 <rtems_io_register_driver+0x154>
if ( rtems_interrupt_is_in_progress() )
7200: e35c0000 cmp ip, #0
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
)
{
7204: e92d4010 push {r4, lr}
7208: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
720c: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
7210: 13a00012 movne r0, #18
7214: 18bd8010 popne {r4, pc}
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
7218: e3520000 cmp r2, #0
721c: 0a00003d beq 7318 <rtems_io_register_driver+0x124>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
7220: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
7224: e5820000 str r0, [r2]
if ( driver_table == NULL )
7228: 0a00003a beq 7318 <rtems_io_register_driver+0x124>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
722c: e591c000 ldr ip, [r1]
7230: e35c0000 cmp ip, #0
7234: 0a000034 beq 730c <rtems_io_register_driver+0x118>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
7238: e1500004 cmp r0, r4
723c: 93a0000a movls r0, #10
7240: 98bd8010 popls {r4, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
7244: e59f0100 ldr r0, [pc, #256] ; 734c <rtems_io_register_driver+0x158>
7248: e590c000 ldr ip, [r0]
724c: e28cc001 add ip, ip, #1
7250: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
7254: e3540000 cmp r4, #0
7258: 1a000020 bne 72e0 <rtems_io_register_driver+0xec>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
725c: e593e000 ldr lr, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
7260: e35e0000 cmp lr, #0
7264: 0a00002d beq 7320 <rtems_io_register_driver+0x12c>
7268: e59f30e0 ldr r3, [pc, #224] ; 7350 <rtems_io_register_driver+0x15c>
726c: e593c000 ldr ip, [r3]
7270: e1a0300c mov r3, ip
7274: ea000003 b 7288 <rtems_io_register_driver+0x94>
7278: e2844001 add r4, r4, #1
727c: e15e0004 cmp lr, r4
7280: e2833018 add r3, r3, #24
7284: 9a000005 bls 72a0 <rtems_io_register_driver+0xac>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
7288: e5930000 ldr r0, [r3]
728c: e3500000 cmp r0, #0
7290: 1afffff8 bne 7278 <rtems_io_register_driver+0x84>
7294: e5930004 ldr r0, [r3, #4]
7298: e3500000 cmp r0, #0
729c: 1afffff5 bne 7278 <rtems_io_register_driver+0x84>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
72a0: e15e0004 cmp lr, r4
72a4: 10843084 addne r3, r4, r4, lsl #1
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
72a8: e5824000 str r4, [r2]
if ( m != n )
72ac: 108cc183 addne ip, ip, r3, lsl #3
72b0: 0a00001b beq 7324 <rtems_io_register_driver+0x130>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
72b4: e1a0e001 mov lr, r1
72b8: e8be000f ldm lr!, {r0, r1, r2, r3}
72bc: e8ac000f stmia ip!, {r0, r1, r2, r3}
72c0: e89e0003 ldm lr, {r0, r1}
72c4: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
72c8: eb00069c bl 8d40 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
72cc: e3a01000 mov r1, #0
72d0: e1a00004 mov r0, r4
72d4: e1a02001 mov r2, r1
}
72d8: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
72dc: ea002418 b 10344 <rtems_io_initialize>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
72e0: e59f3068 ldr r3, [pc, #104] ; 7350 <rtems_io_register_driver+0x15c>
72e4: e084c084 add ip, r4, r4, lsl #1
72e8: e5933000 ldr r3, [r3]
72ec: e1a0c18c lsl ip, ip, #3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
72f0: e793000c ldr r0, [r3, ip]
72f4: e3500000 cmp r0, #0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
72f8: e083c00c add ip, r3, ip
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
72fc: 0a00000b beq 7330 <rtems_io_register_driver+0x13c>
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();
7300: eb00068e bl 8d40 <_Thread_Enable_dispatch>
7304: e3a0000c mov r0, #12
return RTEMS_RESOURCE_IN_USE;
7308: 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;
730c: e591c004 ldr ip, [r1, #4]
7310: e35c0000 cmp ip, #0
7314: 1affffc7 bne 7238 <rtems_io_register_driver+0x44>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
7318: e3a00009 mov r0, #9
}
731c: e8bd8010 pop {r4, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
7320: 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();
7324: eb000685 bl 8d40 <_Thread_Enable_dispatch>
7328: e3a00005 mov r0, #5
return sc;
732c: 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;
7330: e59c3004 ldr r3, [ip, #4]
7334: e3530000 cmp r3, #0
7338: 1afffff0 bne 7300 <rtems_io_register_driver+0x10c>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
733c: e5824000 str r4, [r2]
7340: eaffffdb b 72b4 <rtems_io_register_driver+0xc0>
00006240 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
6240: e3500004 cmp r0, #4
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
6244: e52de004 push {lr} ; (str lr, [sp, #-4]!)
switch ( policy ) {
6248: 9a000004 bls 6260 <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
624c: eb00297f bl 10850 <__errno>
6250: e3a03016 mov r3, #22
6254: e5803000 str r3, [r0]
6258: e3e00000 mvn r0, #0
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
625c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
6260: e3a03001 mov r3, #1
6264: e1a00013 lsl r0, r3, r0
6268: e3100017 tst r0, #23
626c: 11a00003 movne r0, r3
6270: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
6274: eb002975 bl 10850 <__errno> <== NOT EXECUTED
6278: e3a03016 mov r3, #22 <== NOT EXECUTED
627c: e5803000 str r3, [r0] <== NOT EXECUTED
6280: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
6284: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00008810 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
8810: e92d4010 push {r4, lr}
8814: e24dd004 sub sp, sp, #4
8818: 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 );
881c: e1a00001 mov r0, r1
8820: e1a0100d mov r1, sp
8824: eb00197e bl ee24 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
8828: e3500003 cmp r0, #3
882c: 0a000005 beq 8848 <sem_timedwait+0x38>
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
8830: e1a00004 mov r0, r4 <== NOT EXECUTED
8834: e3a01000 mov r1, #0 <== NOT EXECUTED
8838: e59d2000 ldr r2, [sp] <== NOT EXECUTED
883c: eb001c42 bl f94c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
8840: e28dd004 add sp, sp, #4
8844: 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 );
8848: e1a00004 mov r0, r4
884c: e3a01001 mov r1, #1
8850: e59d2000 ldr r2, [sp]
8854: eb001c3c bl f94c <_POSIX_Semaphore_Wait_support>
8858: eafffff8 b 8840 <sem_timedwait+0x30>