=============================================================================== 30014cb0 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30014cb0: 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 ) { 30014cb4: 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 ) { 30014cb8: e1520003 cmp r2, r3 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 30014cbc: e1a06000 mov r6, r0 30014cc0: e1a0a001 mov sl, r1 30014cc4: e1a07002 mov r7, r2 30014cc8: e59d8020 ldr r8, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30014ccc: 8a000013 bhi 30014d20 <_CORE_message_queue_Broadcast+0x70> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 30014cd0: e5905048 ldr r5, [r0, #72] ; 0x48 30014cd4: e3550000 cmp r5, #0 *count = 0; 30014cd8: 13a00000 movne r0, #0 30014cdc: 15880000 strne r0, [r8] * 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 ) { 30014ce0: 0a000007 beq 30014d04 <_CORE_message_queue_Broadcast+0x54> 30014ce4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30014ce8: e594002c ldr r0, [r4, #44] ; 0x2c 30014cec: e1a0100a mov r1, sl 30014cf0: e1a02007 mov r2, r7 30014cf4: eb00221e bl 3001d574 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30014cf8: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 30014cfc: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30014d00: e5837000 str r7, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30014d04: e1a00006 mov r0, r6 30014d08: eb000a82 bl 30017718 <_Thread_queue_Dequeue> 30014d0c: e2504000 subs r4, r0, #0 30014d10: 1afffff4 bne 30014ce8 <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 30014d14: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 30014d18: e1a00004 mov r0, r4 30014d1c: 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; 30014d20: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30014d24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 30006e08 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 30006e0c: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e10: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 30006e14: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 30006e18: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 30006e1c: e59f4500 ldr r4, [pc, #1280] ; 30007324 <_Heap_Walk+0x51c> ) { uintptr_t const page_size = heap->page_size; 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; 30006e20: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 30006e24: e59f34fc ldr r3, [pc, #1276] ; 30007328 <_Heap_Walk+0x520> 30006e28: e31200ff tst r2, #255 ; 0xff 30006e2c: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006e30: e59f34f4 ldr r3, [pc, #1268] ; 3000732c <_Heap_Walk+0x524> bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 30006e34: e590c020 ldr ip, [r0, #32] 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() ) ) { 30006e38: e5933000 ldr r3, [r3] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e3c: e1a06000 mov r6, r0 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() ) ) { 30006e40: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e44: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 30006e48: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 30006e4c: e58dc020 str ip, [sp, #32] 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() ) ) { 30006e50: 1a000127 bne 300072f4 <_Heap_Walk+0x4ec> 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)( 30006e54: e59dc024 ldr ip, [sp, #36] ; 0x24 30006e58: e59d2020 ldr r2, [sp, #32] 30006e5c: e58dc000 str ip, [sp] 30006e60: e5903018 ldr r3, [r0, #24] 30006e64: e58d3004 str r3, [sp, #4] 30006e68: e590301c ldr r3, [r0, #28] 30006e6c: e58d200c str r2, [sp, #12] 30006e70: e58d3008 str r3, [sp, #8] 30006e74: e59d3028 ldr r3, [sp, #40] ; 0x28 30006e78: e59f24b0 ldr r2, [pc, #1200] ; 30007330 <_Heap_Walk+0x528> 30006e7c: e58d3010 str r3, [sp, #16] 30006e80: e5903008 ldr r3, [r0, #8] 30006e84: e58d3014 str r3, [sp, #20] 30006e88: e590300c ldr r3, [r0, #12] 30006e8c: e1a00001 mov r0, r1 30006e90: e58d3018 str r3, [sp, #24] 30006e94: e3a01000 mov r1, #0 30006e98: e1a03009 mov r3, r9 30006e9c: e1a0e00f mov lr, pc 30006ea0: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 30006ea4: e3590000 cmp r9, #0 30006ea8: 1a000006 bne 30006ec8 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 30006eac: e1a00005 mov r0, r5 30006eb0: e3a01001 mov r1, #1 30006eb4: e59f2478 ldr r2, [pc, #1144] ; 30007334 <_Heap_Walk+0x52c> 30006eb8: e1a0e00f mov lr, pc 30006ebc: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30006ec0: e1a08009 mov r8, r9 30006ec4: ea00010b b 300072f8 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 30006ec8: e2198007 ands r8, r9, #7 (*printer)( 30006ecc: 11a00005 movne r0, r5 30006ed0: 13a01001 movne r1, #1 30006ed4: 159f245c ldrne r2, [pc, #1116] ; 30007338 <_Heap_Walk+0x530> 30006ed8: 11a03009 movne r3, r9 30006edc: 1a00010c bne 30007314 <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30006ee0: e59d0024 ldr r0, [sp, #36] ; 0x24 30006ee4: e1a01009 mov r1, r9 30006ee8: ebffe72b bl 30000b9c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 30006eec: e250b000 subs fp, r0, #0 30006ef0: 0a000006 beq 30006f10 <_Heap_Walk+0x108> (*printer)( 30006ef4: e1a00005 mov r0, r5 30006ef8: e3a01001 mov r1, #1 30006efc: e59f2438 ldr r2, [pc, #1080] ; 3000733c <_Heap_Walk+0x534> 30006f00: e59d3024 ldr r3, [sp, #36] ; 0x24 30006f04: e1a0e00f mov lr, pc 30006f08: e12fff14 bx r4 30006f0c: ea0000f9 b 300072f8 <_Heap_Walk+0x4f0> 30006f10: e59dc020 ldr ip, [sp, #32] 30006f14: e1a01009 mov r1, r9 30006f18: e28c0008 add r0, ip, #8 30006f1c: ebffe71e bl 30000b9c <__umodsi3> ); return false; } if ( 30006f20: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 30006f24: 11a00005 movne r0, r5 30006f28: 13a01001 movne r1, #1 30006f2c: 159f240c ldrne r2, [pc, #1036] ; 30007340 <_Heap_Walk+0x538> 30006f30: 159d3020 ldrne r3, [sp, #32] 30006f34: 1a0000cc bne 3000726c <_Heap_Walk+0x464> 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; 30006f38: e59d2020 ldr r2, [sp, #32] 30006f3c: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 30006f40: e2188001 ands r8, r8, #1 (*printer)( 30006f44: 01a00005 moveq r0, r5 30006f48: 03a01001 moveq r1, #1 30006f4c: 059f23f0 ldreq r2, [pc, #1008] ; 30007344 <_Heap_Walk+0x53c> 30006f50: 0a000009 beq 30006f7c <_Heap_Walk+0x174> - 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; 30006f54: e59d3028 ldr r3, [sp, #40] ; 0x28 30006f58: e5937004 ldr r7, [r3, #4] 30006f5c: e3c77001 bic r7, r7, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 30006f60: e0837007 add r7, r3, 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; 30006f64: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 30006f68: e2188001 ands r8, r8, #1 30006f6c: 1a000005 bne 30006f88 <_Heap_Walk+0x180> (*printer)( 30006f70: e59f23d0 ldr r2, [pc, #976] ; 30007348 <_Heap_Walk+0x540> 30006f74: e1a00005 mov r0, r5 30006f78: e3a01001 mov r1, #1 30006f7c: e1a0e00f mov lr, pc 30006f80: e12fff14 bx r4 30006f84: ea0000db b 300072f8 <_Heap_Walk+0x4f0> ); return false; } if ( 30006f88: e59dc020 ldr ip, [sp, #32] 30006f8c: e157000c cmp r7, ip 30006f90: 0a000006 beq 30006fb0 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 30006f94: e1a00005 mov r0, r5 <== NOT EXECUTED 30006f98: e3a01001 mov r1, #1 <== NOT EXECUTED 30006f9c: e59f23a8 ldr r2, [pc, #936] ; 3000734c <_Heap_Walk+0x544> <== NOT EXECUTED 30006fa0: e1a0e00f mov lr, pc <== NOT EXECUTED 30006fa4: e12fff14 bx r4 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30006fa8: e1a0800a mov r8, sl <== NOT EXECUTED 30006fac: ea0000d1 b 300072f8 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30006fb0: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 30006fb4: e5968008 ldr r8, [r6, #8] Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 30006fb8: e1a0a006 mov sl, r6 30006fbc: ea000034 b 30007094 <_Heap_Walk+0x28c> 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; 30006fc0: e5963020 ldr r3, [r6, #32] 30006fc4: e1530008 cmp r3, r8 30006fc8: 83a0c000 movhi ip, #0 30006fcc: 8a000003 bhi 30006fe0 <_Heap_Walk+0x1d8> 30006fd0: e596c024 ldr ip, [r6, #36] ; 0x24 30006fd4: e15c0008 cmp ip, r8 30006fd8: 33a0c000 movcc ip, #0 30006fdc: 23a0c001 movcs ip, #1 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 30006fe0: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 30006fe4: 01a00005 moveq r0, r5 30006fe8: 03a01001 moveq r1, #1 30006fec: 059f235c ldreq r2, [pc, #860] ; 30007350 <_Heap_Walk+0x548> 30006ff0: 0a000012 beq 30007040 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30006ff4: e2880008 add r0, r8, #8 30006ff8: e1a0100b mov r1, fp 30006ffc: ebffe6e6 bl 30000b9c <__umodsi3> ); return false; } if ( 30007000: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 30007004: 11a00005 movne r0, r5 30007008: 13a01001 movne r1, #1 3000700c: 159f2340 ldrne r2, [pc, #832] ; 30007354 <_Heap_Walk+0x54c> 30007010: 11a03008 movne r3, r8 30007014: 1a0000be bne 30007314 <_Heap_Walk+0x50c> - 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; 30007018: e5983004 ldr r3, [r8, #4] 3000701c: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 30007020: e0883003 add r3, r8, 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; 30007024: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007028: e2133001 ands r3, r3, #1 3000702c: e58d302c str r3, [sp, #44] ; 0x2c 30007030: 0a000009 beq 3000705c <_Heap_Walk+0x254> (*printer)( 30007034: e59f231c ldr r2, [pc, #796] ; 30007358 <_Heap_Walk+0x550> 30007038: e1a00005 mov r0, r5 3000703c: e3a01001 mov r1, #1 30007040: e1a03008 mov r3, r8 30007044: e58dc01c str ip, [sp, #28] 30007048: e1a0e00f mov lr, pc 3000704c: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007050: e59dc01c ldr ip, [sp, #28] 30007054: e1a0800c mov r8, ip 30007058: ea0000a6 b 300072f8 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 3000705c: e598300c ldr r3, [r8, #12] 30007060: e153000a cmp r3, sl 30007064: 0a000008 beq 3000708c <_Heap_Walk+0x284> (*printer)( 30007068: e58d3000 str r3, [sp] 3000706c: e1a00005 mov r0, r5 30007070: e1a03008 mov r3, r8 30007074: e3a01001 mov r1, #1 30007078: e59f22dc ldr r2, [pc, #732] ; 3000735c <_Heap_Walk+0x554> 3000707c: e1a0e00f mov lr, pc 30007080: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007084: e59d802c ldr r8, [sp, #44] ; 0x2c 30007088: ea00009a b 300072f8 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 3000708c: e1a0a008 mov sl, r8 30007090: e5988008 ldr r8, [r8, #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 ) { 30007094: e1580006 cmp r8, r6 30007098: 1affffc8 bne 30006fc0 <_Heap_Walk+0x1b8> 3000709c: ea000000 b 300070a4 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 300070a0: e1a07008 mov r7, r8 return true; } 300070a4: e5973004 ldr r3, [r7, #4] 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; 300070a8: e5962020 ldr r2, [r6, #32] - 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; 300070ac: e3c3a001 bic sl, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 300070b0: e087800a add r8, r7, sl 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; 300070b4: e1520008 cmp r2, r8 300070b8: 83a0b000 movhi fp, #0 300070bc: 8a000003 bhi 300070d0 <_Heap_Walk+0x2c8> 300070c0: e596b024 ldr fp, [r6, #36] ; 0x24 300070c4: e15b0008 cmp fp, r8 300070c8: 33a0b000 movcc fp, #0 300070cc: 23a0b001 movcs fp, #1 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 300070d0: e21bb0ff ands fp, fp, #255 ; 0xff 300070d4: 1a000007 bne 300070f8 <_Heap_Walk+0x2f0> (*printer)( 300070d8: e58d8000 str r8, [sp] 300070dc: e1a00005 mov r0, r5 300070e0: e3a01001 mov r1, #1 300070e4: e59f2274 ldr r2, [pc, #628] ; 30007360 <_Heap_Walk+0x558> 300070e8: e1a03007 mov r3, r7 300070ec: e1a0e00f mov lr, pc 300070f0: e12fff14 bx r4 300070f4: ea00005e b 30007274 <_Heap_Walk+0x46c> 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; 300070f8: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 300070fc: e1a0000a mov r0, sl 30007100: e1a01009 mov r1, r9 30007104: e057b002 subs fp, r7, r2 30007108: 13a0b001 movne fp, #1 3000710c: e58d301c str r3, [sp, #28] 30007110: ebffe6a1 bl 30000b9c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 30007114: e3500000 cmp r0, #0 30007118: e59d301c ldr r3, [sp, #28] 3000711c: 0a000005 beq 30007138 <_Heap_Walk+0x330> 30007120: e35b0000 cmp fp, #0 (*printer)( 30007124: 158da000 strne sl, [sp] 30007128: 11a00005 movne r0, r5 3000712c: 13a01001 movne r1, #1 30007130: 159f222c ldrne r2, [pc, #556] ; 30007364 <_Heap_Walk+0x55c> 30007134: 1a000014 bne 3000718c <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 30007138: e59dc024 ldr ip, [sp, #36] ; 0x24 3000713c: e15a000c cmp sl, ip 30007140: 2a000009 bcs 3000716c <_Heap_Walk+0x364> 30007144: e35b0000 cmp fp, #0 30007148: 0a000007 beq 3000716c <_Heap_Walk+0x364> (*printer)( 3000714c: e88d1400 stm sp, {sl, ip} 30007150: e1a00005 mov r0, r5 30007154: e3a01001 mov r1, #1 30007158: e59f2208 ldr r2, [pc, #520] ; 30007368 <_Heap_Walk+0x560> 3000715c: e1a03007 mov r3, r7 30007160: e1a0e00f mov lr, pc 30007164: e12fff14 bx r4 30007168: ea00006b b 3000731c <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 3000716c: e1580007 cmp r8, r7 30007170: 8a000009 bhi 3000719c <_Heap_Walk+0x394> 30007174: e35b0000 cmp fp, #0 30007178: 0a000007 beq 3000719c <_Heap_Walk+0x394> (*printer)( 3000717c: e59f21e8 ldr r2, [pc, #488] ; 3000736c <_Heap_Walk+0x564> 30007180: e58d8000 str r8, [sp] 30007184: e1a00005 mov r0, r5 30007188: e3a01001 mov r1, #1 3000718c: e1a03007 mov r3, r7 30007190: e1a0e00f mov lr, pc 30007194: e12fff14 bx r4 30007198: ea00005f b 3000731c <_Heap_Walk+0x514> 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; 3000719c: e203b001 and fp, r3, #1 300071a0: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 300071a4: e3130001 tst r3, #1 300071a8: 1a00003b bne 3000729c <_Heap_Walk+0x494> 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 ? 300071ac: e597200c ldr r2, [r7, #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)( 300071b0: e5963008 ldr r3, [r6, #8] block = next_block; } while ( block != first_block ); return true; } 300071b4: e596100c ldr r1, [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)( 300071b8: e1520003 cmp r2, r3 300071bc: 059f01ac ldreq r0, [pc, #428] ; 30007370 <_Heap_Walk+0x568> 300071c0: 0a000003 beq 300071d4 <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 300071c4: e59f31a8 ldr r3, [pc, #424] ; 30007374 <_Heap_Walk+0x56c> 300071c8: e1520006 cmp r2, r6 300071cc: e59f01a4 ldr r0, [pc, #420] ; 30007378 <_Heap_Walk+0x570> 300071d0: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 300071d4: e5973008 ldr r3, [r7, #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)( 300071d8: e1530001 cmp r3, r1 300071dc: 059f1198 ldreq r1, [pc, #408] ; 3000737c <_Heap_Walk+0x574> 300071e0: 0a000003 beq 300071f4 <_Heap_Walk+0x3ec> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 300071e4: e59fc194 ldr ip, [pc, #404] ; 30007380 <_Heap_Walk+0x578> 300071e8: e1530006 cmp r3, r6 300071ec: e59f1184 ldr r1, [pc, #388] ; 30007378 <_Heap_Walk+0x570> 300071f0: 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)( 300071f4: e58d2004 str r2, [sp, #4] 300071f8: e58d0008 str r0, [sp, #8] 300071fc: e58d300c str r3, [sp, #12] 30007200: e58d1010 str r1, [sp, #16] 30007204: e1a03007 mov r3, r7 30007208: e58da000 str sl, [sp] 3000720c: e1a00005 mov r0, r5 30007210: e3a01000 mov r1, #0 30007214: e59f2168 ldr r2, [pc, #360] ; 30007384 <_Heap_Walk+0x57c> 30007218: e1a0e00f mov lr, pc 3000721c: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 30007220: e5983000 ldr r3, [r8] 30007224: e15a0003 cmp sl, r3 30007228: 0a000009 beq 30007254 <_Heap_Walk+0x44c> (*printer)( 3000722c: e58d3004 str r3, [sp, #4] 30007230: e58da000 str sl, [sp] 30007234: e58d8008 str r8, [sp, #8] 30007238: e1a00005 mov r0, r5 3000723c: e3a01001 mov r1, #1 30007240: e59f2140 ldr r2, [pc, #320] ; 30007388 <_Heap_Walk+0x580> 30007244: e1a03007 mov r3, r7 30007248: e1a0e00f mov lr, pc 3000724c: e12fff14 bx r4 30007250: ea000031 b 3000731c <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 30007254: e35b0000 cmp fp, #0 30007258: 1a000007 bne 3000727c <_Heap_Walk+0x474> (*printer)( 3000725c: e59f2128 ldr r2, [pc, #296] ; 3000738c <_Heap_Walk+0x584> 30007260: e1a00005 mov r0, r5 30007264: e3a01001 mov r1, #1 30007268: e1a03007 mov r3, r7 3000726c: e1a0e00f mov lr, pc 30007270: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 30007274: e1a0800b mov r8, fp 30007278: ea00001e b 300072f8 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 3000727c: e5963008 ldr r3, [r6, #8] 30007280: ea000002 b 30007290 <_Heap_Walk+0x488> { 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 ) { if ( free_block == block ) { 30007284: e1530007 cmp r3, r7 30007288: 0a000016 beq 300072e8 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 3000728c: 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 ) { 30007290: e1530006 cmp r3, r6 30007294: 1afffffa bne 30007284 <_Heap_Walk+0x47c> 30007298: ea000019 b 30007304 <_Heap_Walk+0x4fc> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 3000729c: e35b0000 cmp fp, #0 300072a0: 0a000007 beq 300072c4 <_Heap_Walk+0x4bc> (*printer)( 300072a4: e58da000 str sl, [sp] 300072a8: e1a00005 mov r0, r5 300072ac: e3a01000 mov r1, #0 300072b0: e59f20d8 ldr r2, [pc, #216] ; 30007390 <_Heap_Walk+0x588> 300072b4: e1a03007 mov r3, r7 300072b8: e1a0e00f mov lr, pc 300072bc: e12fff14 bx r4 300072c0: ea000008 b 300072e8 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 300072c4: e58da000 str sl, [sp] 300072c8: e5973000 ldr r3, [r7] 300072cc: e1a00005 mov r0, r5 300072d0: e58d3004 str r3, [sp, #4] 300072d4: e1a0100b mov r1, fp 300072d8: e59f20b4 ldr r2, [pc, #180] ; 30007394 <_Heap_Walk+0x58c> 300072dc: e1a03007 mov r3, r7 300072e0: e1a0e00f mov lr, pc 300072e4: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 300072e8: e59d2020 ldr r2, [sp, #32] 300072ec: e1580002 cmp r8, r2 300072f0: 1affff6a bne 300070a0 <_Heap_Walk+0x298> 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() ) ) { return true; 300072f4: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 300072f8: e1a00008 mov r0, r8 300072fc: e28dd030 add sp, sp, #48 ; 0x30 30007300: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 30007304: e59f208c ldr r2, [pc, #140] ; 30007398 <_Heap_Walk+0x590> 30007308: e1a00005 mov r0, r5 3000730c: e3a01001 mov r1, #1 30007310: e1a03007 mov r3, r7 30007314: e1a0e00f mov lr, pc 30007318: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 3000731c: e3a08000 mov r8, #0 30007320: eafffff4 b 300072f8 <_Heap_Walk+0x4f0> =============================================================================== 30006228 <_Internal_error_Occurred>: bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 30006228: e59f3038 ldr r3, [pc, #56] ; 30006268 <_Internal_error_Occurred+0x40> void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 3000622c: e20110ff and r1, r1, #255 ; 0xff 30006230: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Internal_errors_What_happened.the_source = the_source; 30006234: e5830000 str r0, [r3] _Internal_errors_What_happened.is_internal = is_internal; 30006238: e5c31004 strb r1, [r3, #4] _Internal_errors_What_happened.the_error = the_error; 3000623c: e5832008 str r2, [r3, #8] void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30006240: e1a04002 mov r4, r2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 30006244: eb000732 bl 30007f14 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 30006248: e59f301c ldr r3, [pc, #28] ; 3000626c <_Internal_error_Occurred+0x44><== NOT EXECUTED 3000624c: e3a02005 mov r2, #5 <== NOT EXECUTED 30006250: e5832000 str r2, [r3] <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30006254: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30006258: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 3000625c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 30006260: e1a00004 mov r0, r4 <== NOT EXECUTED 30006264: eafffffe b 30006264 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED =============================================================================== 30007f14 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30007f14: e92d41f0 push {r4, r5, r6, r7, r8, lr} the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 30007f18: e59f503c ldr r5, [pc, #60] ; 30007f5c <_User_extensions_Fatal+0x48> void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30007f1c: e1a08000 mov r8, r0 30007f20: e1a07002 mov r7, r2 30007f24: e20160ff and r6, r1, #255 ; 0xff the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 30007f28: e5954008 ldr r4, [r5, #8] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 30007f2c: ea000007 b 30007f50 <_User_extensions_Fatal+0x3c> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 30007f30: e5943030 ldr r3, [r4, #48] ; 0x30 30007f34: e3530000 cmp r3, #0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 30007f38: 11a00008 movne r0, r8 30007f3c: 11a01006 movne r1, r6 30007f40: 11a02007 movne r2, r7 30007f44: 11a0e00f movne lr, pc 30007f48: 112fff13 bxne r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 30007f4c: e5944004 ldr r4, [r4, #4] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 30007f50: e1540005 cmp r4, r5 30007f54: 1afffff5 bne 30007f30 <_User_extensions_Fatal+0x1c> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 30007f58: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 300058e0 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 300058e0: e92d40f0 push {r4, r5, r6, r7, lr} rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 300058e4: e59f419c ldr r4, [pc, #412] ; 30005a88 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 300058e8: e1a05001 mov r5, r1 300058ec: e1a07000 mov r7, r0 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 300058f0: e1a00004 mov r0, r4 300058f4: eb000407 bl 30006918 if (aiocbp == NULL) 300058f8: e3550000 cmp r5, #0 300058fc: 1a000035 bne 300059d8 { if (fcntl (fildes, F_GETFL) < 0) { 30005900: e1a00007 mov r0, r7 30005904: e3a01003 mov r1, #3 30005908: eb0019fb bl 3000c0fc 3000590c: e3500000 cmp r0, #0 30005910: aa000004 bge 30005928 pthread_mutex_unlock(&aio_request_queue.mutex); 30005914: e1a00004 mov r0, r4 30005918: eb00041d bl 30006994 rtems_set_errno_and_return_minus_one (EBADF); 3000591c: eb002711 bl 3000f568 <__errno> 30005920: e3a03009 mov r3, #9 30005924: ea000032 b 300059f4 } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 30005928: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 3000592c: e1a01007 mov r1, r7 <== NOT EXECUTED 30005930: e1a02005 mov r2, r5 <== NOT EXECUTED 30005934: eb0000a4 bl 30005bcc <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 30005938: e2506000 subs r6, r0, #0 <== NOT EXECUTED 3000593c: 1a00001b bne 300059b0 <== NOT EXECUTED { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 30005940: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 30005944: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 30005948: e1520003 cmp r2, r3 <== NOT EXECUTED 3000594c: 0a000013 beq 300059a0 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 30005950: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 30005954: e1a01007 mov r1, r7 <== NOT EXECUTED 30005958: e1a02006 mov r2, r6 <== NOT EXECUTED 3000595c: eb00009a bl 30005bcc <== NOT EXECUTED fildes, 0); if (r_chain == NULL) { 30005960: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30005964: 0a00000d beq 300059a0 <== NOT EXECUTED return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 30005968: e285701c add r7, r5, #28 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 3000596c: eb000a01 bl 30008178 <_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); 30005970: e1a00005 mov r0, r5 <== NOT EXECUTED 30005974: eb00016b bl 30005f28 <== NOT EXECUTED pthread_mutex_destroy (&r_chain->mutex); 30005978: e1a00007 mov r0, r7 <== NOT EXECUTED 3000597c: eb000347 bl 300066a0 <== NOT EXECUTED pthread_cond_destroy (&r_chain->mutex); 30005980: e1a00007 mov r0, r7 <== NOT EXECUTED 30005984: eb000279 bl 30006370 <== NOT EXECUTED free (r_chain); 30005988: e1a00005 mov r0, r5 <== NOT EXECUTED 3000598c: ebfff420 bl 30002a14 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 30005990: e1a00004 mov r0, r4 <== NOT EXECUTED 30005994: eb0003fe bl 30006994 <== NOT EXECUTED return AIO_CANCELED; 30005998: e1a05006 mov r5, r6 <== NOT EXECUTED 3000599c: ea000037 b 30005a80 <== NOT EXECUTED } pthread_mutex_unlock (&aio_request_queue.mutex); 300059a0: e1a00004 mov r0, r4 <== NOT EXECUTED 300059a4: eb0003fa bl 30006994 <== NOT EXECUTED return AIO_ALLDONE; 300059a8: e3a05002 mov r5, #2 <== NOT EXECUTED 300059ac: ea000033 b 30005a80 <== NOT EXECUTED } pthread_mutex_lock (&r_chain->mutex); 300059b0: e286701c add r7, r6, #28 <== NOT EXECUTED 300059b4: e1a00007 mov r0, r7 <== NOT EXECUTED 300059b8: eb0003d6 bl 30006918 <== NOT EXECUTED 300059bc: e1a00006 mov r0, r6 <== NOT EXECUTED 300059c0: eb0009ec bl 30008178 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 300059c4: e1a00006 mov r0, r6 <== NOT EXECUTED 300059c8: eb000156 bl 30005f28 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 300059cc: e1a00007 mov r0, r7 <== NOT EXECUTED 300059d0: eb0003ef bl 30006994 <== NOT EXECUTED 300059d4: ea00001c b 30005a4c <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { if (aiocbp->aio_fildes != fildes) { 300059d8: e5956000 ldr r6, [r5] 300059dc: e1560007 cmp r6, r7 300059e0: 0a000006 beq 30005a00 pthread_mutex_unlock (&aio_request_queue.mutex); 300059e4: e1a00004 mov r0, r4 300059e8: eb0003e9 bl 30006994 rtems_set_errno_and_return_minus_one (EINVAL); 300059ec: eb0026dd bl 3000f568 <__errno> 300059f0: e3a03016 mov r3, #22 300059f4: e5803000 str r3, [r0] 300059f8: e3e05000 mvn r5, #0 300059fc: ea00001f b 30005a80 } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 30005a00: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 30005a04: e1a01006 mov r1, r6 <== NOT EXECUTED 30005a08: e3a02000 mov r2, #0 <== NOT EXECUTED 30005a0c: eb00006e bl 30005bcc <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 30005a10: e2507000 subs r7, r0, #0 <== NOT EXECUTED 30005a14: 1a00000e bne 30005a54 <== NOT EXECUTED if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 30005a18: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 30005a1c: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 30005a20: e1520003 cmp r2, r3 <== NOT EXECUTED 30005a24: 0a00000a beq 30005a54 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 30005a28: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 30005a2c: e1a01006 mov r1, r6 <== NOT EXECUTED 30005a30: e1a02007 mov r2, r7 <== NOT EXECUTED 30005a34: eb000064 bl 30005bcc <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 30005a38: e3500000 cmp r0, #0 <== NOT EXECUTED 30005a3c: 0affffe8 beq 300059e4 <== 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); 30005a40: e1a01005 mov r1, r5 <== NOT EXECUTED 30005a44: eb000147 bl 30005f68 <== NOT EXECUTED 30005a48: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 30005a4c: e1a00004 mov r0, r4 <== NOT EXECUTED 30005a50: ea000009 b 30005a7c <== NOT EXECUTED return result; } pthread_mutex_lock (&r_chain->mutex); 30005a54: e287401c add r4, r7, #28 <== NOT EXECUTED 30005a58: e1a00004 mov r0, r4 <== NOT EXECUTED 30005a5c: eb0003ad bl 30006918 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); 30005a60: e1a01005 mov r1, r5 <== NOT EXECUTED 30005a64: e1a00007 mov r0, r7 <== NOT EXECUTED 30005a68: eb00013e bl 30005f68 <== NOT EXECUTED 30005a6c: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 30005a70: e1a00004 mov r0, r4 <== NOT EXECUTED 30005a74: eb0003c6 bl 30006994 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 30005a78: e59f0008 ldr r0, [pc, #8] ; 30005a88 <== NOT EXECUTED 30005a7c: eb0003c4 bl 30006994 <== NOT EXECUTED return result; } return AIO_ALLDONE; } 30005a80: e1a00005 mov r0, r5 30005a84: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30005a94 : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 30005a94: e3500a02 cmp r0, #8192 ; 0x2000 int aio_fsync( int op, struct aiocb *aiocbp ) { 30005a98: e92d4030 push {r4, r5, lr} 30005a9c: e1a04001 mov r4, r1 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 30005aa0: 13a05016 movne r5, #22 ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 30005aa4: 1a00000c bne 30005adc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 30005aa8: e5910000 ldr r0, [r1] 30005aac: e3a01003 mov r1, #3 30005ab0: eb001991 bl 3000c0fc if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 30005ab4: e2000003 and r0, r0, #3 30005ab8: e2400001 sub r0, r0, #1 30005abc: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 30005ac0: 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))) 30005ac4: 8a000004 bhi 30005adc rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 30005ac8: e3a00018 mov r0, #24 30005acc: ebfff536 bl 30002fac <== NOT EXECUTED if (req == NULL) 30005ad0: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30005ad4: 1a000007 bne 30005af8 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 30005ad8: e3a0500b mov r5, #11 <== NOT EXECUTED 30005adc: e3e03000 mvn r3, #0 30005ae0: e5845030 str r5, [r4, #48] ; 0x30 30005ae4: e5843034 str r3, [r4, #52] ; 0x34 30005ae8: eb00269e bl 3000f568 <__errno> 30005aec: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 30005af0: e3e00000 mvn r0, #0 30005af4: e8bd8030 pop {r4, r5, pc} req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 30005af8: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_SYNC; 30005afc: e3a03003 mov r3, #3 30005b00: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED return rtems_aio_enqueue (req); } 30005b04: 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); 30005b08: ea00012c b 30005fc0 <== NOT EXECUTED =============================================================================== 300061d0 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 300061d0: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 300061d4: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 300061d8: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 300061dc: e5900000 ldr r0, [r0] 300061e0: eb0017c5 bl 3000c0fc if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 300061e4: e2000003 and r0, r0, #3 300061e8: e3500002 cmp r0, #2 300061ec: 13500000 cmpne r0, #0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 300061f0: 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))) 300061f4: 1a00000d bne 30006230 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 300061f8: e5943014 ldr r3, [r4, #20] 300061fc: e3530000 cmp r3, #0 30006200: 1a000007 bne 30006224 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 30006204: e5943008 ldr r3, [r4, #8] 30006208: e3530000 cmp r3, #0 3000620c: ba000004 blt 30006224 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 30006210: e3a00018 mov r0, #24 30006214: ebfff364 bl 30002fac if (req == NULL) 30006218: e2503000 subs r3, r0, #0 3000621c: 1a00000a bne 3000624c 30006220: ea000001 b 3000622c <== NOT EXECUTED 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); 30006224: e3a05016 mov r5, #22 30006228: ea000000 b 30006230 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 3000622c: e3a0500b mov r5, #11 <== NOT EXECUTED 30006230: e3e03000 mvn r3, #0 30006234: e5845030 str r5, [r4, #48] ; 0x30 30006238: e5843034 str r3, [r4, #52] ; 0x34 3000623c: eb0024c9 bl 3000f568 <__errno> 30006240: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 30006244: e3e00000 mvn r0, #0 30006248: e8bd8030 pop {r4, r5, pc} req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 3000624c: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_READ; 30006250: e3a03001 mov r3, #1 30006254: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 30006258: 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); 3000625c: eaffff57 b 30005fc0 =============================================================================== 30006268 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 30006268: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 3000626c: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 30006270: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 30006274: e5900000 ldr r0, [r0] 30006278: eb00179f bl 3000c0fc if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 3000627c: e2000003 and r0, r0, #3 30006280: e2400001 sub r0, r0, #1 30006284: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 30006288: 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))) 3000628c: 8a00000d bhi 300062c8 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 30006290: e5943014 ldr r3, [r4, #20] 30006294: e3530000 cmp r3, #0 30006298: 1a000007 bne 300062bc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 3000629c: e5943008 ldr r3, [r4, #8] 300062a0: e3530000 cmp r3, #0 300062a4: ba000004 blt 300062bc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 300062a8: e3a00018 mov r0, #24 300062ac: ebfff33e bl 30002fac if (req == NULL) 300062b0: e2503000 subs r3, r0, #0 300062b4: 1a00000a bne 300062e4 300062b8: ea000001 b 300062c4 <== NOT EXECUTED 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); 300062bc: e3a05016 mov r5, #22 300062c0: ea000000 b 300062c8 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 300062c4: e3a0500b mov r5, #11 <== NOT EXECUTED 300062c8: e3e03000 mvn r3, #0 300062cc: e5845030 str r5, [r4, #48] ; 0x30 300062d0: e5843034 str r3, [r4, #52] ; 0x34 300062d4: eb0024a3 bl 3000f568 <__errno> 300062d8: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 300062dc: e3e00000 mvn r0, #0 300062e0: e8bd8030 pop {r4, r5, pc} req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 300062e4: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_WRITE; 300062e8: e3a03002 mov r3, #2 300062ec: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 300062f0: 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); 300062f4: eaffff31 b 30005fc0 =============================================================================== 3000a354 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 3000a354: e3500000 cmp r0, #0 3000a358: 0a00000b beq 3000a38c 3000a35c: e5903000 ldr r3, [r0] 3000a360: e3530000 cmp r3, #0 3000a364: 0a000008 beq 3000a38c return EINVAL; switch ( policy ) { 3000a368: e3510004 cmp r1, #4 3000a36c: 8a000008 bhi 3000a394 3000a370: e3a03001 mov r3, #1 3000a374: e1a03113 lsl r3, r3, r1 3000a378: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 3000a37c: 15801014 strne r1, [r0, #20] return 0; 3000a380: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 3000a384: 112fff1e bxne lr 3000a388: ea000001 b 3000a394 <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 3000a38c: e3a00016 mov r0, #22 3000a390: e12fff1e bx lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 3000a394: e3a00086 mov r0, #134 ; 0x86 } } 3000a398: e12fff1e bx lr =============================================================================== 3000719c : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 3000719c: e3500000 cmp r0, #0 300071a0: 0a000007 beq 300071c4 300071a4: e5903000 ldr r3, [r0] 300071a8: e3530000 cmp r3, #0 300071ac: 0a000004 beq 300071c4 return EINVAL; switch ( pshared ) { 300071b0: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 300071b4: 95801004 strls r1, [r0, #4] return 0; 300071b8: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 300071bc: 912fff1e bxls lr 300071c0: ea000001 b 300071cc <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 300071c4: e3a00016 mov r0, #22 300071c8: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 300071cc: e3a00016 mov r0, #22 <== NOT EXECUTED } } 300071d0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30006e08 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 30006e08: e3500000 cmp r0, #0 30006e0c: 0a000007 beq 30006e30 return EINVAL; if ( !attr->is_initialized ) 30006e10: e5903000 ldr r3, [r0] 30006e14: e3530000 cmp r3, #0 30006e18: 0a000004 beq 30006e30 return EINVAL; switch ( pshared ) { 30006e1c: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 30006e20: 95801004 strls r1, [r0, #4] return 0; 30006e24: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 30006e28: 912fff1e bxls lr 30006e2c: ea000001 b 30006e38 <== NOT EXECUTED { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 30006e30: e3a00016 mov r0, #22 30006e34: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 30006e38: e3a00016 mov r0, #22 } } 30006e3c: e12fff1e bx lr =============================================================================== 30005fc0 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 30005fc0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, 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); 30005fc4: e59f41f0 ldr r4, [pc, #496] ; 300061bc * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 30005fc8: e24dd024 sub sp, sp, #36 ; 0x24 30005fcc: 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); 30005fd0: e1a00004 mov r0, r4 30005fd4: eb00024f bl 30006918 if (result != 0) { 30005fd8: e2505000 subs r5, r0, #0 30005fdc: 0a000002 beq 30005fec free (req); 30005fe0: e1a00006 mov r0, r6 <== NOT EXECUTED 30005fe4: ebfff28a bl 30002a14 <== NOT EXECUTED return result; 30005fe8: ea000070 b 300061b0 <== NOT EXECUTED } /* _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); 30005fec: eb000457 bl 30007150 30005ff0: e28d101c add r1, sp, #28 30005ff4: e1a0200d mov r2, sp 30005ff8: eb00035b bl 30006d6c req->caller_thread = pthread_self (); 30005ffc: eb000453 bl 30007150 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 30006000: e5963014 ldr r3, [r6, #20] 30006004: e59d1000 ldr r1, [sp] 30006008: e5932014 ldr r2, [r3, #20] /* _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 (); 3000600c: e5860010 str r0, [r6, #16] req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 30006010: e0622001 rsb r2, r2, r1 30006014: e586200c str r2, [r6, #12] req->policy = policy; 30006018: e59d201c ldr r2, [sp, #28] 3000601c: e5862008 str r2, [r6, #8] req->aiocbp->error_code = EINPROGRESS; 30006020: e3a02077 mov r2, #119 ; 0x77 30006024: e5832030 str r2, [r3, #48] ; 0x30 req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 30006028: e5942068 ldr r2, [r4, #104] ; 0x68 req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; 3000602c: e5835034 str r5, [r3, #52] ; 0x34 if ((aio_request_queue.idle_threads == 0) && 30006030: e3520000 cmp r2, #0 30006034: 1a00002e bne 300060f4 30006038: e5942064 ldr r2, [r4, #100] ; 0x64 3000603c: e3520004 cmp r2, #4 30006040: ca00002b bgt 300060f4 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); 30006044: e5931000 ldr r1, [r3] 30006048: e2840048 add r0, r4, #72 ; 0x48 3000604c: e3a02001 mov r2, #1 30006050: ebfffedd bl 30005bcc if (r_chain->new_fd == 1) { 30006054: e5903018 ldr r3, [r0, #24] if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 30006058: e1a07000 mov r7, r0 if (r_chain->new_fd == 1) { 3000605c: e3530001 cmp r3, #1 30006060: e2809008 add r9, r0, #8 30006064: e280801c add r8, r0, #28 30006068: e280a020 add sl, r0, #32 3000606c: 1a000017 bne 300060d0 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 30006070: e1a01006 mov r1, r6 30006074: e1a00009 mov r0, r9 30006078: eb000853 bl 300081cc <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 3000607c: 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; 30006080: e5875018 str r5, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 30006084: e1a00008 mov r0, r8 30006088: eb0001d0 bl 300067d0 pthread_cond_init (&r_chain->cond, NULL); 3000608c: e1a01005 mov r1, r5 30006090: e1a0000a mov r0, sl 30006094: eb0000e5 bl 30006430 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 30006098: e1a03007 mov r3, r7 3000609c: e28d0020 add r0, sp, #32 300060a0: e2841008 add r1, r4, #8 300060a4: e59f2114 ldr r2, [pc, #276] ; 300061c0 300060a8: eb00029b bl 30006b1c rtems_aio_handle, (void *) r_chain); if (result != 0) { 300060ac: e2506000 subs r6, r0, #0 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 300060b0: 05943064 ldreq r3, [r4, #100] ; 0x64 300060b4: 02833001 addeq r3, r3, #1 300060b8: 05843064 streq r3, [r4, #100] ; 0x64 pthread_cond_init (&r_chain->cond, NULL); AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { 300060bc: 0a000039 beq 300061a8 pthread_mutex_unlock (&aio_request_queue.mutex); 300060c0: e1a00004 mov r0, r4 <== NOT EXECUTED 300060c4: eb000232 bl 30006994 <== NOT EXECUTED return result; 300060c8: e1a05006 mov r5, r6 <== NOT EXECUTED 300060cc: ea000037 b 300061b0 <== NOT EXECUTED } ++aio_request_queue.active_threads; } else { /* put request in the fd chain it belongs to */ pthread_mutex_lock (&r_chain->mutex); 300060d0: e1a00008 mov r0, r8 300060d4: eb00020f bl 30006918 rtems_aio_insert_prio (&r_chain->perfd, req); 300060d8: e1a00009 mov r0, r9 300060dc: e1a01006 mov r1, r6 300060e0: ebffff7c bl 30005ed8 pthread_cond_signal (&r_chain->cond); 300060e4: e1a0000a mov r0, sl 300060e8: eb000100 bl 300064f0 pthread_mutex_unlock (&r_chain->mutex); 300060ec: e1a00008 mov r0, r8 300060f0: ea00000e b 30006130 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, 300060f4: e59f00c8 ldr r0, [pc, #200] ; 300061c4 300060f8: e5931000 ldr r1, [r3] 300060fc: e3a02000 mov r2, #0 30006100: ebfffeb1 bl 30005bcc req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 30006104: e2504000 subs r4, r0, #0 30006108: 0a00000a beq 30006138 { pthread_mutex_lock (&r_chain->mutex); 3000610c: e284701c add r7, r4, #28 <== NOT EXECUTED 30006110: e1a00007 mov r0, r7 <== NOT EXECUTED 30006114: eb0001ff bl 30006918 <== NOT EXECUTED rtems_aio_insert_prio (&r_chain->perfd, req); 30006118: e2840008 add r0, r4, #8 <== NOT EXECUTED 3000611c: e1a01006 mov r1, r6 <== NOT EXECUTED 30006120: ebffff6c bl 30005ed8 <== NOT EXECUTED pthread_cond_signal (&r_chain->cond); 30006124: e2840020 add r0, r4, #32 <== NOT EXECUTED 30006128: eb0000f0 bl 300064f0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 3000612c: e1a00007 mov r0, r7 <== NOT EXECUTED 30006130: eb000217 bl 30006994 30006134: ea00001b b 300061a8 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 30006138: e5963014 ldr r3, [r6, #20] 3000613c: e59f0084 ldr r0, [pc, #132] ; 300061c8 30006140: e5931000 ldr r1, [r3] 30006144: e3a02001 mov r2, #1 30006148: ebfffe9f bl 30005bcc if (r_chain->new_fd == 1) { 3000614c: e5903018 ldr r3, [r0, #24] } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 30006150: e1a07000 mov r7, r0 if (r_chain->new_fd == 1) { 30006154: e3530001 cmp r3, #1 30006158: e2800008 add r0, r0, #8 3000615c: 1a00000f bne 300061a0 30006160: e1a01006 mov r1, r6 30006164: eb000818 bl 300081cc <_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); 30006168: e1a01004 mov r1, r4 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; 3000616c: e5874018 str r4, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 30006170: e287001c add r0, r7, #28 30006174: eb000195 bl 300067d0 pthread_cond_init (&r_chain->cond, NULL); 30006178: e1a01004 mov r1, r4 3000617c: e2870020 add r0, r7, #32 30006180: eb0000aa bl 30006430 pthread_cond_signal (&aio_request_queue.new_req); 30006184: e59f0040 ldr r0, [pc, #64] ; 300061cc 30006188: eb0000d8 bl 300064f0 ++aio_request_queue.idle_threads; 3000618c: e59f3028 ldr r3, [pc, #40] ; 300061bc 30006190: e5932068 ldr r2, [r3, #104] ; 0x68 30006194: e2822001 add r2, r2, #1 30006198: e5832068 str r2, [r3, #104] ; 0x68 3000619c: ea000001 b 300061a8 } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 300061a0: e1a01006 mov r1, r6 300061a4: ebffff4b bl 30005ed8 } } pthread_mutex_unlock (&aio_request_queue.mutex); 300061a8: e59f000c ldr r0, [pc, #12] ; 300061bc 300061ac: eb0001f8 bl 30006994 return 0; } 300061b0: e1a00005 mov r0, r5 300061b4: e28dd024 add sp, sp, #36 ; 0x24 300061b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 30005c74 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 30005c74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED The fd chain is already unlocked */ struct timespec timeout; pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); 30005c78: e59f624c ldr r6, [pc, #588] ; 30005ecc <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { 30005c7c: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED 30005c80: e1a04000 mov r4, r0 <== 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); 30005c84: e28d7020 add r7, sp, #32 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 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)) { 30005c88: e286b058 add fp, r6, #88 ; 0x58 <== 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); 30005c8c: e28d9004 add r9, sp, #4 <== 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); 30005c90: e284a01c add sl, r4, #28 <== NOT EXECUTED 30005c94: e1a0000a mov r0, sl <== NOT EXECUTED 30005c98: eb00031e bl 30006918 <== NOT EXECUTED if (result != 0) 30005c9c: e2508000 subs r8, r0, #0 <== NOT EXECUTED 30005ca0: 1a000086 bne 30005ec0 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30005ca4: e5945008 ldr r5, [r4, #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 ); 30005ca8: e284300c add r3, r4, #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)) { 30005cac: e1550003 cmp r5, r3 <== NOT EXECUTED 30005cb0: 0a000035 beq 30005d8c <== 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); 30005cb4: eb000525 bl 30007150 <== NOT EXECUTED 30005cb8: e28d1028 add r1, sp, #40 ; 0x28 <== NOT EXECUTED 30005cbc: e1a02009 mov r2, r9 <== NOT EXECUTED 30005cc0: eb000429 bl 30006d6c <== NOT EXECUTED param.sched_priority = req->priority; 30005cc4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 30005cc8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); 30005ccc: eb00051f bl 30007150 <== NOT EXECUTED 30005cd0: e1a02009 mov r2, r9 <== NOT EXECUTED 30005cd4: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED 30005cd8: eb000521 bl 30007164 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30005cdc: e1a00005 mov r0, r5 <== NOT EXECUTED 30005ce0: eb000924 bl 30008178 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 30005ce4: e1a0000a mov r0, sl <== NOT EXECUTED 30005ce8: eb000329 bl 30006994 <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { 30005cec: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED 30005cf0: e592302c ldr r3, [r2, #44] ; 0x2c <== NOT EXECUTED 30005cf4: e3530002 cmp r3, #2 <== NOT EXECUTED 30005cf8: 0a00000b beq 30005d2c <== NOT EXECUTED 30005cfc: e3530003 cmp r3, #3 <== NOT EXECUTED 30005d00: 0a000011 beq 30005d4c <== NOT EXECUTED 30005d04: e3530001 cmp r3, #1 <== NOT EXECUTED 30005d08: 1a000013 bne 30005d5c <== NOT EXECUTED case LIO_READ: result = pread (req->aiocbp->aio_fildes, 30005d0c: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED 30005d10: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 30005d14: e58d1000 str r1, [sp] <== NOT EXECUTED 30005d18: e592100c ldr r1, [r2, #12] <== NOT EXECUTED 30005d1c: e5920000 ldr r0, [r2] <== NOT EXECUTED 30005d20: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 30005d24: eb002911 bl 30010170 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 30005d28: ea000009 b 30005d54 <== NOT EXECUTED case LIO_WRITE: result = pwrite (req->aiocbp->aio_fildes, 30005d2c: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED 30005d30: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 30005d34: e58d1000 str r1, [sp] <== NOT EXECUTED 30005d38: e592100c ldr r1, [r2, #12] <== NOT EXECUTED 30005d3c: e5920000 ldr r0, [r2] <== NOT EXECUTED 30005d40: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 30005d44: eb002951 bl 30010290 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 30005d48: ea000001 b 30005d54 <== NOT EXECUTED case LIO_SYNC: result = fsync (req->aiocbp->aio_fildes); 30005d4c: e5920000 ldr r0, [r2] <== NOT EXECUTED 30005d50: eb00195e bl 3000c2d0 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 30005d54: e3700001 cmn r0, #1 <== NOT EXECUTED 30005d58: 1a000006 bne 30005d78 <== NOT EXECUTED req->aiocbp->return_value = -1; 30005d5c: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED 30005d60: e3e02000 mvn r2, #0 <== NOT EXECUTED 30005d64: e5852034 str r2, [r5, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = errno; 30005d68: eb0025fe bl 3000f568 <__errno> <== NOT EXECUTED 30005d6c: e5903000 ldr r3, [r0] <== NOT EXECUTED 30005d70: e5853030 str r3, [r5, #48] ; 0x30 <== NOT EXECUTED 30005d74: eaffffc5 b 30005c90 <== NOT EXECUTED } else { req->aiocbp->return_value = result; 30005d78: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED req->aiocbp->error_code = 0; 30005d7c: e3a02000 mov r2, #0 <== NOT EXECUTED } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; 30005d80: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = 0; 30005d84: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED 30005d88: eaffffc0 b 30005c90 <== 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); 30005d8c: e1a0000a mov r0, sl <== NOT EXECUTED 30005d90: eb0002ff bl 30006994 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); 30005d94: e59f0130 ldr r0, [pc, #304] ; 30005ecc <== NOT EXECUTED 30005d98: eb0002de bl 30006918 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) 30005d9c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30005da0: e1530005 cmp r3, r5 <== NOT EXECUTED 30005da4: 1affffb9 bne 30005c90 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); 30005da8: e1a01007 mov r1, r7 <== NOT EXECUTED 30005dac: e3a00001 mov r0, #1 <== NOT EXECUTED 30005db0: eb000150 bl 300062f8 <== NOT EXECUTED timeout.tv_sec += 3; 30005db4: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 30005db8: e2845020 add r5, r4, #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; 30005dbc: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 30005dc0: e1a00005 mov r0, r5 <== NOT EXECUTED 30005dc4: e59f1100 ldr r1, [pc, #256] ; 30005ecc <== NOT EXECUTED 30005dc8: e1a02007 mov r2, r7 <== 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; 30005dcc: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 30005dd0: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&r_chain->cond, 30005dd4: eb0001dc bl 3000654c <== 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) { 30005dd8: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 30005ddc: 1affffab bne 30005c90 <== NOT EXECUTED 30005de0: e1a00004 mov r0, r4 <== NOT EXECUTED 30005de4: eb0008e3 bl 30008178 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 30005de8: e1a0000a mov r0, sl <== NOT EXECUTED 30005dec: eb00022b bl 300066a0 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 30005df0: e1a00005 mov r0, r5 <== NOT EXECUTED 30005df4: eb00015d bl 30006370 <== NOT EXECUTED free (r_chain); 30005df8: e1a00004 mov r0, r4 <== NOT EXECUTED 30005dfc: ebfff304 bl 30002a14 <== 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)) { 30005e00: e5963054 ldr r3, [r6, #84] ; 0x54 <== NOT EXECUTED 30005e04: e153000b cmp r3, fp <== NOT EXECUTED 30005e08: 1a000029 bne 30005eb4 <== NOT EXECUTED ++aio_request_queue.idle_threads; 30005e0c: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 30005e10: e1a01007 mov r1, r7 <== 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; 30005e14: e2833001 add r3, r3, #1 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 30005e18: e3a00001 mov r0, #1 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; 30005e1c: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 30005e20: eb000134 bl 300062f8 <== NOT EXECUTED timeout.tv_sec += 3; 30005e24: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 30005e28: e59f00a0 ldr r0, [pc, #160] ; 30005ed0 <== 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; 30005e2c: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 30005e30: e59f1094 ldr r1, [pc, #148] ; 30005ecc <== NOT EXECUTED 30005e34: e1a02007 mov r2, r7 <== 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; 30005e38: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 30005e3c: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&aio_request_queue.new_req, 30005e40: eb0001c1 bl 3000654c <== 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) { 30005e44: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 30005e48: 1a000002 bne 30005e58 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 30005e4c: e59f0078 ldr r0, [pc, #120] ; 30005ecc <== NOT EXECUTED 30005e50: eb0002cf bl 30006994 <== NOT EXECUTED return NULL; 30005e54: ea000019 b 30005ec0 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30005e58: e5965054 ldr r5, [r6, #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; 30005e5c: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED 30005e60: e1a00005 mov r0, r5 <== NOT EXECUTED 30005e64: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30005e68: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED 30005e6c: eb0008c1 bl 30008178 <_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, 30005e70: e3a02001 mov r2, #1 <== NOT EXECUTED 30005e74: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED 30005e78: e59f0054 ldr r0, [pc, #84] ; 30005ed4 <== NOT EXECUTED 30005e7c: ebffff52 bl 30005bcc <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 30005e80: e1a01008 mov r1, r8 <== 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, 30005e84: e1a04000 mov r4, r0 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; 30005e88: e5808018 str r8, [r0, #24] <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); 30005e8c: e280001c add r0, r0, #28 <== NOT EXECUTED 30005e90: eb00024e bl 300067d0 <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); 30005e94: e1a01008 mov r1, r8 <== NOT EXECUTED 30005e98: e2840020 add r0, r4, #32 <== NOT EXECUTED 30005e9c: eb000163 bl 30006430 <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 30005ea0: e2855008 add r5, r5, #8 <== NOT EXECUTED 30005ea4: e2843008 add r3, r4, #8 <== NOT EXECUTED 30005ea8: e8950007 ldm r5, {r0, r1, r2} <== NOT EXECUTED 30005eac: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED 30005eb0: eaffff76 b 30005c90 <== NOT EXECUTED } 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); 30005eb4: e59f0010 ldr r0, [pc, #16] ; 30005ecc <== NOT EXECUTED 30005eb8: eb0002b5 bl 30006994 <== NOT EXECUTED 30005ebc: eaffff73 b 30005c90 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30005ec0: e3a00000 mov r0, #0 <== NOT EXECUTED 30005ec4: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 30005ec8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 30005b0c : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 30005b0c: e92d4010 push {r4, lr} int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 30005b10: e59f00a4 ldr r0, [pc, #164] ; 30005bbc 30005b14: eb0003e0 bl 30006a9c if (result != 0) 30005b18: e2504000 subs r4, r0, #0 30005b1c: 1a000024 bne 30005bb4 return result; result = 30005b20: e59f0094 ldr r0, [pc, #148] ; 30005bbc 30005b24: e1a01004 mov r1, r4 30005b28: eb0003ed bl 30006ae4 pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 30005b2c: e3500000 cmp r0, #0 pthread_attr_destroy (&aio_request_queue.attr); 30005b30: 159f0084 ldrne r0, [pc, #132] ; 30005bbc 30005b34: 1b0003cf blne 30006a78 result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 30005b38: e59f0080 ldr r0, [pc, #128] ; 30005bc0 30005b3c: e3a01000 mov r1, #0 30005b40: eb000322 bl 300067d0 if (result != 0) 30005b44: e3500000 cmp r0, #0 pthread_attr_destroy (&aio_request_queue.attr); 30005b48: 159f006c ldrne r0, [pc, #108] ; 30005bbc 30005b4c: 1b0003c9 blne 30006a78 result = pthread_cond_init (&aio_request_queue.new_req, NULL); 30005b50: e59f006c ldr r0, [pc, #108] ; 30005bc4 30005b54: e3a01000 mov r1, #0 30005b58: eb000234 bl 30006430 if (result != 0) { 30005b5c: e2504000 subs r4, r0, #0 30005b60: 0a000003 beq 30005b74 pthread_mutex_destroy (&aio_request_queue.mutex); 30005b64: e59f0054 ldr r0, [pc, #84] ; 30005bc0 <== NOT EXECUTED 30005b68: eb0002cc bl 300066a0 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 30005b6c: e59f0048 ldr r0, [pc, #72] ; 30005bbc <== NOT EXECUTED 30005b70: eb0003c0 bl 30006a78 <== NOT EXECUTED ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 30005b74: e59f3044 ldr r3, [pc, #68] ; 30005bc0 30005b78: e283204c add r2, r3, #76 ; 0x4c head->previous = NULL; tail->previous = head; 30005b7c: e2831048 add r1, r3, #72 ; 0x48 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 30005b80: e5832048 str r2, [r3, #72] ; 0x48 head->previous = NULL; 30005b84: e3a02000 mov r2, #0 30005b88: e583204c str r2, [r3, #76] ; 0x4c tail->previous = head; 30005b8c: e5831050 str r1, [r3, #80] ; 0x50 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 30005b90: e5832058 str r2, [r3, #88] ; 0x58 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 30005b94: e2831058 add r1, r3, #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; 30005b98: e5832064 str r2, [r3, #100] ; 0x64 aio_request_queue.idle_threads = 0; 30005b9c: e5832068 str r2, [r3, #104] ; 0x68 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 30005ba0: e59f2020 ldr r2, [pc, #32] ; 30005bc8 30005ba4: e5831054 str r1, [r3, #84] ; 0x54 head->previous = NULL; tail->previous = head; 30005ba8: e2831054 add r1, r3, #84 ; 0x54 30005bac: e583105c str r1, [r3, #92] ; 0x5c 30005bb0: e5832060 str r2, [r3, #96] ; 0x60 return result; } 30005bb4: e1a00004 mov r0, r4 30005bb8: e8bd8010 pop {r4, pc} =============================================================================== 30005ed8 : 30005ed8: e1a02000 mov r2, r0 30005edc: e4923004 ldr r3, [r2], #4 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 30005ee0: e1a0c001 mov ip, r1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 30005ee4: e1530002 cmp r3, r2 30005ee8: 0a00000d beq 30005f24 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; 30005eec: e5931014 ldr r1, [r3, #20] while (req->aiocbp->aio_reqprio > prio && 30005ef0: e59c0014 ldr r0, [ip, #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; 30005ef4: e5911014 ldr r1, [r1, #20] while (req->aiocbp->aio_reqprio > prio && 30005ef8: e5900014 ldr r0, [r0, #20] 30005efc: ea000002 b 30005f0c } AIO_printf ("Thread finished\n"); return NULL; } 30005f00: 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; 30005f04: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED 30005f08: e5911014 ldr r1, [r1, #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 && 30005f0c: e1500001 cmp r0, r1 30005f10: da000001 ble 30005f1c 30005f14: e1530002 cmp r3, r2 <== NOT EXECUTED 30005f18: 1afffff8 bne 30005f00 <== 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 ); 30005f1c: e5930004 ldr r0, [r3, #4] 30005f20: e1a0100c mov r1, ip 30005f24: ea0008a8 b 300081cc <_Chain_Insert> =============================================================================== 30005f28 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 30005f28: e92d40f0 push {r4, r5, r6, r7, lr} <== 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)); 30005f2c: e280700c add r7, r0, #12 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30005f30: e5904008 ldr r4, [r0, #8] <== 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; 30005f34: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED req->aiocbp->return_value = -1; 30005f38: e3e05000 mvn r5, #0 <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 30005f3c: ea000006 b 30005f5c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30005f40: e1a00004 mov r0, r4 <== NOT EXECUTED 30005f44: eb00088b bl 30008178 <_Chain_Extract> <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 30005f48: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED req->aiocbp->return_value = -1; free (req); 30005f4c: 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; 30005f50: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; 30005f54: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); 30005f58: ebfff2ad bl 30002a14 <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 30005f5c: e1540007 cmp r4, r7 <== NOT EXECUTED 30005f60: 1afffff6 bne 30005f40 <== NOT EXECUTED rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; free (req); } } 30005f64: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 30005f68 : * 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) { 30005f68: e92d4010 push {r4, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30005f6c: 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) { 30005f70: ea000000 b 30005f78 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 30005f74: 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) { 30005f78: e1540000 cmp r4, r0 <== NOT EXECUTED 30005f7c: 0a00000d beq 30005fb8 <== NOT EXECUTED 30005f80: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 30005f84: e1530001 cmp r3, r1 <== NOT EXECUTED 30005f88: 1afffff9 bne 30005f74 <== NOT EXECUTED 30005f8c: e1a00004 mov r0, r4 <== NOT EXECUTED 30005f90: eb000878 bl 30008178 <_Chain_Extract> <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 30005f94: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 30005f98: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED 30005f9c: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED current->aiocbp->return_value = -1; 30005fa0: e3e02000 mvn r2, #0 <== NOT EXECUTED free (current); 30005fa4: e1a00004 mov r0, r4 <== NOT EXECUTED return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; 30005fa8: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED free (current); 30005fac: ebfff298 bl 30002a14 <== NOT EXECUTED } return AIO_CANCELED; 30005fb0: e3a00000 mov r0, #0 <== NOT EXECUTED 30005fb4: 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; 30005fb8: e3a00001 mov r0, #1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 30005fbc: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 3000c768 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000c768: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 3000c76c: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000c770: e1a04000 mov r4, r0 3000c774: e1a05001 mov r5, r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 3000c778: 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 ) 3000c77c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 3000c780: e59f313c ldr r3, [pc, #316] ; 3000c8c4 3000c784: e5937004 ldr r7, [r3, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 3000c788: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3000c78c: e59760f8 ldr r6, [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 ) 3000c790: 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; 3000c794: e3580000 cmp r8, #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; 3000c798: e5d69008 ldrb r9, [r6, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 3000c79c: 03a08c01 moveq r8, #256 ; 0x100 3000c7a0: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000c7a4: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 3000c7a8: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 3000c7ac: e3590000 cmp r9, #0 3000c7b0: 03a09b01 moveq r9, #1024 ; 0x400 3000c7b4: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); 3000c7b8: ebffefe3 bl 3000874c <_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; 3000c7bc: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); 3000c7c0: e1898008 orr r8, r9, r8 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000c7c4: e3150c01 tst r5, #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; 3000c7c8: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000c7cc: 0a000003 beq 3000c7e0 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 3000c7d0: e3140c01 tst r4, #256 ; 0x100 3000c7d4: 13a03000 movne r3, #0 3000c7d8: 03a03001 moveq r3, #1 3000c7dc: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { 3000c7e0: e3150c02 tst r5, #512 ; 0x200 3000c7e4: 0a000006 beq 3000c804 if ( _Modes_Is_timeslice(mode_set) ) { 3000c7e8: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 3000c7ec: 13a03001 movne r3, #1 3000c7f0: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000c7f4: 159f30cc ldrne r3, [pc, #204] ; 3000c8c8 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 3000c7f8: 0587307c streq r3, [r7, #124] ; 0x7c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000c7fc: 15933000 ldrne r3, [r3] 3000c800: 15873078 strne r3, [r7, #120] ; 0x78 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 3000c804: e3150080 tst r5, #128 ; 0x80 3000c808: 0a000001 beq 3000c814 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 3000c80c: e2040080 and r0, r4, #128 ; 0x80 3000c810: ebffefc8 bl 30008738 <_CPU_ISR_Set_level> * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 3000c814: e2150b01 ands r0, r5, #1024 ; 0x400 3000c818: 0a000013 beq 3000c86c * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000c81c: 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 ) { 3000c820: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000c824: 13a03000 movne r3, #0 3000c828: 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 ) { 3000c82c: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000c830: 03a00000 moveq r0, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 3000c834: 0a00000c beq 3000c86c asr->is_enabled = is_asr_enabled; 3000c838: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000c83c: e10f3000 mrs r3, CPSR 3000c840: e3832080 orr r2, r3, #128 ; 0x80 3000c844: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; 3000c848: e5962018 ldr r2, [r6, #24] information->signals_pending = information->signals_posted; 3000c84c: e5961014 ldr r1, [r6, #20] information->signals_posted = _signals; 3000c850: e5862014 str r2, [r6, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 3000c854: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000c858: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 3000c85c: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000c860: e3500000 cmp r0, #0 3000c864: 13a00001 movne r0, #1 3000c868: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 3000c86c: e59f3058 ldr r3, [pc, #88] ; 3000c8cc 3000c870: e5933000 ldr r3, [r3] 3000c874: e3530003 cmp r3, #3 3000c878: 1a00000f bne 3000c8bc bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 3000c87c: e59f2040 ldr r2, [pc, #64] ; 3000c8c4 if ( are_signals_pending || 3000c880: e3500000 cmp r0, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 3000c884: e5923004 ldr r3, [r2, #4] if ( are_signals_pending || 3000c888: 1a000005 bne 3000c8a4 3000c88c: e5922008 ldr r2, [r2, #8] 3000c890: e1530002 cmp r3, r2 3000c894: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 3000c898: e5d33074 ldrb r3, [r3, #116] ; 0x74 3000c89c: e3530000 cmp r3, #0 3000c8a0: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch_necessary = true; 3000c8a4: e59f3018 ldr r3, [pc, #24] ; 3000c8c4 3000c8a8: e3a02001 mov r2, #1 3000c8ac: e5c32010 strb r2, [r3, #16] if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 3000c8b0: ebffea22 bl 30007140 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 3000c8b4: e3a00000 mov r0, #0 3000c8b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 3000c8bc: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000c8c0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 300058a0 : struct sigaction *oact ) { ISR_Level level; if ( oact ) 300058a0: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 300058a4: 159f20b8 ldrne r2, [pc, #184] ; 30005964 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 300058a8: e92d40f0 push {r4, r5, r6, r7, lr} 300058ac: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 300058b0: 13a0100c movne r1, #12 300058b4: 10222091 mlane r2, r1, r0, r2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 300058b8: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 300058bc: 18920007 ldmne r2, {r0, r1, r2} 300058c0: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 300058c4: e3540000 cmp r4, #0 300058c8: 0a000004 beq 300058e0 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 300058cc: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 300058d0: e353001f cmp r3, #31 300058d4: 8a000001 bhi 300058e0 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 300058d8: e3540009 cmp r4, #9 300058dc: 1a000004 bne 300058f4 rtems_set_errno_and_return_minus_one( EINVAL ); 300058e0: eb002156 bl 3000de40 <__errno> 300058e4: e3a03016 mov r3, #22 300058e8: e5803000 str r3, [r0] 300058ec: e3e00000 mvn r0, #0 300058f0: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 300058f4: e3550000 cmp r5, #0 300058f8: 0a000017 beq 3000595c static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300058fc: e10f6000 mrs r6, CPSR 30005900: e3863080 orr r3, r6, #128 ; 0x80 30005904: 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 ) { 30005908: e5953008 ldr r3, [r5, #8] 3000590c: e59f7050 ldr r7, [pc, #80] ; 30005964 30005910: e3530000 cmp r3, #0 30005914: 1a000007 bne 30005938 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 30005918: e283300c add r3, r3, #12 3000591c: e0040493 mul r4, r3, r4 30005920: e59f2040 ldr r2, [pc, #64] ; 30005968 30005924: e0873004 add r3, r7, r4 30005928: e0824004 add r4, r2, r4 3000592c: e8940007 ldm r4, {r0, r1, r2} 30005930: e8830007 stm r3, {r0, r1, r2} 30005934: ea000005 b 30005950 } else { _POSIX_signals_Clear_process_signals( sig ); 30005938: e1a00004 mov r0, r4 3000593c: eb0015b2 bl 3000b00c <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 30005940: e8950007 ldm r5, {r0, r1, r2} 30005944: e3a0300c mov r3, #12 30005948: e0247493 mla r4, r3, r4, r7 3000594c: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30005950: 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; 30005954: e3a00000 mov r0, #0 30005958: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000595c: e1a00005 mov r0, r5 <== NOT EXECUTED } 30005960: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 30007f08 : int sigwait( const sigset_t *set, int *sig ) { 30007f08: e92d4010 push {r4, lr} 30007f0c: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 30007f10: e3a01000 mov r1, #0 30007f14: e1a02001 mov r2, r1 30007f18: ebffff84 bl 30007d30 if ( status != -1 ) { 30007f1c: e3700001 cmn r0, #1 30007f20: 0a000004 beq 30007f38 if ( sig ) 30007f24: e3540000 cmp r4, #0 *sig = status; 30007f28: 15840000 strne r0, [r4] return 0; 30007f2c: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 30007f30: 18bd8010 popne {r4, pc} 30007f34: ea000002 b 30007f44 <== NOT EXECUTED *sig = status; return 0; } return errno; 30007f38: eb002084 bl 30010150 <__errno> 30007f3c: e5900000 ldr r0, [r0] 30007f40: e8bd8010 pop {r4, pc} status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 30007f44: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 30007f48: e8bd8010 pop {r4, pc} <== NOT EXECUTED