=============================================================================== 30016ce0 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30016ce0: e590304c ldr r3, [r0, #76] ; 0x4c Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 30016ce4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30016ce8: e1530002 cmp r3, r2 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 30016cec: e1a07000 mov r7, r0 30016cf0: e1a05002 mov r5, r2 30016cf4: e1a08001 mov r8, r1 30016cf8: e59da020 ldr sl, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30016cfc: 3a000016 bcc 30016d5c <_CORE_message_queue_Broadcast+0x7c> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 30016d00: e5906048 ldr r6, [r0, #72] ; 0x48 30016d04: e3560000 cmp r6, #0 *count = 0; 30016d08: 13a00000 movne r0, #0 30016d0c: 158a0000 strne r0, [sl] * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 30016d10: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30016d14: e1a00007 mov r0, r7 30016d18: eb000b0b bl 3001994c <_Thread_queue_Dequeue> 30016d1c: e2504000 subs r4, r0, #0 30016d20: 0a00000a beq 30016d50 <_CORE_message_queue_Broadcast+0x70> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30016d24: e594002c ldr r0, [r4, #44] ; 0x2c 30016d28: e1a01008 mov r1, r8 30016d2c: e1a02005 mov r2, r5 30016d30: eb00245f bl 3001feb4 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30016d34: e5943028 ldr r3, [r4, #40] ; 0x28 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30016d38: e1a00007 mov r0, r7 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30016d3c: e5835000 str r5, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30016d40: eb000b01 bl 3001994c <_Thread_queue_Dequeue> 30016d44: e2504000 subs r4, r0, #0 _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 30016d48: e2866001 add r6, r6, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30016d4c: 1afffff4 bne 30016d24 <_CORE_message_queue_Broadcast+0x44> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 30016d50: e58a6000 str r6, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 30016d54: e1a00004 mov r0, r4 30016d58: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 30016d5c: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30016d60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 3000b854 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000b854: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000b858: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 3000b85c: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000b860: e24dd01c sub sp, sp, #28 3000b864: e1a05001 mov r5, r1 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 3000b868: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000b86c: e1a07000 mov r7, r0 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 3000b870: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 3000b874: e1a0b003 mov fp, r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 3000b878: e58d200c str r2, [sp, #12] Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 3000b87c: 2a000078 bcs 3000ba64 <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 3000b880: e3530000 cmp r3, #0 3000b884: 1a000074 bne 3000ba5c <_Heap_Allocate_aligned_with_boundary+0x208> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 3000b888: e5979008 ldr r9, [r7, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 3000b88c: e1570009 cmp r7, r9 3000b890: 0a000073 beq 3000ba64 <_Heap_Allocate_aligned_with_boundary+0x210> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 3000b894: e59d300c ldr r3, [sp, #12] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 3000b898: e2651004 rsb r1, r5, #4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 3000b89c: e2833007 add r3, r3, #7 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 3000b8a0: e3a06001 mov r6, #1 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 3000b8a4: e58d3010 str r3, [sp, #16] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 3000b8a8: e58d1014 str r1, [sp, #20] /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 3000b8ac: e599a004 ldr sl, [r9, #4] 3000b8b0: e59d2000 ldr r2, [sp] 3000b8b4: e152000a cmp r2, sl 3000b8b8: 2a00004e bcs 3000b9f8 <_Heap_Allocate_aligned_with_boundary+0x1a4> if ( alignment == 0 ) { 3000b8bc: 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; 3000b8c0: 02894008 addeq r4, r9, #8 3000b8c4: 0a000051 beq 3000ba10 <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 3000b8c8: e5973014 ldr r3, [r7, #20] uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 3000b8cc: e59d1014 ldr r1, [sp, #20] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 3000b8d0: e59d2010 ldr r2, [sp, #16] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 3000b8d4: e3caa001 bic sl, sl, #1 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 3000b8d8: e089a00a add sl, r9, sl uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 3000b8dc: e081400a add r4, r1, sl if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 3000b8e0: e58d3004 str r3, [sp, #4] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 3000b8e4: e0633002 rsb r3, r3, r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000b8e8: e1a00004 mov r0, r4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 3000b8ec: e083a00a add sl, r3, sl 3000b8f0: e1a01008 mov r1, r8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 3000b8f4: e2893008 add r3, r9, #8 3000b8f8: e58d3008 str r3, [sp, #8] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000b8fc: eb0016a2 bl 3001138c <__umodsi3> 3000b900: e0604004 rsb r4, r0, r4 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 3000b904: e15a0004 cmp sl, r4 3000b908: 2a000003 bcs 3000b91c <_Heap_Allocate_aligned_with_boundary+0xc8> 3000b90c: e1a0000a mov r0, sl 3000b910: e1a01008 mov r1, r8 3000b914: eb00169c bl 3001138c <__umodsi3> 3000b918: e060400a rsb r4, r0, sl } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 3000b91c: e35b0000 cmp fp, #0 3000b920: 0a000026 beq 3000b9c0 <_Heap_Allocate_aligned_with_boundary+0x16c> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 3000b924: e084a005 add sl, r4, r5 3000b928: e1a0000a mov r0, sl 3000b92c: e1a0100b mov r1, fp 3000b930: eb001695 bl 3001138c <__umodsi3> 3000b934: e060000a rsb r0, r0, sl /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 3000b938: e15a0000 cmp sl, r0 3000b93c: 93a0a000 movls sl, #0 3000b940: 83a0a001 movhi sl, #1 3000b944: e1540000 cmp r4, r0 3000b948: 23a0a000 movcs sl, #0 3000b94c: e35a0000 cmp sl, #0 3000b950: 0a00001a beq 3000b9c0 <_Heap_Allocate_aligned_with_boundary+0x16c> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 3000b954: e59d1008 ldr r1, [sp, #8] 3000b958: e0813005 add r3, r1, r5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 3000b95c: e1530000 cmp r3, r0 3000b960: 958d9018 strls r9, [sp, #24] 3000b964: 91a09003 movls r9, r3 3000b968: 9a000002 bls 3000b978 <_Heap_Allocate_aligned_with_boundary+0x124> 3000b96c: ea000021 b 3000b9f8 <_Heap_Allocate_aligned_with_boundary+0x1a4> 3000b970: e1590000 cmp r9, r0 3000b974: 8a00003c bhi 3000ba6c <_Heap_Allocate_aligned_with_boundary+0x218> return 0; } alloc_begin = boundary_line - alloc_size; 3000b978: e0654000 rsb r4, r5, r0 3000b97c: e1a01008 mov r1, r8 3000b980: e1a00004 mov r0, r4 3000b984: eb001680 bl 3001138c <__umodsi3> 3000b988: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 3000b98c: e084a005 add sl, r4, r5 3000b990: e1a0000a mov r0, sl 3000b994: e1a0100b mov r1, fp 3000b998: eb00167b bl 3001138c <__umodsi3> 3000b99c: e060000a rsb r0, r0, sl /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 3000b9a0: e15a0000 cmp sl, r0 3000b9a4: 93a0a000 movls sl, #0 3000b9a8: 83a0a001 movhi sl, #1 3000b9ac: e1540000 cmp r4, r0 3000b9b0: 23a0a000 movcs sl, #0 3000b9b4: e35a0000 cmp sl, #0 3000b9b8: 1affffec bne 3000b970 <_Heap_Allocate_aligned_with_boundary+0x11c> 3000b9bc: e59d9018 ldr r9, [sp, #24] boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 3000b9c0: e59d2008 ldr r2, [sp, #8] 3000b9c4: e1520004 cmp r2, r4 3000b9c8: 8a00000a bhi 3000b9f8 <_Heap_Allocate_aligned_with_boundary+0x1a4> 3000b9cc: e59d100c ldr r1, [sp, #12] 3000b9d0: e1a00004 mov r0, r4 3000b9d4: eb00166c bl 3001138c <__umodsi3> 3000b9d8: e3e0a007 mvn sl, #7 3000b9dc: e069a00a rsb sl, r9, sl uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 3000b9e0: e08aa004 add sl, sl, r4 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; if ( free_size >= min_block_size || free_size == 0 ) { 3000b9e4: e59d1004 ldr r1, [sp, #4] 3000b9e8: e060300a rsb r3, r0, sl 3000b9ec: e15a0000 cmp sl, r0 3000b9f0: 11510003 cmpne r1, r3 3000b9f4: 9a000005 bls 3000ba10 <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( alloc_begin != 0 ) { break; } block = block->next; 3000b9f8: e5999008 ldr r9, [r9, #8] 3000b9fc: e2863001 add r3, r6, #1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 3000ba00: e1570009 cmp r7, r9 3000ba04: 0a00001d beq 3000ba80 <_Heap_Allocate_aligned_with_boundary+0x22c> 3000ba08: e1a06003 mov r6, r3 3000ba0c: eaffffa6 b 3000b8ac <_Heap_Allocate_aligned_with_boundary+0x58> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 3000ba10: e3540000 cmp r4, #0 3000ba14: 0afffff7 beq 3000b9f8 <_Heap_Allocate_aligned_with_boundary+0x1a4> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 3000ba18: e5972048 ldr r2, [r7, #72] ; 0x48 stats->searches += search_count; 3000ba1c: e597304c ldr r3, [r7, #76] ; 0x4c search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 3000ba20: e2822001 add r2, r2, #1 stats->searches += search_count; 3000ba24: e0833006 add r3, r3, r6 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 3000ba28: e5872048 str r2, [r7, #72] ; 0x48 stats->searches += search_count; 3000ba2c: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 3000ba30: e1a00007 mov r0, r7 3000ba34: e1a01009 mov r1, r9 3000ba38: e1a02004 mov r2, r4 3000ba3c: e1a03005 mov r3, r5 3000ba40: ebffeb89 bl 3000686c <_Heap_Block_allocate> 3000ba44: e1a00004 mov r0, r4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 3000ba48: e5973044 ldr r3, [r7, #68] ; 0x44 3000ba4c: e1530006 cmp r3, r6 stats->max_search = search_count; 3000ba50: 35876044 strcc r6, [r7, #68] ; 0x44 } return (void *) alloc_begin; } 3000ba54: e28dd01c add sp, sp, #28 3000ba58: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 3000ba5c: e1550003 cmp r5, r3 3000ba60: 9a000008 bls 3000ba88 <_Heap_Allocate_aligned_with_boundary+0x234> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 3000ba64: e3a00000 mov r0, #0 3000ba68: eafffff9 b 3000ba54 <_Heap_Allocate_aligned_with_boundary+0x200> 3000ba6c: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; 3000ba70: e2863001 add r3, r6, #1 <== NOT EXECUTED 3000ba74: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 3000ba78: e1570009 cmp r7, r9 <== NOT EXECUTED 3000ba7c: 1affffe1 bne 3000ba08 <_Heap_Allocate_aligned_with_boundary+0x1b4><== NOT EXECUTED 3000ba80: e3a00000 mov r0, #0 3000ba84: eaffffef b 3000ba48 <_Heap_Allocate_aligned_with_boundary+0x1f4> if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { alignment = page_size; 3000ba88: e3580000 cmp r8, #0 3000ba8c: 01a08002 moveq r8, r2 3000ba90: eaffff7c b 3000b888 <_Heap_Allocate_aligned_with_boundary+0x34> =============================================================================== 3000ba94 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 3000ba94: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000ba98: e1a04000 mov r4, r0 3000ba9c: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 3000baa0: e1a00001 mov r0, r1 3000baa4: e5941010 ldr r1, [r4, #16] 3000baa8: eb001637 bl 3001138c <__umodsi3> 3000baac: e2455008 sub r5, r5, #8 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 3000bab0: e5943020 ldr r3, [r4, #32] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 3000bab4: e0605005 rsb r5, r0, r5 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 3000bab8: e1550003 cmp r5, r3 3000babc: 3a00002f bcc 3000bb80 <_Heap_Free+0xec> 3000bac0: e5941024 ldr r1, [r4, #36] ; 0x24 3000bac4: e1550001 cmp r5, r1 3000bac8: 8a00002c bhi 3000bb80 <_Heap_Free+0xec> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000bacc: e595c004 ldr ip, [r5, #4] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 3000bad0: e3cc6001 bic r6, ip, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 3000bad4: e0852006 add r2, r5, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 3000bad8: e1530002 cmp r3, r2 3000badc: 8a000027 bhi 3000bb80 <_Heap_Free+0xec> 3000bae0: e1510002 cmp r1, r2 3000bae4: 3a000027 bcc 3000bb88 <_Heap_Free+0xf4> 3000bae8: e5927004 ldr r7, [r2, #4] if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 3000baec: e2170001 ands r0, r7, #1 3000baf0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 3000baf4: e1510002 cmp r1, r2 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 3000baf8: e3c77001 bic r7, r7, #1 3000bafc: 03a08000 moveq r8, #0 3000bb00: 0a000004 beq 3000bb18 <_Heap_Free+0x84> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000bb04: e0820007 add r0, r2, r7 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 3000bb08: e5900004 ldr r0, [r0, #4] return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 3000bb0c: e3100001 tst r0, #1 3000bb10: 13a08000 movne r8, #0 3000bb14: 03a08001 moveq r8, #1 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 3000bb18: e21c0001 ands r0, ip, #1 3000bb1c: 1a00001b bne 3000bb90 <_Heap_Free+0xfc> uintptr_t const prev_size = block->prev_size; 3000bb20: e595c000 ldr ip, [r5] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 3000bb24: e06ca005 rsb sl, ip, r5 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 3000bb28: e153000a cmp r3, sl 3000bb2c: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc} 3000bb30: e151000a cmp r1, sl 3000bb34: 38bd85f0 popcc {r4, r5, r6, r7, r8, sl, pc} 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; 3000bb38: e59a0004 ldr r0, [sl, #4] return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 3000bb3c: e2100001 ands r0, r0, #1 3000bb40: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 3000bb44: e3580000 cmp r8, #0 3000bb48: 0a000039 beq 3000bc34 <_Heap_Free+0x1a0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 3000bb4c: e5940038 ldr r0, [r4, #56] ; 0x38 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 3000bb50: e0867007 add r7, r6, r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000bb54: e5923008 ldr r3, [r2, #8] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 3000bb58: e087c00c add ip, r7, ip --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000bb5c: e592200c ldr r2, [r2, #12] } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 3000bb60: e2400001 sub r0, r0, #1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000bb64: e38c1001 orr r1, ip, #1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 3000bb68: e5823008 str r3, [r2, #8] next->prev = prev; 3000bb6c: e583200c str r2, [r3, #12] } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 3000bb70: e5840038 str r0, [r4, #56] ; 0x38 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000bb74: e58a1004 str r1, [sl, #4] next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 3000bb78: e78ac00c str ip, [sl, ip] 3000bb7c: ea00000f b 3000bbc0 <_Heap_Free+0x12c> _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; 3000bb80: e3a00000 mov r0, #0 3000bb84: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3000bb88: e3a00000 mov r0, #0 <== NOT EXECUTED --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000bb8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 3000bb90: e3580000 cmp r8, #0 3000bb94: 0a000014 beq 3000bbec <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000bb98: e5923008 ldr r3, [r2, #8] prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; 3000bb9c: e0877006 add r7, r7, r6 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 3000bba0: e592200c ldr r2, [r2, #12] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000bba4: e3871001 orr r1, r7, #1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 3000bba8: e5853008 str r3, [r5, #8] new_block->prev = prev; 3000bbac: e585200c str r2, [r5, #12] next->prev = new_block; prev->next = new_block; 3000bbb0: e5825008 str r5, [r2, #8] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 3000bbb4: e583500c str r5, [r3, #12] 3000bbb8: e5851004 str r1, [r5, #4] next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 3000bbbc: e7857007 str r7, [r5, r7] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 3000bbc0: e5942040 ldr r2, [r4, #64] ; 0x40 ++stats->frees; 3000bbc4: e5943050 ldr r3, [r4, #80] ; 0x50 stats->free_size += block_size; 3000bbc8: e5941030 ldr r1, [r4, #48] ; 0x30 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 3000bbcc: e2422001 sub r2, r2, #1 ++stats->frees; 3000bbd0: e2833001 add r3, r3, #1 stats->free_size += block_size; 3000bbd4: e0816006 add r6, r1, r6 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 3000bbd8: e5842040 str r2, [r4, #64] ; 0x40 ++stats->frees; 3000bbdc: e5843050 str r3, [r4, #80] ; 0x50 stats->free_size += block_size; 3000bbe0: e5846030 str r6, [r4, #48] ; 0x30 return( true ); 3000bbe4: e3a00001 mov r0, #1 3000bbe8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 3000bbec: e3863001 orr r3, r6, #1 3000bbf0: e5853004 str r3, [r5, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 3000bbf4: e5943038 ldr r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { 3000bbf8: e594c03c ldr ip, [r4, #60] ; 0x3c } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 3000bbfc: e5920004 ldr r0, [r2, #4] RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 3000bc00: e5941008 ldr r1, [r4, #8] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 3000bc04: e2833001 add r3, r3, #1 } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 3000bc08: e3c00001 bic r0, r0, #1 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { 3000bc0c: e153000c cmp r3, ip new_block->next = next; 3000bc10: e5851008 str r1, [r5, #8] new_block->prev = block_before; 3000bc14: e585400c str r4, [r5, #12] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 3000bc18: e5820004 str r0, [r2, #4] block_before->next = new_block; next->prev = new_block; 3000bc1c: e581500c str r5, [r1, #12] next_block->prev_size = block_size; 3000bc20: e7856006 str r6, [r5, r6] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 3000bc24: e5845008 str r5, [r4, #8] /* Statistics */ ++stats->free_blocks; 3000bc28: e5843038 str r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 3000bc2c: 8584303c strhi r3, [r4, #60] ; 0x3c 3000bc30: eaffffe2 b 3000bbc0 <_Heap_Free+0x12c> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 3000bc34: e086c00c add ip, r6, ip prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 3000bc38: e38c3001 orr r3, ip, #1 3000bc3c: e58a3004 str r3, [sl, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 3000bc40: e5923004 ldr r3, [r2, #4] next_block->prev_size = size; 3000bc44: e785c006 str ip, [r5, r6] _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 3000bc48: e3c33001 bic r3, r3, #1 3000bc4c: e5823004 str r3, [r2, #4] 3000bc50: eaffffda b 3000bbc0 <_Heap_Free+0x12c> =============================================================================== 300138bc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 300138bc: e92d40f0 push {r4, r5, r6, r7, lr} 300138c0: e1a04000 mov r4, r0 300138c4: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 300138c8: e1a00001 mov r0, r1 300138cc: e5941010 ldr r1, [r4, #16] 300138d0: e1a07002 mov r7, r2 300138d4: ebfff6ac bl 3001138c <__umodsi3> 300138d8: e2456008 sub r6, r5, #8 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 300138dc: e5943020 ldr r3, [r4, #32] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 300138e0: e0600006 rsb r0, r0, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 300138e4: e1500003 cmp r0, r3 300138e8: 3a000010 bcc 30013930 <_Heap_Size_of_alloc_area+0x74> 300138ec: e5942024 ldr r2, [r4, #36] ; 0x24 300138f0: e1500002 cmp r0, r2 300138f4: 8a00000d bhi 30013930 <_Heap_Size_of_alloc_area+0x74> - 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; 300138f8: e5906004 ldr r6, [r0, #4] 300138fc: e3c66001 bic r6, r6, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 30013900: e0806006 add r6, r0, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 30013904: e1530006 cmp r3, r6 30013908: 8a000008 bhi 30013930 <_Heap_Size_of_alloc_area+0x74> 3001390c: e1520006 cmp r2, r6 30013910: 3a000008 bcc 30013938 <_Heap_Size_of_alloc_area+0x7c> 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; 30013914: e5960004 ldr r0, [r6, #4] block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 30013918: e2100001 ands r0, r0, #1 ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 3001391c: 12655004 rsbne r5, r5, #4 30013920: 10856006 addne r6, r5, r6 30013924: 15876000 strne r6, [r7] return true; 30013928: 13a00001 movne r0, #1 3001392c: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 30013930: e3a00000 mov r0, #0 30013934: e8bd80f0 pop {r4, r5, r6, r7, pc} 30013938: e3a00000 mov r0, #0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 3001393c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 300075cc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 300075cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 300075d0: e59f35cc ldr r3, [pc, #1484] ; 30007ba4 <_Heap_Walk+0x5d8> uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 300075d4: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 300075d8: e5933000 ldr r3, [r3] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 300075dc: e59f25c4 ldr r2, [pc, #1476] ; 30007ba8 <_Heap_Walk+0x5dc> 300075e0: e59f95c4 ldr r9, [pc, #1476] ; 30007bac <_Heap_Walk+0x5e0> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 300075e4: e1a0a001 mov sl, r1 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 300075e8: 11a09002 movne r9, r2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 300075ec: e5901010 ldr r1, [r0, #16] Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 300075f0: e3530003 cmp r3, #3 int source, bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 300075f4: e5902014 ldr r2, [r0, #20] Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 300075f8: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 300075fc: e24dd038 sub sp, sp, #56 ; 0x38 30007600: e1a04000 mov r4, r0 uintptr_t const page_size = heap->page_size; 30007604: e58d1024 str r1, [sp, #36] ; 0x24 uintptr_t const min_block_size = heap->min_block_size; 30007608: e58d2028 str r2, [sp, #40] ; 0x28 Heap_Block *const first_block = heap->first_block; 3000760c: e5908020 ldr r8, [r0, #32] Heap_Block *const last_block = heap->last_block; 30007610: e58d302c str r3, [sp, #44] ; 0x2c Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 30007614: 0a000002 beq 30007624 <_Heap_Walk+0x58> } block = next_block; } while ( block != first_block ); return true; 30007618: e3a00001 mov r0, #1 } 3000761c: e28dd038 add sp, sp, #56 ; 0x38 30007620: 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)( 30007624: e594101c ldr r1, [r4, #28] 30007628: e5900018 ldr r0, [r0, #24] 3000762c: e5942008 ldr r2, [r4, #8] 30007630: e594300c ldr r3, [r4, #12] 30007634: e59dc028 ldr ip, [sp, #40] ; 0x28 30007638: e58d1008 str r1, [sp, #8] 3000763c: e59d102c ldr r1, [sp, #44] ; 0x2c 30007640: e58d0004 str r0, [sp, #4] 30007644: e58d1010 str r1, [sp, #16] 30007648: e58d2014 str r2, [sp, #20] 3000764c: e58d3018 str r3, [sp, #24] 30007650: e59f2558 ldr r2, [pc, #1368] ; 30007bb0 <_Heap_Walk+0x5e4> 30007654: e58dc000 str ip, [sp] 30007658: e58d800c str r8, [sp, #12] 3000765c: e1a0000a mov r0, sl 30007660: e3a01000 mov r1, #0 30007664: e59d3024 ldr r3, [sp, #36] ; 0x24 30007668: e1a0e00f mov lr, pc 3000766c: e12fff19 bx r9 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 30007670: e59d2024 ldr r2, [sp, #36] ; 0x24 30007674: e3520000 cmp r2, #0 30007678: 0a000026 beq 30007718 <_Heap_Walk+0x14c> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 3000767c: e59d3024 ldr r3, [sp, #36] ; 0x24 30007680: e2135007 ands r5, r3, #7 30007684: 1a00002a bne 30007734 <_Heap_Walk+0x168> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007688: e59d0028 ldr r0, [sp, #40] ; 0x28 3000768c: e59d1024 ldr r1, [sp, #36] ; 0x24 30007690: ebffe53f bl 30000b94 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 30007694: e250b000 subs fp, r0, #0 30007698: 1a00002c bne 30007750 <_Heap_Walk+0x184> 3000769c: e2880008 add r0, r8, #8 300076a0: e59d1024 ldr r1, [sp, #36] ; 0x24 300076a4: ebffe53a bl 30000b94 <__umodsi3> ); return false; } if ( 300076a8: e2506000 subs r6, r0, #0 300076ac: 1a00002f bne 30007770 <_Heap_Walk+0x1a4> block = next_block; } while ( block != first_block ); return true; } 300076b0: e598b004 ldr fp, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 300076b4: e21b5001 ands r5, fp, #1 300076b8: 0a0000cd beq 300079f4 <_Heap_Walk+0x428> - 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; 300076bc: e59dc02c ldr ip, [sp, #44] ; 0x2c 300076c0: e59c3004 ldr r3, [ip, #4] 300076c4: e3c33001 bic r3, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 300076c8: e08c3003 add r3, ip, r3 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 300076cc: e5935004 ldr r5, [r3, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 300076d0: e2155001 ands r5, r5, #1 300076d4: 0a000008 beq 300076fc <_Heap_Walk+0x130> ); return false; } if ( 300076d8: e1580003 cmp r8, r3 300076dc: 0a00002b beq 30007790 <_Heap_Walk+0x1c4> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 300076e0: e1a0000a mov r0, sl <== NOT EXECUTED 300076e4: e3a01001 mov r1, #1 <== NOT EXECUTED 300076e8: e59f24c4 ldr r2, [pc, #1220] ; 30007bb4 <_Heap_Walk+0x5e8> <== NOT EXECUTED 300076ec: e1a0e00f mov lr, pc <== NOT EXECUTED 300076f0: e12fff19 bx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300076f4: e1a00006 mov r0, r6 <== NOT EXECUTED 300076f8: eaffffc7 b 3000761c <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 300076fc: e1a0000a mov r0, sl 30007700: e3a01001 mov r1, #1 30007704: e59f24ac ldr r2, [pc, #1196] ; 30007bb8 <_Heap_Walk+0x5ec> 30007708: e1a0e00f mov lr, pc 3000770c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007710: e1a00005 mov r0, r5 30007714: eaffffc0 b 3000761c <_Heap_Walk+0x50> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 30007718: e1a0000a mov r0, sl 3000771c: e3a01001 mov r1, #1 30007720: e59f2494 ldr r2, [pc, #1172] ; 30007bbc <_Heap_Walk+0x5f0> 30007724: e1a0e00f mov lr, pc 30007728: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 3000772c: e59d0024 ldr r0, [sp, #36] ; 0x24 30007730: eaffffb9 b 3000761c <_Heap_Walk+0x50> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 30007734: e1a0000a mov r0, sl 30007738: e3a01001 mov r1, #1 3000773c: e59f247c ldr r2, [pc, #1148] ; 30007bc0 <_Heap_Walk+0x5f4> 30007740: e1a0e00f mov lr, pc 30007744: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007748: e3a00000 mov r0, #0 3000774c: eaffffb2 b 3000761c <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 30007750: e1a0000a mov r0, sl 30007754: e3a01001 mov r1, #1 30007758: e59f2464 ldr r2, [pc, #1124] ; 30007bc4 <_Heap_Walk+0x5f8> 3000775c: e59d3028 ldr r3, [sp, #40] ; 0x28 30007760: e1a0e00f mov lr, pc 30007764: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007768: e1a00005 mov r0, r5 3000776c: eaffffaa b 3000761c <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 30007770: e1a0000a mov r0, sl 30007774: e3a01001 mov r1, #1 30007778: e59f2448 ldr r2, [pc, #1096] ; 30007bc8 <_Heap_Walk+0x5fc> 3000777c: e1a03008 mov r3, r8 30007780: e1a0e00f mov lr, pc 30007784: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007788: e1a0000b mov r0, fp 3000778c: eaffffa2 b 3000761c <_Heap_Walk+0x50> block = next_block; } while ( block != first_block ); return true; } 30007790: e5945008 ldr r5, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30007794: e5947010 ldr r7, [r4, #16] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 30007798: e1540005 cmp r4, r5 3000779c: 05943020 ldreq r3, [r4, #32] 300077a0: 0a00000d beq 300077dc <_Heap_Walk+0x210> block = next_block; } while ( block != first_block ); return true; } 300077a4: e5943020 ldr r3, [r4, #32] const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 300077a8: e1530005 cmp r3, r5 300077ac: 9a000097 bls 30007a10 <_Heap_Walk+0x444> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 300077b0: e1a0000a mov r0, sl 300077b4: e3a01001 mov r1, #1 300077b8: e59f240c ldr r2, [pc, #1036] ; 30007bcc <_Heap_Walk+0x600> 300077bc: e1a03005 mov r3, r5 300077c0: e1a0e00f mov lr, pc 300077c4: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300077c8: e3a00000 mov r0, #0 300077cc: eaffff92 b 3000761c <_Heap_Walk+0x50> 300077d0: e1a03008 mov r3, r8 300077d4: e59db034 ldr fp, [sp, #52] ; 0x34 300077d8: e59d8030 ldr r8, [sp, #48] ; 0x30 ); return false; } if ( _Heap_Is_used( free_block ) ) { 300077dc: e1a06008 mov r6, r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 300077e0: e3cb7001 bic r7, fp, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 300077e4: e0875006 add r5, r7, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 300077e8: e1530005 cmp r3, r5 300077ec: 9a000008 bls 30007814 <_Heap_Walk+0x248> Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 300077f0: e1a0000a mov r0, sl 300077f4: e58d5000 str r5, [sp] 300077f8: e3a01001 mov r1, #1 300077fc: e59f23cc ldr r2, [pc, #972] ; 30007bd0 <_Heap_Walk+0x604> 30007800: e1a03006 mov r3, r6 30007804: e1a0e00f mov lr, pc 30007808: e12fff19 bx r9 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 3000780c: e3a00000 mov r0, #0 30007810: eaffff81 b 3000761c <_Heap_Walk+0x50> 30007814: e5943024 ldr r3, [r4, #36] ; 0x24 30007818: e1530005 cmp r3, r5 3000781c: 3afffff3 bcc 300077f0 <_Heap_Walk+0x224> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007820: e59d1024 ldr r1, [sp, #36] ; 0x24 30007824: e1a00007 mov r0, r7 30007828: ebffe4d9 bl 30000b94 <__umodsi3> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 3000782c: e59d102c ldr r1, [sp, #44] ; 0x2c 30007830: e0563001 subs r3, r6, r1 30007834: 13a03001 movne r3, #1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 30007838: e3500000 cmp r0, #0 3000783c: 0a000001 beq 30007848 <_Heap_Walk+0x27c> 30007840: e3530000 cmp r3, #0 30007844: 1a0000aa bne 30007af4 <_Heap_Walk+0x528> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 30007848: e59d2028 ldr r2, [sp, #40] ; 0x28 3000784c: e1520007 cmp r2, r7 30007850: 9a000001 bls 3000785c <_Heap_Walk+0x290> 30007854: e3530000 cmp r3, #0 30007858: 1a0000ae bne 30007b18 <_Heap_Walk+0x54c> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 3000785c: e1560005 cmp r6, r5 30007860: 3a000001 bcc 3000786c <_Heap_Walk+0x2a0> 30007864: e3530000 cmp r3, #0 30007868: 1a0000b4 bne 30007b40 <_Heap_Walk+0x574> 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; 3000786c: e5953004 ldr r3, [r5, #4] 30007870: e20bb001 and fp, fp, #1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 30007874: e3130001 tst r3, #1 30007878: 0a000018 beq 300078e0 <_Heap_Walk+0x314> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 3000787c: e35b0000 cmp fp, #0 30007880: 0a00000c beq 300078b8 <_Heap_Walk+0x2ec> (*printer)( 30007884: e58d7000 str r7, [sp] 30007888: e1a0000a mov r0, sl 3000788c: e3a01000 mov r1, #0 30007890: e59f233c ldr r2, [pc, #828] ; 30007bd4 <_Heap_Walk+0x608> 30007894: e1a03006 mov r3, r6 30007898: e1a0e00f mov lr, pc 3000789c: e12fff19 bx r9 block->prev_size ); } block = next_block; } while ( block != first_block ); 300078a0: e1580005 cmp r8, r5 300078a4: 0affff5b beq 30007618 <_Heap_Walk+0x4c> 300078a8: e595b004 ldr fp, [r5, #4] 300078ac: e5943020 ldr r3, [r4, #32] 300078b0: e1a06005 mov r6, r5 300078b4: eaffffc9 b 300077e0 <_Heap_Walk+0x214> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 300078b8: e58d7000 str r7, [sp] 300078bc: e5963000 ldr r3, [r6] 300078c0: e1a0000a mov r0, sl 300078c4: e58d3004 str r3, [sp, #4] 300078c8: e1a0100b mov r1, fp 300078cc: e59f2304 ldr r2, [pc, #772] ; 30007bd8 <_Heap_Walk+0x60c> 300078d0: e1a03006 mov r3, r6 300078d4: e1a0e00f mov lr, pc 300078d8: e12fff19 bx r9 300078dc: eaffffef b 300078a0 <_Heap_Walk+0x2d4> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 300078e0: e596200c ldr r2, [r6, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 300078e4: e5943008 ldr r3, [r4, #8] block = next_block; } while ( block != first_block ); return true; } 300078e8: e594100c ldr r1, [r4, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 300078ec: e1530002 cmp r3, r2 300078f0: 059f02e4 ldreq r0, [pc, #740] ; 30007bdc <_Heap_Walk+0x610> 300078f4: 0a000003 beq 30007908 <_Heap_Walk+0x33c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 300078f8: e59f32e0 ldr r3, [pc, #736] ; 30007be0 <_Heap_Walk+0x614> 300078fc: e1540002 cmp r4, r2 30007900: e59f02dc ldr r0, [pc, #732] ; 30007be4 <_Heap_Walk+0x618> 30007904: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 30007908: e5963008 ldr r3, [r6, #8] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 3000790c: e1510003 cmp r1, r3 30007910: 059f12d0 ldreq r1, [pc, #720] ; 30007be8 <_Heap_Walk+0x61c> 30007914: 0a000003 beq 30007928 <_Heap_Walk+0x35c> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 30007918: e59fc2cc ldr ip, [pc, #716] ; 30007bec <_Heap_Walk+0x620> 3000791c: e1540003 cmp r4, r3 30007920: e59f12bc ldr r1, [pc, #700] ; 30007be4 <_Heap_Walk+0x618> 30007924: 01a0100c moveq r1, ip Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 30007928: e58d2004 str r2, [sp, #4] 3000792c: e58d0008 str r0, [sp, #8] 30007930: e58d300c str r3, [sp, #12] 30007934: e58d1010 str r1, [sp, #16] 30007938: e1a03006 mov r3, r6 3000793c: e58d7000 str r7, [sp] 30007940: e1a0000a mov r0, sl 30007944: e3a01000 mov r1, #0 30007948: e59f22a0 ldr r2, [pc, #672] ; 30007bf0 <_Heap_Walk+0x624> 3000794c: e1a0e00f mov lr, pc 30007950: e12fff19 bx r9 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 30007954: e5953000 ldr r3, [r5] 30007958: e1570003 cmp r7, r3 3000795c: 1a000011 bne 300079a8 <_Heap_Walk+0x3dc> ); return false; } if ( !prev_used ) { 30007960: e35b0000 cmp fp, #0 30007964: 0a00001a beq 300079d4 <_Heap_Walk+0x408> block = next_block; } while ( block != first_block ); return true; } 30007968: 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 ) { 3000796c: e1540003 cmp r4, r3 30007970: 0a000004 beq 30007988 <_Heap_Walk+0x3bc> if ( free_block == block ) { 30007974: e1560003 cmp r6, r3 30007978: 0affffc8 beq 300078a0 <_Heap_Walk+0x2d4> return true; } free_block = free_block->next; 3000797c: 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 ) { 30007980: e1540003 cmp r4, r3 30007984: 1afffffa bne 30007974 <_Heap_Walk+0x3a8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 30007988: e1a0000a mov r0, sl 3000798c: e3a01001 mov r1, #1 30007990: e59f225c ldr r2, [pc, #604] ; 30007bf4 <_Heap_Walk+0x628> 30007994: e1a03006 mov r3, r6 30007998: e1a0e00f mov lr, pc 3000799c: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 300079a0: e3a00000 mov r0, #0 300079a4: eaffff1c b 3000761c <_Heap_Walk+0x50> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 300079a8: e58d3004 str r3, [sp, #4] 300079ac: e1a0000a mov r0, sl 300079b0: e58d7000 str r7, [sp] 300079b4: e58d5008 str r5, [sp, #8] 300079b8: e3a01001 mov r1, #1 300079bc: e59f2234 ldr r2, [pc, #564] ; 30007bf8 <_Heap_Walk+0x62c> 300079c0: e1a03006 mov r3, r6 300079c4: e1a0e00f mov lr, pc 300079c8: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 300079cc: e3a00000 mov r0, #0 300079d0: eaffff11 b 3000761c <_Heap_Walk+0x50> return false; } if ( !prev_used ) { (*printer)( 300079d4: e1a0000a mov r0, sl 300079d8: e3a01001 mov r1, #1 300079dc: e59f2218 ldr r2, [pc, #536] ; 30007bfc <_Heap_Walk+0x630> 300079e0: e1a03006 mov r3, r6 300079e4: e1a0e00f mov lr, pc 300079e8: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 300079ec: e1a0000b mov r0, fp 300079f0: eaffff09 b 3000761c <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 300079f4: e1a0000a mov r0, sl 300079f8: e3a01001 mov r1, #1 300079fc: e59f21fc ldr r2, [pc, #508] ; 30007c00 <_Heap_Walk+0x634> 30007a00: e1a0e00f mov lr, pc 30007a04: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007a08: e1a00005 mov r0, r5 30007a0c: eaffff02 b 3000761c <_Heap_Walk+0x50> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 30007a10: e594c024 ldr ip, [r4, #36] ; 0x24 30007a14: e15c0005 cmp ip, r5 30007a18: 3affff64 bcc 300077b0 <_Heap_Walk+0x1e4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007a1c: e2850008 add r0, r5, #8 30007a20: e1a01007 mov r1, r7 30007a24: e58d3020 str r3, [sp, #32] 30007a28: e58dc01c str ip, [sp, #28] 30007a2c: ebffe458 bl 30000b94 <__umodsi3> ); return false; } if ( 30007a30: e3500000 cmp r0, #0 30007a34: e59d3020 ldr r3, [sp, #32] 30007a38: e59dc01c ldr ip, [sp, #28] 30007a3c: 1a000048 bne 30007b64 <_Heap_Walk+0x598> - 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; 30007a40: e5952004 ldr r2, [r5, #4] 30007a44: e3c22001 bic r2, r2, #1 block = next_block; } while ( block != first_block ); return true; } 30007a48: e0852002 add r2, r5, r2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 30007a4c: e5922004 ldr r2, [r2, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007a50: e3120001 tst r2, #1 30007a54: 1a00004a bne 30007b84 <_Heap_Walk+0x5b8> 30007a58: e58d8030 str r8, [sp, #48] ; 0x30 30007a5c: e58db034 str fp, [sp, #52] ; 0x34 30007a60: e1a01004 mov r1, r4 30007a64: e1a06005 mov r6, r5 30007a68: e1a08003 mov r8, r3 30007a6c: e1a0b00c mov fp, ip 30007a70: ea000013 b 30007ac4 <_Heap_Walk+0x4f8> return false; } prev_block = free_block; free_block = free_block->next; 30007a74: e5955008 ldr r5, [r5, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 30007a78: e1540005 cmp r4, r5 30007a7c: 0affff53 beq 300077d0 <_Heap_Walk+0x204> 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; 30007a80: e1580005 cmp r8, r5 30007a84: 8affff49 bhi 300077b0 <_Heap_Walk+0x1e4> 30007a88: e155000b cmp r5, fp RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007a8c: e2850008 add r0, r5, #8 30007a90: e1a01007 mov r1, r7 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 30007a94: 8affff45 bhi 300077b0 <_Heap_Walk+0x1e4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007a98: ebffe43d bl 30000b94 <__umodsi3> ); return false; } if ( 30007a9c: e3500000 cmp r0, #0 30007aa0: 1a00002f bne 30007b64 <_Heap_Walk+0x598> - 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; 30007aa4: e5953004 ldr r3, [r5, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007aa8: e1a01006 mov r1, r6 30007aac: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 30007ab0: e0833005 add r3, r3, r5 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 30007ab4: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007ab8: e1a06005 mov r6, r5 30007abc: e3130001 tst r3, #1 30007ac0: 1a00002f bne 30007b84 <_Heap_Walk+0x5b8> ); return false; } if ( free_block->prev != prev_block ) { 30007ac4: e595200c ldr r2, [r5, #12] 30007ac8: e1520001 cmp r2, r1 30007acc: 0affffe8 beq 30007a74 <_Heap_Walk+0x4a8> (*printer)( 30007ad0: e58d2000 str r2, [sp] 30007ad4: e1a0000a mov r0, sl 30007ad8: e3a01001 mov r1, #1 30007adc: e59f2120 ldr r2, [pc, #288] ; 30007c04 <_Heap_Walk+0x638> 30007ae0: e1a03005 mov r3, r5 30007ae4: e1a0e00f mov lr, pc 30007ae8: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007aec: e3a00000 mov r0, #0 30007af0: eafffec9 b 3000761c <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 30007af4: e1a0000a mov r0, sl 30007af8: e58d7000 str r7, [sp] 30007afc: e3a01001 mov r1, #1 30007b00: e59f2100 ldr r2, [pc, #256] ; 30007c08 <_Heap_Walk+0x63c> 30007b04: e1a03006 mov r3, r6 30007b08: e1a0e00f mov lr, pc 30007b0c: e12fff19 bx r9 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 30007b10: e3a00000 mov r0, #0 30007b14: eafffec0 b 3000761c <_Heap_Walk+0x50> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 30007b18: e58d2004 str r2, [sp, #4] 30007b1c: e1a0000a mov r0, sl 30007b20: e58d7000 str r7, [sp] 30007b24: e3a01001 mov r1, #1 30007b28: e59f20dc ldr r2, [pc, #220] ; 30007c0c <_Heap_Walk+0x640> 30007b2c: e1a03006 mov r3, r6 30007b30: e1a0e00f mov lr, pc 30007b34: e12fff19 bx r9 block, block_size, min_block_size ); return false; 30007b38: e3a00000 mov r0, #0 30007b3c: eafffeb6 b 3000761c <_Heap_Walk+0x50> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 30007b40: e1a0000a mov r0, sl 30007b44: e58d5000 str r5, [sp] 30007b48: e3a01001 mov r1, #1 30007b4c: e59f20bc ldr r2, [pc, #188] ; 30007c10 <_Heap_Walk+0x644> 30007b50: e1a03006 mov r3, r6 30007b54: e1a0e00f mov lr, pc 30007b58: e12fff19 bx r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 30007b5c: e3a00000 mov r0, #0 30007b60: eafffead b 3000761c <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 30007b64: e1a0000a mov r0, sl 30007b68: e3a01001 mov r1, #1 30007b6c: e59f20a0 ldr r2, [pc, #160] ; 30007c14 <_Heap_Walk+0x648> 30007b70: e1a03005 mov r3, r5 30007b74: e1a0e00f mov lr, pc 30007b78: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007b7c: e3a00000 mov r0, #0 30007b80: eafffea5 b 3000761c <_Heap_Walk+0x50> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 30007b84: e1a0000a mov r0, sl 30007b88: e3a01001 mov r1, #1 30007b8c: e59f2084 ldr r2, [pc, #132] ; 30007c18 <_Heap_Walk+0x64c> 30007b90: e1a03005 mov r3, r5 30007b94: e1a0e00f mov lr, pc 30007b98: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007b9c: e3a00000 mov r0, #0 30007ba0: eafffe9d b 3000761c <_Heap_Walk+0x50> =============================================================================== 300069b0 <_Internal_error_Occurred>: bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 300069b0: e59f303c ldr r3, [pc, #60] ; 300069f4 <_Internal_error_Occurred+0x44> void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 300069b4: e201c0ff and ip, r1, #255 ; 0xff 300069b8: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 300069bc: e1a0100c mov r1, ip bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 300069c0: e5830000 str r0, [r3] _Internal_errors_What_happened.is_internal = is_internal; 300069c4: e5c3c004 strb ip, [r3, #4] _Internal_errors_What_happened.the_error = the_error; 300069c8: e5832008 str r2, [r3, #8] void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 300069cc: e1a04002 mov r4, r2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 300069d0: eb00079e bl 30008850 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 300069d4: e59f301c ldr r3, [pc, #28] ; 300069f8 <_Internal_error_Occurred+0x48><== NOT EXECUTED 300069d8: e3a02005 mov r2, #5 <== NOT EXECUTED 300069dc: e5832000 str r2, [r3] <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300069e0: e10f2000 mrs r2, CPSR <== NOT EXECUTED 300069e4: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 300069e8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 300069ec: e1a00004 mov r0, r4 <== NOT EXECUTED 300069f0: eafffffe b 300069f0 <_Internal_error_Occurred+0x40> <== NOT EXECUTED =============================================================================== 30006ab8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30006ab8: 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 ) 30006abc: e5904034 ldr r4, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { 30006ac0: e24dd014 sub sp, sp, #20 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 30006ac4: e3540000 cmp r4, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 30006ac8: e1a05000 mov r5, r0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 30006acc: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 30006ad0: 0a00009b beq 30006d44 <_Objects_Extend_information+0x28c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 30006ad4: e1d081b4 ldrh r8, [r0, #20] 30006ad8: e1d0a1b0 ldrh sl, [r0, #16] 30006adc: e1a01008 mov r1, r8 30006ae0: e1a0000a mov r0, sl 30006ae4: eb0029e2 bl 30011274 <__aeabi_uidiv> 30006ae8: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 30006aec: e1b03823 lsrs r3, r3, #16 30006af0: 0a000099 beq 30006d5c <_Objects_Extend_information+0x2a4> if ( information->object_blocks[ block ] == NULL ) { 30006af4: e5949000 ldr r9, [r4] 30006af8: e3590000 cmp r9, #0 30006afc: 01a01008 moveq r1, r8 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 30006b00: 01a06007 moveq r6, r7 index_base = minimum_index; block = 0; 30006b04: 01a04009 moveq r4, r9 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 30006b08: 0a00000c beq 30006b40 <_Objects_Extend_information+0x88> 30006b0c: e1a02004 mov r2, r4 30006b10: e1a01008 mov r1, r8 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 30006b14: e1a06007 mov r6, r7 index_base = minimum_index; block = 0; 30006b18: e3a04000 mov r4, #0 30006b1c: ea000002 b 30006b2c <_Objects_Extend_information+0x74> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 30006b20: e5b29004 ldr r9, [r2, #4]! 30006b24: e3590000 cmp r9, #0 30006b28: 0a000004 beq 30006b40 <_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++ ) { 30006b2c: e2844001 add r4, r4, #1 30006b30: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 30006b34: e0866008 add r6, r6, r8 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30006b38: 8afffff8 bhi 30006b20 <_Objects_Extend_information+0x68> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 30006b3c: e3a09001 mov r9, #1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 30006b40: 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 ) { 30006b44: e35a0801 cmp sl, #65536 ; 0x10000 30006b48: 2a000063 bcs 30006cdc <_Objects_Extend_information+0x224> /* * 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 ) { 30006b4c: e5d52012 ldrb r2, [r5, #18] /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 30006b50: e5950018 ldr r0, [r5, #24] if ( information->auto_extend ) { 30006b54: e3520000 cmp r2, #0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 30006b58: e0000091 mul r0, r1, r0 if ( information->auto_extend ) { 30006b5c: 1a000060 bne 30006ce4 <_Objects_Extend_information+0x22c> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 30006b60: e58d3000 str r3, [sp] 30006b64: eb00087c bl 30008d5c <_Workspace_Allocate_or_fatal_error> 30006b68: e59d3000 ldr r3, [sp] 30006b6c: e1a08000 mov r8, r0 } /* * Do we need to grow the tables? */ if ( do_extend ) { 30006b70: e3590000 cmp r9, #0 30006b74: 0a000039 beq 30006c60 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 30006b78: e283b001 add fp, r3, #1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 30006b7c: e08b008b add r0, fp, fp, lsl #1 ((maximum + minimum_index) * sizeof(Objects_Control *)); 30006b80: e08a0000 add r0, sl, r0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 30006b84: e0800007 add r0, r0, r7 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 30006b88: e1a00100 lsl r0, r0, #2 30006b8c: e58d3000 str r3, [sp] 30006b90: eb000867 bl 30008d34 <_Workspace_Allocate> if ( !object_blocks ) { 30006b94: e2509000 subs r9, r0, #0 30006b98: e59d3000 ldr r3, [sp] 30006b9c: 0a000073 beq 30006d70 <_Objects_Extend_information+0x2b8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30006ba0: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 30006ba4: e089c10b add ip, r9, fp, lsl #2 30006ba8: e1570002 cmp r7, r2 30006bac: e089b18b add fp, r9, fp, lsl #3 30006bb0: 3a000051 bcc 30006cfc <_Objects_Extend_information+0x244> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30006bb4: e3570000 cmp r7, #0 30006bb8: 13a02000 movne r2, #0 30006bbc: 11a0100b movne r1, fp local_table[ index ] = NULL; 30006bc0: 11a00002 movne r0, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30006bc4: 0a000003 beq 30006bd8 <_Objects_Extend_information+0x120> 30006bc8: e2822001 add r2, r2, #1 30006bcc: e1570002 cmp r7, r2 local_table[ index ] = NULL; 30006bd0: e4810004 str r0, [r1], #4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30006bd4: 8afffffb bhi 30006bc8 <_Objects_Extend_information+0x110> 30006bd8: 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 ); 30006bdc: e1d511b4 ldrh r1, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30006be0: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30006be4: e0861001 add r1, r6, r1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 30006be8: e1560001 cmp r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30006bec: e7890003 str r0, [r9, r3] inactive_per_block[block_count] = 0; 30006bf0: e78c0003 str r0, [ip, r3] for ( index=index_base ; 30006bf4: 2a000005 bcs 30006c10 <_Objects_Extend_information+0x158> 30006bf8: e08b2106 add r2, fp, r6, lsl #2 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 30006bfc: e1a03006 mov r3, r6 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 30006c00: 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 ; 30006c04: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 30006c08: 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 ; 30006c0c: 3afffffb bcc 30006c00 <_Objects_Extend_information+0x148> 30006c10: e10f3000 mrs r3, CPSR 30006c14: e3832080 orr r2, r3, #128 ; 0x80 30006c18: e129f002 msr CPSR_fc, r2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 30006c1c: e5952000 ldr r2, [r5] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 30006c20: e1d510b4 ldrh r1, [r5, #4] 30006c24: 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; 30006c28: e1a0a80a lsl sl, sl, #16 30006c2c: e3822801 orr r2, r2, #65536 ; 0x10000 30006c30: e1a0a82a lsr sl, sl, #16 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 30006c34: e1822d81 orr r2, r2, r1, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 30006c38: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 30006c3c: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 30006c40: e585c030 str ip, [r5, #48] ; 0x30 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30006c44: e5859034 str r9, [r5, #52] ; 0x34 information->inactive_per_block = inactive_per_block; information->local_table = local_table; 30006c48: e585b01c str fp, [r5, #28] information->maximum = (Objects_Maximum) maximum; 30006c4c: e1c5a1b0 strh sl, [r5, #16] information->maximum_id = _Objects_Build_id( 30006c50: e585200c str r2, [r5, #12] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30006c54: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 30006c58: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 30006c5c: 1b00083a blne 30008d4c <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006c60: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30006c64: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006c68: e7838104 str r8, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30006c6c: e1a01008 mov r1, r8 30006c70: e1a00007 mov r0, r7 30006c74: e1d521b4 ldrh r2, [r5, #20] 30006c78: e5953018 ldr r3, [r5, #24] 30006c7c: eb001263 bl 3000b610 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 30006c80: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30006c84: 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 ) { 30006c88: ea000009 b 30006cb4 <_Objects_Extend_information+0x1fc> 30006c8c: e5953000 ldr r3, [r5] the_object->id = _Objects_Build_id( 30006c90: e1d520b4 ldrh r2, [r5, #4] 30006c94: e1a03c03 lsl r3, r3, #24 30006c98: e3833801 orr r3, r3, #65536 ; 0x10000 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 30006c9c: e1833d82 orr r3, r3, r2, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 30006ca0: e1833006 orr r3, r3, r6 30006ca4: e5813008 str r3, [r1, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30006ca8: e1a00008 mov r0, r8 30006cac: ebfffce8 bl 30006054 <_Chain_Append> index++; 30006cb0: 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 ) { 30006cb4: e1a00007 mov r0, r7 30006cb8: ebfffcf8 bl 300060a0 <_Chain_Get> 30006cbc: e2501000 subs r1, r0, #0 30006cc0: 1afffff1 bne 30006c8c <_Objects_Extend_information+0x1d4> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 30006cc4: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30006cc8: e1d531b4 ldrh r3, [r5, #20] 30006ccc: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 30006cd0: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30006cd4: e7813004 str r3, [r1, r4] information->inactive = 30006cd8: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 30006cdc: e28dd014 add sp, sp, #20 30006ce0: 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 ); 30006ce4: e58d3000 str r3, [sp] 30006ce8: eb000811 bl 30008d34 <_Workspace_Allocate> if ( !new_object_block ) 30006cec: e2508000 subs r8, r0, #0 30006cf0: e59d3000 ldr r3, [sp] 30006cf4: 1affff9d bne 30006b70 <_Objects_Extend_information+0xb8> 30006cf8: eafffff7 b 30006cdc <_Objects_Extend_information+0x224> /* * 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, 30006cfc: e1a03103 lsl r3, r3, #2 30006d00: e5951034 ldr r1, [r5, #52] ; 0x34 30006d04: e1a02003 mov r2, r3 30006d08: e88d1008 stm sp, {r3, ip} 30006d0c: eb001de7 bl 3000e4b0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 30006d10: e89d1008 ldm sp, {r3, ip} 30006d14: e1a0000c mov r0, ip 30006d18: e1a02003 mov r2, r3 30006d1c: e5951030 ldr r1, [r5, #48] ; 0x30 30006d20: eb001de2 bl 3000e4b0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 30006d24: e1d521b0 ldrh r2, [r5, #16] information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30006d28: e1a0000b mov r0, fp information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 30006d2c: e0872002 add r2, r7, r2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30006d30: e595101c ldr r1, [r5, #28] 30006d34: e1a02102 lsl r2, r2, #2 30006d38: eb001ddc bl 3000e4b0 30006d3c: e89d1008 ldm sp, {r3, ip} 30006d40: eaffffa5 b 30006bdc <_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 ) 30006d44: e1d0a1b0 ldrh sl, [r0, #16] 30006d48: e1d011b4 ldrh r1, [r0, #20] /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 30006d4c: e1a06007 mov r6, r7 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 30006d50: e3a09001 mov r9, #1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 30006d54: e1a03004 mov r3, r4 30006d58: eaffff78 b 30006b40 <_Objects_Extend_information+0x88> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30006d5c: e1a01008 mov r1, r8 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 30006d60: e1a06007 mov r6, r7 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 30006d64: e3a09001 mov r9, #1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 30006d68: e1a04003 mov r4, r3 <== NOT EXECUTED 30006d6c: eaffff73 b 30006b40 <_Objects_Extend_information+0x88> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 30006d70: e1a00008 mov r0, r8 30006d74: eb0007f4 bl 30008d4c <_Workspace_Free> return; 30006d78: eaffffd7 b 30006cdc <_Objects_Extend_information+0x224> =============================================================================== 300070e8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 300070e8: e92d40f0 push {r4, r5, r6, r7, lr} /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 300070ec: e1d040b8 ldrh r4, [r0, #8] block_count = (information->maximum - index_base) / 300070f0: e1d051b4 ldrh r5, [r0, #20] */ void _Objects_Shrink_information( Objects_Information *information ) { 300070f4: e1a06000 mov r6, r0 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 300070f8: e1d001b0 ldrh r0, [r0, #16] 300070fc: e1a01005 mov r1, r5 30007100: e0640000 rsb r0, r4, r0 30007104: eb00285a bl 30011274 <__aeabi_uidiv> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 30007108: e3500000 cmp r0, #0 3000710c: 08bd80f0 popeq {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 30007110: e5962030 ldr r2, [r6, #48] ; 0x30 30007114: e5923000 ldr r3, [r2] 30007118: e1550003 cmp r5, r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 3000711c: 13a03000 movne r3, #0 if ( information->inactive_per_block[ block ] == 30007120: 1a000005 bne 3000713c <_Objects_Shrink_information+0x54> 30007124: ea000008 b 3000714c <_Objects_Shrink_information+0x64> <== NOT EXECUTED 30007128: e5b21004 ldr r1, [r2, #4]! information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 3000712c: e0844005 add r4, r4, r5 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 30007130: e1550001 cmp r5, r1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 30007134: e1a07103 lsl r7, r3, #2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 30007138: 0a000004 beq 30007150 <_Objects_Shrink_information+0x68> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 3000713c: e2833001 add r3, r3, #1 30007140: e1500003 cmp r0, r3 30007144: 8afffff7 bhi 30007128 <_Objects_Shrink_information+0x40> 30007148: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 3000714c: e3a07000 mov r7, #0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); 30007150: e5960020 ldr r0, [r6, #32] 30007154: ea000002 b 30007164 <_Objects_Shrink_information+0x7c> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 30007158: e3550000 cmp r5, #0 3000715c: 0a00000b beq 30007190 <_Objects_Shrink_information+0xa8> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 30007160: e1a00005 mov r0, r5 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 30007164: e1d030b8 ldrh r3, [r0, #8] /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 30007168: e5905000 ldr r5, [r0] if ((index >= index_base) && 3000716c: e1530004 cmp r3, r4 30007170: 3afffff8 bcc 30007158 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { 30007174: e1d621b4 ldrh r2, [r6, #20] 30007178: e0842002 add r2, r4, r2 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 3000717c: e1530002 cmp r3, r2 30007180: 2afffff4 bcs 30007158 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 30007184: ebfffbbd bl 30006080 <_Chain_Extract> } } while ( the_object ); 30007188: e3550000 cmp r5, #0 3000718c: 1afffff3 bne 30007160 <_Objects_Shrink_information+0x78> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 30007190: e5963034 ldr r3, [r6, #52] ; 0x34 30007194: e7930007 ldr r0, [r3, r7] 30007198: eb0006eb bl 30008d4c <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 3000719c: e1d602bc ldrh r0, [r6, #44] ; 0x2c 300071a0: e1d631b4 ldrh r3, [r6, #20] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 300071a4: e5961034 ldr r1, [r6, #52] ; 0x34 information->inactive_per_block[ block ] = 0; 300071a8: e5962030 ldr r2, [r6, #48] ; 0x30 information->inactive -= information->allocation_size; 300071ac: e0633000 rsb r3, r3, r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 300071b0: e7815007 str r5, [r1, r7] information->inactive_per_block[ block ] = 0; 300071b4: e7825007 str r5, [r2, r7] information->inactive -= information->allocation_size; 300071b8: e1c632bc strh r3, [r6, #44] ; 0x2c return; 300071bc: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 3000db74 <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000db74: e10f2000 mrs r2, CPSR 3000db78: e3823080 orr r3, r2, #128 ; 0x80 3000db7c: 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 ) { 3000db80: e59f1050 ldr r1, [pc, #80] ; 3000dbd8 <_POSIX_signals_Clear_process_signals+0x64> 3000db84: e0803080 add r3, r0, r0, lsl #1 3000db88: e7911103 ldr r1, [r1, r3, lsl #2] 3000db8c: e1a0c103 lsl ip, r3, #2 3000db90: e3510002 cmp r1, #2 3000db94: 0a000007 beq 3000dbb8 <_POSIX_signals_Clear_process_signals+0x44> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 3000db98: e59f303c ldr r3, [pc, #60] ; 3000dbdc <_POSIX_signals_Clear_process_signals+0x68> 3000db9c: e3a0c001 mov ip, #1 3000dba0: e5931000 ldr r1, [r3] 3000dba4: e2400001 sub r0, r0, #1 3000dba8: e1c1001c bic r0, r1, ip, lsl r0 3000dbac: e5830000 str r0, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000dbb0: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } 3000dbb4: e12fff1e bx lr 3000dbb8: e59f1020 ldr r1, [pc, #32] ; 3000dbe0 <_POSIX_signals_Clear_process_signals+0x6c> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 3000dbbc: e28cc004 add ip, ip, #4 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 3000dbc0: e7913103 ldr r3, [r1, r3, lsl #2] 3000dbc4: e08c1001 add r1, ip, r1 3000dbc8: e1530001 cmp r3, r1 3000dbcc: 0afffff1 beq 3000db98 <_POSIX_signals_Clear_process_signals+0x24> 3000dbd0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); } 3000dbd4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30021edc <_POSIX_signals_Unblock_thread>: /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 30021edc: e590c010 ldr ip, [r0, #16] 30021ee0: e59f3110 ldr r3, [pc, #272] ; 30021ff8 <_POSIX_signals_Unblock_thread+0x11c> bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 30021ee4: e92d40f0 push {r4, r5, r6, r7, lr} /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 30021ee8: e59f7108 ldr r7, [pc, #264] ; 30021ff8 <_POSIX_signals_Unblock_thread+0x11c> 30021eec: e00c3003 and r3, ip, r3 30021ef0: e2416001 sub r6, r1, #1 30021ef4: e3a05001 mov r5, #1 30021ef8: e1530007 cmp r3, r7 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 30021efc: e1a04000 mov r4, r0 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30021f00: e59030fc ldr r3, [r0, #252] ; 0xfc 30021f04: e1a06615 lsl r6, r5, r6 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 30021f08: 0a000017 beq 30021f6c <_POSIX_signals_Unblock_thread+0x90> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 30021f0c: e59330d0 ldr r3, [r3, #208] ; 0xd0 30021f10: e1d66003 bics r6, r6, r3 30021f14: 0a000012 beq 30021f64 <_POSIX_signals_Unblock_thread+0x88> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 30021f18: e21c6201 ands r6, ip, #268435456 ; 0x10000000 30021f1c: 0a00000e beq 30021f5c <_POSIX_signals_Unblock_thread+0x80> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 30021f20: e59f50d4 ldr r5, [pc, #212] ; 30021ffc <_POSIX_signals_Unblock_thread+0x120> the_thread->Wait.return_code = EINTR; 30021f24: e3a03004 mov r3, #4 30021f28: e00c5005 and r5, ip, r5 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 30021f2c: e3550000 cmp r5, #0 * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { the_thread->Wait.return_code = EINTR; 30021f30: e5803034 str r3, [r0, #52] ; 0x34 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 30021f34: 1a00002c bne 30021fec <_POSIX_signals_Unblock_thread+0x110> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 30021f38: e21c0008 ands r0, ip, #8 30021f3c: 08bd80f0 popeq {r4, r5, r6, r7, pc} (void) _Watchdog_Remove( &the_thread->Timer ); 30021f40: e2840048 add r0, r4, #72 ; 0x48 30021f44: ebffb093 bl 3000e198 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 30021f48: e1a00004 mov r0, r4 30021f4c: e59f10ac ldr r1, [pc, #172] ; 30022000 <_POSIX_signals_Unblock_thread+0x124> 30021f50: ebffab85 bl 3000cd6c <_Thread_Clear_state> } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 30021f54: e1a00005 mov r0, r5 30021f58: e8bd80f0 pop {r4, r5, r6, r7, pc} else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 30021f5c: e35c0000 cmp ip, #0 30021f60: 0a000016 beq 30021fc0 <_POSIX_signals_Unblock_thread+0xe4> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 30021f64: e1a00006 mov r0, r6 30021f68: e8bd80f0 pop {r4, r5, r6, r7, pc} * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 30021f6c: e5900030 ldr r0, [r0, #48] ; 0x30 30021f70: e1160000 tst r6, r0 30021f74: 0a00000d beq 30021fb0 <_POSIX_signals_Unblock_thread+0xd4> the_thread->Wait.return_code = EINTR; 30021f78: e3a03004 mov r3, #4 30021f7c: e5843034 str r3, [r4, #52] ; 0x34 the_info = (siginfo_t *) the_thread->Wait.return_argument; 30021f80: e5943028 ldr r3, [r4, #40] ; 0x28 if ( !info ) { 30021f84: e3520000 cmp r2, #0 the_info->si_signo = signo; 30021f88: 05831000 streq r1, [r3] the_info->si_code = SI_USER; 30021f8c: 03a01001 moveq r1, #1 the_info->si_value.sival_int = 0; } else { *the_info = *info; 30021f90: 18920007 ldmne r2, {r0, r1, r2} the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 30021f94: 05831004 streq r1, [r3, #4] the_info->si_value.sival_int = 0; } else { *the_info = *info; 30021f98: 18830007 stmne r3, {r0, r1, r2} the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 30021f9c: 05832008 streq r2, [r3, #8] } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 30021fa0: e1a00004 mov r0, r4 30021fa4: ebffae17 bl 3000d808 <_Thread_queue_Extract_with_proxy> return true; 30021fa8: e3a00001 mov r0, #1 30021fac: e8bd80f0 pop {r4, r5, r6, r7, pc} * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 30021fb0: e59300d0 ldr r0, [r3, #208] ; 0xd0 30021fb4: e1d60000 bics r0, r6, r0 30021fb8: 1affffee bne 30021f78 <_POSIX_signals_Unblock_thread+0x9c> 30021fbc: e8bd80f0 pop {r4, r5, r6, r7, pc} (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 30021fc0: e59f203c ldr r2, [pc, #60] ; 30022004 <_POSIX_signals_Unblock_thread+0x128> 30021fc4: e5920000 ldr r0, [r2] 30021fc8: e3500000 cmp r0, #0 30021fcc: 08bd80f0 popeq {r4, r5, r6, r7, pc} 30021fd0: e5923004 ldr r3, [r2, #4] 30021fd4: e1540003 cmp r4, r3 _Thread_Dispatch_necessary = true; 30021fd8: 05c25010 strbeq r5, [r2, #16] } } return false; 30021fdc: 01a0000c moveq r0, ip (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 30021fe0: 08bd80f0 popeq {r4, r5, r6, r7, pc} _Thread_Dispatch_necessary = true; } } return false; 30021fe4: e1a0000c mov r0, ip <== NOT EXECUTED } 30021fe8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 30021fec: ebffae05 bl 3000d808 <_Thread_queue_Extract_with_proxy> } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 30021ff0: e3a00000 mov r0, #0 30021ff4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 300066c8 <_TOD_Validate>: { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 300066c8: e59f30b0 ldr r3, [pc, #176] ; 30006780 <_TOD_Validate+0xb8> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 300066cc: e92d4010 push {r4, lr} uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 300066d0: e2504000 subs r4, r0, #0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 300066d4: e593100c ldr r1, [r3, #12] (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 300066d8: 01a00004 moveq r0, r4 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 300066dc: 08bd8010 popeq {r4, pc} ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 300066e0: e59f009c ldr r0, [pc, #156] ; 30006784 <_TOD_Validate+0xbc> 300066e4: eb0048c5 bl 30018a00 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 300066e8: e5943018 ldr r3, [r4, #24] 300066ec: e1500003 cmp r0, r3 300066f0: 9a00001e bls 30006770 <_TOD_Validate+0xa8> (the_tod->ticks >= ticks_per_second) || 300066f4: e5943014 ldr r3, [r4, #20] 300066f8: e353003b cmp r3, #59 ; 0x3b 300066fc: 8a00001b bhi 30006770 <_TOD_Validate+0xa8> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 30006700: e5943010 ldr r3, [r4, #16] 30006704: e353003b cmp r3, #59 ; 0x3b 30006708: 8a000018 bhi 30006770 <_TOD_Validate+0xa8> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 3000670c: e594300c ldr r3, [r4, #12] 30006710: e3530017 cmp r3, #23 30006714: 8a000015 bhi 30006770 <_TOD_Validate+0xa8> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 30006718: e5940004 ldr r0, [r4, #4] rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 3000671c: e3500000 cmp r0, #0 30006720: 08bd8010 popeq {r4, pc} (the_tod->month == 0) || 30006724: e350000c cmp r0, #12 30006728: 8a000010 bhi 30006770 <_TOD_Validate+0xa8> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 3000672c: e5943000 ldr r3, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 30006730: e59f2050 ldr r2, [pc, #80] ; 30006788 <_TOD_Validate+0xc0> 30006734: e1530002 cmp r3, r2 30006738: 9a00000c bls 30006770 <_TOD_Validate+0xa8> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 3000673c: e5944008 ldr r4, [r4, #8] (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 30006740: e3540000 cmp r4, #0 30006744: 0a00000b beq 30006778 <_TOD_Validate+0xb0> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 30006748: e3130003 tst r3, #3 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 3000674c: 059f3038 ldreq r3, [pc, #56] ; 3000678c <_TOD_Validate+0xc4> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 30006750: 159f3034 ldrne r3, [pc, #52] ; 3000678c <_TOD_Validate+0xc4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 30006754: 0280000d addeq r0, r0, #13 30006758: 07930100 ldreq r0, [r3, r0, lsl #2] else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 3000675c: 17930100 ldrne r0, [r3, r0, lsl #2] * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 30006760: e1500004 cmp r0, r4 30006764: 33a00000 movcc r0, #0 30006768: 23a00001 movcs r0, #1 3000676c: e8bd8010 pop {r4, pc} (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 30006770: e3a00000 mov r0, #0 30006774: e8bd8010 pop {r4, pc} 30006778: e1a00004 mov r0, r4 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } 3000677c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 30008044 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 30008044: 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 ) { 30008048: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 3000804c: e281403c add r4, r1, #60 ; 0x3c */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 30008050: e281c038 add ip, r1, #56 ; 0x38 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 30008054: e5814038 str r4, [r1, #56] ; 0x38 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 30008058: e3130020 tst r3, #32 head->previous = NULL; 3000805c: e3a04000 mov r4, #0 30008060: e581403c str r4, [r1, #60] ; 0x3c tail->previous = head; 30008064: e581c040 str ip, [r1, #64] ; 0x40 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 30008068: e1a0a323 lsr sl, r3, #6 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 3000806c: e5905038 ldr r5, [r0, #56] ; 0x38 if ( _Thread_queue_Is_reverse_search( priority ) ) 30008070: 1a00001f bne 300080f4 <_Thread_queue_Enqueue_priority+0xb0> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 30008074: e08aa08a add sl, sl, sl, lsl #1 30008078: e1a0910a lsl r9, sl, #2 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 3000807c: e289a004 add sl, r9, #4 30008080: e080a00a add sl, r0, sl 30008084: e0809009 add r9, r0, r9 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30008088: e10f7000 mrs r7, CPSR 3000808c: e387c080 orr ip, r7, #128 ; 0x80 30008090: e129f00c msr CPSR_fc, ip 30008094: e1a08007 mov r8, r7 30008098: e599c000 ldr ip, [r9] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 3000809c: e15c000a cmp ip, sl 300080a0: 1a000009 bne 300080cc <_Thread_queue_Enqueue_priority+0x88> 300080a4: ea000052 b 300081f4 <_Thread_queue_Enqueue_priority+0x1b0> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 300080a8: e10f6000 mrs r6, CPSR 300080ac: e129f007 msr CPSR_fc, r7 300080b0: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 300080b4: e59c6010 ldr r6, [ip, #16] search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 300080b8: e1150006 tst r5, r6 300080bc: 0a000035 beq 30008198 <_Thread_queue_Enqueue_priority+0x154> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 300080c0: e59cc000 ldr ip, [ip] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 300080c4: e15c000a cmp ip, sl 300080c8: 0a000002 beq 300080d8 <_Thread_queue_Enqueue_priority+0x94> search_priority = search_thread->current_priority; 300080cc: e59c4014 ldr r4, [ip, #20] if ( priority <= search_priority ) 300080d0: e1530004 cmp r3, r4 300080d4: 8afffff3 bhi 300080a8 <_Thread_queue_Enqueue_priority+0x64> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 300080d8: e5905030 ldr r5, [r0, #48] ; 0x30 300080dc: e3550001 cmp r5, #1 300080e0: 0a00002e beq 300081a0 <_Thread_queue_Enqueue_priority+0x15c> * 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; 300080e4: e5828000 str r8, [r2] return the_thread_queue->sync_state; } 300080e8: e1a00005 mov r0, r5 300080ec: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} 300080f0: e12fff1e bx lr 300080f4: e08aa08a add sl, sl, sl, lsl #1 300080f8: e59f90fc ldr r9, [pc, #252] ; 300081fc <_Thread_queue_Enqueue_priority+0x1b8> 300080fc: e080a10a add sl, r0, sl, lsl #2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 30008100: e5d94000 ldrb r4, [r9] 30008104: e2844001 add r4, r4, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30008108: e10f7000 mrs r7, CPSR 3000810c: e387c080 orr ip, r7, #128 ; 0x80 30008110: e129f00c msr CPSR_fc, ip 30008114: e1a08007 mov r8, r7 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 30008118: e59ac008 ldr ip, [sl, #8] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 3000811c: e15c000a cmp ip, sl 30008120: 1a000009 bne 3000814c <_Thread_queue_Enqueue_priority+0x108> 30008124: ea00000b b 30008158 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 30008128: e10f6000 mrs r6, CPSR 3000812c: e129f007 msr CPSR_fc, r7 30008130: e129f006 msr CPSR_fc, r6 30008134: e59c6010 ldr r6, [ip, #16] search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 30008138: e1150006 tst r5, r6 3000813c: 0a000013 beq 30008190 <_Thread_queue_Enqueue_priority+0x14c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 30008140: e59cc004 ldr ip, [ip, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 30008144: e15c000a cmp ip, sl 30008148: 0a000002 beq 30008158 <_Thread_queue_Enqueue_priority+0x114> search_priority = search_thread->current_priority; 3000814c: e59c4014 ldr r4, [ip, #20] if ( priority >= search_priority ) 30008150: e1530004 cmp r3, r4 30008154: 3afffff3 bcc 30008128 <_Thread_queue_Enqueue_priority+0xe4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30008158: e5905030 ldr r5, [r0, #48] ; 0x30 3000815c: e3550001 cmp r5, #1 30008160: 1affffdf bne 300080e4 <_Thread_queue_Enqueue_priority+0xa0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 30008164: e1530004 cmp r3, r4 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30008168: e3a03000 mov r3, #0 3000816c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 30008170: 0a000016 beq 300081d0 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 30008174: e59c3000 ldr r3, [ip] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 30008178: e8811008 stm r1, {r3, ip} search_node->next = the_node; next_node->previous = the_node; 3000817c: e5831004 str r1, [r3, #4] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 30008180: e58c1000 str r1, [ip] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30008184: e5810044 str r0, [r1, #68] ; 0x44 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30008188: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 3000818c: eaffffd5 b 300080e8 <_Thread_queue_Enqueue_priority+0xa4> 30008190: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 30008194: eaffffd9 b 30008100 <_Thread_queue_Enqueue_priority+0xbc> <== NOT EXECUTED 30008198: e129f007 msr CPSR_fc, r7 3000819c: eaffffb9 b 30008088 <_Thread_queue_Enqueue_priority+0x44> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 300081a0: e1530004 cmp r3, r4 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 300081a4: e3a03000 mov r3, #0 300081a8: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 300081ac: 0a000007 beq 300081d0 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 300081b0: e59c3004 ldr r3, [ip, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 300081b4: e581c000 str ip, [r1] the_node->previous = previous_node; 300081b8: e5813004 str r3, [r1, #4] previous_node->next = the_node; 300081bc: e5831000 str r1, [r3] search_node->previous = the_node; 300081c0: e58c1004 str r1, [ip, #4] the_thread->Wait.queue = the_thread_queue; 300081c4: e5810044 str r0, [r1, #68] ; 0x44 300081c8: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 300081cc: eaffffc5 b 300080e8 <_Thread_queue_Enqueue_priority+0xa4> _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; 300081d0: e59c3040 ldr r3, [ip, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; _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 ); 300081d4: e28c203c add r2, ip, #60 ; 0x3c previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; 300081d8: e881000c stm r1, {r2, r3} the_node->previous = previous_node; previous_node->next = the_node; 300081dc: e5831000 str r1, [r3] search_node->previous = the_node; 300081e0: e58c1040 str r1, [ip, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; 300081e4: e5810044 str r0, [r1, #68] ; 0x44 300081e8: e129f008 msr CPSR_fc, r8 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 300081ec: e3a05001 mov r5, #1 300081f0: eaffffbc b 300080e8 <_Thread_queue_Enqueue_priority+0xa4> if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 300081f4: e3e04000 mvn r4, #0 300081f8: eaffffb6 b 300080d8 <_Thread_queue_Enqueue_priority+0x94> =============================================================================== 30008850 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008850: e92d41f0 push {r4, r5, r6, r7, r8, lr} the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 30008854: e59f5040 ldr r5, [pc, #64] ; 3000889c <_User_extensions_Fatal+0x4c> void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008858: e1a08000 mov r8, r0 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 3000885c: e5954008 ldr r4, [r5, #8] void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008860: e1a07002 mov r7, r2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 30008864: e1540005 cmp r4, r5 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30008868: e20160ff and r6, r1, #255 ; 0xff Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 3000886c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 30008870: e5943030 ldr r3, [r4, #48] ; 0x30 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 30008874: e1a00008 mov r0, r8 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 30008878: e3530000 cmp r3, #0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 3000887c: e1a01006 mov r1, r6 30008880: e1a02007 mov r2, r7 30008884: 11a0e00f movne lr, pc 30008888: 112fff13 bxne r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 3000888c: e5944004 ldr r4, [r4, #4] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 30008890: e1540005 cmp r4, r5 30008894: 1afffff5 bne 30008870 <_User_extensions_Fatal+0x20> 30008898: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 300088a0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 300088a0: e92d40f0 push {r4, r5, r6, r7, lr} return false; } } return true; } 300088a4: e59f5050 ldr r5, [pc, #80] ; 300088fc <_User_extensions_Thread_create+0x5c> #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 300088a8: e1a06000 mov r6, r0 return false; } } return true; } 300088ac: e4954004 ldr r4, [r5], #4 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 300088b0: e1540005 cmp r4, r5 300088b4: 0a00000e beq 300088f4 <_User_extensions_Thread_create+0x54> the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 300088b8: e59f7040 ldr r7, [pc, #64] ; 30008900 <_User_extensions_Thread_create+0x60> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 300088bc: e5943014 ldr r3, [r4, #20] status = (*the_extension->Callouts.thread_create)( 300088c0: e1a01006 mov r1, r6 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 300088c4: e3530000 cmp r3, #0 300088c8: 0a000004 beq 300088e0 <_User_extensions_Thread_create+0x40> status = (*the_extension->Callouts.thread_create)( 300088cc: e5970004 ldr r0, [r7, #4] 300088d0: e1a0e00f mov lr, pc 300088d4: e12fff13 bx r3 _Thread_Executing, the_thread ); if ( !status ) 300088d8: e3500000 cmp r0, #0 300088dc: 08bd80f0 popeq {r4, r5, r6, r7, pc} User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 300088e0: e5944000 ldr r4, [r4] { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 300088e4: e1540005 cmp r4, r5 300088e8: 1afffff3 bne 300088bc <_User_extensions_Thread_create+0x1c> if ( !status ) return false; } } return true; 300088ec: e3a00001 mov r0, #1 300088f0: e8bd80f0 pop {r4, r5, r6, r7, pc} 300088f4: e3a00001 mov r0, #1 <== NOT EXECUTED } 300088f8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 3000a6f8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 3000a6f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000a6fc: e1a04000 mov r4, r0 3000a700: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000a704: e10f3000 mrs r3, CPSR 3000a708: e3832080 orr r2, r3, #128 ; 0x80 3000a70c: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } 3000a710: e1a07000 mov r7, r0 3000a714: 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 ) ) { 3000a718: e1520007 cmp r2, r7 3000a71c: 0a000018 beq 3000a784 <_Watchdog_Adjust+0x8c> switch ( direction ) { 3000a720: e3510000 cmp r1, #0 3000a724: 1a000018 bne 3000a78c <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000a728: e3550000 cmp r5, #0 3000a72c: 0a000014 beq 3000a784 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 3000a730: e5926010 ldr r6, [r2, #16] 3000a734: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 3000a738: 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 ) { 3000a73c: 2a000005 bcs 3000a758 <_Watchdog_Adjust+0x60> 3000a740: ea000018 b 3000a7a8 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000a744: e0555006 subs r5, r5, r6 3000a748: 0a00000d beq 3000a784 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 3000a74c: e5926010 ldr r6, [r2, #16] 3000a750: e1560005 cmp r6, r5 3000a754: 8a000013 bhi 3000a7a8 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 3000a758: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000a75c: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); 3000a760: e1a00004 mov r0, r4 3000a764: eb0000aa bl 3000aa14 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000a768: e10f3000 mrs r3, CPSR 3000a76c: e3832080 orr r2, r3, #128 ; 0x80 3000a770: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } 3000a774: e5941000 ldr r1, [r4] _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 3000a778: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 3000a77c: e1a02001 mov r2, r1 3000a780: 1affffef bne 3000a744 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000a784: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 3000a788: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 3000a78c: e3510001 cmp r1, #1 3000a790: 1afffffb bne 3000a784 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 3000a794: e5921010 ldr r1, [r2, #16] 3000a798: e0815005 add r5, r1, r5 3000a79c: e5825010 str r5, [r2, #16] 3000a7a0: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 3000a7a4: 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; 3000a7a8: e0655006 rsb r5, r5, r6 3000a7ac: e5825010 str r5, [r2, #16] break; 3000a7b0: eafffff3 b 3000a784 <_Watchdog_Adjust+0x8c> =============================================================================== 30006164 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 30006164: e92d40f0 push {r4, r5, r6, r7, lr} rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 30006168: e59f41b4 ldr r4, [pc, #436] ; 30006324 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 3000616c: e1a05001 mov r5, r1 30006170: e1a07000 mov r7, r0 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 30006174: e1a00004 mov r0, r4 30006178: eb000441 bl 30007284 if (aiocbp == NULL) 3000617c: e3550000 cmp r5, #0 30006180: 0a00002d beq 3000623c pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { if (aiocbp->aio_fildes != fildes) { 30006184: e5956000 ldr r6, [r5] 30006188: e1560007 cmp r6, r7 3000618c: 1a000023 bne 30006220 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 30006190: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 30006194: e1a01006 mov r1, r6 <== NOT EXECUTED 30006198: e3a02000 mov r2, #0 <== NOT EXECUTED 3000619c: eb0000c2 bl 300064ac <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 300061a0: e2507000 subs r7, r0, #0 <== NOT EXECUTED 300061a4: 0a00000c beq 300061dc <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return result; } pthread_mutex_lock (&r_chain->mutex); 300061a8: e287401c add r4, r7, #28 <== NOT EXECUTED 300061ac: e1a00004 mov r0, r4 <== NOT EXECUTED 300061b0: eb000433 bl 30007284 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); 300061b4: e1a01005 mov r1, r5 <== NOT EXECUTED 300061b8: e1a00007 mov r0, r7 <== NOT EXECUTED 300061bc: eb0001bb bl 300068b0 <== NOT EXECUTED 300061c0: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 300061c4: e1a00004 mov r0, r4 <== NOT EXECUTED 300061c8: eb00044e bl 30007308 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 300061cc: e59f0150 ldr r0, [pc, #336] ; 30006324 <== NOT EXECUTED 300061d0: eb00044c bl 30007308 <== NOT EXECUTED return result; } return AIO_ALLDONE; } 300061d4: e1a00005 mov r0, r5 300061d8: e8bd80f0 pop {r4, r5, r6, r7, pc} r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 300061dc: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 300061e0: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 300061e4: e1520003 cmp r2, r3 <== NOT EXECUTED 300061e8: 0affffee beq 300061a8 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 300061ec: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 300061f0: e1a01006 mov r1, r6 <== NOT EXECUTED 300061f4: e1a02007 mov r2, r7 <== NOT EXECUTED 300061f8: eb0000ab bl 300064ac <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 300061fc: e3500000 cmp r0, #0 <== NOT EXECUTED 30006200: 0a000006 beq 30006220 <== NOT EXECUTED { pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); 30006204: e1a01005 mov r1, r5 <== NOT EXECUTED 30006208: eb0001a8 bl 300068b0 <== NOT EXECUTED 3000620c: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 30006210: e1a00004 mov r0, r4 <== NOT EXECUTED 30006214: eb00043b bl 30007308 <== NOT EXECUTED return result; } return AIO_ALLDONE; } 30006218: e1a00005 mov r0, r5 <== NOT EXECUTED 3000621c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 30006220: e1a00004 mov r0, r4 30006224: eb000437 bl 30007308 rtems_set_errno_and_return_minus_one (EINVAL); 30006228: eb002981 bl 30010834 <__errno> 3000622c: e3a03016 mov r3, #22 30006230: e5803000 str r3, [r0] 30006234: e3e05000 mvn r5, #0 30006238: eaffffe5 b 300061d4 pthread_mutex_lock (&aio_request_queue.mutex); if (aiocbp == NULL) { if (fcntl (fildes, F_GETFL) < 0) { 3000623c: e1a00007 mov r0, r7 30006240: e3a01003 mov r1, #3 30006244: eb001b65 bl 3000cfe0 30006248: e3500000 cmp r0, #0 3000624c: ba00002d blt 30006308 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 30006250: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 30006254: e1a01007 mov r1, r7 <== NOT EXECUTED 30006258: e1a02005 mov r2, r5 <== NOT EXECUTED 3000625c: eb000092 bl 300064ac <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 30006260: e2506000 subs r6, r0, #0 <== NOT EXECUTED 30006264: 0a00000b beq 30006298 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_ALLDONE; } pthread_mutex_lock (&r_chain->mutex); 30006268: e286701c add r7, r6, #28 <== NOT EXECUTED 3000626c: e1a00007 mov r0, r7 <== NOT EXECUTED 30006270: eb000403 bl 30007284 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30006274: e1a00006 mov r0, r6 <== NOT EXECUTED 30006278: eb000a6e bl 30008c38 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 3000627c: e1a00006 mov r0, r6 <== NOT EXECUTED 30006280: eb000174 bl 30006858 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 30006284: e1a00007 mov r0, r7 <== NOT EXECUTED 30006288: eb00041e bl 30007308 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 3000628c: e1a00004 mov r0, r4 <== NOT EXECUTED 30006290: eb00041c bl 30007308 <== NOT EXECUTED return AIO_CANCELED; 30006294: eaffffce b 300061d4 <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 30006298: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 3000629c: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 300062a0: e1520003 cmp r2, r3 <== NOT EXECUTED 300062a4: 0a000013 beq 300062f8 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 300062a8: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 300062ac: e1a01007 mov r1, r7 <== NOT EXECUTED 300062b0: e1a02006 mov r2, r6 <== NOT EXECUTED 300062b4: eb00007c bl 300064ac <== NOT EXECUTED fildes, 0); if (r_chain == NULL) { 300062b8: e2505000 subs r5, r0, #0 <== NOT EXECUTED 300062bc: 0a00000d beq 300062f8 <== NOT EXECUTED return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 300062c0: e285701c add r7, r5, #28 <== NOT EXECUTED 300062c4: eb000a5b bl 30008c38 <_Chain_Extract> <== NOT EXECUTED pthread_mutex_unlock(&aio_request_queue.mutex); return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 300062c8: e1a00005 mov r0, r5 <== NOT EXECUTED 300062cc: eb000161 bl 30006858 <== NOT EXECUTED pthread_mutex_destroy (&r_chain->mutex); 300062d0: e1a00007 mov r0, r7 <== NOT EXECUTED 300062d4: eb000347 bl 30006ff8 <== NOT EXECUTED pthread_cond_destroy (&r_chain->mutex); 300062d8: e1a00007 mov r0, r7 <== NOT EXECUTED 300062dc: eb00026f bl 30006ca0 <== NOT EXECUTED free (r_chain); 300062e0: e1a00005 mov r0, r5 <== NOT EXECUTED 300062e4: ebfff293 bl 30002d38 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 300062e8: e1a00004 mov r0, r4 <== NOT EXECUTED 300062ec: eb000405 bl 30007308 <== NOT EXECUTED return AIO_CANCELED; 300062f0: e1a05006 mov r5, r6 <== NOT EXECUTED 300062f4: eaffffb6 b 300061d4 <== NOT EXECUTED } pthread_mutex_unlock (&aio_request_queue.mutex); 300062f8: e1a00004 mov r0, r4 <== NOT EXECUTED 300062fc: eb000401 bl 30007308 <== NOT EXECUTED return AIO_ALLDONE; 30006300: e3a05002 mov r5, #2 <== NOT EXECUTED 30006304: eaffffb2 b 300061d4 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); if (aiocbp == NULL) { if (fcntl (fildes, F_GETFL) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 30006308: e1a00004 mov r0, r4 3000630c: eb0003fd bl 30007308 rtems_set_errno_and_return_minus_one (EBADF); 30006310: eb002947 bl 30010834 <__errno> 30006314: e3a03009 mov r3, #9 30006318: e5803000 str r3, [r0] 3000631c: e3e05000 mvn r5, #0 30006320: eaffffab b 300061d4 =============================================================================== 30006330 : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 30006330: e3500a02 cmp r0, #8192 ; 0x2000 int aio_fsync( int op, struct aiocb *aiocbp ) { 30006334: e92d4030 push {r4, r5, lr} 30006338: e1a04001 mov r4, r1 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 3000633c: 13a05016 movne r5, #22 ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 30006340: 1a000011 bne 3000638c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 30006344: e5910000 ldr r0, [r1] 30006348: e3a01003 mov r1, #3 3000634c: eb001b23 bl 3000cfe0 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 30006350: e2000003 and r0, r0, #3 30006354: e2400001 sub r0, r0, #1 30006358: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 3000635c: 83a05009 movhi r5, #9 if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 30006360: 8a000009 bhi 3000638c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 30006364: e3a00018 mov r0, #24 <== NOT EXECUTED 30006368: ebfff411 bl 300033b4 <== NOT EXECUTED if (req == NULL) 3000636c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30006370: 0a000004 beq 30006388 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 30006374: e5834014 str r4, [r3, #20] <== NOT EXECUTED req->aiocbp->aio_lio_opcode = LIO_SYNC; 30006378: e3a03003 mov r3, #3 <== NOT EXECUTED 3000637c: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED return rtems_aio_enqueue (req); } 30006380: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 30006384: ea000162 b 30006914 <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 30006388: e3a0500b mov r5, #11 <== NOT EXECUTED 3000638c: e3e03000 mvn r3, #0 30006390: e5845030 str r5, [r4, #48] ; 0x30 30006394: e5843034 str r3, [r4, #52] ; 0x34 30006398: eb002925 bl 30010834 <__errno> 3000639c: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 300063a0: e3e00000 mvn r0, #0 300063a4: e8bd8030 pop {r4, r5, pc} =============================================================================== 30006af8 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 30006af8: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 30006afc: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 30006b00: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 30006b04: e5900000 ldr r0, [r0] 30006b08: eb001934 bl 3000cfe0 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 30006b0c: e2000003 and r0, r0, #3 30006b10: e3500002 cmp r0, #2 30006b14: 13500000 cmpne r0, #0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 30006b18: 13a05009 movne r5, #9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 30006b1c: 1a00000f bne 30006b60 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 30006b20: e5943014 ldr r3, [r4, #20] 30006b24: e3530000 cmp r3, #0 30006b28: 1a000013 bne 30006b7c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 30006b2c: e5943008 ldr r3, [r4, #8] 30006b30: e3530000 cmp r3, #0 30006b34: ba000010 blt 30006b7c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 30006b38: e3a00018 mov r0, #24 30006b3c: ebfff21c bl 300033b4 if (req == NULL) 30006b40: e2503000 subs r3, r0, #0 30006b44: 0a000004 beq 30006b5c rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 30006b48: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_READ; 30006b4c: e3a03001 mov r3, #1 30006b50: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 30006b54: e8bd4030 pop {r4, r5, lr} rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 30006b58: eaffff6d b 30006914 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 30006b5c: e3a0500b mov r5, #11 <== NOT EXECUTED 30006b60: e3e03000 mvn r3, #0 30006b64: e5845030 str r5, [r4, #48] ; 0x30 30006b68: e5843034 str r3, [r4, #52] ; 0x34 30006b6c: eb002730 bl 30010834 <__errno> 30006b70: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 30006b74: e3e00000 mvn r0, #0 30006b78: e8bd8030 pop {r4, r5, pc} if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 30006b7c: e3a05016 mov r5, #22 30006b80: eafffff6 b 30006b60 =============================================================================== 30006b8c : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 30006b8c: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 30006b90: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 30006b94: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 30006b98: e5900000 ldr r0, [r0] 30006b9c: eb00190f bl 3000cfe0 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 30006ba0: e2000003 and r0, r0, #3 30006ba4: e2400001 sub r0, r0, #1 30006ba8: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 30006bac: 83a05009 movhi r5, #9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 30006bb0: 8a00000f bhi 30006bf4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 30006bb4: e5943014 ldr r3, [r4, #20] 30006bb8: e3530000 cmp r3, #0 30006bbc: 1a000013 bne 30006c10 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 30006bc0: e5943008 ldr r3, [r4, #8] 30006bc4: e3530000 cmp r3, #0 30006bc8: ba000010 blt 30006c10 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 30006bcc: e3a00018 mov r0, #24 30006bd0: ebfff1f7 bl 300033b4 if (req == NULL) 30006bd4: e2503000 subs r3, r0, #0 30006bd8: 0a000004 beq 30006bf0 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 30006bdc: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_WRITE; 30006be0: e3a03002 mov r3, #2 30006be4: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 30006be8: e8bd4030 pop {r4, r5, lr} rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 30006bec: eaffff48 b 30006914 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 30006bf0: e3a0500b mov r5, #11 <== NOT EXECUTED 30006bf4: e3e03000 mvn r3, #0 30006bf8: e5845030 str r5, [r4, #48] ; 0x30 30006bfc: e5843034 str r3, [r4, #52] ; 0x34 30006c00: eb00270b bl 30010834 <__errno> 30006c04: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 30006c08: e3e00000 mvn r0, #0 30006c0c: e8bd8030 pop {r4, r5, pc} if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 30006c10: e3a05016 mov r5, #22 30006c14: eafffff6 b 30006bf4 =============================================================================== 30021be4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 30021be4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30021be8: e24dd00c sub sp, sp, #12 30021bec: e1a04000 mov r4, r0 30021bf0: e1a05001 mov r5, r1 30021bf4: e1a08002 mov r8, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 30021bf8: ebffff40 bl 30021900 30021bfc: e1500004 cmp r0, r4 30021c00: 1a000092 bne 30021e50 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 30021c04: e3550000 cmp r5, #0 30021c08: 0a000095 beq 30021e64 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 30021c0c: e2454001 sub r4, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 30021c10: e354001f cmp r4, #31 30021c14: 8a000092 bhi 30021e64 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 ) 30021c18: e59f6270 ldr r6, [pc, #624] ; 30021e90 30021c1c: e1a07085 lsl r7, r5, #1 30021c20: e0873005 add r3, r7, r5 30021c24: e0863103 add r3, r6, r3, lsl #2 30021c28: e5933008 ldr r3, [r3, #8] 30021c2c: e3530001 cmp r3, #1 return 0; 30021c30: 03a00000 moveq r0, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 30021c34: 0a00006c beq 30021dec /* * 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 ) ) 30021c38: e3550008 cmp r5, #8 30021c3c: 13550004 cmpne r5, #4 30021c40: 0a00006b beq 30021df4 30021c44: e355000b cmp r5, #11 30021c48: 0a000069 beq 30021df4 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 30021c4c: e3a03001 mov r3, #1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { 30021c50: e3580000 cmp r8, #0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 30021c54: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 30021c58: e58d5000 str r5, [sp] 30021c5c: e1a04413 lsl r4, r3, r4 siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 30021c60: 15983000 ldrne r3, [r8] */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 30021c64: 058d8008 streq r8, [sp, #8] } else { siginfo->si_value = *value; 30021c68: 158d3008 strne r3, [sp, #8] 30021c6c: e59f3220 ldr r3, [pc, #544] ; 30021e94 30021c70: e5932000 ldr r2, [r3] 30021c74: e2822001 add r2, r2, #1 30021c78: 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; 30021c7c: e59f3214 ldr r3, [pc, #532] ; 30021e98 30021c80: e5930004 ldr r0, [r3, #4] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 30021c84: e59030fc ldr r3, [r0, #252] ; 0xfc 30021c88: e59330d0 ldr r3, [r3, #208] ; 0xd0 30021c8c: e1d43003 bics r3, r4, r3 30021c90: 1a000048 bne 30021db8 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 30021c94: e59fc200 ldr ip, [pc, #512] ; 30021e9c 30021c98: e49c3004 ldr r3, [ip], #4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 30021c9c: e153000c cmp r3, ip 30021ca0: 0a000013 beq 30021cf4 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 30021ca4: e5932030 ldr r2, [r3, #48] ; 0x30 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 30021ca8: e1a00003 mov r0, r3 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 30021cac: e1140002 tst r4, r2 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30021cb0: e59320fc ldr r2, [r3, #252] ; 0xfc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 30021cb4: 1a00003f bne 30021db8 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 30021cb8: e59220d0 ldr r2, [r2, #208] ; 0xd0 30021cbc: e1d42002 bics r2, r4, r2 30021cc0: 0a000008 beq 30021ce8 30021cc4: ea00003b b 30021db8 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 30021cc8: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30021ccc: e59310fc ldr r1, [r3, #252] ; 0xfc <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 30021cd0: e1140002 tst r4, r2 <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 30021cd4: e1a00003 mov r0, r3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 30021cd8: 1a000036 bne 30021db8 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 30021cdc: e59120d0 ldr r2, [r1, #208] ; 0xd0 <== NOT EXECUTED 30021ce0: e1d42002 bics r2, r4, r2 <== NOT EXECUTED 30021ce4: 1a000033 bne 30021db8 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 30021ce8: 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 = _Chain_First( the_chain ); 30021cec: e153000c cmp r3, ip 30021cf0: 1afffff4 bne 30021cc8 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 30021cf4: e59f31a4 ldr r3, [pc, #420] ; 30021ea0 30021cf8: e59fa1a4 ldr sl, [pc, #420] ; 30021ea4 30021cfc: e5d3e000 ldrb lr, [r3] * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 30021d00: e3a08000 mov r8, #0 interested_priority = PRIORITY_MAXIMUM + 1; 30021d04: e28ee001 add lr, lr, #1 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 30021d08: e5ba3004 ldr r3, [sl, #4]! 30021d0c: e3530000 cmp r3, #0 30021d10: 0a000022 beq 30021da0 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 30021d14: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 30021d18: e1d3c1b0 ldrh ip, [r3, #16] object_table = the_info->local_table; 30021d1c: e593101c ldr r1, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 30021d20: e35c0000 cmp ip, #0 30021d24: 0a00001d beq 30021da0 30021d28: e3a02001 mov r2, #1 the_thread = (Thread_Control *) object_table[ index ]; 30021d2c: e5b13004 ldr r3, [r1, #4]! if ( !the_thread ) 30021d30: e3530000 cmp r3, #0 30021d34: 0a000016 beq 30021d94 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 30021d38: e5930014 ldr r0, [r3, #20] 30021d3c: e150000e cmp r0, lr 30021d40: 8a000013 bhi 30021d94 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 30021d44: e59390fc ldr r9, [r3, #252] ; 0xfc 30021d48: e59990d0 ldr r9, [r9, #208] ; 0xd0 30021d4c: e1d49009 bics r9, r4, r9 30021d50: 0a00000f beq 30021d94 * * 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 ) { 30021d54: e150000e cmp r0, lr 30021d58: 3a000036 bcc 30021e38 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 30021d5c: e3580000 cmp r8, #0 30021d60: 0a00000b beq 30021d94 30021d64: e5989010 ldr r9, [r8, #16] 30021d68: e3590000 cmp r9, #0 30021d6c: 0a000008 beq 30021d94 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 30021d70: e593b010 ldr fp, [r3, #16] 30021d74: e35b0000 cmp fp, #0 30021d78: 0a00002e beq 30021e38 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 30021d7c: e3190201 tst r9, #268435456 ; 0x10000000 30021d80: 1a000003 bne 30021d94 */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 30021d84: e20bb201 and fp, fp, #268435456 ; 0x10000000 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 30021d88: e35b0000 cmp fp, #0 30021d8c: 11a0e000 movne lr, r0 30021d90: 11a08003 movne r8, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021d94: e2822001 add r2, r2, #1 30021d98: e15c0002 cmp ip, r2 30021d9c: 2affffe2 bcs 30021d2c * + 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++) { 30021da0: e59f3100 ldr r3, [pc, #256] ; 30021ea8 30021da4: e15a0003 cmp sl, r3 30021da8: 1affffd6 bne 30021d08 } } } } if ( interested ) { 30021dac: e3580000 cmp r8, #0 30021db0: 0a000005 beq 30021dcc 30021db4: e1a00008 mov r0, r8 /* * 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 ) ) { 30021db8: e1a01005 mov r1, r5 30021dbc: e1a0200d mov r2, sp 30021dc0: eb000045 bl 30021edc <_POSIX_signals_Unblock_thread> 30021dc4: e3500000 cmp r0, #0 30021dc8: 1a000005 bne 30021de4 /* * 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 ); 30021dcc: e1a00004 mov r0, r4 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 30021dd0: 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 ); 30021dd4: eb000036 bl 30021eb4 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 30021dd8: e7963105 ldr r3, [r6, r5, lsl #2] 30021ddc: e3530002 cmp r3, #2 30021de0: 0a000007 beq 30021e04 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 30021de4: ebffacbe bl 3000d0e4 <_Thread_Enable_dispatch> return 0; 30021de8: e3a00000 mov r0, #0 } 30021dec: e28dd00c add sp, sp, #12 30021df0: 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 ); 30021df4: eb0000bc bl 300220ec 30021df8: e1a01005 mov r1, r5 30021dfc: eb000081 bl 30022008 30021e00: eafffff9 b 30021dec _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 30021e04: e59f00a0 ldr r0, [pc, #160] ; 30021eac 30021e08: ebffa610 bl 3000b650 <_Chain_Get> if ( !psiginfo ) { 30021e0c: e250c000 subs ip, r0, #0 30021e10: 0a000018 beq 30021e78 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 30021e14: e28c3008 add r3, ip, #8 30021e18: e1a0200d mov r2, sp 30021e1c: e8920007 ldm r2, {r0, r1, r2} 30021e20: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 30021e24: e59f0084 ldr r0, [pc, #132] ; 30021eb0 30021e28: e1a0100c mov r1, ip 30021e2c: e0800105 add r0, r0, r5, lsl #2 30021e30: ebffa5f3 bl 3000b604 <_Chain_Append> 30021e34: eaffffea b 30021de4 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021e38: e2822001 add r2, r2, #1 30021e3c: e15c0002 cmp ip, r2 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 30021e40: e1a0e000 mov lr, r0 30021e44: e1a08003 mov r8, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021e48: 2affffb7 bcs 30021d2c 30021e4c: eaffffd3 b 30021da0 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 30021e50: ebffc52d bl 3001330c <__errno> 30021e54: e3a03003 mov r3, #3 30021e58: e5803000 str r3, [r0] 30021e5c: e3e00000 mvn r0, #0 30021e60: eaffffe1 b 30021dec */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 30021e64: ebffc528 bl 3001330c <__errno> 30021e68: e3a03016 mov r3, #22 30021e6c: e5803000 str r3, [r0] 30021e70: e3e00000 mvn r0, #0 30021e74: eaffffdc b 30021dec 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(); 30021e78: ebffac99 bl 3000d0e4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 30021e7c: ebffc522 bl 3001330c <__errno> 30021e80: e3a0300b mov r3, #11 30021e84: e5803000 str r3, [r0] 30021e88: e3e00000 mvn r0, #0 30021e8c: eaffffd6 b 30021dec =============================================================================== 3000a904 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 3000a904: e3500000 cmp r0, #0 3000a908: 0a00000e beq 3000a948 3000a90c: e5903000 ldr r3, [r0] 3000a910: e3530000 cmp r3, #0 3000a914: 0a00000b beq 3000a948 return EINVAL; switch ( policy ) { 3000a918: e3510004 cmp r1, #4 3000a91c: 9a000001 bls 3000a928 case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 3000a920: e3a00086 mov r0, #134 ; 0x86 } } 3000a924: e12fff1e bx lr ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 3000a928: e3a03001 mov r3, #1 3000a92c: e1a03113 lsl r3, r3, r1 3000a930: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 3000a934: 15801014 strne r1, [r0, #20] return 0; 3000a938: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 3000a93c: 112fff1e bxne lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 3000a940: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED } } 3000a944: e12fff1e bx lr <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 3000a948: e3a00016 mov r0, #22 3000a94c: e12fff1e bx lr =============================================================================== 30007ae4 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 30007ae4: e3500000 cmp r0, #0 30007ae8: 0a000008 beq 30007b10 30007aec: e5903000 ldr r3, [r0] 30007af0: e3530000 cmp r3, #0 30007af4: 0a000005 beq 30007b10 return EINVAL; switch ( pshared ) { 30007af8: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 30007afc: 95801004 strls r1, [r0, #4] return 0; 30007b00: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 30007b04: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 30007b08: e3a00016 mov r0, #22 <== NOT EXECUTED } } 30007b0c: e12fff1e bx lr <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 30007b10: e3a00016 mov r0, #22 30007b14: e12fff1e bx lr =============================================================================== 30006de0 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30006de0: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30006de4: e2505000 subs r5, r0, #0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30006de8: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30006dec: 0a00001d beq 30006e68 * * 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 ); 30006df0: e1a00001 mov r0, r1 30006df4: e28d1004 add r1, sp, #4 30006df8: eb001a02 bl 3000d608 <_POSIX_Absolute_timeout_to_ticks> 30006dfc: e5951000 ldr r1, [r5] 30006e00: e1a04000 mov r4, r0 30006e04: e28d2008 add r2, sp, #8 30006e08: e59f0098 ldr r0, [pc, #152] ; 30006ea8 30006e0c: eb000aa9 bl 300098b8 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30006e10: e59d3008 ldr r3, [sp, #8] 30006e14: e3530000 cmp r3, #0 30006e18: 1a000012 bne 30006e68 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 30006e1c: 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, 30006e20: e3540003 cmp r4, #3 30006e24: 13a05000 movne r5, #0 30006e28: 03a05001 moveq r5, #1 30006e2c: e58d3000 str r3, [sp] 30006e30: e2800010 add r0, r0, #16 30006e34: e1a02005 mov r2, r5 30006e38: e59d3004 ldr r3, [sp, #4] 30006e3c: eb000737 bl 30008b20 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30006e40: eb000d7b bl 3000a434 <_Thread_Enable_dispatch> if ( !do_wait ) { 30006e44: e3550000 cmp r5, #0 30006e48: 1a000011 bne 30006e94 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 30006e4c: e59f3058 ldr r3, [pc, #88] ; 30006eac 30006e50: e5933004 ldr r3, [r3, #4] 30006e54: e5930034 ldr r0, [r3, #52] ; 0x34 30006e58: e3500002 cmp r0, #2 30006e5c: 0a000004 beq 30006e74 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006e60: eb000046 bl 30006f80 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30006e64: ea000000 b 30006e6c _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 30006e68: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30006e6c: e28dd00c add sp, sp, #12 30006e70: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 30006e74: e3540000 cmp r4, #0 30006e78: 0afffffa beq 30006e68 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 30006e7c: e2444001 sub r4, r4, #1 30006e80: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 30006e84: 93a00074 movls r0, #116 ; 0x74 _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 30006e88: 9afffff7 bls 30006e6c status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006e8c: eb00003b bl 30006f80 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED 30006e90: eafffff5 b 30006e6c <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { 30006e94: e59f3010 ldr r3, [pc, #16] ; 30006eac 30006e98: e5933004 ldr r3, [r3, #4] 30006e9c: e5930034 ldr r0, [r3, #52] ; 0x34 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006ea0: eb000036 bl 30006f80 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30006ea4: eafffff0 b 30006e6c =============================================================================== 30006eb0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30006eb0: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30006eb4: e2505000 subs r5, r0, #0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30006eb8: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30006ebc: 0a00001d beq 30006f38 * * 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 ); 30006ec0: e1a00001 mov r0, r1 30006ec4: e28d1004 add r1, sp, #4 30006ec8: eb0019ce bl 3000d608 <_POSIX_Absolute_timeout_to_ticks> 30006ecc: e5951000 ldr r1, [r5] 30006ed0: e1a04000 mov r4, r0 30006ed4: e28d2008 add r2, sp, #8 30006ed8: e59f0098 ldr r0, [pc, #152] ; 30006f78 30006edc: eb000a75 bl 300098b8 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30006ee0: e59d3008 ldr r3, [sp, #8] 30006ee4: e3530000 cmp r3, #0 30006ee8: 1a000012 bne 30006f38 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 30006eec: 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, 30006ef0: e3540003 cmp r4, #3 30006ef4: 13a05000 movne r5, #0 30006ef8: 03a05001 moveq r5, #1 30006efc: e58d3000 str r3, [sp] 30006f00: e2800010 add r0, r0, #16 30006f04: e1a02005 mov r2, r5 30006f08: e59d3004 ldr r3, [sp, #4] 30006f0c: eb00073a bl 30008bfc <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30006f10: eb000d47 bl 3000a434 <_Thread_Enable_dispatch> if ( !do_wait && 30006f14: e3550000 cmp r5, #0 30006f18: 1a000011 bne 30006f64 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 30006f1c: e59f3058 ldr r3, [pc, #88] ; 30006f7c 30006f20: e5933004 ldr r3, [r3, #4] 30006f24: e5930034 ldr r0, [r3, #52] ; 0x34 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 30006f28: e3500002 cmp r0, #2 30006f2c: 0a000004 beq 30006f44 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006f30: eb000012 bl 30006f80 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30006f34: ea000000 b 30006f3c _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 30006f38: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30006f3c: e28dd00c add sp, sp, #12 30006f40: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 30006f44: e3540000 cmp r4, #0 30006f48: 0afffffa beq 30006f38 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 30006f4c: e2444001 sub r4, r4, #1 30006f50: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 30006f54: 93a00074 movls r0, #116 ; 0x74 _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 30006f58: 9afffff7 bls 30006f3c status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006f5c: eb000007 bl 30006f80 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED 30006f60: eafffff5 b 30006f3c <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 30006f64: e59f3010 ldr r3, [pc, #16] ; 30006f7c 30006f68: e5933004 ldr r3, [r3, #4] 30006f6c: e5930034 ldr r0, [r3, #52] ; 0x34 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30006f70: eb000002 bl 30006f80 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30006f74: eafffff0 b 30006f3c =============================================================================== 30007714 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 30007714: e3500000 cmp r0, #0 30007718: 0a000008 beq 30007740 return EINVAL; if ( !attr->is_initialized ) 3000771c: e5903000 ldr r3, [r0] 30007720: e3530000 cmp r3, #0 30007724: 0a000005 beq 30007740 return EINVAL; switch ( pshared ) { 30007728: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 3000772c: 95801004 strls r1, [r0, #4] return 0; 30007730: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 30007734: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 30007738: e3a00016 mov r0, #22 } } 3000773c: e12fff1e bx lr <== NOT EXECUTED { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 30007740: e3a00016 mov r0, #22 30007744: e12fff1e bx lr =============================================================================== 30006914 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 30006914: e92d41f0 push {r4, r5, r6, r7, r8, lr} struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 30006918: e59f41c4 ldr r4, [pc, #452] ; 30006ae4 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 3000691c: e24dd024 sub sp, sp, #36 ; 0x24 30006920: e1a06000 mov r6, r0 struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 30006924: e1a00004 mov r0, r4 30006928: eb000255 bl 30007284 if (result != 0) { 3000692c: e2505000 subs r5, r0, #0 30006930: 1a00002a bne 300069e0 return result; } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); 30006934: eb000484 bl 30007b4c 30006938: e28d101c add r1, sp, #28 3000693c: e1a0200d mov r2, sp 30006940: eb00037e bl 30007740 req->caller_thread = pthread_self (); 30006944: eb000480 bl 30007b4c req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 30006948: e5963014 ldr r3, [r6, #20] 3000694c: e59dc000 ldr ip, [sp] 30006950: e5932014 ldr r2, [r3, #20] req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 30006954: e5941068 ldr r1, [r4, #104] ; 0x68 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 30006958: e062200c rsb r2, r2, ip 3000695c: e586200c str r2, [r6, #12] req->policy = policy; 30006960: e59d201c ldr r2, [sp, #28] req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 30006964: e3510000 cmp r1, #0 we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; 30006968: e5862008 str r2, [r6, #8] req->aiocbp->error_code = EINPROGRESS; 3000696c: e3a02077 mov r2, #119 ; 0x77 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); 30006970: e5860010 str r0, [r6, #16] req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; 30006974: e5832030 str r2, [r3, #48] ; 0x30 req->aiocbp->return_value = 0; 30006978: e5835034 str r5, [r3, #52] ; 0x34 if ((aio_request_queue.idle_threads == 0) && 3000697c: 1a000002 bne 3000698c 30006980: e5942064 ldr r2, [r4, #100] ; 0x64 30006984: e3520004 cmp r2, #4 30006988: da000017 ble 300069ec else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 3000698c: e59f0154 ldr r0, [pc, #340] ; 30006ae8 30006990: e5931000 ldr r1, [r3] 30006994: e3a02000 mov r2, #0 30006998: ebfffec3 bl 300064ac req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 3000699c: e2507000 subs r7, r0, #0 300069a0: 0a00002e beq 30006a60 { pthread_mutex_lock (&r_chain->mutex); 300069a4: e287401c add r4, r7, #28 300069a8: e1a00004 mov r0, r4 300069ac: eb000234 bl 30007284 rtems_aio_insert_prio (&r_chain->perfd, req); 300069b0: e2870008 add r0, r7, #8 300069b4: e1a01006 mov r1, r6 300069b8: ebffff90 bl 30006800 pthread_cond_signal (&r_chain->cond); 300069bc: e2870020 add r0, r7, #32 300069c0: eb000119 bl 30006e2c pthread_mutex_unlock (&r_chain->mutex); 300069c4: e1a00004 mov r0, r4 300069c8: eb00024e bl 30007308 /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); } } pthread_mutex_unlock (&aio_request_queue.mutex); 300069cc: e59f0110 ldr r0, [pc, #272] ; 30006ae4 300069d0: eb00024c bl 30007308 return 0; } 300069d4: e1a00005 mov r0, r5 300069d8: e28dd024 add sp, sp, #36 ; 0x24 300069dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); if (result != 0) { free (req); 300069e0: e1a00006 mov r0, r6 <== NOT EXECUTED 300069e4: ebfff0d3 bl 30002d38 <== NOT EXECUTED return result; 300069e8: eafffff9 b 300069d4 <== NOT EXECUTED if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 300069ec: e5931000 ldr r1, [r3] 300069f0: e2840048 add r0, r4, #72 ; 0x48 300069f4: e3a02001 mov r2, #1 300069f8: ebfffeab bl 300064ac if (r_chain->new_fd == 1) { 300069fc: e5903018 ldr r3, [r0, #24] if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 30006a00: e1a07000 mov r7, r0 if (r_chain->new_fd == 1) { 30006a04: e3530001 cmp r3, #1 30006a08: 1affffe5 bne 300069a4 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 30006a0c: e1a01006 mov r1, r6 30006a10: e2800008 add r0, r0, #8 30006a14: eb00089c bl 30008c8c <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 30006a18: e1a01005 mov r1, r5 chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); if (r_chain->new_fd == 1) { rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 30006a1c: e5875018 str r5, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 30006a20: e287001c add r0, r7, #28 30006a24: eb0001c3 bl 30007138 pthread_cond_init (&r_chain->cond, NULL); 30006a28: e1a01005 mov r1, r5 30006a2c: e2870020 add r0, r7, #32 30006a30: eb0000cd bl 30006d6c AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 30006a34: e28d0020 add r0, sp, #32 30006a38: e2841008 add r1, r4, #8 30006a3c: e59f20a8 ldr r2, [pc, #168] ; 30006aec 30006a40: e1a03007 mov r3, r7 30006a44: eb000295 bl 300074a0 rtems_aio_handle, (void *) r_chain); if (result != 0) { 30006a48: e2506000 subs r6, r0, #0 30006a4c: 1a000020 bne 30006ad4 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 30006a50: e5943064 ldr r3, [r4, #100] ; 0x64 30006a54: e2833001 add r3, r3, #1 30006a58: e5843064 str r3, [r4, #100] ; 0x64 30006a5c: eaffffda b 300069cc } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 30006a60: e5963014 ldr r3, [r6, #20] 30006a64: e59f0084 ldr r0, [pc, #132] ; 30006af0 30006a68: e5931000 ldr r1, [r3] 30006a6c: e3a02001 mov r2, #1 30006a70: ebfffe8d bl 300064ac if (r_chain->new_fd == 1) { 30006a74: e5903018 ldr r3, [r0, #24] } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 30006a78: e1a08000 mov r8, r0 if (r_chain->new_fd == 1) { 30006a7c: e3530001 cmp r3, #1 30006a80: 0a000003 beq 30006a94 pthread_cond_init (&r_chain->cond, NULL); pthread_cond_signal (&aio_request_queue.new_req); ++aio_request_queue.idle_threads; } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 30006a84: e2800008 add r0, r0, #8 30006a88: e1a01006 mov r1, r6 30006a8c: ebffff5b bl 30006800 30006a90: eaffffcd b 300069cc 30006a94: e2800008 add r0, r0, #8 30006a98: e1a01006 mov r1, r6 30006a9c: eb00087a bl 30008c8c <_Chain_Insert> /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 30006aa0: e1a01007 mov r1, r7 if (r_chain->new_fd == 1) { /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 30006aa4: e5887018 str r7, [r8, #24] pthread_mutex_init (&r_chain->mutex, NULL); 30006aa8: e288001c add r0, r8, #28 30006aac: eb0001a1 bl 30007138 pthread_cond_init (&r_chain->cond, NULL); 30006ab0: e1a01007 mov r1, r7 30006ab4: e2880020 add r0, r8, #32 30006ab8: eb0000ab bl 30006d6c pthread_cond_signal (&aio_request_queue.new_req); 30006abc: e59f0030 ldr r0, [pc, #48] ; 30006af4 30006ac0: eb0000d9 bl 30006e2c ++aio_request_queue.idle_threads; 30006ac4: e5943068 ldr r3, [r4, #104] ; 0x68 30006ac8: e2833001 add r3, r3, #1 30006acc: e5843068 str r3, [r4, #104] ; 0x68 30006ad0: eaffffbd b 300069cc AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); 30006ad4: e1a00004 mov r0, r4 <== NOT EXECUTED 30006ad8: eb00020a bl 30007308 <== NOT EXECUTED return result; 30006adc: e1a05006 mov r5, r6 <== NOT EXECUTED 30006ae0: eaffffbb b 300069d4 <== NOT EXECUTED =============================================================================== 30006578 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 30006578: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 3000657c: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED 30006580: e1a05000 mov r5, r0 <== NOT EXECUTED 30006584: e280601c add r6, r0, #28 <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 30006588: e28d8028 add r8, sp, #40 ; 0x28 <== NOT EXECUTED 3000658c: e28d7004 add r7, sp, #4 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 30006590: e3e0b000 mvn fp, #0 <== NOT EXECUTED req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; req->aiocbp->error_code = 0; 30006594: e3a09000 mov r9, #0 <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 30006598: e1a00006 mov r0, r6 <== NOT EXECUTED 3000659c: eb000338 bl 30007284 <== NOT EXECUTED if (result != 0) 300065a0: e250a000 subs sl, r0, #0 <== NOT EXECUTED 300065a4: 1a000021 bne 30006630 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 300065a8: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 300065ac: e285300c add r3, r5, #12 <== NOT EXECUTED /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { 300065b0: e1540003 cmp r4, r3 <== NOT EXECUTED 300065b4: 0a000038 beq 3000669c <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 300065b8: eb000563 bl 30007b4c <== NOT EXECUTED 300065bc: e1a01008 mov r1, r8 <== NOT EXECUTED 300065c0: e1a02007 mov r2, r7 <== NOT EXECUTED 300065c4: eb00045d bl 30007740 <== NOT EXECUTED param.sched_priority = req->priority; 300065c8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED 300065cc: e58d3004 str r3, [sp, #4] <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); 300065d0: eb00055d bl 30007b4c <== NOT EXECUTED 300065d4: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 300065d8: e1a02007 mov r2, r7 <== NOT EXECUTED 300065dc: eb00055f bl 30007b60 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 300065e0: e1a00004 mov r0, r4 <== NOT EXECUTED 300065e4: eb000993 bl 30008c38 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 300065e8: e1a00006 mov r0, r6 <== NOT EXECUTED 300065ec: eb000345 bl 30007308 <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { 300065f0: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED 300065f4: e59a302c ldr r3, [sl, #44] ; 0x2c <== NOT EXECUTED 300065f8: e3530002 cmp r3, #2 <== NOT EXECUTED 300065fc: 0a00001e beq 3000667c <== NOT EXECUTED 30006600: e3530003 cmp r3, #3 <== NOT EXECUTED 30006604: 0a000019 beq 30006670 <== NOT EXECUTED 30006608: e3530001 cmp r3, #1 <== NOT EXECUTED 3000660c: 0a00000a beq 3000663c <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 30006610: e58ab034 str fp, [sl, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = errno; 30006614: eb002886 bl 30010834 <__errno> <== NOT EXECUTED 30006618: e5903000 ldr r3, [r0] <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 3000661c: e1a00006 mov r0, r6 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; 30006620: e58a3030 str r3, [sl, #48] ; 0x30 <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 30006624: eb000316 bl 30007284 <== NOT EXECUTED if (result != 0) 30006628: e250a000 subs sl, r0, #0 <== NOT EXECUTED 3000662c: 0affffdd beq 300065a8 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30006630: e3a00000 mov r0, #0 <== NOT EXECUTED 30006634: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 30006638: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); switch (req->aiocbp->aio_lio_opcode) { case LIO_READ: result = pread (req->aiocbp->aio_fildes, 3000663c: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED 30006640: e59a0000 ldr r0, [sl] <== NOT EXECUTED 30006644: e59a100c ldr r1, [sl, #12] <== NOT EXECUTED 30006648: e59a2010 ldr r2, [sl, #16] <== NOT EXECUTED 3000664c: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED 30006650: e58dc000 str ip, [sp] <== NOT EXECUTED 30006654: eb002b78 bl 3001143c <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 30006658: e3700001 cmn r0, #1 <== NOT EXECUTED 3000665c: 0a00005e beq 300067dc <== NOT EXECUTED req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; 30006660: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 30006664: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = 0; 30006668: e5839030 str r9, [r3, #48] ; 0x30 <== NOT EXECUTED 3000666c: eaffffc9 b 30006598 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_SYNC: result = fsync (req->aiocbp->aio_fildes); 30006670: e59a0000 ldr r0, [sl] <== NOT EXECUTED 30006674: eb001ad7 bl 3000d1d8 <== NOT EXECUTED break; 30006678: eafffff6 b 30006658 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_WRITE: result = pwrite (req->aiocbp->aio_fildes, 3000667c: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED 30006680: e59a0000 ldr r0, [sl] <== NOT EXECUTED 30006684: e59a100c ldr r1, [sl, #12] <== NOT EXECUTED 30006688: e59a2010 ldr r2, [sl, #16] <== NOT EXECUTED 3000668c: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED 30006690: e58dc000 str ip, [sp] <== NOT EXECUTED 30006694: eb002bb0 bl 3001155c <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 30006698: eaffffee b 30006658 <== NOT EXECUTED wait for a signal on chain, this will unlock the queue. The fd chain is already unlocked */ struct timespec timeout; pthread_mutex_unlock (&r_chain->mutex); 3000669c: e1a00006 mov r0, r6 <== NOT EXECUTED 300066a0: eb000318 bl 30007308 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); 300066a4: e59f0144 ldr r0, [pc, #324] ; 300067f0 <== NOT EXECUTED 300066a8: eb0002f5 bl 30007284 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) 300066ac: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 300066b0: e1540003 cmp r4, r3 <== NOT EXECUTED 300066b4: 1affffb7 bne 30006598 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); 300066b8: e28d1020 add r1, sp, #32 <== NOT EXECUTED 300066bc: e3a00001 mov r0, #1 <== NOT EXECUTED 300066c0: eb000154 bl 30006c18 <== NOT EXECUTED timeout.tv_sec += 3; 300066c4: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 300066c8: e2854020 add r4, r5, #32 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 300066cc: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 300066d0: e1a00004 mov r0, r4 <== NOT EXECUTED 300066d4: e59f1114 ldr r1, [pc, #276] ; 300067f0 <== NOT EXECUTED 300066d8: e28d2020 add r2, sp, #32 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 300066dc: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 300066e0: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&r_chain->cond, 300066e4: eb0001ea bl 30006e94 <== NOT EXECUTED &aio_request_queue.mutex, &timeout); /* If no requests were added to the chain we delete the fd chain from the queue and start working with idle fd chains */ if (result == ETIMEDOUT) { 300066e8: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 300066ec: 1affffa9 bne 30006598 <== NOT EXECUTED 300066f0: e1a00005 mov r0, r5 <== NOT EXECUTED 300066f4: eb00094f bl 30008c38 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 300066f8: e1a00006 mov r0, r6 <== NOT EXECUTED 300066fc: eb00023d bl 30006ff8 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 30006700: e1a00004 mov r0, r4 <== NOT EXECUTED 30006704: eb000165 bl 30006ca0 <== NOT EXECUTED free (r_chain); 30006708: e1a00005 mov r0, r5 <== NOT EXECUTED 3000670c: ebfff189 bl 30002d38 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { 30006710: e59f20d8 ldr r2, [pc, #216] ; 300067f0 <== NOT EXECUTED 30006714: e5923054 ldr r3, [r2, #84] ; 0x54 <== NOT EXECUTED 30006718: e59f20d4 ldr r2, [pc, #212] ; 300067f4 <== NOT EXECUTED 3000671c: e1530002 cmp r3, r2 <== NOT EXECUTED 30006720: 0a000002 beq 30006730 <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; } else /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); 30006724: e59f00c4 ldr r0, [pc, #196] ; 300067f0 <== NOT EXECUTED 30006728: eb0002f6 bl 30007308 <== NOT EXECUTED 3000672c: eaffff99 b 30006598 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; 30006730: e59f20b8 ldr r2, [pc, #184] ; 300067f0 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 30006734: e28d1020 add r1, sp, #32 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; 30006738: e5923068 ldr r3, [r2, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 3000673c: e3a00001 mov r0, #1 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; 30006740: e2833001 add r3, r3, #1 <== NOT EXECUTED 30006744: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 30006748: eb000132 bl 30006c18 <== NOT EXECUTED timeout.tv_sec += 3; 3000674c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 30006750: e59f00a0 ldr r0, [pc, #160] ; 300067f8 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 30006754: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 30006758: e59f1090 ldr r1, [pc, #144] ; 300067f0 <== NOT EXECUTED 3000675c: e28d2020 add r2, sp, #32 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 30006760: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 30006764: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&aio_request_queue.new_req, 30006768: eb0001c9 bl 30006e94 <== NOT EXECUTED &aio_request_queue.mutex, &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { 3000676c: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 30006770: 0a00001b beq 300067e4 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30006774: e59f3074 ldr r3, [pc, #116] ; 300067f0 <== NOT EXECUTED return NULL; } /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; 30006778: e59f2070 ldr r2, [pc, #112] ; 300067f0 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 3000677c: e5934054 ldr r4, [r3, #84] ; 0x54 <== NOT EXECUTED return NULL; } /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; 30006780: e5933068 ldr r3, [r3, #104] ; 0x68 <== NOT EXECUTED 30006784: e1a00004 mov r0, r4 <== NOT EXECUTED 30006788: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000678c: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED 30006790: eb000928 bl 30008c38 <_Chain_Extract> <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 30006794: e3a02001 mov r2, #1 <== NOT EXECUTED 30006798: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED 3000679c: e59f0058 ldr r0, [pc, #88] ; 300067fc <== NOT EXECUTED 300067a0: ebffff41 bl 300064ac <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 300067a4: e280601c add r6, r0, #28 <== NOT EXECUTED /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 300067a8: e1a05000 mov r5, r0 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 300067ac: e1a0100a mov r1, sl <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; 300067b0: e580a018 str sl, [r0, #24] <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); 300067b4: e1a00006 mov r0, r6 <== NOT EXECUTED 300067b8: eb00025e bl 30007138 <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); 300067bc: e1a0100a mov r1, sl <== NOT EXECUTED 300067c0: e2850020 add r0, r5, #32 <== NOT EXECUTED 300067c4: eb000168 bl 30006d6c <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 300067c8: e2844008 add r4, r4, #8 <== NOT EXECUTED 300067cc: e2853008 add r3, r5, #8 <== NOT EXECUTED 300067d0: e8940007 ldm r4, {r0, r1, r2} <== NOT EXECUTED 300067d4: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED 300067d8: eaffff6e b 30006598 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 300067dc: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED 300067e0: eaffff8a b 30006610 <== NOT EXECUTED &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { pthread_mutex_unlock (&aio_request_queue.mutex); 300067e4: e59f0004 ldr r0, [pc, #4] ; 300067f0 <== NOT EXECUTED 300067e8: eb0002c6 bl 30007308 <== NOT EXECUTED return NULL; 300067ec: eaffff8f b 30006630 <== NOT EXECUTED =============================================================================== 300063a8 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 300063a8: e92d4030 push {r4, r5, lr} int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 300063ac: e59f00e4 ldr r0, [pc, #228] ; 30006498 300063b0: eb00041a bl 30007420 if (result != 0) 300063b4: e2505000 subs r5, r0, #0 300063b8: 0a000001 beq 300063c4 aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } 300063bc: e1a00005 mov r0, r5 <== NOT EXECUTED 300063c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED result = pthread_attr_init (&aio_request_queue.attr); if (result != 0) return result; result = 300063c4: e59f00cc ldr r0, [pc, #204] ; 30006498 300063c8: e1a01005 mov r1, r5 300063cc: eb000426 bl 3000746c pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 300063d0: e3500000 cmp r0, #0 300063d4: 1a00001b bne 30006448 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 300063d8: e59f40bc ldr r4, [pc, #188] ; 3000649c 300063dc: e3a01000 mov r1, #0 300063e0: e1a00004 mov r0, r4 300063e4: eb000353 bl 30007138 if (result != 0) 300063e8: e3500000 cmp r0, #0 300063ec: 1a00001d bne 30006468 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); 300063f0: e59f00a8 ldr r0, [pc, #168] ; 300064a0 300063f4: e3a01000 mov r1, #0 300063f8: eb00025b bl 30006d6c if (result != 0) { 300063fc: e2505000 subs r5, r0, #0 30006400: 1a00001f bne 30006484 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 30006404: e59f2098 ldr r2, [pc, #152] ; 300064a4 head->previous = NULL; 30006408: e3a03000 mov r3, #0 3000640c: e584304c str r3, [r4, #76] ; 0x4c 30006410: e5843058 str r3, [r4, #88] ; 0x58 } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; 30006414: e5843064 str r3, [r4, #100] ; 0x64 aio_request_queue.idle_threads = 0; 30006418: e5843068 str r3, [r4, #104] ; 0x68 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 3000641c: e59f3084 ldr r3, [pc, #132] ; 300064a8 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 30006420: e282000c add r0, r2, #12 head->previous = NULL; tail->previous = head; 30006424: e242c004 sub ip, r2, #4 30006428: e2821008 add r1, r2, #8 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 3000642c: e5840054 str r0, [r4, #84] ; 0x54 30006430: e5842048 str r2, [r4, #72] ; 0x48 head->previous = NULL; tail->previous = head; 30006434: e584c050 str ip, [r4, #80] ; 0x50 30006438: e584105c str r1, [r4, #92] ; 0x5c 3000643c: e5843060 str r3, [r4, #96] ; 0x60 return result; } 30006440: e1a00005 mov r0, r5 30006444: e8bd8030 pop {r4, r5, pc} PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 30006448: e59f404c ldr r4, [pc, #76] ; 3000649c <== NOT EXECUTED result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); 3000644c: e59f0044 ldr r0, [pc, #68] ; 30006498 <== NOT EXECUTED 30006450: eb0003e9 bl 300073fc <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 30006454: e3a01000 mov r1, #0 <== NOT EXECUTED 30006458: e1a00004 mov r0, r4 <== NOT EXECUTED 3000645c: eb000335 bl 30007138 <== NOT EXECUTED if (result != 0) 30006460: e3500000 cmp r0, #0 <== NOT EXECUTED 30006464: 0affffe1 beq 300063f0 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 30006468: e2840008 add r0, r4, #8 <== NOT EXECUTED 3000646c: eb0003e2 bl 300073fc <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); 30006470: e59f0028 ldr r0, [pc, #40] ; 300064a0 <== NOT EXECUTED 30006474: e3a01000 mov r1, #0 <== NOT EXECUTED 30006478: eb00023b bl 30006d6c <== NOT EXECUTED if (result != 0) { 3000647c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30006480: 0affffdf beq 30006404 <== NOT EXECUTED pthread_mutex_destroy (&aio_request_queue.mutex); 30006484: e59f0010 ldr r0, [pc, #16] ; 3000649c <== NOT EXECUTED 30006488: eb0002da bl 30006ff8 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 3000648c: e59f0004 ldr r0, [pc, #4] ; 30006498 <== NOT EXECUTED 30006490: eb0003d9 bl 300073fc <== NOT EXECUTED 30006494: eaffffda b 30006404 <== NOT EXECUTED =============================================================================== 30006800 : } AIO_printf ("Thread finished\n"); return NULL; } 30006800: e1a02000 mov r2, r0 30006804: e4923004 ldr r3, [r2], #4 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 30006808: e1a0c001 mov ip, r1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 3000680c: e1530002 cmp r3, r2 30006810: 0a00000f beq 30006854 rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 30006814: e5910014 ldr r0, [r1, #20] if (rtems_chain_is_empty (chain)) { AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 30006818: e5931014 ldr r1, [r3, #20] while (req->aiocbp->aio_reqprio > prio && 3000681c: e5900014 ldr r0, [r0, #20] 30006820: e5911014 ldr r1, [r1, #20] 30006824: e1510000 cmp r1, r0 30006828: ba000002 blt 30006838 3000682c: ea000006 b 3000684c 30006830: e1530002 cmp r3, r2 <== NOT EXECUTED 30006834: 0a000004 beq 3000684c <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30006838: e5933000 ldr r3, [r3] <== NOT EXECUTED int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 3000683c: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 30006840: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED 30006844: e1510000 cmp r1, r0 <== NOT EXECUTED 30006848: bafffff8 blt 30006830 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); 3000684c: e5930004 ldr r0, [r3, #4] 30006850: e1a0100c mov r1, ip 30006854: ea00090c b 30008c8c <_Chain_Insert> =============================================================================== 30006858 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 30006858: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 3000685c: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 30006860: e280000c add r0, r0, #12 <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 30006864: e1540000 cmp r4, r0 <== NOT EXECUTED 30006868: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 3000686c: e1a00004 mov r0, r4 <== NOT EXECUTED 30006870: eb0008f0 bl 30008c38 <_Chain_Extract> <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 30006874: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 30006878: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED req->aiocbp->return_value = -1; 3000687c: e3e05000 mvn r5, #0 <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 30006880: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; 30006884: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); 30006888: e1a00004 mov r0, r4 <== NOT EXECUTED 3000688c: ebfff129 bl 30002d38 <== NOT EXECUTED 30006890: e1a00004 mov r0, r4 <== NOT EXECUTED 30006894: eb0008e7 bl 30008c38 <_Chain_Extract> <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 30006898: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED req->aiocbp->return_value = -1; free (req); 3000689c: e1a00004 mov r0, r4 <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 300068a0: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; 300068a4: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); 300068a8: ebfff122 bl 30002d38 <== NOT EXECUTED 300068ac: eafffff7 b 30006890 <== NOT EXECUTED =============================================================================== 300068b0 : * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { 300068b0: e92d4010 push {r4, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 300068b4: e4904004 ldr r4, [r0], #4 <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 300068b8: e1540000 cmp r4, r0 <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; 300068bc: 03a00001 moveq r0, #1 <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 300068c0: 1a000003 bne 300068d4 <== NOT EXECUTED 300068c4: e8bd8010 pop {r4, pc} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 300068c8: e5944000 ldr r4, [r4] <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 300068cc: e1540000 cmp r4, r0 <== NOT EXECUTED 300068d0: 0a00000d beq 3000690c <== NOT EXECUTED 300068d4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 300068d8: e1530001 cmp r3, r1 <== NOT EXECUTED 300068dc: 1afffff9 bne 300068c8 <== NOT EXECUTED 300068e0: e1a00004 mov r0, r4 <== NOT EXECUTED 300068e4: eb0008d3 bl 30008c38 <_Chain_Extract> <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 300068e8: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 300068ec: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED 300068f0: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED current->aiocbp->return_value = -1; 300068f4: e3e02000 mvn r2, #0 <== NOT EXECUTED free (current); 300068f8: e1a00004 mov r0, r4 <== NOT EXECUTED return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; 300068fc: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED free (current); 30006900: ebfff10c bl 30002d38 <== NOT EXECUTED } return AIO_CANCELED; 30006904: e3a00000 mov r0, #0 <== NOT EXECUTED 30006908: e8bd8010 pop {r4, pc} <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; 3000690c: e3a00001 mov r0, #1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 30006910: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 300072e4 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 300072e4: e59fc150 ldr ip, [pc, #336] ; 3000743c 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; 300072e8: e59f3150 ldr r3, [pc, #336] ; 30007440 if ( rtems_interrupt_is_in_progress() ) 300072ec: e59cc000 ldr ip, [ip] 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 ) { 300072f0: e92d4030 push {r4, r5, lr} rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 300072f4: 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 ) { 300072f8: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 300072fc: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 30007300: 13a00012 movne r0, #18 rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 30007304: 18bd8030 popne {r4, r5, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 30007308: e3520000 cmp r2, #0 3000730c: 0a00003f beq 30007410 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 30007310: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 30007314: e5820000 str r0, [r2] if ( driver_table == NULL ) 30007318: 0a00003c beq 30007410 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 3000731c: e591c000 ldr ip, [r1] 30007320: e35c0000 cmp ip, #0 30007324: 0a000036 beq 30007404 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 30007328: e1500004 cmp r0, r4 3000732c: 9a000027 bls 300073d0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30007330: e59f010c ldr r0, [pc, #268] ; 30007444 30007334: e590c000 ldr ip, [r0] 30007338: e28cc001 add ip, ip, #1 3000733c: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 30007340: e3540000 cmp r4, #0 30007344: 1a000023 bne 300073d8 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 30007348: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 3000734c: e35c0000 cmp ip, #0 30007350: 0a000030 beq 30007418 30007354: e59fe0ec ldr lr, [pc, #236] ; 30007448 30007358: e59e3000 ldr r3, [lr] 3000735c: ea000003 b 30007370 30007360: e2844001 add r4, r4, #1 30007364: e15c0004 cmp ip, r4 30007368: e2833018 add r3, r3, #24 3000736c: 9a000005 bls 30007388 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007370: e5930000 ldr r0, [r3] 30007374: e3500000 cmp r0, #0 30007378: 1afffff8 bne 30007360 3000737c: e5930004 ldr r0, [r3, #4] 30007380: e3500000 cmp r0, #0 30007384: 1afffff5 bne 30007360 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 30007388: e15c0004 cmp ip, r4 3000738c: 1084c084 addne ip, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 30007390: e5824000 str r4, [r2] if ( m != n ) 30007394: 11a0c18c lslne ip, ip, #3 30007398: 0a00001f beq 3000741c } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 3000739c: e59e5000 ldr r5, [lr] 300073a0: e1a0e001 mov lr, r1 300073a4: e085c00c add ip, r5, ip 300073a8: e8be000f ldm lr!, {r0, r1, r2, r3} 300073ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 300073b0: e89e0003 ldm lr, {r0, r1} 300073b4: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 300073b8: eb000775 bl 30009194 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 300073bc: e3a01000 mov r1, #0 300073c0: e1a00004 mov r0, r4 300073c4: e1a02001 mov r2, r1 } 300073c8: e8bd4030 pop {r4, r5, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 300073cc: ea0021a9 b 3000fa78 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 300073d0: e3a0000a mov r0, #10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 300073d4: e8bd8030 pop {r4, r5, pc} _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 300073d8: e59fe068 ldr lr, [pc, #104] ; 30007448 300073dc: e0840084 add r0, r4, r4, lsl #1 300073e0: e59e3000 ldr r3, [lr] 300073e4: e1a0c180 lsl ip, r0, #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 300073e8: e7930180 ldr r0, [r3, r0, lsl #3] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 300073ec: e083300c add r3, r3, ip static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 300073f0: e3500000 cmp r0, #0 300073f4: 0a00000b beq 30007428 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(); 300073f8: eb000765 bl 30009194 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 300073fc: e3a0000c mov r0, #12 30007400: e8bd8030 pop {r4, r5, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007404: e591c004 ldr ip, [r1, #4] 30007408: e35c0000 cmp ip, #0 3000740c: 1affffc5 bne 30007328 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 30007410: e3a00009 mov r0, #9 30007414: e8bd8030 pop {r4, r5, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 30007418: 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(); 3000741c: eb00075c bl 30009194 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 30007420: e3a00005 mov r0, #5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 30007424: e8bd8030 pop {r4, r5, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 30007428: e5933004 ldr r3, [r3, #4] 3000742c: e3530000 cmp r3, #0 30007430: 1afffff0 bne 300073f8 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 30007434: e5824000 str r4, [r2] 30007438: eaffffd7 b 3000739c =============================================================================== 30005988 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 30005988: e3500001 cmp r0, #1 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 3000598c: e52de004 push {lr} ; (str lr, [sp, #-4]!) const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 30005990: 0a00000d beq 300059cc api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 30005994: e3500002 cmp r0, #2 30005998: 0a000004 beq 300059b0 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 3000599c: e3500003 cmp r0, #3 api_assoc = rtems_object_api_posix_assoc; 300059a0: 059f003c ldreq r0, [pc, #60] ; 300059e4 if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 300059a4: 0a000002 beq 300059b4 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 300059a8: e59f0038 ldr r0, [pc, #56] ; 300059e8 300059ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 300059b0: e59f0034 ldr r0, [pc, #52] ; 300059ec else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 300059b4: eb001381 bl 3000a7c0 if ( class_assoc ) 300059b8: e3500000 cmp r0, #0 return class_assoc->name; 300059bc: 15900000 ldrne r0, [r0] api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 300059c0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) return class_assoc->name; return "BAD CLASS"; 300059c4: e59f0024 ldr r0, [pc, #36] ; 300059f0 } 300059c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 300059cc: e59f0020 ldr r0, [pc, #32] ; 300059f4 else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 300059d0: eb00137a bl 3000a7c0 if ( class_assoc ) 300059d4: e3500000 cmp r0, #0 return class_assoc->name; 300059d8: 15900000 ldrne r0, [r0] api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 300059dc: 149df004 popne {pc} ; (ldrne pc, [sp], #4) 300059e0: eafffff7 b 300059c4 <== NOT EXECUTED =============================================================================== 3000d6cc : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000d6cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 3000d6d0: e2525000 subs r5, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000d6d4: e1a04000 mov r4, r0 3000d6d8: e1a06001 mov r6, r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 3000d6dc: 03a00009 moveq r0, #9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 3000d6e0: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 3000d6e4: e59f9148 ldr r9, [pc, #328] ; 3000d834 3000d6e8: e5997004 ldr r7, [r9, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 3000d6ec: e5d7a074 ldrb sl, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3000d6f0: e59780f8 ldr r8, [r7, #248] ; 0xf8 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000d6f4: e597307c ldr r3, [r7, #124] ; 0x7c executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 3000d6f8: e35a0000 cmp sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 3000d6fc: e5d8b008 ldrb fp, [r8, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 3000d700: 03a0ac01 moveq sl, #256 ; 0x100 3000d704: 13a0a000 movne sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000d708: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 3000d70c: 138aac02 orrne sl, sl, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 3000d710: e35b0000 cmp fp, #0 3000d714: 03a0bb01 moveq fp, #1024 ; 0x400 3000d718: 13a0b000 movne fp, #0 old_mode |= _ISR_Get_level(); 3000d71c: ebffee80 bl 30009124 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 3000d720: e18bb000 orr fp, fp, r0 old_mode |= _ISR_Get_level(); 3000d724: e18ba00a orr sl, fp, sl *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000d728: e3160c01 tst r6, #256 ; 0x100 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 3000d72c: e585a000 str sl, [r5] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000d730: 0a000003 beq 3000d744 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 3000d734: e3140c01 tst r4, #256 ; 0x100 3000d738: 13a03000 movne r3, #0 3000d73c: 03a03001 moveq r3, #1 3000d740: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { 3000d744: e3160c02 tst r6, #512 ; 0x200 3000d748: 1a000028 bne 3000d7f0 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 3000d74c: e3160080 tst r6, #128 ; 0x80 3000d750: 1a00002f bne 3000d814 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 3000d754: e2166b01 ands r6, r6, #1024 ; 0x400 3000d758: 0a000012 beq 3000d7a8 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000d75c: e3140b01 tst r4, #1024 ; 0x400 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 3000d760: e5d82008 ldrb r2, [r8, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000d764: 13a03000 movne r3, #0 3000d768: 03a03001 moveq r3, #1 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 3000d76c: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000d770: 03a06000 moveq r6, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 3000d774: 0a00000b beq 3000d7a8 asr->is_enabled = is_asr_enabled; 3000d778: e5c83008 strb r3, [r8, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000d77c: e10f3000 mrs r3, CPSR 3000d780: e3832080 orr r2, r3, #128 ; 0x80 3000d784: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; 3000d788: e5981018 ldr r1, [r8, #24] information->signals_pending = information->signals_posted; 3000d78c: e5982014 ldr r2, [r8, #20] information->signals_posted = _signals; 3000d790: e5881014 str r1, [r8, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 3000d794: e5882018 str r2, [r8, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000d798: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 3000d79c: e5986014 ldr r6, [r8, #20] 3000d7a0: e3560000 cmp r6, #0 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000d7a4: 13a06001 movne r6, #1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 3000d7a8: e59f3088 ldr r3, [pc, #136] ; 3000d838 3000d7ac: e5933000 ldr r3, [r3] 3000d7b0: e3530003 cmp r3, #3 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 3000d7b4: 13a00000 movne r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 3000d7b8: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || 3000d7bc: e3560000 cmp r6, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 3000d7c0: e5993004 ldr r3, [r9, #4] if ( are_signals_pending || 3000d7c4: 1a000015 bne 3000d820 3000d7c8: e59f2064 ldr r2, [pc, #100] ; 3000d834 3000d7cc: e5922008 ldr r2, [r2, #8] 3000d7d0: e1530002 cmp r3, r2 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 3000d7d4: 01a00006 moveq r0, r6 3000d7d8: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 3000d7dc: e5d33074 ldrb r3, [r3, #116] ; 0x74 3000d7e0: e3530000 cmp r3, #0 3000d7e4: 1a00000d bne 3000d820 3000d7e8: e1a00006 mov r0, r6 <== NOT EXECUTED } 3000d7ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { 3000d7f0: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000d7f4: 159f3040 ldrne r3, [pc, #64] ; 3000d83c if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 3000d7f8: 13a02001 movne r2, #1 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000d7fc: 15933000 ldrne r3, [r3] if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 3000d800: 1587207c strne r2, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000d804: 15873078 strne r3, [r7, #120] ; 0x78 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 3000d808: 0587307c streq r3, [r7, #124] ; 0x7c } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 3000d80c: e3160080 tst r6, #128 ; 0x80 3000d810: 0affffcf beq 3000d754 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 3000d814: e2040080 and r0, r4, #128 ; 0x80 3000d818: ebffee3c bl 30009110 <_CPU_ISR_Set_level> 3000d81c: eaffffcc b 3000d754 _Thread_Dispatch_necessary = true; 3000d820: e3a03001 mov r3, #1 3000d824: e5c93010 strb r3, [r9, #16] } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 3000d828: ebffe859 bl 30007994 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 3000d82c: e3a00000 mov r0, #0 3000d830: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 300087a0 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 300087a0: e92d4010 push {r4, lr} 300087a4: e24dd004 sub sp, sp, #4 300087a8: 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 ); 300087ac: e1a00001 mov r0, r1 300087b0: e1a0100d mov r1, sp 300087b4: eb001671 bl 3000e180 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 300087b8: e3500003 cmp r0, #3 300087bc: 0a000005 beq 300087d8 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 300087c0: e1a00004 mov r0, r4 <== NOT EXECUTED 300087c4: e3a01000 mov r1, #0 <== NOT EXECUTED 300087c8: e59d2000 ldr r2, [sp] <== NOT EXECUTED 300087cc: eb001986 bl 3000edec <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 300087d0: e28dd004 add sp, sp, #4 300087d4: 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 ); 300087d8: e1a00004 mov r0, r4 300087dc: e3a01001 mov r1, #1 300087e0: e59d2000 ldr r2, [sp] 300087e4: eb001980 bl 3000edec <_POSIX_Semaphore_Wait_support> 300087e8: eafffff8 b 300087d0 =============================================================================== 30005fe0 : struct sigaction *oact ) { ISR_Level level; if ( oact ) 30005fe0: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 30005fe4: 159f20c4 ldrne r2, [pc, #196] ; 300060b0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 30005fe8: e92d4070 push {r4, r5, r6, lr} 30005fec: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 30005ff0: 10801080 addne r1, r0, r0, lsl #1 30005ff4: 10822101 addne r2, r2, r1, lsl #2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 30005ff8: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 30005ffc: 18920007 ldmne r2, {r0, r1, r2} 30006000: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 30006004: e3540000 cmp r4, #0 30006008: 0a000023 beq 3000609c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 3000600c: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 30006010: e353001f cmp r3, #31 30006014: 8a000020 bhi 3000609c * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 30006018: e3540009 cmp r4, #9 3000601c: 0a00001e beq 3000609c /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 30006020: e3550000 cmp r5, #0 30006024: 0a00001a beq 30006094 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30006028: e10f6000 mrs r6, CPSR 3000602c: e3863080 orr r3, r6, #128 ; 0x80 30006030: e129f003 msr CPSR_fc, r3 * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { 30006034: e5953008 ldr r3, [r5, #8] 30006038: e3530000 cmp r3, #0 3000603c: 0a000009 beq 30006068 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 30006040: e1a00004 mov r0, r4 30006044: eb001740 bl 3000bd4c <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 30006048: e8950007 ldm r5, {r0, r1, r2} 3000604c: e59f305c ldr r3, [pc, #92] ; 300060b0 30006050: e0844084 add r4, r4, r4, lsl #1 30006054: e0834104 add r4, r3, r4, lsl #2 30006058: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000605c: e129f006 msr CPSR_fc, r6 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 30006060: e3a00000 mov r0, #0 30006064: e8bd8070 pop {r4, r5, r6, pc} * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 30006068: e59f2044 ldr r2, [pc, #68] ; 300060b4 3000606c: e0844084 add r4, r4, r4, lsl #1 30006070: e59f3038 ldr r3, [pc, #56] ; 300060b0 30006074: e1a04104 lsl r4, r4, #2 30006078: e0833004 add r3, r3, r4 3000607c: e0824004 add r4, r2, r4 30006080: e8940007 ldm r4, {r0, r1, r2} 30006084: e8830007 stm r3, {r0, r1, r2} 30006088: e129f006 msr CPSR_fc, r6 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 3000608c: e3a00000 mov r0, #0 30006090: e8bd8070 pop {r4, r5, r6, pc} 30006094: e1a00005 mov r0, r5 <== NOT EXECUTED } 30006098: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 3000609c: eb002395 bl 3000eef8 <__errno> 300060a0: e3a03016 mov r3, #22 300060a4: e5803000 str r3, [r0] 300060a8: e3e00000 mvn r0, #0 300060ac: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 30008904 : int sigwait( const sigset_t *set, int *sig ) { 30008904: e92d4010 push {r4, lr} 30008908: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 3000890c: e3a01000 mov r1, #0 30008910: e1a02001 mov r2, r1 30008914: ebffff7f bl 30008718 if ( status != -1 ) { 30008918: e3700001 cmn r0, #1 3000891c: 0a000005 beq 30008938 if ( sig ) 30008920: e3540000 cmp r4, #0 *sig = status; 30008924: 15840000 strne r0, [r4] return 0; 30008928: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 3000892c: 18bd8010 popne {r4, pc} *sig = status; return 0; 30008930: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 30008934: e8bd8010 pop {r4, pc} <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 30008938: eb0022f1 bl 30011504 <__errno> 3000893c: e5900000 ldr r0, [r0] 30008940: e8bd8010 pop {r4, pc}