=============================================================================== 00016b5c <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 16b5c: 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 ) { 16b60: 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 ) { 16b64: 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 ) { 16b68: e1a07000 mov r7, r0 16b6c: e1a05002 mov r5, r2 16b70: e1a08001 mov r8, r1 16b74: 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 ) { 16b78: 3a000016 bcc 16bd8 <_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 ) { 16b7c: e5906048 ldr r6, [r0, #72] ; 0x48 16b80: e3560000 cmp r6, #0 *count = 0; 16b84: 13a00000 movne r0, #0 16b88: 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 ) { 16b8c: 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 = 16b90: e1a00007 mov r0, r7 16b94: eb000b0d bl 197d0 <_Thread_queue_Dequeue> 16b98: e2504000 subs r4, r0, #0 16b9c: 0a00000a beq 16bcc <_CORE_message_queue_Broadcast+0x70> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 16ba0: e594002c ldr r0, [r4, #44] ; 0x2c 16ba4: e1a01008 mov r1, r8 16ba8: e1a02005 mov r2, r5 16bac: eb002465 bl 1fd48 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 16bb0: 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 = 16bb4: e1a00007 mov r0, r7 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 16bb8: 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 = 16bbc: eb000b03 bl 197d0 <_Thread_queue_Dequeue> 16bc0: e2504000 subs r4, r0, #0 _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 16bc4: 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 = 16bc8: 1afffff4 bne 16ba0 <_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; 16bcc: e58a6000 str r6, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 16bd0: e1a00004 mov r0, r4 16bd4: 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; 16bd8: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 16bdc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 0000b7c0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { b7c0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} b7c4: 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; b7c8: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { b7cc: e24dd01c sub sp, sp, #28 b7d0: 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 ) { b7d4: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { b7d8: 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 ) { b7dc: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { b7e0: 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; b7e4: 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 ) { b7e8: 2a00007a bcs b9d8 <_Heap_Allocate_aligned_with_boundary+0x218> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { b7ec: e3530000 cmp r3, #0 b7f0: 1a000076 bne b9d0 <_Heap_Allocate_aligned_with_boundary+0x210> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } b7f4: 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 ) { b7f8: e1570009 cmp r7, r9 b7fc: 0a000075 beq b9d8 <_Heap_Allocate_aligned_with_boundary+0x218> 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 b800: e59d300c ldr r3, [sp, #12] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; b804: 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 b808: e2833007 add r3, r3, #7 b80c: e58d3010 str r3, [sp, #16] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; b810: e58d1014 str r1, [sp, #20] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { b814: e3a06001 mov r6, #1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { b818: e599a004 ldr sl, [r9, #4] b81c: e59d2000 ldr r2, [sp] b820: e152000a cmp r2, sl b824: 2a000050 bcs b96c <_Heap_Allocate_aligned_with_boundary+0x1ac> if ( alignment == 0 ) { b828: 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; b82c: 02894008 addeq r4, r9, #8 b830: 0a000053 beq b984 <_Heap_Allocate_aligned_with_boundary+0x1c4> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } b834: 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; b838: 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; b83c: 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; b840: 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; b844: 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; b848: e081400a add r4, r1, sl if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } b84c: 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; b850: e0633002 rsb r3, r3, r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); b854: 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 b858: e083a00a add sl, r3, sl b85c: 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; b860: e2893008 add r3, r9, #8 b864: e58d3008 str r3, [sp, #8] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); b868: eb0016ab bl 1131c <__umodsi3> b86c: 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 ) { b870: e15a0004 cmp sl, r4 b874: 2a000003 bcs b888 <_Heap_Allocate_aligned_with_boundary+0xc8> b878: e1a0000a mov r0, sl b87c: e1a01008 mov r1, r8 b880: eb0016a5 bl 1131c <__umodsi3> b884: e060400a rsb r4, r0, sl } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { b888: e35b0000 cmp fp, #0 b88c: 0a000026 beq b92c <_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; b890: e084a005 add sl, r4, r5 b894: e1a0000a mov r0, sl b898: e1a0100b mov r1, fp b89c: eb00169e bl 1131c <__umodsi3> b8a0: 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 ) { b8a4: e15a0000 cmp sl, r0 b8a8: 93a0a000 movls sl, #0 b8ac: 83a0a001 movhi sl, #1 b8b0: e1540000 cmp r4, r0 b8b4: 23a0a000 movcs sl, #0 b8b8: e35a0000 cmp sl, #0 b8bc: 0a00001a beq b92c <_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; b8c0: e59d1008 ldr r1, [sp, #8] b8c4: 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 ) { b8c8: e1530000 cmp r3, r0 b8cc: 958d9018 strls r9, [sp, #24] b8d0: 91a09003 movls r9, r3 b8d4: 9a000002 bls b8e4 <_Heap_Allocate_aligned_with_boundary+0x124> b8d8: ea000023 b b96c <_Heap_Allocate_aligned_with_boundary+0x1ac> b8dc: e1590000 cmp r9, r0 b8e0: 8a00003e bhi b9e0 <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size; b8e4: e0654000 rsb r4, r5, r0 b8e8: e1a01008 mov r1, r8 b8ec: e1a00004 mov r0, r4 b8f0: eb001689 bl 1131c <__umodsi3> b8f4: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; b8f8: e084a005 add sl, r4, r5 b8fc: e1a0000a mov r0, sl b900: e1a0100b mov r1, fp b904: eb001684 bl 1131c <__umodsi3> b908: 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 ) { b90c: e15a0000 cmp sl, r0 b910: 93a0a000 movls sl, #0 b914: 83a0a001 movhi sl, #1 b918: e1540000 cmp r4, r0 b91c: 23a0a000 movcs sl, #0 b920: e35a0000 cmp sl, #0 b924: 1affffec bne b8dc <_Heap_Allocate_aligned_with_boundary+0x11c> b928: 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 ) { b92c: e59d2008 ldr r2, [sp, #8] b930: e1520004 cmp r2, r4 b934: 8a00000c bhi b96c <_Heap_Allocate_aligned_with_boundary+0x1ac> b938: e59d100c ldr r1, [sp, #12] b93c: e1a00004 mov r0, r4 b940: eb001675 bl 1131c <__umodsi3> b944: e269a4ff rsb sl, r9, #-16777216 ; 0xff000000 b948: e28aa8ff add sl, sl, #16711680 ; 0xff0000 b94c: e28aacff add sl, sl, #65280 ; 0xff00 b950: e28aa0f8 add sl, sl, #248 ; 0xf8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); b954: 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 ) { b958: e59d1004 ldr r1, [sp, #4] b95c: e060300a rsb r3, r0, sl b960: e15a0000 cmp sl, r0 b964: 11510003 cmpne r1, r3 b968: 9a000005 bls b984 <_Heap_Allocate_aligned_with_boundary+0x1c4> if ( alloc_begin != 0 ) { break; } block = block->next; b96c: e5999008 ldr r9, [r9, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { b970: e1570009 cmp r7, r9 if ( alloc_begin != 0 ) { break; } block = block->next; b974: 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 ) { b978: 0a00001d beq b9f4 <_Heap_Allocate_aligned_with_boundary+0x234> b97c: e1a06003 mov r6, r3 b980: eaffffa4 b b818 <_Heap_Allocate_aligned_with_boundary+0x58> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { b984: e3540000 cmp r4, #0 b988: 0afffff7 beq b96c <_Heap_Allocate_aligned_with_boundary+0x1ac> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; b98c: e2872048 add r2, r7, #72 ; 0x48 b990: e892000c ldm r2, {r2, r3} b994: e2822001 add r2, r2, #1 stats->searches += search_count; b998: 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; b99c: e5872048 str r2, [r7, #72] ; 0x48 stats->searches += search_count; b9a0: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); b9a4: e1a00007 mov r0, r7 b9a8: e1a01009 mov r1, r9 b9ac: e1a02004 mov r2, r4 b9b0: e1a03005 mov r3, r5 b9b4: ebffeb8b bl 67e8 <_Heap_Block_allocate> b9b8: e1a00004 mov r0, r4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { b9bc: e5973044 ldr r3, [r7, #68] ; 0x44 b9c0: e1530006 cmp r3, r6 stats->max_search = search_count; b9c4: 35876044 strcc r6, [r7, #68] ; 0x44 } return (void *) alloc_begin; } b9c8: e28dd01c add sp, sp, #28 b9cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { b9d0: e1550003 cmp r5, r3 b9d4: 9a000008 bls b9fc <_Heap_Allocate_aligned_with_boundary+0x23c> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { b9d8: e3a00000 mov r0, #0 b9dc: eafffff9 b b9c8 <_Heap_Allocate_aligned_with_boundary+0x208> b9e0: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; b9e4: 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 ) { b9e8: e1570009 cmp r7, r9 <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; b9ec: e2863001 add r3, r6, #1 <== 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 ) { b9f0: 1affffe1 bne b97c <_Heap_Allocate_aligned_with_boundary+0x1bc><== NOT EXECUTED b9f4: e3a00000 mov r0, #0 b9f8: eaffffef b b9bc <_Heap_Allocate_aligned_with_boundary+0x1fc> if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { alignment = page_size; b9fc: e3580000 cmp r8, #0 ba00: 01a08002 moveq r8, r2 ba04: eaffff7a b b7f4 <_Heap_Allocate_aligned_with_boundary+0x34> =============================================================================== 0000ba08 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ba08: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} ba0c: e1a04000 mov r4, r0 ba10: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ba14: e1a00001 mov r0, r1 ba18: e5941010 ldr r1, [r4, #16] ba1c: eb00163e bl 1131c <__umodsi3> ba20: 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 ba24: 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); ba28: 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; ba2c: e1550003 cmp r5, r3 ba30: 3a00002f bcc baf4 <_Heap_Free+0xec> ba34: e5941024 ldr r1, [r4, #36] ; 0x24 ba38: e1550001 cmp r5, r1 ba3c: 8a00002c bhi baf4 <_Heap_Free+0xec> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ba40: 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; ba44: 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); ba48: 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; ba4c: e1530002 cmp r3, r2 ba50: 8a000027 bhi baf4 <_Heap_Free+0xec> ba54: e1510002 cmp r1, r2 ba58: 3a000027 bcc bafc <_Heap_Free+0xf4> ba5c: 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 ) ) { ba60: e2170001 ands r0, r7, #1 ba64: 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 )); ba68: 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; ba6c: e3c77001 bic r7, r7, #1 ba70: 03a08000 moveq r8, #0 ba74: 0a000004 beq ba8c <_Heap_Free+0x84> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ba78: 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; ba7c: e5900004 ldr r0, [r0, #4] return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ba80: e3100001 tst r0, #1 ba84: 13a08000 movne r8, #0 ba88: 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 ) ) { ba8c: e21c0001 ands r0, ip, #1 ba90: 1a00001b bne bb04 <_Heap_Free+0xfc> uintptr_t const prev_size = block->prev_size; ba94: 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); ba98: 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; ba9c: e153000a cmp r3, sl baa0: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc} baa4: e151000a cmp r1, sl baa8: 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; baac: 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) ) { bab0: e2100001 ands r0, r0, #1 bab4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ bab8: e3580000 cmp r8, #0 babc: 0a000039 beq bba8 <_Heap_Free+0x1a0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; bac0: 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; bac4: e0867007 add r7, r6, r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bac8: 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; bacc: e087c00c add ip, r7, ip --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bad0: 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; bad4: e2400001 sub r0, r0, #1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; bad8: 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; badc: e5823008 str r3, [r2, #8] next->prev = prev; bae0: 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; bae4: e5840038 str r0, [r4, #56] ; 0x38 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; bae8: 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; baec: e78ac00c str ip, [sl, ip] baf0: ea00000f b bb34 <_Heap_Free+0x12c> _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; baf4: e3a00000 mov r0, #0 baf8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} bafc: e3a00000 mov r0, #0 <== NOT EXECUTED --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bb00: 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 */ bb04: e3580000 cmp r8, #0 bb08: 0a000014 beq bb60 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bb0c: 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; bb10: e0877006 add r7, r7, r6 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bb14: 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; bb18: e3871001 orr r1, r7, #1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; bb1c: e5853008 str r3, [r5, #8] new_block->prev = prev; bb20: e585200c str r2, [r5, #12] next->prev = new_block; prev->next = new_block; bb24: e5825008 str r5, [r2, #8] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; bb28: e583500c str r5, [r3, #12] bb2c: e5851004 str r1, [r5, #4] next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; bb30: e7857007 str r7, [r5, r7] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; bb34: e5942040 ldr r2, [r4, #64] ; 0x40 ++stats->frees; bb38: e5943050 ldr r3, [r4, #80] ; 0x50 stats->free_size += block_size; bb3c: e5941030 ldr r1, [r4, #48] ; 0x30 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; bb40: e2422001 sub r2, r2, #1 ++stats->frees; bb44: e2833001 add r3, r3, #1 stats->free_size += block_size; bb48: e0816006 add r6, r1, r6 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; bb4c: e5842040 str r2, [r4, #64] ; 0x40 ++stats->frees; bb50: e5843050 str r3, [r4, #80] ; 0x50 stats->free_size += block_size; bb54: e5846030 str r6, [r4, #48] ; 0x30 return( true ); bb58: e3a00001 mov r0, #1 bb5c: 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; bb60: e3863001 orr r3, r6, #1 bb64: e5853004 str r3, [r5, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; bb68: e2843038 add r3, r4, #56 ; 0x38 bb6c: e8931008 ldm r3, {r3, ip} } 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; bb70: 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; bb74: e5941008 ldr r1, [r4, #8] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; bb78: 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; bb7c: e3c00001 bic r0, r0, #1 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { bb80: e153000c cmp r3, ip new_block->next = next; bb84: e5851008 str r1, [r5, #8] new_block->prev = block_before; bb88: 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; bb8c: e5820004 str r0, [r2, #4] block_before->next = new_block; next->prev = new_block; bb90: e581500c str r5, [r1, #12] next_block->prev_size = block_size; bb94: 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; bb98: e5845008 str r5, [r4, #8] /* Statistics */ ++stats->free_blocks; bb9c: e5843038 str r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; bba0: 8584303c strhi r3, [r4, #60] ; 0x3c bba4: eaffffe2 b bb34 <_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; bba8: e086c00c add ip, r6, ip prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; bbac: e38c3001 orr r3, ip, #1 bbb0: e58a3004 str r3, [sl, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; bbb4: e5923004 ldr r3, [r2, #4] bbb8: e3c33001 bic r3, r3, #1 bbbc: e5823004 str r3, [r2, #4] next_block->prev_size = size; bbc0: e785c006 str ip, [r5, r6] bbc4: eaffffda b bb34 <_Heap_Free+0x12c> =============================================================================== 00013148 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 13148: e92d40f0 push {r4, r5, r6, r7, lr} 1314c: e1a04000 mov r4, r0 13150: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 13154: e1a00001 mov r0, r1 13158: e5941010 ldr r1, [r4, #16] 1315c: e1a07002 mov r7, r2 13160: ebfff86d bl 1131c <__umodsi3> 13164: 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 13168: 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); 1316c: 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; 13170: e1500003 cmp r0, r3 13174: 3a000010 bcc 131bc <_Heap_Size_of_alloc_area+0x74> 13178: e5942024 ldr r2, [r4, #36] ; 0x24 1317c: e1500002 cmp r0, r2 13180: 8a00000d bhi 131bc <_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; 13184: e5906004 ldr r6, [r0, #4] 13188: 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); 1318c: 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; 13190: e1530006 cmp r3, r6 13194: 8a000008 bhi 131bc <_Heap_Size_of_alloc_area+0x74> 13198: e1520006 cmp r2, r6 1319c: 3a000008 bcc 131c4 <_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; 131a0: 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 ) 131a4: e2100001 ands r0, r0, #1 ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 131a8: 12655004 rsbne r5, r5, #4 131ac: 10856006 addne r6, r5, r6 131b0: 15876000 strne r6, [r7] return true; 131b4: 13a00001 movne r0, #1 131b8: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 131bc: e3a00000 mov r0, #0 131c0: e8bd80f0 pop {r4, r5, r6, r7, pc} 131c4: e3a00000 mov r0, #0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 131c8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00007558 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 7558: 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() ) ) { 755c: e59f35cc ldr r3, [pc, #1484] ; 7b30 <_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; 7560: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 7564: 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; 7568: e59f25c4 ldr r2, [pc, #1476] ; 7b34 <_Heap_Walk+0x5dc> 756c: e59f95c4 ldr r9, [pc, #1476] ; 7b38 <_Heap_Walk+0x5e0> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 7570: 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; 7574: 11a09002 movne r9, r2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 7578: 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() ) ) { 757c: 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; 7580: e5902014 ldr r2, [r0, #20] Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 7584: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 7588: e24dd038 sub sp, sp, #56 ; 0x38 758c: e1a04000 mov r4, r0 uintptr_t const page_size = heap->page_size; 7590: e58d1024 str r1, [sp, #36] ; 0x24 uintptr_t const min_block_size = heap->min_block_size; 7594: e58d2028 str r2, [sp, #40] ; 0x28 Heap_Block *const first_block = heap->first_block; 7598: e5908020 ldr r8, [r0, #32] Heap_Block *const last_block = heap->last_block; 759c: 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() ) ) { 75a0: 0a000002 beq 75b0 <_Heap_Walk+0x58> } block = next_block; } while ( block != first_block ); return true; 75a4: e3a00001 mov r0, #1 } 75a8: e28dd038 add sp, sp, #56 ; 0x38 75ac: 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)( 75b0: e594101c ldr r1, [r4, #28] 75b4: e5900018 ldr r0, [r0, #24] 75b8: e2842008 add r2, r4, #8 75bc: e892000c ldm r2, {r2, r3} 75c0: e59dc028 ldr ip, [sp, #40] ; 0x28 75c4: e58d1008 str r1, [sp, #8] 75c8: e59d102c ldr r1, [sp, #44] ; 0x2c 75cc: e58d0004 str r0, [sp, #4] 75d0: e58d1010 str r1, [sp, #16] 75d4: e58d2014 str r2, [sp, #20] 75d8: e58d3018 str r3, [sp, #24] 75dc: e59f2558 ldr r2, [pc, #1368] ; 7b3c <_Heap_Walk+0x5e4> 75e0: e58dc000 str ip, [sp] 75e4: e58d800c str r8, [sp, #12] 75e8: e1a0000a mov r0, sl 75ec: e3a01000 mov r1, #0 75f0: e59d3024 ldr r3, [sp, #36] ; 0x24 75f4: e1a0e00f mov lr, pc 75f8: e12fff19 bx r9 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 75fc: e59d2024 ldr r2, [sp, #36] ; 0x24 7600: e3520000 cmp r2, #0 7604: 0a000026 beq 76a4 <_Heap_Walk+0x14c> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 7608: e59d3024 ldr r3, [sp, #36] ; 0x24 760c: e2135007 ands r5, r3, #7 7610: 1a00002a bne 76c0 <_Heap_Walk+0x168> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7614: e59d0028 ldr r0, [sp, #40] ; 0x28 7618: e59d1024 ldr r1, [sp, #36] ; 0x24 761c: ebffe55f bl ba0 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 7620: e250b000 subs fp, r0, #0 7624: 1a00002c bne 76dc <_Heap_Walk+0x184> 7628: e2880008 add r0, r8, #8 762c: e59d1024 ldr r1, [sp, #36] ; 0x24 7630: ebffe55a bl ba0 <__umodsi3> ); return false; } if ( 7634: e2506000 subs r6, r0, #0 7638: 1a00002f bne 76fc <_Heap_Walk+0x1a4> block = next_block; } while ( block != first_block ); return true; } 763c: e598b004 ldr fp, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 7640: e21b5001 ands r5, fp, #1 7644: 0a0000cd beq 7980 <_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; 7648: e59dc02c ldr ip, [sp, #44] ; 0x2c 764c: e59c3004 ldr r3, [ip, #4] 7650: 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); 7654: 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; 7658: e5935004 ldr r5, [r3, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 765c: e2155001 ands r5, r5, #1 7660: 0a000008 beq 7688 <_Heap_Walk+0x130> ); return false; } if ( 7664: e1580003 cmp r8, r3 7668: 0a00002b beq 771c <_Heap_Walk+0x1c4> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 766c: e1a0000a mov r0, sl <== NOT EXECUTED 7670: e3a01001 mov r1, #1 <== NOT EXECUTED 7674: e59f24c4 ldr r2, [pc, #1220] ; 7b40 <_Heap_Walk+0x5e8> <== NOT EXECUTED 7678: e1a0e00f mov lr, pc <== NOT EXECUTED 767c: 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; 7680: e1a00006 mov r0, r6 <== NOT EXECUTED 7684: eaffffc7 b 75a8 <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 7688: e1a0000a mov r0, sl 768c: e3a01001 mov r1, #1 7690: e59f24ac ldr r2, [pc, #1196] ; 7b44 <_Heap_Walk+0x5ec> 7694: e1a0e00f mov lr, pc 7698: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 769c: e1a00005 mov r0, r5 76a0: eaffffc0 b 75a8 <_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" ); 76a4: e1a0000a mov r0, sl 76a8: e3a01001 mov r1, #1 76ac: e59f2494 ldr r2, [pc, #1172] ; 7b48 <_Heap_Walk+0x5f0> 76b0: e1a0e00f mov lr, pc 76b4: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 76b8: e59d0024 ldr r0, [sp, #36] ; 0x24 76bc: eaffffb9 b 75a8 <_Heap_Walk+0x50> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 76c0: e1a0000a mov r0, sl 76c4: e3a01001 mov r1, #1 76c8: e59f247c ldr r2, [pc, #1148] ; 7b4c <_Heap_Walk+0x5f4> 76cc: e1a0e00f mov lr, pc 76d0: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 76d4: e3a00000 mov r0, #0 76d8: eaffffb2 b 75a8 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 76dc: e1a0000a mov r0, sl 76e0: e3a01001 mov r1, #1 76e4: e59f2464 ldr r2, [pc, #1124] ; 7b50 <_Heap_Walk+0x5f8> 76e8: e59d3028 ldr r3, [sp, #40] ; 0x28 76ec: e1a0e00f mov lr, pc 76f0: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 76f4: e1a00005 mov r0, r5 76f8: eaffffaa b 75a8 <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 76fc: e1a0000a mov r0, sl 7700: e3a01001 mov r1, #1 7704: e59f2448 ldr r2, [pc, #1096] ; 7b54 <_Heap_Walk+0x5fc> 7708: e1a03008 mov r3, r8 770c: e1a0e00f mov lr, pc 7710: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7714: e1a0000b mov r0, fp 7718: eaffffa2 b 75a8 <_Heap_Walk+0x50> block = next_block; } while ( block != first_block ); return true; } 771c: e5945008 ldr r5, [r4, #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 ) { 7720: e1540005 cmp r4, r5 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 7724: 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 ) { 7728: 05943020 ldreq r3, [r4, #32] 772c: 0a00000d beq 7768 <_Heap_Walk+0x210> block = next_block; } while ( block != first_block ); return true; } 7730: 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; 7734: e1530005 cmp r3, r5 7738: 9a000097 bls 799c <_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)( 773c: e1a0000a mov r0, sl 7740: e3a01001 mov r1, #1 7744: e59f240c ldr r2, [pc, #1036] ; 7b58 <_Heap_Walk+0x600> 7748: e1a03005 mov r3, r5 774c: e1a0e00f mov lr, pc 7750: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7754: e3a00000 mov r0, #0 7758: eaffff92 b 75a8 <_Heap_Walk+0x50> 775c: e1a03008 mov r3, r8 7760: e28d8030 add r8, sp, #48 ; 0x30 7764: e8980900 ldm r8, {r8, fp} ); return false; } if ( _Heap_Is_used( free_block ) ) { 7768: 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; 776c: 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); 7770: 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; 7774: e1530005 cmp r3, r5 7778: 9a000008 bls 77a0 <_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)( 777c: e1a0000a mov r0, sl 7780: e58d5000 str r5, [sp] 7784: e3a01001 mov r1, #1 7788: e59f23cc ldr r2, [pc, #972] ; 7b5c <_Heap_Walk+0x604> 778c: e1a03006 mov r3, r6 7790: e1a0e00f mov lr, pc 7794: e12fff19 bx r9 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 7798: e3a00000 mov r0, #0 779c: eaffff81 b 75a8 <_Heap_Walk+0x50> 77a0: e5943024 ldr r3, [r4, #36] ; 0x24 77a4: e1530005 cmp r3, r5 77a8: 3afffff3 bcc 777c <_Heap_Walk+0x224> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 77ac: e59d1024 ldr r1, [sp, #36] ; 0x24 77b0: e1a00007 mov r0, r7 77b4: ebffe4f9 bl ba0 <__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; 77b8: e59d102c ldr r1, [sp, #44] ; 0x2c 77bc: e0563001 subs r3, r6, r1 77c0: 13a03001 movne r3, #1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 77c4: e3500000 cmp r0, #0 77c8: 0a000001 beq 77d4 <_Heap_Walk+0x27c> 77cc: e3530000 cmp r3, #0 77d0: 1a0000aa bne 7a80 <_Heap_Walk+0x528> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 77d4: e59d2028 ldr r2, [sp, #40] ; 0x28 77d8: e1520007 cmp r2, r7 77dc: 9a000001 bls 77e8 <_Heap_Walk+0x290> 77e0: e3530000 cmp r3, #0 77e4: 1a0000ae bne 7aa4 <_Heap_Walk+0x54c> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 77e8: e1560005 cmp r6, r5 77ec: 3a000001 bcc 77f8 <_Heap_Walk+0x2a0> 77f0: e3530000 cmp r3, #0 77f4: 1a0000b4 bne 7acc <_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; 77f8: e5953004 ldr r3, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 77fc: e3130001 tst r3, #1 7800: e20bb001 and fp, fp, #1 7804: 0a000018 beq 786c <_Heap_Walk+0x314> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 7808: e35b0000 cmp fp, #0 780c: 0a00000c beq 7844 <_Heap_Walk+0x2ec> (*printer)( 7810: e58d7000 str r7, [sp] 7814: e1a0000a mov r0, sl 7818: e3a01000 mov r1, #0 781c: e59f233c ldr r2, [pc, #828] ; 7b60 <_Heap_Walk+0x608> 7820: e1a03006 mov r3, r6 7824: e1a0e00f mov lr, pc 7828: e12fff19 bx r9 block->prev_size ); } block = next_block; } while ( block != first_block ); 782c: e1580005 cmp r8, r5 7830: 0affff5b beq 75a4 <_Heap_Walk+0x4c> 7834: e595b004 ldr fp, [r5, #4] 7838: e5943020 ldr r3, [r4, #32] 783c: e1a06005 mov r6, r5 7840: eaffffc9 b 776c <_Heap_Walk+0x214> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 7844: e58d7000 str r7, [sp] 7848: e5963000 ldr r3, [r6] 784c: e1a0000a mov r0, sl 7850: e58d3004 str r3, [sp, #4] 7854: e1a0100b mov r1, fp 7858: e59f2304 ldr r2, [pc, #772] ; 7b64 <_Heap_Walk+0x60c> 785c: e1a03006 mov r3, r6 7860: e1a0e00f mov lr, pc 7864: e12fff19 bx r9 7868: eaffffef b 782c <_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 ? 786c: 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)( 7870: e5943008 ldr r3, [r4, #8] 7874: e1530002 cmp r3, r2 block = next_block; } while ( block != first_block ); return true; } 7878: 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)( 787c: 059f02e4 ldreq r0, [pc, #740] ; 7b68 <_Heap_Walk+0x610> 7880: 0a000003 beq 7894 <_Heap_Walk+0x33c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 7884: e59f32e0 ldr r3, [pc, #736] ; 7b6c <_Heap_Walk+0x614> 7888: e1540002 cmp r4, r2 788c: e59f02dc ldr r0, [pc, #732] ; 7b70 <_Heap_Walk+0x618> 7890: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 7894: 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)( 7898: e1510003 cmp r1, r3 789c: 059f12d0 ldreq r1, [pc, #720] ; 7b74 <_Heap_Walk+0x61c> 78a0: 0a000003 beq 78b4 <_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)" : "") 78a4: e59fc2cc ldr ip, [pc, #716] ; 7b78 <_Heap_Walk+0x620> 78a8: e1540003 cmp r4, r3 78ac: e59f12bc ldr r1, [pc, #700] ; 7b70 <_Heap_Walk+0x618> 78b0: 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)( 78b4: e58d2004 str r2, [sp, #4] 78b8: e58d0008 str r0, [sp, #8] 78bc: e58d300c str r3, [sp, #12] 78c0: e58d1010 str r1, [sp, #16] 78c4: e1a03006 mov r3, r6 78c8: e58d7000 str r7, [sp] 78cc: e1a0000a mov r0, sl 78d0: e3a01000 mov r1, #0 78d4: e59f22a0 ldr r2, [pc, #672] ; 7b7c <_Heap_Walk+0x624> 78d8: e1a0e00f mov lr, pc 78dc: e12fff19 bx r9 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 78e0: e5953000 ldr r3, [r5] 78e4: e1570003 cmp r7, r3 78e8: 1a000011 bne 7934 <_Heap_Walk+0x3dc> ); return false; } if ( !prev_used ) { 78ec: e35b0000 cmp fp, #0 78f0: 0a00001a beq 7960 <_Heap_Walk+0x408> block = next_block; } while ( block != first_block ); return true; } 78f4: 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 ) { 78f8: e1540003 cmp r4, r3 78fc: 0a000004 beq 7914 <_Heap_Walk+0x3bc> if ( free_block == block ) { 7900: e1560003 cmp r6, r3 7904: 0affffc8 beq 782c <_Heap_Walk+0x2d4> return true; } free_block = free_block->next; 7908: 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 ) { 790c: e1540003 cmp r4, r3 7910: 1afffffa bne 7900 <_Heap_Walk+0x3a8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 7914: e1a0000a mov r0, sl 7918: e3a01001 mov r1, #1 791c: e59f225c ldr r2, [pc, #604] ; 7b80 <_Heap_Walk+0x628> 7920: e1a03006 mov r3, r6 7924: e1a0e00f mov lr, pc 7928: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 792c: e3a00000 mov r0, #0 7930: eaffff1c b 75a8 <_Heap_Walk+0x50> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 7934: e58d3004 str r3, [sp, #4] 7938: e1a0000a mov r0, sl 793c: e58d7000 str r7, [sp] 7940: e58d5008 str r5, [sp, #8] 7944: e3a01001 mov r1, #1 7948: e59f2234 ldr r2, [pc, #564] ; 7b84 <_Heap_Walk+0x62c> 794c: e1a03006 mov r3, r6 7950: e1a0e00f mov lr, pc 7954: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7958: e3a00000 mov r0, #0 795c: eaffff11 b 75a8 <_Heap_Walk+0x50> return false; } if ( !prev_used ) { (*printer)( 7960: e1a0000a mov r0, sl 7964: e3a01001 mov r1, #1 7968: e59f2218 ldr r2, [pc, #536] ; 7b88 <_Heap_Walk+0x630> 796c: e1a03006 mov r3, r6 7970: e1a0e00f mov lr, pc 7974: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7978: e1a0000b mov r0, fp 797c: eaffff09 b 75a8 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 7980: e1a0000a mov r0, sl 7984: e3a01001 mov r1, #1 7988: e59f21fc ldr r2, [pc, #508] ; 7b8c <_Heap_Walk+0x634> 798c: e1a0e00f mov lr, pc 7990: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7994: e1a00005 mov r0, r5 7998: eaffff02 b 75a8 <_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; 799c: e594c024 ldr ip, [r4, #36] ; 0x24 79a0: e15c0005 cmp ip, r5 79a4: 3affff64 bcc 773c <_Heap_Walk+0x1e4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 79a8: e2850008 add r0, r5, #8 79ac: e1a01007 mov r1, r7 79b0: e58d3020 str r3, [sp, #32] 79b4: e58dc01c str ip, [sp, #28] 79b8: ebffe478 bl ba0 <__umodsi3> ); return false; } if ( 79bc: e3500000 cmp r0, #0 79c0: e59d3020 ldr r3, [sp, #32] 79c4: e59dc01c ldr ip, [sp, #28] 79c8: 1a000048 bne 7af0 <_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; 79cc: e5952004 ldr r2, [r5, #4] 79d0: e3c22001 bic r2, r2, #1 block = next_block; } while ( block != first_block ); return true; } 79d4: 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; 79d8: e5922004 ldr r2, [r2, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 79dc: e3120001 tst r2, #1 79e0: 1a00004a bne 7b10 <_Heap_Walk+0x5b8> 79e4: e58d8030 str r8, [sp, #48] ; 0x30 79e8: e58db034 str fp, [sp, #52] ; 0x34 79ec: e1a01004 mov r1, r4 79f0: e1a06005 mov r6, r5 79f4: e1a08003 mov r8, r3 79f8: e1a0b00c mov fp, ip 79fc: ea000013 b 7a50 <_Heap_Walk+0x4f8> return false; } prev_block = free_block; free_block = free_block->next; 7a00: 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 ) { 7a04: e1540005 cmp r4, r5 7a08: 0affff53 beq 775c <_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; 7a0c: e1580005 cmp r8, r5 7a10: 8affff49 bhi 773c <_Heap_Walk+0x1e4> 7a14: e155000b cmp r5, fp RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7a18: e2850008 add r0, r5, #8 7a1c: 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; 7a20: 8affff45 bhi 773c <_Heap_Walk+0x1e4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7a24: ebffe45d bl ba0 <__umodsi3> ); return false; } if ( 7a28: e3500000 cmp r0, #0 7a2c: 1a00002f bne 7af0 <_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; 7a30: e5953004 ldr r3, [r5, #4] 7a34: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 7a38: 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; 7a3c: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 7a40: e3130001 tst r3, #1 7a44: 1a000031 bne 7b10 <_Heap_Walk+0x5b8> 7a48: e1a01006 mov r1, r6 7a4c: e1a06005 mov r6, r5 ); return false; } if ( free_block->prev != prev_block ) { 7a50: e595200c ldr r2, [r5, #12] 7a54: e1520001 cmp r2, r1 7a58: 0affffe8 beq 7a00 <_Heap_Walk+0x4a8> (*printer)( 7a5c: e58d2000 str r2, [sp] 7a60: e1a0000a mov r0, sl 7a64: e3a01001 mov r1, #1 7a68: e59f2120 ldr r2, [pc, #288] ; 7b90 <_Heap_Walk+0x638> 7a6c: e1a03005 mov r3, r5 7a70: e1a0e00f mov lr, pc 7a74: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7a78: e3a00000 mov r0, #0 7a7c: eafffec9 b 75a8 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 7a80: e1a0000a mov r0, sl 7a84: e58d7000 str r7, [sp] 7a88: e3a01001 mov r1, #1 7a8c: e59f2100 ldr r2, [pc, #256] ; 7b94 <_Heap_Walk+0x63c> 7a90: e1a03006 mov r3, r6 7a94: e1a0e00f mov lr, pc 7a98: e12fff19 bx r9 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 7a9c: e3a00000 mov r0, #0 7aa0: eafffec0 b 75a8 <_Heap_Walk+0x50> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 7aa4: e58d2004 str r2, [sp, #4] 7aa8: e1a0000a mov r0, sl 7aac: e58d7000 str r7, [sp] 7ab0: e3a01001 mov r1, #1 7ab4: e59f20dc ldr r2, [pc, #220] ; 7b98 <_Heap_Walk+0x640> 7ab8: e1a03006 mov r3, r6 7abc: e1a0e00f mov lr, pc 7ac0: e12fff19 bx r9 block, block_size, min_block_size ); return false; 7ac4: e3a00000 mov r0, #0 7ac8: eafffeb6 b 75a8 <_Heap_Walk+0x50> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 7acc: e1a0000a mov r0, sl 7ad0: e58d5000 str r5, [sp] 7ad4: e3a01001 mov r1, #1 7ad8: e59f20bc ldr r2, [pc, #188] ; 7b9c <_Heap_Walk+0x644> 7adc: e1a03006 mov r3, r6 7ae0: e1a0e00f mov lr, pc 7ae4: e12fff19 bx r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 7ae8: e3a00000 mov r0, #0 7aec: eafffead b 75a8 <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 7af0: e1a0000a mov r0, sl 7af4: e3a01001 mov r1, #1 7af8: e59f20a0 ldr r2, [pc, #160] ; 7ba0 <_Heap_Walk+0x648> 7afc: e1a03005 mov r3, r5 7b00: e1a0e00f mov lr, pc 7b04: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7b08: e3a00000 mov r0, #0 7b0c: eafffea5 b 75a8 <_Heap_Walk+0x50> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 7b10: e1a0000a mov r0, sl 7b14: e3a01001 mov r1, #1 7b18: e59f2084 ldr r2, [pc, #132] ; 7ba4 <_Heap_Walk+0x64c> 7b1c: e1a03005 mov r3, r5 7b20: e1a0e00f mov lr, pc 7b24: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7b28: e3a00000 mov r0, #0 7b2c: eafffe9d b 75a8 <_Heap_Walk+0x50> =============================================================================== 00006a34 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 6a34: 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 ) 6a38: e5904034 ldr r4, [r0, #52] ; 0x34 6a3c: e3540000 cmp r4, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 6a40: e24dd014 sub sp, sp, #20 6a44: 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 ); 6a48: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6a4c: 0a00009b beq 6cc0 <_Objects_Extend_information+0x28c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 6a50: e1d081b4 ldrh r8, [r0, #20] 6a54: e1d0a1b0 ldrh sl, [r0, #16] 6a58: e1a01008 mov r1, r8 6a5c: e1a0000a mov r0, sl 6a60: eb0029e7 bl 11204 <__aeabi_uidiv> 6a64: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 6a68: e1b03823 lsrs r3, r3, #16 6a6c: 0a000099 beq 6cd8 <_Objects_Extend_information+0x2a4> if ( information->object_blocks[ block ] == NULL ) { 6a70: e5949000 ldr r9, [r4] 6a74: e3590000 cmp r9, #0 6a78: 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 ); 6a7c: 01a06007 moveq r6, r7 index_base = minimum_index; block = 0; 6a80: 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 ) { 6a84: 0a00000c beq 6abc <_Objects_Extend_information+0x88> 6a88: e1a02004 mov r2, r4 6a8c: 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 ); 6a90: e1a06007 mov r6, r7 index_base = minimum_index; block = 0; 6a94: e3a04000 mov r4, #0 6a98: ea000002 b 6aa8 <_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 ) { 6a9c: e5b29004 ldr r9, [r2, #4]! 6aa0: e3590000 cmp r9, #0 6aa4: 0a000004 beq 6abc <_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++ ) { 6aa8: e2844001 add r4, r4, #1 6aac: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 6ab0: 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++ ) { 6ab4: 8afffff8 bhi 6a9c <_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; 6ab8: e3a09001 mov r9, #1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 6abc: 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 ) { 6ac0: e35a0801 cmp sl, #65536 ; 0x10000 6ac4: 2a000063 bcs 6c58 <_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 ) { 6ac8: 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; 6acc: e5950018 ldr r0, [r5, #24] if ( information->auto_extend ) { 6ad0: 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; 6ad4: e0000091 mul r0, r1, r0 if ( information->auto_extend ) { 6ad8: 1a000060 bne 6c60 <_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 ); 6adc: e58d3000 str r3, [sp] 6ae0: eb000877 bl 8cc4 <_Workspace_Allocate_or_fatal_error> 6ae4: e59d3000 ldr r3, [sp] 6ae8: e1a08000 mov r8, r0 } /* * Do we need to grow the tables? */ if ( do_extend ) { 6aec: e3590000 cmp r9, #0 6af0: 0a000039 beq 6bdc <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 6af4: e283b001 add fp, r3, #1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 6af8: e08b008b add r0, fp, fp, lsl #1 ((maximum + minimum_index) * sizeof(Objects_Control *)); 6afc: e08a0000 add r0, sl, r0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 6b00: e0800007 add r0, r0, r7 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 6b04: e1a00100 lsl r0, r0, #2 6b08: e58d3000 str r3, [sp] 6b0c: eb000862 bl 8c9c <_Workspace_Allocate> if ( !object_blocks ) { 6b10: e2509000 subs r9, r0, #0 6b14: e59d3000 ldr r3, [sp] 6b18: 0a000073 beq 6cec <_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 ) { 6b1c: e1d521b0 ldrh r2, [r5, #16] 6b20: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 6b24: e089c10b add ip, r9, fp, lsl #2 6b28: e089b18b add fp, r9, fp, lsl #3 6b2c: 3a000051 bcc 6c78 <_Objects_Extend_information+0x244> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6b30: e3570000 cmp r7, #0 6b34: 13a02000 movne r2, #0 6b38: 11a0100b movne r1, fp local_table[ index ] = NULL; 6b3c: 11a00002 movne r0, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6b40: 0a000003 beq 6b54 <_Objects_Extend_information+0x120> 6b44: e2822001 add r2, r2, #1 6b48: e1570002 cmp r7, r2 local_table[ index ] = NULL; 6b4c: e4810004 str r0, [r1], #4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6b50: 8afffffb bhi 6b44 <_Objects_Extend_information+0x110> 6b54: 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 ); 6b58: e1d511b4 ldrh r1, [r5, #20] 6b5c: e0861001 add r1, r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6b60: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; 6b64: e1560001 cmp r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6b68: e7890003 str r0, [r9, r3] inactive_per_block[block_count] = 0; 6b6c: e78c0003 str r0, [ip, r3] for ( index=index_base ; 6b70: 2a000005 bcs 6b8c <_Objects_Extend_information+0x158> 6b74: e08b2106 add r2, fp, r6, lsl #2 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 6b78: 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++ ) { 6b7c: 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 ; 6b80: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 6b84: 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 ; 6b88: 3afffffb bcc 6b7c <_Objects_Extend_information+0x148> 6b8c: e10f3000 mrs r3, CPSR 6b90: e3832080 orr r2, r3, #128 ; 0x80 6b94: e129f002 msr CPSR_fc, r2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 6b98: 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( 6b9c: e1d510b4 ldrh r1, [r5, #4] 6ba0: 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; 6ba4: e1a0a80a lsl sl, sl, #16 6ba8: e3822801 orr r2, r2, #65536 ; 0x10000 6bac: e1a0a82a lsr sl, sl, #16 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 6bb0: 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) | 6bb4: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 6bb8: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 6bbc: e585c030 str ip, [r5, #48] ; 0x30 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 6bc0: e5859034 str r9, [r5, #52] ; 0x34 information->inactive_per_block = inactive_per_block; information->local_table = local_table; 6bc4: e585b01c str fp, [r5, #28] information->maximum = (Objects_Maximum) maximum; 6bc8: e1c5a1b0 strh sl, [r5, #16] information->maximum_id = _Objects_Build_id( 6bcc: e585200c str r2, [r5, #12] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6bd0: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 6bd4: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 6bd8: 1b000835 blne 8cb4 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6bdc: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6be0: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6be4: e7838104 str r8, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6be8: e1a01008 mov r1, r8 6bec: e1a00007 mov r0, r7 6bf0: e1d521b4 ldrh r2, [r5, #20] 6bf4: e5953018 ldr r3, [r5, #24] 6bf8: eb00125f bl b57c <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6bfc: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6c00: 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 ) { 6c04: ea000009 b 6c30 <_Objects_Extend_information+0x1fc> 6c08: e5953000 ldr r3, [r5] the_object->id = _Objects_Build_id( 6c0c: e1d520b4 ldrh r2, [r5, #4] 6c10: e1a03c03 lsl r3, r3, #24 6c14: e3833801 orr r3, r3, #65536 ; 0x10000 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 6c18: 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) | 6c1c: e1833006 orr r3, r3, r6 6c20: e5813008 str r3, [r1, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6c24: e1a00008 mov r0, r8 6c28: ebfffce6 bl 5fc8 <_Chain_Append> index++; 6c2c: 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 ) { 6c30: e1a00007 mov r0, r7 6c34: ebfffcf6 bl 6014 <_Chain_Get> 6c38: e2501000 subs r1, r0, #0 6c3c: 1afffff1 bne 6c08 <_Objects_Extend_information+0x1d4> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 6c40: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6c44: e1d531b4 ldrh r3, [r5, #20] 6c48: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 6c4c: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6c50: e7813004 str r3, [r1, r4] information->inactive = 6c54: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 6c58: e28dd014 add sp, sp, #20 6c5c: 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 ); 6c60: e58d3000 str r3, [sp] 6c64: eb00080c bl 8c9c <_Workspace_Allocate> if ( !new_object_block ) 6c68: e2508000 subs r8, r0, #0 6c6c: e59d3000 ldr r3, [sp] 6c70: 1affff9d bne 6aec <_Objects_Extend_information+0xb8> 6c74: eafffff7 b 6c58 <_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, 6c78: e1a03103 lsl r3, r3, #2 6c7c: e5951034 ldr r1, [r5, #52] ; 0x34 6c80: e1a02003 mov r2, r3 6c84: e88d1008 stm sp, {r3, ip} 6c88: eb001dec bl e440 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 6c8c: e89d1008 ldm sp, {r3, ip} 6c90: e1a0000c mov r0, ip 6c94: e1a02003 mov r2, r3 6c98: e5951030 ldr r1, [r5, #48] ; 0x30 6c9c: eb001de7 bl e440 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 6ca0: e1d521b0 ldrh r2, [r5, #16] 6ca4: 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, 6ca8: e1a0000b mov r0, fp 6cac: e595101c ldr r1, [r5, #28] 6cb0: e1a02102 lsl r2, r2, #2 6cb4: eb001de1 bl e440 6cb8: e89d1008 ldm sp, {r3, ip} 6cbc: eaffffa5 b 6b58 <_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 ) 6cc0: e1d0a1b0 ldrh sl, [r0, #16] 6cc4: 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 ); 6cc8: 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; 6ccc: e3a09001 mov r9, #1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 6cd0: e1a03004 mov r3, r4 6cd4: eaffff78 b 6abc <_Objects_Extend_information+0x88> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6cd8: 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 ); 6cdc: 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; 6ce0: e3a09001 mov r9, #1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 6ce4: e1a04003 mov r4, r3 <== NOT EXECUTED 6ce8: eaffff73 b 6abc <_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 ); 6cec: e1a00008 mov r0, r8 6cf0: eb0007ef bl 8cb4 <_Workspace_Free> return; 6cf4: eaffffd7 b 6c58 <_Objects_Extend_information+0x224> =============================================================================== 00007064 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 7064: 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 ); 7068: e1d040b8 ldrh r4, [r0, #8] block_count = (information->maximum - index_base) / 706c: e1d051b4 ldrh r5, [r0, #20] */ void _Objects_Shrink_information( Objects_Information *information ) { 7070: 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) / 7074: e1d001b0 ldrh r0, [r0, #16] 7078: e1a01005 mov r1, r5 707c: e0640000 rsb r0, r4, r0 7080: eb00285f bl 11204 <__aeabi_uidiv> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 7084: e3500000 cmp r0, #0 7088: 08bd80f0 popeq {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 708c: e5962030 ldr r2, [r6, #48] ; 0x30 7090: e5923000 ldr r3, [r2] 7094: 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++ ) { 7098: 13a03000 movne r3, #0 if ( information->inactive_per_block[ block ] == 709c: 1a000005 bne 70b8 <_Objects_Shrink_information+0x54> 70a0: ea000008 b 70c8 <_Objects_Shrink_information+0x64> <== NOT EXECUTED 70a4: e5b21004 ldr r1, [r2, #4]! 70a8: e1550001 cmp r5, r1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 70ac: e0844005 add r4, r4, r5 70b0: 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 ] == 70b4: 0a000004 beq 70cc <_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++ ) { 70b8: e2833001 add r3, r3, #1 70bc: e1500003 cmp r0, r3 70c0: 8afffff7 bhi 70a4 <_Objects_Shrink_information+0x40> 70c4: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 70c8: 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 ); 70cc: e5960020 ldr r0, [r6, #32] 70d0: ea000002 b 70e0 <_Objects_Shrink_information+0x7c> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 70d4: e3550000 cmp r5, #0 70d8: 0a00000b beq 710c <_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; 70dc: 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 ); 70e0: 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; if ((index >= index_base) && 70e4: e1530004 cmp r3, r4 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; 70e8: e5905000 ldr r5, [r0] if ((index >= index_base) && 70ec: 3afffff8 bcc 70d4 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { 70f0: e1d621b4 ldrh r2, [r6, #20] 70f4: 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) && 70f8: e1530002 cmp r3, r2 70fc: 2afffff4 bcs 70d4 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 7100: ebfffbbb bl 5ff4 <_Chain_Extract> } } while ( the_object ); 7104: e3550000 cmp r5, #0 7108: 1afffff3 bne 70dc <_Objects_Shrink_information+0x78> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 710c: e5963034 ldr r3, [r6, #52] ; 0x34 7110: e7930007 ldr r0, [r3, r7] 7114: eb0006e6 bl 8cb4 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 7118: e1d602bc ldrh r0, [r6, #44] ; 0x2c 711c: 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; 7120: e5961034 ldr r1, [r6, #52] ; 0x34 information->inactive_per_block[ block ] = 0; 7124: e5962030 ldr r2, [r6, #48] ; 0x30 information->inactive -= information->allocation_size; 7128: 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; 712c: e7815007 str r5, [r1, r7] information->inactive_per_block[ block ] = 0; 7130: e7825007 str r5, [r2, r7] information->inactive -= information->allocation_size; 7134: e1c632bc strh r3, [r6, #44] ; 0x2c return; 7138: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 0000db04 <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( db04: e10f2000 mrs r2, CPSR db08: e3823080 orr r3, r2, #128 ; 0x80 db0c: 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 ) { db10: e59f1050 ldr r1, [pc, #80] ; db68 <_POSIX_signals_Clear_process_signals+0x64> db14: e0803080 add r3, r0, r0, lsl #1 db18: e7911103 ldr r1, [r1, r3, lsl #2] db1c: e3510002 cmp r1, #2 db20: e1a01103 lsl r1, r3, #2 db24: 0a000007 beq db48 <_POSIX_signals_Clear_process_signals+0x44> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; db28: e59f303c ldr r3, [pc, #60] ; db6c <_POSIX_signals_Clear_process_signals+0x68> db2c: e5931000 ldr r1, [r3] db30: e3a0c001 mov ip, #1 db34: e2400001 sub r0, r0, #1 db38: e1c1001c bic r0, r1, ip, lsl r0 db3c: e5830000 str r0, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( db40: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } db44: e12fff1e bx lr db48: e59fc020 ldr ip, [pc, #32] ; db70 <_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 ); db4c: e2811004 add r1, r1, #4 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) db50: e79c3103 ldr r3, [ip, r3, lsl #2] db54: e081c00c add ip, r1, ip db58: e153000c cmp r3, ip db5c: 0afffff1 beq db28 <_POSIX_signals_Clear_process_signals+0x24> db60: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); } db64: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0002200c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 2200c: 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 ) ) { 22010: e5905010 ldr r5, [r0, #16] 22014: e3c534ef bic r3, r5, #-285212672 ; 0xef000000 22018: e3c338ff bic r3, r3, #16711680 ; 0xff0000 2201c: e3c33c7f bic r3, r3, #32512 ; 0x7f00 22020: e3a0c201 mov ip, #268435456 ; 0x10000000 22024: e3c330ff bic r3, r3, #255 ; 0xff 22028: e28cc902 add ip, ip, #32768 ; 0x8000 2202c: e2417001 sub r7, r1, #1 22030: e3a06001 mov r6, #1 22034: e153000c cmp r3, ip bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 22038: e1a04000 mov r4, r0 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2203c: e59030fc ldr r3, [r0, #252] ; 0xfc 22040: e1a07716 lsl r7, r6, r7 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 22044: 0a00001b beq 220b8 <_POSIX_signals_Unblock_thread+0xac> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 22048: e59330d0 ldr r3, [r3, #208] ; 0xd0 2204c: e1d77003 bics r7, r7, r3 22050: 0a000016 beq 220b0 <_POSIX_signals_Unblock_thread+0xa4> * 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 ) ) { 22054: e2157201 ands r7, r5, #268435456 ; 0x10000000 22058: 0a000012 beq 220a8 <_POSIX_signals_Unblock_thread+0x9c> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 2205c: e3c564ff bic r6, r5, #-16777216 ; 0xff000000 22060: e3c6673f bic r6, r6, #16515072 ; 0xfc0000 22064: e3c66c41 bic r6, r6, #16640 ; 0x4100 22068: e3c6601f bic r6, r6, #31 the_thread->Wait.return_code = EINTR; 2206c: e3a03004 mov r3, #4 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 22070: e3560000 cmp r6, #0 * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { the_thread->Wait.return_code = EINTR; 22074: 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) ) 22078: 1a00002e bne 22138 <_POSIX_signals_Unblock_thread+0x12c> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 2207c: e2150008 ands r0, r5, #8 22080: 08bd80f0 popeq {r4, r5, r6, r7, pc} (void) _Watchdog_Remove( &the_thread->Timer ); 22084: e2840048 add r0, r4, #72 ; 0x48 22088: ebffb02b bl e13c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2208c: e3a01201 mov r1, #268435456 ; 0x10000000 22090: e2811bff add r1, r1, #261120 ; 0x3fc00 22094: e1a00004 mov r0, r4 22098: e2811ffe add r1, r1, #1016 ; 0x3f8 2209c: ebffab1f bl cd20 <_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; 220a0: e1a00006 mov r0, r6 220a4: 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 ) { 220a8: e3550000 cmp r5, #0 220ac: 0a000016 beq 2210c <_POSIX_signals_Unblock_thread+0x100> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 220b0: e1a00007 mov r0, r7 220b4: 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) ) { 220b8: e5900030 ldr r0, [r0, #48] ; 0x30 220bc: e1170000 tst r7, r0 220c0: 0a00000d beq 220fc <_POSIX_signals_Unblock_thread+0xf0> the_thread->Wait.return_code = EINTR; 220c4: e3a03004 mov r3, #4 the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 220c8: e3520000 cmp r2, #0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 220cc: e5843034 str r3, [r4, #52] ; 0x34 the_info = (siginfo_t *) the_thread->Wait.return_argument; 220d0: e5943028 ldr r3, [r4, #40] ; 0x28 if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 220d4: 18920007 ldmne r2, {r0, r1, r2} the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 220d8: 05831000 streq r1, [r3] the_info->si_code = SI_USER; 220dc: 03a01001 moveq r1, #1 the_info->si_value.sival_int = 0; } else { *the_info = *info; 220e0: 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; 220e4: 05831004 streq r1, [r3, #4] the_info->si_value.sival_int = 0; 220e8: 05832008 streq r2, [r3, #8] } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 220ec: e1a00004 mov r0, r4 220f0: ebffadb4 bl d7c8 <_Thread_queue_Extract_with_proxy> return true; 220f4: e3a00001 mov r0, #1 220f8: 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) ) { 220fc: e59300d0 ldr r0, [r3, #208] ; 0xd0 22100: e1d70000 bics r0, r7, r0 22104: 1affffee bne 220c4 <_POSIX_signals_Unblock_thread+0xb8> 22108: 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 ) ) 2210c: e59f2030 ldr r2, [pc, #48] ; 22144 <_POSIX_signals_Unblock_thread+0x138> 22110: e5920000 ldr r0, [r2] 22114: e3500000 cmp r0, #0 22118: 08bd80f0 popeq {r4, r5, r6, r7, pc} 2211c: e5923004 ldr r3, [r2, #4] 22120: e1540003 cmp r4, r3 _Thread_Dispatch_necessary = true; 22124: 05c26010 strbeq r6, [r2, #16] } } return false; 22128: 01a00005 moveq r0, r5 (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2212c: 08bd80f0 popeq {r4, r5, r6, r7, pc} _Thread_Dispatch_necessary = true; } } return false; 22130: e1a00005 mov r0, r5 <== NOT EXECUTED } 22134: 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 ); 22138: ebffada2 bl d7c8 <_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; 2213c: e3a00000 mov r0, #0 22140: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00006640 <_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(); 6640: e59f30b8 ldr r3, [pc, #184] ; 6700 <_TOD_Validate+0xc0> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 6644: 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) || 6648: 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(); 664c: 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; 6650: 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) || 6654: 08bd8010 popeq {r4, pc} ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 6658: e3a0093d mov r0, #999424 ; 0xf4000 665c: e2800d09 add r0, r0, #576 ; 0x240 6660: eb0048d3 bl 189b4 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 6664: e5943018 ldr r3, [r4, #24] 6668: e1500003 cmp r0, r3 666c: 9a00001f bls 66f0 <_TOD_Validate+0xb0> (the_tod->ticks >= ticks_per_second) || 6670: e5943014 ldr r3, [r4, #20] 6674: e353003b cmp r3, #59 ; 0x3b 6678: 8a00001c bhi 66f0 <_TOD_Validate+0xb0> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 667c: e5943010 ldr r3, [r4, #16] 6680: e353003b cmp r3, #59 ; 0x3b 6684: 8a000019 bhi 66f0 <_TOD_Validate+0xb0> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 6688: e594300c ldr r3, [r4, #12] 668c: e3530017 cmp r3, #23 6690: 8a000016 bhi 66f0 <_TOD_Validate+0xb0> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 6694: 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) || 6698: e3500000 cmp r0, #0 669c: 08bd8010 popeq {r4, pc} (the_tod->month == 0) || 66a0: e350000c cmp r0, #12 66a4: 8a000011 bhi 66f0 <_TOD_Validate+0xb0> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 66a8: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 66ac: e3a03d1f mov r3, #1984 ; 0x7c0 66b0: e2833003 add r3, r3, #3 66b4: e1520003 cmp r2, r3 66b8: 9a00000c bls 66f0 <_TOD_Validate+0xb0> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 66bc: 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) || 66c0: e3540000 cmp r4, #0 66c4: 0a00000b beq 66f8 <_TOD_Validate+0xb8> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 66c8: e3120003 tst r2, #3 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 66cc: 059f3030 ldreq r3, [pc, #48] ; 6704 <_TOD_Validate+0xc4> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 66d0: 159f302c ldrne r3, [pc, #44] ; 6704 <_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 ]; 66d4: 0280000d addeq r0, r0, #13 66d8: 07930100 ldreq r0, [r3, r0, lsl #2] else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 66dc: 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( 66e0: e1500004 cmp r0, r4 66e4: 33a00000 movcc r0, #0 66e8: 23a00001 movcs r0, #1 66ec: 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; 66f0: e3a00000 mov r0, #0 66f4: e8bd8010 pop {r4, pc} 66f8: e1a00004 mov r0, r4 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } 66fc: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00008830 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 8830: e92d40f0 push {r4, r5, r6, r7, lr} return false; } } return true; } 8834: e59f5050 ldr r5, [pc, #80] ; 888c <_User_extensions_Thread_create+0x5c> 8838: e4954004 ldr r4, [r5], #4 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 883c: e1540005 cmp r4, r5 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 8840: e1a06000 mov r6, r0 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 8844: 0a00000e beq 8884 <_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)( 8848: e59f7040 ldr r7, [pc, #64] ; 8890 <_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 ) { 884c: e5943014 ldr r3, [r4, #20] 8850: e3530000 cmp r3, #0 status = (*the_extension->Callouts.thread_create)( 8854: 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 ) { 8858: 0a000004 beq 8870 <_User_extensions_Thread_create+0x40> status = (*the_extension->Callouts.thread_create)( 885c: e5970004 ldr r0, [r7, #4] 8860: e1a0e00f mov lr, pc 8864: e12fff13 bx r3 _Thread_Executing, the_thread ); if ( !status ) 8868: e3500000 cmp r0, #0 886c: 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 ) { 8870: e5944000 ldr r4, [r4] { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 8874: e1540005 cmp r4, r5 8878: 1afffff3 bne 884c <_User_extensions_Thread_create+0x1c> if ( !status ) return false; } } return true; 887c: e3a00001 mov r0, #1 8880: e8bd80f0 pop {r4, r5, r6, r7, pc} 8884: e3a00001 mov r0, #1 <== NOT EXECUTED } 8888: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 0000a6ac <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a6ac: e92d41f0 push {r4, r5, r6, r7, r8, lr} a6b0: e1a04000 mov r4, r0 a6b4: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a6b8: e10f3000 mrs r3, CPSR a6bc: e3832080 orr r2, r3, #128 ; 0x80 a6c0: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } a6c4: e1a07000 mov r7, r0 a6c8: 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 ) ) { a6cc: e1520007 cmp r2, r7 a6d0: 0a000018 beq a738 <_Watchdog_Adjust+0x8c> switch ( direction ) { a6d4: e3510000 cmp r1, #0 a6d8: 1a000018 bne a740 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a6dc: e3550000 cmp r5, #0 a6e0: 0a000014 beq a738 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a6e4: e5926010 ldr r6, [r2, #16] a6e8: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a6ec: 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 ) { a6f0: 2a000005 bcs a70c <_Watchdog_Adjust+0x60> a6f4: ea000018 b a75c <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a6f8: e0555006 subs r5, r5, r6 a6fc: 0a00000d beq a738 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a700: e5926010 ldr r6, [r2, #16] a704: e1560005 cmp r6, r5 a708: 8a000013 bhi a75c <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a70c: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a710: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a714: e1a00004 mov r0, r4 a718: eb0000a0 bl a9a0 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a71c: e10f3000 mrs r3, CPSR a720: e3832080 orr r2, r3, #128 ; 0x80 a724: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } a728: e5941000 ldr r1, [r4] _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a72c: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); a730: e1a02001 mov r2, r1 a734: 1affffef bne a6f8 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a738: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a73c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a740: e3510001 cmp r1, #1 a744: 1afffffb bne a738 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a748: e5921010 ldr r1, [r2, #16] a74c: e0815005 add r5, r1, r5 a750: e5825010 str r5, [r2, #16] a754: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a758: 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; a75c: e0655006 rsb r5, r5, r6 a760: e5825010 str r5, [r2, #16] break; a764: eafffff3 b a738 <_Watchdog_Adjust+0x8c> =============================================================================== 000060d0 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 60d0: e92d40f0 push {r4, r5, r6, r7, lr} rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 60d4: e59f41b4 ldr r4, [pc, #436] ; 6290 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 60d8: e1a05001 mov r5, r1 60dc: e1a07000 mov r7, r0 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 60e0: e1a00004 mov r0, r4 60e4: eb000442 bl 71f4 if (aiocbp == NULL) 60e8: e3550000 cmp r5, #0 60ec: 0a00002d beq 61a8 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { if (aiocbp->aio_fildes != fildes) { 60f0: e5956000 ldr r6, [r5] 60f4: e1560007 cmp r6, r7 60f8: 1a000023 bne 618c 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, 60fc: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 6100: e1a01006 mov r1, r6 <== NOT EXECUTED 6104: e3a02000 mov r2, #0 <== NOT EXECUTED 6108: eb0000c2 bl 6418 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 610c: e2507000 subs r7, r0, #0 <== NOT EXECUTED 6110: 0a00000c beq 6148 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return result; } pthread_mutex_lock (&r_chain->mutex); 6114: e287401c add r4, r7, #28 <== NOT EXECUTED 6118: e1a00004 mov r0, r4 <== NOT EXECUTED 611c: eb000434 bl 71f4 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); 6120: e1a01005 mov r1, r5 <== NOT EXECUTED 6124: e1a00007 mov r0, r7 <== NOT EXECUTED 6128: eb0001bb bl 681c <== NOT EXECUTED 612c: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 6130: e1a00004 mov r0, r4 <== NOT EXECUTED 6134: eb00044f bl 7278 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 6138: e59f0150 ldr r0, [pc, #336] ; 6290 <== NOT EXECUTED 613c: eb00044d bl 7278 <== NOT EXECUTED return result; } return AIO_ALLDONE; } 6140: e1a00005 mov r0, r5 6144: 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)) 6148: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 614c: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 6150: e1520003 cmp r2, r3 <== NOT EXECUTED 6154: 0affffee beq 6114 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 6158: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 615c: e1a01006 mov r1, r6 <== NOT EXECUTED 6160: e1a02007 mov r2, r7 <== NOT EXECUTED 6164: eb0000ab bl 6418 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 6168: e3500000 cmp r0, #0 <== NOT EXECUTED 616c: 0a000006 beq 618c <== 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); 6170: e1a01005 mov r1, r5 <== NOT EXECUTED 6174: eb0001a8 bl 681c <== NOT EXECUTED 6178: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 617c: e1a00004 mov r0, r4 <== NOT EXECUTED 6180: eb00043c bl 7278 <== NOT EXECUTED return result; } return AIO_ALLDONE; } 6184: e1a00005 mov r0, r5 <== NOT EXECUTED 6188: 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); 618c: e1a00004 mov r0, r4 6190: eb000438 bl 7278 rtems_set_errno_and_return_minus_one (EINVAL); 6194: eb002990 bl 107dc <__errno> 6198: e3a03016 mov r3, #22 619c: e5803000 str r3, [r0] 61a0: e3e05000 mvn r5, #0 61a4: eaffffe5 b 6140 pthread_mutex_lock (&aio_request_queue.mutex); if (aiocbp == NULL) { if (fcntl (fildes, F_GETFL) < 0) { 61a8: e1a00007 mov r0, r7 61ac: e3a01003 mov r1, #3 61b0: eb001b6a bl cf60 61b4: e3500000 cmp r0, #0 61b8: ba00002d blt 6274 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, 61bc: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 61c0: e1a01007 mov r1, r7 <== NOT EXECUTED 61c4: e1a02005 mov r2, r5 <== NOT EXECUTED 61c8: eb000092 bl 6418 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 61cc: e2506000 subs r6, r0, #0 <== NOT EXECUTED 61d0: 0a00000b beq 6204 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_ALLDONE; } pthread_mutex_lock (&r_chain->mutex); 61d4: e286701c add r7, r6, #28 <== NOT EXECUTED 61d8: e1a00007 mov r0, r7 <== NOT EXECUTED 61dc: eb000404 bl 71f4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 61e0: e1a00006 mov r0, r6 <== NOT EXECUTED 61e4: eb000a75 bl 8bc0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 61e8: e1a00006 mov r0, r6 <== NOT EXECUTED 61ec: eb000174 bl 67c4 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 61f0: e1a00007 mov r0, r7 <== NOT EXECUTED 61f4: eb00041f bl 7278 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 61f8: e1a00004 mov r0, r4 <== NOT EXECUTED 61fc: eb00041d bl 7278 <== NOT EXECUTED return AIO_CANCELED; 6200: eaffffce b 6140 <== 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)) 6204: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 6208: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 620c: e1520003 cmp r2, r3 <== NOT EXECUTED 6210: 0a000013 beq 6264 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 6214: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 6218: e1a01007 mov r1, r7 <== NOT EXECUTED 621c: e1a02006 mov r2, r6 <== NOT EXECUTED 6220: eb00007c bl 6418 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) { 6224: e2505000 subs r5, r0, #0 <== NOT EXECUTED 6228: 0a00000d beq 6264 <== NOT EXECUTED return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 622c: e285701c add r7, r5, #28 <== NOT EXECUTED 6230: eb000a62 bl 8bc0 <_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); 6234: e1a00005 mov r0, r5 <== NOT EXECUTED 6238: eb000161 bl 67c4 <== NOT EXECUTED pthread_mutex_destroy (&r_chain->mutex); 623c: e1a00007 mov r0, r7 <== NOT EXECUTED 6240: eb000348 bl 6f68 <== NOT EXECUTED pthread_cond_destroy (&r_chain->mutex); 6244: e1a00007 mov r0, r7 <== NOT EXECUTED 6248: eb00026f bl 6c0c <== NOT EXECUTED free (r_chain); 624c: e1a00005 mov r0, r5 <== NOT EXECUTED 6250: ebfff282 bl 2c60 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 6254: e1a00004 mov r0, r4 <== NOT EXECUTED 6258: eb000406 bl 7278 <== NOT EXECUTED return AIO_CANCELED; 625c: e1a05006 mov r5, r6 <== NOT EXECUTED 6260: eaffffb6 b 6140 <== NOT EXECUTED } pthread_mutex_unlock (&aio_request_queue.mutex); 6264: e1a00004 mov r0, r4 <== NOT EXECUTED 6268: eb000402 bl 7278 <== NOT EXECUTED return AIO_ALLDONE; 626c: e3a05002 mov r5, #2 <== NOT EXECUTED 6270: eaffffb2 b 6140 <== 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); 6274: e1a00004 mov r0, r4 6278: eb0003fe bl 7278 rtems_set_errno_and_return_minus_one (EBADF); 627c: eb002956 bl 107dc <__errno> 6280: e3a03009 mov r3, #9 6284: e5803000 str r3, [r0] 6288: e3e05000 mvn r5, #0 628c: eaffffab b 6140 =============================================================================== 0000629c : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 629c: e3500a02 cmp r0, #8192 ; 0x2000 int aio_fsync( int op, struct aiocb *aiocbp ) { 62a0: e92d4030 push {r4, r5, lr} 62a4: e1a04001 mov r4, r1 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 62a8: 13a05016 movne r5, #22 ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 62ac: 1a000011 bne 62f8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 62b0: e5910000 ldr r0, [r1] 62b4: e3a01003 mov r1, #3 62b8: eb001b28 bl cf60 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 62bc: e2000003 and r0, r0, #3 62c0: e2400001 sub r0, r0, #1 62c4: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 62c8: 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))) 62cc: 8a000009 bhi 62f8 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 62d0: e3a00018 mov r0, #24 62d4: ebfff400 bl 32dc <== NOT EXECUTED if (req == NULL) 62d8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 62dc: 0a000004 beq 62f4 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 62e0: e5834014 str r4, [r3, #20] <== NOT EXECUTED req->aiocbp->aio_lio_opcode = LIO_SYNC; 62e4: e3a03003 mov r3, #3 <== NOT EXECUTED 62e8: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED return rtems_aio_enqueue (req); } 62ec: 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); 62f0: ea000162 b 6880 <== 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); 62f4: e3a0500b mov r5, #11 <== NOT EXECUTED 62f8: e3e03000 mvn r3, #0 62fc: e5845030 str r5, [r4, #48] ; 0x30 6300: e5843034 str r3, [r4, #52] ; 0x34 6304: eb002934 bl 107dc <__errno> 6308: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 630c: e3e00000 mvn r0, #0 6310: e8bd8030 pop {r4, r5, pc} =============================================================================== 00006a64 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6a64: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6a68: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6a6c: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6a70: e5900000 ldr r0, [r0] 6a74: eb001939 bl cf60 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 6a78: e2000003 and r0, r0, #3 6a7c: e3500002 cmp r0, #2 6a80: 13500000 cmpne r0, #0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6a84: 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))) 6a88: 1a00000f bne 6acc rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 6a8c: e5943014 ldr r3, [r4, #20] 6a90: e3530000 cmp r3, #0 6a94: 1a000013 bne 6ae8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 6a98: e5943008 ldr r3, [r4, #8] 6a9c: e3530000 cmp r3, #0 6aa0: ba000010 blt 6ae8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 6aa4: e3a00018 mov r0, #24 6aa8: ebfff20b bl 32dc if (req == NULL) 6aac: e2503000 subs r3, r0, #0 6ab0: 0a000004 beq 6ac8 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 6ab4: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_READ; 6ab8: e3a03001 mov r3, #1 6abc: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6ac0: 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); 6ac4: eaffff6d b 6880 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); 6ac8: e3a0500b mov r5, #11 <== NOT EXECUTED 6acc: e3e03000 mvn r3, #0 6ad0: e5845030 str r5, [r4, #48] ; 0x30 6ad4: e5843034 str r3, [r4, #52] ; 0x34 6ad8: eb00273f bl 107dc <__errno> 6adc: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 6ae0: e3e00000 mvn r0, #0 6ae4: 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); 6ae8: e3a05016 mov r5, #22 6aec: eafffff6 b 6acc =============================================================================== 00006af8 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6af8: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6afc: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6b00: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6b04: e5900000 ldr r0, [r0] 6b08: eb001914 bl cf60 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 6b0c: e2000003 and r0, r0, #3 6b10: e2400001 sub r0, r0, #1 6b14: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6b18: 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))) 6b1c: 8a00000f bhi 6b60 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 6b20: e5943014 ldr r3, [r4, #20] 6b24: e3530000 cmp r3, #0 6b28: 1a000013 bne 6b7c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 6b2c: e5943008 ldr r3, [r4, #8] 6b30: e3530000 cmp r3, #0 6b34: ba000010 blt 6b7c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 6b38: e3a00018 mov r0, #24 6b3c: ebfff1e6 bl 32dc if (req == NULL) 6b40: e2503000 subs r3, r0, #0 6b44: 0a000004 beq 6b5c rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 6b48: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_WRITE; 6b4c: e3a03002 mov r3, #2 6b50: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6b54: 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); 6b58: eaffff48 b 6880 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); 6b5c: e3a0500b mov r5, #11 <== NOT EXECUTED 6b60: e3e03000 mvn r3, #0 6b64: e5845030 str r5, [r4, #48] ; 0x30 6b68: e5843034 str r3, [r4, #52] ; 0x34 6b6c: eb00271a bl 107dc <__errno> 6b70: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 6b74: e3e00000 mvn r0, #0 6b78: 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); 6b7c: e3a05016 mov r5, #22 6b80: eafffff6 b 6b60 =============================================================================== 00021d08 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 21d08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 21d0c: e24dd00c sub sp, sp, #12 21d10: e1a04000 mov r4, r0 21d14: e1a05001 mov r5, r1 21d18: e1a08002 mov r8, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 21d1c: ebffff40 bl 21a24 21d20: e1500004 cmp r0, r4 21d24: 1a000095 bne 21f80 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 21d28: e3550000 cmp r5, #0 21d2c: 0a000098 beq 21f94 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 21d30: e2454001 sub r4, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 21d34: e354001f cmp r4, #31 21d38: 8a000095 bhi 21f94 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 ) 21d3c: e59f627c ldr r6, [pc, #636] ; 21fc0 21d40: e1a07085 lsl r7, r5, #1 21d44: e0873005 add r3, r7, r5 21d48: e0863103 add r3, r6, r3, lsl #2 21d4c: e5933008 ldr r3, [r3, #8] 21d50: e3530001 cmp r3, #1 return 0; 21d54: 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 ) 21d58: 0a000038 beq 21e40 /* * 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 ) ) 21d5c: e3550008 cmp r5, #8 21d60: 13550004 cmpne r5, #4 21d64: 0a000037 beq 21e48 21d68: e355000b cmp r5, #11 21d6c: 0a000035 beq 21e48 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 21d70: e3a03001 mov r3, #1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 21d74: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 21d78: e58d5000 str r5, [sp] siginfo->si_code = SI_USER; if ( !value ) { 21d7c: e3580000 cmp r8, #0 21d80: e1a04413 lsl r4, r3, r4 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 21d84: 15983000 ldrne r3, [r8] 21d88: 158d3008 strne r3, [sp, #8] 21d8c: e59f3230 ldr r3, [pc, #560] ; 21fc4 21d90: e5932000 ldr r2, [r3] 21d94: e2822001 add r2, r2, #1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 21d98: 058d8008 streq r8, [sp, #8] 21d9c: 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; 21da0: e59f3220 ldr r3, [pc, #544] ; 21fc8 21da4: e5930004 ldr r0, [r3, #4] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 21da8: e59030fc ldr r3, [r0, #252] ; 0xfc 21dac: e59330d0 ldr r3, [r3, #208] ; 0xd0 21db0: e1d43003 bics r3, r4, r3 21db4: 1a000014 bne 21e0c } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 21db8: e59f120c ldr r1, [pc, #524] ; 21fcc 21dbc: e4913004 ldr r3, [r1], #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 ); 21dc0: e1530001 cmp r3, r1 21dc4: 0a000030 beq 21e8c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 21dc8: e5932030 ldr r2, [r3, #48] ; 0x30 21dcc: 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; 21dd0: e1a00003 mov r0, r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 21dd4: e59320fc ldr r2, [r3, #252] ; 0xfc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 21dd8: 0a000008 beq 21e00 21ddc: ea00000a b 21e0c 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 ) { 21de0: 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 ); 21de4: e1530001 cmp r3, r1 21de8: 0a000027 beq 21e8c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 21dec: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 21df0: 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; 21df4: e1a00003 mov r0, r3 <== NOT EXECUTED api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 21df8: e59320fc ldr r2, [r3, #252] ; 0xfc <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 21dfc: 1a000002 bne 21e0c <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 21e00: e59220d0 ldr r2, [r2, #208] ; 0xd0 21e04: e1d42002 bics r2, r4, r2 21e08: 0afffff4 beq 21de0 /* * 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 ) ) { 21e0c: e1a01005 mov r1, r5 21e10: e1a0200d mov r2, sp 21e14: eb00007c bl 2200c <_POSIX_signals_Unblock_thread> 21e18: e3500000 cmp r0, #0 21e1c: 1a000005 bne 21e38 /* * 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 ); 21e20: e1a00004 mov r0, r4 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 21e24: 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 ); 21e28: eb00006d bl 21fe4 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 21e2c: e7963105 ldr r3, [r6, r5, lsl #2] 21e30: e3530002 cmp r3, #2 21e34: 0a000007 beq 21e58 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 21e38: ebffac96 bl d098 <_Thread_Enable_dispatch> return 0; 21e3c: e3a00000 mov r0, #0 } 21e40: e28dd00c add sp, sp, #12 21e44: 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 ); 21e48: eb0000f7 bl 2222c 21e4c: e1a01005 mov r1, r5 21e50: eb0000bc bl 22148 21e54: eafffff9 b 21e40 _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 ); 21e58: e59f0170 ldr r0, [pc, #368] ; 21fd0 21e5c: ebffa5e7 bl b600 <_Chain_Get> if ( !psiginfo ) { 21e60: e250c000 subs ip, r0, #0 21e64: 0a00004f beq 21fa8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 21e68: e1a0300d mov r3, sp 21e6c: e8930007 ldm r3, {r0, r1, r2} 21e70: e28c3008 add r3, ip, #8 21e74: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 21e78: e59f0154 ldr r0, [pc, #340] ; 21fd4 21e7c: e1a0100c mov r1, ip 21e80: e0800105 add r0, r0, r5, lsl #2 21e84: ebffa5ca bl b5b4 <_Chain_Append> 21e88: eaffffea b 21e38 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 21e8c: e59f3144 ldr r3, [pc, #324] ; 21fd8 21e90: e5d3e000 ldrb lr, [r3] 21e94: e59fa140 ldr sl, [pc, #320] ; 21fdc 21e98: e28ee001 add lr, lr, #1 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 21e9c: e3a08000 mov r8, #0 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 ] ) 21ea0: e5ba3004 ldr r3, [sl, #4]! 21ea4: e3530000 cmp r3, #0 21ea8: 0a000022 beq 21f38 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 21eac: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 21eb0: e1d3c1b0 ldrh ip, [r3, #16] object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21eb4: e35c0000 cmp ip, #0 if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table; 21eb8: e593101c ldr r1, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 21ebc: 0a00001d beq 21f38 21ec0: e3a02001 mov r2, #1 the_thread = (Thread_Control *) object_table[ index ]; 21ec4: e5b13004 ldr r3, [r1, #4]! if ( !the_thread ) 21ec8: e3530000 cmp r3, #0 21ecc: 0a000016 beq 21f2c /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 21ed0: e5930014 ldr r0, [r3, #20] 21ed4: e150000e cmp r0, lr 21ed8: 8a000013 bhi 21f2c #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 21edc: e59390fc ldr r9, [r3, #252] ; 0xfc 21ee0: e59990d0 ldr r9, [r9, #208] ; 0xd0 21ee4: e1d49009 bics r9, r4, r9 21ee8: 0a00000f beq 21f2c * * 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 ) { 21eec: e150000e cmp r0, lr 21ef0: 3a00001c bcc 21f68 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 21ef4: e3580000 cmp r8, #0 21ef8: 0a00000b beq 21f2c 21efc: e5989010 ldr r9, [r8, #16] 21f00: e3590000 cmp r9, #0 21f04: 0a000008 beq 21f2c /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 21f08: e593b010 ldr fp, [r3, #16] 21f0c: e35b0000 cmp fp, #0 21f10: 0a000014 beq 21f68 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 21f14: e3190201 tst r9, #268435456 ; 0x10000000 21f18: 1a000003 bne 21f2c */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 21f1c: e20bb201 and fp, fp, #268435456 ; 0x10000000 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 21f20: e35b0000 cmp fp, #0 21f24: 11a0e000 movne lr, r0 21f28: 11a08003 movne r8, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21f2c: e2822001 add r2, r2, #1 21f30: e15c0002 cmp ip, r2 21f34: 2affffe2 bcs 21ec4 * + 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++) { 21f38: e59f30a0 ldr r3, [pc, #160] ; 21fe0 21f3c: e15a0003 cmp sl, r3 21f40: 1affffd6 bne 21ea0 } } } } if ( interested ) { 21f44: e3580000 cmp r8, #0 21f48: 0affffb4 beq 21e20 21f4c: 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 ) ) { 21f50: e1a01005 mov r1, r5 21f54: e1a0200d mov r2, sp 21f58: eb00002b bl 2200c <_POSIX_signals_Unblock_thread> 21f5c: e3500000 cmp r0, #0 21f60: 0affffae beq 21e20 21f64: eaffffb3 b 21e38 <== NOT EXECUTED #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21f68: e2822001 add r2, r2, #1 21f6c: 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 ) ) { 21f70: e1a0e000 mov lr, r0 21f74: e1a08003 mov r8, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21f78: 2affffd1 bcs 21ec4 21f7c: eaffffed b 21f38 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 21f80: ebffc4d3 bl 132d4 <__errno> 21f84: e3a03003 mov r3, #3 21f88: e5803000 str r3, [r0] 21f8c: e3e00000 mvn r0, #0 21f90: eaffffaa b 21e40 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 21f94: ebffc4ce bl 132d4 <__errno> 21f98: e3a03016 mov r3, #22 21f9c: e5803000 str r3, [r0] 21fa0: e3e00000 mvn r0, #0 21fa4: eaffffa5 b 21e40 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(); 21fa8: ebffac3a bl d098 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 21fac: ebffc4c8 bl 132d4 <__errno> 21fb0: e3a0300b mov r3, #11 21fb4: e5803000 str r3, [r0] 21fb8: e3e00000 mvn r0, #0 21fbc: eaffff9f b 21e40 =============================================================================== 0000a86c : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) a86c: e3500000 cmp r0, #0 a870: 0a00000e beq a8b0 a874: e5903000 ldr r3, [r0] a878: e3530000 cmp r3, #0 a87c: 0a00000b beq a8b0 return EINVAL; switch ( policy ) { a880: e3510004 cmp r1, #4 a884: 9a000001 bls a890 case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; a888: e3a00086 mov r0, #134 ; 0x86 } } a88c: e12fff1e bx lr ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { a890: e3a03001 mov r3, #1 a894: e1a03113 lsl r3, r3, r1 a898: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; a89c: 15801014 strne r1, [r0, #20] return 0; a8a0: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { a8a4: 112fff1e bxne lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; a8a8: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED } } a8ac: e12fff1e bx lr <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; a8b0: e3a00016 mov r0, #22 a8b4: e12fff1e bx lr =============================================================================== 00007724 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 7724: e3500000 cmp r0, #0 7728: 0a000008 beq 7750 772c: e5903000 ldr r3, [r0] 7730: e3530000 cmp r3, #0 7734: 0a000005 beq 7750 return EINVAL; switch ( pshared ) { 7738: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 773c: 95801004 strls r1, [r0, #4] return 0; 7740: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 7744: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 7748: e3a00016 mov r0, #22 <== NOT EXECUTED } } 774c: e12fff1e bx lr <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 7750: e3a00016 mov r0, #22 7754: e12fff1e bx lr =============================================================================== 00006b7c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 6b7c: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 6b80: e2505000 subs r5, r0, #0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 6b84: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 6b88: 0a00001d beq 6c04 * * 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 ); 6b8c: e1a00001 mov r0, r1 6b90: e28d1004 add r1, sp, #4 6b94: eb001a03 bl d3a8 <_POSIX_Absolute_timeout_to_ticks> 6b98: e5951000 ldr r1, [r5] 6b9c: e1a04000 mov r4, r0 6ba0: e28d2008 add r2, sp, #8 6ba4: e59f0098 ldr r0, [pc, #152] ; 6c44 6ba8: eb000ab1 bl 9674 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 6bac: e59d3008 ldr r3, [sp, #8] 6bb0: e3530000 cmp r3, #0 6bb4: 1a000012 bne 6c04 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 6bb8: 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, 6bbc: e3540003 cmp r4, #3 6bc0: 13a05000 movne r5, #0 6bc4: 03a05001 moveq r5, #1 6bc8: e58d3000 str r3, [sp] 6bcc: e2800010 add r0, r0, #16 6bd0: e1a02005 mov r2, r5 6bd4: e59d3004 ldr r3, [sp, #4] 6bd8: eb00073d bl 88d4 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 6bdc: eb000d82 bl a1ec <_Thread_Enable_dispatch> if ( !do_wait ) { 6be0: e3550000 cmp r5, #0 6be4: 1a000011 bne 6c30 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 6be8: e59f3058 ldr r3, [pc, #88] ; 6c48 6bec: e5933004 ldr r3, [r3, #4] 6bf0: e5930034 ldr r0, [r3, #52] ; 0x34 6bf4: e3500002 cmp r0, #2 6bf8: 0a000004 beq 6c10 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 6bfc: eb000046 bl 6d1c <_POSIX_RWLock_Translate_core_RWLock_return_code> 6c00: ea000000 b 6c08 _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 6c04: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 6c08: e28dd00c add sp, sp, #12 6c0c: 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 ) 6c10: e3540000 cmp r4, #0 6c14: 0afffffa beq 6c04 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 6c18: e2444001 sub r4, r4, #1 6c1c: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 6c20: 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 || 6c24: 9afffff7 bls 6c08 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 6c28: eb00003b bl 6d1c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED 6c2c: eafffff5 b 6c08 <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { 6c30: e59f3010 ldr r3, [pc, #16] ; 6c48 6c34: e5933004 ldr r3, [r3, #4] 6c38: e5930034 ldr r0, [r3, #52] ; 0x34 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 6c3c: eb000036 bl 6d1c <_POSIX_RWLock_Translate_core_RWLock_return_code> 6c40: eafffff0 b 6c08 =============================================================================== 00006c4c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 6c4c: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 6c50: e2505000 subs r5, r0, #0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 6c54: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 6c58: 0a00001d beq 6cd4 * * 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 ); 6c5c: e1a00001 mov r0, r1 6c60: e28d1004 add r1, sp, #4 6c64: eb0019cf bl d3a8 <_POSIX_Absolute_timeout_to_ticks> 6c68: e5951000 ldr r1, [r5] 6c6c: e1a04000 mov r4, r0 6c70: e28d2008 add r2, sp, #8 6c74: e59f0098 ldr r0, [pc, #152] ; 6d14 6c78: eb000a7d bl 9674 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 6c7c: e59d3008 ldr r3, [sp, #8] 6c80: e3530000 cmp r3, #0 6c84: 1a000012 bne 6cd4 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 6c88: 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, 6c8c: e3540003 cmp r4, #3 6c90: 13a05000 movne r5, #0 6c94: 03a05001 moveq r5, #1 6c98: e58d3000 str r3, [sp] 6c9c: e2800010 add r0, r0, #16 6ca0: e1a02005 mov r2, r5 6ca4: e59d3004 ldr r3, [sp, #4] 6ca8: eb000740 bl 89b0 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 6cac: eb000d4e bl a1ec <_Thread_Enable_dispatch> if ( !do_wait && 6cb0: e3550000 cmp r5, #0 6cb4: 1a000011 bne 6d00 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 6cb8: e59f3058 ldr r3, [pc, #88] ; 6d18 6cbc: e5933004 ldr r3, [r3, #4] 6cc0: e5930034 ldr r0, [r3, #52] ; 0x34 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 6cc4: e3500002 cmp r0, #2 6cc8: 0a000004 beq 6ce0 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 6ccc: eb000012 bl 6d1c <_POSIX_RWLock_Translate_core_RWLock_return_code> 6cd0: ea000000 b 6cd8 _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 6cd4: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 6cd8: e28dd00c add sp, sp, #12 6cdc: 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 ) 6ce0: e3540000 cmp r4, #0 6ce4: 0afffffa beq 6cd4 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 6ce8: e2444001 sub r4, r4, #1 6cec: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 6cf0: 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 || 6cf4: 9afffff7 bls 6cd8 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 6cf8: eb000007 bl 6d1c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED 6cfc: eafffff5 b 6cd8 <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 6d00: e59f3010 ldr r3, [pc, #16] ; 6d18 6d04: e5933004 ldr r3, [r3, #4] 6d08: 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( 6d0c: eb000002 bl 6d1c <_POSIX_RWLock_Translate_core_RWLock_return_code> 6d10: eafffff0 b 6cd8 =============================================================================== 000074b4 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 74b4: e3500000 cmp r0, #0 74b8: 0a000008 beq 74e0 return EINVAL; if ( !attr->is_initialized ) 74bc: e5903000 ldr r3, [r0] 74c0: e3530000 cmp r3, #0 74c4: 0a000005 beq 74e0 return EINVAL; switch ( pshared ) { 74c8: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 74cc: 95801004 strls r1, [r0, #4] return 0; 74d0: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 74d4: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 74d8: e3a00016 mov r0, #22 <== NOT EXECUTED } } 74dc: e12fff1e bx lr <== NOT EXECUTED { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 74e0: e3a00016 mov r0, #22 74e4: e12fff1e bx lr =============================================================================== 00006880 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 6880: 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); 6884: e59f41c4 ldr r4, [pc, #452] ; 6a50 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 6888: e24dd024 sub sp, sp, #36 ; 0x24 688c: 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); 6890: e1a00004 mov r0, r4 6894: eb000256 bl 71f4 if (result != 0) { 6898: e2505000 subs r5, r0, #0 689c: 1a00002a bne 694c 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); 68a0: eb000486 bl 7ac0 68a4: e28d101c add r1, sp, #28 68a8: e1a0200d mov r2, sp 68ac: eb000380 bl 76b4 req->caller_thread = pthread_self (); 68b0: eb000482 bl 7ac0 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 68b4: e5963014 ldr r3, [r6, #20] 68b8: e59dc000 ldr ip, [sp] 68bc: e5932014 ldr r2, [r3, #20] 68c0: e062200c rsb r2, r2, ip req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 68c4: 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; 68c8: e586200c str r2, [r6, #12] req->policy = policy; 68cc: e59d201c ldr r2, [sp, #28] req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 68d0: 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; 68d4: e5862008 str r2, [r6, #8] req->aiocbp->error_code = EINPROGRESS; 68d8: 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 (); 68dc: e5860010 str r0, [r6, #16] req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; 68e0: e5832030 str r2, [r3, #48] ; 0x30 req->aiocbp->return_value = 0; 68e4: e5835034 str r5, [r3, #52] ; 0x34 if ((aio_request_queue.idle_threads == 0) && 68e8: 1a000002 bne 68f8 68ec: e5942064 ldr r2, [r4, #100] ; 0x64 68f0: e3520004 cmp r2, #4 68f4: da000017 ble 6958 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, 68f8: e59f0154 ldr r0, [pc, #340] ; 6a54 68fc: e5931000 ldr r1, [r3] 6900: e3a02000 mov r2, #0 6904: ebfffec3 bl 6418 req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 6908: e2507000 subs r7, r0, #0 690c: 0a00002e beq 69cc { pthread_mutex_lock (&r_chain->mutex); 6910: e287401c add r4, r7, #28 6914: e1a00004 mov r0, r4 6918: eb000235 bl 71f4 rtems_aio_insert_prio (&r_chain->perfd, req); 691c: e2870008 add r0, r7, #8 6920: e1a01006 mov r1, r6 6924: ebffff90 bl 676c pthread_cond_signal (&r_chain->cond); 6928: e2870020 add r0, r7, #32 692c: eb00011a bl 6d9c pthread_mutex_unlock (&r_chain->mutex); 6930: e1a00004 mov r0, r4 6934: eb00024f bl 7278 /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); } } pthread_mutex_unlock (&aio_request_queue.mutex); 6938: e59f0110 ldr r0, [pc, #272] ; 6a50 693c: eb00024d bl 7278 return 0; } 6940: e1a00005 mov r0, r5 6944: e28dd024 add sp, sp, #36 ; 0x24 6948: 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); 694c: e1a00006 mov r0, r6 <== NOT EXECUTED 6950: ebfff0c2 bl 2c60 <== NOT EXECUTED return result; 6954: eafffff9 b 6940 <== 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); 6958: e5931000 ldr r1, [r3] 695c: e2840048 add r0, r4, #72 ; 0x48 6960: e3a02001 mov r2, #1 6964: ebfffeab bl 6418 if (r_chain->new_fd == 1) { 6968: e5903018 ldr r3, [r0, #24] 696c: e3530001 cmp r3, #1 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); 6970: e1a07000 mov r7, r0 if (r_chain->new_fd == 1) { 6974: 1affffe5 bne 6910 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 6978: e1a01006 mov r1, r6 697c: e2800008 add r0, r0, #8 6980: eb0008a3 bl 8c14 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 6984: 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; 6988: e5875018 str r5, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 698c: e287001c add r0, r7, #28 6990: eb0001c4 bl 70a8 pthread_cond_init (&r_chain->cond, NULL); 6994: e1a01005 mov r1, r5 6998: e2870020 add r0, r7, #32 699c: eb0000cd bl 6cd8 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 69a0: e28d0020 add r0, sp, #32 69a4: e2841008 add r1, r4, #8 69a8: e59f20a8 ldr r2, [pc, #168] ; 6a58 69ac: e1a03007 mov r3, r7 69b0: eb000296 bl 7410 rtems_aio_handle, (void *) r_chain); if (result != 0) { 69b4: e2506000 subs r6, r0, #0 69b8: 1a000020 bne 6a40 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 69bc: e5943064 ldr r3, [r4, #100] ; 0x64 69c0: e2833001 add r3, r3, #1 69c4: e5843064 str r3, [r4, #100] ; 0x64 69c8: eaffffda b 6938 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 69cc: e5963014 ldr r3, [r6, #20] 69d0: e59f0084 ldr r0, [pc, #132] ; 6a5c 69d4: e5931000 ldr r1, [r3] 69d8: e3a02001 mov r2, #1 69dc: ebfffe8d bl 6418 if (r_chain->new_fd == 1) { 69e0: e5903018 ldr r3, [r0, #24] 69e4: e3530001 cmp r3, #1 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 69e8: e1a08000 mov r8, r0 if (r_chain->new_fd == 1) { 69ec: 0a000003 beq 6a00 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); 69f0: e2800008 add r0, r0, #8 69f4: e1a01006 mov r1, r6 69f8: ebffff5b bl 676c 69fc: eaffffcd b 6938 6a00: e2800008 add r0, r0, #8 6a04: e1a01006 mov r1, r6 6a08: eb000881 bl 8c14 <_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); 6a0c: 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; 6a10: e5887018 str r7, [r8, #24] pthread_mutex_init (&r_chain->mutex, NULL); 6a14: e288001c add r0, r8, #28 6a18: eb0001a2 bl 70a8 pthread_cond_init (&r_chain->cond, NULL); 6a1c: e1a01007 mov r1, r7 6a20: e2880020 add r0, r8, #32 6a24: eb0000ab bl 6cd8 pthread_cond_signal (&aio_request_queue.new_req); 6a28: e59f0030 ldr r0, [pc, #48] ; 6a60 6a2c: eb0000da bl 6d9c ++aio_request_queue.idle_threads; 6a30: e5943068 ldr r3, [r4, #104] ; 0x68 6a34: e2833001 add r3, r3, #1 6a38: e5843068 str r3, [r4, #104] ; 0x68 6a3c: eaffffbd b 6938 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); 6a40: e1a00004 mov r0, r4 <== NOT EXECUTED 6a44: eb00020b bl 7278 <== NOT EXECUTED return result; 6a48: e1a05006 mov r5, r6 <== NOT EXECUTED 6a4c: eaffffbb b 6940 <== NOT EXECUTED =============================================================================== 000064e4 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 64e4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 64e8: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED 64ec: e1a05000 mov r5, r0 <== NOT EXECUTED 64f0: 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); 64f4: e28d8028 add r8, sp, #40 ; 0x28 <== NOT EXECUTED 64f8: e28d7004 add r7, sp, #4 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 64fc: e3e0b000 mvn fp, #0 <== NOT EXECUTED req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; req->aiocbp->error_code = 0; 6500: 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); 6504: e1a00006 mov r0, r6 <== NOT EXECUTED 6508: eb000339 bl 71f4 <== NOT EXECUTED if (result != 0) 650c: e250a000 subs sl, r0, #0 <== NOT EXECUTED 6510: 1a000021 bne 659c <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 6514: 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 ); 6518: 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)) { 651c: e1540003 cmp r4, r3 <== NOT EXECUTED 6520: 0a000038 beq 6608 <== 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); 6524: eb000565 bl 7ac0 <== NOT EXECUTED 6528: e1a01008 mov r1, r8 <== NOT EXECUTED 652c: e1a02007 mov r2, r7 <== NOT EXECUTED 6530: eb00045f bl 76b4 <== NOT EXECUTED param.sched_priority = req->priority; 6534: e594300c ldr r3, [r4, #12] <== NOT EXECUTED 6538: e58d3004 str r3, [sp, #4] <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); 653c: eb00055f bl 7ac0 <== NOT EXECUTED 6540: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 6544: e1a02007 mov r2, r7 <== NOT EXECUTED 6548: eb000561 bl 7ad4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 654c: e1a00004 mov r0, r4 <== NOT EXECUTED 6550: eb00099a bl 8bc0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 6554: e1a00006 mov r0, r6 <== NOT EXECUTED 6558: eb000346 bl 7278 <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { 655c: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED 6560: e59a302c ldr r3, [sl, #44] ; 0x2c <== NOT EXECUTED 6564: e3530002 cmp r3, #2 <== NOT EXECUTED 6568: 0a00001e beq 65e8 <== NOT EXECUTED 656c: e3530003 cmp r3, #3 <== NOT EXECUTED 6570: 0a000019 beq 65dc <== NOT EXECUTED 6574: e3530001 cmp r3, #1 <== NOT EXECUTED 6578: 0a00000a beq 65a8 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 657c: e58ab034 str fp, [sl, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = errno; 6580: eb002895 bl 107dc <__errno> <== NOT EXECUTED 6584: 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); 6588: e1a00006 mov r0, r6 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; 658c: 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); 6590: eb000317 bl 71f4 <== NOT EXECUTED if (result != 0) 6594: e250a000 subs sl, r0, #0 <== NOT EXECUTED 6598: 0affffdd beq 6514 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 659c: e3a00000 mov r0, #0 <== NOT EXECUTED 65a0: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 65a4: 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, 65a8: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED 65ac: e59a0000 ldr r0, [sl] <== NOT EXECUTED 65b0: e28a100c add r1, sl, #12 <== NOT EXECUTED 65b4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 65b8: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED 65bc: e58dc000 str ip, [sp] <== NOT EXECUTED 65c0: eb002b87 bl 113e4 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 65c4: e3700001 cmn r0, #1 <== NOT EXECUTED 65c8: 0a00005e beq 6748 <== NOT EXECUTED req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; 65cc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 65d0: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = 0; 65d4: e5839030 str r9, [r3, #48] ; 0x30 <== NOT EXECUTED 65d8: eaffffc9 b 6504 <== 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); 65dc: e59a0000 ldr r0, [sl] <== NOT EXECUTED 65e0: eb001adc bl d158 <== NOT EXECUTED break; 65e4: eafffff6 b 65c4 <== 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, 65e8: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED 65ec: e59a0000 ldr r0, [sl] <== NOT EXECUTED 65f0: e28a100c add r1, sl, #12 <== NOT EXECUTED 65f4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 65f8: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED 65fc: e58dc000 str ip, [sp] <== NOT EXECUTED 6600: eb002bbf bl 11504 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 6604: eaffffee b 65c4 <== 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); 6608: e1a00006 mov r0, r6 <== NOT EXECUTED 660c: eb000319 bl 7278 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); 6610: e59f0144 ldr r0, [pc, #324] ; 675c <== NOT EXECUTED 6614: eb0002f6 bl 71f4 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) 6618: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 661c: e1540003 cmp r4, r3 <== NOT EXECUTED 6620: 1affffb7 bne 6504 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); 6624: e28d1020 add r1, sp, #32 <== NOT EXECUTED 6628: e3a00001 mov r0, #1 <== NOT EXECUTED 662c: eb000154 bl 6b84 <== NOT EXECUTED timeout.tv_sec += 3; 6630: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 6634: 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; 6638: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 663c: e1a00004 mov r0, r4 <== NOT EXECUTED 6640: e59f1114 ldr r1, [pc, #276] ; 675c <== NOT EXECUTED 6644: 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; 6648: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 664c: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&r_chain->cond, 6650: eb0001eb bl 6e04 <== 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) { 6654: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 6658: 1affffa9 bne 6504 <== NOT EXECUTED 665c: e1a00005 mov r0, r5 <== NOT EXECUTED 6660: eb000956 bl 8bc0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 6664: e1a00006 mov r0, r6 <== NOT EXECUTED 6668: eb00023e bl 6f68 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 666c: e1a00004 mov r0, r4 <== NOT EXECUTED 6670: eb000165 bl 6c0c <== NOT EXECUTED free (r_chain); 6674: e1a00005 mov r0, r5 <== NOT EXECUTED 6678: ebfff178 bl 2c60 <== 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)) { 667c: e59f20d8 ldr r2, [pc, #216] ; 675c <== NOT EXECUTED 6680: e5923054 ldr r3, [r2, #84] ; 0x54 <== NOT EXECUTED 6684: e59f20d4 ldr r2, [pc, #212] ; 6760 <== NOT EXECUTED 6688: e1530002 cmp r3, r2 <== NOT EXECUTED 668c: 0a000002 beq 669c <== 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); 6690: e59f00c4 ldr r0, [pc, #196] ; 675c <== NOT EXECUTED 6694: eb0002f7 bl 7278 <== NOT EXECUTED 6698: eaffff99 b 6504 <== 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; 669c: e59f20b8 ldr r2, [pc, #184] ; 675c <== NOT EXECUTED 66a0: e5923068 ldr r3, [r2, #104] ; 0x68 <== NOT EXECUTED 66a4: e2833001 add r3, r3, #1 <== NOT EXECUTED 66a8: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 66ac: e28d1020 add r1, sp, #32 <== NOT EXECUTED 66b0: e3a00001 mov r0, #1 <== NOT EXECUTED 66b4: eb000132 bl 6b84 <== NOT EXECUTED timeout.tv_sec += 3; 66b8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 66bc: e59f00a0 ldr r0, [pc, #160] ; 6764 <== 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; 66c0: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 66c4: e59f1090 ldr r1, [pc, #144] ; 675c <== NOT EXECUTED 66c8: 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; 66cc: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 66d0: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&aio_request_queue.new_req, 66d4: eb0001ca bl 6e04 <== 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) { 66d8: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 66dc: 0a00001b beq 6750 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 66e0: e59f3074 ldr r3, [pc, #116] ; 675c <== NOT EXECUTED 66e4: 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; 66e8: e5933068 ldr r3, [r3, #104] ; 0x68 <== NOT EXECUTED 66ec: e59f2068 ldr r2, [pc, #104] ; 675c <== NOT EXECUTED 66f0: e2433001 sub r3, r3, #1 <== NOT EXECUTED 66f4: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED 66f8: e1a00004 mov r0, r4 <== NOT EXECUTED 66fc: eb00092f bl 8bc0 <_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, 6700: e3a02001 mov r2, #1 <== NOT EXECUTED 6704: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED 6708: e59f0058 ldr r0, [pc, #88] ; 6768 <== NOT EXECUTED 670c: ebffff41 bl 6418 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 6710: 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, 6714: 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); 6718: 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; 671c: e580a018 str sl, [r0, #24] <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); 6720: e1a00006 mov r0, r6 <== NOT EXECUTED 6724: eb00025f bl 70a8 <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 6728: e2844008 add r4, r4, #8 <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); pthread_cond_init (&r_chain->cond, NULL); 672c: e1a0100a mov r1, sl <== NOT EXECUTED 6730: e2850020 add r0, r5, #32 <== NOT EXECUTED 6734: eb000167 bl 6cd8 <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 6738: e8940007 ldm r4, {r0, r1, r2} <== NOT EXECUTED 673c: e2853008 add r3, r5, #8 <== NOT EXECUTED 6740: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED 6744: eaffff6e b 6504 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 6748: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED 674c: eaffff8a b 657c <== 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); 6750: e59f0004 ldr r0, [pc, #4] ; 675c <== NOT EXECUTED 6754: eb0002c7 bl 7278 <== NOT EXECUTED return NULL; 6758: eaffff8f b 659c <== NOT EXECUTED =============================================================================== 00006314 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 6314: e92d4070 push {r4, r5, r6, lr} int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 6318: e59f00e8 ldr r0, [pc, #232] ; 6408 631c: eb00041b bl 7390 if (result != 0) 6320: e2505000 subs r5, r0, #0 6324: 0a000001 beq 6330 aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } 6328: e1a00005 mov r0, r5 <== NOT EXECUTED 632c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED result = pthread_attr_init (&aio_request_queue.attr); if (result != 0) return result; result = 6330: e59f00d0 ldr r0, [pc, #208] ; 6408 6334: e1a01005 mov r1, r5 6338: eb000427 bl 73dc pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 633c: e3500000 cmp r0, #0 6340: 1a00001c bne 63b8 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 6344: e59f40c0 ldr r4, [pc, #192] ; 640c 6348: e3a01000 mov r1, #0 634c: e1a00004 mov r0, r4 6350: eb000354 bl 70a8 if (result != 0) 6354: e3500000 cmp r0, #0 6358: 1a00001e bne 63d8 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); 635c: e59f00ac ldr r0, [pc, #172] ; 6410 6360: e3a01000 mov r1, #0 6364: eb00025b bl 6cd8 if (result != 0) { 6368: e2505000 subs r5, r0, #0 636c: 1a000020 bne 63f4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 6370: e59f209c ldr r2, [pc, #156] ; 6414 rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 6374: e3a01a0b mov r1, #45056 ; 0xb000 head->previous = NULL; 6378: e3a03000 mov r3, #0 tail->previous = head; 637c: e2820008 add r0, r2, #8 6380: e2426004 sub r6, r2, #4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 6384: e282c00c add ip, r2, #12 6388: e281100b add r1, r1, #11 head->previous = NULL; tail->previous = head; 638c: e584005c str r0, [r4, #92] ; 0x5c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 6390: e5842048 str r2, [r4, #72] ; 0x48 head->previous = NULL; 6394: e584304c str r3, [r4, #76] ; 0x4c tail->previous = head; 6398: e5846050 str r6, [r4, #80] ; 0x50 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 639c: e584c054 str ip, [r4, #84] ; 0x54 head->previous = NULL; 63a0: 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; 63a4: e5843064 str r3, [r4, #100] ; 0x64 aio_request_queue.idle_threads = 0; 63a8: e5843068 str r3, [r4, #104] ; 0x68 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 63ac: e5841060 str r1, [r4, #96] ; 0x60 return result; } 63b0: e1a00005 mov r0, r5 63b4: e8bd8070 pop {r4, r5, r6, pc} PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 63b8: e59f404c ldr r4, [pc, #76] ; 640c <== NOT EXECUTED result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); 63bc: e59f0044 ldr r0, [pc, #68] ; 6408 <== NOT EXECUTED 63c0: eb0003e9 bl 736c <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 63c4: e3a01000 mov r1, #0 <== NOT EXECUTED 63c8: e1a00004 mov r0, r4 <== NOT EXECUTED 63cc: eb000335 bl 70a8 <== NOT EXECUTED if (result != 0) 63d0: e3500000 cmp r0, #0 <== NOT EXECUTED 63d4: 0affffe0 beq 635c <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 63d8: e2840008 add r0, r4, #8 <== NOT EXECUTED 63dc: eb0003e2 bl 736c <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); 63e0: e59f0028 ldr r0, [pc, #40] ; 6410 <== NOT EXECUTED 63e4: e3a01000 mov r1, #0 <== NOT EXECUTED 63e8: eb00023a bl 6cd8 <== NOT EXECUTED if (result != 0) { 63ec: e2505000 subs r5, r0, #0 <== NOT EXECUTED 63f0: 0affffde beq 6370 <== NOT EXECUTED pthread_mutex_destroy (&aio_request_queue.mutex); 63f4: e59f0010 ldr r0, [pc, #16] ; 640c <== NOT EXECUTED 63f8: eb0002da bl 6f68 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 63fc: e59f0004 ldr r0, [pc, #4] ; 6408 <== NOT EXECUTED 6400: eb0003d9 bl 736c <== NOT EXECUTED 6404: eaffffd9 b 6370 <== NOT EXECUTED =============================================================================== 0000676c : } AIO_printf ("Thread finished\n"); return NULL; } 676c: e1a02000 mov r2, r0 6770: e4923004 ldr r3, [r2], #4 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 6774: e1530002 cmp r3, r2 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 6778: e1a0c001 mov ip, r1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 677c: 0a00000f beq 67c0 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 && 6780: 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; 6784: e5931014 ldr r1, [r3, #20] while (req->aiocbp->aio_reqprio > prio && 6788: e5900014 ldr r0, [r0, #20] 678c: e5911014 ldr r1, [r1, #20] 6790: e1510000 cmp r1, r0 6794: ba000002 blt 67a4 6798: ea000006 b 67b8 679c: e1530002 cmp r3, r2 67a0: 0a000004 beq 67b8 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 67a4: 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; 67a8: 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 && 67ac: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED 67b0: e1510000 cmp r1, r0 <== NOT EXECUTED 67b4: bafffff8 blt 679c <== 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 ); 67b8: e5930004 ldr r0, [r3, #4] 67bc: e1a0100c mov r1, ip 67c0: ea000913 b 8c14 <_Chain_Insert> =============================================================================== 000067c4 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 67c4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 67c8: 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)); 67cc: 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)) 67d0: e1540000 cmp r4, r0 <== NOT EXECUTED 67d4: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 67d8: e1a00004 mov r0, r4 <== NOT EXECUTED 67dc: eb0008f7 bl 8bc0 <_Chain_Extract> <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 67e0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 67e4: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED req->aiocbp->return_value = -1; 67e8: 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; 67ec: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; 67f0: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); 67f4: e1a00004 mov r0, r4 <== NOT EXECUTED 67f8: ebfff118 bl 2c60 <== NOT EXECUTED 67fc: e1a00004 mov r0, r4 <== NOT EXECUTED 6800: eb0008ee bl 8bc0 <_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; 6804: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED req->aiocbp->return_value = -1; free (req); 6808: 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; 680c: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; 6810: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); 6814: ebfff111 bl 2c60 <== NOT EXECUTED 6818: eafffff7 b 67fc <== NOT EXECUTED =============================================================================== 0000681c : * 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) { 681c: e92d4010 push {r4, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 6820: 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) { 6824: 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; 6828: 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) { 682c: 1a000003 bne 6840 <== NOT EXECUTED 6830: e8bd8010 pop {r4, pc} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 6834: 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) { 6838: e1540000 cmp r4, r0 <== NOT EXECUTED 683c: 0a00000d beq 6878 <== NOT EXECUTED 6840: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 6844: e1530001 cmp r3, r1 <== NOT EXECUTED 6848: 1afffff9 bne 6834 <== NOT EXECUTED 684c: e1a00004 mov r0, r4 <== NOT EXECUTED 6850: eb0008da bl 8bc0 <_Chain_Extract> <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 6854: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 6858: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED 685c: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED current->aiocbp->return_value = -1; 6860: e3e02000 mvn r2, #0 <== NOT EXECUTED free (current); 6864: e1a00004 mov r0, r4 <== NOT EXECUTED return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; 6868: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED free (current); 686c: ebfff0fb bl 2c60 <== NOT EXECUTED } return AIO_CANCELED; 6870: e3a00000 mov r0, #0 <== NOT EXECUTED 6874: 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; 6878: e3a00001 mov r0, #1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 687c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00006fc0 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 6fc0: e59f3150 ldr r3, [pc, #336] ; 7118 6fc4: e593c000 ldr ip, [r3] rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 6fc8: e59f314c ldr r3, [pc, #332] ; 711c if ( rtems_interrupt_is_in_progress() ) 6fcc: 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 ) { 6fd0: e92d4030 push {r4, r5, lr} 6fd4: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 6fd8: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 6fdc: 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() ) 6fe0: 18bd8030 popne {r4, r5, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 6fe4: e3520000 cmp r2, #0 6fe8: 0a00003f beq 70ec return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 6fec: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 6ff0: e5820000 str r0, [r2] if ( driver_table == NULL ) 6ff4: 0a00003c beq 70ec static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 6ff8: e591c000 ldr ip, [r1] 6ffc: e35c0000 cmp ip, #0 7000: 0a000036 beq 70e0 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 7004: e1500004 cmp r0, r4 7008: 9a000027 bls 70ac rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 700c: e59f010c ldr r0, [pc, #268] ; 7120 7010: e590c000 ldr ip, [r0] 7014: e28cc001 add ip, ip, #1 7018: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 701c: e3540000 cmp r4, #0 7020: 1a000023 bne 70b4 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 7024: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 7028: e35c0000 cmp ip, #0 702c: 0a000030 beq 70f4 7030: e59fe0ec ldr lr, [pc, #236] ; 7124 7034: e59e3000 ldr r3, [lr] 7038: ea000003 b 704c 703c: e2844001 add r4, r4, #1 7040: e15c0004 cmp ip, r4 7044: e2833018 add r3, r3, #24 7048: 9a000005 bls 7064 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 704c: e5930000 ldr r0, [r3] 7050: e3500000 cmp r0, #0 7054: 1afffff8 bne 703c 7058: e5930004 ldr r0, [r3, #4] 705c: e3500000 cmp r0, #0 7060: 1afffff5 bne 703c } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 7064: e15c0004 cmp ip, r4 7068: 1084c084 addne ip, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 706c: e5824000 str r4, [r2] if ( m != n ) 7070: 11a0c18c lslne ip, ip, #3 7074: 0a00001f beq 70f8 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 7078: e59e5000 ldr r5, [lr] 707c: e1a0e001 mov lr, r1 7080: e8be000f ldm lr!, {r0, r1, r2, r3} 7084: e085c00c add ip, r5, ip 7088: e8ac000f stmia ip!, {r0, r1, r2, r3} 708c: e89e0003 ldm lr, {r0, r1} 7090: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 7094: eb000755 bl 8df0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 7098: e3a01000 mov r1, #0 709c: e1a00004 mov r0, r4 70a0: e1a02001 mov r2, r1 } 70a4: e8bd4030 pop {r4, r5, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 70a8: ea002142 b f5b8 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 70ac: e3a0000a mov r0, #10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 70b0: 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; 70b4: e59fe068 ldr lr, [pc, #104] ; 7124 70b8: e59e3000 ldr r3, [lr] 70bc: e084c084 add ip, r4, r4, lsl #1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 70c0: e793018c ldr r0, [r3, ip, lsl #3] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 70c4: e1a0c18c lsl ip, ip, #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 70c8: e3500000 cmp r0, #0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 70cc: 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; 70d0: 0a00000b beq 7104 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(); 70d4: eb000745 bl 8df0 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 70d8: e3a0000c mov r0, #12 70dc: 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; 70e0: e591c004 ldr ip, [r1, #4] 70e4: e35c0000 cmp ip, #0 70e8: 1affffc5 bne 7004 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 70ec: e3a00009 mov r0, #9 70f0: e8bd8030 pop {r4, r5, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 70f4: 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(); 70f8: eb00073c bl 8df0 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 70fc: 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; 7100: 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; 7104: e5933004 ldr r3, [r3, #4] 7108: e3530000 cmp r3, #0 710c: 1afffff0 bne 70d4 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 7110: e5824000 str r4, [r2] 7114: eaffffd7 b 7078 =============================================================================== 000058fc : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 58fc: e3500001 cmp r0, #1 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 5900: 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 ) 5904: 0a00000d beq 5940 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 5908: e3500002 cmp r0, #2 590c: 0a000004 beq 5924 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 5910: e3500003 cmp r0, #3 api_assoc = rtems_object_api_posix_assoc; 5914: 059f003c ldreq r0, [pc, #60] ; 5958 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 ) 5918: 0a000002 beq 5928 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 591c: e59f0038 ldr r0, [pc, #56] ; 595c 5920: 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; 5924: e59f0034 ldr r0, [pc, #52] ; 5960 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 ); 5928: eb00137f bl a72c if ( class_assoc ) 592c: e3500000 cmp r0, #0 return class_assoc->name; 5930: 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 ) 5934: 149df004 popne {pc} ; (ldrne pc, [sp], #4) return class_assoc->name; return "BAD CLASS"; 5938: e59f0024 ldr r0, [pc, #36] ; 5964 } 593c: 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; 5940: e59f0020 ldr r0, [pc, #32] ; 5968 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 ); 5944: eb001378 bl a72c if ( class_assoc ) 5948: e3500000 cmp r0, #0 return class_assoc->name; 594c: 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 ) 5950: 149df004 popne {pc} ; (ldrne pc, [sp], #4) 5954: eafffff7 b 5938 =============================================================================== 0000d660 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { d660: 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 ) d664: e2525000 subs r5, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { d668: e1a04000 mov r4, r0 d66c: 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; d670: 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 ) d674: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; d678: e59f9148 ldr r9, [pc, #328] ; d7c8 d67c: 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; d680: e5d7a074 ldrb sl, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; d684: 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 ) d688: 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; d68c: 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; d690: 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; d694: 03a0ac01 moveq sl, #256 ; 0x100 d698: 13a0a000 movne sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) d69c: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; d6a0: 138aac02 orrne sl, sl, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; d6a4: e35b0000 cmp fp, #0 d6a8: 03a0bb01 moveq fp, #1024 ; 0x400 d6ac: 13a0b000 movne fp, #0 old_mode |= _ISR_Get_level(); d6b0: ebffee75 bl 908c <_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; d6b4: e18bb000 orr fp, fp, r0 old_mode |= _ISR_Get_level(); d6b8: e18ba00a orr sl, fp, sl *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) d6bc: 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; d6c0: e585a000 str sl, [r5] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) d6c4: 0a000003 beq d6d8 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; d6c8: e3140c01 tst r4, #256 ; 0x100 d6cc: 13a03000 movne r3, #0 d6d0: 03a03001 moveq r3, #1 d6d4: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { d6d8: e3160c02 tst r6, #512 ; 0x200 d6dc: 1a000028 bne d784 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) d6e0: e3160080 tst r6, #128 ; 0x80 d6e4: 1a00002f bne d7a8 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { d6e8: e2166b01 ands r6, r6, #1024 ; 0x400 d6ec: 0a000012 beq d73c * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( d6f0: 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 ) { d6f4: e5d82008 ldrb r2, [r8, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( d6f8: 13a03000 movne r3, #0 d6fc: 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 ) { d700: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; d704: 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 ) { d708: 0a00000b beq d73c asr->is_enabled = is_asr_enabled; d70c: e5c83008 strb r3, [r8, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( d710: e10f3000 mrs r3, CPSR d714: e3832080 orr r2, r3, #128 ; 0x80 d718: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; d71c: e5981018 ldr r1, [r8, #24] information->signals_pending = information->signals_posted; d720: e5982014 ldr r2, [r8, #20] information->signals_posted = _signals; d724: 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; d728: e5882018 str r2, [r8, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( d72c: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { d730: e5986014 ldr r6, [r8, #20] d734: e3560000 cmp r6, #0 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; d738: 13a06001 movne r6, #1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { d73c: e59f3088 ldr r3, [pc, #136] ; d7cc d740: e5933000 ldr r3, [r3] d744: e3530003 cmp r3, #3 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; d748: 13a00000 movne r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { d74c: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || d750: e3560000 cmp r6, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; d754: e5993004 ldr r3, [r9, #4] if ( are_signals_pending || d758: 1a000015 bne d7b4 d75c: e59f2064 ldr r2, [pc, #100] ; d7c8 d760: e5922008 ldr r2, [r2, #8] d764: e1530002 cmp r3, r2 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; d768: 01a00006 moveq r0, r6 d76c: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { d770: e5d33074 ldrb r3, [r3, #116] ; 0x74 d774: e3530000 cmp r3, #0 d778: 1a00000d bne d7b4 d77c: e1a00006 mov r0, r6 <== NOT EXECUTED } d780: 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) ) { d784: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; d788: 159f3040 ldrne r3, [pc, #64] ; d7d0 d78c: 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; d790: 13a02001 movne r2, #1 d794: 1587207c strne r2, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; d798: 15873078 strne r3, [r7, #120] ; 0x78 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; d79c: 0587307c streq r3, [r7, #124] ; 0x7c } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) d7a0: e3160080 tst r6, #128 ; 0x80 d7a4: 0affffcf beq d6e8 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); d7a8: e2040080 and r0, r4, #128 ; 0x80 d7ac: ebffee31 bl 9078 <_CPU_ISR_Set_level> d7b0: eaffffcc b d6e8 _Thread_Dispatch_necessary = true; d7b4: e3a03001 mov r3, #1 d7b8: e5c93010 strb r3, [r9, #16] } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); d7bc: ebffe852 bl 790c <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; d7c0: e3a00000 mov r0, #0 d7c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000086f4 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 86f4: e92d4010 push {r4, lr} 86f8: e24dd004 sub sp, sp, #4 86fc: 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 ); 8700: e1a00001 mov r0, r1 8704: e1a0100d mov r1, sp 8708: eb001673 bl e0dc <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 870c: e3500003 cmp r0, #3 8710: 0a000005 beq 872c do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 8714: e1a00004 mov r0, r4 <== NOT EXECUTED 8718: e3a01000 mov r1, #0 <== NOT EXECUTED 871c: e59d2000 ldr r2, [sp] <== NOT EXECUTED 8720: eb001989 bl ed4c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 8724: e28dd004 add sp, sp, #4 8728: 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 ); 872c: e1a00004 mov r0, r4 8730: e3a01001 mov r1, #1 8734: e59d2000 ldr r2, [sp] 8738: eb001983 bl ed4c <_POSIX_Semaphore_Wait_support> 873c: eafffff8 b 8724 =============================================================================== 00005f4c : struct sigaction *oact ) { ISR_Level level; if ( oact ) 5f4c: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 5f50: 159f20c4 ldrne r2, [pc, #196] ; 601c int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 5f54: e92d4070 push {r4, r5, r6, lr} 5f58: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 5f5c: 10801080 addne r1, r0, r0, lsl #1 5f60: 10822101 addne r2, r2, r1, lsl #2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 5f64: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 5f68: 18920007 ldmne r2, {r0, r1, r2} 5f6c: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 5f70: e3540000 cmp r4, #0 5f74: 0a000023 beq 6008 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5f78: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5f7c: e353001f cmp r3, #31 5f80: 8a000020 bhi 6008 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 5f84: e3540009 cmp r4, #9 5f88: 0a00001e beq 6008 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 5f8c: e3550000 cmp r5, #0 5f90: 0a00001a beq 6000 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 5f94: e10f6000 mrs r6, CPSR 5f98: e3863080 orr r3, r6, #128 ; 0x80 5f9c: 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 ) { 5fa0: e5953008 ldr r3, [r5, #8] 5fa4: e3530000 cmp r3, #0 5fa8: 0a000009 beq 5fd4 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 5fac: e1a00004 mov r0, r4 5fb0: eb001743 bl bcc4 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 5fb4: e59f3060 ldr r3, [pc, #96] ; 601c 5fb8: e8950007 ldm r5, {r0, r1, r2} 5fbc: e0844084 add r4, r4, r4, lsl #1 5fc0: e0834104 add r4, r3, r4, lsl #2 5fc4: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 5fc8: 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; 5fcc: e3a00000 mov r0, #0 5fd0: 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 ]; 5fd4: e0844084 add r4, r4, r4, lsl #1 5fd8: e59f3040 ldr r3, [pc, #64] ; 6020 5fdc: e1a04104 lsl r4, r4, #2 5fe0: e0833004 add r3, r3, r4 5fe4: e8930007 ldm r3, {r0, r1, r2} 5fe8: e59f302c ldr r3, [pc, #44] ; 601c 5fec: e0834004 add r4, r3, r4 5ff0: e8840007 stm r4, {r0, r1, r2} 5ff4: 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; 5ff8: e3a00000 mov r0, #0 5ffc: e8bd8070 pop {r4, r5, r6, pc} 6000: e1a00005 mov r0, r5 <== NOT EXECUTED } 6004: 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 ); 6008: eb0023a6 bl eea8 <__errno> 600c: e3a03016 mov r3, #22 6010: e5803000 str r3, [r0] 6014: e3e00000 mvn r0, #0 6018: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000085bc : int sigwait( const sigset_t *set, int *sig ) { 85bc: e92d4010 push {r4, lr} 85c0: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 85c4: e3a01000 mov r1, #0 85c8: e1a02001 mov r2, r1 85cc: ebffff7f bl 83d0 if ( status != -1 ) { 85d0: e3700001 cmn r0, #1 85d4: 0a000005 beq 85f0 if ( sig ) 85d8: e3540000 cmp r4, #0 *sig = status; 85dc: 15840000 strne r0, [r4] return 0; 85e0: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 85e4: 18bd8010 popne {r4, pc} *sig = status; return 0; 85e8: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 85ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 85f0: eb002305 bl 1120c <__errno> 85f4: e5900000 ldr r0, [r0] 85f8: e8bd8010 pop {r4, pc}