=============================================================================== 00014c58 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14c58: 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 ) { 14c5c: 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 ) { 14c60: 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 ) { 14c64: e1a06000 mov r6, r0 14c68: e1a0a001 mov sl, r1 14c6c: e1a07002 mov r7, r2 14c70: 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 ) { 14c74: 8a000013 bhi 14cc8 <_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 ) { 14c78: e5905048 ldr r5, [r0, #72] ; 0x48 14c7c: e3550000 cmp r5, #0 *count = 0; 14c80: 13a00000 movne r0, #0 14c84: 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 ) { 14c88: 0a000007 beq 14cac <_CORE_message_queue_Broadcast+0x54> 14c8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 14c90: e594002c ldr r0, [r4, #44] ; 0x2c 14c94: e1a0100a mov r1, sl 14c98: e1a02007 mov r2, r7 14c9c: eb002226 bl 1d53c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 14ca0: e5943028 ldr r3, [r4, #40] ; 0x28 14ca4: 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; 14ca8: 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 = 14cac: e1a00006 mov r0, r6 14cb0: eb0009db bl 17424 <_Thread_queue_Dequeue> 14cb4: e2504000 subs r4, r0, #0 14cb8: 1afffff4 bne 14c90 <_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; 14cbc: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 14cc0: e1a00004 mov r0, r4 14cc4: 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; 14cc8: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 14ccc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00006d04 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6d04: 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; 6d08: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6d0c: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6d10: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6d14: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6d18: e59f4500 ldr r4, [pc, #1280] ; 7220 <_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; 6d1c: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6d20: e59f34fc ldr r3, [pc, #1276] ; 7224 <_Heap_Walk+0x520> 6d24: e31200ff tst r2, #255 ; 0xff 6d28: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6d2c: e59f34f4 ldr r3, [pc, #1268] ; 7228 <_Heap_Walk+0x524> 6d30: 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; 6d34: 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() ) ) { 6d38: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6d3c: e1a06000 mov r6, r0 6d40: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 6d44: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6d48: 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() ) ) { 6d4c: 1a000127 bne 71f0 <_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)( 6d50: e59dc024 ldr ip, [sp, #36] ; 0x24 6d54: e58dc000 str ip, [sp] 6d58: e5903018 ldr r3, [r0, #24] 6d5c: e58d3004 str r3, [sp, #4] 6d60: e590301c ldr r3, [r0, #28] 6d64: e59d2020 ldr r2, [sp, #32] 6d68: e58d3008 str r3, [sp, #8] 6d6c: e59d3028 ldr r3, [sp, #40] ; 0x28 6d70: e58d200c str r2, [sp, #12] 6d74: e58d3010 str r3, [sp, #16] 6d78: e5903008 ldr r3, [r0, #8] 6d7c: e58d3014 str r3, [sp, #20] 6d80: e590300c ldr r3, [r0, #12] 6d84: e59f24a0 ldr r2, [pc, #1184] ; 722c <_Heap_Walk+0x528> 6d88: e58d3018 str r3, [sp, #24] 6d8c: e1a00001 mov r0, r1 6d90: e1a03009 mov r3, r9 6d94: e3a01000 mov r1, #0 6d98: e1a0e00f mov lr, pc 6d9c: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 6da0: e3590000 cmp r9, #0 6da4: 1a000006 bne 6dc4 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 6da8: e1a00005 mov r0, r5 6dac: e3a01001 mov r1, #1 6db0: e59f2478 ldr r2, [pc, #1144] ; 7230 <_Heap_Walk+0x52c> 6db4: e1a0e00f mov lr, pc 6db8: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6dbc: e1a08009 mov r8, r9 6dc0: ea00010b b 71f4 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 6dc4: e2198003 ands r8, r9, #3 (*printer)( 6dc8: 11a00005 movne r0, r5 6dcc: 13a01001 movne r1, #1 6dd0: 159f245c ldrne r2, [pc, #1116] ; 7234 <_Heap_Walk+0x530> 6dd4: 11a03009 movne r3, r9 6dd8: 1a00010c bne 7210 <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6ddc: e59d0024 ldr r0, [sp, #36] ; 0x24 6de0: e1a01009 mov r1, r9 6de4: ebffe76e bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6de8: e250b000 subs fp, r0, #0 6dec: 0a000006 beq 6e0c <_Heap_Walk+0x108> (*printer)( 6df0: e1a00005 mov r0, r5 6df4: e3a01001 mov r1, #1 6df8: e59f2438 ldr r2, [pc, #1080] ; 7238 <_Heap_Walk+0x534> 6dfc: e59d3024 ldr r3, [sp, #36] ; 0x24 6e00: e1a0e00f mov lr, pc 6e04: e12fff14 bx r4 6e08: ea0000f9 b 71f4 <_Heap_Walk+0x4f0> 6e0c: e59dc020 ldr ip, [sp, #32] 6e10: e1a01009 mov r1, r9 6e14: e28c0008 add r0, ip, #8 6e18: ebffe761 bl ba4 <__umodsi3> ); return false; } if ( 6e1c: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 6e20: 11a00005 movne r0, r5 6e24: 13a01001 movne r1, #1 6e28: 159f240c ldrne r2, [pc, #1036] ; 723c <_Heap_Walk+0x538> 6e2c: 159d3020 ldrne r3, [sp, #32] 6e30: 1a0000cc bne 7168 <_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; 6e34: e59d2020 ldr r2, [sp, #32] 6e38: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6e3c: e2188001 ands r8, r8, #1 (*printer)( 6e40: 01a00005 moveq r0, r5 6e44: 03a01001 moveq r1, #1 6e48: 059f23f0 ldreq r2, [pc, #1008] ; 7240 <_Heap_Walk+0x53c> 6e4c: 0a000009 beq 6e78 <_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; 6e50: e59d3028 ldr r3, [sp, #40] ; 0x28 6e54: e5937004 ldr r7, [r3, #4] 6e58: 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); 6e5c: 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; 6e60: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 6e64: e2188001 ands r8, r8, #1 6e68: 1a000005 bne 6e84 <_Heap_Walk+0x180> (*printer)( 6e6c: e59f23d0 ldr r2, [pc, #976] ; 7244 <_Heap_Walk+0x540> 6e70: e1a00005 mov r0, r5 6e74: e3a01001 mov r1, #1 6e78: e1a0e00f mov lr, pc 6e7c: e12fff14 bx r4 6e80: ea0000db b 71f4 <_Heap_Walk+0x4f0> ); return false; } if ( 6e84: e59dc020 ldr ip, [sp, #32] 6e88: e157000c cmp r7, ip 6e8c: 0a000006 beq 6eac <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 6e90: e1a00005 mov r0, r5 <== NOT EXECUTED 6e94: e3a01001 mov r1, #1 <== NOT EXECUTED 6e98: e59f23a8 ldr r2, [pc, #936] ; 7248 <_Heap_Walk+0x544> <== NOT EXECUTED 6e9c: e1a0e00f mov lr, pc <== NOT EXECUTED 6ea0: 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; 6ea4: e1a0800a mov r8, sl <== NOT EXECUTED 6ea8: ea0000d1 b 71f4 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6eac: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 6eb0: 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 ); 6eb4: e1a0a006 mov sl, r6 6eb8: ea000034 b 6f90 <_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; 6ebc: e5963020 ldr r3, [r6, #32] 6ec0: e1530008 cmp r3, r8 6ec4: 83a0c000 movhi ip, #0 6ec8: 8a000003 bhi 6edc <_Heap_Walk+0x1d8> 6ecc: e596c024 ldr ip, [r6, #36] ; 0x24 6ed0: e15c0008 cmp ip, r8 6ed4: 33a0c000 movcc ip, #0 6ed8: 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 ) ) { 6edc: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 6ee0: 01a00005 moveq r0, r5 6ee4: 03a01001 moveq r1, #1 6ee8: 059f235c ldreq r2, [pc, #860] ; 724c <_Heap_Walk+0x548> 6eec: 0a000012 beq 6f3c <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6ef0: e2880008 add r0, r8, #8 6ef4: e1a0100b mov r1, fp 6ef8: ebffe729 bl ba4 <__umodsi3> ); return false; } if ( 6efc: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 6f00: 11a00005 movne r0, r5 6f04: 13a01001 movne r1, #1 6f08: 159f2340 ldrne r2, [pc, #832] ; 7250 <_Heap_Walk+0x54c> 6f0c: 11a03008 movne r3, r8 6f10: 1a0000be bne 7210 <_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; 6f14: e5983004 ldr r3, [r8, #4] 6f18: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 6f1c: 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; 6f20: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 6f24: e2133001 ands r3, r3, #1 6f28: e58d302c str r3, [sp, #44] ; 0x2c 6f2c: 0a000009 beq 6f58 <_Heap_Walk+0x254> (*printer)( 6f30: e59f231c ldr r2, [pc, #796] ; 7254 <_Heap_Walk+0x550> 6f34: e1a00005 mov r0, r5 6f38: e3a01001 mov r1, #1 6f3c: e1a03008 mov r3, r8 6f40: e58dc01c str ip, [sp, #28] 6f44: e1a0e00f mov lr, pc 6f48: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f4c: e59dc01c ldr ip, [sp, #28] 6f50: e1a0800c mov r8, ip 6f54: ea0000a6 b 71f4 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 6f58: e598300c ldr r3, [r8, #12] 6f5c: e153000a cmp r3, sl 6f60: 0a000008 beq 6f88 <_Heap_Walk+0x284> (*printer)( 6f64: e58d3000 str r3, [sp] 6f68: e1a00005 mov r0, r5 6f6c: e1a03008 mov r3, r8 6f70: e3a01001 mov r1, #1 6f74: e59f22dc ldr r2, [pc, #732] ; 7258 <_Heap_Walk+0x554> 6f78: e1a0e00f mov lr, pc 6f7c: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f80: e59d802c ldr r8, [sp, #44] ; 0x2c 6f84: ea00009a b 71f4 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 6f88: e1a0a008 mov sl, r8 6f8c: 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 ) { 6f90: e1580006 cmp r8, r6 6f94: 1affffc8 bne 6ebc <_Heap_Walk+0x1b8> 6f98: ea000000 b 6fa0 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 6f9c: e1a07008 mov r7, r8 return true; } 6fa0: 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; 6fa4: 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; 6fa8: 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); 6fac: 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; 6fb0: e1520008 cmp r2, r8 6fb4: 83a0b000 movhi fp, #0 6fb8: 8a000003 bhi 6fcc <_Heap_Walk+0x2c8> 6fbc: e596b024 ldr fp, [r6, #36] ; 0x24 6fc0: e15b0008 cmp fp, r8 6fc4: 33a0b000 movcc fp, #0 6fc8: 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 ) ) { 6fcc: e21bb0ff ands fp, fp, #255 ; 0xff 6fd0: 1a000007 bne 6ff4 <_Heap_Walk+0x2f0> (*printer)( 6fd4: e58d8000 str r8, [sp] 6fd8: e1a00005 mov r0, r5 6fdc: e3a01001 mov r1, #1 6fe0: e59f2274 ldr r2, [pc, #628] ; 725c <_Heap_Walk+0x558> 6fe4: e1a03007 mov r3, r7 6fe8: e1a0e00f mov lr, pc 6fec: e12fff14 bx r4 6ff0: ea00005e b 7170 <_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; 6ff4: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6ff8: e1a0000a mov r0, sl 6ffc: e1a01009 mov r1, r9 7000: e057b002 subs fp, r7, r2 7004: 13a0b001 movne fp, #1 7008: e58d301c str r3, [sp, #28] 700c: ebffe6e4 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 7010: e3500000 cmp r0, #0 7014: e59d301c ldr r3, [sp, #28] 7018: 0a000005 beq 7034 <_Heap_Walk+0x330> 701c: e35b0000 cmp fp, #0 (*printer)( 7020: 158da000 strne sl, [sp] 7024: 11a00005 movne r0, r5 7028: 13a01001 movne r1, #1 702c: 159f222c ldrne r2, [pc, #556] ; 7260 <_Heap_Walk+0x55c> 7030: 1a000014 bne 7088 <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 7034: e59dc024 ldr ip, [sp, #36] ; 0x24 7038: e15a000c cmp sl, ip 703c: 2a000009 bcs 7068 <_Heap_Walk+0x364> 7040: e35b0000 cmp fp, #0 7044: 0a000007 beq 7068 <_Heap_Walk+0x364> (*printer)( 7048: e88d1400 stm sp, {sl, ip} 704c: e1a00005 mov r0, r5 7050: e3a01001 mov r1, #1 7054: e59f2208 ldr r2, [pc, #520] ; 7264 <_Heap_Walk+0x560> 7058: e1a03007 mov r3, r7 705c: e1a0e00f mov lr, pc 7060: e12fff14 bx r4 7064: ea00006b b 7218 <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 7068: e1580007 cmp r8, r7 706c: 8a000009 bhi 7098 <_Heap_Walk+0x394> 7070: e35b0000 cmp fp, #0 7074: 0a000007 beq 7098 <_Heap_Walk+0x394> (*printer)( 7078: e58d8000 str r8, [sp] 707c: e59f21e4 ldr r2, [pc, #484] ; 7268 <_Heap_Walk+0x564> 7080: e1a00005 mov r0, r5 7084: e3a01001 mov r1, #1 7088: e1a03007 mov r3, r7 708c: e1a0e00f mov lr, pc 7090: e12fff14 bx r4 7094: ea00005f b 7218 <_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; 7098: e203b001 and fp, r3, #1 709c: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 70a0: e3130001 tst r3, #1 70a4: 1a00003b bne 7198 <_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 ? 70a8: 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)( 70ac: e5963008 ldr r3, [r6, #8] 70b0: e1520003 cmp r2, r3 block = next_block; } while ( block != first_block ); return true; } 70b4: 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)( 70b8: 059f01ac ldreq r0, [pc, #428] ; 726c <_Heap_Walk+0x568> 70bc: 0a000003 beq 70d0 <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 70c0: e59f31a8 ldr r3, [pc, #424] ; 7270 <_Heap_Walk+0x56c> 70c4: e1520006 cmp r2, r6 70c8: e59f01a4 ldr r0, [pc, #420] ; 7274 <_Heap_Walk+0x570> 70cc: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 70d0: 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)( 70d4: e1530001 cmp r3, r1 70d8: 059f1198 ldreq r1, [pc, #408] ; 7278 <_Heap_Walk+0x574> 70dc: 0a000003 beq 70f0 <_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)" : "") 70e0: e59fc194 ldr ip, [pc, #404] ; 727c <_Heap_Walk+0x578> 70e4: e1530006 cmp r3, r6 70e8: e59f1184 ldr r1, [pc, #388] ; 7274 <_Heap_Walk+0x570> 70ec: 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)( 70f0: e58d2004 str r2, [sp, #4] 70f4: e58d0008 str r0, [sp, #8] 70f8: e58d300c str r3, [sp, #12] 70fc: e58d1010 str r1, [sp, #16] 7100: e1a03007 mov r3, r7 7104: e58da000 str sl, [sp] 7108: e1a00005 mov r0, r5 710c: e3a01000 mov r1, #0 7110: e59f2168 ldr r2, [pc, #360] ; 7280 <_Heap_Walk+0x57c> 7114: e1a0e00f mov lr, pc 7118: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 711c: e5983000 ldr r3, [r8] 7120: e15a0003 cmp sl, r3 7124: 0a000009 beq 7150 <_Heap_Walk+0x44c> (*printer)( 7128: e58d3004 str r3, [sp, #4] 712c: e58da000 str sl, [sp] 7130: e58d8008 str r8, [sp, #8] 7134: e1a00005 mov r0, r5 7138: e3a01001 mov r1, #1 713c: e59f2140 ldr r2, [pc, #320] ; 7284 <_Heap_Walk+0x580> 7140: e1a03007 mov r3, r7 7144: e1a0e00f mov lr, pc 7148: e12fff14 bx r4 714c: ea000031 b 7218 <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 7150: e35b0000 cmp fp, #0 7154: 1a000007 bne 7178 <_Heap_Walk+0x474> (*printer)( 7158: e59f2128 ldr r2, [pc, #296] ; 7288 <_Heap_Walk+0x584> 715c: e1a00005 mov r0, r5 7160: e3a01001 mov r1, #1 7164: e1a03007 mov r3, r7 7168: e1a0e00f mov lr, pc 716c: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7170: e1a0800b mov r8, fp 7174: ea00001e b 71f4 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 7178: e5963008 ldr r3, [r6, #8] 717c: ea000002 b 718c <_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 ) { 7180: e1530007 cmp r3, r7 7184: 0a000016 beq 71e4 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 7188: 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 ) { 718c: e1530006 cmp r3, r6 7190: 1afffffa bne 7180 <_Heap_Walk+0x47c> 7194: ea000019 b 7200 <_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) { 7198: e35b0000 cmp fp, #0 719c: 0a000007 beq 71c0 <_Heap_Walk+0x4bc> (*printer)( 71a0: e58da000 str sl, [sp] 71a4: e1a00005 mov r0, r5 71a8: e3a01000 mov r1, #0 71ac: e59f20d8 ldr r2, [pc, #216] ; 728c <_Heap_Walk+0x588> 71b0: e1a03007 mov r3, r7 71b4: e1a0e00f mov lr, pc 71b8: e12fff14 bx r4 71bc: ea000008 b 71e4 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 71c0: e58da000 str sl, [sp] 71c4: e5973000 ldr r3, [r7] 71c8: e1a00005 mov r0, r5 71cc: e58d3004 str r3, [sp, #4] 71d0: e1a0100b mov r1, fp 71d4: e59f20b4 ldr r2, [pc, #180] ; 7290 <_Heap_Walk+0x58c> 71d8: e1a03007 mov r3, r7 71dc: e1a0e00f mov lr, pc 71e0: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 71e4: e59d2020 ldr r2, [sp, #32] 71e8: e1580002 cmp r8, r2 71ec: 1affff6a bne 6f9c <_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; 71f0: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 71f4: e1a00008 mov r0, r8 71f8: e28dd030 add sp, sp, #48 ; 0x30 71fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 7200: e59f208c ldr r2, [pc, #140] ; 7294 <_Heap_Walk+0x590> 7204: e1a00005 mov r0, r5 7208: e3a01001 mov r1, #1 720c: e1a03007 mov r3, r7 7210: e1a0e00f mov lr, pc 7214: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7218: e3a08000 mov r8, #0 721c: eafffff4 b 71f4 <_Heap_Walk+0x4f0> =============================================================================== 00007b60 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 7b60: e92d4031 push {r0, r4, r5, lr} 7b64: e1a05001 mov r5, r1 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 7b68: e2501000 subs r1, r0, #0 7b6c: 059f3078 ldreq r3, [pc, #120] ; 7bec <_Objects_Id_to_name+0x8c> 7b70: 05933004 ldreq r3, [r3, #4] 7b74: 05931008 ldreq r1, [r3, #8] 7b78: e1a03c21 lsr r3, r1, #24 7b7c: e2033007 and r3, r3, #7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 7b80: e2432001 sub r2, r3, #1 7b84: e3520002 cmp r2, #2 7b88: 8a000010 bhi 7bd0 <_Objects_Id_to_name+0x70> 7b8c: ea000011 b 7bd8 <_Objects_Id_to_name+0x78> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 7b90: e1a02da1 lsr r2, r1, #27 if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 7b94: e7930102 ldr r0, [r3, r2, lsl #2] if ( !information ) 7b98: e3500000 cmp r0, #0 7b9c: 0a00000b beq 7bd0 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 7ba0: e5d04038 ldrb r4, [r0, #56] ; 0x38 7ba4: e3540000 cmp r4, #0 7ba8: 1a000008 bne 7bd0 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 7bac: e1a0200d mov r2, sp 7bb0: ebffffd0 bl 7af8 <_Objects_Get> if ( !the_object ) 7bb4: e3500000 cmp r0, #0 7bb8: 0a000004 beq 7bd0 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; 7bbc: e590300c ldr r3, [r0, #12] 7bc0: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 7bc4: eb000216 bl 8424 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 7bc8: e1a00004 mov r0, r4 7bcc: ea000000 b 7bd4 <_Objects_Id_to_name+0x74> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 7bd0: e3a00003 mov r0, #3 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 7bd4: e8bd8038 pop {r3, r4, r5, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 7bd8: e59f2010 ldr r2, [pc, #16] ; 7bf0 <_Objects_Id_to_name+0x90> 7bdc: e7923103 ldr r3, [r2, r3, lsl #2] 7be0: e3530000 cmp r3, #0 7be4: 1affffe9 bne 7b90 <_Objects_Id_to_name+0x30> 7be8: eafffff8 b 7bd0 <_Objects_Id_to_name+0x70> <== NOT EXECUTED =============================================================================== 00006e4c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 6e4c: e92d40f0 push {r4, r5, r6, r7, lr} 6e50: e1a05000 mov r5, r0 6e54: e1a06001 mov r6, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 6e58: e1a00002 mov r0, r2 6e5c: e1d513ba ldrh r1, [r5, #58] ; 0x3a bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 6e60: e1a07002 mov r7, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 6e64: eb002002 bl ee74 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 6e68: e5d53038 ldrb r3, [r5, #56] ; 0x38 6e6c: e3530000 cmp r3, #0 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 6e70: e1a04000 mov r4, r0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 6e74: 0a000011 beq 6ec0 <_Objects_Set_name+0x74> char *d; d = _Workspace_Allocate( length + 1 ); 6e78: e2800001 add r0, r0, #1 6e7c: eb00068b bl 88b0 <_Workspace_Allocate> if ( !d ) 6e80: e2505000 subs r5, r0, #0 6e84: 0a000020 beq 6f0c <_Objects_Set_name+0xc0> return false; if ( the_object->name.name_p ) { 6e88: e596000c ldr r0, [r6, #12] 6e8c: e3500000 cmp r0, #0 6e90: 0a000002 beq 6ea0 <_Objects_Set_name+0x54> _Workspace_Free( (void *)the_object->name.name_p ); 6e94: eb00068b bl 88c8 <_Workspace_Free> the_object->name.name_p = NULL; 6e98: e3a03000 mov r3, #0 6e9c: e586300c str r3, [r6, #12] } strncpy( d, name, length ); 6ea0: e1a00005 mov r0, r5 6ea4: e1a01007 mov r1, r7 6ea8: e1a02004 mov r2, r4 6eac: eb001fb5 bl ed88 d[length] = '\0'; 6eb0: e3a03000 mov r3, #0 6eb4: e7c53004 strb r3, [r5, r4] the_object->name.name_p = d; 6eb8: e586500c str r5, [r6, #12] 6ebc: ea000010 b 6f04 <_Objects_Set_name+0xb8> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 6ec0: e3500001 cmp r0, #1 6ec4: 85d73001 ldrbhi r3, [r7, #1] 6ec8: e5d72000 ldrb r2, [r7] 6ecc: 81a03803 lslhi r3, r3, #16 6ed0: 93a03602 movls r3, #2097152 ; 0x200000 6ed4: e1a02c02 lsl r2, r2, #24 6ed8: e3500002 cmp r0, #2 6edc: e1832002 orr r2, r3, r2 6ee0: 85d73002 ldrbhi r3, [r7, #2] 6ee4: 93a03a02 movls r3, #8192 ; 0x2000 6ee8: 81a03403 lslhi r3, r3, #8 6eec: e3500003 cmp r0, #3 6ef0: e1822003 orr r2, r2, r3 6ef4: 85d73003 ldrbhi r3, [r7, #3] 6ef8: 93a03020 movls r3, #32 6efc: e1823003 orr r3, r2, r3 6f00: e586300c str r3, [r6, #12] ((3 < length) ? s[ 3 ] : ' ') ); } return true; 6f04: e3a00001 mov r0, #1 6f08: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 6f0c: e1a00005 mov r0, r5 <== NOT EXECUTED ); } return true; } 6f10: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00005f2c <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5f2c: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 5f30: e1a05000 mov r5, r0 5f34: e1a04001 mov r4, r1 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 5f38: e1a00001 mov r0, r1 5f3c: e1a0100d mov r1, sp pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5f40: e1a07002 mov r7, r2 5f44: e20380ff and r8, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 5f48: eb000057 bl 60ac <_POSIX_Mutex_Get> 5f4c: e3500000 cmp r0, #0 5f50: e1a0600d mov r6, sp 5f54: 0a000032 beq 6024 <_POSIX_Condition_variables_Wait_support+0xf8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 5f58: e59f30d0 ldr r3, [pc, #208] ; 6030 <_POSIX_Condition_variables_Wait_support+0x104> 5f5c: e5932000 ldr r2, [r3] 5f60: e2422001 sub r2, r2, #1 5f64: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5f68: e1a00005 mov r0, r5 5f6c: e1a0100d mov r1, sp 5f70: ebffff7c bl 5d68 <_POSIX_Condition_variables_Get> switch ( location ) { 5f74: e59d3000 ldr r3, [sp] 5f78: e3530000 cmp r3, #0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5f7c: e1a0a000 mov sl, r0 switch ( location ) { 5f80: 1a000027 bne 6024 <_POSIX_Condition_variables_Wait_support+0xf8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 5f84: e5903014 ldr r3, [r0, #20] 5f88: e3530000 cmp r3, #0 5f8c: 0a000004 beq 5fa4 <_POSIX_Condition_variables_Wait_support+0x78> 5f90: e5942000 ldr r2, [r4] 5f94: e1530002 cmp r3, r2 5f98: 0a000001 beq 5fa4 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 5f9c: eb000bd5 bl 8ef8 <_Thread_Enable_dispatch> 5fa0: ea00001f b 6024 <_POSIX_Condition_variables_Wait_support+0xf8> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 5fa4: e1a00004 mov r0, r4 5fa8: eb0000e0 bl 6330 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 5fac: e3580000 cmp r8, #0 5fb0: 1a000014 bne 6008 <_POSIX_Condition_variables_Wait_support+0xdc> the_cond->Mutex = *mutex; 5fb4: e5943000 ldr r3, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5fb8: e59f6074 ldr r6, [pc, #116] ; 6034 <_POSIX_Condition_variables_Wait_support+0x108> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 5fbc: e58a3014 str r3, [sl, #20] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 5fc0: e3a03001 mov r3, #1 5fc4: e58a3048 str r3, [sl, #72] ; 0x48 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5fc8: e5963004 ldr r3, [r6, #4] 5fcc: e5838034 str r8, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 5fd0: e5952000 ldr r2, [r5] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 5fd4: e28a0018 add r0, sl, #24 _Thread_Executing->Wait.id = *cond; 5fd8: e5832020 str r2, [r3, #32] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 5fdc: e5830044 str r0, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 5fe0: e1a01007 mov r1, r7 5fe4: e59f204c ldr r2, [pc, #76] ; 6038 <_POSIX_Condition_variables_Wait_support+0x10c> 5fe8: eb000cf3 bl 93bc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 5fec: eb000bc1 bl 8ef8 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 5ff0: e5963004 ldr r3, [r6, #4] 5ff4: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 5ff8: e3550074 cmp r5, #116 ; 0x74 5ffc: 13550000 cmpne r5, #0 6000: 0a000002 beq 6010 <_POSIX_Condition_variables_Wait_support+0xe4> 6004: ea000007 b 6028 <_POSIX_Condition_variables_Wait_support+0xfc><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 6008: eb000bba bl 8ef8 <_Thread_Enable_dispatch> status = ETIMEDOUT; 600c: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 6010: e1a00004 mov r0, r4 6014: eb0000a6 bl 62b4 if ( mutex_status ) return EINVAL; 6018: e3500000 cmp r0, #0 601c: 13a05016 movne r5, #22 6020: ea000000 b 6028 <_POSIX_Condition_variables_Wait_support+0xfc> #endif case OBJECTS_ERROR: break; } return EINVAL; 6024: e3a05016 mov r5, #22 } 6028: e1a00005 mov r0, r5 602c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00007408 <_Thread_queue_Enqueue_priority>: 7408: 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; 740c: e591c014 ldr ip, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7410: e5813038 str r3, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 7414: e3a03000 mov r3, #0 7418: e581303c str r3, [r1, #60] ; 0x3c Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 741c: 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 ) { 7420: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} the_chain->last = _Chain_Head(the_chain); 7424: 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 ]; 7428: e3a0400c mov r4, #12 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 742c: e1a0332c lsr r3, ip, #6 7430: e0030394 mul r3, r4, r3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 7434: e31c0020 tst ip, #32 _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 ]; 7438: e0807003 add r7, r0, r3 block_state = the_thread_queue->state; 743c: e5908038 ldr r8, [r0, #56] ; 0x38 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 7440: 159fa15c ldrne sl, [pc, #348] ; 75a4 <_Thread_queue_Enqueue_priority+0x19c> _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 7444: 11a0b007 movne fp, r7 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 7448: 1a000024 bne 74e0 <_Thread_queue_Enqueue_priority+0xd8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 744c: e2833004 add r3, r3, #4 7450: e080a003 add sl, r0, r3 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7454: e10f4000 mrs r4, CPSR 7458: e3843080 orr r3, r4, #128 ; 0x80 745c: e129f003 msr CPSR_fc, r3 7460: e1a05004 mov r5, r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 7464: e3e06000 mvn r6, #0 _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 7468: e5973000 ldr r3, [r7] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 746c: ea00000b b 74a0 <_Thread_queue_Enqueue_priority+0x98> search_priority = search_thread->current_priority; 7470: e5936014 ldr r6, [r3, #20] if ( priority <= search_priority ) 7474: e15c0006 cmp ip, r6 7478: 9a00000a bls 74a8 <_Thread_queue_Enqueue_priority+0xa0> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 747c: e10f9000 mrs r9, CPSR 7480: e129f004 msr CPSR_fc, r4 7484: 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); 7488: 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) ) { 748c: e1180009 tst r8, r9 7490: 1a000001 bne 749c <_Thread_queue_Enqueue_priority+0x94> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7494: e129f004 msr CPSR_fc, r4 7498: eaffffed b 7454 <_Thread_queue_Enqueue_priority+0x4c> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 749c: e5933000 ldr r3, [r3] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 74a0: e153000a cmp r3, sl 74a4: 1afffff1 bne 7470 <_Thread_queue_Enqueue_priority+0x68> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 74a8: e5907030 ldr r7, [r0, #48] ; 0x30 74ac: e3570001 cmp r7, #1 74b0: 1a000038 bne 7598 <_Thread_queue_Enqueue_priority+0x190> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 74b4: e3a02000 mov r2, #0 if ( priority == search_priority ) 74b8: 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; 74bc: e5802030 str r2, [r0, #48] ; 0x30 if ( priority == search_priority ) 74c0: 0a00002a beq 7570 <_Thread_queue_Enqueue_priority+0x168> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 74c4: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 74c8: e5813000 str r3, [r1] the_node->previous = previous_node; 74cc: e5812004 str r2, [r1, #4] previous_node->next = the_node; 74d0: e5821000 str r1, [r2] search_node->previous = the_node; 74d4: e5831004 str r1, [r3, #4] the_thread->Wait.queue = the_thread_queue; 74d8: e5810044 str r0, [r1, #68] ; 0x44 _ISR_Enable( level ); 74dc: ea000021 b 7568 <_Thread_queue_Enqueue_priority+0x160> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 74e0: e5da6000 ldrb r6, [sl] 74e4: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 74e8: e10f4000 mrs r4, CPSR 74ec: e3843080 orr r3, r4, #128 ; 0x80 74f0: e129f003 msr CPSR_fc, r3 74f4: e1a05004 mov r5, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 74f8: e59b3008 ldr r3, [fp, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 74fc: ea00000b b 7530 <_Thread_queue_Enqueue_priority+0x128> search_priority = search_thread->current_priority; 7500: e5936014 ldr r6, [r3, #20] if ( priority >= search_priority ) 7504: e15c0006 cmp ip, r6 7508: 2a00000a bcs 7538 <_Thread_queue_Enqueue_priority+0x130> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 750c: e10f9000 mrs r9, CPSR 7510: e129f004 msr CPSR_fc, r4 7514: e129f009 msr CPSR_fc, r9 7518: 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) ) { 751c: e1180009 tst r8, r9 7520: 1a000001 bne 752c <_Thread_queue_Enqueue_priority+0x124> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7524: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 7528: eaffffec b 74e0 <_Thread_queue_Enqueue_priority+0xd8> <== NOT EXECUTED _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 752c: e5933004 ldr r3, [r3, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7530: e1530007 cmp r3, r7 7534: 1afffff1 bne 7500 <_Thread_queue_Enqueue_priority+0xf8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7538: e5907030 ldr r7, [r0, #48] ; 0x30 753c: e3570001 cmp r7, #1 7540: 1a000014 bne 7598 <_Thread_queue_Enqueue_priority+0x190> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7544: e3a02000 mov r2, #0 if ( priority == search_priority ) 7548: 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; 754c: e5802030 str r2, [r0, #48] ; 0x30 if ( priority == search_priority ) 7550: 0a000006 beq 7570 <_Thread_queue_Enqueue_priority+0x168> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 7554: e5932000 ldr r2, [r3] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7558: e881000c stm r1, {r2, r3} search_node->next = the_node; next_node->previous = the_node; 755c: 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; 7560: e5831000 str r1, [r3] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7564: e5810044 str r0, [r1, #68] ; 0x44 7568: e129f004 msr CPSR_fc, r4 756c: ea000007 b 7590 <_Thread_queue_Enqueue_priority+0x188> 7570: e283303c add r3, r3, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 7574: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7578: e5813000 str r3, [r1] the_node->previous = previous_node; 757c: e5812004 str r2, [r1, #4] previous_node->next = the_node; 7580: e5821000 str r1, [r2] search_node->previous = the_node; 7584: e5831004 str r1, [r3, #4] the_thread->Wait.queue = the_thread_queue; 7588: e5810044 str r0, [r1, #68] ; 0x44 758c: e129f005 msr CPSR_fc, r5 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7590: e3a00001 mov r0, #1 7594: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, 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; 7598: e5825000 str r5, [r2] return the_thread_queue->sync_state; 759c: e5900030 ldr r0, [r0, #48] ; 0x30 } 75a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000ae68 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { ae68: e92d4070 push {r4, r5, r6, lr} ae6c: e20220ff and r2, r2, #255 ; 0xff ae70: e1a04001 mov r4, r1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( ae74: e10f1000 mrs r1, CPSR ae78: e3813080 orr r3, r1, #128 ; 0x80 ae7c: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ae80: e59f30a8 ldr r3, [pc, #168] ; af30 <_Thread_queue_Extract_priority_helper+0xc8> ae84: e5940010 ldr r0, [r4, #16] ae88: e0003003 and r3, r0, r3 Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ae8c: e3530000 cmp r3, #0 ae90: 1a000000 bne ae98 <_Thread_queue_Extract_priority_helper+0x30> _ISR_Enable( level ); ae94: ea000015 b aef0 <_Thread_queue_Extract_priority_helper+0x88> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ae98: e5943038 ldr r3, [r4, #56] ; 0x38 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; ae9c: e8941001 ldm r4, {r0, ip} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; aea0: e284503c add r5, r4, #60 ; 0x3c previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { aea4: e1530005 cmp r3, r5 new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; aea8: 058c0000 streq r0, [ip] next_node->previous = previous_node; aeac: 0580c004 streq ip, [r0, #4] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { aeb0: 0a00000c beq aee8 <_Thread_queue_Extract_priority_helper+0x80> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; aeb4: e5945040 ldr r5, [r4, #64] ; 0x40 previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { aeb8: e1530005 cmp r3, r5 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; aebc: e5936000 ldr r6, [r3] previous_node->next = new_first_node; next_node->previous = new_first_node; aec0: e5803004 str r3, [r0, #4] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; aec4: e58c3000 str r3, [ip] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; aec8: e8831001 stm r3, {r0, ip} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { aecc: 0a000005 beq aee8 <_Thread_queue_Extract_priority_helper+0x80> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); aed0: e2830038 add r0, r3, #56 ; 0x38 new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = aed4: e5860004 str r0, [r6, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; aed8: e5836038 str r6, [r3, #56] ; 0x38 new_first_thread->Wait.Block2n.last = last_node; aedc: e5835040 str r5, [r3, #64] ; 0x40 aee0: e283303c add r3, r3, #60 ; 0x3c last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); aee4: e5853000 str r3, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { aee8: e3520000 cmp r2, #0 aeec: 0a000001 beq aef8 <_Thread_queue_Extract_priority_helper+0x90> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( aef0: e129f001 msr CPSR_fc, r1 aef4: e8bd8070 pop {r4, r5, r6, pc} _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { aef8: e5943050 ldr r3, [r4, #80] ; 0x50 aefc: e3530002 cmp r3, #2 af00: 0a000001 beq af0c <_Thread_queue_Extract_priority_helper+0xa4> af04: e129f001 msr CPSR_fc, r1 af08: ea000004 b af20 <_Thread_queue_Extract_priority_helper+0xb8> af0c: e3a03003 mov r3, #3 <== NOT EXECUTED af10: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED af14: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); af18: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED af1c: ebfff43c bl 8014 <_Watchdog_Remove> <== NOT EXECUTED af20: e59f100c ldr r1, [pc, #12] ; af34 <_Thread_queue_Extract_priority_helper+0xcc> af24: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } af28: e8bd4070 pop {r4, r5, r6, lr} af2c: eaffeef9 b 6b18 <_Thread_Clear_state> =============================================================================== 000140e8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 140e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 140ec: e24dd018 sub sp, sp, #24 140f0: e28db00c add fp, sp, #12 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 140f4: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 140f8: e28ba004 add sl, fp, #4 140fc: e28d7004 add r7, sp, #4 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 14100: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; 14104: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); 14108: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1410c: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; 14110: e98d2008 stmib sp, {r3, sp} 14114: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 14118: e1a0500d mov r5, sp */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1411c: e2809030 add r9, r0, #48 ; 0x30 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 14120: e584b078 str fp, [r4, #120] ; 0x78 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 14124: e2848068 add r8, r4, #104 ; 0x68 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 14128: e59f2150 ldr r2, [pc, #336] ; 14280 <_Timer_server_Body+0x198> 1412c: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 14130: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14134: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 14138: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1413c: e0611003 rsb r1, r1, r3 14140: e1a00009 mov r0, r9 14144: eb0010d6 bl 184a4 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 14148: e59f3134 ldr r3, [pc, #308] ; 14284 <_Timer_server_Body+0x19c> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1414c: e5942074 ldr r2, [r4, #116] ; 0x74 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 14150: e5936000 ldr r6, [r3] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 14154: e1560002 cmp r6, r2 14158: 9a000004 bls 14170 <_Timer_server_Body+0x88> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1415c: e0621006 rsb r1, r2, r6 14160: e1a00008 mov r0, r8 14164: e1a02005 mov r2, r5 14168: eb0010cd bl 184a4 <_Watchdog_Adjust_to_chain> 1416c: ea000003 b 14180 <_Timer_server_Body+0x98> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 14170: 31a00008 movcc r0, r8 14174: 33a01001 movcc r1, #1 14178: 30662002 rsbcc r2, r6, r2 1417c: 3b0010a0 blcc 18404 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 14180: e5846074 str r6, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 14184: e5940078 ldr r0, [r4, #120] ; 0x78 14188: eb000295 bl 14be4 <_Chain_Get> if ( timer == NULL ) { 1418c: e2506000 subs r6, r0, #0 14190: 0a000009 beq 141bc <_Timer_server_Body+0xd4> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 14194: e5963038 ldr r3, [r6, #56] ; 0x38 14198: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1419c: 01a00009 moveq r0, r9 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 141a0: 0a000002 beq 141b0 <_Timer_server_Body+0xc8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 141a4: e3530003 cmp r3, #3 141a8: 1afffff5 bne 14184 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 141ac: e1a00008 mov r0, r8 141b0: e2861010 add r1, r6, #16 141b4: eb0010e5 bl 18550 <_Watchdog_Insert> 141b8: eafffff1 b 14184 <_Timer_server_Body+0x9c> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 141bc: ebffff97 bl 14020 if ( _Chain_Is_empty( insert_chain ) ) { 141c0: e59d300c ldr r3, [sp, #12] 141c4: e153000a cmp r3, sl 141c8: 1a000006 bne 141e8 <_Timer_server_Body+0x100> ts->insert_chain = NULL; 141cc: e5846078 str r6, [r4, #120] ; 0x78 141d0: e129f000 msr CPSR_fc, r0 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 141d4: e59d3000 ldr r3, [sp] 141d8: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; 141dc: 13a06000 movne r6, #0 141e0: 1a000002 bne 141f0 <_Timer_server_Body+0x108> 141e4: ea000013 b 14238 <_Timer_server_Body+0x150> 141e8: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 141ec: eaffffcd b 14128 <_Timer_server_Body+0x40> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 141f0: ebffff8a bl 14020 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 141f4: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 141f8: e1530007 cmp r3, r7 141fc: 0a00000b beq 14230 <_Timer_server_Body+0x148> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 14200: e5932000 ldr r2, [r3] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 14204: e3530000 cmp r3, #0 the_chain->first = new_first; 14208: e58d2000 str r2, [sp] new_first->previous = _Chain_Head(the_chain); 1420c: e5825004 str r5, [r2, #4] 14210: 0a000006 beq 14230 <_Timer_server_Body+0x148> watchdog->state = WATCHDOG_INACTIVE; 14214: e5836008 str r6, [r3, #8] 14218: e129f000 msr CPSR_fc, r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 1421c: e2830020 add r0, r3, #32 14220: e8900003 ldm r0, {r0, r1} 14224: e1a0e00f mov lr, pc 14228: e593f01c ldr pc, [r3, #28] } 1422c: eaffffef b 141f0 <_Timer_server_Body+0x108> 14230: e129f000 msr CPSR_fc, r0 14234: eaffffb9 b 14120 <_Timer_server_Body+0x38> } else { ts->active = false; 14238: e3a03000 mov r3, #0 1423c: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 14240: ebffff7a bl 14030 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 14244: e3a01008 mov r1, #8 14248: e5940000 ldr r0, [r4] 1424c: eb000e1b bl 17ac0 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 14250: e1a00004 mov r0, r4 14254: ebffff7b bl 14048 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 14258: e1a00004 mov r0, r4 1425c: ebffff8d bl 14098 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 14260: eb000b97 bl 170c4 <_Thread_Enable_dispatch> ts->active = true; 14264: e3a03001 mov r3, #1 14268: e5c4307c strb r3, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1426c: e2840008 add r0, r4, #8 14270: eb00110c bl 186a8 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 14274: e2840040 add r0, r4, #64 ; 0x40 14278: eb00110a bl 186a8 <_Watchdog_Remove> 1427c: eaffffa7 b 14120 <_Timer_server_Body+0x38> =============================================================================== 00009734 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 9734: e3500000 cmp r0, #0 9738: 0a00000b beq 976c 973c: e5903000 ldr r3, [r0] 9740: e3530000 cmp r3, #0 9744: 0a000008 beq 976c return EINVAL; switch ( policy ) { 9748: e3510004 cmp r1, #4 974c: 8a000008 bhi 9774 9750: e3a03001 mov r3, #1 9754: e1a03113 lsl r3, r3, r1 9758: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 975c: 15801014 strne r1, [r0, #20] return 0; 9760: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 9764: 112fff1e bxne lr 9768: ea000001 b 9774 <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 976c: e3a00016 mov r0, #22 9770: e12fff1e bx lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 9774: e3a00086 mov r0, #134 ; 0x86 } } 9778: e12fff1e bx lr =============================================================================== 00004f80 : 4f80: e59f30f4 ldr r3, [pc, #244] ; 507c 4f84: e5932000 ldr r2, [r3] 4f88: e2822001 add r2, r2, #1 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 4f8c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 4f90: e5832000 str r2, [r3] 4f94: e1a08000 mov r8, r0 4f98: e1a05001 mov r5, r1 * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 4f9c: e59f00dc ldr r0, [pc, #220] ; 5080 4fa0: eb000834 bl 7078 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 4fa4: e2504000 subs r4, r0, #0 4fa8: 1a000002 bne 4fb8 _Thread_Enable_dispatch(); 4fac: eb000b51 bl 7cf8 <_Thread_Enable_dispatch> return EAGAIN; 4fb0: e3a0000b mov r0, #11 4fb4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } the_key->destructor = destructor; 4fb8: e59f70c4 ldr r7, [pc, #196] ; 5084 4fbc: e5845010 str r5, [r4, #16] 4fc0: e1a06004 mov r6, r4 * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 4fc4: e3a05001 mov r5, #1 the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 4fc8: e5b73004 ldr r3, [r7, #4]! 4fcc: e3530000 cmp r3, #0 4fd0: 0a000019 beq 503c true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); 4fd4: e5933004 ldr r3, [r3, #4] 4fd8: e1d3a1b0 ldrh sl, [r3, #16] 4fdc: e28aa001 add sl, sl, #1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 4fe0: e1a0a10a lsl sl, sl, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 4fe4: e1a0000a mov r0, sl 4fe8: eb001049 bl 9114 <_Workspace_Allocate> if ( !table ) { 4fec: e2503000 subs r3, r0, #0 4ff0: 1a00000c bne 5028 int _EXFUN(pthread_once, (pthread_once_t *__once_control, void (*__init_routine)(void))); /* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */ int _EXFUN(pthread_key_create, 4ff4: e2856005 add r6, r5, #5 4ff8: e0846106 add r6, r4, r6, lsl #2 for ( --the_api; 4ffc: ea000001 b 5008 the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 5000: e5360004 ldr r0, [r6, #-4]! 5004: eb001048 bl 912c <_Workspace_Free> #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 5008: e2555001 subs r5, r5, #1 500c: 1afffffb bne 5000 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 5010: e59f0068 ldr r0, [pc, #104] ; 5080 5014: e1a01004 mov r1, r4 5018: eb0008de bl 7398 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 501c: eb000b35 bl 7cf8 <_Thread_Enable_dispatch> return ENOMEM; 5020: e3a0000c mov r0, #12 5024: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } the_key->Values[ the_api ] = table; 5028: e5863018 str r3, [r6, #24] memset( table, '\0', bytes_to_allocate ); 502c: e3a01000 mov r1, #0 5030: e1a0200a mov r2, sl 5034: eb00244f bl e178 5038: ea000000 b 5040 } else { the_key->Values[ the_api ] = NULL; 503c: e5863018 str r3, [r6, #24] <== NOT EXECUTED * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 5040: e2855001 add r5, r5, #1 * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 5044: e3550004 cmp r5, #4 the_api <= OBJECTS_APIS_LAST; the_api++ ) { 5048: e2866004 add r6, r6, #4 * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 504c: 1affffdd bne 4fc8 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5050: e59f2028 ldr r2, [pc, #40] ; 5080 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 5054: e5943008 ldr r3, [r4, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5058: e592201c ldr r2, [r2, #28] Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 505c: e1d410b8 ldrh r1, [r4, #8] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 5060: e3a05000 mov r5, #0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5064: e7824101 str r4, [r2, r1, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 5068: e584500c str r5, [r4, #12] } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 506c: e5883000 str r3, [r8] _Thread_Enable_dispatch(); 5070: eb000b20 bl 7cf8 <_Thread_Enable_dispatch> return 0; 5074: e1a00005 mov r0, r5 } 5078: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 000070b8 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 70b8: e3500000 cmp r0, #0 70bc: 0a000007 beq 70e0 70c0: e5903000 ldr r3, [r0] 70c4: e3530000 cmp r3, #0 70c8: 0a000004 beq 70e0 return EINVAL; switch ( pshared ) { 70cc: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 70d0: 95801004 strls r1, [r0, #4] return 0; 70d4: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 70d8: 912fff1e bxls lr 70dc: ea000001 b 70e8 <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 70e0: e3a00016 mov r0, #22 70e4: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 70e8: e3a00016 mov r0, #22 <== NOT EXECUTED } } 70ec: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00006b20 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 6b20: e3500000 cmp r0, #0 6b24: 0a000007 beq 6b48 return EINVAL; if ( !attr->is_initialized ) 6b28: e5903000 ldr r3, [r0] 6b2c: e3530000 cmp r3, #0 6b30: 0a000004 beq 6b48 return EINVAL; switch ( pshared ) { 6b34: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 6b38: 95801004 strls r1, [r0, #4] return 0; 6b3c: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 6b40: 912fff1e bxls lr 6b44: ea000001 b 6b50 <== NOT EXECUTED { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 6b48: e3a00016 mov r0, #22 6b4c: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 6b50: e3a00016 mov r0, #22 <== NOT EXECUTED } } 6b54: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000c548 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { c548: 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 ) c54c: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { c550: e1a04000 mov r4, r0 c554: 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; c558: 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 ) c55c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; c560: e59f314c ldr r3, [pc, #332] ; c6b4 c564: 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; c568: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; c56c: e5976104 ldr r6, [r7, #260] ; 0x104 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) c570: 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; c574: 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; c578: 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; c57c: 03a08c01 moveq r8, #256 ; 0x100 c580: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) c584: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; c588: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; c58c: e3590000 cmp r9, #0 c590: 03a09b01 moveq r9, #1024 ; 0x400 c594: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); c598: ebffeff9 bl 8584 <_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; c59c: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); c5a0: e1898008 orr r8, r9, r8 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) c5a4: 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; c5a8: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) c5ac: 0a000003 beq c5c0 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; c5b0: e3140c01 tst r4, #256 ; 0x100 c5b4: 13a03000 movne r3, #0 c5b8: 03a03001 moveq r3, #1 c5bc: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { c5c0: e3150c02 tst r5, #512 ; 0x200 c5c4: 0a000006 beq c5e4 if ( _Modes_Is_timeslice(mode_set) ) { c5c8: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; c5cc: 13a03001 movne r3, #1 c5d0: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; c5d4: 159f30dc ldrne r3, [pc, #220] ; c6b8 c5d8: 15933000 ldrne r3, [r3] } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; c5dc: 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; c5e0: 15873078 strne r3, [r7, #120] ; 0x78 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) c5e4: e3150080 tst r5, #128 ; 0x80 c5e8: 0a000001 beq c5f4 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); c5ec: e2040080 and r0, r4, #128 ; 0x80 c5f0: ebffefde bl 8570 <_CPU_ISR_Set_level> */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { c5f4: e2150b01 ands r0, r5, #1024 ; 0x400 c5f8: 0a000013 beq c64c * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( c5fc: 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 ) { c600: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( c604: 13a03000 movne r3, #0 c608: 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 ) { c60c: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; c610: 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 ) { c614: 0a00000c beq c64c asr->is_enabled = is_asr_enabled; c618: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( c61c: e10f3000 mrs r3, CPSR c620: e3832080 orr r2, r3, #128 ; 0x80 c624: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; c628: e2861014 add r1, r6, #20 c62c: e8910006 ldm r1, {r1, r2} information->signals_pending = information->signals_posted; information->signals_posted = _signals; c630: 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; c634: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( c638: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { c63c: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; c640: e3500000 cmp r0, #0 c644: 13a00001 movne r0, #1 c648: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) c64c: e59f3068 ldr r3, [pc, #104] ; c6bc c650: e5933000 ldr r3, [r3] c654: e3530003 cmp r3, #3 c658: 1a000013 bne c6ac */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; c65c: e59f2050 ldr r2, [pc, #80] ; c6b4 c660: e5923004 ldr r3, [r2, #4] if ( !_States_Is_ready( executing->current_state ) || c664: e5931010 ldr r1, [r3, #16] c668: e3510000 cmp r1, #0 c66c: 1a000005 bne c688 c670: e5922008 ldr r2, [r2, #8] c674: e1530002 cmp r3, r2 c678: 0a000006 beq c698 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { c67c: e5d33074 ldrb r3, [r3, #116] ; 0x74 c680: e3530000 cmp r3, #0 c684: 0a000003 beq c698 _Context_Switch_necessary = true; c688: e59f3024 ldr r3, [pc, #36] ; c6b4 c68c: e3a02001 mov r2, #1 c690: e5c32010 strb r2, [r3, #16] c694: ea000001 b c6a0 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) c698: e3500000 cmp r0, #0 c69c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch(); c6a0: ebffe9bb bl 6d94 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; c6a4: e3a00000 mov r0, #0 c6a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} c6ac: e3a00000 mov r0, #0 <== NOT EXECUTED } c6b0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 000057ac : struct sigaction *oact ) { ISR_Level level; if ( oact ) 57ac: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 57b0: 159f20b8 ldrne r2, [pc, #184] ; 5870 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 57b4: e92d40f0 push {r4, r5, r6, r7, lr} 57b8: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 57bc: 13a0100c movne r1, #12 57c0: 10222091 mlane r2, r1, r0, r2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 57c4: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 57c8: 18920007 ldmne r2, {r0, r1, r2} 57cc: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 57d0: e3540000 cmp r4, #0 57d4: 0a000004 beq 57ec static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 57d8: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 57dc: e353001f cmp r3, #31 57e0: 8a000001 bhi 57ec * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 57e4: e3540009 cmp r4, #9 57e8: 1a000004 bne 5800 rtems_set_errno_and_return_minus_one( EINVAL ); 57ec: eb002106 bl dc0c <__errno> 57f0: e3a03016 mov r3, #22 57f4: e5803000 str r3, [r0] 57f8: e3e00000 mvn r0, #0 57fc: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 5800: e3550000 cmp r5, #0 5804: 0a000017 beq 5868 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 5808: e10f6000 mrs r6, CPSR 580c: e3863080 orr r3, r6, #128 ; 0x80 5810: 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 ) { 5814: e5953008 ldr r3, [r5, #8] 5818: e3530000 cmp r3, #0 581c: e59f704c ldr r7, [pc, #76] ; 5870 5820: 1a000007 bne 5844 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 5824: e283300c add r3, r3, #12 5828: e0040493 mul r4, r3, r4 582c: e59f2040 ldr r2, [pc, #64] ; 5874 5830: e0873004 add r3, r7, r4 5834: e0824004 add r4, r2, r4 5838: e8940007 ldm r4, {r0, r1, r2} 583c: e8830007 stm r3, {r0, r1, r2} 5840: ea000005 b 585c } else { _POSIX_signals_Clear_process_signals( sig ); 5844: e1a00004 mov r0, r4 5848: eb001580 bl ae50 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 584c: e3a0300c mov r3, #12 5850: e0247493 mla r4, r3, r4, r7 5854: e8950007 ldm r5, {r0, r1, r2} 5858: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 585c: 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; 5860: e3a00000 mov r0, #0 5864: e8bd80f0 pop {r4, r5, r6, r7, pc} 5868: e1a00005 mov r0, r5 <== NOT EXECUTED } 586c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00007ddc : int sigwait( const sigset_t *set, int *sig ) { 7ddc: e92d4010 push {r4, lr} 7de0: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 7de4: e3a01000 mov r1, #0 7de8: e1a02001 mov r2, r1 7dec: ebffff8e bl 7c2c if ( status != -1 ) { 7df0: e3700001 cmn r0, #1 7df4: 0a000004 beq 7e0c if ( sig ) 7df8: e3540000 cmp r4, #0 *sig = status; 7dfc: 15840000 strne r0, [r4] return 0; 7e00: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 7e04: 18bd8010 popne {r4, pc} 7e08: ea000002 b 7e18 <== NOT EXECUTED *sig = status; return 0; } return errno; 7e0c: eb002034 bl fee4 <__errno> 7e10: e5900000 ldr r0, [r0] 7e14: e8bd8010 pop {r4, pc} status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 7e18: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 7e1c: e8bd8010 pop {r4, pc} <== NOT EXECUTED