=============================================================================== 00014b58 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14b58: 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 ) { 14b5c: 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 ) { 14b60: 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 ) { 14b64: e1a06000 mov r6, r0 14b68: e1a0a001 mov sl, r1 14b6c: e1a07002 mov r7, r2 14b70: 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 ) { 14b74: 8a000013 bhi 14bc8 <_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 ) { 14b78: e5905048 ldr r5, [r0, #72] ; 0x48 14b7c: e3550000 cmp r5, #0 *count = 0; 14b80: 13a00000 movne r0, #0 14b84: 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 ) { 14b88: 0a000007 beq 14bac <_CORE_message_queue_Broadcast+0x54> 14b8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 14b90: e594002c ldr r0, [r4, #44] ; 0x2c 14b94: e1a0100a mov r1, sl 14b98: e1a02007 mov r2, r7 14b9c: eb00221d bl 1d418 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 14ba0: e5943028 ldr r3, [r4, #40] ; 0x28 14ba4: e5837000 str r7, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 14ba8: e2855001 add r5, r5, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 14bac: e1a00006 mov r0, r6 14bb0: eb000a82 bl 175c0 <_Thread_queue_Dequeue> 14bb4: e2504000 subs r4, r0, #0 14bb8: 1afffff4 bne 14b90 <_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; 14bbc: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 14bc0: e1a00004 mov r0, r4 14bc4: 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; 14bc8: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 14bcc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00006cb0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cb0: 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; 6cb4: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cb8: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6cbc: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6cc0: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6cc4: e59f4500 ldr r4, [pc, #1280] ; 71cc <_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; 6cc8: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6ccc: e59f34fc ldr r3, [pc, #1276] ; 71d0 <_Heap_Walk+0x520> 6cd0: e31200ff tst r2, #255 ; 0xff 6cd4: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6cd8: e59f34f4 ldr r3, [pc, #1268] ; 71d4 <_Heap_Walk+0x524> 6cdc: e5933000 ldr r3, [r3] 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; 6ce0: 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() ) ) { 6ce4: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6ce8: e1a06000 mov r6, r0 6cec: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 6cf0: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6cf4: 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() ) ) { 6cf8: 1a000127 bne 719c <_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)( 6cfc: e59dc024 ldr ip, [sp, #36] ; 0x24 6d00: e58dc000 str ip, [sp] 6d04: e5903018 ldr r3, [r0, #24] 6d08: e58d3004 str r3, [sp, #4] 6d0c: e590301c ldr r3, [r0, #28] 6d10: e59d2020 ldr r2, [sp, #32] 6d14: e58d3008 str r3, [sp, #8] 6d18: e59d3028 ldr r3, [sp, #40] ; 0x28 6d1c: e58d200c str r2, [sp, #12] 6d20: e58d3010 str r3, [sp, #16] 6d24: e5903008 ldr r3, [r0, #8] 6d28: e58d3014 str r3, [sp, #20] 6d2c: e590300c ldr r3, [r0, #12] 6d30: e59f24a0 ldr r2, [pc, #1184] ; 71d8 <_Heap_Walk+0x528> 6d34: e58d3018 str r3, [sp, #24] 6d38: e1a00001 mov r0, r1 6d3c: e1a03009 mov r3, r9 6d40: e3a01000 mov r1, #0 6d44: e1a0e00f mov lr, pc 6d48: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 6d4c: e3590000 cmp r9, #0 6d50: 1a000006 bne 6d70 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 6d54: e1a00005 mov r0, r5 6d58: e3a01001 mov r1, #1 6d5c: e59f2478 ldr r2, [pc, #1144] ; 71dc <_Heap_Walk+0x52c> 6d60: e1a0e00f mov lr, pc 6d64: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6d68: e1a08009 mov r8, r9 6d6c: ea00010b b 71a0 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 6d70: e2198007 ands r8, r9, #7 (*printer)( 6d74: 11a00005 movne r0, r5 6d78: 13a01001 movne r1, #1 6d7c: 159f245c ldrne r2, [pc, #1116] ; 71e0 <_Heap_Walk+0x530> 6d80: 11a03009 movne r3, r9 6d84: 1a00010c bne 71bc <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6d88: e59d0024 ldr r0, [sp, #36] ; 0x24 6d8c: e1a01009 mov r1, r9 6d90: ebffe783 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6d94: e250b000 subs fp, r0, #0 6d98: 0a000006 beq 6db8 <_Heap_Walk+0x108> (*printer)( 6d9c: e1a00005 mov r0, r5 6da0: e3a01001 mov r1, #1 6da4: e59f2438 ldr r2, [pc, #1080] ; 71e4 <_Heap_Walk+0x534> 6da8: e59d3024 ldr r3, [sp, #36] ; 0x24 6dac: e1a0e00f mov lr, pc 6db0: e12fff14 bx r4 6db4: ea0000f9 b 71a0 <_Heap_Walk+0x4f0> 6db8: e59dc020 ldr ip, [sp, #32] 6dbc: e1a01009 mov r1, r9 6dc0: e28c0008 add r0, ip, #8 6dc4: ebffe776 bl ba4 <__umodsi3> ); return false; } if ( 6dc8: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 6dcc: 11a00005 movne r0, r5 6dd0: 13a01001 movne r1, #1 6dd4: 159f240c ldrne r2, [pc, #1036] ; 71e8 <_Heap_Walk+0x538> 6dd8: 159d3020 ldrne r3, [sp, #32] 6ddc: 1a0000cc bne 7114 <_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; 6de0: e59d2020 ldr r2, [sp, #32] 6de4: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6de8: e2188001 ands r8, r8, #1 (*printer)( 6dec: 01a00005 moveq r0, r5 6df0: 03a01001 moveq r1, #1 6df4: 059f23f0 ldreq r2, [pc, #1008] ; 71ec <_Heap_Walk+0x53c> 6df8: 0a000009 beq 6e24 <_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; 6dfc: e59d3028 ldr r3, [sp, #40] ; 0x28 6e00: e5937004 ldr r7, [r3, #4] 6e04: 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); 6e08: 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; 6e0c: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 6e10: e2188001 ands r8, r8, #1 6e14: 1a000005 bne 6e30 <_Heap_Walk+0x180> (*printer)( 6e18: e59f23d0 ldr r2, [pc, #976] ; 71f0 <_Heap_Walk+0x540> 6e1c: e1a00005 mov r0, r5 6e20: e3a01001 mov r1, #1 6e24: e1a0e00f mov lr, pc 6e28: e12fff14 bx r4 6e2c: ea0000db b 71a0 <_Heap_Walk+0x4f0> ); return false; } if ( 6e30: e59dc020 ldr ip, [sp, #32] 6e34: e157000c cmp r7, ip 6e38: 0a000006 beq 6e58 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 6e3c: e1a00005 mov r0, r5 <== NOT EXECUTED 6e40: e3a01001 mov r1, #1 <== NOT EXECUTED 6e44: e59f23a8 ldr r2, [pc, #936] ; 71f4 <_Heap_Walk+0x544> <== NOT EXECUTED 6e48: e1a0e00f mov lr, pc <== NOT EXECUTED 6e4c: 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; 6e50: e1a0800a mov r8, sl <== NOT EXECUTED 6e54: ea0000d1 b 71a0 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6e58: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 6e5c: 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 ); 6e60: e1a0a006 mov sl, r6 6e64: ea000034 b 6f3c <_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; 6e68: e5963020 ldr r3, [r6, #32] 6e6c: e1530008 cmp r3, r8 6e70: 83a0c000 movhi ip, #0 6e74: 8a000003 bhi 6e88 <_Heap_Walk+0x1d8> 6e78: e596c024 ldr ip, [r6, #36] ; 0x24 6e7c: e15c0008 cmp ip, r8 6e80: 33a0c000 movcc ip, #0 6e84: 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 ) ) { 6e88: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 6e8c: 01a00005 moveq r0, r5 6e90: 03a01001 moveq r1, #1 6e94: 059f235c ldreq r2, [pc, #860] ; 71f8 <_Heap_Walk+0x548> 6e98: 0a000012 beq 6ee8 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6e9c: e2880008 add r0, r8, #8 6ea0: e1a0100b mov r1, fp 6ea4: ebffe73e bl ba4 <__umodsi3> ); return false; } if ( 6ea8: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 6eac: 11a00005 movne r0, r5 6eb0: 13a01001 movne r1, #1 6eb4: 159f2340 ldrne r2, [pc, #832] ; 71fc <_Heap_Walk+0x54c> 6eb8: 11a03008 movne r3, r8 6ebc: 1a0000be bne 71bc <_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; 6ec0: e5983004 ldr r3, [r8, #4] 6ec4: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 6ec8: 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; 6ecc: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 6ed0: e2133001 ands r3, r3, #1 6ed4: e58d302c str r3, [sp, #44] ; 0x2c 6ed8: 0a000009 beq 6f04 <_Heap_Walk+0x254> (*printer)( 6edc: e59f231c ldr r2, [pc, #796] ; 7200 <_Heap_Walk+0x550> 6ee0: e1a00005 mov r0, r5 6ee4: e3a01001 mov r1, #1 6ee8: e1a03008 mov r3, r8 6eec: e58dc01c str ip, [sp, #28] 6ef0: e1a0e00f mov lr, pc 6ef4: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6ef8: e59dc01c ldr ip, [sp, #28] 6efc: e1a0800c mov r8, ip 6f00: ea0000a6 b 71a0 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 6f04: e598300c ldr r3, [r8, #12] 6f08: e153000a cmp r3, sl 6f0c: 0a000008 beq 6f34 <_Heap_Walk+0x284> (*printer)( 6f10: e58d3000 str r3, [sp] 6f14: e1a00005 mov r0, r5 6f18: e1a03008 mov r3, r8 6f1c: e3a01001 mov r1, #1 6f20: e59f22dc ldr r2, [pc, #732] ; 7204 <_Heap_Walk+0x554> 6f24: e1a0e00f mov lr, pc 6f28: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f2c: e59d802c ldr r8, [sp, #44] ; 0x2c 6f30: ea00009a b 71a0 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 6f34: e1a0a008 mov sl, r8 6f38: 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 ) { 6f3c: e1580006 cmp r8, r6 6f40: 1affffc8 bne 6e68 <_Heap_Walk+0x1b8> 6f44: ea000000 b 6f4c <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 6f48: e1a07008 mov r7, r8 return true; } 6f4c: 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; 6f50: 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; 6f54: 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); 6f58: 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; 6f5c: e1520008 cmp r2, r8 6f60: 83a0b000 movhi fp, #0 6f64: 8a000003 bhi 6f78 <_Heap_Walk+0x2c8> 6f68: e596b024 ldr fp, [r6, #36] ; 0x24 6f6c: e15b0008 cmp fp, r8 6f70: 33a0b000 movcc fp, #0 6f74: 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 ) ) { 6f78: e21bb0ff ands fp, fp, #255 ; 0xff 6f7c: 1a000007 bne 6fa0 <_Heap_Walk+0x2f0> (*printer)( 6f80: e58d8000 str r8, [sp] 6f84: e1a00005 mov r0, r5 6f88: e3a01001 mov r1, #1 6f8c: e59f2274 ldr r2, [pc, #628] ; 7208 <_Heap_Walk+0x558> 6f90: e1a03007 mov r3, r7 6f94: e1a0e00f mov lr, pc 6f98: e12fff14 bx r4 6f9c: ea00005e b 711c <_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; 6fa0: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6fa4: e1a0000a mov r0, sl 6fa8: e1a01009 mov r1, r9 6fac: e057b002 subs fp, r7, r2 6fb0: 13a0b001 movne fp, #1 6fb4: e58d301c str r3, [sp, #28] 6fb8: ebffe6f9 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 6fbc: e3500000 cmp r0, #0 6fc0: e59d301c ldr r3, [sp, #28] 6fc4: 0a000005 beq 6fe0 <_Heap_Walk+0x330> 6fc8: e35b0000 cmp fp, #0 (*printer)( 6fcc: 158da000 strne sl, [sp] 6fd0: 11a00005 movne r0, r5 6fd4: 13a01001 movne r1, #1 6fd8: 159f222c ldrne r2, [pc, #556] ; 720c <_Heap_Walk+0x55c> 6fdc: 1a000014 bne 7034 <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 6fe0: e59dc024 ldr ip, [sp, #36] ; 0x24 6fe4: e15a000c cmp sl, ip 6fe8: 2a000009 bcs 7014 <_Heap_Walk+0x364> 6fec: e35b0000 cmp fp, #0 6ff0: 0a000007 beq 7014 <_Heap_Walk+0x364> (*printer)( 6ff4: e88d1400 stm sp, {sl, ip} 6ff8: e1a00005 mov r0, r5 6ffc: e3a01001 mov r1, #1 7000: e59f2208 ldr r2, [pc, #520] ; 7210 <_Heap_Walk+0x560> 7004: e1a03007 mov r3, r7 7008: e1a0e00f mov lr, pc 700c: e12fff14 bx r4 7010: ea00006b b 71c4 <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 7014: e1580007 cmp r8, r7 7018: 8a000009 bhi 7044 <_Heap_Walk+0x394> 701c: e35b0000 cmp fp, #0 7020: 0a000007 beq 7044 <_Heap_Walk+0x394> (*printer)( 7024: e58d8000 str r8, [sp] 7028: e59f21e4 ldr r2, [pc, #484] ; 7214 <_Heap_Walk+0x564> 702c: e1a00005 mov r0, r5 7030: e3a01001 mov r1, #1 7034: e1a03007 mov r3, r7 7038: e1a0e00f mov lr, pc 703c: e12fff14 bx r4 7040: ea00005f b 71c4 <_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; 7044: e203b001 and fp, r3, #1 7048: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 704c: e3130001 tst r3, #1 7050: 1a00003b bne 7144 <_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 ? 7054: 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)( 7058: e5963008 ldr r3, [r6, #8] 705c: e1520003 cmp r2, r3 block = next_block; } while ( block != first_block ); return true; } 7060: 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)( 7064: 059f01ac ldreq r0, [pc, #428] ; 7218 <_Heap_Walk+0x568> 7068: 0a000003 beq 707c <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 706c: e59f31a8 ldr r3, [pc, #424] ; 721c <_Heap_Walk+0x56c> 7070: e1520006 cmp r2, r6 7074: e59f01a4 ldr r0, [pc, #420] ; 7220 <_Heap_Walk+0x570> 7078: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 707c: 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)( 7080: e1530001 cmp r3, r1 7084: 059f1198 ldreq r1, [pc, #408] ; 7224 <_Heap_Walk+0x574> 7088: 0a000003 beq 709c <_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)" : "") 708c: e59fc194 ldr ip, [pc, #404] ; 7228 <_Heap_Walk+0x578> 7090: e1530006 cmp r3, r6 7094: e59f1184 ldr r1, [pc, #388] ; 7220 <_Heap_Walk+0x570> 7098: 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)( 709c: e58d2004 str r2, [sp, #4] 70a0: e58d0008 str r0, [sp, #8] 70a4: e58d300c str r3, [sp, #12] 70a8: e58d1010 str r1, [sp, #16] 70ac: e1a03007 mov r3, r7 70b0: e58da000 str sl, [sp] 70b4: e1a00005 mov r0, r5 70b8: e3a01000 mov r1, #0 70bc: e59f2168 ldr r2, [pc, #360] ; 722c <_Heap_Walk+0x57c> 70c0: e1a0e00f mov lr, pc 70c4: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 70c8: e5983000 ldr r3, [r8] 70cc: e15a0003 cmp sl, r3 70d0: 0a000009 beq 70fc <_Heap_Walk+0x44c> (*printer)( 70d4: e58d3004 str r3, [sp, #4] 70d8: e58da000 str sl, [sp] 70dc: e58d8008 str r8, [sp, #8] 70e0: e1a00005 mov r0, r5 70e4: e3a01001 mov r1, #1 70e8: e59f2140 ldr r2, [pc, #320] ; 7230 <_Heap_Walk+0x580> 70ec: e1a03007 mov r3, r7 70f0: e1a0e00f mov lr, pc 70f4: e12fff14 bx r4 70f8: ea000031 b 71c4 <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 70fc: e35b0000 cmp fp, #0 7100: 1a000007 bne 7124 <_Heap_Walk+0x474> (*printer)( 7104: e59f2128 ldr r2, [pc, #296] ; 7234 <_Heap_Walk+0x584> 7108: e1a00005 mov r0, r5 710c: e3a01001 mov r1, #1 7110: e1a03007 mov r3, r7 7114: e1a0e00f mov lr, pc 7118: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 711c: e1a0800b mov r8, fp 7120: ea00001e b 71a0 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 7124: e5963008 ldr r3, [r6, #8] 7128: ea000002 b 7138 <_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 ) { 712c: e1530007 cmp r3, r7 7130: 0a000016 beq 7190 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 7134: 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 ) { 7138: e1530006 cmp r3, r6 713c: 1afffffa bne 712c <_Heap_Walk+0x47c> 7140: ea000019 b 71ac <_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) { 7144: e35b0000 cmp fp, #0 7148: 0a000007 beq 716c <_Heap_Walk+0x4bc> (*printer)( 714c: e58da000 str sl, [sp] 7150: e1a00005 mov r0, r5 7154: e3a01000 mov r1, #0 7158: e59f20d8 ldr r2, [pc, #216] ; 7238 <_Heap_Walk+0x588> 715c: e1a03007 mov r3, r7 7160: e1a0e00f mov lr, pc 7164: e12fff14 bx r4 7168: ea000008 b 7190 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 716c: e58da000 str sl, [sp] 7170: e5973000 ldr r3, [r7] 7174: e1a00005 mov r0, r5 7178: e58d3004 str r3, [sp, #4] 717c: e1a0100b mov r1, fp 7180: e59f20b4 ldr r2, [pc, #180] ; 723c <_Heap_Walk+0x58c> 7184: e1a03007 mov r3, r7 7188: e1a0e00f mov lr, pc 718c: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 7190: e59d2020 ldr r2, [sp, #32] 7194: e1580002 cmp r8, r2 7198: 1affff6a bne 6f48 <_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; 719c: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 71a0: e1a00008 mov r0, r8 71a4: e28dd030 add sp, sp, #48 ; 0x30 71a8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 71ac: e59f208c ldr r2, [pc, #140] ; 7240 <_Heap_Walk+0x590> 71b0: e1a00005 mov r0, r5 71b4: e3a01001 mov r1, #1 71b8: e1a03007 mov r3, r7 71bc: e1a0e00f mov lr, pc 71c0: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 71c4: e3a08000 mov r8, #0 71c8: eafffff4 b 71a0 <_Heap_Walk+0x4f0> =============================================================================== 0000762c <_Thread_queue_Enqueue_priority>: RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 762c: e281303c add r3, r1, #60 ; 0x3c Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 7630: e591c014 ldr ip, [r1, #20] head->next = tail; 7634: e5813038 str r3, [r1, #56] ; 0x38 head->previous = NULL; 7638: e3a03000 mov r3, #0 763c: e581303c str r3, [r1, #60] ; 0x3c header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 7640: e31c0020 tst ip, #32 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 7644: e2813038 add r3, r1, #56 ; 0x38 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 7648: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 764c: e5813040 str r3, [r1, #64] ; 0x40 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 7650: e5908038 ldr r8, [r0, #56] ; 0x38 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 7654: e1a0332c lsr r3, ip, #6 if ( _Thread_queue_Is_reverse_search( priority ) ) 7658: 1a000027 bne 76fc <_Thread_queue_Enqueue_priority+0xd0> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 765c: e3a0700c mov r7, #12 7660: e0030397 mul r3, r7, r3 7664: e080a003 add sl, r0, r3 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 7668: e2833004 add r3, r3, #4 766c: e0807003 add r7, r0, r3 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7670: e10f4000 mrs r4, CPSR 7674: e3843080 orr r3, r4, #128 ; 0x80 7678: e129f003 msr CPSR_fc, r3 767c: e1a05004 mov r5, r4 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 7680: e3e06000 mvn r6, #0 _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); 7684: e59a3000 ldr r3, [sl] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7688: ea00000b b 76bc <_Thread_queue_Enqueue_priority+0x90> search_priority = search_thread->current_priority; 768c: e5936014 ldr r6, [r3, #20] if ( priority <= search_priority ) 7690: e15c0006 cmp ip, r6 7694: 9a00000a bls 76c4 <_Thread_queue_Enqueue_priority+0x98> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7698: e10f9000 mrs r9, CPSR 769c: e129f004 msr CPSR_fc, r4 76a0: e129f009 msr CPSR_fc, r9 RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 76a4: e5939010 ldr r9, [r3, #16] search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 76a8: e1180009 tst r8, r9 76ac: 1a000001 bne 76b8 <_Thread_queue_Enqueue_priority+0x8c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 76b0: e129f004 msr CPSR_fc, r4 76b4: eaffffed b 7670 <_Thread_queue_Enqueue_priority+0x44> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 76b8: e5933000 ldr r3, [r3] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 76bc: e1530007 cmp r3, r7 76c0: 1afffff1 bne 768c <_Thread_queue_Enqueue_priority+0x60> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 76c4: e5907030 ldr r7, [r0, #48] ; 0x30 76c8: e3570001 cmp r7, #1 76cc: 1a00003b bne 77c0 <_Thread_queue_Enqueue_priority+0x194> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 76d0: e3a02000 mov r2, #0 if ( priority == search_priority ) 76d4: e15c0006 cmp ip, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 76d8: e5802030 str r2, [r0, #48] ; 0x30 if ( priority == search_priority ) 76dc: 0a00002d beq 7798 <_Thread_queue_Enqueue_priority+0x16c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 76e0: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 76e4: e5813000 str r3, [r1] the_node->previous = previous_node; 76e8: e5812004 str r2, [r1, #4] previous_node->next = the_node; 76ec: e5821000 str r1, [r2] search_node->previous = the_node; 76f0: e5831004 str r1, [r3, #4] the_thread->Wait.queue = the_thread_queue; 76f4: e5810044 str r0, [r1, #68] ; 0x44 _ISR_Enable( level ); 76f8: ea000024 b 7790 <_Thread_queue_Enqueue_priority+0x164> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 76fc: e3a0700c mov r7, #12 7700: e0270793 mla r7, r3, r7, r0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 7704: e59fa0c0 ldr sl, [pc, #192] ; 77cc <_Thread_queue_Enqueue_priority+0x1a0> 7708: e5da6000 ldrb r6, [sl] 770c: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7710: e10f4000 mrs r4, CPSR 7714: e3843080 orr r3, r4, #128 ; 0x80 7718: e129f003 msr CPSR_fc, r3 771c: e1a05004 mov r5, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); 7720: e5973008 ldr r3, [r7, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7724: ea00000b b 7758 <_Thread_queue_Enqueue_priority+0x12c> search_priority = search_thread->current_priority; 7728: e5936014 ldr r6, [r3, #20] if ( priority >= search_priority ) 772c: e15c0006 cmp ip, r6 7730: 2a00000a bcs 7760 <_Thread_queue_Enqueue_priority+0x134> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7734: e10f9000 mrs r9, CPSR 7738: e129f004 msr CPSR_fc, r4 773c: e129f009 msr CPSR_fc, r9 7740: e5939010 ldr r9, [r3, #16] search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7744: e1180009 tst r8, r9 7748: 1a000001 bne 7754 <_Thread_queue_Enqueue_priority+0x128> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 774c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 7750: eaffffec b 7708 <_Thread_queue_Enqueue_priority+0xdc> <== NOT EXECUTED _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 7754: e5933004 ldr r3, [r3, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7758: e1530007 cmp r3, r7 775c: 1afffff1 bne 7728 <_Thread_queue_Enqueue_priority+0xfc> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7760: e5907030 ldr r7, [r0, #48] ; 0x30 7764: e3570001 cmp r7, #1 7768: 1a000014 bne 77c0 <_Thread_queue_Enqueue_priority+0x194> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 776c: e3a02000 mov r2, #0 if ( priority == search_priority ) 7770: e15c0006 cmp ip, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7774: e5802030 str r2, [r0, #48] ; 0x30 if ( priority == search_priority ) 7778: 0a000006 beq 7798 <_Thread_queue_Enqueue_priority+0x16c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 777c: e5932000 ldr r2, [r3] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7780: e881000c stm r1, {r2, r3} search_node->next = the_node; next_node->previous = the_node; 7784: e5821004 str r1, [r2, #4] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 7788: e5831000 str r1, [r3] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 778c: e5810044 str r0, [r1, #68] ; 0x44 7790: e129f004 msr CPSR_fc, r4 7794: ea000007 b 77b8 <_Thread_queue_Enqueue_priority+0x18c> _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 7798: e5932040 ldr r2, [r3, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 779c: e283c03c add ip, r3, #60 ; 0x3c previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; 77a0: e581c000 str ip, [r1] the_node->previous = previous_node; 77a4: e5812004 str r2, [r1, #4] previous_node->next = the_node; 77a8: e5821000 str r1, [r2] search_node->previous = the_node; 77ac: e5831040 str r1, [r3, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; 77b0: e5810044 str r0, [r1, #68] ; 0x44 77b4: e129f005 msr CPSR_fc, r5 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 77b8: e3a00001 mov r0, #1 77bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 77c0: e5825000 str r5, [r2] return the_thread_queue->sync_state; 77c4: e5900030 ldr r0, [r0, #48] ; 0x30 } 77c8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00005788 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 5788: e92d40f0 push {r4, r5, r6, r7, lr} rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 578c: e59f419c ldr r4, [pc, #412] ; 5930 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 5790: e1a05001 mov r5, r1 5794: e1a07000 mov r7, r0 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 5798: e1a00004 mov r0, r4 579c: eb000407 bl 67c0 if (aiocbp == NULL) 57a0: e3550000 cmp r5, #0 57a4: 1a000035 bne 5880 { if (fcntl (fildes, F_GETFL) < 0) { 57a8: e1a00007 mov r0, r7 57ac: e3a01003 mov r1, #3 57b0: eb0019fb bl bfa4 57b4: e3500000 cmp r0, #0 57b8: aa000004 bge 57d0 pthread_mutex_unlock(&aio_request_queue.mutex); 57bc: e1a00004 mov r0, r4 57c0: eb00041d bl 683c rtems_set_errno_and_return_minus_one (EBADF); 57c4: eb002710 bl f40c <__errno> 57c8: e3a03009 mov r3, #9 57cc: ea000032 b 589c } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 57d0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 57d4: e1a01007 mov r1, r7 <== NOT EXECUTED 57d8: e1a02005 mov r2, r5 <== NOT EXECUTED 57dc: eb0000a4 bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 57e0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 57e4: 1a00001b bne 5858 <== NOT EXECUTED { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 57e8: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 57ec: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 57f0: e1520003 cmp r2, r3 <== NOT EXECUTED 57f4: 0a000013 beq 5848 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 57f8: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 57fc: e1a01007 mov r1, r7 <== NOT EXECUTED 5800: e1a02006 mov r2, r6 <== NOT EXECUTED 5804: eb00009a bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) { 5808: e2505000 subs r5, r0, #0 <== NOT EXECUTED 580c: 0a00000d beq 5848 <== NOT EXECUTED return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 5810: e285701c add r7, r5, #28 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5814: eb000a00 bl 801c <_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); 5818: e1a00005 mov r0, r5 <== NOT EXECUTED 581c: eb00016b bl 5dd0 <== NOT EXECUTED pthread_mutex_destroy (&r_chain->mutex); 5820: e1a00007 mov r0, r7 <== NOT EXECUTED 5824: eb000347 bl 6548 <== NOT EXECUTED pthread_cond_destroy (&r_chain->mutex); 5828: e1a00007 mov r0, r7 <== NOT EXECUTED 582c: eb000279 bl 6218 <== NOT EXECUTED free (r_chain); 5830: e1a00005 mov r0, r5 <== NOT EXECUTED 5834: ebfff420 bl 28bc <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 5838: e1a00004 mov r0, r4 <== NOT EXECUTED 583c: eb0003fe bl 683c <== NOT EXECUTED return AIO_CANCELED; 5840: e1a05006 mov r5, r6 <== NOT EXECUTED 5844: ea000037 b 5928 <== NOT EXECUTED } pthread_mutex_unlock (&aio_request_queue.mutex); 5848: e1a00004 mov r0, r4 <== NOT EXECUTED 584c: eb0003fa bl 683c <== NOT EXECUTED return AIO_ALLDONE; 5850: e3a05002 mov r5, #2 <== NOT EXECUTED 5854: ea000033 b 5928 <== NOT EXECUTED } pthread_mutex_lock (&r_chain->mutex); 5858: e286701c add r7, r6, #28 <== NOT EXECUTED 585c: e1a00007 mov r0, r7 <== NOT EXECUTED 5860: eb0003d6 bl 67c0 <== NOT EXECUTED 5864: e1a00006 mov r0, r6 <== NOT EXECUTED 5868: eb0009eb bl 801c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 586c: e1a00006 mov r0, r6 <== NOT EXECUTED 5870: eb000156 bl 5dd0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 5874: e1a00007 mov r0, r7 <== NOT EXECUTED 5878: eb0003ef bl 683c <== NOT EXECUTED 587c: ea00001c b 58f4 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { if (aiocbp->aio_fildes != fildes) { 5880: e5956000 ldr r6, [r5] 5884: e1560007 cmp r6, r7 5888: 0a000006 beq 58a8 pthread_mutex_unlock (&aio_request_queue.mutex); 588c: e1a00004 mov r0, r4 5890: eb0003e9 bl 683c rtems_set_errno_and_return_minus_one (EINVAL); 5894: eb0026dc bl f40c <__errno> 5898: e3a03016 mov r3, #22 589c: e5803000 str r3, [r0] 58a0: e3e05000 mvn r5, #0 58a4: ea00001f b 5928 } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 58a8: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 58ac: e1a01006 mov r1, r6 <== NOT EXECUTED 58b0: e3a02000 mov r2, #0 <== NOT EXECUTED 58b4: eb00006e bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 58b8: e2507000 subs r7, r0, #0 <== NOT EXECUTED 58bc: 1a00000e bne 58fc <== NOT EXECUTED if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 58c0: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 58c4: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 58c8: e1520003 cmp r2, r3 <== NOT EXECUTED 58cc: 0a00000a beq 58fc <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 58d0: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 58d4: e1a01006 mov r1, r6 <== NOT EXECUTED 58d8: e1a02007 mov r2, r7 <== NOT EXECUTED 58dc: eb000064 bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 58e0: e3500000 cmp r0, #0 <== NOT EXECUTED 58e4: 0affffe8 beq 588c <== 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); 58e8: e1a01005 mov r1, r5 <== NOT EXECUTED 58ec: eb000147 bl 5e10 <== NOT EXECUTED 58f0: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 58f4: e1a00004 mov r0, r4 <== NOT EXECUTED 58f8: ea000009 b 5924 <== NOT EXECUTED return result; } pthread_mutex_lock (&r_chain->mutex); 58fc: e287401c add r4, r7, #28 <== NOT EXECUTED 5900: e1a00004 mov r0, r4 <== NOT EXECUTED 5904: eb0003ad bl 67c0 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); 5908: e1a01005 mov r1, r5 <== NOT EXECUTED 590c: e1a00007 mov r0, r7 <== NOT EXECUTED 5910: eb00013e bl 5e10 <== NOT EXECUTED 5914: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 5918: e1a00004 mov r0, r4 <== NOT EXECUTED 591c: eb0003c6 bl 683c <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 5920: e59f0008 ldr r0, [pc, #8] ; 5930 <== NOT EXECUTED 5924: eb0003c4 bl 683c <== NOT EXECUTED return result; } return AIO_ALLDONE; } 5928: e1a00005 mov r0, r5 592c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 0000593c : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 593c: e3500a02 cmp r0, #8192 ; 0x2000 int aio_fsync( int op, struct aiocb *aiocbp ) { 5940: e92d4030 push {r4, r5, lr} 5944: e1a04001 mov r4, r1 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 5948: 13a05016 movne r5, #22 ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 594c: 1a00000c bne 5984 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 5950: e5910000 ldr r0, [r1] 5954: e3a01003 mov r1, #3 5958: eb001991 bl bfa4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 595c: e2000003 and r0, r0, #3 5960: e2400001 sub r0, r0, #1 5964: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 5968: 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))) 596c: 8a000004 bhi 5984 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 5970: e3a00018 mov r0, #24 <== NOT EXECUTED 5974: ebfff536 bl 2e54 <== NOT EXECUTED if (req == NULL) 5978: e2503000 subs r3, r0, #0 <== NOT EXECUTED 597c: 1a000007 bne 59a0 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 5980: e3a0500b mov r5, #11 <== NOT EXECUTED 5984: e3e03000 mvn r3, #0 5988: e5845030 str r5, [r4, #48] ; 0x30 598c: e5843034 str r3, [r4, #52] ; 0x34 5990: eb00269d bl f40c <__errno> 5994: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 5998: e3e00000 mvn r0, #0 599c: 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; 59a0: e5834014 str r4, [r3, #20] <== NOT EXECUTED req->aiocbp->aio_lio_opcode = LIO_SYNC; 59a4: e3a03003 mov r3, #3 <== NOT EXECUTED 59a8: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED return rtems_aio_enqueue (req); } 59ac: 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); 59b0: ea00012c b 5e68 <== NOT EXECUTED =============================================================================== 00006078 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6078: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 607c: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6080: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6084: e5900000 ldr r0, [r0] 6088: eb0017c5 bl bfa4 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 608c: e2000003 and r0, r0, #3 6090: e3500002 cmp r0, #2 6094: 13500000 cmpne r0, #0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6098: 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))) 609c: 1a00000d bne 60d8 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 60a0: e5943014 ldr r3, [r4, #20] 60a4: e3530000 cmp r3, #0 60a8: 1a000007 bne 60cc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 60ac: e5943008 ldr r3, [r4, #8] 60b0: e3530000 cmp r3, #0 60b4: ba000004 blt 60cc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 60b8: e3a00018 mov r0, #24 60bc: ebfff364 bl 2e54 if (req == NULL) 60c0: e2503000 subs r3, r0, #0 60c4: 1a00000a bne 60f4 60c8: ea000001 b 60d4 <== 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); 60cc: e3a05016 mov r5, #22 60d0: ea000000 b 60d8 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 60d4: e3a0500b mov r5, #11 <== NOT EXECUTED 60d8: e3e03000 mvn r3, #0 60dc: e5845030 str r5, [r4, #48] ; 0x30 60e0: e5843034 str r3, [r4, #52] ; 0x34 60e4: eb0024c8 bl f40c <__errno> 60e8: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 60ec: e3e00000 mvn r0, #0 60f0: 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; 60f4: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_READ; 60f8: e3a03001 mov r3, #1 60fc: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6100: 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); 6104: eaffff57 b 5e68 =============================================================================== 00006110 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6110: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6114: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6118: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 611c: e5900000 ldr r0, [r0] 6120: eb00179f bl bfa4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 6124: e2000003 and r0, r0, #3 6128: e2400001 sub r0, r0, #1 612c: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6130: 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))) 6134: 8a00000d bhi 6170 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 6138: e5943014 ldr r3, [r4, #20] 613c: e3530000 cmp r3, #0 6140: 1a000007 bne 6164 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 6144: e5943008 ldr r3, [r4, #8] 6148: e3530000 cmp r3, #0 614c: ba000004 blt 6164 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 6150: e3a00018 mov r0, #24 6154: ebfff33e bl 2e54 if (req == NULL) 6158: e2503000 subs r3, r0, #0 615c: 1a00000a bne 618c 6160: ea000001 b 616c <== 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); 6164: e3a05016 mov r5, #22 6168: ea000000 b 6170 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 616c: e3a0500b mov r5, #11 <== NOT EXECUTED 6170: e3e03000 mvn r3, #0 6174: e5845030 str r5, [r4, #48] ; 0x30 6178: e5843034 str r3, [r4, #52] ; 0x34 617c: eb0024a2 bl f40c <__errno> 6180: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 6184: e3e00000 mvn r0, #0 6188: 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; 618c: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_WRITE; 6190: e3a03002 mov r3, #2 6194: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6198: 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); 619c: eaffff31 b 5e68 =============================================================================== 0000a1fc : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) a1fc: e3500000 cmp r0, #0 a200: 0a00000b beq a234 a204: e5903000 ldr r3, [r0] a208: e3530000 cmp r3, #0 a20c: 0a000008 beq a234 return EINVAL; switch ( policy ) { a210: e3510004 cmp r1, #4 a214: 8a000008 bhi a23c a218: e3a03001 mov r3, #1 a21c: e1a03113 lsl r3, r3, r1 a220: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; a224: 15801014 strne r1, [r0, #20] return 0; a228: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { a22c: 112fff1e bxne lr a230: ea000001 b a23c <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; a234: e3a00016 mov r0, #22 a238: e12fff1e bx lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; a23c: e3a00086 mov r0, #134 ; 0x86 } } a240: e12fff1e bx lr =============================================================================== 00007040 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 7040: e3500000 cmp r0, #0 7044: 0a000007 beq 7068 7048: e5903000 ldr r3, [r0] 704c: e3530000 cmp r3, #0 7050: 0a000004 beq 7068 return EINVAL; switch ( pshared ) { 7054: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 7058: 95801004 strls r1, [r0, #4] return 0; 705c: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 7060: 912fff1e bxls lr 7064: ea000001 b 7070 <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 7068: e3a00016 mov r0, #22 706c: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 7070: e3a00016 mov r0, #22 <== NOT EXECUTED } } 7074: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00006cac : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 6cac: e3500000 cmp r0, #0 6cb0: 0a000007 beq 6cd4 return EINVAL; if ( !attr->is_initialized ) 6cb4: e5903000 ldr r3, [r0] 6cb8: e3530000 cmp r3, #0 6cbc: 0a000004 beq 6cd4 return EINVAL; switch ( pshared ) { 6cc0: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 6cc4: 95801004 strls r1, [r0, #4] return 0; 6cc8: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 6ccc: 912fff1e bxls lr 6cd0: ea000001 b 6cdc { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 6cd4: e3a00016 mov r0, #22 6cd8: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 6cdc: e3a00016 mov r0, #22 } } 6ce0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00005e68 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 5e68: 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); 5e6c: e59f41f0 ldr r4, [pc, #496] ; 6064 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 5e70: e24dd024 sub sp, sp, #36 ; 0x24 5e74: 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); 5e78: e1a00004 mov r0, r4 5e7c: eb00024f bl 67c0 if (result != 0) { 5e80: e2505000 subs r5, r0, #0 5e84: 0a000002 beq 5e94 free (req); 5e88: e1a00006 mov r0, r6 <== NOT EXECUTED 5e8c: ebfff28a bl 28bc <== NOT EXECUTED return result; 5e90: ea000070 b 6058 <== 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); 5e94: eb000456 bl 6ff4 5e98: e28d101c add r1, sp, #28 5e9c: e1a0200d mov r2, sp 5ea0: eb00035b bl 6c14 req->caller_thread = pthread_self (); 5ea4: eb000452 bl 6ff4 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 5ea8: e5963014 ldr r3, [r6, #20] 5eac: e59d1000 ldr r1, [sp] 5eb0: e5932014 ldr r2, [r3, #20] 5eb4: e0622001 rsb r2, r2, r1 5eb8: e586200c str r2, [r6, #12] req->policy = policy; 5ebc: e59d201c ldr r2, [sp, #28] 5ec0: e5862008 str r2, [r6, #8] req->aiocbp->error_code = EINPROGRESS; 5ec4: e3a02077 mov r2, #119 ; 0x77 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); 5ec8: e5860010 str r0, [r6, #16] req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; 5ecc: e5832030 str r2, [r3, #48] ; 0x30 req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 5ed0: e5942068 ldr r2, [r4, #104] ; 0x68 5ed4: e3520000 cmp r2, #0 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; 5ed8: e5835034 str r5, [r3, #52] ; 0x34 if ((aio_request_queue.idle_threads == 0) && 5edc: 1a00002e bne 5f9c 5ee0: e5942064 ldr r2, [r4, #100] ; 0x64 5ee4: e3520004 cmp r2, #4 5ee8: ca00002b bgt 5f9c 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); 5eec: e5931000 ldr r1, [r3] 5ef0: e2840048 add r0, r4, #72 ; 0x48 5ef4: e3a02001 mov r2, #1 5ef8: ebfffedd bl 5a74 if (r_chain->new_fd == 1) { 5efc: e5903018 ldr r3, [r0, #24] 5f00: e3530001 cmp r3, #1 if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 5f04: e1a07000 mov r7, r0 5f08: e2809008 add r9, r0, #8 5f0c: e280801c add r8, r0, #28 5f10: e280a020 add sl, r0, #32 if (r_chain->new_fd == 1) { 5f14: 1a000017 bne 5f78 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 5f18: e1a01006 mov r1, r6 5f1c: e1a00009 mov r0, r9 5f20: eb000852 bl 8070 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 5f24: 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; 5f28: e5875018 str r5, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 5f2c: e1a00008 mov r0, r8 5f30: eb0001d0 bl 6678 pthread_cond_init (&r_chain->cond, NULL); 5f34: e1a01005 mov r1, r5 5f38: e1a0000a mov r0, sl 5f3c: eb0000e5 bl 62d8 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 5f40: e1a03007 mov r3, r7 5f44: e28d0020 add r0, sp, #32 5f48: e2841008 add r1, r4, #8 5f4c: e59f2114 ldr r2, [pc, #276] ; 6068 5f50: eb00029b bl 69c4 rtems_aio_handle, (void *) r_chain); if (result != 0) { 5f54: e2506000 subs r6, r0, #0 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 5f58: 05943064 ldreq r3, [r4, #100] ; 0x64 5f5c: 02833001 addeq r3, r3, #1 5f60: 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) { 5f64: 0a000039 beq 6050 pthread_mutex_unlock (&aio_request_queue.mutex); 5f68: e1a00004 mov r0, r4 <== NOT EXECUTED 5f6c: eb000232 bl 683c <== NOT EXECUTED return result; 5f70: e1a05006 mov r5, r6 <== NOT EXECUTED 5f74: ea000037 b 6058 <== NOT EXECUTED } ++aio_request_queue.active_threads; } else { /* put request in the fd chain it belongs to */ pthread_mutex_lock (&r_chain->mutex); 5f78: e1a00008 mov r0, r8 5f7c: eb00020f bl 67c0 rtems_aio_insert_prio (&r_chain->perfd, req); 5f80: e1a00009 mov r0, r9 5f84: e1a01006 mov r1, r6 5f88: ebffff7c bl 5d80 pthread_cond_signal (&r_chain->cond); 5f8c: e1a0000a mov r0, sl 5f90: eb000100 bl 6398 pthread_mutex_unlock (&r_chain->mutex); 5f94: e1a00008 mov r0, r8 5f98: ea00000e b 5fd8 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, 5f9c: e59f00c8 ldr r0, [pc, #200] ; 606c 5fa0: e5931000 ldr r1, [r3] 5fa4: e3a02000 mov r2, #0 5fa8: ebfffeb1 bl 5a74 req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 5fac: e2504000 subs r4, r0, #0 5fb0: 0a00000a beq 5fe0 { pthread_mutex_lock (&r_chain->mutex); 5fb4: e284701c add r7, r4, #28 <== NOT EXECUTED 5fb8: e1a00007 mov r0, r7 <== NOT EXECUTED 5fbc: eb0001ff bl 67c0 <== NOT EXECUTED rtems_aio_insert_prio (&r_chain->perfd, req); 5fc0: e2840008 add r0, r4, #8 <== NOT EXECUTED 5fc4: e1a01006 mov r1, r6 <== NOT EXECUTED 5fc8: ebffff6c bl 5d80 <== NOT EXECUTED pthread_cond_signal (&r_chain->cond); 5fcc: e2840020 add r0, r4, #32 <== NOT EXECUTED 5fd0: eb0000f0 bl 6398 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 5fd4: e1a00007 mov r0, r7 <== NOT EXECUTED 5fd8: eb000217 bl 683c 5fdc: ea00001b b 6050 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 5fe0: e5963014 ldr r3, [r6, #20] 5fe4: e59f0084 ldr r0, [pc, #132] ; 6070 5fe8: e5931000 ldr r1, [r3] 5fec: e3a02001 mov r2, #1 5ff0: ebfffe9f bl 5a74 if (r_chain->new_fd == 1) { 5ff4: e5903018 ldr r3, [r0, #24] 5ff8: e3530001 cmp r3, #1 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 5ffc: e1a07000 mov r7, r0 6000: e2800008 add r0, r0, #8 if (r_chain->new_fd == 1) { 6004: 1a00000f bne 6048 6008: e1a01006 mov r1, r6 600c: eb000817 bl 8070 <_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); 6010: 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; 6014: e5874018 str r4, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 6018: e287001c add r0, r7, #28 601c: eb000195 bl 6678 pthread_cond_init (&r_chain->cond, NULL); 6020: e1a01004 mov r1, r4 6024: e2870020 add r0, r7, #32 6028: eb0000aa bl 62d8 pthread_cond_signal (&aio_request_queue.new_req); 602c: e59f0040 ldr r0, [pc, #64] ; 6074 6030: eb0000d8 bl 6398 ++aio_request_queue.idle_threads; 6034: e59f3028 ldr r3, [pc, #40] ; 6064 6038: e5932068 ldr r2, [r3, #104] ; 0x68 603c: e2822001 add r2, r2, #1 6040: e5832068 str r2, [r3, #104] ; 0x68 6044: ea000001 b 6050 } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 6048: e1a01006 mov r1, r6 604c: ebffff4b bl 5d80 } } pthread_mutex_unlock (&aio_request_queue.mutex); 6050: e59f000c ldr r0, [pc, #12] ; 6064 6054: eb0001f8 bl 683c return 0; } 6058: e1a00005 mov r0, r5 605c: e28dd024 add sp, sp, #36 ; 0x24 6060: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00005b1c : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 5b1c: 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); 5b20: e59f624c ldr r6, [pc, #588] ; 5d74 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { 5b24: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED 5b28: 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); 5b2c: 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)) { 5b30: 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); 5b34: 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); 5b38: e284a01c add sl, r4, #28 <== NOT EXECUTED 5b3c: e1a0000a mov r0, sl <== NOT EXECUTED 5b40: eb00031e bl 67c0 <== NOT EXECUTED if (result != 0) 5b44: e2508000 subs r8, r0, #0 <== NOT EXECUTED 5b48: 1a000086 bne 5d68 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5b4c: 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 ); 5b50: 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)) { 5b54: e1550003 cmp r5, r3 <== NOT EXECUTED 5b58: 0a000035 beq 5c34 <== 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); 5b5c: eb000524 bl 6ff4 <== NOT EXECUTED 5b60: e28d1028 add r1, sp, #40 ; 0x28 <== NOT EXECUTED 5b64: e1a02009 mov r2, r9 <== NOT EXECUTED 5b68: eb000429 bl 6c14 <== NOT EXECUTED param.sched_priority = req->priority; 5b6c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 5b70: e58d3004 str r3, [sp, #4] <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); 5b74: eb00051e bl 6ff4 <== NOT EXECUTED 5b78: e1a02009 mov r2, r9 <== NOT EXECUTED 5b7c: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED 5b80: eb000520 bl 7008 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5b84: e1a00005 mov r0, r5 <== NOT EXECUTED 5b88: eb000923 bl 801c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 5b8c: e1a0000a mov r0, sl <== NOT EXECUTED 5b90: eb000329 bl 683c <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { 5b94: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED 5b98: e592302c ldr r3, [r2, #44] ; 0x2c <== NOT EXECUTED 5b9c: e3530002 cmp r3, #2 <== NOT EXECUTED 5ba0: 0a00000b beq 5bd4 <== NOT EXECUTED 5ba4: e3530003 cmp r3, #3 <== NOT EXECUTED 5ba8: 0a000011 beq 5bf4 <== NOT EXECUTED 5bac: e3530001 cmp r3, #1 <== NOT EXECUTED 5bb0: 1a000013 bne 5c04 <== NOT EXECUTED case LIO_READ: result = pread (req->aiocbp->aio_fildes, 5bb4: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED 5bb8: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 5bbc: e58d1000 str r1, [sp] <== NOT EXECUTED 5bc0: e592100c ldr r1, [r2, #12] <== NOT EXECUTED 5bc4: e5920000 ldr r0, [r2] <== NOT EXECUTED 5bc8: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 5bcc: eb002910 bl 10014 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 5bd0: ea000009 b 5bfc <== NOT EXECUTED case LIO_WRITE: result = pwrite (req->aiocbp->aio_fildes, 5bd4: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED 5bd8: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 5bdc: e58d1000 str r1, [sp] <== NOT EXECUTED 5be0: e592100c ldr r1, [r2, #12] <== NOT EXECUTED 5be4: e5920000 ldr r0, [r2] <== NOT EXECUTED 5be8: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 5bec: eb002950 bl 10134 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 5bf0: ea000001 b 5bfc <== NOT EXECUTED case LIO_SYNC: result = fsync (req->aiocbp->aio_fildes); 5bf4: e5920000 ldr r0, [r2] <== NOT EXECUTED 5bf8: eb00195e bl c178 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 5bfc: e3700001 cmn r0, #1 <== NOT EXECUTED 5c00: 1a000006 bne 5c20 <== NOT EXECUTED req->aiocbp->return_value = -1; 5c04: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED 5c08: e3e02000 mvn r2, #0 <== NOT EXECUTED 5c0c: e5852034 str r2, [r5, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = errno; 5c10: eb0025fd bl f40c <__errno> <== NOT EXECUTED 5c14: e5903000 ldr r3, [r0] <== NOT EXECUTED 5c18: e5853030 str r3, [r5, #48] ; 0x30 <== NOT EXECUTED 5c1c: eaffffc5 b 5b38 <== NOT EXECUTED } else { req->aiocbp->return_value = result; 5c20: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED req->aiocbp->error_code = 0; 5c24: 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; 5c28: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = 0; 5c2c: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED 5c30: eaffffc0 b 5b38 <== 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); 5c34: e1a0000a mov r0, sl <== NOT EXECUTED 5c38: eb0002ff bl 683c <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); 5c3c: e59f0130 ldr r0, [pc, #304] ; 5d74 <== NOT EXECUTED 5c40: eb0002de bl 67c0 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) 5c44: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 5c48: e1530005 cmp r3, r5 <== NOT EXECUTED 5c4c: 1affffb9 bne 5b38 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); 5c50: e1a01007 mov r1, r7 <== NOT EXECUTED 5c54: e3a00001 mov r0, #1 <== NOT EXECUTED 5c58: eb000150 bl 61a0 <== NOT EXECUTED timeout.tv_sec += 3; 5c5c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 5c60: 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; 5c64: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 5c68: e1a00005 mov r0, r5 <== NOT EXECUTED 5c6c: e59f1100 ldr r1, [pc, #256] ; 5d74 <== NOT EXECUTED 5c70: 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; 5c74: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 5c78: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&r_chain->cond, 5c7c: eb0001dc bl 63f4 <== 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) { 5c80: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 5c84: 1affffab bne 5b38 <== NOT EXECUTED 5c88: e1a00004 mov r0, r4 <== NOT EXECUTED 5c8c: eb0008e2 bl 801c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 5c90: e1a0000a mov r0, sl <== NOT EXECUTED 5c94: eb00022b bl 6548 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 5c98: e1a00005 mov r0, r5 <== NOT EXECUTED 5c9c: eb00015d bl 6218 <== NOT EXECUTED free (r_chain); 5ca0: e1a00004 mov r0, r4 <== NOT EXECUTED 5ca4: ebfff304 bl 28bc <== 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)) { 5ca8: e5963054 ldr r3, [r6, #84] ; 0x54 <== NOT EXECUTED 5cac: e153000b cmp r3, fp <== NOT EXECUTED 5cb0: 1a000029 bne 5d5c <== NOT EXECUTED ++aio_request_queue.idle_threads; 5cb4: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 5cb8: 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; 5cbc: e2833001 add r3, r3, #1 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 5cc0: 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; 5cc4: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 5cc8: eb000134 bl 61a0 <== NOT EXECUTED timeout.tv_sec += 3; 5ccc: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 5cd0: e59f00a0 ldr r0, [pc, #160] ; 5d78 <== 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; 5cd4: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 5cd8: e59f1094 ldr r1, [pc, #148] ; 5d74 <== NOT EXECUTED 5cdc: 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; 5ce0: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 5ce4: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&aio_request_queue.new_req, 5ce8: eb0001c1 bl 63f4 <== 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) { 5cec: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 5cf0: 1a000002 bne 5d00 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 5cf4: e59f0078 ldr r0, [pc, #120] ; 5d74 <== NOT EXECUTED 5cf8: eb0002cf bl 683c <== NOT EXECUTED return NULL; 5cfc: ea000019 b 5d68 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5d00: 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; 5d04: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED 5d08: e1a00005 mov r0, r5 <== NOT EXECUTED 5d0c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 5d10: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED 5d14: eb0008c0 bl 801c <_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, 5d18: e3a02001 mov r2, #1 <== NOT EXECUTED 5d1c: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED 5d20: e59f0054 ldr r0, [pc, #84] ; 5d7c <== NOT EXECUTED 5d24: ebffff52 bl 5a74 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 5d28: 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, 5d2c: e1a04000 mov r4, r0 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; 5d30: e5808018 str r8, [r0, #24] <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); 5d34: e280001c add r0, r0, #28 <== NOT EXECUTED 5d38: eb00024e bl 6678 <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 5d3c: e2855008 add r5, r5, #8 <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); pthread_cond_init (&r_chain->cond, NULL); 5d40: e1a01008 mov r1, r8 <== NOT EXECUTED 5d44: e2840020 add r0, r4, #32 <== NOT EXECUTED 5d48: eb000162 bl 62d8 <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 5d4c: e8950007 ldm r5, {r0, r1, r2} <== NOT EXECUTED 5d50: e2843008 add r3, r4, #8 <== NOT EXECUTED 5d54: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED 5d58: eaffff76 b 5b38 <== 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); 5d5c: e59f0010 ldr r0, [pc, #16] ; 5d74 <== NOT EXECUTED 5d60: eb0002b5 bl 683c <== NOT EXECUTED 5d64: eaffff73 b 5b38 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5d68: e3a00000 mov r0, #0 <== NOT EXECUTED 5d6c: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 5d70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000059b4 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 59b4: e92d4010 push {r4, lr} int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 59b8: e59f00a4 ldr r0, [pc, #164] ; 5a64 59bc: eb0003e0 bl 6944 if (result != 0) 59c0: e2504000 subs r4, r0, #0 59c4: 1a000024 bne 5a5c return result; result = 59c8: e59f0094 ldr r0, [pc, #148] ; 5a64 59cc: e1a01004 mov r1, r4 59d0: eb0003ed bl 698c pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 59d4: e3500000 cmp r0, #0 pthread_attr_destroy (&aio_request_queue.attr); 59d8: 159f0084 ldrne r0, [pc, #132] ; 5a64 59dc: 1b0003cf blne 6920 result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 59e0: e59f0080 ldr r0, [pc, #128] ; 5a68 59e4: e3a01000 mov r1, #0 59e8: eb000322 bl 6678 if (result != 0) 59ec: e3500000 cmp r0, #0 pthread_attr_destroy (&aio_request_queue.attr); 59f0: 159f006c ldrne r0, [pc, #108] ; 5a64 59f4: 1b0003c9 blne 6920 result = pthread_cond_init (&aio_request_queue.new_req, NULL); 59f8: e59f006c ldr r0, [pc, #108] ; 5a6c 59fc: e3a01000 mov r1, #0 5a00: eb000234 bl 62d8 if (result != 0) { 5a04: e2504000 subs r4, r0, #0 5a08: 0a000003 beq 5a1c pthread_mutex_destroy (&aio_request_queue.mutex); 5a0c: e59f0054 ldr r0, [pc, #84] ; 5a68 <== NOT EXECUTED 5a10: eb0002cc bl 6548 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 5a14: e59f0048 ldr r0, [pc, #72] ; 5a64 <== NOT EXECUTED 5a18: eb0003c0 bl 6920 <== NOT EXECUTED ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5a1c: e59f3044 ldr r3, [pc, #68] ; 5a68 5a20: e283204c add r2, r3, #76 ; 0x4c head->previous = NULL; tail->previous = head; 5a24: e2831048 add r1, r3, #72 ; 0x48 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5a28: e5832048 str r2, [r3, #72] ; 0x48 head->previous = NULL; 5a2c: e3a02000 mov r2, #0 5a30: e583204c str r2, [r3, #76] ; 0x4c tail->previous = head; 5a34: 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; 5a38: e5832058 str r2, [r3, #88] ; 0x58 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5a3c: 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; 5a40: e5832064 str r2, [r3, #100] ; 0x64 aio_request_queue.idle_threads = 0; 5a44: e5832068 str r2, [r3, #104] ; 0x68 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 5a48: e59f2020 ldr r2, [pc, #32] ; 5a70 5a4c: e5831054 str r1, [r3, #84] ; 0x54 head->previous = NULL; tail->previous = head; 5a50: e2831054 add r1, r3, #84 ; 0x54 5a54: e583105c str r1, [r3, #92] ; 0x5c 5a58: e5832060 str r2, [r3, #96] ; 0x60 return result; } 5a5c: e1a00004 mov r0, r4 5a60: e8bd8010 pop {r4, pc} =============================================================================== 00005d80 : 5d80: e1a02000 mov r2, r0 5d84: e4923004 ldr r3, [r2], #4 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 5d88: e1530002 cmp r3, r2 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 5d8c: e1a0c001 mov ip, r1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 5d90: 0a00000d beq 5dcc 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; 5d94: e5931014 ldr r1, [r3, #20] while (req->aiocbp->aio_reqprio > prio && 5d98: 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; 5d9c: e5911014 ldr r1, [r1, #20] while (req->aiocbp->aio_reqprio > prio && 5da0: e5900014 ldr r0, [r0, #20] 5da4: ea000002 b 5db4 } AIO_printf ("Thread finished\n"); return NULL; } 5da8: 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; 5dac: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED 5db0: 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 && 5db4: e1500001 cmp r0, r1 5db8: da000001 ble 5dc4 5dbc: e1530002 cmp r3, r2 <== NOT EXECUTED 5dc0: 1afffff8 bne 5da8 <== 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 ); 5dc4: e5930004 ldr r0, [r3, #4] 5dc8: e1a0100c mov r1, ip 5dcc: ea0008a7 b 8070 <_Chain_Insert> =============================================================================== 00005dd0 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 5dd0: 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)); 5dd4: e280700c add r7, r0, #12 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5dd8: 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; 5ddc: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED req->aiocbp->return_value = -1; 5de0: 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)) 5de4: ea000006 b 5e04 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5de8: e1a00004 mov r0, r4 <== NOT EXECUTED 5dec: eb00088a bl 801c <_Chain_Extract> <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 5df0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED req->aiocbp->return_value = -1; free (req); 5df4: 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; 5df8: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; 5dfc: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); 5e00: ebfff2ad bl 28bc <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 5e04: e1540007 cmp r4, r7 <== NOT EXECUTED 5e08: 1afffff6 bne 5de8 <== NOT EXECUTED rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; free (req); } } 5e0c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00005e10 : * 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) { 5e10: e92d4010 push {r4, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5e14: 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) { 5e18: ea000000 b 5e20 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5e1c: 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) { 5e20: e1540000 cmp r4, r0 <== NOT EXECUTED 5e24: 0a00000d beq 5e60 <== NOT EXECUTED 5e28: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 5e2c: e1530001 cmp r3, r1 <== NOT EXECUTED 5e30: 1afffff9 bne 5e1c <== NOT EXECUTED 5e34: e1a00004 mov r0, r4 <== NOT EXECUTED 5e38: eb000877 bl 801c <_Chain_Extract> <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 5e3c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 5e40: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED 5e44: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED current->aiocbp->return_value = -1; 5e48: e3e02000 mvn r2, #0 <== NOT EXECUTED free (current); 5e4c: e1a00004 mov r0, r4 <== NOT EXECUTED return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; 5e50: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED free (current); 5e54: ebfff298 bl 28bc <== NOT EXECUTED } return AIO_CANCELED; 5e58: e3a00000 mov r0, #0 <== NOT EXECUTED 5e5c: 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; 5e60: e3a00001 mov r0, #1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 5e64: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 0000c60c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { c60c: 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 ) c610: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { c614: e1a04000 mov r4, r0 c618: 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; c61c: 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 ) c620: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; c624: e59f313c ldr r3, [pc, #316] ; c768 c628: 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; c62c: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; c630: 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 ) c634: 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; c638: 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; c63c: 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; c640: 03a08c01 moveq r8, #256 ; 0x100 c644: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) c648: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; c64c: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; c650: e3590000 cmp r9, #0 c654: 03a09b01 moveq r9, #1024 ; 0x400 c658: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); c65c: ebffefe4 bl 85f4 <_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; c660: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); c664: e1898008 orr r8, r9, r8 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) c668: 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; c66c: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) c670: 0a000003 beq c684 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; c674: e3140c01 tst r4, #256 ; 0x100 c678: 13a03000 movne r3, #0 c67c: 03a03001 moveq r3, #1 c680: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { c684: e3150c02 tst r5, #512 ; 0x200 c688: 0a000006 beq c6a8 if ( _Modes_Is_timeslice(mode_set) ) { c68c: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; c690: 13a03001 movne r3, #1 c694: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; c698: 159f30cc ldrne r3, [pc, #204] ; c76c c69c: 15933000 ldrne r3, [r3] } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; c6a0: 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; c6a4: 15873078 strne r3, [r7, #120] ; 0x78 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) c6a8: e3150080 tst r5, #128 ; 0x80 c6ac: 0a000001 beq c6b8 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); c6b0: e2040080 and r0, r4, #128 ; 0x80 c6b4: ebffefc9 bl 85e0 <_CPU_ISR_Set_level> * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { c6b8: e2150b01 ands r0, r5, #1024 ; 0x400 c6bc: 0a000013 beq c710 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( c6c0: 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 ) { c6c4: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( c6c8: 13a03000 movne r3, #0 c6cc: 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 ) { c6d0: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; c6d4: 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 ) { c6d8: 0a00000c beq c710 asr->is_enabled = is_asr_enabled; c6dc: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( c6e0: e10f3000 mrs r3, CPSR c6e4: e3832080 orr r2, r3, #128 ; 0x80 c6e8: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; c6ec: e2861014 add r1, r6, #20 c6f0: e8910006 ldm r1, {r1, r2} information->signals_pending = information->signals_posted; information->signals_posted = _signals; c6f4: 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; c6f8: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( c6fc: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { c700: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; c704: e3500000 cmp r0, #0 c708: 13a00001 movne r0, #1 c70c: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { c710: e59f3058 ldr r3, [pc, #88] ; c770 c714: e5933000 ldr r3, [r3] c718: e3530003 cmp r3, #3 c71c: 1a00000f bne c760 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; c720: e59f2040 ldr r2, [pc, #64] ; c768 if ( are_signals_pending || c724: e3500000 cmp r0, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; c728: e5923004 ldr r3, [r2, #4] if ( are_signals_pending || c72c: 1a000005 bne c748 c730: e5922008 ldr r2, [r2, #8] c734: e1530002 cmp r3, r2 c738: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { c73c: e5d33074 ldrb r3, [r3, #116] ; 0x74 c740: e3530000 cmp r3, #0 c744: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch_necessary = true; c748: e59f3018 ldr r3, [pc, #24] ; c768 c74c: e3a02001 mov r2, #1 c750: e5c32010 strb r2, [r3, #16] if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); c754: ebffea23 bl 6fe8 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; c758: e3a00000 mov r0, #0 c75c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} c760: e3a00000 mov r0, #0 <== NOT EXECUTED } c764: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00005744 : struct sigaction *oact ) { ISR_Level level; if ( oact ) 5744: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 5748: 159f20b8 ldrne r2, [pc, #184] ; 5808 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 574c: e92d40f0 push {r4, r5, r6, r7, lr} 5750: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 5754: 13a0100c movne r1, #12 5758: 10222091 mlane r2, r1, r0, r2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 575c: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 5760: 18920007 ldmne r2, {r0, r1, r2} 5764: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 5768: e3540000 cmp r4, #0 576c: 0a000004 beq 5784 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5770: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5774: e353001f cmp r3, #31 5778: 8a000001 bhi 5784 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 577c: e3540009 cmp r4, #9 5780: 1a000004 bne 5798 rtems_set_errno_and_return_minus_one( EINVAL ); 5784: eb002156 bl dce4 <__errno> 5788: e3a03016 mov r3, #22 578c: e5803000 str r3, [r0] 5790: e3e00000 mvn r0, #0 5794: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 5798: e3550000 cmp r5, #0 579c: 0a000017 beq 5800 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 57a0: e10f6000 mrs r6, CPSR 57a4: e3863080 orr r3, r6, #128 ; 0x80 57a8: 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 ) { 57ac: e5953008 ldr r3, [r5, #8] 57b0: e3530000 cmp r3, #0 57b4: e59f704c ldr r7, [pc, #76] ; 5808 57b8: 1a000007 bne 57dc _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 57bc: e283300c add r3, r3, #12 57c0: e0040493 mul r4, r3, r4 57c4: e59f2040 ldr r2, [pc, #64] ; 580c 57c8: e0873004 add r3, r7, r4 57cc: e0824004 add r4, r2, r4 57d0: e8940007 ldm r4, {r0, r1, r2} 57d4: e8830007 stm r3, {r0, r1, r2} 57d8: ea000005 b 57f4 } else { _POSIX_signals_Clear_process_signals( sig ); 57dc: e1a00004 mov r0, r4 57e0: eb0015b2 bl aeb0 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 57e4: e3a0300c mov r3, #12 57e8: e0247493 mla r4, r3, r4, r7 57ec: e8950007 ldm r5, {r0, r1, r2} 57f0: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 57f4: 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; 57f8: e3a00000 mov r0, #0 57fc: e8bd80f0 pop {r4, r5, r6, r7, pc} 5800: e1a00005 mov r0, r5 } 5804: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00007dac : int sigwait( const sigset_t *set, int *sig ) { 7dac: e92d4010 push {r4, lr} 7db0: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 7db4: e3a01000 mov r1, #0 7db8: e1a02001 mov r2, r1 7dbc: ebffff84 bl 7bd4 if ( status != -1 ) { 7dc0: e3700001 cmn r0, #1 7dc4: 0a000004 beq 7ddc if ( sig ) 7dc8: e3540000 cmp r4, #0 *sig = status; 7dcc: 15840000 strne r0, [r4] return 0; 7dd0: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 7dd4: 18bd8010 popne {r4, pc} 7dd8: ea000002 b 7de8 <== NOT EXECUTED *sig = status; return 0; } return errno; 7ddc: eb002084 bl fff4 <__errno> 7de0: e5900000 ldr r0, [r0] 7de4: e8bd8010 pop {r4, pc} status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 7de8: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 7dec: e8bd8010 pop {r4, pc} <== NOT EXECUTED